ikioi 0.0.1 → 0.0.2
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.
- checksums.yaml +4 -4
- data/README.md +8 -6
- data/lib/ikioi/checker.rb +5 -6
- data/lib/ikioi/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e869f96131af0c77ebd6f7cf5eccdb651e8e839
|
4
|
+
data.tar.gz: 2ad9350dc153f6eb1a61d2b7724f61f8a721aa49
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63e3e854cce1c3b34b6612c718675606a28d788c30851ec5f13cdd4acd6d2581086181622a6283abd0a83d581de7a54d372f68a9dd13926c801c27e335fb3c7f
|
7
|
+
data.tar.gz: 0505a306457a8a8c41b9d11c4e67df09eb26e375e0d5ae3d5b511bf0e2ddf9c74218ea972c40f3bd8d98a3e20b40a21268aac1a8eec70081c3dcb69341915c2b
|
data/README.md
CHANGED
@@ -1,12 +1,10 @@
|
|
1
|
-
# Ikioi
|
2
|
-
|
3
|
-
TODO: Write a gem description
|
1
|
+
# Ikioi
|
4
2
|
|
5
3
|
## Installation
|
6
4
|
|
7
5
|
Add this line to your application's Gemfile:
|
8
6
|
|
9
|
-
gem 'ikioi
|
7
|
+
gem 'ikioi'
|
10
8
|
|
11
9
|
And then execute:
|
12
10
|
|
@@ -14,11 +12,15 @@ And then execute:
|
|
14
12
|
|
15
13
|
Or install it yourself as:
|
16
14
|
|
17
|
-
$ gem install ikioi
|
15
|
+
$ gem install ikioi
|
18
16
|
|
19
17
|
## Usage
|
20
18
|
|
21
|
-
|
19
|
+
```
|
20
|
+
checker = Ikioi::Checker.new('keyword', 'board_name')
|
21
|
+
checker.fetch
|
22
|
+
```
|
23
|
+
|
22
24
|
|
23
25
|
## Contributing
|
24
26
|
|
data/lib/ikioi/checker.rb
CHANGED
@@ -4,12 +4,11 @@ require "open-uri"
|
|
4
4
|
module Ikioi
|
5
5
|
class Checker
|
6
6
|
|
7
|
-
|
8
|
-
@keyword = keyword
|
9
|
-
end
|
7
|
+
attr_reader :keyword, :board_name
|
10
8
|
|
11
|
-
def keyword
|
12
|
-
@keyword
|
9
|
+
def initialize(keyword, board_name)
|
10
|
+
@keyword = keyword
|
11
|
+
@board_name = board_name
|
13
12
|
end
|
14
13
|
|
15
14
|
def fetch
|
@@ -23,7 +22,7 @@ module Ikioi
|
|
23
22
|
end
|
24
23
|
|
25
24
|
def fetch_jsonp
|
26
|
-
open(
|
25
|
+
open("http://2ch-ranking.net/ranking.json?board=#{board_name}").read
|
27
26
|
end
|
28
27
|
|
29
28
|
end
|
data/lib/ikioi/version.rb
CHANGED