Skip to content

Commit 8da7562

Browse files
committed
Refactor: Review Apps の env 設定がバラバラになっている部分を集約させた
1 parent 54998c5 commit 8da7562

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

app.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@
1212
],
1313
"environments": {
1414
"review": {
15-
"addons": ["heroku-postgresql:mini"]
15+
"addons": ["heroku-postgresql:mini"],
16+
"env": {
17+
"RAILS_ENV": "staging"
18+
}
1619
}
1720
},
1821
"buildpacks": [
@@ -30,7 +33,7 @@
3033
}
3134
},
3235
"scripts": {
33-
"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"
36+
"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 podcasts:upsert && bundle exec rails assets:precompile"
3437
},
3538
"stack": "heroku-22"
3639
}

lib/tasks/podcasts.rake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace :podcasts do
1010

1111
logger.info('==== START podcasts:upsert ====')
1212

13-
ANCHOR_FM_RSS = Rails.env.test? ?
13+
ANCHOR_FM_RSS = (Rails.env.test? || Rails.env.staging?) ?
1414
Rails.root.join('spec', 'sample_anchorfm.rss').to_s :
1515
'https://anchor.fm/s/54d501e8/podcast/rss'
1616
rss = RSS::Parser.parse(ANCHOR_FM_RSS, false)

0 commit comments

Comments
 (0)