dmm-crawler 0.1.3 → 0.1.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d81d554887372647840ee289931bb8e48fdf7773
4
- data.tar.gz: cb08a2dbecf8d0a05d622e263a028d4a30ee8078
3
+ metadata.gz: aba2948c3273dec948c8e9f0f0515216964ab5b6
4
+ data.tar.gz: 6bdba93682fc12536ba834713e51ee46c6e44da4
5
5
  SHA512:
6
- metadata.gz: 9cc563c97f1391290b6a9d43b57053bc8b661336f49a42b43e6c140f0538b083349e0e8136925348fd13720383fe958a8a40f54c8eefb87a478216bb4caaa6dc
7
- data.tar.gz: '01795b372af4159cda9661d50dcb76f30fa1ab1cacb34337572d89425abe5d2243e20c9d54e252c4fac8e41f6c12f2a78855f6f4e96fb7d91736511f34ee1313'
6
+ metadata.gz: f45423ca87487b80f2b5b5e0599c5e2c6c77c5de9e09b01a7ff3b84e7d3428b13397eae121ca65a995ddef223959359d8518ee464f27ab8734f2e56c2d30cfb2
7
+ data.tar.gz: 623fd1aa88cb58498fd46dbead4470e330fb89a17de23a311306ae7749dad827a8a4ee05d544b233141ce7b098dfb12eea3858af1b22af020d43361b0be3a4a7
data/.rubocop.yml CHANGED
@@ -1,3 +1,6 @@
1
+ AllCops:
2
+ DisplayCopNames: true
3
+
1
4
  LineLength:
2
5
  Enabled: false
3
6
 
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Change logs
2
2
 
3
+ ## 0.1.4
4
+ - Move the series to last.
5
+
3
6
  ## 0.1.3
4
7
  - Add crawling more information.
5
8
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dmm-crawler (0.1.3)
4
+ dmm-crawler (0.1.4)
5
5
  mechanize
6
6
 
7
7
  GEM
@@ -81,4 +81,4 @@ DEPENDENCIES
81
81
  rubocop (~> 0.47)
82
82
 
83
83
  BUNDLED WITH
84
- 1.14.6
84
+ 1.15.1
@@ -79,7 +79,15 @@ module DMMCrawler
79
79
  keys = extract_text(@element.search('.m-productInformation .productInformation__item .informationList__ttl'))
80
80
  values = extract_text(@element.search('.m-productInformation .productInformation__item .informationList__txt'))
81
81
 
82
- keys.zip(values).map { |key, value| { key: key, value: value } }
82
+ information = keys.zip(values)
83
+ series = information.find { |array| array.first == 'シリーズ' }
84
+
85
+ if series
86
+ information = information.select { |array| array.first != 'シリーズ' }
87
+ information.push(series)
88
+ end
89
+
90
+ information.map { |key, value| { key: key, value: value } }
83
91
  end
84
92
 
85
93
  def extract_text(elements)
@@ -1,3 +1,3 @@
1
1
  module DMMCrawler
2
- VERSION = '0.1.3'.freeze
2
+ VERSION = '0.1.4'.freeze
3
3
  end
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.1.3
4
+ version: 0.1.4
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-06-12 00:00:00.000000000 Z
11
+ date: 2017-06-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mechanize