netprint 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/bin/netprint CHANGED
@@ -12,9 +12,9 @@ Usage:
12
12
  Options:
13
13
  -h --help Show this screen.
14
14
  -v --version Show version information.
15
- -u --user=<userid:password> User account. if not specified, use ENV['NETPRINT_(USERID|PASSWORD)']
16
- -e --email=<email> Email address to notify
17
- -s --secret=<secret> Secret code
15
+ -u --user=<userid:password> User account. If not specified, ENV['NETPRINT_(USERID|PASSWORD)'] is used.
16
+ -e --email=<email> Email address to notify. If not specified, ENV['NETPRINT_EMAIL'] is used.
17
+ -s --secret=<secret> Secret code.
18
18
  EOS
19
19
 
20
20
  begin
@@ -26,7 +26,11 @@ module Netprint
26
26
  options = Options.new(options)
27
27
 
28
28
  Dir.mktmpdir do |dir|
29
- upload_filename = (Pathname(dir) + ([Time.now.to_f.to_s, Digest::MD5.hexdigest(filename).to_s].join('_'))).to_s
29
+ upload_filename = (Pathname(dir) + ([
30
+ Time.now.to_f.to_s,
31
+ Digest::MD5.hexdigest(filename).to_s,
32
+ File.basename(filename).gsub(/[^\w]+/, '') + File.extname(filename)
33
+ ].join('_'))).to_s
30
34
  cp filename, upload_filename
31
35
 
32
36
  page = mechanize.get(url.upload)
@@ -1,3 +1,3 @@
1
1
  module Netprint
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
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.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -169,7 +169,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
169
169
  version: '0'
170
170
  segments:
171
171
  - 0
172
- hash: -565048395014736693
172
+ hash: -3601402640496916733
173
173
  required_rubygems_version: !ruby/object:Gem::Requirement
174
174
  none: false
175
175
  requirements:
@@ -178,7 +178,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
178
178
  version: '0'
179
179
  segments:
180
180
  - 0
181
- hash: -565048395014736693
181
+ hash: -3601402640496916733
182
182
  requirements: []
183
183
  rubyforge_project:
184
184
  rubygems_version: 1.8.25