groupdocs 1.4.1 → 1.4.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +19 -0
- data/lib/groupdocs/document.rb +43 -3
- data/lib/groupdocs/signature/form.rb +6 -6
- data/lib/groupdocs/signature/shared/entity_fields.rb +6 -6
- data/lib/groupdocs/storage/package.rb +1 -1
- data/lib/groupdocs/version.rb +1 -1
- data/spec/groupdocs/document_spec.rb +35 -6
- data/spec/groupdocs/signature/form_spec.rb +4 -4
- data/spec/groupdocs/storage/package_spec.rb +1 -1
- data/spec/support/shared_examples/signature/shared/entity_fields.rb +4 -4
- metadata +4 -4
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,22 @@
|
|
1
|
+
## v1.4.2
|
2
|
+
|
3
|
+
**New**
|
4
|
+
|
5
|
+
* Added new `Document` attributes
|
6
|
+
|
7
|
+
**Changes**
|
8
|
+
|
9
|
+
* Fixed `Signature` attributes
|
10
|
+
* Fixed `Document` access modes
|
11
|
+
|
12
|
+
## v1.4.1
|
13
|
+
|
14
|
+
**Changes**
|
15
|
+
|
16
|
+
* Fixed file guid lookup in `Form#documents!`
|
17
|
+
* URI now can handle `[]` corrrectly
|
18
|
+
* `Package#create!` now properly handles objects in sub-directories
|
19
|
+
|
1
20
|
## v1.4
|
2
21
|
|
3
22
|
**New**
|
data/lib/groupdocs/document.rb
CHANGED
@@ -11,8 +11,9 @@ module GroupDocs
|
|
11
11
|
ACCESS_MODES = {
|
12
12
|
:private => 0,
|
13
13
|
:restricted => 1,
|
14
|
-
:
|
15
|
-
:
|
14
|
+
:public => 2,
|
15
|
+
:inherited => 254,
|
16
|
+
:denied => 255,
|
16
17
|
}
|
17
18
|
|
18
19
|
include Api::Helpers::AccessMode
|
@@ -182,6 +183,45 @@ module GroupDocs
|
|
182
183
|
attr_accessor :order
|
183
184
|
# @attr [Integer] field_count
|
184
185
|
attr_accessor :field_count
|
186
|
+
[
|
187
|
+
:news ,
|
188
|
+
:alerts ,
|
189
|
+
:support ,
|
190
|
+
:is_real_time_broadcast ,
|
191
|
+
:is_scroll_broadcast ,
|
192
|
+
:is_zoom_broadcast ,
|
193
|
+
:is_annotation_navigation_widget ,
|
194
|
+
:is_annotation_zoom_widget ,
|
195
|
+
:is_annotation_download_widget ,
|
196
|
+
:is_annotation_print_widget ,
|
197
|
+
:is_annotation_help_widget ,
|
198
|
+
:is_right_panel ,
|
199
|
+
:is_thumbnails_panel ,
|
200
|
+
:is_toolbar ,
|
201
|
+
:is_text_annotation_button ,
|
202
|
+
:is_rectangle_annotation_button ,
|
203
|
+
:is_point_annotation_button ,
|
204
|
+
:is_strikeout_annotation_button ,
|
205
|
+
:is_polyline_annotation_button ,
|
206
|
+
:is_typewriter_annotation_button ,
|
207
|
+
:is_watermark_annotation_button ,
|
208
|
+
:is_viewer_navigation_widget ,
|
209
|
+
:is_viewer_zoom_widget ,
|
210
|
+
:is_viewer_download_widget ,
|
211
|
+
:is_viewer_print_widget ,
|
212
|
+
:is_viewer_help_widget ,
|
213
|
+
].each do |option|
|
214
|
+
# @attr [Boolean] option
|
215
|
+
attr_accessor :"#{option}_enabled"
|
216
|
+
end
|
217
|
+
[
|
218
|
+
:standard_header_always ,
|
219
|
+
:annotation_document_name ,
|
220
|
+
:viewer_document_name ,
|
221
|
+
].each do |option|
|
222
|
+
# @attr [Boolean] option
|
223
|
+
attr_accessor :"is_#{option}_shown"
|
224
|
+
end
|
185
225
|
|
186
226
|
#
|
187
227
|
# Coverts passed array of attributes hash to array of GroupDocs::Storage::File.
|
@@ -708,7 +748,7 @@ module GroupDocs
|
|
708
748
|
# document_two = GroupDocs::Storage::Folder.list![1].to_document
|
709
749
|
# job = document_one.compare!(document_two)
|
710
750
|
# sleep(5) # wait for server to finish comparing
|
711
|
-
# result = job.documents
|
751
|
+
# result = job.documents![:outputs].first
|
712
752
|
# result.changes!
|
713
753
|
#
|
714
754
|
# @param [Hash] access Access credentials
|
@@ -72,10 +72,10 @@ module GroupDocs
|
|
72
72
|
attr_accessor :canParticipantDownloadForm
|
73
73
|
# @attr [Symbol] status
|
74
74
|
attr_accessor :status
|
75
|
-
# @attr [String]
|
76
|
-
attr_accessor :
|
77
|
-
# @attr [String]
|
78
|
-
attr_accessor :
|
75
|
+
# @attr [String] waterMarkText
|
76
|
+
attr_accessor :waterMarkText
|
77
|
+
# @attr [String] waterMarkImage
|
78
|
+
attr_accessor :waterMarkImage
|
79
79
|
|
80
80
|
# Human-readable accessors
|
81
81
|
alias_accessor :owner_guid, :ownerGuid
|
@@ -86,8 +86,8 @@ module GroupDocs
|
|
86
86
|
alias_accessor :documents_pages, :documentsPages
|
87
87
|
alias_accessor :participants_count, :participantsCount
|
88
88
|
alias_accessor :can_participant_download_form, :canParticipantDownloadForm
|
89
|
-
alias_accessor :
|
90
|
-
alias_accessor :
|
89
|
+
alias_accessor :water_mark_text, :waterMarkText
|
90
|
+
alias_accessor :water_mark_image, :waterMarkImage
|
91
91
|
|
92
92
|
#
|
93
93
|
# Converts status to human-readable format.
|
@@ -36,10 +36,10 @@ module GroupDocs
|
|
36
36
|
attr_accessor :documentsPages
|
37
37
|
# @attr [Array<GroupDocs::Signature::Contact>] recipients
|
38
38
|
attr_accessor :recipients
|
39
|
-
# @attr [String]
|
40
|
-
attr_accessor :
|
41
|
-
# @attr [String]
|
42
|
-
attr_accessor :
|
39
|
+
# @attr [String] waterMarkText
|
40
|
+
attr_accessor :waterMarkText
|
41
|
+
# @attr [String] waterMarkImage
|
42
|
+
attr_accessor :waterMarkImage
|
43
43
|
|
44
44
|
# Human-readable accessors
|
45
45
|
alias_accessor :owner_id, :ownerId
|
@@ -52,8 +52,8 @@ module GroupDocs
|
|
52
52
|
alias_accessor :email_body, :emailBody
|
53
53
|
alias_accessor :documents_count, :documentsCount
|
54
54
|
alias_accessor :documents_pages, :documentsPages
|
55
|
-
alias_accessor :
|
56
|
-
alias_accessor :
|
55
|
+
alias_accessor :water_mark_text, :waterMarkText
|
56
|
+
alias_accessor :water_mark_image, :waterMarkImage
|
57
57
|
|
58
58
|
#
|
59
59
|
# Converts each recipient to GroupDocs::Signature::Recipient object.
|
@@ -6,7 +6,7 @@ module GroupDocs
|
|
6
6
|
|
7
7
|
# @attr [String] name Package name
|
8
8
|
attr_accessor :name
|
9
|
-
# @attr [Array] objects Storage entities to be packed
|
9
|
+
# @attr [Array<GroupDocs::Storage::File, GroupDocs::Storage::Folder>] objects Storage entities to be packed
|
10
10
|
attr_accessor :objects
|
11
11
|
|
12
12
|
#
|
data/lib/groupdocs/version.rb
CHANGED
@@ -146,12 +146,41 @@ describe GroupDocs::Document do
|
|
146
146
|
end
|
147
147
|
end
|
148
148
|
|
149
|
-
it { should have_accessor(:file)
|
150
|
-
it { should have_accessor(:process_date)
|
151
|
-
it { should have_accessor(:outputs)
|
152
|
-
it { should have_accessor(:output_formats)
|
153
|
-
it { should have_accessor(:order)
|
154
|
-
it { should have_accessor(:field_count)
|
149
|
+
it { should have_accessor(:file) }
|
150
|
+
it { should have_accessor(:process_date) }
|
151
|
+
it { should have_accessor(:outputs) }
|
152
|
+
it { should have_accessor(:output_formats) }
|
153
|
+
it { should have_accessor(:order) }
|
154
|
+
it { should have_accessor(:field_count) }
|
155
|
+
it { should have_accessor(:news_enabled) }
|
156
|
+
it { should have_accessor(:alerts_enabled) }
|
157
|
+
it { should have_accessor(:support_enabled) }
|
158
|
+
it { should have_accessor(:is_real_time_broadcast_enabled) }
|
159
|
+
it { should have_accessor(:is_scroll_broadcast_enabled) }
|
160
|
+
it { should have_accessor(:is_zoom_broadcast_enabled) }
|
161
|
+
it { should have_accessor(:is_annotation_navigation_widget_enabled) }
|
162
|
+
it { should have_accessor(:is_annotation_zoom_widget_enabled) }
|
163
|
+
it { should have_accessor(:is_annotation_download_widget_enabled) }
|
164
|
+
it { should have_accessor(:is_annotation_print_widget_enabled) }
|
165
|
+
it { should have_accessor(:is_annotation_help_widget_enabled) }
|
166
|
+
it { should have_accessor(:is_right_panel_enabled) }
|
167
|
+
it { should have_accessor(:is_thumbnails_panel_enabled) }
|
168
|
+
it { should have_accessor(:is_toolbar_enabled) }
|
169
|
+
it { should have_accessor(:is_text_annotation_button_enabled) }
|
170
|
+
it { should have_accessor(:is_rectangle_annotation_button_enabled) }
|
171
|
+
it { should have_accessor(:is_point_annotation_button_enabled) }
|
172
|
+
it { should have_accessor(:is_strikeout_annotation_button_enabled) }
|
173
|
+
it { should have_accessor(:is_polyline_annotation_button_enabled) }
|
174
|
+
it { should have_accessor(:is_typewriter_annotation_button_enabled) }
|
175
|
+
it { should have_accessor(:is_watermark_annotation_button_enabled) }
|
176
|
+
it { should have_accessor(:is_viewer_navigation_widget_enabled) }
|
177
|
+
it { should have_accessor(:is_viewer_zoom_widget_enabled) }
|
178
|
+
it { should have_accessor(:is_viewer_download_widget_enabled) }
|
179
|
+
it { should have_accessor(:is_viewer_print_widget_enabled) }
|
180
|
+
it { should have_accessor(:is_viewer_help_widget_enabled) }
|
181
|
+
it { should have_accessor(:is_standard_header_always_shown) }
|
182
|
+
it { should have_accessor(:is_annotation_document_name_shown) }
|
183
|
+
it { should have_accessor(:is_viewer_document_name_shown) }
|
155
184
|
|
156
185
|
it { should have_alias(:access_mode=, :access_mode_set!) }
|
157
186
|
|
@@ -44,8 +44,8 @@ describe GroupDocs::Signature::Form do
|
|
44
44
|
it { should have_accessor(:fieldsInFinalFileName) }
|
45
45
|
it { should have_accessor(:canParticipantDownloadForm) }
|
46
46
|
it { should have_accessor(:status) }
|
47
|
-
it { should have_accessor(:
|
48
|
-
it { should have_accessor(:
|
47
|
+
it { should have_accessor(:waterMarkText) }
|
48
|
+
it { should have_accessor(:waterMarkImage) }
|
49
49
|
|
50
50
|
it { should alias_accessor(:owner_guid, :ownerGuid) }
|
51
51
|
it { should alias_accessor(:template_guid, :templateGuid) }
|
@@ -55,8 +55,8 @@ describe GroupDocs::Signature::Form do
|
|
55
55
|
it { should alias_accessor(:documents_pages, :documentsPages) }
|
56
56
|
it { should alias_accessor(:participants_count, :participantsCount) }
|
57
57
|
it { should alias_accessor(:can_participant_download_form, :canParticipantDownloadForm) }
|
58
|
-
it { should alias_accessor(:
|
59
|
-
it { should alias_accessor(:
|
58
|
+
it { should alias_accessor(:water_mark_text, :waterMarkText) }
|
59
|
+
it { should alias_accessor(:water_mark_image, :waterMarkImage) }
|
60
60
|
|
61
61
|
describe '#status' do
|
62
62
|
it 'converts status to human-readable format' do
|
@@ -22,7 +22,7 @@ describe GroupDocs::Storage::Package do
|
|
22
22
|
describe '#create!' do
|
23
23
|
before(:each) do
|
24
24
|
mock_api_server(load_json('package_create'))
|
25
|
-
subject.objects = [stub(:name => 'object 1')]
|
25
|
+
subject.objects = [stub(:name => 'object 1', :path => 'path 1')]
|
26
26
|
end
|
27
27
|
|
28
28
|
it 'accepts access credentials hash' do
|
@@ -13,8 +13,8 @@ shared_examples_for GroupDocs::Signature::EntityFields do
|
|
13
13
|
it { should have_accessor(:documentsCount) }
|
14
14
|
it { should have_accessor(:documentsPages) }
|
15
15
|
it { should have_accessor(:recipients) }
|
16
|
-
it { should have_accessor(:
|
17
|
-
it { should have_accessor(:
|
16
|
+
it { should have_accessor(:waterMarkText) }
|
17
|
+
it { should have_accessor(:waterMarkImage) }
|
18
18
|
|
19
19
|
it { should alias_accessor(:owner_id, :ownerId) }
|
20
20
|
it { should alias_accessor(:owner_guid, :ownerGuid) }
|
@@ -26,8 +26,8 @@ shared_examples_for GroupDocs::Signature::EntityFields do
|
|
26
26
|
it { should alias_accessor(:email_body, :emailBody) }
|
27
27
|
it { should alias_accessor(:documents_count, :documentsCount) }
|
28
28
|
it { should alias_accessor(:documents_pages, :documentsPages) }
|
29
|
-
it { should alias_accessor(:
|
30
|
-
it { should alias_accessor(:
|
29
|
+
it { should alias_accessor(:water_mark_text, :waterMarkText) }
|
30
|
+
it { should alias_accessor(:water_mark_image, :waterMarkImage) }
|
31
31
|
|
32
32
|
describe '#recipients=' do
|
33
33
|
it 'converts each recipient to GroupDocs::Signature::Recipient object if hash is passed' do
|
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.4.
|
4
|
+
version: 1.4.2
|
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: 2013-
|
12
|
+
date: 2013-05-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rest-client
|
@@ -499,7 +499,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
499
499
|
version: '0'
|
500
500
|
segments:
|
501
501
|
- 0
|
502
|
-
hash: -
|
502
|
+
hash: -2511714868888231436
|
503
503
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
504
504
|
none: false
|
505
505
|
requirements:
|
@@ -508,7 +508,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
508
508
|
version: '0'
|
509
509
|
segments:
|
510
510
|
- 0
|
511
|
-
hash: -
|
511
|
+
hash: -2511714868888231436
|
512
512
|
requirements: []
|
513
513
|
rubyforge_project:
|
514
514
|
rubygems_version: 1.8.23
|