Skip to content

Commit 0453daf

Browse files
committed
bin/setup に必須ではないコマンドはコメントアウトして1箇所にまとめた
1 parent 8b2cbbb commit 0453daf

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

bin/setup

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#!/usr/bin/env ruby
22
require "fileutils"
3-
require "active_support/time"
43

54
APP_ROOT = File.expand_path("..", __dir__)
65
APP_NAME = "coderdojo-jp"
@@ -31,6 +30,9 @@ FileUtils.chdir APP_ROOT do
3130
system! 'bin/rails dojo_event_services:upsert'
3231
system! "bin/rails statistics:aggregation[-,-,static_yaml]"
3332

33+
# TODO: This would be better to move outside bin/setup. 'static_yaml' is enough fine.
34+
#
35+
#require "active_support/time"
3436
#today = Time.now.in_time_zone('Tokyo').to_date
3537
#from = (today - 90).strftime('%Y%m')
3638
#to = today.prev_month.strftime('%Y%m')
@@ -42,7 +44,13 @@ FileUtils.chdir APP_ROOT do
4244
# system! "bin/rails statistics:aggregation[#{from},#{to},facebook]"
4345
# system! 'bin/rails upcoming_events:aggregation[connpass]'
4446
#else
45-
# puts event_services_message
47+
# puts <<~MESSAGE
48+
# 環境変数 DOORKEEPER_API_TOKEN と FIXIE_URL が設定されていないため、
49+
# Doorkeeper API や connpass API を使ったイベント情報の取得をスキップします。
50+
#
51+
# なお API 経由でイベント情報を取得しなくても、rails server は実行可能です。
52+
# もし API 経由でイベント情報を取得したい場合は開発チームにご連絡ください。
53+
# MESSAGE
4654
#end
4755

4856
puts "\n== Removing old logs and tempfiles =="
@@ -55,14 +63,3 @@ FileUtils.chdir APP_ROOT do
5563
# system "ln -nfs #{APP_ROOT} ~/.puma-dev/#{APP_NAME}"
5664
# system "curl -Is https://#{APP_NAME}.test/up | head -n 1"
5765
end
58-
59-
def event_services_message
60-
<<~MESSAGE
61-
62-
環境変数 DOORKEEPER_API_TOKEN と FIXIE_URL が設定されていないため、
63-
Doorkeeper API や connpass API を使ったイベント情報の取得をスキップします。
64-
65-
なお API 経由でイベント情報を取得しなくても、rails server は実行可能です。
66-
もし API 経由でイベント情報を取得したい場合は開発チームにご連絡ください。
67-
MESSAGE
68-
end

0 commit comments

Comments
 (0)