synapse_payments 0.6.4 → 0.7.0

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: 8bfb4e773131f19d7a08d5d5abc02a043d5cd749
4
- data.tar.gz: e2957cdca881fe2a4cad97e06e72e9550e179b4a
3
+ metadata.gz: e4c1d872b18b79d0ec209a972048146597f8c79d
4
+ data.tar.gz: 7205bac033861e4147d7251a6e9f04deb63b8157
5
5
  SHA512:
6
- metadata.gz: d7e61e04ed9d825a42ba258303ccc8eb6940dac7ccda5fe04709cd558b35f811f18f406233d7b8eaced57d6637f1d57f9915edb4f0bf793292bc32e83ea257a7
7
- data.tar.gz: 92e5d4c6b150fd1ed7c2d650a29eacd5b0164e987a1fc863124bbd7d113b537f7d415b130deca7a1c7caca357bc7bdc0a19fd7ac669d1f99ad2d2b256dad2409
6
+ metadata.gz: 3c1cb20b7aab8374bec99867e6d30be51902d5dca67e1f670d93dbcc93fb5a44151cdeae66255e3fbe9d94e51c9995d50a99e16a9c4e3293fe5228f46b3b6d9d
7
+ data.tar.gz: ee7f97cf5b68c4c5cdb6e474fa73e006c3b84c957470631fb7c1c8629a6c4f96db674097ffe2ae0d378d17804f73b78436c2100f3ab51f40b4aa48b2f585f2d7
data/.travis.yml CHANGED
@@ -1,13 +1,14 @@
1
1
  language: ruby
2
2
  rvm:
3
3
  - 2.1.5
4
- - 2.2.3
4
+ - 2.2.4
5
+ - 2.3.0
5
6
  before_install: gem install bundler -v 1.10.6
6
7
  cache: bundler
7
8
  sudo: false
8
9
  fast_finish: true
9
10
  env:
10
- - USER_ID= SYNAPSE_PAYMENTS_CLIENT_ID= SYNAPSE_PAYMENTS_CLIENT_SECRET=
11
+ - USER_ID= SYNAPSE_PAYMENTS_CLIENT_ID= SYNAPSE_PAYMENTS_CLIENT_SECRET= SYNAPSE_PAYMENTS_FINGERPRINT=
11
12
  notifications:
12
13
  email:
13
14
  on_success: always
@@ -1,9 +1,3 @@
1
- begin
2
- require "mime/types/columnar" # use if available for reduced memory usage
3
- rescue LoadError
4
- require "mime/types"
5
- end
6
-
7
1
  require "synapse_payments/version"
8
2
  require "synapse_payments/error"
9
3
  require "synapse_payments/client"
@@ -15,6 +15,7 @@ module SynapsePayments
15
15
  # @return [SynapsePayments::Client]
16
16
  def initialize(options={})
17
17
  @sandbox_mode = true
18
+ @timeout_options = { write: 2, connect: 5, read: 10 }
18
19
 
19
20
  options.each do |key, value|
20
21
  instance_variable_set("@#{key}", value)
@@ -22,7 +23,6 @@ module SynapsePayments
22
23
 
23
24
  yield(self) if block_given?
24
25
 
25
- @timeout_options ||= { write: 2, connect: 5, read: 10 }
26
26
  @api_base = @sandbox_mode ? API_TEST : API_LIVE
27
27
 
28
28
  @users = Users.new(self)
@@ -74,19 +74,6 @@ module SynapsePayments
74
74
  @client.patch(path: "/users/#{@user_id}", oauth_key: @oauth_key, fingerprint: @fingerprint, json: data)
75
75
  end
76
76
 
77
- def attach_file(file_path)
78
- file_contents = open(file_path) { |f| f.read }
79
- file_type = MIME::Types.type_for(file_path).first.content_type
80
-
81
- data = {
82
- doc: {
83
- attachment: "data:#{file_type};base64,#{Base64.encode64(file_contents).gsub(/\n/, '')}"
84
- }
85
- }
86
-
87
- @client.patch(path: "/users/#{@user_id}", oauth_key: @oauth_key, fingerprint: @fingerprint, json: data)
88
- end
89
-
90
77
  # Adds a bank account by creating a node of node type ACH-US.
91
78
  #
92
79
  # @param name [String] the name of the account holder
@@ -1,3 +1,3 @@
1
1
  module SynapsePayments
2
- VERSION = "0.6.4"
2
+ VERSION = "0.7.0"
3
3
  end
data/samples.md CHANGED
@@ -138,7 +138,10 @@ response = user_client.answer_kba(
138
138
  #### Attach photo ID or another file type
139
139
 
140
140
  ```ruby
141
- response = user_client.attach_file(full_file_path)
141
+ file_contents = File.read('image.png')
142
+ encoded_file = "data:image/png;base64,#{Base64.encode64(file_contents).gsub(/\n/, '')}"
143
+
144
+ user_client.update(doc: { attachment: encoded_file })
142
145
  ```
143
146
 
144
147
  #### Add a bank account
@@ -28,6 +28,5 @@ Gem::Specification.new do |spec|
28
28
  spec.add_development_dependency "webmock"
29
29
 
30
30
  spec.add_dependency "http", '~> 0.9'
31
- spec.add_dependency "mime-types", '~> 2.9'
32
31
 
33
32
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: synapse_payments
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.4
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Javier Julio
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-01-27 00:00:00.000000000 Z
11
+ date: 2016-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -122,20 +122,6 @@ dependencies:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0.9'
125
- - !ruby/object:Gem::Dependency
126
- name: mime-types
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - "~>"
130
- - !ruby/object:Gem::Version
131
- version: '2.9'
132
- type: :runtime
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - "~>"
137
- - !ruby/object:Gem::Version
138
- version: '2.9'
139
125
  description: Requires Ruby 2.1 and up. Not all API actions are supported. Find out
140
126
  more in the readme todo section.
141
127
  email: