vantiv_lite 0.1.3 → 0.1.4

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: 145bce8be8a54f2181fb4b7c6acb270222394fe5
4
- data.tar.gz: 8e90b8343b8ad3464cccb12320dba5257979e20a
3
+ metadata.gz: f7ac63db75ab2e28f9bc5844be745a05cadf71bb
4
+ data.tar.gz: 52983af5573d4ddfb4ac13cecb6cc02df351465c
5
5
  SHA512:
6
- metadata.gz: 356438db716dec57f83a740ce3e7ec6a180dbfa5be38c6d271f1419d6f79bc3f54eba54f5769bc4c38407c1619a341cf9fa39bd672455d76207ade9a43aa092c
7
- data.tar.gz: 96148c67becce2e6f691210ce8d44fb1c2b46dff1ee518de22b1c92601c1b47ef60d95dbff54b4e07e15dd668f73daefa689e18c28eb54989a4290f5222591d7
6
+ metadata.gz: 6305858d92142a23562c4d2f1e1f2bce3f8db150b50abbb34c54f28a7ae0d5736d881af8e9f41baa151d65801ea219a1e7ab383c331ee7a3f4c8a12e980f9dbb
7
+ data.tar.gz: 7886691f7509b72f3ff5c1d2aa7af42ebd9190e689de0ad9c06469cfc6212e11cc13afbea21a3181cb3fa9f89a5b1d18a67d1b853e4493654b2c0de67f7776c8
data/README.md CHANGED
@@ -195,11 +195,15 @@ Valid environments are:
195
195
 
196
196
  This configures the API url. At the moment, that's really all it does.
197
197
 
198
+ ## Reports
199
+
200
+ Need access to reports? Turns out, there's a [separate gem for that](https://github.com/binarypaladin/vantiv_sftp_reports).
201
+
198
202
  ## Contributing
199
203
 
200
204
  ### Issue Guidelines
201
205
 
202
- GitHub issues are for bugs, not support. As of right now, there is no official support for this gem. You can try reaching out to the author, [Joshua Hansen](mailto:joshua@epicbanality.com?subject=VantiveLite) if you're really stuck, but there's a pretty high chance that won't go anywhere at the moment or you'll get a response like this:
206
+ GitHub issues are for bugs, not support. As of right now, there is no official support for this gem. You can try reaching out to the author, [Joshua Hansen](mailto:joshua@epicbanality.com?subject=VantivLite) if you're really stuck, but there's a pretty high chance that won't go anywhere at the moment or you'll get a response like this:
203
207
 
204
208
  > Hi. I'm super busy. It's nothing personal. Check the README first if you haven't already. If you don 't find your answer there, it's time to start reading the source. Have fun! Let me know if I screwed something up.
205
209
 
data/lib/vantiv_lite.rb CHANGED
@@ -8,15 +8,16 @@ module VantivLite
8
8
  attr_reader :default_config, :default_request
9
9
 
10
10
  def configure(config = env_config, &blk)
11
- @default_config = block_given? ? Config.build(&blk) : Config.new(config)
11
+ @default_config = block_given? ? Config.build(&blk) : Config.with_obj(config)
12
12
  @default_request = Request.new(@default_config)
13
13
  end
14
14
 
15
15
  def env_config
16
- Config::OPTS.each_with_object({}) do |k, h|
16
+ opts = Config::OPTS.each_with_object({}) do |k, h|
17
17
  env_key = "vantiv_#{k}"
18
18
  h[k] = ENV[env_key] if ENV.key?(env_key)
19
19
  end
20
+ Config.new(opts)
20
21
  end
21
22
 
22
23
  def request(request_hash)
@@ -32,8 +32,14 @@ module VantivLite
32
32
  end
33
33
  end
34
34
 
35
- def self.build(&blk)
36
- Config::Builder.(&blk)
35
+ class << self
36
+ def build(&blk)
37
+ Config::Builder.(&blk)
38
+ end
39
+
40
+ def with_obj(config)
41
+ config.is_a?(self) ? config : new(config)
42
+ end
37
43
  end
38
44
 
39
45
  attr_reader :proxy_uri, :sandbox, :uri
@@ -52,7 +52,7 @@ module VantivLite
52
52
  end
53
53
 
54
54
  def default_attributes_with(hash)
55
- hash['id'] ||= SecureRandom.hex(12)
55
+ hash['id'] ||= '0'
56
56
  hash['reportGroup'] ||= config.report_group
57
57
  hash
58
58
  end
@@ -3,7 +3,7 @@
3
3
  module VantivLite
4
4
  MAJOR = 0
5
5
  MINOR = 1
6
- TINY = 3
6
+ TINY = 4
7
7
  VERSION = [MAJOR, MINOR, TINY].join('.').freeze
8
8
 
9
9
  def self.version
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vantiv_lite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-05-18 00:00:00.000000000 Z
12
+ date: 2018-06-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler