pixiv 0.0.8 → 0.0.9
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/.gitignore +2 -0
- data/.travis.yml +5 -0
- data/Rakefile +5 -0
- data/lib/pixiv/client.rb +1 -1
- data/lib/pixiv/version.rb +1 -1
- data/pixiv.gemspec +2 -1
- data/spec/fixtures/illust_345.html +2 -0
- data/spec/pixiv/illust_spec.rb +7 -6
- data/spec/spec_helper.rb +1 -0
- metadata +31 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 558d9d90a126a1bf5cdd341e34eb43a9c26a297e
|
4
|
+
data.tar.gz: 2e1c660dfec546b46155f970a25d7f770635b50f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 28b0f24032d48f081eb8370da3ece2a545bd813c8fa2e8820c16713afe3e2050c480adfa4c056a4a8c90f2634a6daa2c6fc24674c1f1309e0d0a7b2891791b9e
|
7
|
+
data.tar.gz: d5956e8808a0ad7d264739771dee255fc064aa84d7fb838962695f73a41be7cbadc6dddc35e001c9eaf49236ba181407ecc29a3919b017a94e1a54f3304903c0
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/Rakefile
CHANGED
data/lib/pixiv/client.rb
CHANGED
@@ -43,7 +43,7 @@ module Pixiv
|
|
43
43
|
def login(pixiv_id, password)
|
44
44
|
doc = agent.get("#{ROOT_URL}/index.php")
|
45
45
|
return if doc && doc.body =~ /logout/
|
46
|
-
form = doc.forms_with(action: '/login.php').first
|
46
|
+
form = doc.forms_with(action: 'https://www.secure.pixiv.net/login.php').first
|
47
47
|
puts doc.body and raise Error::LoginFailed, 'login form is not available' unless form
|
48
48
|
form.pixiv_id = pixiv_id
|
49
49
|
form.pass = password
|
data/lib/pixiv/version.rb
CHANGED
data/pixiv.gemspec
CHANGED
@@ -20,6 +20,7 @@ Gem::Specification.new do |gem|
|
|
20
20
|
gem.add_dependency 'mechanize', '~> 2.0'
|
21
21
|
|
22
22
|
gem.add_development_dependency 'rake', '>= 0.8.7'
|
23
|
-
gem.add_development_dependency 'rspec'
|
23
|
+
gem.add_development_dependency 'rspec'
|
24
|
+
gem.add_development_dependency 'rspec-its'
|
24
25
|
gem.add_development_dependency 'webmock', '~> 1.9'
|
25
26
|
end
|
@@ -32,5 +32,7 @@
|
|
32
32
|
<div class="rated-count">10</div>
|
33
33
|
<!-- score = 100 -->
|
34
34
|
<div class="score-count">100</div>
|
35
|
+
<!-- illust -->
|
36
|
+
<div class="works_display"><div class="_layout-thumbnail ui-modal-trigger"><img src="http://i1.pixiv.net/img1/img/sayoko/345_m.jpg" alt="いまさら『エド・はるみ』"></div></div>
|
35
37
|
</body>
|
36
38
|
</html>
|
data/spec/pixiv/illust_spec.rb
CHANGED
@@ -17,9 +17,9 @@ describe Pixiv::Illust do
|
|
17
17
|
its(:small_image_url) { should == 'http://i1.pixiv.net/img1/img/sayoko/345_s.jpg' }
|
18
18
|
its(:medium_image_url) { should == 'http://i1.pixiv.net/img1/img/sayoko/345_m.jpg' }
|
19
19
|
its(:original_image_url) { should == 'http://i1.pixiv.net/img1/img/sayoko/345.jpg' }
|
20
|
-
its(:num_pages) { should
|
21
|
-
its(:illust?) { should
|
22
|
-
its(:manga?) { should
|
20
|
+
its(:num_pages) { should == nil }
|
21
|
+
its(:illust?) { should == true }
|
22
|
+
its(:manga?) { should == false }
|
23
23
|
end
|
24
24
|
|
25
25
|
describe '.new', 'given attrs covers attrs extracted from doc' do
|
@@ -35,6 +35,7 @@ describe Pixiv::Illust do
|
|
35
35
|
rated_count: 13,
|
36
36
|
score: 130,
|
37
37
|
small_image_url: 'http://i1.pixiv.net/img1/img/duke/105_s.jpg',
|
38
|
+
medium_image_url: 'http://i1.pixiv.net/img1/img/duke/105_m.jpg',
|
38
39
|
}
|
39
40
|
end
|
40
41
|
subject { Pixiv::Illust.new(illust_doc, @attrs) }
|
@@ -50,9 +51,9 @@ describe Pixiv::Illust do
|
|
50
51
|
its(:small_image_url) { should == 'http://i1.pixiv.net/img1/img/duke/105_s.jpg' }
|
51
52
|
its(:medium_image_url) { should == 'http://i1.pixiv.net/img1/img/duke/105_m.jpg' }
|
52
53
|
its(:original_image_url) { should == 'http://i1.pixiv.net/img1/img/duke/105.jpg' }
|
53
|
-
its(:num_pages) { should
|
54
|
-
its(:illust?) { should
|
55
|
-
its(:manga?) { should
|
54
|
+
its(:num_pages) { should == nil }
|
55
|
+
its(:illust?) { should == true }
|
56
|
+
its(:manga?) { should == false }
|
56
57
|
end
|
57
58
|
|
58
59
|
describe '.url' do
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,69 +1,83 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pixiv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomoki Aonuma
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-06-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mechanize
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '2.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '2.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 0.8.7
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 0.8.7
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec-its
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: webmock
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
58
72
|
requirements:
|
59
|
-
- - ~>
|
73
|
+
- - "~>"
|
60
74
|
- !ruby/object:Gem::Version
|
61
75
|
version: '1.9'
|
62
76
|
type: :development
|
63
77
|
prerelease: false
|
64
78
|
version_requirements: !ruby/object:Gem::Requirement
|
65
79
|
requirements:
|
66
|
-
- - ~>
|
80
|
+
- - "~>"
|
67
81
|
- !ruby/object:Gem::Version
|
68
82
|
version: '1.9'
|
69
83
|
description: A client library for pixiv
|
@@ -73,8 +87,8 @@ executables: []
|
|
73
87
|
extensions: []
|
74
88
|
extra_rdoc_files: []
|
75
89
|
files:
|
76
|
-
- .gitignore
|
77
|
-
- .travis.yml
|
90
|
+
- ".gitignore"
|
91
|
+
- ".travis.yml"
|
78
92
|
- Changelog.md
|
79
93
|
- Gemfile
|
80
94
|
- LICENSE.txt
|
@@ -117,17 +131,17 @@ require_paths:
|
|
117
131
|
- lib
|
118
132
|
required_ruby_version: !ruby/object:Gem::Requirement
|
119
133
|
requirements:
|
120
|
-
- -
|
134
|
+
- - ">="
|
121
135
|
- !ruby/object:Gem::Version
|
122
136
|
version: '0'
|
123
137
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
124
138
|
requirements:
|
125
|
-
- -
|
139
|
+
- - ">="
|
126
140
|
- !ruby/object:Gem::Version
|
127
141
|
version: '0'
|
128
142
|
requirements: []
|
129
143
|
rubyforge_project:
|
130
|
-
rubygems_version: 2.
|
144
|
+
rubygems_version: 2.4.5
|
131
145
|
signing_key:
|
132
146
|
specification_version: 4
|
133
147
|
summary: A client library for pixiv
|
@@ -145,4 +159,3 @@ test_files:
|
|
145
159
|
- spec/pixiv/search_result_list_spec.rb
|
146
160
|
- spec/pixiv/work_list_spec.rb
|
147
161
|
- spec/spec_helper.rb
|
148
|
-
has_rdoc:
|