dmm-crawler 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b2a971f680dc60f0a06721a2a0c6b29f1f06aced
4
- data.tar.gz: c36967cc3cc6cc8c7a72283c28905e6db4b18d20
3
+ metadata.gz: c9d942f72d5f46c76cc3ea64fac5d14e75f3b64c
4
+ data.tar.gz: 91d5c2006978748f4a6ae4e5f44dab749b29c887
5
5
  SHA512:
6
- metadata.gz: 853c15408188b05ee7be37d1bc57e6f478c893253f3c0979c09f7c9adfd589a611253d280cdce49883ba0d3625204db6292906fe4fc7b111fe372e15e5811feb
7
- data.tar.gz: 2eed407e8d1de2ec579f59ebe9ef8e93dc99a5b846e5ca60f904e845eaf7751b9ac48068ffef2cc6d1bb2f8591afd172511ccc679c1da35bc7227503d5928df5
6
+ metadata.gz: d19da3e0904770f3124dbb5e543340c37b8ee7b39962df3ec9d83562f5faaf26c92c7bda5821b341fe4e2f0cb922740024cb7d165e039a3b18c034a12c57b9cb
7
+ data.tar.gz: d594e9f254168304b4330096c2a440d967206bc3757ead9eb500f9e4771ce964afc182aa1241c8f14dde3310b76821f872c3c681fda4fa0f1fa39ff8a7c8bec9
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Change logs
2
2
 
3
+ ## v0.0.3
4
+ - Rename the method from books to arts.
5
+ - Correct examples for `README.md`.
6
+
3
7
  ## v0.0.2
4
8
  - Write docs for dmm-crawler.
5
9
  - Add a function to fetch tags for the title.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dmm-crawler (0.0.2)
4
+ dmm-crawler (0.0.3)
5
5
  mechanize
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -22,12 +22,7 @@ require 'dmm-crawler'
22
22
 
23
23
  include DMMCrawler
24
24
 
25
- args = {
26
- term: '24',
27
- submedia: 'cg'
28
- }
29
-
30
- Ranking.new(args).books
25
+ Ranking.new(term: '24', submedia: 'cg').arts
31
26
 
32
27
  # =>
33
28
  # {
data/doc/ja/README.md CHANGED
@@ -21,12 +21,7 @@ require 'dmm-crawler'
21
21
 
22
22
  include DMMCrawler
23
23
 
24
- args = {
25
- term: '24',
26
- submedia: 'cg'
27
- }
28
-
29
- Ranking.new(args).books
24
+ Ranking.new(term: '24', submedia: 'cg').arts
30
25
 
31
26
  # =>
32
27
  # {
@@ -9,8 +9,8 @@ module DMMCrawler
9
9
  @agent = Agent.new.agent
10
10
  end
11
11
 
12
- def books
13
- books = page.search('.rank-rankListItem.fn-setPurchaseChange').map do |element|
12
+ def arts
13
+ arts = page.search('.rank-rankListItem.fn-setPurchaseChange').map do |element|
14
14
  [
15
15
  element.search('.rank-name').first.text.strip,
16
16
  element.search('img').last.attributes['src'].value,
@@ -19,7 +19,7 @@ module DMMCrawler
19
19
  ]
20
20
  end
21
21
 
22
- books.map.with_index(1) { |(title, image, url, tags), rank| { title: "#{rank}位: #{title}", url: url, image_url: image, tags: tags } }
22
+ arts.map.with_index(1) { |(title, image, url, tags), rank| { title: "#{rank}位: #{title}", url: url, image_url: image, tags: tags } }
23
23
  end
24
24
 
25
25
  private
@@ -1,3 +1,3 @@
1
1
  module DMMCrawler
2
- VERSION = '0.0.2'.freeze
2
+ VERSION = '0.0.3'.freeze
3
3
  end
@@ -1,10 +1,10 @@
1
1
  describe DMMCrawler::Ranking do
2
- let(:attachments) { described_class.new(arguments).books }
2
+ let(:attachments) { described_class.new(arguments).arts }
3
3
 
4
4
  let(:submedia) { 'cg' }
5
5
  let(:arguments) { { submedia: submedia, term: term } }
6
6
 
7
- describe '#books' do
7
+ describe '#arts' do
8
8
  after { sleep 2 }
9
9
 
10
10
  context 'with length' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dmm-crawler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Satoshi Ohmori
@@ -139,7 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
139
139
  version: '0'
140
140
  requirements: []
141
141
  rubyforge_project:
142
- rubygems_version: 2.6.11
142
+ rubygems_version: 2.6.12
143
143
  signing_key:
144
144
  specification_version: 4
145
145
  summary: Show DMM and DMM.R18's crawled data