signatureio 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +6 -0
- data/lib/signatureio/document.rb +5 -0
- data/lib/signatureio/version.rb +1 -1
- data/spec/signatureio/document_spec.rb +16 -1
- data/spec/signatureio/version_spec.rb +2 -2
- metadata +17 -47
data/README.md
CHANGED
@@ -35,6 +35,12 @@ Replace the url with a url of the PDF or Microsoft Word file you choose.
|
|
35
35
|
|
36
36
|
$ Signatureio::Document.retrieve("id_of_document")
|
37
37
|
|
38
|
+
### Retrive Document Pages
|
39
|
+
|
40
|
+
```bash
|
41
|
+
$ Signatureio::Document.pages("id_of_document")
|
42
|
+
```
|
43
|
+
|
38
44
|
### List Documents
|
39
45
|
|
40
46
|
$ Signatureio::Document.all
|
data/lib/signatureio/document.rb
CHANGED
@@ -13,6 +13,11 @@ module Signatureio
|
|
13
13
|
RecursiveOpenStruct.new(response.body, :recurse_over_arrays => true)
|
14
14
|
end
|
15
15
|
|
16
|
+
def self.pages(id=nil)
|
17
|
+
response = Signatureio.request.get "documents/#{id}/pages.json"
|
18
|
+
RecursiveOpenStruct.new(response.body, :recurse_over_arrays => true)
|
19
|
+
end
|
20
|
+
|
16
21
|
def self.all
|
17
22
|
response = Signatureio.request.get "documents.json"
|
18
23
|
RecursiveOpenStruct.new(response.body, :recurse_over_arrays => true)
|
data/lib/signatureio/version.rb
CHANGED
@@ -111,5 +111,20 @@ describe Signatureio::Document do
|
|
111
111
|
end
|
112
112
|
end
|
113
113
|
end
|
114
|
+
|
115
|
+
describe ".pages" do
|
116
|
+
before do
|
117
|
+
response = subject.create({:url => url})
|
118
|
+
@id = response.document.id
|
119
|
+
@response = subject.pages(@id)
|
120
|
+
end
|
121
|
+
|
122
|
+
context "default" do
|
123
|
+
it do
|
124
|
+
@response.success.should be_true
|
125
|
+
@response.pages.count.should >= 1
|
126
|
+
end
|
127
|
+
end
|
128
|
+
end
|
114
129
|
end
|
115
|
-
end
|
130
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: signatureio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-06-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: faraday
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirement: &11021100 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,15 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
25
|
-
none: false
|
26
|
-
requirements:
|
27
|
-
- - ! '>='
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: '0'
|
24
|
+
version_requirements: *11021100
|
30
25
|
- !ruby/object:Gem::Dependency
|
31
26
|
name: faraday_middleware
|
32
|
-
requirement: !ruby/object:Gem::Requirement
|
27
|
+
requirement: &11020660 !ruby/object:Gem::Requirement
|
33
28
|
none: false
|
34
29
|
requirements:
|
35
30
|
- - ! '>='
|
@@ -37,15 +32,10 @@ dependencies:
|
|
37
32
|
version: '0'
|
38
33
|
type: :runtime
|
39
34
|
prerelease: false
|
40
|
-
version_requirements:
|
41
|
-
none: false
|
42
|
-
requirements:
|
43
|
-
- - ! '>='
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
version: '0'
|
35
|
+
version_requirements: *11020660
|
46
36
|
- !ruby/object:Gem::Dependency
|
47
37
|
name: recursive-open-struct
|
48
|
-
requirement: !ruby/object:Gem::Requirement
|
38
|
+
requirement: &11020240 !ruby/object:Gem::Requirement
|
49
39
|
none: false
|
50
40
|
requirements:
|
51
41
|
- - ! '>='
|
@@ -53,15 +43,10 @@ dependencies:
|
|
53
43
|
version: '0'
|
54
44
|
type: :runtime
|
55
45
|
prerelease: false
|
56
|
-
version_requirements:
|
57
|
-
none: false
|
58
|
-
requirements:
|
59
|
-
- - ! '>='
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
46
|
+
version_requirements: *11020240
|
62
47
|
- !ruby/object:Gem::Dependency
|
63
48
|
name: pry
|
64
|
-
requirement: !ruby/object:Gem::Requirement
|
49
|
+
requirement: &11019760 !ruby/object:Gem::Requirement
|
65
50
|
none: false
|
66
51
|
requirements:
|
67
52
|
- - ! '>='
|
@@ -69,15 +54,10 @@ dependencies:
|
|
69
54
|
version: '0'
|
70
55
|
type: :development
|
71
56
|
prerelease: false
|
72
|
-
version_requirements:
|
73
|
-
none: false
|
74
|
-
requirements:
|
75
|
-
- - ! '>='
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
version: '0'
|
57
|
+
version_requirements: *11019760
|
78
58
|
- !ruby/object:Gem::Dependency
|
79
59
|
name: rake
|
80
|
-
requirement: !ruby/object:Gem::Requirement
|
60
|
+
requirement: &11019300 !ruby/object:Gem::Requirement
|
81
61
|
none: false
|
82
62
|
requirements:
|
83
63
|
- - ! '>='
|
@@ -85,15 +65,10 @@ dependencies:
|
|
85
65
|
version: '0'
|
86
66
|
type: :development
|
87
67
|
prerelease: false
|
88
|
-
version_requirements:
|
89
|
-
none: false
|
90
|
-
requirements:
|
91
|
-
- - ! '>='
|
92
|
-
- !ruby/object:Gem::Version
|
93
|
-
version: '0'
|
68
|
+
version_requirements: *11019300
|
94
69
|
- !ruby/object:Gem::Dependency
|
95
70
|
name: rspec
|
96
|
-
requirement: !ruby/object:Gem::Requirement
|
71
|
+
requirement: &11018880 !ruby/object:Gem::Requirement
|
97
72
|
none: false
|
98
73
|
requirements:
|
99
74
|
- - ! '>='
|
@@ -101,12 +76,7 @@ dependencies:
|
|
101
76
|
version: '0'
|
102
77
|
type: :development
|
103
78
|
prerelease: false
|
104
|
-
version_requirements:
|
105
|
-
none: false
|
106
|
-
requirements:
|
107
|
-
- - ! '>='
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
-
version: '0'
|
79
|
+
version_requirements: *11018880
|
110
80
|
description: Ruby bindings for the Signature.io API.
|
111
81
|
email:
|
112
82
|
- scott@scottmotte.com
|
@@ -144,7 +114,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
144
114
|
version: '0'
|
145
115
|
segments:
|
146
116
|
- 0
|
147
|
-
hash: -
|
117
|
+
hash: -2484474790272581374
|
148
118
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
149
119
|
none: false
|
150
120
|
requirements:
|
@@ -153,10 +123,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
153
123
|
version: '0'
|
154
124
|
segments:
|
155
125
|
- 0
|
156
|
-
hash: -
|
126
|
+
hash: -2484474790272581374
|
157
127
|
requirements: []
|
158
128
|
rubyforge_project:
|
159
|
-
rubygems_version: 1.8.
|
129
|
+
rubygems_version: 1.8.11
|
160
130
|
signing_key:
|
161
131
|
specification_version: 3
|
162
132
|
summary: Signature.io is the easiest way to create signable documents online. See
|