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 +3 -3
- data/lib/netprint/agent.rb +5 -1
- data/lib/netprint/version.rb +1 -1
- metadata +3 -3
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.
|
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
|
data/lib/netprint/agent.rb
CHANGED
@@ -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) + ([
|
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)
|
data/lib/netprint/version.rb
CHANGED
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.
|
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: -
|
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: -
|
181
|
+
hash: -3601402640496916733
|
182
182
|
requirements: []
|
183
183
|
rubyforge_project:
|
184
184
|
rubygems_version: 1.8.25
|