docusign_rest 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f919e43f119e4da812e788855ad31b61b5d48a9c
4
- data.tar.gz: e94149c284bf47a1cf31e216bd82a17ccf42569c
3
+ metadata.gz: d7ee7c88d1c16ba80deb60d7741bbe49b0dde35a
4
+ data.tar.gz: b064e0c323cc0a7df7cb591d4db3b2bdcd502770
5
5
  SHA512:
6
- metadata.gz: 46711cf230ab71bdf5acfce06441957b03bc049c4fb5383d5437345b073fddc278b52760d3e1d96e8287fa9e8ef98cf5efa443fddc31c4120af24ad2f707a691
7
- data.tar.gz: fb92d207daac6710aea4b68947b8b4b08a53faf0099fe2790712f045ea1a667181c6972789f5738c87e6c7eee6b9dcd433a80f84b1b1c968ab92b9ca2c24ef41
6
+ metadata.gz: 5facd0ab399ca87eb9e995a3ef49c9dd80dc1ae1a8df847278e30e68c07cbc3caecb953e800ac2ae20b05bb1ed96081872c2bc6c7c4b572ec57be5b51ad32ec6
7
+ data.tar.gz: e819d1cbfe96ad4b5c378bf65778f304079d49c102158a071a6f33d04bd85361e7674cb742d2dd7f7c8c7c12c4a12ac1e7645f8449ede620e31ee63002c02947
data/CHANGELOG.md CHANGED
@@ -1,7 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## v0.4.1 Apr 21 2018
4
+ * Allow DocusignRest::Client#add_envelope_document to accept an I/O object vs reading a file
5
+
3
6
  ## v0.4.0 Apr 16 2018
4
- * Allow text tabs to be passed to DocusignRest::Client#add_recipient_tabs
7
+ * Allow text tabs to be passed to DocusignRest::Client#add_recipient_tabs (Tom Copeland)
5
8
 
6
9
  ## v0.3.9 Apr 12 2018
7
10
  * Handle another error condition when logging (Tom Copeland)
@@ -1671,6 +1671,8 @@ module DocusignRest
1671
1671
  # content_type - optional content type for file. Defaults to application/pdf.
1672
1672
  # file_name - optional name for file. Defaults to basename of file_path.
1673
1673
  # file_extension - optional extension for file. Defaults to extname of file_name.
1674
+ # file_io - Optional: an opened I/O stream of data (if you don't
1675
+ # want to read from a file)
1674
1676
  #
1675
1677
  # The response only returns a success or failure.
1676
1678
  def add_envelope_document(options={})
@@ -1684,7 +1686,11 @@ module DocusignRest
1684
1686
  }
1685
1687
 
1686
1688
  uri = build_uri("/accounts/#{@acct_id}/envelopes/#{options[:envelope_id]}/documents/#{options[:document_id]}")
1687
- post_body = open(options[:file_path]).read
1689
+ post_body = if options[:file_io].present?
1690
+ options[:file_io].read
1691
+ else
1692
+ open(options[:file_path]).read
1693
+ end
1688
1694
 
1689
1695
  http = initialize_net_http_ssl(uri)
1690
1696
  request = Net::HTTP::Put.new(uri.request_uri, headers(headers))
@@ -1,3 +1,3 @@
1
1
  module DocusignRest
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: docusign_rest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Kinney
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-04-16 00:00:00.000000000 Z
12
+ date: 2018-04-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: multipart-post