Skip to content

Commit de50f92

Browse files
author
Yuma Soga
authored
Merge pull request #1 from coderdojo-japan/master
最新の更新をマージ
2 parents 6f23a82 + f883b37 commit de50f92

File tree

253 files changed

+3576
-1757
lines changed

Some content is hidden

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

253 files changed

+3576
-1757
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,6 @@ public/assets/*
2727
.zshenv
2828
.bash-profile
2929
.zshrc
30+
31+
# rspec
32+
spec/examples.txt

.travis.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,16 @@ deploy:
1111
master: coderdojo-japan
1212
run:
1313
- "bundle exec rails db:migrate"
14+
- "bundle exec rails db:seed"
1415
- "bundle exec rails dojos:update_db_by_yaml"
16+
- "bundle exec rails dojo_event_services:upsert"
1517
cache:
1618
- bundler
1719
script:
1820
- bundle exec rake db:migrate --trace
19-
- bundle exec rake
21+
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bundle exec rspec spec; fi
22+
- if [ "$TRAVIS_PULL_REQUEST" != "false" ] && [ "$TRAVIS_PULL_REQUEST_SLUG" = "coderdojo-japan/coderdojo.jp" ]; then bundle exec rspec spec; fi
23+
- if [ "$TRAVIS_PULL_REQUEST" != "false" ] && [ "$TRAVIS_PULL_REQUEST_SLUG" != "coderdojo-japan/coderdojo.jp" ]; then bundle exec rspec spec --tag ~@scrivito; fi
2024
env:
2125
global:
2226
- TZ='Asia/Tokyo'

CODE_OF_CONDUCT.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ CoderDojo Japan team is committed to fostering a welcoming community.
44

55
**Our Code of Conduct can be found here**:
66

7-
https://coderdojo.jp/docs/code_of_conduct
7+
https://coderdojo.jp/docs/code-of-conduct
88

99
For a history of updates, see the page history here:
1010

11-
https://github.com/coderdojo-japan/coderdojo.jp/commits/master/db/docs/code_of_conduct.md
11+
https://github.com/coderdojo-japan/coderdojo.jp/commits/master/db/docs/code-of-conduct.md
1212

Gemfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ gem "bootstrap-sass"
1616
gem 'sass-rails'
1717
gem 'uglifier'
1818
gem 'font-awesome-rails'
19+
gem 'haml-rails'
1920

2021
# For redirection
2122
gem 'rack-host-redirect'
@@ -31,6 +32,14 @@ gem 'faraday'
3132
# https://github.com/bundler/bundler/issues/5332
3233
gem 'faraday_middleware', '0.10'
3334

35+
gem 'koala'
36+
37+
gem 'rack-user_agent'
38+
39+
gem 'rack-attack'
40+
41+
gem 'google_drive'
42+
3443
group :development do
3544
gem 'web-console'
3645
gem 'spring'
@@ -40,6 +49,9 @@ end
4049
group :development, :test do
4150
gem 'sqlite3'
4251
gem 'pry-rails'
52+
gem 'pry-byebug'
53+
gem 'pry-doc'
54+
gem 'pry-stack_explorer'
4355
gem 'rake'
4456
gem 'travis'
4557
gem 'minitest-retry'

Gemfile.lock

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,13 @@ GEM
4545
execjs
4646
backports (3.10.3)
4747
bindex (0.5.0)
48+
binding_of_caller (0.7.3)
49+
debug_inspector (>= 0.0.1)
4850
bootstrap-sass (3.3.7)
4951
autoprefixer-rails (>= 5.2.1)
5052
sass (>= 3.3.4)
5153
builder (3.2.3)
54+
byebug (9.1.0)
5255
capybara (2.15.4)
5356
addressable
5457
mini_mime (>= 0.1.3)
@@ -69,8 +72,12 @@ GEM
6972
concurrent-ruby (1.0.5)
7073
connection_pool (2.2.1)
7174
crass (1.0.2)
75+
debug_inspector (0.0.3)
76+
declarative (0.0.10)
77+
declarative-option (0.1.0)
7278
diff-lcs (1.3)
7379
erubi (1.7.0)
80+
erubis (2.7.0)
7481
ethon (0.11.0)
7582
ffi (>= 1.3.0)
7683
execjs (2.7.0)
@@ -90,7 +97,41 @@ GEM
9097
net-http-pipeline
9198
globalid (0.4.1)
9299
activesupport (>= 4.2.0)
100+
google-api-client (0.13.6)
101+
addressable (~> 2.5, >= 2.5.1)
102+
googleauth (~> 0.5)
103+
httpclient (>= 2.8.1, < 3.0)
104+
mime-types (~> 3.0)
105+
representable (~> 3.0)
106+
retriable (>= 2.0, < 4.0)
107+
google_drive (2.1.8)
108+
google-api-client (>= 0.11.0, < 0.14.0)
109+
googleauth (>= 0.5.0, < 1.0.0)
110+
nokogiri (>= 1.5.3, < 2.0.0)
111+
googleauth (0.5.1)
112+
faraday (~> 0.9)
113+
jwt (~> 1.4)
114+
logging (~> 2.0)
115+
memoist (~> 0.12)
116+
multi_json (~> 1.11)
117+
os (~> 0.9)
118+
signet (~> 0.7)
119+
haml (5.0.4)
120+
temple (>= 0.8.0)
121+
tilt
122+
haml-rails (1.0.0)
123+
actionpack (>= 4.0.1)
124+
activesupport (>= 4.0.1)
125+
haml (>= 4.0.6, < 6.0)
126+
html2haml (>= 1.0.1)
127+
railties (>= 4.0.1)
93128
highline (1.7.8)
129+
html2haml (2.2.0)
130+
erubis (~> 2.7.0)
131+
haml (>= 4.0, < 6)
132+
nokogiri (>= 1.6.0)
133+
ruby_parser (~> 3.5)
134+
httpclient (2.8.3)
94135
hyp_diff (0.0.5)
95136
diff-lcs (~> 1.2, >= 1.2.5)
96137
nokogiri (~> 1.6, >= 1.6.5)
@@ -106,13 +147,22 @@ GEM
106147
jquery-ui-rails (6.0.1)
107148
railties (>= 3.2.16)
108149
json (2.1.0)
150+
jwt (1.5.6)
151+
koala (3.0.0)
152+
addressable
153+
faraday
154+
json (>= 1.8)
109155
kramdown (1.15.0)
110156
launchy (2.4.3)
111157
addressable (~> 2.3)
112158
listen (3.1.5)
113159
rb-fsevent (~> 0.9, >= 0.9.4)
114160
rb-inotify (~> 0.9, >= 0.9.7)
115161
ruby_dep (~> 1.2)
162+
little-plugger (1.1.4)
163+
logging (2.2.2)
164+
little-plugger (~> 1.1)
165+
multi_json (~> 1.10)
116166
loofah (2.1.1)
117167
crass (~> 1.0.2)
118168
nokogiri (>= 1.5.9)
@@ -136,21 +186,36 @@ GEM
136186
nio4r (2.1.0)
137187
nokogiri (1.8.1)
138188
mini_portile2 (~> 2.3.0)
189+
os (0.9.6)
139190
pg (0.21.0)
140191
pry (0.11.2)
141192
coderay (~> 1.1.0)
142193
method_source (~> 0.9.0)
194+
pry-byebug (3.5.0)
195+
byebug (~> 9.1)
196+
pry (~> 0.10)
197+
pry-doc (0.11.1)
198+
pry (~> 0.9)
199+
yard (~> 0.9)
143200
pry-rails (0.3.6)
144201
pry (>= 0.10.4)
202+
pry-stack_explorer (0.4.9.2)
203+
binding_of_caller (>= 0.7)
204+
pry (>= 0.9.11)
145205
public_suffix (3.0.0)
146206
pusher-client (0.6.2)
147207
json
148208
websocket (~> 1.0)
149209
rack (2.0.3)
210+
rack-attack (5.0.1)
211+
rack
150212
rack-host-redirect (1.3.0)
151213
rack
152214
rack-test (0.7.0)
153215
rack (>= 1.0, < 3)
216+
rack-user_agent (0.5.2)
217+
rack (>= 1.5)
218+
woothee (>= 1.0.0)
154219
rails (5.1.4)
155220
actioncable (= 5.1.4)
156221
actionmailer (= 5.1.4)
@@ -182,6 +247,11 @@ GEM
182247
rb-fsevent (0.10.2)
183248
rb-inotify (0.9.10)
184249
ffi (>= 0.5.0, < 2)
250+
representable (3.0.4)
251+
declarative (< 0.1.0)
252+
declarative-option (< 0.2.0)
253+
uber (< 0.2.0)
254+
retriable (3.1.1)
185255
rspec-core (3.7.0)
186256
rspec-support (~> 3.7.0)
187257
rspec-expectations (3.7.0)
@@ -202,6 +272,8 @@ GEM
202272
rspec-core (~> 3.3)
203273
rspec-support (3.7.0)
204274
ruby_dep (1.5.0)
275+
ruby_parser (3.10.1)
276+
sexp_processor (~> 4.9)
205277
rubyzip (1.2.1)
206278
sass (3.5.3)
207279
sass-listen (~> 4.0.0)
@@ -251,6 +323,12 @@ GEM
251323
selenium-webdriver (3.6.0)
252324
childprocess (~> 0.5)
253325
rubyzip (~> 1.0)
326+
sexp_processor (4.10.0)
327+
signet (0.8.1)
328+
addressable (~> 2.3)
329+
faraday (~> 0.9)
330+
jwt (>= 1.5, < 3.0)
331+
multi_json (~> 1.10)
254332
simple_grid_rails (0.1.0)
255333
spring (2.0.2)
256334
activesupport (>= 4.2)
@@ -262,6 +340,7 @@ GEM
262340
activesupport (>= 4.0)
263341
sprockets (>= 3.0.0)
264342
sqlite3 (1.3.13)
343+
temple (0.8.0)
265344
thor (0.20.0)
266345
thread_safe (0.3.6)
267346
tilt (2.0.8)
@@ -278,6 +357,7 @@ GEM
278357
ethon (>= 0.8.0)
279358
tzinfo (1.2.4)
280359
thread_safe (~> 0.1)
360+
uber (0.1.0)
281361
uglifier (3.2.0)
282362
execjs (>= 0.3.0, < 3)
283363
useragent (0.16.8)
@@ -290,8 +370,10 @@ GEM
290370
websocket-driver (0.6.5)
291371
websocket-extensions (>= 0.1.0)
292372
websocket-extensions (0.1.2)
373+
woothee (1.7.0)
293374
xpath (2.1.0)
294375
nokogiri (~> 1.3)
376+
yard (0.9.12)
295377

296378
PLATFORMS
297379
ruby
@@ -303,14 +385,22 @@ DEPENDENCIES
303385
faraday
304386
faraday_middleware (= 0.10)
305387
font-awesome-rails
388+
google_drive
389+
haml-rails
306390
jbuilder
307391
jquery-rails
392+
koala
308393
kramdown
309394
listen
310395
minitest-retry
311396
pg
397+
pry-byebug
398+
pry-doc
312399
pry-rails
400+
pry-stack_explorer
401+
rack-attack
313402
rack-host-redirect
403+
rack-user_agent
314404
rails (= 5.1.4)
315405
rails-controller-testing
316406
rake

NOTICE.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ Thanks for their great works! 😆
44
## Ruby Gems
55

66
We use so many gems including dependencies.
7-
See `Gemfile` or `Gemfile.lock` for details.
7+
See [Gemfile](https://github.com/coderdojo-japan/coderdojo.jp/blob/master/Gemfile) or
8+
[Gemfile.lock](https://github.com/coderdojo-japan/coderdojo.jp/blob/master/Gemfile.lock) for details.
89

910
## Services
1011

README.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,7 @@ Fulfill the requirements, setup by following the instructions, and send a pull r
2424
### Setup
2525

2626
1. Fork and clone this repository.
27-
1. `$ bundle install --without production`
28-
1. `$ bundle exec rails db:migrate`
29-
1. `$ bundle exec rails dojos:update_db_by_yaml`
30-
1. `$ bundle exec rails dojo_event_services:upsert`
31-
1. `$ bundle exec rails test`
32-
1. `$ rails server`
27+
1. `$ bin/setup`
3328
1. Access to [localhost:3000](http://localhost:3000).
3429

3530
If you successfully set up, you can see the same page as [coderdojo.jp](http://coderdojo.jp).
140 KB
Loading

app/assets/images/logos/esa.png

14.9 KB
Loading
15 KB
Loading
-9.23 KB
Loading
113 KB
Binary file not shown.

app/assets/images/logos/sakura-internet.png

100755100644
-7 KB
Loading

app/assets/images/logos/yasslab.png

-2.8 KB
Loading
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
$ ->
2+
$('.collapse').on 'shown.bs.collapse', ->
3+
$(this).parent().find(".fa-chevron-right").removeClass("fa-chevron-right").addClass("fa-chevron-down")
4+
$('.collapse').on 'hidden.bs.collapse', ->
5+
$(this).parent().find(".fa-chevron-down").removeClass("fa-chevron-down").addClass("fa-chevron-right")

app/assets/stylesheets/custom.scss

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ h2{
7272
margin: 0 !important;
7373
}
7474

75-
// Sponsor section
76-
.sponsors_logo {
75+
// Partner section
76+
.partners_logo {
7777
ul{
7878
padding-left: 0px;
7979
}
@@ -260,7 +260,8 @@ a {
260260
}
261261

262262
.title, body > footer a:hover {
263-
color: #fff
263+
color: #fff;
264+
text-decoration: none
264265
}
265266

266267
.title{
@@ -478,3 +479,7 @@ a {
478479
width: 90%;
479480
display: inline-block
480481
}
482+
483+
#accordion a:hover {
484+
text-decoration: none;
485+
}

app/assets/stylesheets/keiyaku.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@
2222
}
2323
.keiyaku > p {
2424
counter-increment: keiyaku-paragraph;
25-
text-indent: 1em;
25+
text-indent: 0em;
2626
padding-left: 1em;
2727
line-height: 1.7em;
2828
}
2929
.keiyaku > h1 + p,
3030
.keiyaku > h2 + p,
3131
.keiyaku > hr + p,
3232
.keiyaku > p:first-of-type {
33-
text-indent: 0;
34-
padding-left: 0;
33+
text-indent: 0em;
34+
padding-left: 1em;
3535
}
3636
.keiyaku > p::before {
3737
//content: counter(keiyaku-paragraph) " ";

app/controllers/application_controller.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ class ApplicationController < ActionController::Base
66
protect_from_forgery with: :exception
77
include SessionsHelper
88

9+
before_action :set_request_variant
10+
911
private
1012

1113
def store_location
@@ -16,4 +18,7 @@ def login_page_access?
1618
%w(login_page sessions).include? self.controller_name
1719
end
1820

21+
def set_request_variant
22+
request.variant = request.device_variant
23+
end
1924
end

app/controllers/blog_post_page_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
class BlogPostPageController < ScrivitoController
1+
class BlogPostPageController < CmsController
22

33
def index
44
if @obj.permalink.to_s.include?("sotechsha/")

app/controllers/cms_controller.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
class CmsController < ApplicationController
2+
include Scrivito::ControllerActions
3+
end

app/controllers/docs_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ def index
77

88
def show
99
@doc = Document.new(params[:id])
10-
redirect_to scrivito_path(Obj.root) if not @doc.exists?
10+
redirect_to root_url unless @doc.exists?
1111
@content = Kramdown::Document.new(@doc.content, input: 'GFM').to_html
1212
@url = request.url
1313
end

0 commit comments

Comments
 (0)