dmm-crawler 0.0.4 → 0.0.5

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: 067a4d6b904304c34f0a10f46624d56e8b1b66cd
4
- data.tar.gz: 7ea7e3e4cdcc84a2a90754919b371ffd7be7f5ec
3
+ metadata.gz: 99738f48c076aa4e2569f97fab7c9ad20500aa0f
4
+ data.tar.gz: aaa5cf428459e5310449a03cfce45fcf87310de9
5
5
  SHA512:
6
- metadata.gz: eeaf2856bb91f4e4b795c4094be5f02d067a7a21c81766e2d53a9f25181d9cba17c47375d2365687c82bdd3a51866e3d90e3274d3fcf6d4fd765298dce70545e
7
- data.tar.gz: 30c557a6bc1d50f7fff421fe1dfafefad51d59ac498d8d841761d9be460889d7c890dea9b0c7d080128adf7de6b7d7db36f6fe21a1e02af7216b15aa74f46c39
6
+ metadata.gz: 58ca9321e140ba4327b2e9d49a062fe37a23a0c0feeb2d8c914054f1f9888fb151ffa6e87f3977268f63c3e024ad380275c011107b99f9189f70474a83600162
7
+ data.tar.gz: f8b08887860332a742ab5301edaf48361a72e2cd85da2e6a7e5a915978e00712c65600f64e00d1e0791cae3ce1102f0d7f495b2512e140518bd27e30d92ce9f3
data/.rubocop.yml CHANGED
@@ -11,7 +11,7 @@ Metrics/ClassLength:
11
11
  Enabled: false
12
12
 
13
13
  Metrics/MethodLength:
14
- Max: 12
14
+ Max: 20
15
15
 
16
16
  Style/Documentation:
17
17
  Enabled: false
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Change logs
2
2
 
3
+ ## 0.0.5
4
+ - Add a function to fetch description.
5
+
3
6
  ## v0.0.4
4
7
  - Fix the code for chech an argument.
5
8
  - Rename an attribute from url to title_link.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dmm-crawler (0.0.4)
4
+ dmm-crawler (0.0.5)
5
5
  mechanize
6
6
 
7
7
  GEM
@@ -15,11 +15,20 @@ module DMMCrawler
15
15
  element.search('.rank-name').first.text.strip,
16
16
  element.search('img').last.attributes['src'].value,
17
17
  "#{BASE_URL}#{element.search('.rank-name').first.search('a').first.attributes.first[1].value}",
18
+ element.search('.rank-desc').text,
18
19
  element.search('.rank-labelListItem').map { |e| e.search('a').text.strip }
19
20
  ]
20
21
  end
21
22
 
22
- arts.map.with_index(1) { |(title, image_url, title_link, tags), rank| { title: "#{rank}位: #{title}", title_link: title_link, image_url: image_url, tags: tags } }
23
+ arts.map.with_index(1) do |(title, image_url, title_link, description, tags), rank|
24
+ {
25
+ title: "#{rank}位: #{title}",
26
+ title_link: title_link,
27
+ image_url: image_url,
28
+ description: description,
29
+ tags: tags
30
+ }
31
+ end
23
32
  end
24
33
 
25
34
  private
@@ -1,3 +1,3 @@
1
1
  module DMMCrawler
2
- VERSION = '0.0.4'.freeze
2
+ VERSION = '0.0.5'.freeze
3
3
  end
@@ -21,7 +21,7 @@ describe DMMCrawler::Ranking do
21
21
  let(:term) { '24' }
22
22
 
23
23
  it { is_expected.not_to be_empty }
24
- it { is_expected.to all(include(:title, :title_link, :image_url, :tags)) }
24
+ it { is_expected.to all(include(:title, :title_link, :image_url, :description, :tags)) }
25
25
  end
26
26
 
27
27
  context 'with not registered argument' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dmm-crawler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Satoshi Ohmori
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-12 00:00:00.000000000 Z
11
+ date: 2017-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mechanize
@@ -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.12
142
+ rubygems_version: 2.5.1
143
143
  signing_key:
144
144
  specification_version: 4
145
145
  summary: Show DMM and DMM.R18's crawled data