groupdocs 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (130) hide show
  1. data/CHANGELOG.md +41 -0
  2. data/examples/README.md +2 -3
  3. data/examples/api-samples/Gemfile +5 -0
  4. data/examples/api-samples/Gemfile.lock +27 -0
  5. data/examples/api-samples/README.md +12 -0
  6. data/examples/api-samples/app.rb +17 -0
  7. data/examples/api-samples/public/css/style.css +166 -0
  8. data/examples/api-samples/samples/sample1.rb +17 -0
  9. data/examples/api-samples/samples/sample10.rb +36 -0
  10. data/examples/api-samples/samples/sample2.rb +19 -0
  11. data/examples/api-samples/samples/sample3.rb +23 -0
  12. data/examples/api-samples/samples/sample4.rb +31 -0
  13. data/examples/api-samples/samples/sample5.rb +44 -0
  14. data/examples/api-samples/samples/sample6.rb +3 -0
  15. data/examples/api-samples/samples/sample7.rb +33 -0
  16. data/examples/api-samples/samples/sample8.rb +40 -0
  17. data/examples/api-samples/samples/sample9.rb +22 -0
  18. data/examples/api-samples/views/index.haml +23 -0
  19. data/examples/api-samples/views/layout.haml +7 -0
  20. data/examples/api-samples/views/sample1.haml +71 -0
  21. data/examples/api-samples/views/sample10.haml +69 -0
  22. data/examples/api-samples/views/sample2.haml +59 -0
  23. data/examples/api-samples/views/sample3.haml +62 -0
  24. data/examples/api-samples/views/sample4.haml +58 -0
  25. data/examples/api-samples/views/sample5.haml +62 -0
  26. data/examples/api-samples/views/sample6.haml +145 -0
  27. data/examples/api-samples/views/sample7.haml +59 -0
  28. data/examples/api-samples/views/sample8.haml +75 -0
  29. data/examples/api-samples/views/sample9.haml +61 -0
  30. data/examples/{annotations → viewer}/Gemfile +0 -0
  31. data/examples/viewer/app.rb +52 -0
  32. data/groupdocs.gemspec +5 -4
  33. data/lib/groupdocs/api.rb +1 -0
  34. data/lib/groupdocs/api/entity.rb +2 -0
  35. data/lib/groupdocs/api/helpers.rb +2 -0
  36. data/lib/groupdocs/api/helpers/accessor_helper.rb +30 -0
  37. data/lib/groupdocs/api/helpers/mime_helper.rb +21 -0
  38. data/lib/groupdocs/api/helpers/rest_helper.rb +3 -2
  39. data/lib/groupdocs/api/request.rb +1 -3
  40. data/lib/groupdocs/datasource.rb +1 -2
  41. data/lib/groupdocs/document.rb +133 -3
  42. data/lib/groupdocs/document/annotation.rb +14 -13
  43. data/lib/groupdocs/document/annotation/reply.rb +4 -8
  44. data/lib/groupdocs/document/annotation/reviewer.rb +2 -4
  45. data/lib/groupdocs/document/field.rb +10 -8
  46. data/lib/groupdocs/document/rectangle.rb +10 -18
  47. data/lib/groupdocs/job.rb +1 -1
  48. data/lib/groupdocs/questionnaire.rb +138 -44
  49. data/lib/groupdocs/questionnaire/collector.rb +262 -0
  50. data/lib/groupdocs/questionnaire/execution.rb +93 -10
  51. data/lib/groupdocs/questionnaire/question.rb +1 -2
  52. data/lib/groupdocs/signature.rb +16 -24
  53. data/lib/groupdocs/signature/contact.rb +2 -4
  54. data/lib/groupdocs/signature/envelope.rb +3 -6
  55. data/lib/groupdocs/signature/envelope/log.rb +2 -4
  56. data/lib/groupdocs/signature/field.rb +21 -42
  57. data/lib/groupdocs/signature/field/location.rb +18 -36
  58. data/lib/groupdocs/signature/form.rb +9 -18
  59. data/lib/groupdocs/signature/list.rb +1 -2
  60. data/lib/groupdocs/signature/recipient.rb +3 -6
  61. data/lib/groupdocs/signature/role.rb +4 -8
  62. data/lib/groupdocs/signature/shared/entity_fields.rb +12 -20
  63. data/lib/groupdocs/signature/template.rb +1 -2
  64. data/lib/groupdocs/storage/file.rb +3 -1
  65. data/lib/groupdocs/storage/folder.rb +7 -1
  66. data/lib/groupdocs/subscription.rb +6 -12
  67. data/lib/groupdocs/subscription/limit.rb +4 -8
  68. data/lib/groupdocs/user.rb +3 -6
  69. data/lib/groupdocs/version.rb +1 -1
  70. data/spec/groupdocs/api/helpers/accessor_helper_spec.rb +16 -0
  71. data/spec/groupdocs/api/helpers/mime_helper_spec.rb +16 -0
  72. data/spec/groupdocs/api/helpers/rest_helper_spec.rb +4 -0
  73. data/spec/groupdocs/api/request_spec.rb +3 -5
  74. data/spec/groupdocs/datasource/field_spec.rb +3 -6
  75. data/spec/groupdocs/datasource_spec.rb +8 -15
  76. data/spec/groupdocs/document/annotation/reply_spec.rb +13 -24
  77. data/spec/groupdocs/document/annotation/reviewer_spec.rb +5 -9
  78. data/spec/groupdocs/document/annotation_spec.rb +35 -40
  79. data/spec/groupdocs/document/change_spec.rb +6 -11
  80. data/spec/groupdocs/document/field_spec.rb +13 -13
  81. data/spec/groupdocs/document/metadata_spec.rb +5 -10
  82. data/spec/groupdocs/document/rectangle_spec.rb +6 -18
  83. data/spec/groupdocs/document/view_spec.rb +3 -6
  84. data/spec/groupdocs/document_spec.rb +123 -10
  85. data/spec/groupdocs/job_spec.rb +9 -18
  86. data/spec/groupdocs/questionnaire/collector_spec.rb +201 -0
  87. data/spec/groupdocs/questionnaire/execution_spec.rb +91 -23
  88. data/spec/groupdocs/questionnaire/page_spec.rb +3 -6
  89. data/spec/groupdocs/questionnaire/question/answer_spec.rb +2 -4
  90. data/spec/groupdocs/questionnaire/question_spec.rb +7 -14
  91. data/spec/groupdocs/questionnaire_spec.rb +117 -41
  92. data/spec/groupdocs/signature/contact_spec.rb +9 -17
  93. data/spec/groupdocs/signature/envelope/log_spec.rb +8 -16
  94. data/spec/groupdocs/signature/envelope_spec.rb +9 -17
  95. data/spec/groupdocs/signature/field/location_spec.rb +32 -65
  96. data/spec/groupdocs/signature/field_spec.rb +48 -95
  97. data/spec/groupdocs/signature/form_spec.rb +22 -43
  98. data/spec/groupdocs/signature/list_spec.rb +6 -11
  99. data/spec/groupdocs/signature/recipient_spec.rb +11 -22
  100. data/spec/groupdocs/signature/role_spec.rb +11 -21
  101. data/spec/groupdocs/signature/template_spec.rb +2 -4
  102. data/spec/groupdocs/signature_spec.rb +28 -54
  103. data/spec/groupdocs/storage/file_spec.rb +14 -26
  104. data/spec/groupdocs/storage/folder_spec.rb +16 -22
  105. data/spec/groupdocs/storage/package_spec.rb +2 -4
  106. data/spec/groupdocs/subscription/limit_spec.rb +8 -16
  107. data/spec/groupdocs/subscription_spec.rb +11 -22
  108. data/spec/groupdocs/user_spec.rb +21 -41
  109. data/spec/groupdocs_spec.rb +4 -8
  110. data/spec/spec_helper.rb +12 -0
  111. data/spec/support/files/signature.png +0 -0
  112. data/spec/support/json/annotation_list.json +6 -6
  113. data/spec/support/json/comparison_changes.json +8 -8
  114. data/spec/support/json/document_fields.json +8 -8
  115. data/spec/support/json/document_page_images_get.json +20 -0
  116. data/spec/support/json/questionnaire_collector.json +17 -0
  117. data/spec/support/json/questionnaire_collectors.json +38 -0
  118. data/spec/support/json/questionnaire_collectors_add.json +10 -0
  119. data/spec/support/json/questionnaire_create.json +3 -1
  120. data/spec/support/json/{questionnaire_execution_create.json → questionnaire_execution_add.json} +1 -1
  121. data/spec/support/json/questionnaire_get.json +3 -0
  122. data/spec/support/json/questionnaires_get.json +36 -18
  123. data/spec/support/json/sign_documents.json +16 -0
  124. data/spec/support/json/templates_get.json +21 -0
  125. data/spec/support/shared_examples/api/entity.rb +2 -0
  126. data/spec/support/shared_examples/api/helpers/access_mode_helper.rb +1 -2
  127. data/spec/support/shared_examples/api/helpers/status_helper.rb +1 -2
  128. data/spec/support/shared_examples/signature/shared/entity_fields.rb +22 -43
  129. metadata +82 -16
  130. data/examples/annotations/app.rb +0 -67
@@ -9,10 +9,10 @@
9
9
  "type": null,
10
10
  "rect":
11
11
  {
12
- "X": 0.8938259,
13
- "Y": 0.31941694,
14
- "Width": 0.0457534268,
15
- "Height": 0.01388945
12
+ "x": 0.8938259,
13
+ "y": 0.31941694,
14
+ "width": 0.0457534268,
15
+ "height": 0.01388945
16
16
  }
17
17
  },
18
18
  {
@@ -21,10 +21,10 @@
21
21
  "type": null,
22
22
  "rect":
23
23
  {
24
- "X": 0.8938259,
25
- "Y": 0.3497212,
26
- "Width": 0.0457534268,
27
- "Height": 0.01388945
24
+ "x": 0.8938259,
25
+ "y": 0.3497212,
26
+ "width": 0.0457534268,
27
+ "height": 0.01388945
28
28
  }
29
29
  }
30
30
  ]
@@ -0,0 +1,20 @@
1
+ {
2
+ "result":
3
+ {
4
+ "url":
5
+ [
6
+ "https://dev-api.groupdocs.com/v2.0/doc/67e9cf57a2b9da4d/files/2aefb759fbf4147bd2f86e2274635996bebf3c9787e955377868b1c8020ab1f9/pages/0/images/640x480?quality=&use_pdf=&expires=1355158605156.52&signature=wR4zYY5MtN6eVz1o8VSSRG6N9ak",
7
+ "https://dev-api.groupdocs.com/v2.0/doc/67e9cf57a2b9da4d/files/2aefb759fbf4147bd2f86e2274635996bebf3c9787e955377868b1c8020ab1f9/pages/1/images/640x480?quality=&use_pdf=&expires=1355158605156.52&signature=rQtXCaf5yztsRodtoWz2X6rAhMs",
8
+ "https://dev-api.groupdocs.com/v2.0/doc/67e9cf57a2b9da4d/files/2aefb759fbf4147bd2f86e2274635996bebf3c9787e955377868b1c8020ab1f9/pages/2/images/640x480?quality=&use_pdf=&expires=1355158605156.52&signature=1YS67yda7kBpshvYxNbl486MGYA",
9
+ "https://dev-api.groupdocs.com/v2.0/doc/67e9cf57a2b9da4d/files/2aefb759fbf4147bd2f86e2274635996bebf3c9787e955377868b1c8020ab1f9/pages/3/images/640x480?quality=&use_pdf=&expires=1355158605156.52&signature=bQPpVVSyeClYgCif3TBSYSwBHiA",
10
+ "https://dev-api.groupdocs.com/v2.0/doc/67e9cf57a2b9da4d/files/2aefb759fbf4147bd2f86e2274635996bebf3c9787e955377868b1c8020ab1f9/pages/4/images/640x480?quality=&use_pdf=&expires=1355158605156.52&signature=4cAhGQw9DOvVGdYHo6Q7q1dRZfU",
11
+ "https://dev-api.groupdocs.com/v2.0/doc/67e9cf57a2b9da4d/files/2aefb759fbf4147bd2f86e2274635996bebf3c9787e955377868b1c8020ab1f9/pages/5/images/640x480?quality=&use_pdf=&expires=1355158605156.52&signature=wafwGL5kJHjWeFIBgo2W1Me7P5U",
12
+ "https://dev-api.groupdocs.com/v2.0/doc/67e9cf57a2b9da4d/files/2aefb759fbf4147bd2f86e2274635996bebf3c9787e955377868b1c8020ab1f9/pages/6/images/640x480?quality=&use_pdf=&expires=1355158605156.52&signature=FS9ATYC3H3%2B1yclMUtKm0XgJCl0",
13
+ "https://dev-api.groupdocs.com/v2.0/doc/67e9cf57a2b9da4d/files/2aefb759fbf4147bd2f86e2274635996bebf3c9787e955377868b1c8020ab1f9/pages/7/images/640x480?quality=&use_pdf=&expires=1355158605156.52&signature=rypOYVCJT4JkfCm%2BLNfiQLy%2FlA4",
14
+ "https://dev-api.groupdocs.com/v2.0/doc/67e9cf57a2b9da4d/files/2aefb759fbf4147bd2f86e2274635996bebf3c9787e955377868b1c8020ab1f9/pages/8/images/640x480?quality=&use_pdf=&expires=1355158605156.52&signature=cm6vYShDxS9Ks1FQyDULR7K8KWA",
15
+ "https://dev-api.groupdocs.com/v2.0/doc/67e9cf57a2b9da4d/files/2aefb759fbf4147bd2f86e2274635996bebf3c9787e955377868b1c8020ab1f9/pages/9/images/640x480?quality=&use_pdf=&expires=1355158605156.52&signature=XiLKKnw0Y5sSVvueNxLZ9G8WDNI"
16
+ ]
17
+ },
18
+ "status": "Ok",
19
+ "error_message": null
20
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "result": {
3
+ "collector":
4
+ {
5
+ "id": 812,
6
+ "guid": "0aebf7e492fcf3b8da3fa95a6a877ad8",
7
+ "type": "Link",
8
+ "status": "Active",
9
+ "questionnaire_id": 17688,
10
+ "resolved_exectuions": 0,
11
+ "emails": [],
12
+ "modified": 1353432641090
13
+ }
14
+ },
15
+ "status": "Ok",
16
+ "error_message": null
17
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "result": {
3
+ "collectors": [
4
+ {
5
+ "id": 812,
6
+ "guid": "0aebf7e492fcf3b8da3fa95a6a877ad8",
7
+ "type": "Link",
8
+ "status": "Active",
9
+ "questionnaire_id": 17688,
10
+ "resolved_exectuions": 0,
11
+ "emails": null,
12
+ "modified": 1353432641090
13
+ },
14
+ {
15
+ "id": 813,
16
+ "guid": "3ac93ac53df29eb4ed62b3057a8bfd45",
17
+ "type": "Email",
18
+ "status": "Active",
19
+ "questionnaire_id": 17688,
20
+ "resolved_exectuions": 0,
21
+ "emails": null,
22
+ "modified": 1353432658200
23
+ },
24
+ {
25
+ "id": 814,
26
+ "guid": "671f1f25d103fd8c4adbb530bc633533",
27
+ "type": "Embedded",
28
+ "status": "Active",
29
+ "questionnaire_id": 17688,
30
+ "resolved_exectuions": 0,
31
+ "emails": null,
32
+ "modified": 1353432665433
33
+ }
34
+ ]
35
+ },
36
+ "status": "Ok",
37
+ "error_message": null
38
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "result":
3
+ {
4
+ "questionnaire_id": "44656ecedd3ff906",
5
+ "collector_id": 123456,
6
+ "collector_guid": "0ee8bacd"
7
+ },
8
+ "status": "Ok",
9
+ "error_message": null
10
+ }
@@ -1,7 +1,9 @@
1
1
  {
2
2
  "result":
3
3
  {
4
- "questionnaire_id": 1
4
+ "questionnaire_id": 1,
5
+ "questionnaire_guid": "a9dshf9348hrf0isdjfps",
6
+ "adjusted_name": "Name"
5
7
  },
6
8
  "status": "Ok",
7
9
  "error_message": null
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "result":
3
3
  {
4
- "questionnaire_id": 1,
4
+ "collector_id": 1,
5
5
  "execution_id": 1
6
6
  },
7
7
  "status": "Ok",
@@ -7,6 +7,9 @@
7
7
  "name": "Q1",
8
8
  "descr": "Description",
9
9
  "pages": null
10
+ },
11
+ "execution": {
12
+ "id": 1
10
13
  }
11
14
  },
12
15
  "status": "Ok",
@@ -1,22 +1,40 @@
1
1
  {
2
- "result":
3
- {
4
- "questionnaires":
5
- [
6
- {
7
- "id": 1,
8
- "name": "Q1",
9
- "descr": "Description",
10
- "pages": null
11
- },
12
- {
13
- "id": 2,
14
- "name": "Q2",
15
- "descr": "Description",
16
- "pages": null
17
- }
18
- ]
19
- },
2
+ "result": {
3
+ "questionnaires": [
4
+ {
5
+ "resolved_executions": 0,
6
+ "pages": [],
7
+ "document_ids": [
8
+ "bd2416cc0f9473d05195b784fa9cec1cc7f07d1a37795ddd84c88f5acee57b94"
9
+ ],
10
+ "id": 654,
11
+ "guid": "210C69449FC44EF0AE088D380CF91467",
12
+ "name": "Fedor",
13
+ "descr": "Ivanov",
14
+ "status": "Draft",
15
+ "assigned_questions": 0,
16
+ "total_questions": 0,
17
+ "modified": 0,
18
+ "expires": 0
19
+ },
20
+ {
21
+ "resolved_executions": 0,
22
+ "pages": [],
23
+ "document_ids": [
24
+ "bd2416cc0f9473d05195b784fa9cec1cc7f07d1a37795ddd84c88f5acee57b94"
25
+ ],
26
+ "id": 655,
27
+ "guid": "CEF6F03D4E7A43DE8486CB02CC2FCCA2",
28
+ "name": "Fedor",
29
+ "descr": "Ivanov",
30
+ "status": "Draft",
31
+ "assigned_questions": 0,
32
+ "total_questions": 0,
33
+ "modified": 0,
34
+ "expires": 0
35
+ }
36
+ ]
37
+ },
20
38
  "status": "Ok",
21
39
  "error_message": null
22
40
  }
@@ -0,0 +1,16 @@
1
+ {
2
+ "result":
3
+ {
4
+ "documents":
5
+ [
6
+ {
7
+ "documentId": "3ec366d37ea3aafe0a607a40493d9eded37276623f1a9c3080f9e1f28e18c028"
8
+ },
9
+ {
10
+ "documentId": "6cbb9ec76fb286f5a0eea1d83ed30732258e783d3a8574b44cd548cb85a58bb7"
11
+ }
12
+ ]
13
+ },
14
+ "status": "Ok",
15
+ "error_message": null
16
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "status": "Ok",
3
+ "result":
4
+ {
5
+ "templates":
6
+ [
7
+ {
8
+ "id": 1,
9
+ "guid": "fh3479hfsuohf9sdfhsoif",
10
+ "name": "document_test_one.doc",
11
+ "field_count": 1
12
+ },
13
+ {
14
+ "id": 2,
15
+ "guid": "398y9fhdsofosd8fys98shf",
16
+ "name": "document_test_two.doc",
17
+ "field_count": 3
18
+ }
19
+ ]
20
+ }
21
+ }
@@ -13,6 +13,8 @@ shared_examples_for GroupDocs::Api::Entity do
13
13
  GroupDocs::Document.any_instance.stub(file: GroupDocs::Storage::File.new)
14
14
  GroupDocs::Document::Annotation.any_instance.stub(document: GroupDocs::Document.new)
15
15
  described_class.any_instance.stub(annotation: GroupDocs::Document::Annotation.new)
16
+ when 'GroupDocs::Questionnaire::Collector'
17
+ described_class.any_instance.stub(questionnaire: GroupDocs::Questionnaire.new)
16
18
  end
17
19
  end
18
20
 
@@ -1,6 +1,5 @@
1
1
  shared_examples_for GroupDocs::Api::Helpers::AccessMode do
2
- it { should respond_to(:access) }
3
- it { should respond_to(:access=) }
2
+ it { should have_accessor(:access) }
4
3
 
5
4
  describe '#access' do
6
5
  it 'returns converted to human-readable format access mode' do
@@ -1,6 +1,5 @@
1
1
  shared_examples_for GroupDocs::Api::Helpers::Status do
2
- it { should respond_to(:status) }
3
- it { should respond_to(:status=) }
2
+ it { should have_accessor(:status) }
4
3
 
5
4
  describe '#status' do
6
5
  it 'returns converted to human-readable format status' do
@@ -1,52 +1,31 @@
1
1
  shared_examples_for GroupDocs::Signature::EntityFields do
2
2
 
3
- it { should respond_to(:id) }
4
- it { should respond_to(:id=) }
5
- it { should respond_to(:name) }
6
- it { should respond_to(:name=) }
7
- it { should respond_to(:ownerId) }
8
- it { should respond_to(:ownerId=) }
9
- it { should respond_to(:ownerGuid) }
10
- it { should respond_to(:ownerGuid=) }
11
- it { should respond_to(:reminderTime) }
12
- it { should respond_to(:reminderTime=) }
13
- it { should respond_to(:stepExpireTime) }
14
- it { should respond_to(:stepExpireTime=) }
15
- it { should respond_to(:ownerShouldSign) }
16
- it { should respond_to(:ownerShouldSign=) }
17
- it { should respond_to(:orderedSignature) }
18
- it { should respond_to(:orderedSignature=) }
19
- it { should respond_to(:emailSubject) }
20
- it { should respond_to(:emailSubject=) }
21
- it { should respond_to(:emailBody) }
22
- it { should respond_to(:emailBody=) }
23
- it { should respond_to(:documentsCount) }
24
- it { should respond_to(:documentsCount=) }
25
- it { should respond_to(:documentsPages) }
26
- it { should respond_to(:documentsPages=) }
27
- it { should respond_to(:recipients) }
28
- it { should respond_to(:recipients=) }
3
+ it { should have_accessor(:id) }
4
+ it { should have_accessor(:name) }
5
+ it { should have_accessor(:ownerId) }
6
+ it { should have_accessor(:ownerGuid) }
7
+ it { should have_accessor(:reminderTime) }
8
+ it { should have_accessor(:stepExpireTime) }
9
+ it { should have_accessor(:ownerShouldSign) }
10
+ it { should have_accessor(:orderedSignature) }
11
+ it { should have_accessor(:emailSubject) }
12
+ it { should have_accessor(:emailBody) }
13
+ it { should have_accessor(:documentsCount) }
14
+ it { should have_accessor(:documentsPages) }
15
+ it { should have_accessor(:recipients) }
29
16
 
30
- it { should have_alias(:owner_id, :ownerId) }
31
- it { should have_alias(:owner_id=, :ownerId=) }
32
- it { should have_alias(:owner_guid, :ownerGuid) }
33
- it { should have_alias(:owner_guid=, :ownerGuid=) }
34
- it { should have_alias(:reminder_time, :reminderTime) }
35
- it { should have_alias(:reminder_time=, :reminderTime=) }
36
- it { should have_alias(:step_expire_time, :stepExpireTime) }
37
- it { should have_alias(:step_expire_time=, :stepExpireTime=) }
17
+ it { should alias_accessor(:owner_id, :ownerId) }
18
+ it { should alias_accessor(:owner_guid, :ownerGuid) }
19
+ it { should alias_accessor(:reminder_time, :reminderTime) }
20
+ it { should alias_accessor(:step_expire_time, :stepExpireTime) }
38
21
  # owner_should_sign is overwritten
39
- it { should have_alias(:owner_should_sign=, :ownerShouldSign=) }
22
+ it { should have_alias(:owner_should_sign=, :ownerShouldSign=) }
40
23
  # ordered_signature is overwritten
41
24
  it { should have_alias(:ordered_signature=, :orderedSignature=) }
42
- it { should have_alias(:email_subject, :emailSubject) }
43
- it { should have_alias(:email_subject=, :emailSubject=) }
44
- it { should have_alias(:email_body, :emailBody) }
45
- it { should have_alias(:email_body=, :emailBody=) }
46
- it { should have_alias(:documents_count, :documentsCount) }
47
- it { should have_alias(:documents_count=, :documentsCount=) }
48
- it { should have_alias(:documents_pages, :documentsPages) }
49
- it { should have_alias(:documents_pages=, :documentsPages=) }
25
+ it { should alias_accessor(:email_subject, :emailSubject) }
26
+ it { should alias_accessor(:email_body, :emailBody) }
27
+ it { should alias_accessor(:documents_count, :documentsCount) }
28
+ it { should alias_accessor(:documents_pages, :documentsPages) }
50
29
 
51
30
  describe '#recipients=' do
52
31
  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.1.0
4
+ version: 1.2.0
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: 2012-11-13 00:00:00.000000000 Z
12
+ date: 2012-12-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rest-client
@@ -43,6 +43,22 @@ dependencies:
43
43
  - - ~>
44
44
  - !ruby/object:Gem::Version
45
45
  version: '1.7'
46
+ - !ruby/object:Gem::Dependency
47
+ name: mime-types
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ~>
52
+ - !ruby/object:Gem::Version
53
+ version: '1.19'
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: '1.19'
46
62
  - !ruby/object:Gem::Dependency
47
63
  name: rspec
48
64
  requirement: !ruby/object:Gem::Requirement
@@ -50,7 +66,7 @@ dependencies:
50
66
  requirements:
51
67
  - - ~>
52
68
  - !ruby/object:Gem::Version
53
- version: '2.11'
69
+ version: '2.12'
54
70
  type: :development
55
71
  prerelease: false
56
72
  version_requirements: !ruby/object:Gem::Requirement
@@ -58,7 +74,7 @@ dependencies:
58
74
  requirements:
59
75
  - - ~>
60
76
  - !ruby/object:Gem::Version
61
- version: '2.11'
77
+ version: '2.12'
62
78
  - !ruby/object:Gem::Dependency
63
79
  name: fuubar
64
80
  requirement: !ruby/object:Gem::Requirement
@@ -82,7 +98,7 @@ dependencies:
82
98
  requirements:
83
99
  - - ~>
84
100
  - !ruby/object:Gem::Version
85
- version: '0.9'
101
+ version: '10.0'
86
102
  type: :development
87
103
  prerelease: false
88
104
  version_requirements: !ruby/object:Gem::Requirement
@@ -90,7 +106,7 @@ dependencies:
90
106
  requirements:
91
107
  - - ~>
92
108
  - !ruby/object:Gem::Version
93
- version: '0.9'
109
+ version: '10.0'
94
110
  - !ruby/object:Gem::Dependency
95
111
  name: simplecov
96
112
  requirement: !ruby/object:Gem::Requirement
@@ -98,7 +114,7 @@ dependencies:
98
114
  requirements:
99
115
  - - ~>
100
116
  - !ruby/object:Gem::Version
101
- version: '0.6'
117
+ version: '0.7'
102
118
  type: :development
103
119
  prerelease: false
104
120
  version_requirements: !ruby/object:Gem::Requirement
@@ -106,7 +122,7 @@ dependencies:
106
122
  requirements:
107
123
  - - ~>
108
124
  - !ruby/object:Gem::Version
109
- version: '0.6'
125
+ version: '0.7'
110
126
  - !ruby/object:Gem::Dependency
111
127
  name: yard
112
128
  requirement: !ruby/object:Gem::Requirement
@@ -130,7 +146,7 @@ dependencies:
130
146
  requirements:
131
147
  - - ~>
132
148
  - !ruby/object:Gem::Version
133
- version: '1.8'
149
+ version: '1.9'
134
150
  type: :development
135
151
  prerelease: false
136
152
  version_requirements: !ruby/object:Gem::Requirement
@@ -138,7 +154,7 @@ dependencies:
138
154
  requirements:
139
155
  - - ~>
140
156
  - !ruby/object:Gem::Version
141
- version: '1.8'
157
+ version: '1.9'
142
158
  description: Ruby SDK for GroupDocs REST API
143
159
  email: p0deje@gmail.com
144
160
  executables: []
@@ -151,8 +167,35 @@ files:
151
167
  - README.md
152
168
  - Rakefile
153
169
  - examples/README.md
154
- - examples/annotations/Gemfile
155
- - examples/annotations/app.rb
170
+ - examples/api-samples/Gemfile
171
+ - examples/api-samples/Gemfile.lock
172
+ - examples/api-samples/README.md
173
+ - examples/api-samples/app.rb
174
+ - examples/api-samples/public/css/style.css
175
+ - examples/api-samples/samples/sample1.rb
176
+ - examples/api-samples/samples/sample10.rb
177
+ - examples/api-samples/samples/sample2.rb
178
+ - examples/api-samples/samples/sample3.rb
179
+ - examples/api-samples/samples/sample4.rb
180
+ - examples/api-samples/samples/sample5.rb
181
+ - examples/api-samples/samples/sample6.rb
182
+ - examples/api-samples/samples/sample7.rb
183
+ - examples/api-samples/samples/sample8.rb
184
+ - examples/api-samples/samples/sample9.rb
185
+ - examples/api-samples/views/index.haml
186
+ - examples/api-samples/views/layout.haml
187
+ - examples/api-samples/views/sample1.haml
188
+ - examples/api-samples/views/sample10.haml
189
+ - examples/api-samples/views/sample2.haml
190
+ - examples/api-samples/views/sample3.haml
191
+ - examples/api-samples/views/sample4.haml
192
+ - examples/api-samples/views/sample5.haml
193
+ - examples/api-samples/views/sample6.haml
194
+ - examples/api-samples/views/sample7.haml
195
+ - examples/api-samples/views/sample8.haml
196
+ - examples/api-samples/views/sample9.haml
197
+ - examples/viewer/Gemfile
198
+ - examples/viewer/app.rb
156
199
  - groupdocs.gemspec
157
200
  - lib/groupdocs.rb
158
201
  - lib/groupdocs/api.rb
@@ -160,8 +203,10 @@ files:
160
203
  - lib/groupdocs/api/helpers.rb
161
204
  - lib/groupdocs/api/helpers/access_mode_helper.rb
162
205
  - lib/groupdocs/api/helpers/access_rights_helper.rb
206
+ - lib/groupdocs/api/helpers/accessor_helper.rb
163
207
  - lib/groupdocs/api/helpers/byte_flag_helper.rb
164
208
  - lib/groupdocs/api/helpers/credentials_helper.rb
209
+ - lib/groupdocs/api/helpers/mime_helper.rb
165
210
  - lib/groupdocs/api/helpers/path_helper.rb
166
211
  - lib/groupdocs/api/helpers/rest_helper.rb
167
212
  - lib/groupdocs/api/helpers/status_helper.rb
@@ -181,6 +226,7 @@ files:
181
226
  - lib/groupdocs/errors.rb
182
227
  - lib/groupdocs/job.rb
183
228
  - lib/groupdocs/questionnaire.rb
229
+ - lib/groupdocs/questionnaire/collector.rb
184
230
  - lib/groupdocs/questionnaire/execution.rb
185
231
  - lib/groupdocs/questionnaire/page.rb
186
232
  - lib/groupdocs/questionnaire/question.rb
@@ -214,8 +260,10 @@ files:
214
260
  - spec/groupdocs/api/entity_spec.rb
215
261
  - spec/groupdocs/api/helpers/access_mode_helper_spec.rb
216
262
  - spec/groupdocs/api/helpers/access_rights_helper_spec.rb
263
+ - spec/groupdocs/api/helpers/accessor_helper_spec.rb
217
264
  - spec/groupdocs/api/helpers/byte_flag_helper_spec.rb
218
265
  - spec/groupdocs/api/helpers/credentials_helpers_spec.rb
266
+ - spec/groupdocs/api/helpers/mime_helper_spec.rb
219
267
  - spec/groupdocs/api/helpers/path_helper_spec.rb
220
268
  - spec/groupdocs/api/helpers/rest_helper_spec.rb
221
269
  - spec/groupdocs/api/helpers/status_helper_spec.rb
@@ -234,6 +282,7 @@ files:
234
282
  - spec/groupdocs/document_spec.rb
235
283
  - spec/groupdocs/errors_spec.rb
236
284
  - spec/groupdocs/job_spec.rb
285
+ - spec/groupdocs/questionnaire/collector_spec.rb
237
286
  - spec/groupdocs/questionnaire/execution_spec.rb
238
287
  - spec/groupdocs/questionnaire/page_spec.rb
239
288
  - spec/groupdocs/questionnaire/question/answer_spec.rb
@@ -261,6 +310,7 @@ files:
261
310
  - spec/spec_helper.rb
262
311
  - spec/support/files/envelope.zip
263
312
  - spec/support/files/resume.pdf
313
+ - spec/support/files/signature.png
264
314
  - spec/support/json/annotation_access_set.json
265
315
  - spec/support/json/annotation_collaborators_get.json
266
316
  - spec/support/json/annotation_collaborators_set.json
@@ -287,6 +337,7 @@ files:
287
337
  - spec/support/json/document_fields.json
288
338
  - spec/support/json/document_formats.json
289
339
  - spec/support/json/document_metadata.json
340
+ - spec/support/json/document_page_images_get.json
290
341
  - spec/support/json/document_questionnaire_create.json
291
342
  - spec/support/json/document_questionnaires.json
292
343
  - spec/support/json/document_sharers_remove.json
@@ -320,9 +371,12 @@ files:
320
371
  - spec/support/json/list_add.json
321
372
  - spec/support/json/lists_get.json
322
373
  - spec/support/json/package_create.json
374
+ - spec/support/json/questionnaire_collector.json
375
+ - spec/support/json/questionnaire_collectors.json
376
+ - spec/support/json/questionnaire_collectors_add.json
323
377
  - spec/support/json/questionnaire_create.json
324
378
  - spec/support/json/questionnaire_datasources.json
325
- - spec/support/json/questionnaire_execution_create.json
379
+ - spec/support/json/questionnaire_execution_add.json
326
380
  - spec/support/json/questionnaire_execution_status_set.json
327
381
  - spec/support/json/questionnaire_execution_update.json
328
382
  - spec/support/json/questionnaire_executions.json
@@ -330,6 +384,7 @@ files:
330
384
  - spec/support/json/questionnaire_remove.json
331
385
  - spec/support/json/questionnaire_update.json
332
386
  - spec/support/json/questionnaires_get.json
387
+ - spec/support/json/sign_documents.json
333
388
  - spec/support/json/signature_create.json
334
389
  - spec/support/json/signature_field_add.json
335
390
  - spec/support/json/signature_fields_get.json
@@ -342,6 +397,7 @@ files:
342
397
  - spec/support/json/template_get_documents.json
343
398
  - spec/support/json/template_get_recipients.json
344
399
  - spec/support/json/templates_all.json
400
+ - spec/support/json/templates_get.json
345
401
  - spec/support/json/user_profile_get.json
346
402
  - spec/support/json/user_users_get.json
347
403
  - spec/support/shared_examples/api/entity.rb
@@ -367,7 +423,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
367
423
  version: '0'
368
424
  segments:
369
425
  - 0
370
- hash: 1808565376842668139
426
+ hash: -3978014780066540379
371
427
  required_rubygems_version: !ruby/object:Gem::Requirement
372
428
  none: false
373
429
  requirements:
@@ -376,7 +432,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
376
432
  version: '0'
377
433
  segments:
378
434
  - 0
379
- hash: 1808565376842668139
435
+ hash: -3978014780066540379
380
436
  requirements: []
381
437
  rubyforge_project:
382
438
  rubygems_version: 1.8.24
@@ -387,8 +443,10 @@ test_files:
387
443
  - spec/groupdocs/api/entity_spec.rb
388
444
  - spec/groupdocs/api/helpers/access_mode_helper_spec.rb
389
445
  - spec/groupdocs/api/helpers/access_rights_helper_spec.rb
446
+ - spec/groupdocs/api/helpers/accessor_helper_spec.rb
390
447
  - spec/groupdocs/api/helpers/byte_flag_helper_spec.rb
391
448
  - spec/groupdocs/api/helpers/credentials_helpers_spec.rb
449
+ - spec/groupdocs/api/helpers/mime_helper_spec.rb
392
450
  - spec/groupdocs/api/helpers/path_helper_spec.rb
393
451
  - spec/groupdocs/api/helpers/rest_helper_spec.rb
394
452
  - spec/groupdocs/api/helpers/status_helper_spec.rb
@@ -407,6 +465,7 @@ test_files:
407
465
  - spec/groupdocs/document_spec.rb
408
466
  - spec/groupdocs/errors_spec.rb
409
467
  - spec/groupdocs/job_spec.rb
468
+ - spec/groupdocs/questionnaire/collector_spec.rb
410
469
  - spec/groupdocs/questionnaire/execution_spec.rb
411
470
  - spec/groupdocs/questionnaire/page_spec.rb
412
471
  - spec/groupdocs/questionnaire/question/answer_spec.rb
@@ -434,6 +493,7 @@ test_files:
434
493
  - spec/spec_helper.rb
435
494
  - spec/support/files/envelope.zip
436
495
  - spec/support/files/resume.pdf
496
+ - spec/support/files/signature.png
437
497
  - spec/support/json/annotation_access_set.json
438
498
  - spec/support/json/annotation_collaborators_get.json
439
499
  - spec/support/json/annotation_collaborators_set.json
@@ -460,6 +520,7 @@ test_files:
460
520
  - spec/support/json/document_fields.json
461
521
  - spec/support/json/document_formats.json
462
522
  - spec/support/json/document_metadata.json
523
+ - spec/support/json/document_page_images_get.json
463
524
  - spec/support/json/document_questionnaire_create.json
464
525
  - spec/support/json/document_questionnaires.json
465
526
  - spec/support/json/document_sharers_remove.json
@@ -493,9 +554,12 @@ test_files:
493
554
  - spec/support/json/list_add.json
494
555
  - spec/support/json/lists_get.json
495
556
  - spec/support/json/package_create.json
557
+ - spec/support/json/questionnaire_collector.json
558
+ - spec/support/json/questionnaire_collectors.json
559
+ - spec/support/json/questionnaire_collectors_add.json
496
560
  - spec/support/json/questionnaire_create.json
497
561
  - spec/support/json/questionnaire_datasources.json
498
- - spec/support/json/questionnaire_execution_create.json
562
+ - spec/support/json/questionnaire_execution_add.json
499
563
  - spec/support/json/questionnaire_execution_status_set.json
500
564
  - spec/support/json/questionnaire_execution_update.json
501
565
  - spec/support/json/questionnaire_executions.json
@@ -503,6 +567,7 @@ test_files:
503
567
  - spec/support/json/questionnaire_remove.json
504
568
  - spec/support/json/questionnaire_update.json
505
569
  - spec/support/json/questionnaires_get.json
570
+ - spec/support/json/sign_documents.json
506
571
  - spec/support/json/signature_create.json
507
572
  - spec/support/json/signature_field_add.json
508
573
  - spec/support/json/signature_fields_get.json
@@ -515,6 +580,7 @@ test_files:
515
580
  - spec/support/json/template_get_documents.json
516
581
  - spec/support/json/template_get_recipients.json
517
582
  - spec/support/json/templates_all.json
583
+ - spec/support/json/templates_get.json
518
584
  - spec/support/json/user_profile_get.json
519
585
  - spec/support/json/user_users_get.json
520
586
  - spec/support/shared_examples/api/entity.rb