tripwire_notifier 0.2.8 → 0.2.9

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,6 +1,8 @@
1
1
  source "http://rubygems.org"
2
2
 
3
3
  group :development do
4
+ gem "actionpack", "2.3.11"
5
+ gem "json"
4
6
  gem "fakeweb"
5
7
  gem "shoulda"
6
8
  gem "mocha"
data/Gemfile.lock CHANGED
@@ -1,13 +1,14 @@
1
- PATH
2
- remote: .
3
- specs:
4
- tripwire_notifier (0.2.6)
5
-
6
1
  GEM
7
2
  remote: http://rubygems.org/
8
3
  specs:
4
+ actionpack (2.3.11)
5
+ activesupport (= 2.3.11)
6
+ rack (~> 1.1.0)
7
+ activesupport (2.3.11)
9
8
  fakeweb (1.3.0)
9
+ json (1.5.1)
10
10
  mocha (0.9.12)
11
+ rack (1.1.2)
11
12
  rake (0.8.7)
12
13
  redgreen (1.2.2)
13
14
  shoulda (2.11.3)
@@ -16,9 +17,10 @@ PLATFORMS
16
17
  ruby
17
18
 
18
19
  DEPENDENCIES
20
+ actionpack (= 2.3.11)
19
21
  fakeweb
22
+ json
20
23
  mocha
21
24
  rake (>= 0.8.7)
22
25
  redgreen
23
26
  shoulda
24
- tripwire_notifier!
@@ -80,8 +80,8 @@ module TripwireNotifier
80
80
  end
81
81
 
82
82
  data[:user_agent] = request.user_agent
83
- data[:cookies] = request.cookies
84
- data[:session] = request.session
83
+ data[:cookies] = stringify_values(request.cookies)
84
+ data[:session] = stringify_values(request.session)
85
85
  end
86
86
  end
87
87
 
@@ -107,6 +107,10 @@ module TripwireNotifier
107
107
  end
108
108
  end
109
109
  end
110
+
111
+ def stringify_values(hash)
112
+ Hash[hash.map { |k,v| [k, v.to_s] }] unless hash.nil?
113
+ end
110
114
  end
111
115
  end
112
116
  end
@@ -1,3 +1,3 @@
1
1
  module TripwireNotifier
2
- VERSION = '0.2.8'
2
+ VERSION = '0.2.9'
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'}
10
+ :session => {'something' => 'ok', 'some_class' => String, 'some_number' => 42}
11
11
  )
12
12
  fake
13
13
  end
@@ -147,10 +147,15 @@ class TestTripwire < Test::Unit::TestCase
147
147
  assert_kind_of StandardError, list.first
148
148
  end
149
149
 
150
- [:cookies, :session, :user_agent].each do |kind|
150
+ [:cookies, :user_agent].each do |kind|
151
151
  should "log #{kind}" do
152
152
  assert @foo_controller.request.send(kind).present?
153
153
  assert_equal @foo_controller.request.send(kind), JSON.parse(fake_controller(BarController).send(:tripwire_params)[:data])[kind.to_s]
154
154
  end
155
155
  end
156
+
157
+ should "log session" do
158
+ expected = {'something'=>'ok', 'some_class'=>'String', 'some_number'=>'42'}
159
+ assert_equal expected, JSON.parse(fake_controller(BarController).send(:tripwire_params)[:data])['session']
160
+ end
156
161
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{tripwire_notifier}
8
- s.version = "0.2.8"
8
+ s.version = "0.2.9"
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"]
12
- s.date = %q{2011-05-10}
12
+ s.date = %q{2011-05-24}
13
13
  s.description = %q{Tripwire captures validation errors from your Ruby on Rails application to help you identify and fix user experience issues. The TripwireNotifier gem makes it easy to hook up your app to the Tripwire web service.}
14
14
  s.email = %q{support@tripwireapp.com}
15
15
  s.extra_rdoc_files = [
@@ -43,6 +43,8 @@ Gem::Specification.new do |s|
43
43
  s.specification_version = 3
44
44
 
45
45
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
46
+ s.add_development_dependency(%q<actionpack>, ["= 2.3.11"])
47
+ s.add_development_dependency(%q<json>, [">= 0"])
46
48
  s.add_development_dependency(%q<fakeweb>, [">= 0"])
47
49
  s.add_development_dependency(%q<shoulda>, [">= 0"])
48
50
  s.add_development_dependency(%q<mocha>, [">= 0"])
@@ -50,6 +52,8 @@ Gem::Specification.new do |s|
50
52
  s.add_development_dependency(%q<rake>, [">= 0.8.7"])
51
53
  s.add_development_dependency(%q<shoulda>, [">= 0"])
52
54
  else
55
+ s.add_dependency(%q<actionpack>, ["= 2.3.11"])
56
+ s.add_dependency(%q<json>, [">= 0"])
53
57
  s.add_dependency(%q<fakeweb>, [">= 0"])
54
58
  s.add_dependency(%q<shoulda>, [">= 0"])
55
59
  s.add_dependency(%q<mocha>, [">= 0"])
@@ -58,6 +62,8 @@ Gem::Specification.new do |s|
58
62
  s.add_dependency(%q<shoulda>, [">= 0"])
59
63
  end
60
64
  else
65
+ s.add_dependency(%q<actionpack>, ["= 2.3.11"])
66
+ s.add_dependency(%q<json>, [">= 0"])
61
67
  s.add_dependency(%q<fakeweb>, [">= 0"])
62
68
  s.add_dependency(%q<shoulda>, [">= 0"])
63
69
  s.add_dependency(%q<mocha>, [">= 0"])
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: 7
4
+ hash: 5
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 8
10
- version: 0.2.8
9
+ - 9
10
+ version: 0.2.9
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jeffrey Chupp
@@ -16,27 +16,29 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-05-10 00:00:00 -04:00
19
+ date: 2011-05-24 00:00:00 -04:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
23
23
  prerelease: false
24
24
  type: :development
25
- name: fakeweb
25
+ name: actionpack
26
26
  version_requirements: &id001 !ruby/object:Gem::Requirement
27
27
  none: false
28
28
  requirements:
29
- - - ">="
29
+ - - "="
30
30
  - !ruby/object:Gem::Version
31
- hash: 3
31
+ hash: 21
32
32
  segments:
33
- - 0
34
- version: "0"
33
+ - 2
34
+ - 3
35
+ - 11
36
+ version: 2.3.11
35
37
  requirement: *id001
36
38
  - !ruby/object:Gem::Dependency
37
39
  prerelease: false
38
40
  type: :development
39
- name: shoulda
41
+ name: json
40
42
  version_requirements: &id002 !ruby/object:Gem::Requirement
41
43
  none: false
42
44
  requirements:
@@ -50,7 +52,7 @@ dependencies:
50
52
  - !ruby/object:Gem::Dependency
51
53
  prerelease: false
52
54
  type: :development
53
- name: mocha
55
+ name: fakeweb
54
56
  version_requirements: &id003 !ruby/object:Gem::Requirement
55
57
  none: false
56
58
  requirements:
@@ -64,7 +66,7 @@ dependencies:
64
66
  - !ruby/object:Gem::Dependency
65
67
  prerelease: false
66
68
  type: :development
67
- name: redgreen
69
+ name: shoulda
68
70
  version_requirements: &id004 !ruby/object:Gem::Requirement
69
71
  none: false
70
72
  requirements:
@@ -78,8 +80,36 @@ dependencies:
78
80
  - !ruby/object:Gem::Dependency
79
81
  prerelease: false
80
82
  type: :development
81
- name: rake
83
+ name: mocha
82
84
  version_requirements: &id005 !ruby/object:Gem::Requirement
85
+ none: false
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ hash: 3
90
+ segments:
91
+ - 0
92
+ version: "0"
93
+ requirement: *id005
94
+ - !ruby/object:Gem::Dependency
95
+ prerelease: false
96
+ type: :development
97
+ name: redgreen
98
+ version_requirements: &id006 !ruby/object:Gem::Requirement
99
+ none: false
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ hash: 3
104
+ segments:
105
+ - 0
106
+ version: "0"
107
+ requirement: *id006
108
+ - !ruby/object:Gem::Dependency
109
+ prerelease: false
110
+ type: :development
111
+ name: rake
112
+ version_requirements: &id007 !ruby/object:Gem::Requirement
83
113
  none: false
84
114
  requirements:
85
115
  - - ">="
@@ -90,12 +120,12 @@ dependencies:
90
120
  - 8
91
121
  - 7
92
122
  version: 0.8.7
93
- requirement: *id005
123
+ requirement: *id007
94
124
  - !ruby/object:Gem::Dependency
95
125
  prerelease: false
96
126
  type: :development
97
127
  name: shoulda
98
- version_requirements: &id006 !ruby/object:Gem::Requirement
128
+ version_requirements: &id008 !ruby/object:Gem::Requirement
99
129
  none: false
100
130
  requirements:
101
131
  - - ">="
@@ -104,7 +134,7 @@ dependencies:
104
134
  segments:
105
135
  - 0
106
136
  version: "0"
107
- requirement: *id006
137
+ requirement: *id008
108
138
  description: Tripwire captures validation errors from your Ruby on Rails application to help you identify and fix user experience issues. The TripwireNotifier gem makes it easy to hook up your app to the Tripwire web service.
109
139
  email: support@tripwireapp.com
110
140
  executables: []