mifiel 1.1.0 → 1.1.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: 824c42905ab5539e1400765da354b7856b0867c5
4
- data.tar.gz: b14bf9cd247bcb5908a236809f7a8d2b62d9585b
3
+ metadata.gz: 257016e4e77054c3292a7e7528b1ec9b40767e8d
4
+ data.tar.gz: 0b9faa1c6348cc9c3dcf13d923c4db0d06def6cc
5
5
  SHA512:
6
- metadata.gz: c4967e263f0c34aa45c82e9771a2e3c53c9d894ff86b6cdc504a2c439c45de8e649b61966a8f905503c15af164de2128b7945ccb9d35d148b1da66d20058d0ef
7
- data.tar.gz: 98a35a5cb8eca9ec7855fb52c4e110b7a3bfb5b8068a8feb8a51cd6e10c9e966c318e53e54572784daa38bbf26ec85b2b8e52f70c71a04e77ca0fb011b98fef4
6
+ metadata.gz: f51d10e9289b7ef5fdfde4102765a8035dc930ee8f3e53abd14bbde8b6da712873155ba83e1d10253bae355291b515e34a38909595970f25aaa0a0a4b6953ccc
7
+ data.tar.gz: 2bde1b42e48e6984d020499831998574c62f68da6c4ca6edfbf4122f9ff371ee3a562e494f4dbba05f5e35a70ed153f4e43a23f8d117af89e9fbf2363083cd39
data/Gemfile CHANGED
@@ -7,8 +7,8 @@ group :development, :test do
7
7
  gem 'coveralls', require: false
8
8
  gem 'guard', '2.13.0'
9
9
  gem 'guard-rspec'
10
- # compatible with ruby 2.2.1
11
- gem 'listen', '3.1.1'
10
+ # compatible with ruby >= 1.9.3
11
+ gem 'listen', '3.0.8'
12
12
  gem 'guard-rubocop'
13
13
  gem 'terminal-notifier-guard'
14
14
  end
data/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  [![security][security-image]][security-url]
6
6
 
7
7
  Ruby SDK for [Mifiel](https://www.mifiel.com) API.
8
- Please read our [documentation](https://www.mifiel.com/api-docs/) for instructions on how to start using the API.
8
+ Please read our [documentation](http://docs.mifiel.com/) for instructions on how to start using the API.
9
9
 
10
10
  ## Installation
11
11
 
@@ -64,13 +64,18 @@ Document methods:
64
64
  ```ruby
65
65
  document = Mifiel::Document.create(
66
66
  file: 'path/to/my-file.pdf',
67
- # OR
68
- hash: Digest::SHA256.hexdigest(File.read('path/to/my-file.pdf')),
69
67
  signatories: [
70
68
  { name: 'Signer 1', email: 'signer1@email.com', tax_id: 'AAA010101AAA' },
71
69
  { name: 'Signer 2', email: 'signer2@email.com', tax_id: 'AAA010102AAA' }
72
70
  ]
73
71
  )
72
+ # if you dont want us to have the PDF, you can just send us
73
+ # the original_hash and the name of the document. Both are required
74
+ document = Mifiel::Document.create(
75
+ hash: Digest::SHA256.hexdigest(File.read('path/to/my-file.pdf')),
76
+ name: 'my-file.pdf',
77
+ signatories: [...]
78
+ )
74
79
  ```
75
80
 
76
81
  - Sign:
@@ -7,14 +7,15 @@ module Mifiel
7
7
  put :save, '/documents/:id'
8
8
  delete :delete, '/documents/:id'
9
9
 
10
- def self.create(signatories:, file: nil, hash: nil, callback_url: nil)
10
+ def self.create(signatories:, file: nil, hash: nil, name: nil, callback_url: nil)
11
11
  raise ArgumentError, 'Either file or hash must be provided' if !file && !hash
12
12
  raise ArgumentError, 'Only one of file or hash must be provided' if file && hash
13
13
  payload = {
14
14
  signatories: build_signatories(signatories),
15
15
  callback_url: callback_url,
16
16
  file: (File.new(file) if file),
17
- original_hash: hash
17
+ original_hash: hash,
18
+ name: name
18
19
  }
19
20
  process_request('/documents', :post, payload)
20
21
  end
@@ -1,3 +1,3 @@
1
1
  module Mifiel
2
- VERSION = '1.1.0'.freeze
2
+ VERSION = '1.1.1'.freeze
3
3
  end
data/mifiel.gemspec CHANGED
@@ -21,6 +21,7 @@ Gem::Specification.new do |spec|
21
21
  spec.add_runtime_dependency 'rest-client', '~> 1.7'
22
22
  spec.add_runtime_dependency 'json', '~> 1.8'
23
23
  spec.add_runtime_dependency 'api-auth', '~> 1.4'
24
+ spec.add_runtime_dependency 'activesupport', '~> 4.2.7'
24
25
  spec.add_runtime_dependency 'active_rest_client', '~> 1.2'
25
26
 
26
27
  spec.add_development_dependency 'bundler', '~> 1.6'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mifiel
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genaro Madrid
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-21 00:00:00.000000000 Z
11
+ date: 2016-08-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '1.4'
55
+ - !ruby/object:Gem::Dependency
56
+ name: activesupport
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 4.2.7
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 4.2.7
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: active_rest_client
57
71
  requirement: !ruby/object:Gem::Requirement