simple2ch 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +26 -3
- data/doc/Simple2ch/Board.html +12 -12
- data/doc/Simple2ch/Dat.html +6 -6
- data/doc/Simple2ch/DatParseException.html +2 -2
- data/doc/Simple2ch/KakoLogException.html +2 -2
- data/doc/Simple2ch/NotA2chUrlException.html +2 -2
- data/doc/Simple2ch/Res.html +10 -10
- data/doc/Simple2ch/Simple2chException.html +2 -2
- data/doc/Simple2ch/Thre.html +9 -9
- data/doc/Simple2ch.html +6 -6
- data/doc/_index.html +1 -1
- data/doc/file.README.html +21 -8
- data/doc/index.html +21 -8
- data/doc/method_list.html +1 -1
- data/doc/top-level-namespace.html +1 -1
- data/lib/simple2ch/board.rb +1 -1
- data/lib/simple2ch/version.rb +1 -1
- data/lib/simple2ch.rb +0 -2
- data/simple2ch.gemspec +2 -0
- data/spec/board_spec.rb +1 -1
- data/spec/simple2ch_spec.rb +3 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b1092af3dbb8c3dd2538bd14c839330a1652e263
|
4
|
+
data.tar.gz: 4e4666e4a9a94da69ff319905109bd058e6bb78e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45832b276d0bd4bc7cd2b3a48f7051bee3176e1bb7acd91d3eee7f6552157edc2d5ef5b29023b88c6a73df27b18c65e9e828e8965eb087d05359a2088e9f8276
|
7
|
+
data.tar.gz: b54626caf02c055714d315c699799261bf56534c8f284dcecca8104b6860c22c971434299ef08ea28da841c0828308e78fb0bc4ea35538b00ae3f6dbd05b7ef2
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
#
|
1
|
+
# Simple2ch
|
2
2
|
|
3
|
-
|
3
|
+
2ch Japanese BBS simple reader.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -17,8 +17,31 @@ Or install it yourself as:
|
|
17
17
|
$ gem install simple2ch
|
18
18
|
|
19
19
|
## Usage
|
20
|
+
* 初期化
|
21
|
+
```ruby
|
22
|
+
require 'simple2ch'
|
23
|
+
```
|
24
|
+
|
25
|
+
|
26
|
+
* スレ取得
|
27
|
+
```ruby
|
28
|
+
board = Simple2ch::Board.new('ニュー速VIP', 'http://viper.2ch.sc/news4vip/')
|
29
|
+
board.thres #=>[#<Simple2ch::Thre>, ..., #<Simple2ch::Thre>]
|
30
|
+
```
|
31
|
+
|
32
|
+
* レス取得
|
33
|
+
```ruby
|
34
|
+
thre = board.thres[hoge] #=> #<Simple2ch::Thre>
|
35
|
+
thre.reses #=> [#<Simple2ch::Res>, ..., #<Simple2ch::Res>]
|
36
|
+
```
|
37
|
+
|
38
|
+
* 書き込み内容取得
|
39
|
+
```ruby
|
40
|
+
res = thre.reses[foo] #=> #<Simple2ch::Res>
|
41
|
+
res.author #=> "以下、\(^o^)/でVIPがお送りします"
|
42
|
+
res.contents #=> "hoge foo bar"
|
43
|
+
```
|
20
44
|
|
21
|
-
TODO: Write usage instructions here
|
22
45
|
|
23
46
|
## Contributing
|
24
47
|
|
data/doc/Simple2ch/Board.html
CHANGED
@@ -94,7 +94,7 @@
|
|
94
94
|
|
95
95
|
|
96
96
|
<dt class="r2 last">Defined in:</dt>
|
97
|
-
<dd class="r2 last">lib/
|
97
|
+
<dd class="r2 last">lib/simple2ch/board.rb</dd>
|
98
98
|
|
99
99
|
</dl>
|
100
100
|
<div class="clear"></div>
|
@@ -264,7 +264,7 @@
|
|
264
264
|
<li class="public ">
|
265
265
|
<span class="summary_signature">
|
266
266
|
|
267
|
-
<a href="#
|
267
|
+
<a href="#thres-instance_method" title="#thres (instance method)">- (Array<Thre>) <strong>thres</strong> </a>
|
268
268
|
|
269
269
|
|
270
270
|
|
@@ -361,7 +361,7 @@
|
|
361
361
|
20</pre>
|
362
362
|
</td>
|
363
363
|
<td>
|
364
|
-
<pre class="code"><span class="info file"># File 'lib/
|
364
|
+
<pre class="code"><span class="info file"># File 'lib/simple2ch/board.rb', line 15</span>
|
365
365
|
|
366
366
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_title'>title</span><span class='comma'>,</span> <span class='id identifier rubyid_url'>url</span><span class='rparen'>)</span>
|
367
367
|
<span class='ivar'>@server_name</span> <span class='op'>=</span> <span class='ivar'>@board_name</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
@@ -430,7 +430,7 @@
|
|
430
430
|
12</pre>
|
431
431
|
</td>
|
432
432
|
<td>
|
433
|
-
<pre class="code"><span class="info file"># File 'lib/
|
433
|
+
<pre class="code"><span class="info file"># File 'lib/simple2ch/board.rb', line 10</span>
|
434
434
|
|
435
435
|
<span class='kw'>def</span> <span class='id identifier rubyid_board_name'>board_name</span>
|
436
436
|
<span class='ivar'>@board_name</span>
|
@@ -491,7 +491,7 @@
|
|
491
491
|
10</pre>
|
492
492
|
</td>
|
493
493
|
<td>
|
494
|
-
<pre class="code"><span class="info file"># File 'lib/
|
494
|
+
<pre class="code"><span class="info file"># File 'lib/simple2ch/board.rb', line 8</span>
|
495
495
|
|
496
496
|
<span class='kw'>def</span> <span class='id identifier rubyid_server_name'>server_name</span>
|
497
497
|
<span class='ivar'>@server_name</span>
|
@@ -552,7 +552,7 @@
|
|
552
552
|
8</pre>
|
553
553
|
</td>
|
554
554
|
<td>
|
555
|
-
<pre class="code"><span class="info file"># File 'lib/
|
555
|
+
<pre class="code"><span class="info file"># File 'lib/simple2ch/board.rb', line 6</span>
|
556
556
|
|
557
557
|
<span class='kw'>def</span> <span class='id identifier rubyid_title'>title</span>
|
558
558
|
<span class='ivar'>@title</span>
|
@@ -613,7 +613,7 @@
|
|
613
613
|
6</pre>
|
614
614
|
</td>
|
615
615
|
<td>
|
616
|
-
<pre class="code"><span class="info file"># File 'lib/
|
616
|
+
<pre class="code"><span class="info file"># File 'lib/simple2ch/board.rb', line 4</span>
|
617
617
|
|
618
618
|
<span class='kw'>def</span> <span class='id identifier rubyid_url'>url</span>
|
619
619
|
<span class='ivar'>@url</span>
|
@@ -631,9 +631,9 @@
|
|
631
631
|
|
632
632
|
|
633
633
|
<div class="method_details first">
|
634
|
-
<h3 class="signature first" id="
|
634
|
+
<h3 class="signature first" id="thres-instance_method">
|
635
635
|
|
636
|
-
- (<tt>Array<<span class='object_link'><a href="Thre.html" title="Simple2ch::Thre (class)">Thre</a></span>></tt>) <strong>
|
636
|
+
- (<tt>Array<<span class='object_link'><a href="Thre.html" title="Simple2ch::Thre (class)">Thre</a></span>></tt>) <strong>thres</strong>
|
637
637
|
|
638
638
|
|
639
639
|
|
@@ -683,9 +683,9 @@
|
|
683
683
|
30</pre>
|
684
684
|
</td>
|
685
685
|
<td>
|
686
|
-
<pre class="code"><span class="info file"># File 'lib/
|
686
|
+
<pre class="code"><span class="info file"># File 'lib/simple2ch/board.rb', line 24</span>
|
687
687
|
|
688
|
-
<span class='kw'>def</span> <span class='id identifier
|
688
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_thres'>thres</span>
|
689
689
|
<span class='kw'>if</span> <span class='ivar'>@thres</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>></span> <span class='int'>0</span>
|
690
690
|
<span class='ivar'>@thres</span>
|
691
691
|
<span class='kw'>else</span>
|
@@ -702,7 +702,7 @@
|
|
702
702
|
</div>
|
703
703
|
|
704
704
|
<div id="footer">
|
705
|
-
Generated on Sun Sep 7
|
705
|
+
Generated on Sun Sep 7 16:55:25 2014 by
|
706
706
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
707
707
|
0.8.7.4 (ruby-2.1.2).
|
708
708
|
</div>
|
data/doc/Simple2ch/Dat.html
CHANGED
@@ -94,7 +94,7 @@
|
|
94
94
|
|
95
95
|
|
96
96
|
<dt class="r2 last">Defined in:</dt>
|
97
|
-
<dd class="r2 last">lib/
|
97
|
+
<dd class="r2 last">lib/simple2ch/dat.rb</dd>
|
98
98
|
|
99
99
|
</dl>
|
100
100
|
<div class="clear"></div>
|
@@ -283,7 +283,7 @@
|
|
283
283
|
13</pre>
|
284
284
|
</td>
|
285
285
|
<td>
|
286
|
-
<pre class="code"><span class="info file"># File 'lib/
|
286
|
+
<pre class="code"><span class="info file"># File 'lib/simple2ch/dat.rb', line 7</span>
|
287
287
|
|
288
288
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_thre'>thre</span><span class='rparen'>)</span>
|
289
289
|
<span class='ivar'>@thre</span> <span class='op'>=</span> <span class='id identifier rubyid_thre'>thre</span>
|
@@ -353,7 +353,7 @@
|
|
353
353
|
6</pre>
|
354
354
|
</td>
|
355
355
|
<td>
|
356
|
-
<pre class="code"><span class="info file"># File 'lib/
|
356
|
+
<pre class="code"><span class="info file"># File 'lib/simple2ch/dat.rb', line 4</span>
|
357
357
|
|
358
358
|
<span class='kw'>def</span> <span class='id identifier rubyid_thread_key'>thread_key</span>
|
359
359
|
<span class='ivar'>@thread_key</span>
|
@@ -419,7 +419,7 @@
|
|
419
419
|
25</pre>
|
420
420
|
</td>
|
421
421
|
<td>
|
422
|
-
<pre class="code"><span class="info file"># File 'lib/
|
422
|
+
<pre class="code"><span class="info file"># File 'lib/simple2ch/dat.rb', line 23</span>
|
423
423
|
|
424
424
|
<span class='kw'>def</span> <span class='id identifier rubyid_kako_log?'>kako_log?</span>
|
425
425
|
<span class='ivar'>@f_kako_log</span> <span class='op'>||</span> <span class='id identifier rubyid_parse_dat'>parse_dat</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span>
|
@@ -478,7 +478,7 @@
|
|
478
478
|
19</pre>
|
479
479
|
</td>
|
480
480
|
<td>
|
481
|
-
<pre class="code"><span class="info file"># File 'lib/
|
481
|
+
<pre class="code"><span class="info file"># File 'lib/simple2ch/dat.rb', line 17</span>
|
482
482
|
|
483
483
|
<span class='kw'>def</span> <span class='id identifier rubyid_reses'>reses</span>
|
484
484
|
<span class='ivar'>@reses</span> <span class='op'>||</span> <span class='id identifier rubyid_parse_dat'>parse_dat</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
|
@@ -493,7 +493,7 @@
|
|
493
493
|
</div>
|
494
494
|
|
495
495
|
<div id="footer">
|
496
|
-
Generated on Sun Sep 7
|
496
|
+
Generated on Sun Sep 7 16:55:25 2014 by
|
497
497
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
498
498
|
0.8.7.4 (ruby-2.1.2).
|
499
499
|
</div>
|
@@ -98,7 +98,7 @@
|
|
98
98
|
|
99
99
|
|
100
100
|
<dt class="r2 last">Defined in:</dt>
|
101
|
-
<dd class="r2 last">lib/
|
101
|
+
<dd class="r2 last">lib/simple2ch/simple2ch_exception.rb</dd>
|
102
102
|
|
103
103
|
</dl>
|
104
104
|
<div class="clear"></div>
|
@@ -122,7 +122,7 @@
|
|
122
122
|
</div>
|
123
123
|
|
124
124
|
<div id="footer">
|
125
|
-
Generated on Sun Sep 7
|
125
|
+
Generated on Sun Sep 7 16:55:25 2014 by
|
126
126
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
127
127
|
0.8.7.4 (ruby-2.1.2).
|
128
128
|
</div>
|
@@ -98,7 +98,7 @@
|
|
98
98
|
|
99
99
|
|
100
100
|
<dt class="r2 last">Defined in:</dt>
|
101
|
-
<dd class="r2 last">lib/
|
101
|
+
<dd class="r2 last">lib/simple2ch/simple2ch_exception.rb</dd>
|
102
102
|
|
103
103
|
</dl>
|
104
104
|
<div class="clear"></div>
|
@@ -122,7 +122,7 @@
|
|
122
122
|
</div>
|
123
123
|
|
124
124
|
<div id="footer">
|
125
|
-
Generated on Sun Sep 7
|
125
|
+
Generated on Sun Sep 7 16:55:25 2014 by
|
126
126
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
127
127
|
0.8.7.4 (ruby-2.1.2).
|
128
128
|
</div>
|
@@ -98,7 +98,7 @@
|
|
98
98
|
|
99
99
|
|
100
100
|
<dt class="r2 last">Defined in:</dt>
|
101
|
-
<dd class="r2 last">lib/
|
101
|
+
<dd class="r2 last">lib/simple2ch/simple2ch_exception.rb</dd>
|
102
102
|
|
103
103
|
</dl>
|
104
104
|
<div class="clear"></div>
|
@@ -122,7 +122,7 @@
|
|
122
122
|
</div>
|
123
123
|
|
124
124
|
<div id="footer">
|
125
|
-
Generated on Sun Sep 7
|
125
|
+
Generated on Sun Sep 7 16:55:25 2014 by
|
126
126
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
127
127
|
0.8.7.4 (ruby-2.1.2).
|
128
128
|
</div>
|
data/doc/Simple2ch/Res.html
CHANGED
@@ -94,7 +94,7 @@
|
|
94
94
|
|
95
95
|
|
96
96
|
<dt class="r2 last">Defined in:</dt>
|
97
|
-
<dd class="r2 last">lib/
|
97
|
+
<dd class="r2 last">lib/simple2ch/res.rb</dd>
|
98
98
|
|
99
99
|
</dl>
|
100
100
|
<div class="clear"></div>
|
@@ -506,7 +506,7 @@
|
|
506
506
|
32</pre>
|
507
507
|
</td>
|
508
508
|
<td>
|
509
|
-
<pre class="code"><span class="info file"># File 'lib/
|
509
|
+
<pre class="code"><span class="info file"># File 'lib/simple2ch/res.rb', line 25</span>
|
510
510
|
|
511
511
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_res_num'>res_num</span><span class='comma'>,</span> <span class='label'>author:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='label'>author_id:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='label'>date:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>mail:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='label'>contents:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
512
512
|
<span class='ivar'>@res_num</span> <span class='op'>=</span> <span class='id identifier rubyid_res_num'>res_num</span>
|
@@ -577,7 +577,7 @@
|
|
577
577
|
8</pre>
|
578
578
|
</td>
|
579
579
|
<td>
|
580
|
-
<pre class="code"><span class="info file"># File 'lib/
|
580
|
+
<pre class="code"><span class="info file"># File 'lib/simple2ch/res.rb', line 6</span>
|
581
581
|
|
582
582
|
<span class='kw'>def</span> <span class='id identifier rubyid_author'>author</span>
|
583
583
|
<span class='ivar'>@author</span>
|
@@ -638,7 +638,7 @@
|
|
638
638
|
10</pre>
|
639
639
|
</td>
|
640
640
|
<td>
|
641
|
-
<pre class="code"><span class="info file"># File 'lib/
|
641
|
+
<pre class="code"><span class="info file"># File 'lib/simple2ch/res.rb', line 8</span>
|
642
642
|
|
643
643
|
<span class='kw'>def</span> <span class='id identifier rubyid_author_id'>author_id</span>
|
644
644
|
<span class='ivar'>@author_id</span>
|
@@ -699,7 +699,7 @@
|
|
699
699
|
16</pre>
|
700
700
|
</td>
|
701
701
|
<td>
|
702
|
-
<pre class="code"><span class="info file"># File 'lib/
|
702
|
+
<pre class="code"><span class="info file"># File 'lib/simple2ch/res.rb', line 14</span>
|
703
703
|
|
704
704
|
<span class='kw'>def</span> <span class='id identifier rubyid_contents'>contents</span>
|
705
705
|
<span class='ivar'>@contents</span>
|
@@ -760,7 +760,7 @@
|
|
760
760
|
12</pre>
|
761
761
|
</td>
|
762
762
|
<td>
|
763
|
-
<pre class="code"><span class="info file"># File 'lib/
|
763
|
+
<pre class="code"><span class="info file"># File 'lib/simple2ch/res.rb', line 10</span>
|
764
764
|
|
765
765
|
<span class='kw'>def</span> <span class='id identifier rubyid_date'>date</span>
|
766
766
|
<span class='ivar'>@date</span>
|
@@ -821,7 +821,7 @@
|
|
821
821
|
14</pre>
|
822
822
|
</td>
|
823
823
|
<td>
|
824
|
-
<pre class="code"><span class="info file"># File 'lib/
|
824
|
+
<pre class="code"><span class="info file"># File 'lib/simple2ch/res.rb', line 12</span>
|
825
825
|
|
826
826
|
<span class='kw'>def</span> <span class='id identifier rubyid_mail'>mail</span>
|
827
827
|
<span class='ivar'>@mail</span>
|
@@ -882,7 +882,7 @@
|
|
882
882
|
6</pre>
|
883
883
|
</td>
|
884
884
|
<td>
|
885
|
-
<pre class="code"><span class="info file"># File 'lib/
|
885
|
+
<pre class="code"><span class="info file"># File 'lib/simple2ch/res.rb', line 4</span>
|
886
886
|
|
887
887
|
<span class='kw'>def</span> <span class='id identifier rubyid_res_num'>res_num</span>
|
888
888
|
<span class='ivar'>@res_num</span>
|
@@ -1006,7 +1006,7 @@
|
|
1006
1006
|
45</pre>
|
1007
1007
|
</td>
|
1008
1008
|
<td>
|
1009
|
-
<pre class="code"><span class="info file"># File 'lib/
|
1009
|
+
<pre class="code"><span class="info file"># File 'lib/simple2ch/res.rb', line 39</span>
|
1010
1010
|
|
1011
1011
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_res_num'>res_num</span><span class='comma'>,</span> <span class='id identifier rubyid_contents'>contents</span><span class='rparen'>)</span>
|
1012
1012
|
<span class='kw'>unless</span> <span class='id identifier rubyid_contents'>contents</span><span class='period'>.</span><span class='id identifier rubyid_strip'>strip</span> <span class='op'>==</span> <span class='const'>KAKO_LOG_INFO</span>
|
@@ -1025,7 +1025,7 @@
|
|
1025
1025
|
</div>
|
1026
1026
|
|
1027
1027
|
<div id="footer">
|
1028
|
-
Generated on Sun Sep 7
|
1028
|
+
Generated on Sun Sep 7 16:55:25 2014 by
|
1029
1029
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1030
1030
|
0.8.7.4 (ruby-2.1.2).
|
1031
1031
|
</div>
|
@@ -96,7 +96,7 @@
|
|
96
96
|
|
97
97
|
|
98
98
|
<dt class="r2 last">Defined in:</dt>
|
99
|
-
<dd class="r2 last">lib/
|
99
|
+
<dd class="r2 last">lib/simple2ch/simple2ch_exception.rb</dd>
|
100
100
|
|
101
101
|
</dl>
|
102
102
|
<div class="clear"></div>
|
@@ -118,7 +118,7 @@
|
|
118
118
|
</div>
|
119
119
|
|
120
120
|
<div id="footer">
|
121
|
-
Generated on Sun Sep 7
|
121
|
+
Generated on Sun Sep 7 16:55:25 2014 by
|
122
122
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
123
123
|
0.8.7.4 (ruby-2.1.2).
|
124
124
|
</div>
|
data/doc/Simple2ch/Thre.html
CHANGED
@@ -94,7 +94,7 @@
|
|
94
94
|
|
95
95
|
|
96
96
|
<dt class="r2 last">Defined in:</dt>
|
97
|
-
<dd class="r2 last">lib/
|
97
|
+
<dd class="r2 last">lib/simple2ch/thre.rb</dd>
|
98
98
|
|
99
99
|
</dl>
|
100
100
|
<div class="clear"></div>
|
@@ -388,7 +388,7 @@
|
|
388
388
|
22</pre>
|
389
389
|
</td>
|
390
390
|
<td>
|
391
|
-
<pre class="code"><span class="info file"># File 'lib/
|
391
|
+
<pre class="code"><span class="info file"># File 'lib/simple2ch/thre.rb', line 14</span>
|
392
392
|
|
393
393
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_board'>board</span><span class='comma'>,</span> <span class='id identifier rubyid_thread_data'>thread_data</span><span class='rparen'>)</span>
|
394
394
|
<span class='ivar'>@board</span> <span class='op'>=</span> <span class='id identifier rubyid_board'>board</span>
|
@@ -460,7 +460,7 @@
|
|
460
460
|
12</pre>
|
461
461
|
</td>
|
462
462
|
<td>
|
463
|
-
<pre class="code"><span class="info file"># File 'lib/
|
463
|
+
<pre class="code"><span class="info file"># File 'lib/simple2ch/thre.rb', line 10</span>
|
464
464
|
|
465
465
|
<span class='kw'>def</span> <span class='id identifier rubyid_board'>board</span>
|
466
466
|
<span class='ivar'>@board</span>
|
@@ -521,7 +521,7 @@
|
|
521
521
|
10</pre>
|
522
522
|
</td>
|
523
523
|
<td>
|
524
|
-
<pre class="code"><span class="info file"># File 'lib/
|
524
|
+
<pre class="code"><span class="info file"># File 'lib/simple2ch/thre.rb', line 8</span>
|
525
525
|
|
526
526
|
<span class='kw'>def</span> <span class='id identifier rubyid_num_of_response'>num_of_response</span>
|
527
527
|
<span class='ivar'>@num_of_response</span>
|
@@ -582,7 +582,7 @@
|
|
582
582
|
8</pre>
|
583
583
|
</td>
|
584
584
|
<td>
|
585
|
-
<pre class="code"><span class="info file"># File 'lib/
|
585
|
+
<pre class="code"><span class="info file"># File 'lib/simple2ch/thre.rb', line 6</span>
|
586
586
|
|
587
587
|
<span class='kw'>def</span> <span class='id identifier rubyid_thread_key'>thread_key</span>
|
588
588
|
<span class='ivar'>@thread_key</span>
|
@@ -643,7 +643,7 @@
|
|
643
643
|
6</pre>
|
644
644
|
</td>
|
645
645
|
<td>
|
646
|
-
<pre class="code"><span class="info file"># File 'lib/
|
646
|
+
<pre class="code"><span class="info file"># File 'lib/simple2ch/thre.rb', line 4</span>
|
647
647
|
|
648
648
|
<span class='kw'>def</span> <span class='id identifier rubyid_title'>title</span>
|
649
649
|
<span class='ivar'>@title</span>
|
@@ -709,7 +709,7 @@
|
|
709
709
|
34</pre>
|
710
710
|
</td>
|
711
711
|
<td>
|
712
|
-
<pre class="code"><span class="info file"># File 'lib/
|
712
|
+
<pre class="code"><span class="info file"># File 'lib/simple2ch/thre.rb', line 32</span>
|
713
713
|
|
714
714
|
<span class='kw'>def</span> <span class='id identifier rubyid_kako_log?'>kako_log?</span>
|
715
715
|
<span class='ivar'>@f_kako_log</span> <span class='op'>||</span> <span class='id identifier rubyid_fetch_dat'>fetch_dat</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span>
|
@@ -768,7 +768,7 @@
|
|
768
768
|
28</pre>
|
769
769
|
</td>
|
770
770
|
<td>
|
771
|
-
<pre class="code"><span class="info file"># File 'lib/
|
771
|
+
<pre class="code"><span class="info file"># File 'lib/simple2ch/thre.rb', line 26</span>
|
772
772
|
|
773
773
|
<span class='kw'>def</span> <span class='id identifier rubyid_reses'>reses</span>
|
774
774
|
<span class='ivar'>@reses</span> <span class='op'>||</span> <span class='id identifier rubyid_fetch_dat'>fetch_dat</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
|
@@ -783,7 +783,7 @@
|
|
783
783
|
</div>
|
784
784
|
|
785
785
|
<div id="footer">
|
786
|
-
Generated on Sun Sep 7
|
786
|
+
Generated on Sun Sep 7 16:55:25 2014 by
|
787
787
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
788
788
|
0.8.7.4 (ruby-2.1.2).
|
789
789
|
</div>
|
data/doc/Simple2ch.html
CHANGED
@@ -79,8 +79,8 @@
|
|
79
79
|
|
80
80
|
|
81
81
|
<dt class="r1 last">Defined in:</dt>
|
82
|
-
<dd class="r1 last">lib/
|
83
|
-
lib/
|
82
|
+
<dd class="r1 last">lib/simple2ch.rb<span class="defines">,<br />
|
83
|
+
lib/simple2ch/dat.rb,<br /> lib/simple2ch/res.rb,<br /> lib/simple2ch/thre.rb,<br /> lib/simple2ch/board.rb,<br /> lib/simple2ch/version.rb,<br /> lib/simple2ch/simple2ch_exception.rb</span>
|
84
84
|
</dd>
|
85
85
|
|
86
86
|
</dl>
|
@@ -109,7 +109,7 @@
|
|
109
109
|
<dt id="VERSION-constant" class="">VERSION =
|
110
110
|
|
111
111
|
</dt>
|
112
|
-
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>0.0.
|
112
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>0.0.2</span><span class='tstring_end'>"</span></span></pre></dd>
|
113
113
|
|
114
114
|
</dl>
|
115
115
|
|
@@ -256,7 +256,7 @@
|
|
256
256
|
27</pre>
|
257
257
|
</td>
|
258
258
|
<td>
|
259
|
-
<pre class="code"><span class="info file"># File 'lib/
|
259
|
+
<pre class="code"><span class="info file"># File 'lib/simple2ch.rb', line 21</span>
|
260
260
|
|
261
261
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='rparen'>)</span>
|
262
262
|
<span class='id identifier rubyid_req'>req</span> <span class='op'>=</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>HTTP</span><span class='op'>::</span><span class='const'>Get</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='period'>.</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span>
|
@@ -290,7 +290,7 @@
|
|
290
290
|
16</pre>
|
291
291
|
</td>
|
292
292
|
<td>
|
293
|
-
<pre class="code"><span class="info file"># File 'lib/
|
293
|
+
<pre class="code"><span class="info file"># File 'lib/simple2ch.rb', line 14</span>
|
294
294
|
|
295
295
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_root'>root</span>
|
296
296
|
<span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_dirname'>dirname</span> <span class='id identifier rubyid___dir__'>__dir__</span>
|
@@ -305,7 +305,7 @@
|
|
305
305
|
</div>
|
306
306
|
|
307
307
|
<div id="footer">
|
308
|
-
Generated on Sun Sep 7
|
308
|
+
Generated on Sun Sep 7 16:55:25 2014 by
|
309
309
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
310
310
|
0.8.7.4 (ruby-2.1.2).
|
311
311
|
</div>
|
data/doc/_index.html
CHANGED
@@ -205,7 +205,7 @@
|
|
205
205
|
</div>
|
206
206
|
|
207
207
|
<div id="footer">
|
208
|
-
Generated on Sun Sep 7
|
208
|
+
Generated on Sun Sep 7 16:55:25 2014 by
|
209
209
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
210
210
|
0.8.7.4 (ruby-2.1.2).
|
211
211
|
</div>
|
data/doc/file.README.html
CHANGED
@@ -62,15 +62,15 @@
|
|
62
62
|
<iframe id="search_frame"></iframe>
|
63
63
|
|
64
64
|
<div id="content"><div id='filecontents'>
|
65
|
-
<h1 id="label-
|
65
|
+
<h1 id="label-Simple2ch">Simple2ch</h1>
|
66
66
|
|
67
|
-
<p>
|
67
|
+
<p>2ch Japanese BBS simple reader.</p>
|
68
68
|
|
69
69
|
<h2 id="label-Installation">Installation</h2>
|
70
70
|
|
71
71
|
<p>Add this line to your application's Gemfile:</p>
|
72
72
|
|
73
|
-
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_gem'>gem</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>
|
73
|
+
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_gem'>gem</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>simple2ch</span><span class='tstring_end'>'</span></span></code></pre>
|
74
74
|
|
75
75
|
<p>And then execute:</p>
|
76
76
|
|
@@ -78,16 +78,29 @@
|
|
78
78
|
|
79
79
|
<p>Or install it yourself as:</p>
|
80
80
|
|
81
|
-
<pre class="code ruby"><code class="ruby">$ gem install
|
81
|
+
<pre class="code ruby"><code class="ruby">$ gem install simple2ch</code></pre>
|
82
82
|
|
83
83
|
<h2 id="label-Usage">Usage</h2>
|
84
|
-
|
85
|
-
<p>
|
84
|
+
<ul><li>
|
85
|
+
<p>初期化 <code>ruby require 'simple2ch' </code></p>
|
86
|
+
</li><li>
|
87
|
+
<p>スレ取得 <code>ruby board = Simple2ch::Board.new('ニュー速VIP',
|
88
|
+
'http://viper.2ch.sc/news4vip/') board.thres
|
89
|
+
#=>[#<Simple2ch::Thre>, ..., #<Simple2ch::Thre>] </code></p>
|
90
|
+
</li><li>
|
91
|
+
<p>レス取得 <code>ruby thre = board.thres[hoge] #=> #<Simple2ch::Thre>
|
92
|
+
thre.reses #=> [#<Simple2ch::Res>, ..., #<Simple2ch::Res>]
|
93
|
+
</code></p>
|
94
|
+
</li><li>
|
95
|
+
<p>書き込み内容取得 <code>ruby res = thre.reses[foo] #=> #<Simple2ch::Res>
|
96
|
+
res.author #=> "以下、\(^o^)/でVIPがお送りします" res.contents #=>
|
97
|
+
"hoge foo bar" </code></p>
|
98
|
+
</li></ul>
|
86
99
|
|
87
100
|
<h2 id="label-Contributing">Contributing</h2>
|
88
101
|
<ol><li>
|
89
102
|
<p>Fork it ( <a
|
90
|
-
href="https://github.com/
|
103
|
+
href="https://github.com/dogwood008/simple2ch/fork">github.com/dogwood008/simple2ch/fork</a>
|
91
104
|
)</p>
|
92
105
|
</li><li>
|
93
106
|
<p>Create your feature branch (<code>git checkout -b my-new-feature</code>)</p>
|
@@ -102,7 +115,7 @@ feature'</code>)</p>
|
|
102
115
|
</div></div>
|
103
116
|
|
104
117
|
<div id="footer">
|
105
|
-
Generated on Sun Sep 7
|
118
|
+
Generated on Sun Sep 7 16:55:25 2014 by
|
106
119
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
107
120
|
0.8.7.4 (ruby-2.1.2).
|
108
121
|
</div>
|
data/doc/index.html
CHANGED
@@ -62,15 +62,15 @@
|
|
62
62
|
<iframe id="search_frame"></iframe>
|
63
63
|
|
64
64
|
<div id="content"><div id='filecontents'>
|
65
|
-
<h1 id="label-
|
65
|
+
<h1 id="label-Simple2ch">Simple2ch</h1>
|
66
66
|
|
67
|
-
<p>
|
67
|
+
<p>2ch Japanese BBS simple reader.</p>
|
68
68
|
|
69
69
|
<h2 id="label-Installation">Installation</h2>
|
70
70
|
|
71
71
|
<p>Add this line to your application's Gemfile:</p>
|
72
72
|
|
73
|
-
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_gem'>gem</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>
|
73
|
+
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_gem'>gem</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>simple2ch</span><span class='tstring_end'>'</span></span></code></pre>
|
74
74
|
|
75
75
|
<p>And then execute:</p>
|
76
76
|
|
@@ -78,16 +78,29 @@
|
|
78
78
|
|
79
79
|
<p>Or install it yourself as:</p>
|
80
80
|
|
81
|
-
<pre class="code ruby"><code class="ruby">$ gem install
|
81
|
+
<pre class="code ruby"><code class="ruby">$ gem install simple2ch</code></pre>
|
82
82
|
|
83
83
|
<h2 id="label-Usage">Usage</h2>
|
84
|
-
|
85
|
-
<p>
|
84
|
+
<ul><li>
|
85
|
+
<p>初期化 <code>ruby require 'simple2ch' </code></p>
|
86
|
+
</li><li>
|
87
|
+
<p>スレ取得 <code>ruby board = Simple2ch::Board.new('ニュー速VIP',
|
88
|
+
'http://viper.2ch.sc/news4vip/') board.thres
|
89
|
+
#=>[#<Simple2ch::Thre>, ..., #<Simple2ch::Thre>] </code></p>
|
90
|
+
</li><li>
|
91
|
+
<p>レス取得 <code>ruby thre = board.thres[hoge] #=> #<Simple2ch::Thre>
|
92
|
+
thre.reses #=> [#<Simple2ch::Res>, ..., #<Simple2ch::Res>]
|
93
|
+
</code></p>
|
94
|
+
</li><li>
|
95
|
+
<p>書き込み内容取得 <code>ruby res = thre.reses[foo] #=> #<Simple2ch::Res>
|
96
|
+
res.author #=> "以下、\(^o^)/でVIPがお送りします" res.contents #=>
|
97
|
+
"hoge foo bar" </code></p>
|
98
|
+
</li></ul>
|
86
99
|
|
87
100
|
<h2 id="label-Contributing">Contributing</h2>
|
88
101
|
<ol><li>
|
89
102
|
<p>Fork it ( <a
|
90
|
-
href="https://github.com/
|
103
|
+
href="https://github.com/dogwood008/simple2ch/fork">github.com/dogwood008/simple2ch/fork</a>
|
91
104
|
)</p>
|
92
105
|
</li><li>
|
93
106
|
<p>Create your feature branch (<code>git checkout -b my-new-feature</code>)</p>
|
@@ -102,7 +115,7 @@ feature'</code>)</p>
|
|
102
115
|
</div></div>
|
103
116
|
|
104
117
|
<div id="footer">
|
105
|
-
Generated on Sun Sep 7
|
118
|
+
Generated on Sun Sep 7 16:55:25 2014 by
|
106
119
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
107
120
|
0.8.7.4 (ruby-2.1.2).
|
108
121
|
</div>
|
data/doc/method_list.html
CHANGED
@@ -186,7 +186,7 @@
|
|
186
186
|
|
187
187
|
|
188
188
|
<li class="r2 ">
|
189
|
-
<span class='object_link'><a href="Simple2ch/Board.html#
|
189
|
+
<span class='object_link'><a href="Simple2ch/Board.html#thres-instance_method" title="Simple2ch::Board#thres (method)">#thres</a></span>
|
190
190
|
<small>Simple2ch::Board</small>
|
191
191
|
</li>
|
192
192
|
|
@@ -103,7 +103,7 @@
|
|
103
103
|
</div>
|
104
104
|
|
105
105
|
<div id="footer">
|
106
|
-
Generated on Sun Sep 7
|
106
|
+
Generated on Sun Sep 7 16:55:25 2014 by
|
107
107
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
108
108
|
0.8.7.4 (ruby-2.1.2).
|
109
109
|
</div>
|
data/lib/simple2ch/board.rb
CHANGED
data/lib/simple2ch/version.rb
CHANGED
data/lib/simple2ch.rb
CHANGED
data/simple2ch.gemspec
CHANGED
@@ -25,6 +25,8 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.add_development_dependency 'rspec-its'
|
26
26
|
spec.add_development_dependency 'spork'
|
27
27
|
|
28
|
+
spec.required_ruby_version = '~> 2.0'
|
29
|
+
|
28
30
|
# spec.add_development_dependency 'spring'
|
29
31
|
# spec.add_development_dependency 'zeus'
|
30
32
|
# spec.add_development_dependency 'guard'
|
data/spec/board_spec.rb
CHANGED
@@ -27,7 +27,7 @@ describe Simple2ch::Board do
|
|
27
27
|
end
|
28
28
|
|
29
29
|
context 'should get all of thread' do
|
30
|
-
subject { board.
|
30
|
+
subject { board.thres }
|
31
31
|
it { is_expected.to be_a_kind_of(Array) }
|
32
32
|
it { subject.each{ |t| expect(t).to be_a_kind_of(Simple2ch::Thre) } }
|
33
33
|
its(:size) { is_expected.to be > 0 }
|
data/spec/simple2ch_spec.rb
CHANGED
@@ -7,13 +7,13 @@ describe Simple2ch do
|
|
7
7
|
board_name = 'ニュー速VIP'
|
8
8
|
board_url = 'http://viper.2ch.sc/news4vip/'
|
9
9
|
@board = Board.new board_name, board_url
|
10
|
-
@threads= @board.
|
10
|
+
@threads= @board.thres
|
11
11
|
@res = @threads[0].reses[0]
|
12
12
|
end
|
13
|
-
it{ expect(@board.
|
13
|
+
it{ expect(@board.thres).to be_a_kind_of Array }
|
14
14
|
it do
|
15
15
|
#@threads = board.threads
|
16
|
-
expect(@board.
|
16
|
+
expect(@board.thres.size).to be > 0
|
17
17
|
end
|
18
18
|
|
19
19
|
it { expect(@threads[0]).to be_a_kind_of Thre }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple2ch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- dogwood008
|
@@ -153,9 +153,9 @@ require_paths:
|
|
153
153
|
- lib
|
154
154
|
required_ruby_version: !ruby/object:Gem::Requirement
|
155
155
|
requirements:
|
156
|
-
- - "
|
156
|
+
- - "~>"
|
157
157
|
- !ruby/object:Gem::Version
|
158
|
-
version: '0'
|
158
|
+
version: '2.0'
|
159
159
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
160
160
|
requirements:
|
161
161
|
- - ">="
|