jsontemplate 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/exe/jsontemplate +1 -0
- data/lib/jsontemplate.rb +8 -2
- data/lib/jsontemplate/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 360933697b132664ef8783eeaa1d77a54b92ce96
|
4
|
+
data.tar.gz: 48601d2350b59574718f7365c788dee920e93330
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee3d770335b3eea0a5efae708f5e479ad67eca32cdfccc566dbb87c13a236a214ea27efefce8c46901987270a3d510326aa6585b0c4d320959252a56beb07e89
|
7
|
+
data.tar.gz: fb74b90da549574c75b1ecf734330478539e4660edad8c5dd2d61dc6b1a30f91fe0fbd8c87f721b268b417b6e308b3fb6f3f6ddc3ed9709b98296a5aabf4e234
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
jsontemplate (0.4.
|
4
|
+
jsontemplate (0.4.2)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
@@ -13,12 +13,12 @@ GEM
|
|
13
13
|
coderay (~> 1.1.0)
|
14
14
|
method_source (~> 0.8.1)
|
15
15
|
slop (~> 3.4)
|
16
|
-
rake (10.
|
16
|
+
rake (10.5.0)
|
17
17
|
rspec (3.5.0)
|
18
18
|
rspec-core (~> 3.5.0)
|
19
19
|
rspec-expectations (~> 3.5.0)
|
20
20
|
rspec-mocks (~> 3.5.0)
|
21
|
-
rspec-core (3.5.
|
21
|
+
rspec-core (3.5.2)
|
22
22
|
rspec-support (~> 3.5.0)
|
23
23
|
rspec-expectations (3.5.0)
|
24
24
|
diff-lcs (>= 1.2.0, < 2.0)
|
data/exe/jsontemplate
CHANGED
@@ -11,6 +11,7 @@ src = File.expand_path(ARGV.shift) rescue nil
|
|
11
11
|
dest = File.expand_path(ARGV.shift) rescue nil
|
12
12
|
|
13
13
|
if src.nil? || dest.nil?
|
14
|
+
STDERR.puts "jsontemplate (from jsontemplate gem) version #{JsonTemplate::VERSION}"
|
14
15
|
STDERR.puts "USAGE: jsontemplate in-file out-file"
|
15
16
|
exit(1)
|
16
17
|
end
|
data/lib/jsontemplate.rb
CHANGED
@@ -11,9 +11,15 @@ class JsonTemplate
|
|
11
11
|
@dir = File.expand_path(path ? File.dirname(path) : ".")
|
12
12
|
|
13
13
|
@properties_file = File.join(@dir,"properties.json")
|
14
|
-
@secrets_file
|
14
|
+
@secrets_file = File.join(@dir,"secrets.json")
|
15
15
|
|
16
|
-
|
16
|
+
if src.respond_to?(:read)
|
17
|
+
@filename = "<stream>"
|
18
|
+
data = src.read
|
19
|
+
else
|
20
|
+
@filename = File.join(@dir, File.basename(src))
|
21
|
+
data = File.read(@filename)
|
22
|
+
end
|
17
23
|
@json = JSON.load(data)
|
18
24
|
end
|
19
25
|
|
data/lib/jsontemplate/version.rb
CHANGED