gateway_signup 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,10 +1,10 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'gateway_signup'
|
3
|
-
s.version = '0.1.
|
4
|
-
s.date = '2014-01-
|
3
|
+
s.version = '0.1.1'
|
4
|
+
s.date = '2014-01-29'
|
5
5
|
s.summary = "Spreedly Gateway Registration Field Lookup"
|
6
6
|
s.description = "Small library for reading a config and returning the fields required to register a specific gateway with Spreedly"
|
7
|
-
s.authors = ["Glen Holcomb"]
|
7
|
+
s.authors = ["Glen Holcomb", "Isaiah Baca"]
|
8
8
|
s.email = 'dev@atpay.com'
|
9
9
|
s.files = `git ls-files`.split($/)
|
10
10
|
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
@@ -1,6 +1,7 @@
|
|
1
1
|
module GatewaySignup
|
2
2
|
module Engines
|
3
3
|
require 'yaml'
|
4
|
+
require 'pry'
|
4
5
|
|
5
6
|
class Yaml
|
6
7
|
def initialize(file)
|
@@ -8,13 +9,23 @@ module GatewaySignup
|
|
8
9
|
end
|
9
10
|
|
10
11
|
def fields_for(gateway)
|
11
|
-
|
12
|
+
@list = @gw_data[gateway.to_sym][:fields]
|
13
|
+
@list.each { |x| x << x[1].split("_").map(&:capitalize).join(" ") }
|
14
|
+
@list
|
12
15
|
end
|
13
16
|
|
14
17
|
def gateways
|
15
18
|
@gw_data.keys
|
16
19
|
end
|
17
20
|
|
21
|
+
def gateway_list
|
22
|
+
@list = {}
|
23
|
+
@gw_data.each do |k, v|
|
24
|
+
@list[k] = v[:display_name]
|
25
|
+
end
|
26
|
+
@list.to_json.html_safe
|
27
|
+
end
|
28
|
+
|
18
29
|
def details(gateway)
|
19
30
|
@gw_data[gateway.to_sym]
|
20
31
|
end
|
data/spec/spec_helper.rb
ADDED
File without changes
|
metadata
CHANGED
@@ -1,15 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gateway_signup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Glen Holcomb
|
9
|
+
- Isaiah Baca
|
9
10
|
autorequire:
|
10
11
|
bindir: bin
|
11
12
|
cert_chain: []
|
12
|
-
date: 2014-01-
|
13
|
+
date: 2014-01-29 00:00:00.000000000 Z
|
13
14
|
dependencies:
|
14
15
|
- !ruby/object:Gem::Dependency
|
15
16
|
name: sqlite3
|
@@ -34,16 +35,17 @@ executables: []
|
|
34
35
|
extensions: []
|
35
36
|
extra_rdoc_files: []
|
36
37
|
files:
|
37
|
-
- .gateway_signup.gemspec
|
38
38
|
- .gitignore
|
39
39
|
- Gemfile
|
40
40
|
- LICENSE
|
41
41
|
- README.md
|
42
|
+
- gateway_signup.gemspec
|
42
43
|
- lib/gateway_signup.rb
|
43
44
|
- lib/gateway_signup/config_engine.rb
|
44
45
|
- lib/gateway_signup/engines/sqlite.rb
|
45
46
|
- lib/gateway_signup/engines/yaml.rb
|
46
47
|
- lib/gateway_signup/registry.rb
|
48
|
+
- spec/spec_helper.rb
|
47
49
|
- spec/support/gateways.yml
|
48
50
|
- spec/support/gw.yml
|
49
51
|
homepage: https://github.com/atpay/gateway_signup
|
@@ -71,5 +73,6 @@ signing_key:
|
|
71
73
|
specification_version: 3
|
72
74
|
summary: Spreedly Gateway Registration Field Lookup
|
73
75
|
test_files:
|
76
|
+
- spec/spec_helper.rb
|
74
77
|
- spec/support/gateways.yml
|
75
78
|
- spec/support/gw.yml
|