taproot 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +9 -9
- data/lib/config_manager.rb +1 -1
- data/lib/taproot.rb +12 -1
- data/taproot.gemspec +2 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1005aac4be1712e38c6abd61b3e5c5ba93e1688d
|
4
|
+
data.tar.gz: ffca00b152ef5670528d37fa76b36f0628a4a2e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35eefa0da9ea54a46bfc37d6a1d941ac02ee00ebef05036a8f81b9b21ffa6c0913d679327779f740645baf1213280836a5a990f6dc7f1bd13a494a01a06ccd54
|
7
|
+
data.tar.gz: 418eeb5037329e5c58e2b764a62d651fb6f893a594560513a83f425eaa061151201359ae77465877af4dfb48256ae2c9bf2af23f37c12eec830a0059deb73157
|
data/Gemfile.lock
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
taproot (0.1.
|
4
|
+
taproot (0.1.4)
|
5
5
|
activesupport (~> 4.1.1)
|
6
6
|
awesome_print (~> 1.2.0)
|
7
|
-
braintree (~> 2.
|
7
|
+
braintree (~> 2.33.1)
|
8
8
|
pry (~> 0.9.12.6)
|
9
9
|
sinatra (~> 1.4.5)
|
10
10
|
sinatra-contrib (~> 1.4.2)
|
@@ -13,7 +13,7 @@ PATH
|
|
13
13
|
GEM
|
14
14
|
remote: https://rubygems.org/
|
15
15
|
specs:
|
16
|
-
activesupport (4.1.
|
16
|
+
activesupport (4.1.5)
|
17
17
|
i18n (~> 0.6, >= 0.6.9)
|
18
18
|
json (~> 1.7, >= 1.7.7)
|
19
19
|
minitest (~> 5.1)
|
@@ -21,14 +21,14 @@ GEM
|
|
21
21
|
tzinfo (~> 1.1)
|
22
22
|
awesome_print (1.2.0)
|
23
23
|
backports (3.6.0)
|
24
|
-
braintree (2.
|
24
|
+
braintree (2.33.1)
|
25
25
|
builder (>= 2.0.0)
|
26
26
|
builder (3.2.2)
|
27
27
|
coderay (1.1.0)
|
28
|
-
i18n (0.6.
|
28
|
+
i18n (0.6.11)
|
29
29
|
json (1.8.1)
|
30
30
|
method_source (0.8.2)
|
31
|
-
minitest (5.
|
31
|
+
minitest (5.4.0)
|
32
32
|
multi_json (1.10.1)
|
33
33
|
pry (0.9.12.6)
|
34
34
|
coderay (~> 1.0)
|
@@ -50,13 +50,13 @@ GEM
|
|
50
50
|
rack-test
|
51
51
|
sinatra (~> 1.4.0)
|
52
52
|
tilt (~> 1.3)
|
53
|
-
slop (3.
|
53
|
+
slop (3.6.0)
|
54
54
|
term-ansicolor (1.3.0)
|
55
55
|
tins (~> 1.0)
|
56
|
-
thread_safe (0.3.
|
56
|
+
thread_safe (0.3.4)
|
57
57
|
tilt (1.4.1)
|
58
58
|
tins (1.3.0)
|
59
|
-
tzinfo (1.
|
59
|
+
tzinfo (1.2.2)
|
60
60
|
thread_safe (~> 0.1)
|
61
61
|
|
62
62
|
PLATFORMS
|
data/lib/config_manager.rb
CHANGED
@@ -68,7 +68,7 @@ class ConfigManager
|
|
68
68
|
rescue Errno::ECONNRESET => e
|
69
69
|
return "The gateway is down for URL #{Braintree::Configuration.instantiate.base_merchant_url}"
|
70
70
|
rescue Braintree::AuthenticationError => e
|
71
|
-
return "Unable to authenticate to Braintree while
|
71
|
+
return "Unable to authenticate to Braintree while getting client token. Your keys or merchant ID may be wrong or the gateway is down."
|
72
72
|
end
|
73
73
|
|
74
74
|
if client_token["paypal"].nil? == false
|
data/lib/taproot.rb
CHANGED
@@ -41,7 +41,18 @@ class Taproot < Sinatra::Base
|
|
41
41
|
)
|
42
42
|
end
|
43
43
|
|
44
|
-
|
44
|
+
raw_client_token = Braintree::ClientToken.generate
|
45
|
+
client_token = JSON.parse(Base64.decode64(raw_client_token))
|
46
|
+
|
47
|
+
if params["touchDisabled"]
|
48
|
+
client_token["paypal"]["touchDisabled"] = true if client_token["paypalEnabled"]
|
49
|
+
end
|
50
|
+
|
51
|
+
if Braintree::Configuration.environment == :production
|
52
|
+
client_token["venmo"] = "production"
|
53
|
+
end
|
54
|
+
|
55
|
+
JSON.pretty_generate(client_token)
|
45
56
|
rescue Exception => e
|
46
57
|
status 422
|
47
58
|
JSON.pretty_generate(:message => e.message)
|
data/taproot.gemspec
CHANGED
@@ -12,10 +12,10 @@ Gem::Specification.new do |gem|
|
|
12
12
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
13
13
|
gem.name = "taproot"
|
14
14
|
gem.require_paths = ["lib"]
|
15
|
-
gem.version = "0.1.
|
15
|
+
gem.version = "0.1.5"
|
16
16
|
|
17
17
|
gem.add_dependency "sinatra", "~> 1.4.5"
|
18
|
-
gem.add_dependency "braintree", "~> 2.
|
18
|
+
gem.add_dependency "braintree", "~> 2.33.1"
|
19
19
|
gem.add_dependency "pry", "~> 0.9.12.6"
|
20
20
|
gem.add_dependency "activesupport", "~> 4.1.1"
|
21
21
|
gem.add_dependency "term-ansicolor", "~> 1.3.0"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: taproot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Mills
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-09-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sinatra
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 2.
|
33
|
+
version: 2.33.1
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 2.
|
40
|
+
version: 2.33.1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: pry
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|