dmm-crawler 0.4.4 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -0
- data/.travis.yml +3 -1
- data/Gemfile +2 -0
- data/Rakefile +2 -0
- data/dmm-crawler.gemspec +6 -4
- data/lib/dmm-crawler.rb +3 -1
- data/lib/dmm-crawler/agent.rb +2 -0
- data/lib/dmm-crawler/attributes/adult_game_attributes.rb +2 -0
- data/lib/dmm-crawler/attributes/base_attributes.rb +2 -0
- data/lib/dmm-crawler/attributes/dojin_attributes.rb +2 -0
- data/lib/dmm-crawler/client.rb +2 -0
- data/lib/dmm-crawler/ranking/adult_game_ranking.rb +4 -2
- data/lib/dmm-crawler/ranking/base_ranking.rb +3 -0
- data/lib/dmm-crawler/ranking/dojin_ranking.rb +2 -0
- data/lib/dmm-crawler/version.rb +3 -1
- data/spec/dmm-crawler/ranking/adult_game_ranking_spec.rb +3 -1
- data/spec/dmm-crawler/ranking/dojin_ranking_spec.rb +2 -0
- data/spec/spec_helper.rb +2 -0
- metadata +18 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50faa1adcf0cbb6d6f43454ec733e1560280aed46821059eb32ecb0cffeb0d1a
|
4
|
+
data.tar.gz: 51cf3b9d4f13f54c4c3f3463382bf2bb7fcec6e203d350584ee4ae6cb3f41e39
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c585ff843bda9433748571e846f026d1e2bf4bb7fe827450002ef6aa8423ff756285d09cf1940fca00a9932a688ca99aa08662145ed1789bd0bd0cd6d9c4a64b
|
7
|
+
data.tar.gz: '019f0f9332fa6e6842d4e33e4e77f69810809fcd2c5e92554c56dfa04536a85d0fe08639b0327cbdacc27b38b0af0548fe256f545c2bb7662db4825e85064c97'
|
data/.rubocop.yml
CHANGED
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/Rakefile
CHANGED
data/dmm-crawler.gemspec
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
2
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
5
|
require 'dmm-crawler/version'
|
4
6
|
|
@@ -19,12 +21,12 @@ Gem::Specification.new do |spec|
|
|
19
21
|
|
20
22
|
spec.require_paths = ['lib']
|
21
23
|
|
22
|
-
spec.add_runtime_dependency 'rdmm'
|
23
24
|
spec.add_runtime_dependency 'mechanize'
|
25
|
+
spec.add_runtime_dependency 'rdmm'
|
24
26
|
|
25
27
|
spec.add_development_dependency 'bundler'
|
26
|
-
spec.add_development_dependency 'rake'
|
27
|
-
spec.add_development_dependency 'rubocop', '< 0.49.0'
|
28
28
|
spec.add_development_dependency 'pry'
|
29
|
+
spec.add_development_dependency 'rake'
|
29
30
|
spec.add_development_dependency 'rspec'
|
31
|
+
spec.add_development_dependency 'rubocop', '~> 0.69.0'
|
30
32
|
end
|
data/lib/dmm-crawler.rb
CHANGED
data/lib/dmm-crawler/agent.rb
CHANGED
data/lib/dmm-crawler/client.rb
CHANGED
@@ -1,10 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module DMMCrawler
|
2
4
|
module Ranking
|
3
5
|
class AdultGameRanking < BaseRanking
|
4
6
|
include Attributes
|
5
7
|
|
6
8
|
FETCHING_LIMITATION = 20
|
7
|
-
DLSOFT_URL =
|
9
|
+
DLSOFT_URL = 'https://dlsoft.dmm.co.jp/'
|
8
10
|
|
9
11
|
def initialize(agent: Agent.instance.agent, term: nil)
|
10
12
|
@agent = discriminate_agent(agent)
|
@@ -45,7 +47,7 @@ module DMMCrawler
|
|
45
47
|
when 'monthly'
|
46
48
|
''
|
47
49
|
when 'yearly'
|
48
|
-
|
50
|
+
'term=all/year=2018'
|
49
51
|
end
|
50
52
|
end
|
51
53
|
end
|
data/lib/dmm-crawler/version.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
describe DMMCrawler::Ranking::AdultGameRanking do
|
2
4
|
let(:agent) { DMMCrawler::Agent.instance.agent }
|
3
5
|
let(:arguments) { { agent: agent, term: term } }
|
@@ -19,7 +21,7 @@ describe DMMCrawler::Ranking::AdultGameRanking do
|
|
19
21
|
let(:attachments) { described_class.new(arguments).arts }
|
20
22
|
|
21
23
|
it { is_expected.to all(include(:title, :title_link, :main_image_url, :sample_image_urls, :submedia, :author, :rank, :affiliateable, :tags)) }
|
22
|
-
it { is_expected.to all(satisfy { |art| art.all? { |_k, v| v != '' && v
|
24
|
+
it { is_expected.to all(satisfy { |art| art.all? { |_k, v| v != '' && !v.nil? } }) }
|
23
25
|
end
|
24
26
|
|
25
27
|
context 'with not registered argument' do
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dmm-crawler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.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: 2019-05-
|
11
|
+
date: 2019-05-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: mechanize
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
@@ -25,7 +25,7 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: rdmm
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
@@ -53,7 +53,7 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: pry
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
@@ -67,21 +67,21 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: rake
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0
|
75
|
+
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - "
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0
|
82
|
+
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: rspec
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - ">="
|
@@ -95,19 +95,19 @@ dependencies:
|
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
98
|
+
name: rubocop
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- - "
|
101
|
+
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
103
|
+
version: 0.69.0
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- - "
|
108
|
+
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
110
|
+
version: 0.69.0
|
111
111
|
description: Show DMM and DMM.R18's crawled data. e.g. ranking
|
112
112
|
email:
|
113
113
|
- sachin21dev@gmail.com
|
@@ -158,7 +158,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
158
158
|
- !ruby/object:Gem::Version
|
159
159
|
version: '0'
|
160
160
|
requirements: []
|
161
|
-
|
161
|
+
rubyforge_project:
|
162
|
+
rubygems_version: 2.7.6
|
162
163
|
signing_key:
|
163
164
|
specification_version: 4
|
164
165
|
summary: Show DMM and DMM.R18's crawled data
|