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 +4 -4
- data/lib/spackle/stores/file.rb +5 -4
- data/spackle.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a6b32c5881420c026c804b645c39a35cb223b3c926aeb5f6b02163f6c061400
|
4
|
+
data.tar.gz: 2acfabcf67ea64675f95517b4ee6d0c9f224ac62882985d0baa304e03ce984b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 021e4b4b269c0e757ae38e525b02ab44f26d00b82336da3c082c39bb3099c19d7c238ccf330742214844d8fe048ad7cab21035c206c4f3a1ad8abbc2a310d493
|
7
|
+
data.tar.gz: '058bce85874d0a04f037d0348214f3f487ae924c4abf17d9d544800d434d1fb2ad09363b801bd2da1a6287b77e43df3f6c95e982440b5cfc3a432c42919122f9'
|
data/lib/spackle/stores/file.rb
CHANGED
@@ -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.
|
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."
|