spackle-ruby 0.0.3 → 0.0.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
  SHA256:
3
- metadata.gz: e8cf2b94103517a295249a12015de47bba73211680e6414e171df2bc9ab18ceb
4
- data.tar.gz: 694bb847e82273d30bb5f7e325bdb795e56a5d4555bcefe01783dc597d22c3d6
3
+ metadata.gz: 1a6b32c5881420c026c804b645c39a35cb223b3c926aeb5f6b02163f6c061400
4
+ data.tar.gz: 2acfabcf67ea64675f95517b4ee6d0c9f224ac62882985d0baa304e03ce984b2
5
5
  SHA512:
6
- metadata.gz: e8e7b93be2dc27f5b823741bed3c29b05113811fb37ae6769e89cf323eb5f6b34c2f6aa1d402e15b064dae86e6864ac155cf6f3fb565fa3c873107020119384c
7
- data.tar.gz: 0e4f7073e81f0bba5a572f9ff5e1ad9670cbf0f5e5ec9afc93d3de20c2c2d0cfe476208a232403aaa61046abed6f1e826c3b98fdd9e373bff61d0410067fcbb7
6
+ metadata.gz: 021e4b4b269c0e757ae38e525b02ab44f26d00b82336da3c082c39bb3099c19d7c238ccf330742214844d8fe048ad7cab21035c206c4f3a1ad8abbc2a310d493
7
+ data.tar.gz: '058bce85874d0a04f037d0348214f3f487ae924c4abf17d9d544800d434d1fb2ad09363b801bd2da1a6287b77e43df3f6c95e982440b5cfc3a432c42919122f9'
@@ -7,6 +7,11 @@ module Spackle
7
7
  def get_customer_data(id)
8
8
  content = File.read(@path)
9
9
  data = JSON.parse(content)
10
+
11
+ if !data.has_key?(id)
12
+ raise SpackleError.new "Customer #{id} not found"
13
+ end
14
+
10
15
  data[id]
11
16
  end
12
17
 
@@ -17,10 +22,6 @@ module Spackle
17
22
  data = JSON.parse(content)
18
23
  end
19
24
 
20
- if !data.has_key?(id)
21
- raise SpackleError.new "Customer #{id} not found"
22
- end
23
-
24
25
  data[id] = customer_data
25
26
  File.write(@path, JSON.pretty_generate(data))
26
27
  end
data/spackle.gemspec CHANGED
@@ -2,7 +2,7 @@ $LOAD_PATH.unshift(::File.join(::File.dirname(__FILE__), "lib"))
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "spackle-ruby"
5
- s.version = "0.0.3"
5
+ s.version = "0.0.4"
6
6
  s.summary = "Spackle Ruby gem"
7
7
  s.description = "Spackle is the easiest way to integrate your Ruby app with Stripe Billing. " \
8
8
  "See https://www.spackle.so for details."
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spackle-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Spackle