consadole_aggregator 0.1.9 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +4 -0
- data/.rspec +2 -1
- data/.rvmrc +1 -0
- data/.travis.yml +1 -0
- data/Gemfile +3 -9
- data/Gemfile.lock +52 -27
- data/Guardfile +19 -0
- data/Rakefile +3 -49
- data/bin/consadole_aggregator +29 -49
- data/consadole_aggregator.gemspec +22 -210
- data/lib/consadole_aggregator/helper.rb +8 -4
- data/lib/consadole_aggregator/live.rb +74 -67
- data/lib/consadole_aggregator/news.rb +165 -100
- data/lib/consadole_aggregator/version.rb +3 -0
- data/lib/consadole_aggregator.rb +26 -4
- data/spec/consadole_aggregator/helper_spec.rb +13 -8
- data/spec/consadole_aggregator/live_spec.rb +68 -124
- data/spec/consadole_aggregator/news_spec.rb +70 -148
- data/spec/consadole_aggregator_spec.rb +5 -0
- data/spec/ext/clubconsadole.txt +262 -315
- data/spec/ext/jsgoalphotos.txt +321 -321
- data/spec/spec_helper.rb +13 -9
- metadata +233 -58
- data/.document +0 -5
- data/LICENSE.txt +0 -20
- data/README.rdoc +0 -33
- data/VERSION +0 -1
- data/account.yaml +0 -6
- data/db/.gitignore +0 -0
- data/lib/consadole_aggregator/aggregatable.rb +0 -62
- data/lib/consadole_aggregator/live/timeline.rb +0 -13
- data/log/.gitignore +0 -0
- data/spec/consadole_aggregator/aggregatable_spec.rb +0 -87
- data/spec/consadole_aggregator/live/timeline_spec.rb +0 -53
- data/spec/spec.opts +0 -1
@@ -1,53 +0,0 @@
|
|
1
|
-
# -*- coding: utf-8 -*-
|
2
|
-
require_relative '../../spec_helper'
|
3
|
-
|
4
|
-
include ConsadoleAggregator::Live
|
5
|
-
|
6
|
-
describe Timeline do
|
7
|
-
describe '.parse' do
|
8
|
-
context 'given nil' do
|
9
|
-
subject{ Timeline.parse(nil) }
|
10
|
-
it{ should be_nil }
|
11
|
-
end
|
12
|
-
context 'given ""' do
|
13
|
-
subject{ Timeline.parse("") }
|
14
|
-
it{ should be_nil }
|
15
|
-
end
|
16
|
-
context 'given "<前半>"' do
|
17
|
-
subject{ Timeline.parse('<前半>') }
|
18
|
-
it{ should be_nil }
|
19
|
-
end
|
20
|
-
context 'given "1分 右サイドからボールをつながれ攻撃を仕掛けられるが札幌DFが落ち着いてクリア"' do
|
21
|
-
subject{ Timeline.parse('1分 右サイドからボールをつながれ攻撃を仕掛けられるが札幌DFが落ち着いてクリア') }
|
22
|
-
it{ should eql Timeline.new('1分', '右サイドからボールをつながれ攻撃を仕掛けられるが札幌DFが落ち着いてクリア') }
|
23
|
-
end
|
24
|
-
context 'given "5分"' do
|
25
|
-
subject{ Timeline.parse('5分') }
|
26
|
-
it{ should eql Timeline.new('5分', nil) }
|
27
|
-
end
|
28
|
-
end
|
29
|
-
describe '#to_s' do
|
30
|
-
before do
|
31
|
-
@timeline = Timeline.new
|
32
|
-
end
|
33
|
-
context 'when empty' do
|
34
|
-
subject{ @timeline.to_s }
|
35
|
-
it{ should == '' }
|
36
|
-
end
|
37
|
-
context 'when only time' do
|
38
|
-
before do
|
39
|
-
@timeline.time = '1分'
|
40
|
-
end
|
41
|
-
subject{ @timeline.to_s }
|
42
|
-
it{ should == '1分' }
|
43
|
-
end
|
44
|
-
context 'when filled time and post' do
|
45
|
-
before do
|
46
|
-
@timeline.time = '1分'
|
47
|
-
@timeline.post = '右サイドからボールをつながれ攻撃を仕掛けられるが札幌DFが落ち着いてクリア'
|
48
|
-
end
|
49
|
-
subject{ @timeline.to_s }
|
50
|
-
it{ should == '1分 右サイドからボールをつながれ攻撃を仕掛けられるが札幌DFが落ち着いてクリア' }
|
51
|
-
end
|
52
|
-
end
|
53
|
-
end
|
data/spec/spec.opts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
--color
|