File tree Expand file tree Collapse file tree 7 files changed +12
-27
lines changed
spec/plugins/subscription Expand file tree Collapse file tree 7 files changed +12
-27
lines changed Original file line number Diff line number Diff line change @@ -25,25 +25,24 @@ def run
2525 sleep @config [ 'interval' ] . to_i unless @config [ 'interval' ] . nil?
2626 retry if retries <= @config [ 'retry' ] . to_i unless @config [ 'retry' ] . nil?
2727 end
28-
2928 @pipeline
3029 end
3130
3231 def feed_url
33- feed = G_GUIDE_RSS
34- unless @config [ 'keyword' ] . nil?
35- feed += "condition.keyword=#{ @config [ 'keyword' ] } &"
36- end
37- feed += station_param
38- URI . encode ( feed )
32+ feed = G_GUIDE_RSS
33+ unless @config [ 'keyword' ] . nil?
34+ feed += "condition.keyword=#{ @config [ 'keyword' ] } &"
35+ end
36+ feed += station_param
37+ URI . encode ( feed )
3938 end
4039
4140 def station_param
42- station = 0
43- unless @config [ 'station' ] . nil?
44- station = '1' if @config [ 'station' ] == '地上波'
45- end
46- "stationPlatformId=#{ station } &"
41+ station = 0
42+ unless @config [ 'station' ] . nil?
43+ station = '1' if @config [ 'station' ] == '地上波'
44+ end
45+ "stationPlatformId=#{ station } &"
4746 end
4847 end
4948end
Original file line number Diff line number Diff line change @@ -31,14 +31,12 @@ def run
3131 sleep @config [ 'interval' ] . to_i unless @config [ 'interval' ] . nil?
3232 retry if retries <= @config [ 'retry' ] . to_i unless @config [ 'retry' ] . nil?
3333 end
34-
3534 @pipeline
3635 end
3736
3837 def cleate_dummy_feed ( retrieve )
3938 dummyFeeds = [ ]
4039 retrieve [ 'list' ] . each { |key , list |
41-
4240 dummy = Hashie ::Mash . new
4341 dummy . title = list [ 'given_title' ]
4442 dummy . link = list [ 'given_url' ]
Original file line number Diff line number Diff line change @@ -70,7 +70,6 @@ def run
7070 if @dummyfeeds != [ ]
7171 @pipeline << Automatic ::FeedParser . create ( @dummyfeeds )
7272 end
73-
7473 @pipeline
7574 end
7675 end
Original file line number Diff line number Diff line change @@ -21,13 +21,11 @@ def initialize(config, pipeline=[])
2121 def run
2222 weather = @weather . send ( @day ) [ 'weather' ] unless @weather . send ( @day ) . nil?
2323 if weather != nil
24-
2524 dummy = Hashie ::Mash . new
2625 dummy . title = weather
2726 dummy . link = 'http://weather.dummy.' + @day
2827 @pipeline << Automatic ::FeedParser . create ( [ dummy ] )
2928 end
30-
3129 @pipeline
3230 end
3331 end
Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ def chan_toru(config = {}, pipeline = [])
1616
1717describe 'Automatic::Plugin::SubscriptionChanToru' do
1818 context 'when feed is empty' do
19-
2019 describe 'attestation error' do
2120 subject { chan_toru }
2221 before do
@@ -36,7 +35,6 @@ def chan_toru(config = {}, pipeline = [])
3635 end
3736 its ( :run ) { should be_empty }
3837 end
39-
4038 end
4139
4240 context 'when feed' do
@@ -54,6 +52,5 @@ def chan_toru(config = {}, pipeline = [])
5452 end
5553 its ( :run ) { should have ( 1 ) . feed }
5654 end
57-
5855 end
5956end
Original file line number Diff line number Diff line change @@ -46,8 +46,8 @@ def g_guide(config = {}, pipeline = [])
4646 }
4747 end
4848 end
49- context 'when feed is empty' do
5049
50+ context 'when feed is empty' do
5151 describe 'attestation error' do
5252 subject { g_guide }
5353 before do
@@ -64,7 +64,6 @@ def g_guide(config = {}, pipeline = [])
6464 end
6565 its ( :run ) { should be_empty }
6666 end
67-
6867 end
6968
7069 context 'when feed' do
@@ -73,6 +72,5 @@ def g_guide(config = {}, pipeline = [])
7372 subject { g_guide ( config ) }
7473 its ( :run ) { should have ( 1 ) . feed }
7574 end
76-
7775 end
7876end
Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ def pocket(config = {}, pipeline = [])
1616
1717describe 'Automatic::Plugin::SubscriptionPocket' do
1818 context 'when feed is empty' do
19-
2019 describe 'attestation error' do
2120 subject { pocket }
2221
@@ -29,11 +28,9 @@ def pocket(config = {}, pipeline = [])
2928
3029 its ( :run ) { should be_empty }
3130 end
32-
3331 end
3432
3533 context 'when feed' do
36-
3734 describe 'config optional' do
3835 config = { 'optional' => {
3936 'count' => 1 ,
@@ -56,6 +53,5 @@ def pocket(config = {}, pipeline = [])
5653
5754 its ( :run ) { should have ( 1 ) . item }
5855 end
59-
6056 end
6157end
You can’t perform that action at this time.
0 commit comments