netprint 0.3.0 → 0.3.1

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: d16ac44601b3ae6fe417cdecad9fd648ff4b2eab
4
- data.tar.gz: b61e0ee538d4242717299e622d111868f4db880a
3
+ metadata.gz: fd835b4a184d0da47107907c553c01f38e2c2504
4
+ data.tar.gz: a1fd1a69deb580a1076af3a1f1f36d516046f787
5
5
  SHA512:
6
- metadata.gz: de9f42792a7435eec7b54c58c78d89218e5932382804f94b9703e714c449bab5d2f371aa96408637bf4b904d71f24ab802bc9c56a47363f3104650b7adb8cea1
7
- data.tar.gz: 65652fb64c49f2334257a9a544d584e6b3e17ed4ab5fdbb5e2cec4c05af99fec30eb78d0922fe06981fc0190a7b5784ac05697827b932dc8313853d3c4868ff8
6
+ metadata.gz: 1681f849daa7029306a39edebeea971e9f8a0cfc90c15483c01ff90e4b00253a746b9b9e3c1f9c80fe508675dfb882bd25785126f800992d343c4434e479af88
7
+ data.tar.gz: ec49ee335fec0cffd88147532790adc2bdc1e881624f32ac6525668c92043a58d66898408175546dc4c8a1993a40b3c164be1b0b67fdf75b2e6c2c75f83a511c
@@ -0,0 +1,9 @@
1
+ language: ruby
2
+ before_install:
3
+ - gem update bundler
4
+ rvm:
5
+ - 1.9.3
6
+ - 2.0.0
7
+ - 2.1.0
8
+ - 2.2.0
9
+ - 2.3.0
@@ -33,4 +33,8 @@ begin
33
33
  puts code
34
34
  rescue Docopt::Exit => e
35
35
  puts e.message
36
+ rescue Netprint::UploadError => e
37
+ abort '%s: %s' % [$0, e.message]
38
+ rescue Netprint::RegistrationError => e
39
+ abort '%s: An registration error occured' % $0
36
40
  end
@@ -45,7 +45,11 @@ module Netprint
45
45
  options.apply(form)
46
46
  @page = form.submit(form.button_with(name: 'update-ow-btn'))
47
47
 
48
- raise UploadError if @page.search('//ul[@id="svErrMsg"]/li').size == 1
48
+ errors = @page.search('//ul[@id="svErrMsg"]/li')
49
+
50
+ unless errors.empty?
51
+ raise UploadError.new(errors.first.text)
52
+ end
49
53
 
50
54
  get_code
51
55
  end
@@ -1,3 +1,3 @@
1
1
  module Netprint
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
@@ -119,7 +119,7 @@ describe Agent do
119
119
 
120
120
  lambda {
121
121
  @agent.upload(filename)
122
- }.should raise_error(UploadError)
122
+ }.should raise_error(UploadError, 'error message')
123
123
  end
124
124
  end
125
125
 
@@ -222,7 +222,7 @@ Connection: close
222
222
 
223
223
  <article style="display:none" id="errMsgArea" class="xux-type-fault message-fault mt10 n-txt">
224
224
  <ul id="svErrMsg">
225
- <li>error message</li>
225
+ <li><img src="/img/xux_common_icon_24_fault.png" width="24" height="24" />error message</li>
226
226
  </ul>
227
227
  <ul id="clErrMsg">
228
228
  </ul>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: netprint
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - youpy
@@ -90,6 +90,7 @@ extra_rdoc_files: []
90
90
  files:
91
91
  - ".gitignore"
92
92
  - ".rspec"
93
+ - ".travis.yml"
93
94
  - Gemfile
94
95
  - LICENSE
95
96
  - README.md