tripwire_notifier 0.2.9 → 0.2.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -108,8 +108,15 @@ module TripwireNotifier
108
108
  end
109
109
  end
110
110
 
111
- def stringify_values(hash)
112
- Hash[hash.map { |k,v| [k, v.to_s] }] unless hash.nil?
111
+ def stringify_values(values)
112
+ case values
113
+ when Array
114
+ values.map { |v| stringify_values(v) }
115
+ when Hash
116
+ Hash[values.map { |k,v| [k, stringify_values(v)] }]
117
+ else
118
+ values.to_s
119
+ end
113
120
  end
114
121
  end
115
122
  end
@@ -1,3 +1,3 @@
1
1
  module TripwireNotifier
2
- VERSION = '0.2.9'
2
+ VERSION = '0.2.10'
3
3
  end
@@ -7,7 +7,7 @@ class TestTripwire < Test::Unit::TestCase
7
7
  fake.request = OpenStruct.new(
8
8
  :user_agent => 'FooFox',
9
9
  :cookies => {'one' => 'two', 'three' => 'four'},
10
- :session => {'something' => 'ok', 'some_class' => String, 'some_number' => 42}
10
+ :session => {'something' => 'ok', 'some_class' => String, 'some_number' => 42, :some_array => [Date, 24]}
11
11
  )
12
12
  fake
13
13
  end
@@ -155,7 +155,7 @@ class TestTripwire < Test::Unit::TestCase
155
155
  end
156
156
 
157
157
  should "log session" do
158
- expected = {'something'=>'ok', 'some_class'=>'String', 'some_number'=>'42'}
158
+ expected = {'something'=>'ok', 'some_class'=>'String', 'some_number'=>'42', 'some_array'=>['Date', '24']}
159
159
  assert_equal expected, JSON.parse(fake_controller(BarController).send(:tripwire_params)[:data])['session']
160
160
  end
161
161
  end
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{tripwire_notifier}
8
- s.version = "0.2.9"
8
+ s.version = "0.2.10"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jeffrey Chupp", "Jeremy Weiskotten"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tripwire_notifier
3
3
  version: !ruby/object:Gem::Version
4
- hash: 5
4
+ hash: 3
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 9
10
- version: 0.2.9
9
+ - 10
10
+ version: 0.2.10
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jeffrey Chupp