pixiv 0.0.8 → 0.0.9

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: a15fda5ed4b1295bc489807d64ed2af7c8fc84e0
4
- data.tar.gz: df8d3d98c7bc4eb398f8b83b11828db630bba4e8
3
+ metadata.gz: 558d9d90a126a1bf5cdd341e34eb43a9c26a297e
4
+ data.tar.gz: 2e1c660dfec546b46155f970a25d7f770635b50f
5
5
  SHA512:
6
- metadata.gz: 57e2290c398f7f287bf20d0bbe57c8062f516b292626088ede1b5d0efa640f8e0cdc5948749c123860c7acc060c0d770848d1f869065e7f8d5b0d7606a40d803
7
- data.tar.gz: 7d370d9351429439a49f00de960812b699514c1c4fe5a63b1f94eaca6863bcc564e83653fea63d06ca818f43be0817ac6531300b732424b4ed8849eecd032ca3
6
+ metadata.gz: 28b0f24032d48f081eb8370da3ece2a545bd813c8fa2e8820c16713afe3e2050c480adfa4c056a4a8c90f2634a6daa2c6fc24674c1f1309e0d0a7b2891791b9e
7
+ data.tar.gz: d5956e8808a0ad7d264739771dee255fc064aa84d7fb838962695f73a41be7cbadc6dddc35e001c9eaf49236ba181407ecc29a3919b017a94e1a54f3304903c0
data/.gitignore CHANGED
@@ -16,3 +16,5 @@ spec/reports
16
16
  test/tmp
17
17
  test/version_tmp
18
18
  tmp
19
+ .ruby-version
20
+
@@ -1,7 +1,12 @@
1
1
  language: ruby
2
2
  rvm:
3
3
  - ruby-head
4
+ - 2.2.2
5
+ - 2.1.6
6
+ - 2.0.0
4
7
  - 1.9.3
5
8
  notifications:
6
9
  email:
7
10
  - uasi@uasi.jp
11
+ - jecy00@gmail.com
12
+
data/Rakefile CHANGED
@@ -14,3 +14,8 @@ task :console do
14
14
  exec "#{load_env} && pry -r #{console_helper} -e 'init;'"
15
15
  end
16
16
  end
17
+
18
+ task :test do
19
+ exec "rspec spec"
20
+ end
21
+
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Pixiv
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
@@ -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', '~> 2.12'
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>
@@ -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 be_nil }
21
- its(:illust?) { should be_true }
22
- its(:manga?) { should be_false }
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 be_nil }
54
- its(:illust?) { should be_true }
55
- its(:manga?) { should be_false }
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
@@ -1,6 +1,7 @@
1
1
  require 'pixiv'
2
2
  require 'mechanize'
3
3
  require 'webmock/rspec'
4
+ require 'rspec/its'
4
5
 
5
6
  # Disable "should" syntax.
6
7
  RSpec.configure do |config|
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.8
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: 2013-09-01 00:00:00.000000000 Z
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: '2.12'
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: '2.12'
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.0.3
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: