docusigner 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile.lock +42 -0
- data/docusigner.gemspec +2 -2
- data/lib/docusigner.rb +2 -0
- data/lib/docusigner/base.rb +2 -0
- data/lib/docusigner/profile.rb +7 -0
- data/lib/docusigner/profile_image.rb +8 -0
- data/lib/docusigner/user.rb +1 -0
- data/test/unit/user_test.rb +64 -0
- metadata +22 -27
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 0359ed0c10469219cc5cb064756e028d4550d5af
|
4
|
+
data.tar.gz: d480d25c9aa142d27fb01d8906e5db00a382cf9d
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ce50b826df44bb942e37d9654107ff7c100ce26d51514cd99132d8dcdc4f65d968e436cc943ff09ae2c139e08a3af678514cfdafd51910da66a7f7856015e4c0
|
7
|
+
data.tar.gz: 39d9dee10d6b38ea3410d659eccfc9c0a9daf2a13884c9ab963b18bd4caee393c6c9777e87412f51994d4c1d7aa2aa8017f7f9bee539999317714fc3c188d3fd
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
docusigner (0.0.1)
|
5
|
+
multipart-post
|
6
|
+
reactive_resource (>= 0.7.3)
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: http://rubygems.org/
|
10
|
+
specs:
|
11
|
+
activemodel (3.2.12)
|
12
|
+
activesupport (= 3.2.12)
|
13
|
+
builder (~> 3.0.0)
|
14
|
+
activeresource (3.2.12)
|
15
|
+
activemodel (= 3.2.12)
|
16
|
+
activesupport (= 3.2.12)
|
17
|
+
activesupport (3.2.12)
|
18
|
+
i18n (~> 0.6)
|
19
|
+
multi_json (~> 1.0)
|
20
|
+
addressable (2.3.2)
|
21
|
+
builder (3.0.4)
|
22
|
+
crack (0.3.2)
|
23
|
+
i18n (0.6.4)
|
24
|
+
multi_json (1.6.1)
|
25
|
+
multipart-post (1.2.0)
|
26
|
+
rake (10.0.3)
|
27
|
+
reactive_resource (0.7.3)
|
28
|
+
activeresource (>= 3.1)
|
29
|
+
activesupport (>= 3.1)
|
30
|
+
shoulda (2.11.3)
|
31
|
+
webmock (1.9.0)
|
32
|
+
addressable (>= 2.2.7)
|
33
|
+
crack (>= 0.1.7)
|
34
|
+
|
35
|
+
PLATFORMS
|
36
|
+
ruby
|
37
|
+
|
38
|
+
DEPENDENCIES
|
39
|
+
docusigner!
|
40
|
+
rake
|
41
|
+
shoulda
|
42
|
+
webmock
|
data/docusigner.gemspec
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "docusigner"
|
3
|
-
s.version = "0.0.
|
3
|
+
s.version = "0.0.2"
|
4
4
|
s.description = "Unofficial gem for accessing the DocuSign REST API"
|
5
5
|
s.summary = "Unofficial gem for accessing the DocuSign REST API"
|
6
|
-
s.add_dependency "reactive_resource", ">= 0.7.
|
6
|
+
s.add_dependency "reactive_resource", ">= 0.7.3"
|
7
7
|
s.add_dependency "multipart-post"
|
8
8
|
|
9
9
|
s.add_development_dependency "shoulda"
|
data/lib/docusigner.rb
CHANGED
@@ -14,6 +14,8 @@ module Docusigner
|
|
14
14
|
autoload :Folder, "docusigner/folder"
|
15
15
|
autoload :Group, "docusigner/group"
|
16
16
|
autoload :LoginInformation, "docusigner/login_information"
|
17
|
+
autoload :Profile, "docusigner/profile"
|
18
|
+
autoload :ProfileImage, "docusigner/profile_image"
|
17
19
|
autoload :Recipient, "docusigner/recipient"
|
18
20
|
autoload :Settings, "docusigner/settings"
|
19
21
|
autoload :Tab, "docusigner/tab"
|
data/lib/docusigner/base.rb
CHANGED
data/lib/docusigner/user.rb
CHANGED
@@ -0,0 +1,64 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class Docusigner::UserTest < Test::Unit::TestCase
|
4
|
+
|
5
|
+
context "an existing user" do
|
6
|
+
setup do
|
7
|
+
@user = Docusigner::User.new({
|
8
|
+
:id => 'qwer123',
|
9
|
+
:account_id => '1234-asdf'
|
10
|
+
})
|
11
|
+
end
|
12
|
+
|
13
|
+
should "be able to fetch profile information including the image" do
|
14
|
+
stub_request(:get, "https://demo.docusign.net/restapi/v2/accounts/1234-asdf/users/qwer123/profile.json")
|
15
|
+
.to_return(:body => {
|
16
|
+
"address" => {
|
17
|
+
"address1" => "String content",
|
18
|
+
"address2" => "String content",
|
19
|
+
"city" => "String content",
|
20
|
+
"country" => "String content",
|
21
|
+
"fax" => "String content",
|
22
|
+
"phone" => "String content",
|
23
|
+
"postalCode" => "String content",
|
24
|
+
"stateOrProvince" => "String content"
|
25
|
+
},
|
26
|
+
"authenticationMethods" => [{
|
27
|
+
"authenticationType" => "String content",
|
28
|
+
"lastProvider" => "String content",
|
29
|
+
"lastTimestamp" => "String content",
|
30
|
+
"totalCount" => 2147483647
|
31
|
+
}],
|
32
|
+
"companyName" => "String content",
|
33
|
+
"displayOrganizationInfo" => "String content",
|
34
|
+
"displayPersonalInfo" => "String content",
|
35
|
+
"displayProfile" => "String content",
|
36
|
+
"displayUsageHistory" => "String content",
|
37
|
+
"title" => "String content",
|
38
|
+
"usageHistory" => {
|
39
|
+
"lastSentDateTime" => "String content",
|
40
|
+
"lastSignedDateTime" => "String content",
|
41
|
+
"sentCount" => 2147483647,
|
42
|
+
"signedCount" => 2147483647
|
43
|
+
},
|
44
|
+
"userDetails" => {
|
45
|
+
"firstName" => "String content",
|
46
|
+
"lastName" => "String content",
|
47
|
+
"middleName" => "String content",
|
48
|
+
"suffixName" => "String content",
|
49
|
+
"title" => "String content",
|
50
|
+
}
|
51
|
+
}.to_json)
|
52
|
+
profile = @user.profile
|
53
|
+
assert_requested(:get, "https://demo.docusign.net/restapi/v2/accounts/1234-asdf/users/qwer123/profile.json")
|
54
|
+
|
55
|
+
stub_request(:get, "https://demo.docusign.net/restapi/v2/accounts/1234-asdf/users/qwer123/profile/image.json")
|
56
|
+
.to_return(:body => {
|
57
|
+
"url" => "http://someurl.com/"
|
58
|
+
}.to_json)
|
59
|
+
image = profile.image
|
60
|
+
assert_requested(:get, "https://demo.docusign.net/restapi/v2/accounts/1234-asdf/users/qwer123/profile/image.json")
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
end
|
metadata
CHANGED
@@ -1,78 +1,69 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: docusigner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.2
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Jeff Ching
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-03-
|
11
|
+
date: 2013-03-13 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: reactive_resource
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.7.
|
19
|
+
version: 0.7.3
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - '>='
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.7.
|
26
|
+
version: 0.7.3
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: multipart-post
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - '>='
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: '0'
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- -
|
38
|
+
- - '>='
|
44
39
|
- !ruby/object:Gem::Version
|
45
40
|
version: '0'
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: shoulda
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - '>='
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: '0'
|
54
48
|
type: :development
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- -
|
52
|
+
- - '>='
|
60
53
|
- !ruby/object:Gem::Version
|
61
54
|
version: '0'
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: webmock
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
|
-
- -
|
59
|
+
- - '>='
|
68
60
|
- !ruby/object:Gem::Version
|
69
61
|
version: '0'
|
70
62
|
type: :development
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
|
-
- -
|
66
|
+
- - '>='
|
76
67
|
- !ruby/object:Gem::Version
|
77
68
|
version: '0'
|
78
69
|
description: Unofficial gem for accessing the DocuSign REST API
|
@@ -83,6 +74,7 @@ extra_rdoc_files: []
|
|
83
74
|
files:
|
84
75
|
- .gitignore
|
85
76
|
- Gemfile
|
77
|
+
- Gemfile.lock
|
86
78
|
- README.md
|
87
79
|
- Rakefile
|
88
80
|
- docusigner.gemspec
|
@@ -100,6 +92,8 @@ files:
|
|
100
92
|
- lib/docusigner/login_information.rb
|
101
93
|
- lib/docusigner/multipart.rb
|
102
94
|
- lib/docusigner/oauth2.rb
|
95
|
+
- lib/docusigner/profile.rb
|
96
|
+
- lib/docusigner/profile_image.rb
|
103
97
|
- lib/docusigner/recipient.rb
|
104
98
|
- lib/docusigner/settings.rb
|
105
99
|
- lib/docusigner/tab.rb
|
@@ -112,29 +106,29 @@ files:
|
|
112
106
|
- test/unit/envelope_test.rb
|
113
107
|
- test/unit/login_test.rb
|
114
108
|
- test/unit/oauth_test.rb
|
109
|
+
- test/unit/user_test.rb
|
115
110
|
homepage: http://github.com/chingor13/docusigner
|
116
111
|
licenses: []
|
112
|
+
metadata: {}
|
117
113
|
post_install_message:
|
118
114
|
rdoc_options: []
|
119
115
|
require_paths:
|
120
116
|
- lib
|
121
117
|
required_ruby_version: !ruby/object:Gem::Requirement
|
122
|
-
none: false
|
123
118
|
requirements:
|
124
|
-
- -
|
119
|
+
- - '>='
|
125
120
|
- !ruby/object:Gem::Version
|
126
121
|
version: '0'
|
127
122
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
128
|
-
none: false
|
129
123
|
requirements:
|
130
|
-
- -
|
124
|
+
- - '>='
|
131
125
|
- !ruby/object:Gem::Version
|
132
126
|
version: '0'
|
133
127
|
requirements: []
|
134
128
|
rubyforge_project:
|
135
|
-
rubygems_version:
|
129
|
+
rubygems_version: 2.0.2
|
136
130
|
signing_key:
|
137
|
-
specification_version:
|
131
|
+
specification_version: 4
|
138
132
|
summary: Unofficial gem for accessing the DocuSign REST API
|
139
133
|
test_files:
|
140
134
|
- test/test.pdf
|
@@ -144,3 +138,4 @@ test_files:
|
|
144
138
|
- test/unit/envelope_test.rb
|
145
139
|
- test/unit/login_test.rb
|
146
140
|
- test/unit/oauth_test.rb
|
141
|
+
- test/unit/user_test.rb
|