DinnerLab_Plaid 0.0.0 → 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/DinnerLab_Plaid.rb +14 -9
- data/lib/DinnerLab_Plaid/client/configuration.rb +20 -0
- data/lib/DinnerLab_Plaid/client/testModule.rb +39 -0
- data/lib/plaid.rb +20 -0
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba335419edd7425dc15db8710e516b6543e031ad
|
4
|
+
data.tar.gz: feac1b84c4dfcda97d654ed05598e2d864b6e82e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b9d9a2a69af212d64c394a132687d831f31f0dda3db14530778fedd4217c9969555f043ee21d09d177a28bea8e5b8a6a9d20ac85466f110796cb5cd3386b07c
|
7
|
+
data.tar.gz: 7e7470c95a221a1123837959705d44206870b9aa44e97b63197b2e5cfdb619ba349f212ba2d9f54e236977899ca7f948ebfda69c3f9b73fea2ed9e3edb3da191
|
data/lib/DinnerLab_Plaid.rb
CHANGED
@@ -1,21 +1,26 @@
|
|
1
1
|
class DinnerLab_Plaid
|
2
2
|
|
3
|
+
require 'DinnerLab_Plaid/translator'
|
4
|
+
require 'plaid'
|
5
|
+
require 'DinnerLab_Plaid/client/testModule'
|
6
|
+
include TestModule
|
7
|
+
|
8
|
+
def configure
|
9
|
+
TestModule.set_test_config
|
10
|
+
end
|
11
|
+
|
12
|
+
|
3
13
|
def self.hi (language = "english")
|
4
14
|
translator = Translator.new(language)
|
5
15
|
translator.hi
|
6
16
|
end
|
7
17
|
|
8
|
-
def test_client
|
18
|
+
def self.test_client
|
9
19
|
#this is the client info that you have been given
|
10
20
|
#client = Plaid.client(username, email, password, institution, access_token = nil)
|
11
|
-
|
21
|
+
puts "ok... why not working";
|
22
|
+
TestModule::TestUser.new()
|
23
|
+
TestModule::TestUser.preview;
|
12
24
|
end
|
13
25
|
|
14
|
-
require 'DinnerLab_Plaid/translator'
|
15
|
-
require 'plaid'
|
16
|
-
#require 'DinnerLab_Plaid/client/testModule'
|
17
|
-
#include testModule
|
18
|
-
|
19
|
-
puts "WTF!"
|
20
|
-
|
21
26
|
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Plaid
|
2
|
+
module Configurations
|
3
|
+
require 'active_support/concern'
|
4
|
+
extend ActiveSupport::Concern
|
5
|
+
|
6
|
+
included do
|
7
|
+
#from Plaid.com
|
8
|
+
add_config :client_id
|
9
|
+
add_config :secret
|
10
|
+
end
|
11
|
+
|
12
|
+
module ClassMethods
|
13
|
+
|
14
|
+
#def add_config(name)
|
15
|
+
|
16
|
+
|
17
|
+
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
module TestModule
|
2
|
+
class TestUser
|
3
|
+
|
4
|
+
def initialize()
|
5
|
+
|
6
|
+
puts("AWW YEAH GOT INITIALIZED!");
|
7
|
+
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.preview()
|
11
|
+
puts "we are testing this module"
|
12
|
+
|
13
|
+
end
|
14
|
+
|
15
|
+
def set_test_config
|
16
|
+
configure do |config|
|
17
|
+
|
18
|
+
config.client_id = "54b80e0bd6c6ee9c0a5d4291";
|
19
|
+
config.secret = "b44270b7b3999405642450484450a8";
|
20
|
+
config.endpoint = 'https://tartan.plaid.com/'
|
21
|
+
#config.certpath = 'ca-bundle.crt'
|
22
|
+
#config.headers = {'Content-Type'=>'application/x-www-form-urlencoded'}
|
23
|
+
#config.webhook_address = 'http://domain.com/plaid_webhook/antennas'
|
24
|
+
config.save_full_response = true
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
def testUserAccess(userOptions={})
|
29
|
+
|
30
|
+
#ex. self.user = userOptions[:userName];
|
31
|
+
user = "";
|
32
|
+
email = "";
|
33
|
+
password = "";
|
34
|
+
institution = "";
|
35
|
+
access_token = "";
|
36
|
+
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
data/lib/plaid.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
#this is for initiating the plaid object as a module
|
2
|
+
module Plaid
|
3
|
+
#create a class?
|
4
|
+
class << self
|
5
|
+
|
6
|
+
attr_accessor :mfa_response, :mfa_type, :mfa_message, :username, :password, :institution, :endpoint, :secret, :access_token, :is_mfa_initialized, :email
|
7
|
+
|
8
|
+
#client used to initialize access through Plaid
|
9
|
+
def client(username, email, password, institution, access_token = nil)
|
10
|
+
self.username = username
|
11
|
+
self.email = email
|
12
|
+
self.password = password
|
13
|
+
self.institution = institution
|
14
|
+
self.access_token = access_token unless access_token.blank?
|
15
|
+
self.mfa_response ||= []
|
16
|
+
|
17
|
+
puts "Plaid client was made!"
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: DinnerLab_Plaid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Suh
|
@@ -10,7 +10,8 @@ bindir: bin
|
|
10
10
|
cert_chain: []
|
11
11
|
date: 2014-01-26 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
|
-
description:
|
13
|
+
description: Upgraded to start testing first Plaid User. States hello world in different
|
14
|
+
languages, and will also integrate Plaid
|
14
15
|
email: ksuh@dinnerlab.com
|
15
16
|
executables:
|
16
17
|
- DinnerLab_Plaid
|
@@ -19,7 +20,10 @@ extra_rdoc_files: []
|
|
19
20
|
files:
|
20
21
|
- bin/DinnerLab_Plaid
|
21
22
|
- lib/DinnerLab_Plaid.rb
|
23
|
+
- lib/DinnerLab_Plaid/client/configuration.rb
|
24
|
+
- lib/DinnerLab_Plaid/client/testModule.rb
|
22
25
|
- lib/DinnerLab_Plaid/translator.rb
|
26
|
+
- lib/plaid.rb
|
23
27
|
homepage: http://dinnerlab.com
|
24
28
|
licenses:
|
25
29
|
- MIT
|