synapsis 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/.gitignore +15 -0
- data/.pryrc +2 -0
- data/.rspec +4 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +31 -0
- data/Rakefile +2 -0
- data/lib/synapsis/authentication.rb +25 -0
- data/lib/synapsis/bank.rb +107 -0
- data/lib/synapsis/user.rb +89 -0
- data/lib/synapsis/utilities.rb +32 -0
- data/lib/synapsis/version.rb +3 -0
- data/lib/synapsis.rb +36 -0
- data/spec/config.yml +2 -0
- data/spec/spec_helper.rb +23 -0
- data/spec/support/json_helpers.rb +6 -0
- data/spec/synapsis/authentication_spec.rb +15 -0
- data/spec/synapsis/bank_spec.rb +64 -0
- data/spec/synapsis/user_spec.rb +57 -0
- data/synapsis.gemspec +28 -0
- metadata +154 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: d52e6d35ed0e2728f7318b0491988d793c8813fb
|
4
|
+
data.tar.gz: fd76d1faac479cd748e4e60b2dd38abf6dbbd731
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 155a4664e971f31eb89f923143490a416a989f01968c7c5ceb068f321039d6d2161fae104e039e4236568c3c43b6424c518e5d8492d5d947e5976aa0b5a75522
|
7
|
+
data.tar.gz: 4fa819a5e9842a481167c72537e55b95148e1d3e5f38bb8bf13256a5cfd8d6bfebd70530725d307575441125445bb9519c7e0602365aa5f2d58147f10879a4c6
|
data/.gitignore
ADDED
data/.pryrc
ADDED
data/.rspec
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2015 Daryll Santos
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# Synapsis
|
2
|
+
|
3
|
+
TODO: Write a gem description
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'synapsis'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install synapsis
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
TODO: Write usage instructions here
|
24
|
+
|
25
|
+
## Contributing
|
26
|
+
|
27
|
+
1. Fork it ( https://github.com/[my-github-username]/synapsis/fork )
|
28
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
29
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
30
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
31
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
class Synapsis::Authentication
|
2
|
+
include Synapsis::Utilities
|
3
|
+
|
4
|
+
attr_accessor :username, :password, :grant_type, :scope
|
5
|
+
|
6
|
+
def self.login(params)
|
7
|
+
self.new(params).login
|
8
|
+
end
|
9
|
+
|
10
|
+
def initialize(params)
|
11
|
+
params.each do |k, v|
|
12
|
+
send("#{k}=", v)
|
13
|
+
end
|
14
|
+
|
15
|
+
@grant_type = 'password'
|
16
|
+
@scope = 'write'
|
17
|
+
end
|
18
|
+
|
19
|
+
def login
|
20
|
+
Synapsis.connection.post do |req|
|
21
|
+
req.url 'oauth2/access_token'
|
22
|
+
req.body = build_params_from_string
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,107 @@
|
|
1
|
+
class Synapsis::Bank
|
2
|
+
include Synapsis::Utilities
|
3
|
+
|
4
|
+
attr_accessor :account_class,
|
5
|
+
:account_num,
|
6
|
+
:account_type,
|
7
|
+
:bank,
|
8
|
+
:fullname,
|
9
|
+
:mfa,
|
10
|
+
:nickname,
|
11
|
+
:oauth_consumer_key,
|
12
|
+
:password,
|
13
|
+
:pin,
|
14
|
+
:routing_num,
|
15
|
+
:username,
|
16
|
+
:access_token
|
17
|
+
|
18
|
+
def self.add(params)
|
19
|
+
self.new(params).add
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.link(params)
|
23
|
+
self.new(params).link
|
24
|
+
end
|
25
|
+
|
26
|
+
def self.view_linked_banks(params)
|
27
|
+
self.new(params).view_linked_banks
|
28
|
+
end
|
29
|
+
|
30
|
+
def initialize(params)
|
31
|
+
params.each do |k, v|
|
32
|
+
send("#{k}=", v)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
def add
|
37
|
+
added_bank = Synapsis.connection.post do |req|
|
38
|
+
req.headers['Content-Type'] = 'application/json'
|
39
|
+
req.url "#{API_V2_PATH}bank/add/"
|
40
|
+
req.body = build_json_from_variable_hash
|
41
|
+
end
|
42
|
+
|
43
|
+
return Synapsis::RetrievedBank.new(added_bank)
|
44
|
+
end
|
45
|
+
|
46
|
+
def link
|
47
|
+
partially_linked_bank = Synapsis.connection.post do |req|
|
48
|
+
req.headers['Content-Type'] = 'application/json'
|
49
|
+
req.url "#{API_V2_PATH}bank/login/?is_dev=yes"
|
50
|
+
req.body = build_json_from_variable_hash
|
51
|
+
end
|
52
|
+
|
53
|
+
@access_token = JSON.parse(partially_linked_bank.body)['response']['access_token']
|
54
|
+
|
55
|
+
new_bank = Synapsis.connection.post do |req|
|
56
|
+
req.headers['Content-Type'] = 'application/json'
|
57
|
+
req.url "#{API_V2_PATH}bank/mfa/?is_dev=yes"
|
58
|
+
req.body = build_json_from_variable_hash
|
59
|
+
end
|
60
|
+
|
61
|
+
return Synapsis::RetrievedBank.new(new_bank)
|
62
|
+
end
|
63
|
+
|
64
|
+
def view_linked_banks
|
65
|
+
Synapsis.connection.post do |req|
|
66
|
+
req.headers['Content-Type'] = 'application/json'
|
67
|
+
req.url "#{API_V2_PATH}bank/show/"
|
68
|
+
req.body = build_json_from_variable_hash
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
class Synapsis::RetrievedBank
|
73
|
+
attr_accessor :account_class,
|
74
|
+
:account_number_string,
|
75
|
+
:account_type,
|
76
|
+
:address,
|
77
|
+
:balance,
|
78
|
+
:bank_name,
|
79
|
+
:date,
|
80
|
+
:email,
|
81
|
+
:id,
|
82
|
+
:is_active,
|
83
|
+
:is_buyer_default,
|
84
|
+
:is_seller_default,
|
85
|
+
:is_verified,
|
86
|
+
:mfa_verifed,
|
87
|
+
:name_on_account,
|
88
|
+
:nickname,
|
89
|
+
:phone_number,
|
90
|
+
:resource_uri,
|
91
|
+
:routing_number_string
|
92
|
+
|
93
|
+
def initialize(synapse_response)
|
94
|
+
parsed_response = JSON.parse(synapse_response.body)
|
95
|
+
|
96
|
+
if parsed_response['banks']
|
97
|
+
parsed_response['banks'].first.each do |k, v|
|
98
|
+
send("#{k}=", v)
|
99
|
+
end
|
100
|
+
elsif parsed_response['bank']
|
101
|
+
parsed_response['bank'].each do |k, v|
|
102
|
+
send("#{k}=", v)
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
@@ -0,0 +1,89 @@
|
|
1
|
+
class Synapsis::User
|
2
|
+
include Synapsis::Utilities
|
3
|
+
|
4
|
+
attr_accessor :email,
|
5
|
+
:fullname,
|
6
|
+
:password,
|
7
|
+
:ip_address,
|
8
|
+
:phonenumber,
|
9
|
+
:access_token,
|
10
|
+
:refresh_token,
|
11
|
+
:username
|
12
|
+
|
13
|
+
def self.create(params)
|
14
|
+
self.new(params).create
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.view(params)
|
18
|
+
self.new({}).view(params)
|
19
|
+
end
|
20
|
+
|
21
|
+
def initialize(params)
|
22
|
+
params.each do |k, v|
|
23
|
+
send("#{k}=", v)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def create
|
28
|
+
response = Synapsis.connection.post do |req|
|
29
|
+
req.headers['Content-Type'] = 'application/json'
|
30
|
+
req.url "#{API_V2_PATH}user/create/"
|
31
|
+
req.body = build_json_from_params
|
32
|
+
end
|
33
|
+
|
34
|
+
if response.success?
|
35
|
+
update_attributes(response)
|
36
|
+
return self
|
37
|
+
else
|
38
|
+
return response
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
def view(oauth_token = @access_token)
|
43
|
+
response = Synapsis.connection.post do |req|
|
44
|
+
req.headers['Content-Type'] = 'application/json'
|
45
|
+
req.url "#{API_V2_PATH}user/show/"
|
46
|
+
req.body = JSON.generate({ 'oauth_consumer_key' => oauth_token})
|
47
|
+
end
|
48
|
+
|
49
|
+
if response.success?
|
50
|
+
return Synapsis::RetrievedUser.new(response)
|
51
|
+
else
|
52
|
+
return response
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
private
|
57
|
+
|
58
|
+
def update_attributes(synapse_response)
|
59
|
+
parsed_response = JSON.parse(synapse_response.body)
|
60
|
+
@access_token = parsed_response['access_token']
|
61
|
+
@refresh_token = parsed_response['refresh_token']
|
62
|
+
@username = parsed_response['username']
|
63
|
+
end
|
64
|
+
|
65
|
+
class Synapsis::RetrievedUser
|
66
|
+
attr_accessor :accept_bank_payments,
|
67
|
+
:accept_gratuity,
|
68
|
+
:balance,
|
69
|
+
:email,
|
70
|
+
:fullname,
|
71
|
+
:has_avatar,
|
72
|
+
:phone_number,
|
73
|
+
:resource_uri,
|
74
|
+
:seller_details,
|
75
|
+
:user_id,
|
76
|
+
:username,
|
77
|
+
:visit_count,
|
78
|
+
:visit_message
|
79
|
+
|
80
|
+
def initialize(synapse_response)
|
81
|
+
parsed_response = JSON.parse(synapse_response.body)
|
82
|
+
|
83
|
+
parsed_response['user'].each do |k, v|
|
84
|
+
send("#{k}=", v)
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'json'
|
2
|
+
|
3
|
+
module Synapsis::Utilities
|
4
|
+
API_V2_PATH = 'api/v2/'
|
5
|
+
|
6
|
+
def build_json_from_params
|
7
|
+
JSON.generate(to_hash.merge(client_credentials))
|
8
|
+
end
|
9
|
+
|
10
|
+
def build_json_from_variable_hash
|
11
|
+
JSON.generate(to_hash)
|
12
|
+
end
|
13
|
+
|
14
|
+
def to_hash
|
15
|
+
instance_variables.map do |ivar|
|
16
|
+
[ivar[1..-1], instance_variable_get(ivar)]
|
17
|
+
end.to_h
|
18
|
+
end
|
19
|
+
|
20
|
+
def build_params_from_string
|
21
|
+
to_hash.merge(client_credentials).map { |k, v| "#{k}=#{v}" }.join("&")
|
22
|
+
end
|
23
|
+
|
24
|
+
private
|
25
|
+
|
26
|
+
def client_credentials
|
27
|
+
{
|
28
|
+
client_id: Synapsis.client_id,
|
29
|
+
client_secret: Synapsis.client_secret
|
30
|
+
}
|
31
|
+
end
|
32
|
+
end
|
data/lib/synapsis.rb
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
# External dependencies
|
2
|
+
require "faraday"
|
3
|
+
|
4
|
+
# Internal dependencies
|
5
|
+
|
6
|
+
require "./lib/synapsis/version"
|
7
|
+
require "./lib/synapsis/utilities"
|
8
|
+
require "./lib/synapsis/authentication"
|
9
|
+
require "./lib/synapsis/user"
|
10
|
+
require "./lib/synapsis/bank"
|
11
|
+
|
12
|
+
module Synapsis
|
13
|
+
class << self
|
14
|
+
attr_accessor :client_id, :client_secret, :environment
|
15
|
+
|
16
|
+
def connection
|
17
|
+
@connection ||= Faraday.new(url: synapse_url) do |faraday|
|
18
|
+
faraday.request :url_encoded # form-encode POST params
|
19
|
+
faraday.response :logger # log requests to STDOUT
|
20
|
+
faraday.adapter Faraday.default_adapter # make requests with Net::HTTP
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
def synapse_url
|
25
|
+
if environment == 'production'
|
26
|
+
'https://synapsepay.com/'
|
27
|
+
else
|
28
|
+
'https://sandbox.synapsepay.com/'
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
def configure(¶ms)
|
33
|
+
yield(self)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
data/spec/config.yml
ADDED
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'yaml'
|
2
|
+
require 'json'
|
3
|
+
require 'faker'
|
4
|
+
require 'pry'
|
5
|
+
|
6
|
+
# Require Initializers, bootstrap, models
|
7
|
+
require './lib/synapsis'
|
8
|
+
|
9
|
+
# Require helpers
|
10
|
+
Dir["./spec/support/**/*.rb"].each { |f| require f }
|
11
|
+
|
12
|
+
config_vars = YAML.load_file('./spec/config.yml')
|
13
|
+
|
14
|
+
Synapsis.configure do |config|
|
15
|
+
config.client_id = config_vars['client_id']
|
16
|
+
config.client_secret = config_vars['client_secret']
|
17
|
+
config.environment = 'test'
|
18
|
+
end
|
19
|
+
|
20
|
+
RSpec.configure do |config|
|
21
|
+
config.order = 'random'
|
22
|
+
config.include JsonHelpers
|
23
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
RSpec.describe Synapsis::Authentication do
|
4
|
+
it 'connects' do
|
5
|
+
authentication_params = {
|
6
|
+
username: 'b84b8c816c0541f09ea9fbd7c5d8e4',
|
7
|
+
password: '5ourcep4d'
|
8
|
+
}
|
9
|
+
|
10
|
+
response = Synapsis::Authentication.login(authentication_params)
|
11
|
+
|
12
|
+
expect(JSON.parse(response.body)['access_token']).to be_truthy
|
13
|
+
expect(JSON.parse(response.body)['token_type']).to eq 'Bearer'
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
RSpec.describe Synapsis::Bank do
|
4
|
+
context '#add' do
|
5
|
+
it 'adds a bank account' do
|
6
|
+
|
7
|
+
# We need to create a user because Synapse limits bank accounts to 5 per user.
|
8
|
+
user_params = {
|
9
|
+
email: Faker::Internet.email,
|
10
|
+
fullname: Faker::Name.name,
|
11
|
+
phonenumber: Faker::PhoneNumber.phone_number,
|
12
|
+
password: '5ourcep4d',
|
13
|
+
ip_address: '8.8.8.8'
|
14
|
+
}
|
15
|
+
|
16
|
+
new_user = Synapsis::User.create(user_params)
|
17
|
+
|
18
|
+
bank_params = {
|
19
|
+
fullname: new_user.fullname,
|
20
|
+
account_num: '1111111112',
|
21
|
+
routing_num: '121000358',
|
22
|
+
nickname: 'Sourcepad Bank',
|
23
|
+
oauth_consumer_key: new_user.access_token,
|
24
|
+
account_type: '1',
|
25
|
+
account_class: '1'
|
26
|
+
}
|
27
|
+
|
28
|
+
new_bank = Synapsis::Bank.add(bank_params)
|
29
|
+
|
30
|
+
expect(new_bank.is_active).to eq true
|
31
|
+
expect(new_bank.name_on_account).to eq user_params[:fullname]
|
32
|
+
expect(new_bank.nickname).to eq bank_params[:nickname]
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
context '#link' do
|
37
|
+
it 'adds a bank account' do
|
38
|
+
user_params = {
|
39
|
+
email: Faker::Internet.email,
|
40
|
+
fullname: Faker::Name.name,
|
41
|
+
phonenumber: Faker::PhoneNumber.phone_number,
|
42
|
+
password: '5ourcep4d',
|
43
|
+
ip_address: '8.8.8.8'
|
44
|
+
}
|
45
|
+
|
46
|
+
new_user = Synapsis::User.create(user_params)
|
47
|
+
|
48
|
+
bank_params = {
|
49
|
+
username: 'synapse_good',
|
50
|
+
password: 'test1234',
|
51
|
+
pin: '1234',
|
52
|
+
oauth_consumer_key: new_user.access_token,
|
53
|
+
bank: 'Wells Fargo',
|
54
|
+
mfa: 'test_answer'
|
55
|
+
}
|
56
|
+
|
57
|
+
new_bank = Synapsis::Bank.link(bank_params)
|
58
|
+
|
59
|
+
expect(new_bank.is_active).to eq true
|
60
|
+
expect(new_bank.name_on_account).to eq user_params[:fullname]
|
61
|
+
expect(new_bank.bank_name).to eq bank_params[:bank]
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
RSpec.describe Synapsis::User do
|
4
|
+
describe '#create' do
|
5
|
+
it 'creates a user account and returns the SynapsePay username, access_token and refresh_token' do
|
6
|
+
user_params = {
|
7
|
+
email: Faker::Internet.email,
|
8
|
+
fullname: Faker::Name.name,
|
9
|
+
phonenumber: Faker::PhoneNumber.phone_number,
|
10
|
+
password: '5ourcep4d',
|
11
|
+
ip_address: '8.8.8.8'
|
12
|
+
}
|
13
|
+
|
14
|
+
new_synapse_user = Synapsis::User.create(user_params)
|
15
|
+
|
16
|
+
expect(new_synapse_user.class).to eq Synapsis::User
|
17
|
+
expect(new_synapse_user.email).to eq user_params[:email]
|
18
|
+
expect(new_synapse_user.username).to be_a_kind_of String
|
19
|
+
expect(new_synapse_user.access_token).to be_a_kind_of String
|
20
|
+
expect(new_synapse_user.refresh_token).to be_a_kind_of String
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
describe '#view' do
|
25
|
+
it 'retrieves the user and returns their information in Struct form' do
|
26
|
+
oauth_token = 'c7eda20ff7b2554c0bed2ad596ac5dfeb33124e1'
|
27
|
+
response = Synapsis::User.view(oauth_token)
|
28
|
+
|
29
|
+
user_attributes = [:accept_gratuity, :balance, :email, :fullname, :has_avatar, :phone_number, :resource_uri, :seller_details, :user_id, :username, :visit_count, :visit_message]
|
30
|
+
|
31
|
+
user_attributes.each do |user_attribute|
|
32
|
+
expect(response.send(user_attribute)).not_to be_nil
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
describe 'infrastructure' do
|
38
|
+
it 'builds' do
|
39
|
+
result = '{"email":"test5@synapsepay.com","fullname":"Test Account","ip_address":"11.111.11.11","phonenumber":"123456789","client_id":"ce65d5ce9116ae4c77bb","client_secret":"41877da204b32dbee3095033069ed81bcf512154"}'
|
40
|
+
|
41
|
+
parsed_result = JSON.parse(result)
|
42
|
+
|
43
|
+
user_params = {
|
44
|
+
email: 'test5@synapsepay.com',
|
45
|
+
fullname: 'Test Account',
|
46
|
+
ip_address: '11.111.11.11',
|
47
|
+
phonenumber: '123456789'
|
48
|
+
}
|
49
|
+
|
50
|
+
built = JSON.parse(Synapsis::User.new(user_params).build_json_from_params)
|
51
|
+
|
52
|
+
user_params.each do |k, v|
|
53
|
+
expect(built[k]).to eq(parsed_result[k])
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
data/synapsis.gemspec
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'synapsis/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "synapsis"
|
8
|
+
spec.version = Synapsis::VERSION
|
9
|
+
spec.authors = ["Daryll Santos"]
|
10
|
+
spec.email = ["daryll.santos@gmail.com"]
|
11
|
+
spec.summary = %q{Ruby wrapper to the SynapsePay API}
|
12
|
+
spec.description = %q{Ruby wrapper to the SynapsePay API}
|
13
|
+
spec.homepage = ""
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_runtime_dependency "faraday", "0.9.1"
|
22
|
+
|
23
|
+
spec.add_development_dependency "bundler", "~> 1.7"
|
24
|
+
spec.add_development_dependency "faker", "~> 1.4.3"
|
25
|
+
spec.add_development_dependency "pry"
|
26
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
27
|
+
spec.add_development_dependency "rspec"
|
28
|
+
end
|
metadata
ADDED
@@ -0,0 +1,154 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: synapsis
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Daryll Santos
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-04-23 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: faraday
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.9.1
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.9.1
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.7'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.7'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: faker
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 1.4.3
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 1.4.3
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: pry
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rake
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '10.0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '10.0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rspec
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
description: Ruby wrapper to the SynapsePay API
|
98
|
+
email:
|
99
|
+
- daryll.santos@gmail.com
|
100
|
+
executables: []
|
101
|
+
extensions: []
|
102
|
+
extra_rdoc_files: []
|
103
|
+
files:
|
104
|
+
- ".gitignore"
|
105
|
+
- ".pryrc"
|
106
|
+
- ".rspec"
|
107
|
+
- Gemfile
|
108
|
+
- LICENSE.txt
|
109
|
+
- README.md
|
110
|
+
- Rakefile
|
111
|
+
- lib/synapsis.rb
|
112
|
+
- lib/synapsis/authentication.rb
|
113
|
+
- lib/synapsis/bank.rb
|
114
|
+
- lib/synapsis/user.rb
|
115
|
+
- lib/synapsis/utilities.rb
|
116
|
+
- lib/synapsis/version.rb
|
117
|
+
- spec/config.yml
|
118
|
+
- spec/spec_helper.rb
|
119
|
+
- spec/support/json_helpers.rb
|
120
|
+
- spec/synapsis/authentication_spec.rb
|
121
|
+
- spec/synapsis/bank_spec.rb
|
122
|
+
- spec/synapsis/user_spec.rb
|
123
|
+
- synapsis.gemspec
|
124
|
+
homepage: ''
|
125
|
+
licenses:
|
126
|
+
- MIT
|
127
|
+
metadata: {}
|
128
|
+
post_install_message:
|
129
|
+
rdoc_options: []
|
130
|
+
require_paths:
|
131
|
+
- lib
|
132
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
133
|
+
requirements:
|
134
|
+
- - ">="
|
135
|
+
- !ruby/object:Gem::Version
|
136
|
+
version: '0'
|
137
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
138
|
+
requirements:
|
139
|
+
- - ">="
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: '0'
|
142
|
+
requirements: []
|
143
|
+
rubyforge_project:
|
144
|
+
rubygems_version: 2.2.2
|
145
|
+
signing_key:
|
146
|
+
specification_version: 4
|
147
|
+
summary: Ruby wrapper to the SynapsePay API
|
148
|
+
test_files:
|
149
|
+
- spec/config.yml
|
150
|
+
- spec/spec_helper.rb
|
151
|
+
- spec/support/json_helpers.rb
|
152
|
+
- spec/synapsis/authentication_spec.rb
|
153
|
+
- spec/synapsis/bank_spec.rb
|
154
|
+
- spec/synapsis/user_spec.rb
|