nugget 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/check_nugget +7 -4
- data/lib/nugget/service.rb +1 -2
- data/lib/nugget/version.rb +1 -1
- data/lib/nugget.rb +1 -1
- metadata +2 -2
data/bin/check_nugget
CHANGED
@@ -3,14 +3,17 @@
|
|
3
3
|
require 'rubygems'
|
4
4
|
require 'yajl/json_gem'
|
5
5
|
require 'pp'
|
6
|
-
require 'iconv'
|
6
|
+
require 'iconv' if RUBY_VERSION =~ /1.8/
|
7
7
|
|
8
8
|
RESULTS_FILE = "/tmp/nugget_results.json"
|
9
9
|
|
10
|
-
ic = Iconv.new('UTF-8//IGNORE', 'UTF-8')
|
11
|
-
|
12
10
|
results_file = File.read(RESULTS_FILE)
|
13
|
-
|
11
|
+
if RUBY_VERSION =~ /1.8/
|
12
|
+
ic = Iconv.new('UTF-8//IGNORE', 'UTF-8')
|
13
|
+
clean_results = ic.iconv(results_file)
|
14
|
+
else
|
15
|
+
clean_results = results_file.chars.select{|i| i.valid_encoding?}.join
|
16
|
+
end
|
14
17
|
parser = Yajl::Parser.new(:symbolize_keys => true)
|
15
18
|
results = parser.parse(clean_results)
|
16
19
|
|
data/lib/nugget/service.rb
CHANGED
@@ -21,7 +21,6 @@ module Nugget
|
|
21
21
|
config_file = open(Nugget::Config.config)
|
22
22
|
parser = Yajl::Parser.new(:symbolize_keys => true)
|
23
23
|
config = parser.parse(config_file)
|
24
|
-
ic = Iconv.new('UTF-8//IGNORE', 'UTF-8')
|
25
24
|
|
26
25
|
results = Hash.new
|
27
26
|
|
@@ -46,7 +45,7 @@ module Nugget
|
|
46
45
|
Nugget::Log.info("Test #{test} complete with status #{result}")
|
47
46
|
|
48
47
|
results.store(test, {
|
49
|
-
:config =>
|
48
|
+
:config => request_definition,
|
50
49
|
:result => result,
|
51
50
|
:response => response,
|
52
51
|
:timestamp => Time.now.to_i
|
data/lib/nugget/version.rb
CHANGED
data/lib/nugget.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nugget
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-03-
|
12
|
+
date: 2014-03-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mixlib-config
|