netprint 0.3.3 → 0.3.4

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
  SHA256:
3
- metadata.gz: b06edd14f5f6309d61b120d16ba03ed3aeca88f3d2e34f43eea5d8a6055bb796
4
- data.tar.gz: c64afabd3b94a7e4c51a498b74d8224e10235e892973e3c53eb55ac7358ffc32
3
+ metadata.gz: 487b5d326fe955b64cfe6791607ddb6239a3f3cbe1bdcf524f8f4d89f8617402
4
+ data.tar.gz: 9e34746991a1a3561bfe21843583131604b7ac44971f276cc6fbc81c36fa6d0d
5
5
  SHA512:
6
- metadata.gz: cd70cd4b9aeaed52223ee9280048eb5e88ad19a4b2425746abcec047fb9aa0016735fdebcca68b29cba6df53cc5539e44fc8964965527dea41aed9195844b580
7
- data.tar.gz: 42d205e471e8461670c437b951cbda7ea5d7f113afb560c7425350abef0dd4729f28601b8e69b0ec8d7801fd786a275eedc571801342f8d3dba65cc118cd0643
6
+ metadata.gz: 455d591c31fef5e60766977e6e07741fe30b1a9627728172199e75afe2cf11ccbd8dd33820b8693f06ba3ecf8a2dd8a03443ee3ba96b8dc6a70562fd579ac490
7
+ data.tar.gz: faa0da4ee4cbbd0879209b7c982c1f74308b309a57f3dbbf8d2999764919073318d6b9a172ffc3561fc6def0dd3c1c1ee9d05fe621d3fd8199507f67a03a9d39
@@ -2,8 +2,6 @@ language: ruby
2
2
  before_install:
3
3
  - gem update bundler
4
4
  rvm:
5
- - 1.9.3
6
- - 2.0.0
7
- - 2.1.0
8
- - 2.2.0
9
- - 2.3.0
5
+ - 2.5.0
6
+ - 2.6.0
7
+ - 2.7.0
@@ -1,3 +1,3 @@
1
1
  module Netprint
2
- VERSION = "0.3.3"
2
+ VERSION = "0.3.4"
3
3
  end
@@ -15,8 +15,8 @@ Gem::Specification.new do |gem|
15
15
  gem.require_paths = ["lib"]
16
16
  gem.version = Netprint::VERSION
17
17
 
18
- gem.add_development_dependency('rspec', ['~> 2.8.0'])
19
- gem.add_development_dependency('rake', '< 11.0')
18
+ gem.add_development_dependency('rspec', ['~> 3.9.0'])
19
+ gem.add_development_dependency('rake', '>= 12.3.3')
20
20
  gem.add_development_dependency('webmock')
21
21
  gem.add_dependency('mechanize', '2.7.0')
22
22
  gem.add_dependency('docopt')
@@ -23,16 +23,16 @@ describe Agent do
23
23
  to_return(read_fixture_file('list_empty.html'))
24
24
  end
25
25
 
26
- it 'should login' do
27
- @agent.should_not be_login
26
+ it 'logins' do
27
+ expect(@agent).not_to be_login
28
28
 
29
29
  @agent.login
30
30
 
31
- @agent.should be_login
31
+ expect(@agent).to be_login
32
32
  end
33
33
 
34
34
  shared_examples_for '#upload' do
35
- it 'should upload' do
35
+ it 'uploads' do
36
36
  stub_request(:post, 'https://www.printing.ne.jp/usr/web/auth/NPFL0010.seam').
37
37
  with(body: {
38
38
  'NPFL0010' => 'NPFL0010',
@@ -62,10 +62,10 @@ describe Agent do
62
62
  @agent.login
63
63
 
64
64
  code = @agent.upload(filename)
65
- code.should match(/^[0-9A-Z]{8}$/)
65
+ expect(code).to match(/^[0-9A-Z]{8}$/)
66
66
  end
67
67
 
68
- it 'should handle registration error' do
68
+ it 'handles registration error' do
69
69
  stub_request(:post, 'https://www.printing.ne.jp/usr/web/auth/NPFL0010.seam').
70
70
  with(body: {
71
71
  'NPFL0010' => 'NPFL0010',
@@ -94,12 +94,12 @@ describe Agent do
94
94
  filename = File.expand_path(pdf_filename)
95
95
  @agent.login
96
96
 
97
- lambda {
97
+ expect {
98
98
  @agent.upload(filename)
99
- }.should raise_error(RegistrationError)
99
+ }.to raise_error(RegistrationError)
100
100
  end
101
101
 
102
- it 'should handle upload error' do
102
+ it 'handles upload error' do
103
103
  stub_request(:post, 'https://www.printing.ne.jp/usr/web/auth/NPFL0010.seam').
104
104
  with(body: {
105
105
  'NPFL0010' => 'NPFL0010',
@@ -117,9 +117,9 @@ describe Agent do
117
117
  filename = File.expand_path(pdf_filename)
118
118
  @agent.login
119
119
 
120
- lambda {
120
+ expect {
121
121
  @agent.upload(filename)
122
- }.should raise_error(UploadError, 'error message')
122
+ }.to raise_error(UploadError, 'error message')
123
123
  end
124
124
  end
125
125
 
@@ -13,13 +13,13 @@ describe Options do
13
13
  context 'default' do
14
14
  it do
15
15
  form = Object.new
16
- form.should be_checked('yus-size', PAPERSIZE::A4)
17
- form.should be_checked('iro-cl', COLOR::BW)
18
- form.should be_checked('yyk-type-cl', CODE_TYPE::ALNUM)
19
- form.should be_checked('pin-num-set-fl', '0')
20
- form.should be_checked('notice-onoff', '0')
16
+ expect(form).to be_checked('yus-size', PAPERSIZE::A4)
17
+ expect(form).to be_checked('iro-cl', COLOR::BW)
18
+ expect(form).to be_checked('yyk-type-cl', CODE_TYPE::ALNUM)
19
+ expect(form).to be_checked('pin-num-set-fl', '0')
20
+ expect(form).to be_checked('notice-onoff', '0')
21
21
 
22
- form.should_not_receive(:[]=)
22
+ expect(form).not_to receive(:[]=)
23
23
 
24
24
  subject.apply(form)
25
25
  end
@@ -30,13 +30,13 @@ describe Options do
30
30
 
31
31
  it do
32
32
  form = Object.new
33
- form.should be_checked('yus-size', PAPERSIZE::A4)
34
- form.should be_checked('iro-cl', COLOR::BW)
35
- form.should be_checked('yyk-type-cl', CODE_TYPE::ALNUM)
36
- form.should be_checked('pin-num-set-fl', '1')
37
- form.should be_checked('notice-onoff', '0')
33
+ expect(form).to be_checked('yus-size', PAPERSIZE::A4)
34
+ expect(form).to be_checked('iro-cl', COLOR::BW)
35
+ expect(form).to be_checked('yyk-type-cl', CODE_TYPE::ALNUM)
36
+ expect(form).to be_checked('pin-num-set-fl', '1')
37
+ expect(form).to be_checked('notice-onoff', '0')
38
38
 
39
- form.should_receive(:[]=).with('pin-no', '0123')
39
+ expect(form).to receive(:[]=).with('pin-no', '0123')
40
40
 
41
41
  subject.apply(form)
42
42
  end
@@ -47,13 +47,13 @@ describe Options do
47
47
 
48
48
  it do
49
49
  form = Object.new
50
- form.should be_checked('yus-size', PAPERSIZE::A4)
51
- form.should be_checked('iro-cl', COLOR::BW)
52
- form.should be_checked('yyk-type-cl', CODE_TYPE::ALNUM)
53
- form.should be_checked('pin-num-set-fl', '0')
54
- form.should be_checked('notice-onoff', '1')
50
+ expect(form).to be_checked('yus-size', PAPERSIZE::A4)
51
+ expect(form).to be_checked('iro-cl', COLOR::BW)
52
+ expect(form).to be_checked('yyk-type-cl', CODE_TYPE::ALNUM)
53
+ expect(form).to be_checked('pin-num-set-fl', '0')
54
+ expect(form).to be_checked('notice-onoff', '1')
55
55
 
56
- form.should_receive(:[]=).with('mail-adr-to-tx', 'test@example.com')
56
+ expect(form).to receive(:[]=).with('mail-adr-to-tx', 'test@example.com')
57
57
 
58
58
  subject.apply(form)
59
59
  end
@@ -64,13 +64,13 @@ describe Options do
64
64
 
65
65
  it do
66
66
  form = Object.new
67
- form.should be_checked('yus-size', PAPERSIZE::B4)
68
- form.should be_checked('iro-cl', COLOR::BW)
69
- form.should be_checked('yyk-type-cl', CODE_TYPE::ALNUM)
70
- form.should be_checked('pin-num-set-fl', '0')
71
- form.should be_checked('notice-onoff', '0')
67
+ expect(form).to be_checked('yus-size', PAPERSIZE::B4)
68
+ expect(form).to be_checked('iro-cl', COLOR::BW)
69
+ expect(form).to be_checked('yyk-type-cl', CODE_TYPE::ALNUM)
70
+ expect(form).to be_checked('pin-num-set-fl', '0')
71
+ expect(form).to be_checked('notice-onoff', '0')
72
72
 
73
- form.should_not_receive(:[]=)
73
+ expect(form).not_to receive(:[]=)
74
74
 
75
75
  subject.apply(form)
76
76
  end
@@ -81,13 +81,13 @@ describe Options do
81
81
 
82
82
  it do
83
83
  form = Object.new
84
- form.should be_checked('yus-size', PAPERSIZE::A4)
85
- form.should be_checked('iro-cl', COLOR::COLOR)
86
- form.should be_checked('yyk-type-cl', CODE_TYPE::ALNUM)
87
- form.should be_checked('pin-num-set-fl', '0')
88
- form.should be_checked('notice-onoff', '0')
84
+ expect(form).to be_checked('yus-size', PAPERSIZE::A4)
85
+ expect(form).to be_checked('iro-cl', COLOR::COLOR)
86
+ expect(form).to be_checked('yyk-type-cl', CODE_TYPE::ALNUM)
87
+ expect(form).to be_checked('pin-num-set-fl', '0')
88
+ expect(form).to be_checked('notice-onoff', '0')
89
89
 
90
- form.should_not_receive(:[]=)
90
+ expect(form).not_to receive(:[]=)
91
91
 
92
92
  subject.apply(form)
93
93
  end
@@ -98,13 +98,13 @@ describe Options do
98
98
 
99
99
  it do
100
100
  form = Object.new
101
- form.should be_checked('yus-size', PAPERSIZE::A4)
102
- form.should be_checked('iro-cl', COLOR::BW)
103
- form.should be_checked('yyk-type-cl', CODE_TYPE::NUM)
104
- form.should be_checked('pin-num-set-fl', '0')
105
- form.should be_checked('notice-onoff', '0')
101
+ expect(form).to be_checked('yus-size', PAPERSIZE::A4)
102
+ expect(form).to be_checked('iro-cl', COLOR::BW)
103
+ expect(form).to be_checked('yyk-type-cl', CODE_TYPE::NUM)
104
+ expect(form).to be_checked('pin-num-set-fl', '0')
105
+ expect(form).to be_checked('notice-onoff', '0')
106
106
 
107
- form.should_not_receive(:[]=)
107
+ expect(form).not_to receive(:[]=)
108
108
 
109
109
  subject.apply(form)
110
110
  end
@@ -123,14 +123,14 @@ describe Options do
123
123
 
124
124
  it do
125
125
  form = Object.new
126
- form.should be_checked('yus-size', PAPERSIZE::B5)
127
- form.should be_checked('iro-cl', COLOR::SELECT_WHEN_PRINT)
128
- form.should be_checked('yyk-type-cl', CODE_TYPE::NUM)
129
- form.should be_checked('pin-num-set-fl', '1')
130
- form.should be_checked('notice-onoff', '1')
131
-
132
- form.should_receive(:[]=).with('pin-no', '0987')
133
- form.should_receive(:[]=).with('mail-adr-to-tx', 'foo@example.com')
126
+ expect(form).to be_checked('yus-size', PAPERSIZE::B5)
127
+ expect(form).to be_checked('iro-cl', COLOR::SELECT_WHEN_PRINT)
128
+ expect(form).to be_checked('yyk-type-cl', CODE_TYPE::NUM)
129
+ expect(form).to be_checked('pin-num-set-fl', '1')
130
+ expect(form).to be_checked('notice-onoff', '1')
131
+
132
+ expect(form).to receive(:[]=).with('pin-no', '0987')
133
+ expect(form).to receive(:[]=).with('mail-adr-to-tx', 'foo@example.com')
134
134
 
135
135
  subject.apply(form)
136
136
  end
@@ -9,7 +9,6 @@ require 'webmock/rspec'
9
9
  #
10
10
  # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
11
11
  RSpec.configure do |config|
12
- config.treat_symbols_as_metadata_keys_with_true_values = true
13
12
  config.run_all_when_everything_filtered = true
14
13
  config.filter_run :focus
15
14
 
@@ -31,8 +30,8 @@ end
31
30
  RSpec::Matchers.define :be_checked do |name, value|
32
31
  match do |form|
33
32
  radiobutton = Object.new
34
- radiobutton.should_receive(:check)
33
+ expect(radiobutton).to receive(:check)
35
34
 
36
- form.should_receive(:radiobutton_with).with(:name => name, :value => value).and_return(radiobutton)
35
+ expect(form).to receive(:radiobutton_with).with(:name => name, :value => value).and_return(radiobutton)
37
36
  end
38
37
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: netprint
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - youpy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-26 00:00:00.000000000 Z
11
+ date: 2020-09-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 2.8.0
19
+ version: 3.9.0
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 2.8.0
26
+ version: 3.9.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
- version: '11.0'
33
+ version: 12.3.3
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
- version: '11.0'
40
+ version: 12.3.3
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: webmock
43
43
  requirement: !ruby/object:Gem::Requirement