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
@@ -58,23 +58,15 @@ describe GroupDocs::Signature::Envelope do
58
58
  end
59
59
  end
60
60
 
61
- it { should respond_to(:creationDateTime) }
62
- it { should respond_to(:creationDateTime=) }
63
- it { should respond_to(:status) }
64
- it { should respond_to(:status=) }
65
- it { should respond_to(:statusDateTime) }
66
- it { should respond_to(:statusDateTime=) }
67
- it { should respond_to(:envelopeExpireTime) }
68
- it { should respond_to(:envelopeExpireTime=) }
69
- it { should respond_to(:status) }
70
- it { should respond_to(:status=) }
71
-
72
- it { should have_alias(:creation_date_time, :creationDateTime) }
73
- it { should have_alias(:creation_date_time=, :creationDateTime=) }
74
- it { should have_alias(:status_date_time, :statusDateTime) }
75
- it { should have_alias(:status_date_time=, :statusDateTime=) }
76
- it { should have_alias(:envelope_expire_time, :envelopeExpireTime) }
77
- it { should have_alias(:envelope_expire_time=, :envelopeExpireTime=) }
61
+ it { should have_accessor(:creationDateTime) }
62
+ it { should have_accessor(:status) }
63
+ it { should have_accessor(:statusDateTime) }
64
+ it { should have_accessor(:envelopeExpireTime) }
65
+ it { should have_accessor(:status) }
66
+
67
+ it { should alias_accessor(:creation_date_time, :creationDateTime) }
68
+ it { should alias_accessor(:status_date_time, :statusDateTime) }
69
+ it { should alias_accessor(:envelope_expire_time, :envelopeExpireTime) }
78
70
 
79
71
  describe '#status' do
80
72
  it 'converts status to human-readable format' do
@@ -4,70 +4,37 @@ describe GroupDocs::Signature::Field::Location do
4
4
 
5
5
  it_behaves_like GroupDocs::Api::Entity
6
6
 
7
- it { should respond_to(:id) }
8
- it { should respond_to(:id=) }
9
- it { should respond_to(:documentId) }
10
- it { should respond_to(:documentId=) }
11
- it { should respond_to(:fieldId) }
12
- it { should respond_to(:fieldId=) }
13
- it { should respond_to(:page) }
14
- it { should respond_to(:page=) }
15
- it { should respond_to(:locationX) }
16
- it { should respond_to(:locationX=) }
17
- it { should respond_to(:locationY) }
18
- it { should respond_to(:locationY=) }
19
- it { should respond_to(:locationWidth) }
20
- it { should respond_to(:locationWidth=) }
21
- it { should respond_to(:locationHeight) }
22
- it { should respond_to(:locationHeight=) }
23
- it { should respond_to(:fontName) }
24
- it { should respond_to(:fontName=) }
25
- it { should respond_to(:fontColor) }
26
- it { should respond_to(:fontColor=) }
27
- it { should respond_to(:fontSize) }
28
- it { should respond_to(:fontSize=) }
29
- it { should respond_to(:fontBold) }
30
- it { should respond_to(:fontBold=) }
31
- it { should respond_to(:fontItalic) }
32
- it { should respond_to(:fontItalic=) }
33
- it { should respond_to(:fontUnderline) }
34
- it { should respond_to(:fontUnderline=) }
35
-
36
- it { should have_alias(:document_id, :documentId) }
37
- it { should have_alias(:document_id=, :documentId=) }
38
- it { should have_alias(:field_id, :fieldId) }
39
- it { should have_alias(:field_id=, :fieldId=) }
40
- it { should have_alias(:location_x, :locationX) }
41
- it { should have_alias(:location_x=, :locationX=) }
42
- it { should have_alias(:x, :locationX) }
43
- it { should have_alias(:x=, :locationX=) }
44
- it { should have_alias(:location_y, :locationY) }
45
- it { should have_alias(:location_y=, :locationY=) }
46
- it { should have_alias(:y, :locationY) }
47
- it { should have_alias(:y=, :locationY=) }
48
- it { should have_alias(:location_w, :locationWidth) }
49
- it { should have_alias(:location_w=, :locationWidth=) }
50
- it { should have_alias(:location_width, :locationWidth) }
51
- it { should have_alias(:location_width=, :locationWidth=) }
52
- it { should have_alias(:w, :locationWidth) }
53
- it { should have_alias(:w=, :locationWidth=) }
54
- it { should have_alias(:location_h, :locationHeight) }
55
- it { should have_alias(:location_h=, :locationHeight=) }
56
- it { should have_alias(:location_height, :locationHeight) }
57
- it { should have_alias(:location_height=, :locationHeight=) }
58
- it { should have_alias(:h, :locationHeight) }
59
- it { should have_alias(:h=, :locationHeight=) }
60
- it { should have_alias(:font_name, :fontName) }
61
- it { should have_alias(:font_name=, :fontName=) }
62
- it { should have_alias(:font_color, :fontColor) }
63
- it { should have_alias(:font_color=, :fontColor=) }
64
- it { should have_alias(:font_size, :fontSize) }
65
- it { should have_alias(:font_size=, :fontSize=) }
66
- it { should have_alias(:font_bold, :fontBold) }
67
- it { should have_alias(:font_bold=, :fontBold=) }
68
- it { should have_alias(:font_italic, :fontItalic) }
69
- it { should have_alias(:font_italic=, :fontItalic=) }
70
- it { should have_alias(:font_underline, :fontUnderline) }
71
- it { should have_alias(:font_underline=, :fontUnderline=) }
7
+ it { should have_accessor(:id) }
8
+ it { should have_accessor(:documentId) }
9
+ it { should have_accessor(:fieldId) }
10
+ it { should have_accessor(:page) }
11
+ it { should have_accessor(:locationX) }
12
+ it { should have_accessor(:locationY) }
13
+ it { should have_accessor(:locationWidth) }
14
+ it { should have_accessor(:locationHeight) }
15
+ it { should have_accessor(:fontName) }
16
+ it { should have_accessor(:fontColor) }
17
+ it { should have_accessor(:fontSize) }
18
+ it { should have_accessor(:fontBold) }
19
+ it { should have_accessor(:fontItalic) }
20
+ it { should have_accessor(:fontUnderline) }
72
21
 
22
+ it { should alias_accessor(:document_id, :documentId) }
23
+ it { should alias_accessor(:field_id, :fieldId) }
24
+ it { should alias_accessor(:location_x, :locationX) }
25
+ it { should alias_accessor(:x, :locationX) }
26
+ it { should alias_accessor(:location_y, :locationY) }
27
+ it { should alias_accessor(:y, :locationY) }
28
+ it { should alias_accessor(:location_w, :locationWidth) }
29
+ it { should alias_accessor(:location_width, :locationWidth) }
30
+ it { should alias_accessor(:w, :locationWidth) }
31
+ it { should alias_accessor(:location_h, :locationHeight) }
32
+ it { should alias_accessor(:location_height, :locationHeight) }
33
+ it { should alias_accessor(:h, :locationHeight) }
34
+ it { should alias_accessor(:font_name, :fontName) }
35
+ it { should alias_accessor(:font_color, :fontColor) }
36
+ it { should alias_accessor(:font_size, :fontSize) }
37
+ it { should alias_accessor(:font_bold, :fontBold) }
38
+ it { should alias_accessor(:font_italic, :fontItalic) }
39
+ it { should alias_accessor(:font_underline, :fontUnderline) }
73
40
  end
@@ -28,101 +28,54 @@ describe GroupDocs::Signature::Field do
28
28
  end
29
29
  end
30
30
 
31
- it { should respond_to(:id) }
32
- it { should respond_to(:id=) }
33
- it { should respond_to(:templateId) }
34
- it { should respond_to(:templateId=) }
35
- it { should respond_to(:recipientId) }
36
- it { should respond_to(:recipientId=) }
37
- it { should respond_to(:signatureFieldId) }
38
- it { should respond_to(:signatureFieldId=) }
39
- it { should respond_to(:graphSizeW) }
40
- it { should respond_to(:graphSizeW=) }
41
- it { should respond_to(:graphSizeW) }
42
- it { should respond_to(:graphSizeW=) }
43
- it { should respond_to(:graphSizeH) }
44
- it { should respond_to(:graphSizeH=) }
45
- it { should respond_to(:graphSizeH) }
46
- it { should respond_to(:graphSizeH=) }
47
- it { should respond_to(:getDataFrom) }
48
- it { should respond_to(:getDataFrom=) }
49
- it { should respond_to(:regularExpression) }
50
- it { should respond_to(:regularExpression=) }
51
- it { should respond_to(:fontName) }
52
- it { should respond_to(:fontName=) }
53
- it { should respond_to(:fontColor) }
54
- it { should respond_to(:fontColor=) }
55
- it { should respond_to(:fontSize) }
56
- it { should respond_to(:fontSize=) }
57
- it { should respond_to(:fontBold) }
58
- it { should respond_to(:fontBold=) }
59
- it { should respond_to(:fontItalic) }
60
- it { should respond_to(:fontItalic=) }
61
- it { should respond_to(:fontUnderline) }
62
- it { should respond_to(:fontUnderline=) }
63
- it { should respond_to(:isSystem) }
64
- it { should respond_to(:isSystem=) }
65
- it { should respond_to(:fieldType) }
66
- it { should respond_to(:fieldType=) }
67
- it { should respond_to(:acceptableValues) }
68
- it { should respond_to(:acceptableValues=) }
69
- it { should respond_to(:defaultValue) }
70
- it { should respond_to(:defaultValue=) }
71
- it { should respond_to(:tooltip) }
72
- it { should respond_to(:tooltip=) }
73
- it { should respond_to(:input) }
74
- it { should respond_to(:input=) }
75
- it { should respond_to(:order) }
76
- it { should respond_to(:order=) }
77
- it { should respond_to(:textRows) }
78
- it { should respond_to(:textRows=) }
79
- it { should respond_to(:textColumns) }
80
- it { should respond_to(:textColumns=) }
81
- it { should respond_to(:location) }
82
- it { should respond_to(:location=) }
83
- it { should respond_to(:locations) }
84
- it { should respond_to(:locations=) }
85
-
86
- it { should have_alias(:template_id, :templateId) }
87
- it { should have_alias(:template_id=, :templateId=) }
88
- it { should have_alias(:recipient_id, :recipientId) }
89
- it { should have_alias(:recipient_id=, :recipientId=) }
90
- it { should have_alias(:signature_field_id, :signatureFieldId) }
91
- it { should have_alias(:signature_field_id=, :signatureFieldId=) }
92
- it { should have_alias(:graph_size_w, :graphSizeW) }
93
- it { should have_alias(:graph_size_w=, :graphSizeW=) }
94
- it { should have_alias(:graph_size_width, :graphSizeW) }
95
- it { should have_alias(:graph_size_width=, :graphSizeW=) }
96
- it { should have_alias(:graph_size_h, :graphSizeH) }
97
- it { should have_alias(:graph_size_h=, :graphSizeH=) }
98
- it { should have_alias(:graph_size_height, :graphSizeH) }
99
- it { should have_alias(:graph_size_height=, :graphSizeH=) }
100
- it { should have_alias(:get_data_from, :getDataFrom) }
101
- it { should have_alias(:get_data_from=, :getDataFrom=) }
102
- it { should have_alias(:regular_expression, :regularExpression) }
103
- it { should have_alias(:regular_expression=, :regularExpression=) }
104
- it { should have_alias(:font_name, :fontName) }
105
- it { should have_alias(:font_name=, :fontName=) }
106
- it { should have_alias(:font_color, :fontColor) }
107
- it { should have_alias(:font_color=, :fontColor=) }
108
- it { should have_alias(:font_size, :fontSize) }
109
- it { should have_alias(:font_size=, :fontSize=) }
110
- it { should have_alias(:font_bold, :fontBold) }
111
- it { should have_alias(:font_bold=, :fontBold=) }
112
- it { should have_alias(:font_italic, :fontItalic) }
113
- it { should have_alias(:font_italic=, :fontItalic=) }
114
- it { should have_alias(:font_underline, :fontUnderline) }
115
- it { should have_alias(:font_underline=, :fontUnderline=) }
116
- it { should have_alias(:is_system, :isSystem) }
117
- it { should have_alias(:is_system=, :isSystem=) }
118
- it { should have_alias(:acceptable_values, :acceptableValues) }
119
- it { should have_alias(:acceptable_values=, :acceptableValues=) }
120
- it { should have_alias(:default_value, :defaultValue) }
121
- it { should have_alias(:default_value=, :defaultValue=) }
122
- it { should have_alias(:text_rows, :textRows) }
123
- it { should have_alias(:text_rows=, :textRows=) }
124
- it { should have_alias(:text_columns, :textColumns) }
125
- it { should have_alias(:text_columns=, :textColumns=) }
31
+ it { should have_accessor(:id) }
32
+ it { should have_accessor(:templateId) }
33
+ it { should have_accessor(:recipientId) }
34
+ it { should have_accessor(:signatureFieldId) }
35
+ it { should have_accessor(:graphSizeW) }
36
+ it { should have_accessor(:graphSizeW) }
37
+ it { should have_accessor(:graphSizeH) }
38
+ it { should have_accessor(:graphSizeH) }
39
+ it { should have_accessor(:getDataFrom) }
40
+ it { should have_accessor(:regularExpression) }
41
+ it { should have_accessor(:fontName) }
42
+ it { should have_accessor(:fontColor) }
43
+ it { should have_accessor(:fontSize) }
44
+ it { should have_accessor(:fontBold) }
45
+ it { should have_accessor(:fontItalic) }
46
+ it { should have_accessor(:fontUnderline) }
47
+ it { should have_accessor(:isSystem) }
48
+ it { should have_accessor(:fieldType) }
49
+ it { should have_accessor(:acceptableValues) }
50
+ it { should have_accessor(:defaultValue) }
51
+ it { should have_accessor(:tooltip) }
52
+ it { should have_accessor(:input) }
53
+ it { should have_accessor(:order) }
54
+ it { should have_accessor(:textRows) }
55
+ it { should have_accessor(:textColumns) }
56
+ it { should have_accessor(:location) }
57
+ it { should have_accessor(:locations) }
58
+
59
+ it { should alias_accessor(:template_id, :templateId) }
60
+ it { should alias_accessor(:recipient_id, :recipientId) }
61
+ it { should alias_accessor(:signature_field_id, :signatureFieldId) }
62
+ it { should alias_accessor(:graph_size_w, :graphSizeW) }
63
+ it { should alias_accessor(:graph_size_width, :graphSizeW) }
64
+ it { should alias_accessor(:graph_size_h, :graphSizeH) }
65
+ it { should alias_accessor(:graph_size_height, :graphSizeH) }
66
+ it { should alias_accessor(:get_data_from, :getDataFrom) }
67
+ it { should alias_accessor(:regular_expression, :regularExpression) }
68
+ it { should alias_accessor(:font_name, :fontName) }
69
+ it { should alias_accessor(:font_color, :fontColor) }
70
+ it { should alias_accessor(:font_size, :fontSize) }
71
+ it { should alias_accessor(:font_bold, :fontBold) }
72
+ it { should alias_accessor(:font_italic, :fontItalic) }
73
+ it { should alias_accessor(:font_underline, :fontUnderline) }
74
+ it { should alias_accessor(:is_system, :isSystem) }
75
+ it { should alias_accessor(:acceptable_values, :acceptableValues) }
76
+ it { should alias_accessor(:default_value, :defaultValue) }
77
+ it { should alias_accessor(:text_rows, :textRows) }
78
+ it { should alias_accessor(:text_columns, :textColumns) }
126
79
 
127
80
  describe '#location=' do
128
81
  it 'converts location to GroupDocs::Signature::Field::Location object if hash is passed' do
@@ -30,49 +30,28 @@ describe GroupDocs::Signature::Form do
30
30
  end
31
31
  end
32
32
 
33
- it { should respond_to(:id) }
34
- it { should respond_to(:id=) }
35
- it { should respond_to(:name) }
36
- it { should respond_to(:name=) }
37
- it { should respond_to(:ownerGuid) }
38
- it { should respond_to(:ownerGuid=) }
39
- it { should respond_to(:templateGuid) }
40
- it { should respond_to(:templateGuid=) }
41
- it { should respond_to(:createdTimeStamp) }
42
- it { should respond_to(:createdTimeStamp=) }
43
- it { should respond_to(:statusDateTime) }
44
- it { should respond_to(:statusDateTime=) }
45
- it { should respond_to(:documentsCount) }
46
- it { should respond_to(:documentsCount=) }
47
- it { should respond_to(:documentsPages) }
48
- it { should respond_to(:documentsPages=) }
49
- it { should respond_to(:participantsCount) }
50
- it { should respond_to(:participantsCount=) }
51
- it { should respond_to(:fieldsInFinalFileName) }
52
- it { should respond_to(:fieldsInFinalFileName=) }
53
- it { should respond_to(:canParticipantDownloadForm) }
54
- it { should respond_to(:canParticipantDownloadForm=) }
55
- it { should respond_to(:status) }
56
- it { should respond_to(:status=) }
57
-
58
- it { should have_alias(:owner_guid, :ownerGuid) }
59
- it { should have_alias(:owner_guid=, :ownerGuid=) }
60
- it { should have_alias(:template_guid, :templateGuid) }
61
- it { should have_alias(:template_guid=, :templateGuid=) }
62
- it { should have_alias(:created_time_stamp, :createdTimeStamp) }
63
- it { should have_alias(:created_time_stamp=, :createdTimeStamp=) }
64
- it { should have_alias(:status_date_time, :statusDateTime) }
65
- it { should have_alias(:status_date_time=, :statusDateTime=) }
66
- it { should have_alias(:documents_count, :documentsCount) }
67
- it { should have_alias(:documents_count=, :documentsCount=) }
68
- it { should have_alias(:documents_pages, :documentsPages) }
69
- it { should have_alias(:documents_pages=, :documentsPages=) }
70
- it { should have_alias(:participants_count, :participantsCount) }
71
- it { should have_alias(:participants_count=, :participantsCount=) }
72
- it { should have_alias(:fields_in_final_file_name, :fieldsInFinalFileName) }
73
- it { should have_alias(:fields_in_final_file_name=, :fieldsInFinalFileName=) }
74
- it { should have_alias(:can_participant_download_form, :canParticipantDownloadForm) }
75
- it { should have_alias(:can_participant_download_form=, :canParticipantDownloadForm=) }
33
+ it { should have_accessor(:id) }
34
+ it { should have_accessor(:name) }
35
+ it { should have_accessor(:ownerGuid) }
36
+ it { should have_accessor(:templateGuid) }
37
+ it { should have_accessor(:createdTimeStamp) }
38
+ it { should have_accessor(:statusDateTime) }
39
+ it { should have_accessor(:documentsCount) }
40
+ it { should have_accessor(:documentsPages) }
41
+ it { should have_accessor(:participantsCount) }
42
+ it { should have_accessor(:fieldsInFinalFileName) }
43
+ it { should have_accessor(:canParticipantDownloadForm) }
44
+ it { should have_accessor(:status) }
45
+
46
+ it { should alias_accessor(:owner_guid, :ownerGuid) }
47
+ it { should alias_accessor(:template_guid, :templateGuid) }
48
+ it { should alias_accessor(:created_time_stamp, :createdTimeStamp) }
49
+ it { should alias_accessor(:status_date_time, :statusDateTime) }
50
+ it { should alias_accessor(:documents_count, :documentsCount) }
51
+ it { should alias_accessor(:documents_pages, :documentsPages) }
52
+ it { should alias_accessor(:participants_count, :participantsCount) }
53
+ it { should alias_accessor(:fields_in_final_file_name, :fieldsInFinalFileName) }
54
+ it { should alias_accessor(:can_participant_download_form, :canParticipantDownloadForm) }
76
55
 
77
56
  describe '#status' do
78
57
  it 'converts status to human-readable format' do
@@ -24,17 +24,12 @@ describe GroupDocs::Signature::List do
24
24
  end
25
25
  end
26
26
 
27
- it { should respond_to(:id) }
28
- it { should respond_to(:id=) }
29
- it { should respond_to(:name) }
30
- it { should respond_to(:name=) }
31
- it { should respond_to(:values) }
32
- it { should respond_to(:values=) }
33
- it { should respond_to(:defaultValue) }
34
- it { should respond_to(:defaultValue=) }
35
-
36
- it { should have_alias(:default_value, :defaultValue) }
37
- it { should have_alias(:default_value=, :defaultValue=) }
27
+ it { should have_accessor(:id) }
28
+ it { should have_accessor(:name) }
29
+ it { should have_accessor(:values) }
30
+ it { should have_accessor(:defaultValue) }
31
+
32
+ it { should alias_accessor(:default_value, :defaultValue) }
38
33
 
39
34
  describe '#values=' do
40
35
  it 'converts array of values to a string' do
@@ -4,29 +4,18 @@ describe GroupDocs::Signature::Recipient do
4
4
 
5
5
  it_behaves_like GroupDocs::Api::Entity
6
6
 
7
- it { should respond_to(:id) }
8
- it { should respond_to(:id=) }
9
- it { should respond_to(:email) }
10
- it { should respond_to(:email=) }
11
- it { should respond_to(:firstName) }
12
- it { should respond_to(:firstName=) }
13
- it { should respond_to(:lastName) }
14
- it { should respond_to(:lastName=) }
15
- it { should respond_to(:nickname) }
16
- it { should respond_to(:nickname=) }
17
- it { should respond_to(:roleId) }
18
- it { should respond_to(:roleId=) }
19
- it { should respond_to(:order) }
20
- it { should respond_to(:order=) }
21
- it { should respond_to(:status) }
22
- it { should respond_to(:status=) }
7
+ it { should have_accessor(:id) }
8
+ it { should have_accessor(:email) }
9
+ it { should have_accessor(:firstName) }
10
+ it { should have_accessor(:lastName) }
11
+ it { should have_accessor(:nickname) }
12
+ it { should have_accessor(:roleId) }
13
+ it { should have_accessor(:order) }
14
+ it { should have_accessor(:status) }
23
15
 
24
- it { should have_alias(:first_name, :firstName) }
25
- it { should have_alias(:first_name=, :firstName=) }
26
- it { should have_alias(:last_name, :lastName) }
27
- it { should have_alias(:last_name=, :lastName=) }
28
- it { should have_alias(:role_id, :roleId) }
29
- it { should have_alias(:role_id=, :roleId=) }
16
+ it { should alias_accessor(:first_name, :firstName) }
17
+ it { should alias_accessor(:last_name, :lastName) }
18
+ it { should alias_accessor(:role_id, :roleId) }
30
19
 
31
20
  describe '#status' do
32
21
  it 'converts status to human-readable format' do
@@ -28,27 +28,17 @@ describe GroupDocs::Signature::Role do
28
28
  end
29
29
  end
30
30
 
31
- it { should respond_to(:id) }
32
- it { should respond_to(:id=) }
33
- it { should respond_to(:name) }
34
- it { should respond_to(:name=) }
35
- it { should respond_to(:canEdit) }
36
- it { should respond_to(:canEdit=) }
37
- it { should respond_to(:canSign) }
38
- it { should respond_to(:canSign=) }
39
- it { should respond_to(:canAnnotate) }
40
- it { should respond_to(:canAnnotate=) }
41
- it { should respond_to(:canDelegate) }
42
- it { should respond_to(:canDelegate=) }
43
-
44
- it { should have_alias(:can_edit, :canEdit) }
45
- it { should have_alias(:can_edit=, :canEdit=) }
46
- it { should have_alias(:can_sign, :canSign) }
47
- it { should have_alias(:can_sign=, :canSign=) }
48
- it { should have_alias(:can_annotate, :canAnnotate) }
49
- it { should have_alias(:can_annotate=, :canAnnotate=) }
50
- it { should have_alias(:can_delegate, :canDelegate) }
51
- it { should have_alias(:can_delegate=, :canDelegate=) }
31
+ it { should have_accessor(:id) }
32
+ it { should have_accessor(:name) }
33
+ it { should have_accessor(:canEdit) }
34
+ it { should have_accessor(:canSign) }
35
+ it { should have_accessor(:canAnnotate) }
36
+ it { should have_accessor(:canDelegate) }
37
+
38
+ it { should alias_accessor(:can_edit, :canEdit) }
39
+ it { should alias_accessor(:can_sign, :canSign) }
40
+ it { should alias_accessor(:can_annotate, :canAnnotate) }
41
+ it { should alias_accessor(:can_delegate, :canDelegate) }
52
42
 
53
43
  describe '#can_edit?' do
54
44
  it 'returns true if role can edit' do