We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e5c2b7e commit f78e554Copy full SHA for f78e554
lib/tasks/news.rake
@@ -16,9 +16,10 @@ namespace :news do
16
17
# テスト/ステージング環境ではサンプルファイル、本番は実サイトのフィード
18
DOJO_NEWS_FEED = 'https://news.coderdojo.jp/feed/'
19
+ TEST_NEWS_FEED = Rails.root.join('spec', 'fixtures', 'sample_news.rss')
20
RSS_FEED_LIST = Rails.env.production? ?
21
[DOJO_NEWS_FEED] :
- [Rails.root.join('spec', 'fixtures', 'sample_news.rss')]
22
+ [TEST_NEWS_FEED]
23
24
news_items = RSS_FEED_LIST.flat_map do |feed|
25
feed = RSS::Parser.parse(feed, false)
0 commit comments