groupdocs 1.8.0 → 1.8.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## v1.8.1
2
+
3
+ **New**
4
+ * Added new attribute "email" to `Signature`
5
+
6
+ **Changes**
7
+ * `Document#sign_documents!` added new requere parameter for signer "email"
8
+
1
9
  ## v1.8.0
2
10
  **New**
3
11
 
@@ -201,7 +201,8 @@
201
201
  </div>
202
202
 
203
203
  <div class="content"><div class='highlight'><pre> signature_one = <span class="hljs-constant">GroupDocs::Signature</span>.new(<span class="hljs-symbol">name:</span> params[<span class="hljs-symbol">:fiSignature</span>][<span class="hljs-symbol">:filename</span>], <span class="hljs-symbol">image_path:</span> signature_one_path)
204
- signature_one.position = {<span class="hljs-symbol">top:</span> <span class="hljs-number">0</span>.<span class="hljs-number">83319</span>, <span class="hljs-symbol">left:</span> <span class="hljs-number">0</span>.<span class="hljs-number">72171</span>, <span class="hljs-symbol">width:</span> <span class="hljs-number">100</span>, <span class="hljs-symbol">height:</span> <span class="hljs-number">40</span>}</pre></div></div>
204
+ signature_one.position = {<span class="hljs-symbol">top:</span> <span class="hljs-number">0</span>.<span class="hljs-number">83319</span>, <span class="hljs-symbol">left:</span> <span class="hljs-number">0</span>.<span class="hljs-number">72171</span>, <span class="hljs-symbol">width:</span> <span class="hljs-number">100</span>, <span class="hljs-symbol">height:</span> <span class="hljs-number">40</span>}
205
+ signature_one.email = <span class="hljs-string">"test@email.com"</span></pre></div></div>
205
206
 
206
207
  </li>
207
208
 
@@ -85,7 +85,7 @@
85
85
 
86
86
  </div>
87
87
 
88
- <div class="content"><div class='highlight'><pre> raise <span class="hljs-string">'Please enter all required parameters'</span> <span class="hljs-keyword">if</span> settings.client_id.empty? <span class="hljs-keyword">or</span> settings.private_key.empty? <span class="hljs-keyword">or</span> settings.guid.empty? <span class="hljs-keyword">or</span> settings.email.empty?</pre></div></div>
88
+ <div class="content"><div class='highlight'><pre> raise <span class="hljs-string">'Please enter all required parameters'</span> <span class="hljs-keyword">if</span> settings.client_id.empty? <span class="hljs-keyword">or</span> settings.private_key.empty? <span class="hljs-keyword">or</span> settings.email.empty?</pre></div></div>
89
89
 
90
90
  </li>
91
91
 
@@ -159,7 +159,7 @@
159
159
  <span class="hljs-keyword">when</span> <span class="hljs-string">'guid'</span>
160
160
  file = <span class="hljs-constant">GroupDocs::Storage::File</span>.new({<span class="hljs-symbol">:guid</span> =&gt; settings.guid}).to_document.metadata!()
161
161
  file = file.last_view.document.file
162
- <span class="hljs-keyword">when</span> <span class="hljs-string">'local'</span></pre></div></div>
162
+ <span class="hljs-keyword">when</span> <span class="hljs-string">'localField'</span></pre></div></div>
163
163
 
164
164
  </li>
165
165
 
@@ -204,7 +204,7 @@
204
204
 
205
205
  </div>
206
206
 
207
- <div class="content"><div class='highlight'><pre> file = <span class="hljs-constant">GroupDocs::Storage::File</span>.upload!(filepath, {})
207
+ <div class="content"><div class='highlight'><pre> file = <span class="hljs-constant">GroupDocs::Storage::File</span>.upload!(filepath, {<span class="hljs-symbol">overrideMode:</span> <span class="hljs-number">3</span>})
208
208
  <span class="hljs-keyword">when</span> <span class="hljs-string">'url'</span>
209
209
  file = <span class="hljs-constant">GroupDocs::Storage::File</span>.upload_web!(settings.url)
210
210
  <span class="hljs-keyword">else</span>
@@ -31,7 +31,7 @@
31
31
 
32
32
  </div>
33
33
 
34
- <div class="content"><div class='highlight'><pre>get <span class="hljs-string">'/sample-16-how-to-insert-assembly-questionnaire-into-webpage'</span> <span class="hljs-keyword">do</span>
34
+ <div class="content"><div class='highlight'><pre>get <span class="hljs-string">'/sample-16-how-to-insert-Assembly-questionary-into-webpage'</span> <span class="hljs-keyword">do</span>
35
35
  haml <span class="hljs-symbol">:sample16</span>
36
36
  <span class="hljs-keyword">end</span></pre></div></div>
37
37
 
@@ -48,7 +48,7 @@
48
48
 
49
49
  </div>
50
50
 
51
- <div class="content"><div class='highlight'><pre>post <span class="hljs-string">'/sample-16-how-to-insert-assembly-questionnaire-into-webpage'</span> <span class="hljs-keyword">do</span></pre></div></div>
51
+ <div class="content"><div class='highlight'><pre>post <span class="hljs-string">'/sample-16-how-to-insert-Assembly-questionary-into-webpage'</span> <span class="hljs-keyword">do</span></pre></div></div>
52
52
 
53
53
  </li>
54
54
 
@@ -63,7 +63,9 @@
63
63
 
64
64
  </div>
65
65
 
66
- <div class="content"><div class='highlight'><pre> set <span class="hljs-symbol">:fileId</span>, params[<span class="hljs-symbol">:fileId</span>]
66
+ <div class="content"><div class='highlight'><pre> set <span class="hljs-symbol">:client_id</span>, params[<span class="hljs-symbol">:clientId</span>]
67
+ set <span class="hljs-symbol">:private_key</span>, params[<span class="hljs-symbol">:privateKey</span>]
68
+ set <span class="hljs-symbol">:fileId</span>, params[<span class="hljs-symbol">:fileId</span>]
67
69
  set <span class="hljs-symbol">:base_path</span>, params[<span class="hljs-symbol">:basePath</span>]
68
70
 
69
71
  <span class="hljs-keyword">begin</span></pre></div></div>
@@ -466,13 +466,16 @@
466
466
  <div class="content"><div class='highlight'><pre> files_list.each <span class="hljs-keyword">do</span> |element|
467
467
  <span class="hljs-keyword">if</span> element.respond_to?(<span class="hljs-string">'guid'</span>) == <span class="hljs-keyword">true</span> <span class="hljs-keyword">and</span> element.guid == settings.sourceFileId
468
468
  source_document = element
469
+ <span class="hljs-keyword">else</span>
470
+ source_document = <span class="hljs-constant">GroupDocs::Storage::File</span>.new(<span class="hljs-symbol">guid:</span> settings.sourceFileId)
469
471
  <span class="hljs-keyword">end</span>
470
472
  <span class="hljs-keyword">if</span> element.respond_to?(<span class="hljs-string">'guid'</span>) == <span class="hljs-keyword">true</span> <span class="hljs-keyword">and</span> element.guid == settings.targetFileId
471
473
  target_document = element
474
+ <span class="hljs-keyword">else</span>
475
+ target_document = <span class="hljs-constant">GroupDocs::Storage::File</span>.new(<span class="hljs-symbol">guid:</span> settings.targetFileId)
472
476
  <span class="hljs-keyword">end</span>
473
477
  <span class="hljs-keyword">end</span>
474
478
 
475
-
476
479
  <span class="hljs-keyword">unless</span> source_document.instance_of? <span class="hljs-constant">String</span> <span class="hljs-keyword">and</span> target_document.instance_of? <span class="hljs-constant">String</span>
477
480
 
478
481
  info = source_document.to_document.compare!(target_document.to_document, settings.callback)
@@ -529,7 +532,8 @@
529
532
 
530
533
  </div>
531
534
 
532
- <div class="content"><div class='highlight'><pre> guid = documents[<span class="hljs-symbol">:outputs</span>].first.file.guid</pre></div></div>
535
+ <div class="content"><div class='highlight'><pre> guid = documents[<span class="hljs-symbol">:outputs</span>].first.file.guid
536
+ embedkey = <span class="hljs-constant">GroupDocs::User</span>.get_embed_key!(<span class="hljs-string">'comparison'</span>)</pre></div></div>
533
537
 
534
538
  </li>
535
539
 
@@ -544,7 +548,7 @@
544
548
 
545
549
  </div>
546
550
 
547
- <div class="content"><div class='highlight'><pre> iframe = <span class="hljs-string">"/document-viewer/embed/<span class="hljs-subst">#{guid}</span>"</span></pre></div></div>
551
+ <div class="content"><div class='highlight'><pre> iframe = <span class="hljs-string">"/document-comparison2/embed/<span class="hljs-subst">#{embedkey}</span>/<span class="hljs-subst">#{guid}</span>"</span></pre></div></div>
548
552
 
549
553
  </li>
550
554
 
@@ -50,7 +50,7 @@ post '/sample-5-how-to-copy-move-a-file-using-the-groupdocs-storage-api' do
50
50
  #Open file
51
51
  File.open(filepath, 'wb') { |f| f.write(params[:file][:tempfile].read) }
52
52
  #Make a request to API using client_id and private_key
53
- file = GroupDocs::Storage::File.upload!(filepath, {})
53
+ file = GroupDocs::Storage::File.upload!(filepath, {overrideMode: 3})
54
54
  when 'url'
55
55
  file = GroupDocs::Storage::File.upload_web!(settings.url)
56
56
  else
@@ -71,7 +71,7 @@ post '/sample-5-how-to-copy-move-a-file-using-the-groupdocs-storage-api' do
71
71
 
72
72
  #Result message
73
73
  if file
74
- massage = "File was #{button}'ed to the <font color=\"blue\">#{settings.dest_path}</font> folder"
74
+ massage = "<h4><span style=\"color: green\">File was #{button}'ed to the <font color=\"blue\">#{settings.dest_path}</font> folder</span></h4>"
75
75
  end
76
76
 
77
77
  rescue Exception => e
@@ -49,6 +49,7 @@ post '/sample-6-how-to-add-a-signature-to-a-document-in-groupdocs-signature' do
49
49
  #Add signature to file using API
50
50
  signature_one = GroupDocs::Signature.new(name: params[:fiSignature][:filename], image_path: signature_one_path)
51
51
  signature_one.position = {top: 0.83319, left: 0.72171, width: 100, height: 40}
52
+ signature_one.email = "test@email.com"
52
53
 
53
54
  #Make a request to API using client_id and private_key
54
55
  signed_documents = GroupDocs::Document.sign_documents!([document_one], [signature_one], {})
@@ -1,10 +1,10 @@
1
1
  #GET request
2
- get '/sample-16-how-to-insert-assembly-questionary-into-webpage' do
2
+ get '/sample-16-how-to-insert-Assembly-questionary-into-webpage' do
3
3
  haml :sample16
4
4
  end
5
5
 
6
6
  #POST request
7
- post '/sample-16-how-to-insert-assembly-questionary-into-webpage' do
7
+ post '/sample-16-how-to-insert-Assembly-questionary-into-webpage' do
8
8
  #Set variables
9
9
  set :client_id, params[:clientId]
10
10
  set :private_key, params[:privateKey]
@@ -129,13 +129,16 @@ post '/sample-19-how-to-compare-documents' do
129
129
  files_list.each do |element|
130
130
  if element.respond_to?('guid') == true and element.guid == settings.sourceFileId
131
131
  source_document = element
132
+ else
133
+ source_document = GroupDocs::Storage::File.new(guid: settings.sourceFileId)
132
134
  end
133
135
  if element.respond_to?('guid') == true and element.guid == settings.targetFileId
134
136
  target_document = element
137
+ else
138
+ target_document = GroupDocs::Storage::File.new(guid: settings.targetFileId)
135
139
  end
136
140
  end
137
141
 
138
-
139
142
  unless source_document.instance_of? String and target_document.instance_of? String
140
143
 
141
144
  info = source_document.to_document.compare!(target_document.to_document, settings.callback)
@@ -32,7 +32,7 @@
32
32
  %li
33
33
  %a{:href => '/sample-15-how-to-check-the-number-of-document\'s-views'} Sample 15 - How to check the number of document's views
34
34
  %li
35
- %a{:href => '/sample-16-how-to-insert-assembly-questionary-into-webpage'} Sample 16 - How to insert Assembly questionary into webpage
35
+ %a{:href => '/sample-16-how-to-insert-Assembly-questionary-into-webpage'} Sample 16 - How to insert Assembly questionary into webpage
36
36
  %li
37
37
  %a{:href => '/sample-17-how-to-upload-a-file-into-the-storage-and-compress-it-into-zip-archive'} Sample 17 - How to upload a file into the storage and compress it into zip archive
38
38
  %li
@@ -37,7 +37,7 @@
37
37
  %li
38
38
  %a{:href => '/sample-15-how-to-check-the-number-of-document\'s-views'} Sample 15 - How to check the number of document's views
39
39
  %li
40
- %a{:href => '/sample-16-how-to-insert-assembly-questionary-into-webpage'} Sample 16 - How to insert Assembly questionnaire into webpage
40
+ %a{:href => '/sample-16-how-to-insert-Assembly-questionary-into-webpage'} Sample 16 - How to insert Assembly questionnaire into webpage
41
41
  %li
42
42
  %a{:href => '/sample-17-how-to-upload-a-file-into-the-storage-and-compress-it-into-zip-archive'} Sample 17 - How to upload a file into the storage and compress it into zip archive
43
43
  %li
@@ -8,7 +8,8 @@
8
8
  %br/
9
9
  Sample 5 - How to copy / move a file using the GroupDocs Storage API
10
10
  .samplecontent{:style => 'padding:10px;'}
11
- %i This sample will show how to Copy/Move particular file in your GroupDocs account using Ruby SDK
11
+ %span.documentation
12
+ %i This sample will show how to Copy/Move particular file in your GroupDocs account using Ruby SDK
12
13
  %br/
13
14
  %br/
14
15
  %span.documentation
@@ -69,8 +70,7 @@
69
70
  %br/
70
71
  %input{:name => 'copy', :type => 'submit', :value => 'Copy'}/
71
72
  %input{:name => 'move', :type => 'submit', :value => 'Move'}/
72
- %h4
73
- %span{:style => 'color: green'} #{(defined? massage) ? massage : ''}
73
+ #{(defined? massage) ? massage : ''}
74
74
  %br/
75
75
 
76
76
  = partial :_others_samples
@@ -41,7 +41,7 @@
41
41
  %div.guid_radio
42
42
  %input{:type=>'radio', :name=>'source', :value=>'guid'} File ID (GUID)
43
43
  %br/
44
- %input{:type=>'radio', :name=>'source', :value=>'localField', :checked=>'checked'}Upload local file
44
+ %input{:type=>'radio', :name=>'source', :value=>'localField', :id=>'localField', :checked=>'checked'}Upload local file
45
45
  %br/
46
46
  %input{:type=>'radio', :name=>'source', :value=>'url'} Upload file from URL
47
47
  %br/
@@ -24,7 +24,7 @@
24
24
  %br/
25
25
  #requestForm{:style => 'padding:20px; border:1px solid black;'}
26
26
  %p Enter data for request and press "Make request" button
27
- %form{:action => '/sample-16-how-to-insert-assembly-questionary-into-webpage', :method => 'post'}
27
+ %form{:action => '/sample-16-how-to-insert-Assembly-questionary-into-webpage', :method => 'post'}
28
28
  %label{:for => 'clientId'} GroupDocs ClientID
29
29
  %br/
30
30
  %input{:type=>'text', :name=>'clientId', :id => 'clientId' }
@@ -73,7 +73,9 @@ module GroupDocs
73
73
  end
74
74
  end
75
75
 
76
- #
76
+ # Changed in version 1.8.1
77
+ #
78
+ #
77
79
  # Signs given documents with signatures.
78
80
  #
79
81
  # @example
@@ -86,7 +88,9 @@ module GroupDocs
86
88
  # signature_one = GroupDocs::Signature.new(name: 'John Smith', image_path: '~/Documents/signature_one.png')
87
89
  # signature_two = GroupDocs::Signature.new(name: 'Sara Smith', image_path: '~/Documents/signature_two.png')
88
90
  # signature_one.position = { top: 0.1, left: 0.07, width: 50, height: 50 }
91
+ # signature_one.email = "test1@mail.com"
89
92
  # signature_two.position = { top: 0.2, left: 0.2, width: 100, height: 100 }
93
+ # signature_one.email = "test1@mail.com"
90
94
  # # sign documents and download results
91
95
  # signed_documents = GroupDocs::Document.sign_documents!([document_one, document_two], [signature_one, signature_two])
92
96
  # signed_documents.each do |document|
@@ -128,9 +132,11 @@ module GroupDocs
128
132
  signer.merge!(signature.position)
129
133
  # place signature on is not implemented yet
130
134
  signer.merge!(:placeSignatureOn => nil)
135
+ signer.merge!(:email => signature.email)
131
136
 
132
137
  signers << signer
133
138
 
139
+
134
140
  end
135
141
 
136
142
  json = Api::Request.new do |request|
@@ -170,6 +170,8 @@ module GroupDocs
170
170
  attr_accessor :createdTimeStamp
171
171
  # @attr [String] image_path
172
172
  attr_accessor :image_path
173
+ # @attr [String] email
174
+ attr_accessor :email
173
175
 
174
176
  # Human-readable accessors
175
177
  alias_accessor :user_guid, :userGuid
@@ -1,3 +1,3 @@
1
1
  module GroupDocs
2
- VERSION = '1.8.0'
2
+ VERSION = '1.8.1'
3
3
  end # GroupDocs
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: groupdocs
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.0
4
+ version: 1.8.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-10-07 00:00:00.000000000 Z
12
+ date: 2014-10-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rest-client