elibri_watermarking 0.7.4 → 0.7.4.1
Sign up to get free protection for your applications and to get access to all the features.
@@ -18,11 +18,11 @@ module ElibriWatermarking
|
|
18
18
|
self.url = url
|
19
19
|
end
|
20
20
|
|
21
|
-
def watermark(ident, formats, visible_watermark, title_postfix,
|
22
|
-
supplier = args[
|
23
|
-
client_symbol = args[
|
24
|
-
customer_ip = args[
|
25
|
-
ssl = args[
|
21
|
+
def watermark(ident, formats, visible_watermark, title_postfix, args={})
|
22
|
+
supplier = args[:supplier]
|
23
|
+
client_symbol = args[:client_symbol]
|
24
|
+
customer_ip = args[:customer_ip]
|
25
|
+
ssl = args[:ssl]
|
26
26
|
ssl = true if ssl.nil?
|
27
27
|
ident =~ /^[0-9]+$/ ? ident_type = 'isbn' : ident_type = 'record_reference'
|
28
28
|
raise WrongFormats.new if formats.is_a?(String) && !formats =~ /^(epub|mobi|pdf|,)+$/
|
@@ -148,11 +148,8 @@ module ElibriWatermarking
|
|
148
148
|
return validate_response(res)
|
149
149
|
end
|
150
150
|
|
151
|
-
def watermark_and_deliver(ident, formats, visible_watermark, title_postfix,
|
152
|
-
|
153
|
-
client_symbol = args[1]
|
154
|
-
ssl = args[2]
|
155
|
-
trans_id = watermark(ident, formats, visible_watermark, title_postfix, supplier, client_symbol, ssl)
|
151
|
+
def watermark_and_deliver(ident, formats, visible_watermark, title_postfix, args={})
|
152
|
+
trans_id = watermark(ident, formats, visible_watermark, title_postfix, args)
|
156
153
|
return trans_id if deliver(trans_id) == "OK"
|
157
154
|
end
|
158
155
|
|
metadata
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elibri_watermarking
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 101
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 7
|
9
9
|
- 4
|
10
|
-
|
10
|
+
- 1
|
11
|
+
version: 0.7.4.1
|
11
12
|
platform: ruby
|
12
13
|
authors:
|
13
14
|
- Piotr Szmielew
|