Skip to content

Commit 8e15d79

Browse files
authored
Merge pull request #1506 from coderdojo-japan/remove-scrivito
CMS のコンフィグなどの特有なファイルなどを削除したい
2 parents 2efe7ad + 61efd55 commit 8e15d79

File tree

79 files changed

+15
-631
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+15
-631
lines changed

.env.sample

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,3 @@ DATABASE_USER=postgres
22
DATABASE_PASSWORD=password
33
DATABASE_HOST=db
44
DATABASE_PORT=5432
5-
6-
SCRIVITO_TENANT=
7-
SCRIVITO_API_KEY=
8-
SCRIVITO_EMAIL=test@example.com
9-
SCRIVITO_PASSWORD=testpassword

.github/workflows/test.yml

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -45,23 +45,8 @@ jobs:
4545
bundle exec rails db:create
4646
bundle exec rails db:setup
4747
48-
- name: 🔧 Test with/without Scrivito
49-
env:
50-
SCRIVITO_EMAIL: test@example.com
51-
SCRIVITO_PASSWORD: testpassword
52-
SCRIVITO_TENANT: ${{ secrets.SCRIVITO_TENANT }}
53-
SCRIVITO_API_KEY: ${{ secrets.SCRIVITO_API_KEY }}
54-
run: |
55-
if [ '${{ github.actor }}' == *'dependabot'* ]; then
56-
echo 'Run test without Scrivito with PR by Dependabot'
57-
bundle exec rspec spec --tag ~@scrivito
58-
elif [ '${{ github.event.pull_request.head.repo.full_name }}' != '${{ github.repository }}' ]; then
59-
echo 'Run test without Scrivito with PR by ${{ github.actor }}'
60-
bundle exec rspec spec --tag ~@scrivito
61-
else
62-
echo 'Run test with Scrivito by organization members'
63-
bundle exec rspec spec
64-
fi
48+
- name: 🔧 Test
49+
run: bundle exec rspec spec
6550

6651
deploy:
6752
needs: test

Gemfile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ gem 'pg'
88
gem 'dumper'
99
gem 'bootsnap'
1010

11-
gem 'scrivito', '~> 1.17'
12-
gem 'scrivito_section_widgets'
13-
gem 'scrivito_teaser_widget'
14-
1511
gem 'coffee-rails'
1612
gem 'jbuilder'
1713
gem 'jquery-rails'

Gemfile.lock

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ GEM
9292
execjs
9393
coffee-script-source (1.12.2)
9494
concurrent-ruby (1.1.10)
95-
connection_pool (2.2.5)
9695
crass (1.0.6)
9796
debug_inspector (1.1.0)
9897
declarative (0.0.20)
@@ -177,9 +176,6 @@ GEM
177176
nokogiri (>= 1.6.0)
178177
ruby_parser (~> 3.5)
179178
httpclient (2.8.3)
180-
hyp_diff (0.0.6)
181-
diff-lcs (>= 1.2, < 2.0)
182-
nokogiri (>= 1.6, < 2.0)
183179
i18n (1.12.0)
184180
concurrent-ruby (~> 1.0)
185181
jbuilder (2.11.2)
@@ -189,8 +185,6 @@ GEM
189185
rails-dom-testing (>= 1, < 3)
190186
railties (>= 4.2.0)
191187
thor (>= 0.14, < 2.0)
192-
jquery-ui-rails (6.0.1)
193-
railties (>= 3.2.16)
194188
json (2.5.1)
195189
jwt (2.2.3)
196190
koala (3.0.0)
@@ -351,37 +345,6 @@ GEM
351345
tilt (>= 1.1, < 3)
352346
sassc (2.4.0)
353347
ffi (~> 1.9)
354-
scrivito (1.17.0)
355-
scrivito_content_browser (= 1.17.0)
356-
scrivito_editors (= 1.17.0)
357-
scrivito_sdk (= 1.17.0)
358-
scrivito_ui (= 1.17.0)
359-
scrivito_content_browser (1.17.0)
360-
railties
361-
scrivito_sdk (= 1.17.0)
362-
scrivito_editors (1.17.0)
363-
jquery-ui-rails (>= 5.0.0, < 7.0.0)
364-
railties
365-
scrivito_content_browser (= 1.17.0)
366-
scrivito_sdk (= 1.17.0)
367-
scrivito_sdk (1.17.0)
368-
addressable (~> 2.3)
369-
connection_pool (~> 2.2)
370-
diff-lcs (~> 1.3)
371-
hyp_diff (~> 0.0.4)
372-
jbuilder (~> 2.10)
373-
jquery-rails (~> 4.1)
374-
json (>= 2.0.0)
375-
memoist (>= 0.12.0)
376-
multipart-post (~> 2.0)
377-
nokogiri (~> 1.7)
378-
rails (~> 5.2.0)
379-
scrivito_section_widgets (1.1.2)
380-
scrivito
381-
scrivito_teaser_widget (0.1.2)
382-
scrivito
383-
scrivito_ui (1.17.0)
384-
railties
385348
secure_headers (6.3.2)
386349
selenium-webdriver (3.142.7)
387350
childprocess (>= 0.5, < 4.0)
@@ -487,9 +450,6 @@ DEPENDENCIES
487450
rspec-retry
488451
ruby-mp3info
489452
sass-rails (>= 5)
490-
scrivito (~> 1.17)
491-
scrivito_section_widgets
492-
scrivito_teaser_widget
493453
secure_headers
494454
selenium-webdriver
495455
simple_grid_rails

NOTICE.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,3 @@ See [Gemfile](https://github.com/coderdojo-japan/coderdojo.jp/blob/master/Gemfil
1818
- [coderdojo-tokyo/web](https://github.com/coderdojo-tokyo/web)
1919
- [Twitter Bootstrap](http://getbootstrap.com/)
2020
- [Clean Blog](https://startbootstrap.com/template-overviews/clean-blog/)
21-

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@ https://speakerdeck.com/yasulab/case-study-rails-cms-for-coderdojo
8585
- [Ruby](https://www.ruby-lang.org/ja/)
8686
- [Ruby on Rails](http://rubyonrails.org/)
8787
- [PostgreSQL](https://www.postgresql.jp/)
88-
- [Scrivito](https://scrivito.com/)
89-
- (:warning: *NOTE: Scrivito チームと相談し、今後別の仕組みに置き換わる予定です*)
88+
9089

9190
セットアップ方法の方法は次の通りです。
9291

app.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
"repository": "https://github.com/coderdojo-japan/coderdojo.jp",
77
"logo": "https://coderdojo.jp/logo.png",
88
"addons": [
9-
"logentries",
9+
"logtail",
1010
"heroku-postgresql",
1111
"scheduler"
1212
],
1313
"environments": {
1414
"review": {
15-
"addons": ["heroku-postgresql:hobby-dev"]
15+
"addons": ["heroku-postgresql:mini"]
1616
}
1717
},
1818
"buildpacks": [
@@ -32,5 +32,5 @@
3232
"scripts": {
3333
"postdeploy": "bundle exec rails db:schema:load && bundle exec rails db:seed && bundle exec rails dojos:update_db_by_yaml && bundle exec rails dojo_event_services:upsert && bundle exec rails assets:precompile RAILS_ENV=staging"
3434
},
35-
"stack": "heroku-18"
35+
"stack": "heroku-20"
3636
}

app/assets/javascripts/application.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
//
1313
//= require jquery
1414
//= require jquery_ujs
15-
//= require scrivito
16-
//= require scrivito_section_widgets
17-
//= require scrivito
1815
//= require bootstrap-sprockets
1916
//= require highcharts/highcharts
2017
//= require highcharts/highcharts-more

app/assets/stylesheets/application.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,5 @@
1212
*
1313
*= require_self
1414
*= require_directory .
15-
*= require scrivito_section_widgets
1615
*= require font-awesome
1716
*/

app/assets/stylesheets/sessions.scss

Lines changed: 0 additions & 3 deletions
This file was deleted.

app/assets/stylesheets/sotechsha.scss

Lines changed: 0 additions & 3 deletions
This file was deleted.

app/controllers/application_controller.rb

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,9 @@ class ApplicationController < ActionController::Base
22
#http_basic_authenticate_with name: ENV['BASIC_AUTH_NAME'],
33
# password: ENV['BASIC_AUTH_PASSWORD'] if Rails.env.staging?
44

5-
before_action :store_location , unless: :login_page_access?
6-
75
# Prevent CSRF attacks by raising an exception.
86
# For APIs, you may want to use :null_session instead.
97
protect_from_forgery with: :exception
10-
include SessionsHelper
118

129
before_action :set_request_variant
1310

@@ -16,19 +13,10 @@ class ApplicationController < ActionController::Base
1613
rescue_from Exception, with: :render_500
1714
rescue_from ActiveRecord::RecordNotFound, with: :render_404
1815
rescue_from ActionController::RoutingError, with: :render_404
19-
rescue_from Scrivito::ResourceNotFound, with: :render_404
2016
end
2117

2218
private
2319

24-
def store_location
25-
session[:original_url] = request.original_url
26-
end
27-
28-
def login_page_access?
29-
%w(login_page sessions).include? self.controller_name
30-
end
31-
3220
def set_request_variant
3321
request.variant = request.device_variant
3422
end

app/controllers/blog_post_page_controller.rb

Lines changed: 0 additions & 12 deletions
This file was deleted.

app/controllers/cms_controller.rb

Lines changed: 0 additions & 3 deletions
This file was deleted.

app/controllers/login_page_controller.rb

Lines changed: 0 additions & 2 deletions
This file was deleted.

app/controllers/plain_page_controller.rb

Lines changed: 0 additions & 7 deletions
This file was deleted.

app/controllers/sessions_controller.rb

Lines changed: 0 additions & 35 deletions
This file was deleted.

app/controllers/sotechsha_overview2_page_controller.rb

Lines changed: 0 additions & 7 deletions
This file was deleted.

app/controllers/sotechsha_overview_page_controller.rb

Lines changed: 0 additions & 7 deletions
This file was deleted.

app/helpers/application_helper.rb

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# -*- coding: utf-8 -*-
22
module ApplicationHelper
33
def full_title(page_title)
4-
page_title = @obj.display_title if page_title.empty? && @obj && !@obj.permalink.nil?
54
if page_title.empty?
65
"CoderDojo Japan - 子どものためのプログラミング道場" # Default title
76
else
@@ -10,9 +9,6 @@ def full_title(page_title)
109
end
1110

1211
def full_url(page_url)
13-
# When URL is composed by Scrivito
14-
return "https://coderdojo.jp/#{@obj.permalink}" if @obj && !@obj.permalink.nil?
15-
1612
# When URL is composed by Rails
1713
if page_url.empty?
1814
# Set og:url with request param
@@ -27,8 +23,6 @@ def full_url(page_url)
2723
end
2824

2925
def full_description(description)
30-
description = kata_description if @obj && @obj.permalink == "kata"
31-
3226
# Default description
3327
# Outdated: "CoderDojo は子どものためのプログラミング道場です。全国に#{Dojo.active_dojos_count}ヶ所以上あり、世界では#{Dojo::NUM_OF_COUNTRIES}ヶ国・#{Dojo::NUM_OF_WORLD_DOJOS}ヶ所で開催されています。"
3428
if description.empty?
@@ -55,10 +49,6 @@ def kata_description
5549
"道場で役立つ資料やコンテスト情報、立ち上げ方や各種支援をまとめています。"
5650
end
5751

58-
def using_scrivito?
59-
!@obj.nil?
60-
end
61-
6252
def is_kata?
6353
request.path.starts_with? "/kata"
6454
end

app/helpers/sessions_helper.rb

Lines changed: 0 additions & 9 deletions
This file was deleted.

app/helpers/sotechsha_helper.rb

Lines changed: 0 additions & 2 deletions
This file was deleted.

app/models/blog_post_page.rb

Lines changed: 0 additions & 11 deletions
This file was deleted.

app/models/custom_widget.rb

Lines changed: 0 additions & 5 deletions
This file was deleted.

app/models/download.rb

Lines changed: 0 additions & 3 deletions
This file was deleted.

app/models/footer_widget.rb

Lines changed: 0 additions & 4 deletions
This file was deleted.

app/models/headline_widget.rb

Lines changed: 0 additions & 4 deletions
This file was deleted.

app/models/image.rb

Lines changed: 0 additions & 8 deletions
This file was deleted.

app/models/image_widget.rb

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)