hellosign-ruby-sdk 3.5.2 → 3.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hello_sign/api/template.rb +10 -1
- data/lib/hello_sign/version.rb +1 -1
- data/spec/hello_sign/api/template_spec.rb +35 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a7f3cb1c1abd39eaa31cce9e3ac17aef2755e9e0
|
4
|
+
data.tar.gz: 0b02b55dbbd23121f14e007ff1a43176f686c242
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d80be82243cbdbae5e7584e655bd83aba2cab845532b6f2b03a1300895041222941d424cd8090b3d780210fcfb8498acb3390ca7901563d31b891ae8cc5946f3
|
7
|
+
data.tar.gz: 2d46c00fc225726638121887a4020eb1d17cf554828f0f3e16e37c6c263c59a9ebd01d850298401cc56f0bac4945219bd5917315bb2fd1b8106a9e96b3bd1695
|
@@ -159,7 +159,16 @@ module HelloSign
|
|
159
159
|
end
|
160
160
|
|
161
161
|
def get_template_files(opts)
|
162
|
-
|
162
|
+
path = "/template/files/#{opts[:template_id]}"
|
163
|
+
if opts[:file_type]
|
164
|
+
path = path + "?file_type=#{opts[:file_type]}"
|
165
|
+
end
|
166
|
+
if opts[:get_url]
|
167
|
+
separator = opts[:file_type].nil? ? '?' : '&'
|
168
|
+
path = path + "#{separator}get_url=#{opts[:get_url]}"
|
169
|
+
end
|
170
|
+
|
171
|
+
get(path)
|
163
172
|
end
|
164
173
|
|
165
174
|
def update_template_files(opts)
|
data/lib/hello_sign/version.rb
CHANGED
@@ -84,6 +84,41 @@ describe HelloSign::Api::Template do
|
|
84
84
|
end
|
85
85
|
end
|
86
86
|
|
87
|
+
describe '#get_template_files with options' do
|
88
|
+
describe ':get_url' do
|
89
|
+
before do
|
90
|
+
stub_get('/template/files/1?get_url=true', 'file')
|
91
|
+
@files = HelloSign.get_template_files :template_id => 1, :get_url => true
|
92
|
+
end
|
93
|
+
|
94
|
+
it 'should get the correct resource' do
|
95
|
+
expect(a_get('/template/files/1?get_url=true')).to have_been_made
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
describe ':file_type' do
|
100
|
+
before do
|
101
|
+
stub_get('/template/files/1?file_type=pdf', 'file')
|
102
|
+
@files = HelloSign.get_template_files :template_id => 1, :file_type => 'pdf'
|
103
|
+
end
|
104
|
+
|
105
|
+
it 'should get the correct resource' do
|
106
|
+
expect(a_get('/template/files/1?file_type=pdf')).to have_been_made
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
110
|
+
describe ':file_type and :get_url' do
|
111
|
+
before do
|
112
|
+
stub_get('/template/files/1?file_type=pdf&get_url=true', 'file')
|
113
|
+
@files = HelloSign.get_template_files :template_id => 1, :file_type => 'pdf', :get_url => true
|
114
|
+
end
|
115
|
+
|
116
|
+
it 'should get the correct resource' do
|
117
|
+
expect(a_get('/template/files/1?file_type=pdf&get_url=true')).to have_been_made
|
118
|
+
end
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
87
122
|
describe '#update_template_files' do
|
88
123
|
before do
|
89
124
|
stub_post('/template/update_files/1', 'template')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hellosign-ruby-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.5.
|
4
|
+
version: 3.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- HelloSign
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-11-
|
11
|
+
date: 2017-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|