appstats 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- appstats (0.0.9)
4
+ appstats (0.0.11)
5
5
  rails (>= 2.3.0)
6
6
 
7
7
  GEM
@@ -1,3 +1,3 @@
1
1
  module Appstats
2
- VERSION = "0.0.10"
2
+ VERSION = "0.0.11"
3
3
  end
@@ -127,29 +127,29 @@ module Appstats
127
127
 
128
128
  it "should handle a statistics entry" do
129
129
  expected = { :action => "address_search", :timestamp => "2010-09-21 23:15:20" }
130
- actual = Appstats::Logger.entry_to_hash("0.0.9 setup[:,=,-n] 2010-09-21 23:15:20 action=address_search")
130
+ actual = Appstats::Logger.entry_to_hash("0.0.11 setup[:,=,-n] 2010-09-21 23:15:20 action=address_search")
131
131
  actual.should == expected
132
132
  end
133
133
 
134
134
  it "should handle contexts" do
135
135
  expected = { :action => "address_filter", :timestamp => "2010-09-21 23:15:20", :server => "Live", :app_name => 'Market' }
136
- actual = Appstats::Logger.entry_to_hash("0.0.9 setup[:,=,-n] 2010-09-21 23:15:20 action=address_filter : app_name=Market : server=Live")
136
+ actual = Appstats::Logger.entry_to_hash("0.0.11 setup[:,=,-n] 2010-09-21 23:15:20 action=address_filter : app_name=Market : server=Live")
137
137
  actual.should == expected
138
138
  end
139
139
 
140
140
  it "should handle actions with the delimiter (and change the delimiter)" do
141
141
  expected = { :action => "address:=search-n", :timestamp => "2010-09-21 23:15:20" }
142
- actual = Appstats::Logger.entry_to_hash("0.0.9 setup[::,==,--n] 2010-09-21 23:15:20 action==address:=search-n")
142
+ actual = Appstats::Logger.entry_to_hash("0.0.11 setup[::,==,--n] 2010-09-21 23:15:20 action==address:=search-n")
143
143
  actual.should == expected
144
144
 
145
145
  expected = { :action => "address::search==--n", :timestamp => "2010-09-21 23:15:20" }
146
- actual = Appstats::Logger.entry_to_hash("0.0.9 setup[:::,===,---n] 2010-09-21 23:15:20 action===address::search==--n")
146
+ actual = Appstats::Logger.entry_to_hash("0.0.11 setup[:::,===,---n] 2010-09-21 23:15:20 action===address::search==--n")
147
147
  actual.should == expected
148
148
  end
149
149
 
150
150
  it "should handle contexts with the delimiter (and change the delimiter)" do
151
151
  expected = { :action => "address", :timestamp => "2010-09-21 23:15:20", :server => "market:eval=-n" }
152
- actual = Appstats::Logger.entry_to_hash("0.0.9 setup[::,==,--n] 2010-09-21 23:15:20 action==address :: server==market:eval=-n")
152
+ actual = Appstats::Logger.entry_to_hash("0.0.11 setup[::,==,--n] 2010-09-21 23:15:20 action==address :: server==market:eval=-n")
153
153
  actual.should == expected
154
154
  end
155
155
 
@@ -159,61 +159,57 @@ module Appstats
159
159
  describe "#entry_to_s" do
160
160
 
161
161
  it "should handle a statistics entry" do
162
- expected = "0.0.9 setup[:,=,-n] 2010-09-21 23:15:20 action=address_search"
162
+ expected = "0.0.11 setup[:,=,-n] 2010-09-21 23:15:20 action=address_search"
163
163
  actual = Appstats::Logger.entry_to_s("address_search")
164
164
  actual.should == expected
165
165
  end
166
166
 
167
167
  it "should handle default contexts" do
168
168
  Appstats::Logger.default_contexts[:app_name] = "market"
169
- expected = "0.0.9 setup[:,=,-n] 2010-09-21 23:15:20 action=address_search : app_name=market"
169
+ expected = "0.0.11 setup[:,=,-n] 2010-09-21 23:15:20 action=address_search : app_name=market"
170
170
  actual = Appstats::Logger.entry_to_s("address_search")
171
171
  actual.should == expected
172
172
  end
173
173
 
174
174
  it "should handle contexts (and sort them by symbol)" do
175
- expected = "0.0.9 setup[:,=,-n] 2010-09-21 23:15:20 action=address_filter : app_name=Market : server=Live"
175
+ expected = "0.0.11 setup[:,=,-n] 2010-09-21 23:15:20 action=address_filter : app_name=Market : server=Live"
176
176
  actual = Appstats::Logger.entry_to_s("address_filter", { :server => "Live", :app_name => 'Market' })
177
177
  actual.should == expected
178
178
  end
179
179
 
180
180
  it "should handle actions with the delimiter (and change the delimiter)" do
181
- expected = "0.0.9 setup[::,==,--n] 2010-09-21 23:15:20 action==address:=search-n"
181
+ expected = "0.0.11 setup[::,==,--n] 2010-09-21 23:15:20 action==address:=search-n"
182
182
  actual = Appstats::Logger.entry_to_s("address:=search-n")
183
183
  actual.should == expected
184
184
 
185
- expected = "0.0.9 setup[:::,===,---n] 2010-09-21 23:15:20 action===address::search==--n"
185
+ expected = "0.0.11 setup[:::,===,---n] 2010-09-21 23:15:20 action===address::search==--n"
186
186
  actual = Appstats::Logger.entry_to_s("address::search==--n")
187
187
  actual.should == expected
188
188
  end
189
189
 
190
190
  it "should handle contexts with the delimiter (and change the delimiter)" do
191
- expected = "0.0.9 setup[::,==,--n] 2010-09-21 23:15:20 action==address :: server==market:eval=-n"
191
+ expected = "0.0.11 setup[::,==,--n] 2010-09-21 23:15:20 action==address :: server==market:eval=-n"
192
192
  actual = Appstats::Logger.entry_to_s("address", :server => 'market:eval=-n')
193
193
  actual.should == expected
194
194
  end
195
195
 
196
196
  it "should convert newlines in action" do
197
- expected = "0.0.9 setup[:,=,-n] 2010-09-21 23:15:20 action=address_-nsearch"
197
+ expected = "0.0.11 setup[:,=,-n] 2010-09-21 23:15:20 action=address_-nsearch"
198
198
  actual = Appstats::Logger.entry_to_s("address_\nsearch")
199
199
  actual.should == expected
200
200
  end
201
201
 
202
202
  it "should convert newlines in context" do
203
- expected = "0.0.9 setup[:,=,-n] 2010-09-21 23:15:20 action=address_search : blah=some-nlong-nstatement"
203
+ expected = "0.0.11 setup[:,=,-n] 2010-09-21 23:15:20 action=address_search : blah=some-nlong-nstatement"
204
204
  actual = Appstats::Logger.entry_to_s("address_search",:blah => "some\nlong\nstatement")
205
205
  actual.should == expected
206
206
  end
207
207
 
208
208
  it "should convert newlines based on the delimiter" do
209
- expected = "0.0.9 setup[::,==,--n] 2010-09-21 23:15:20 action==address:=--nsearch-n"
209
+ expected = "0.0.11 setup[::,==,--n] 2010-09-21 23:15:20 action==address:=--nsearch-n"
210
210
  actual = Appstats::Logger.entry_to_s("address:=\nsearch-n")
211
211
  actual.should == expected
212
212
  end
213
-
214
-
215
213
  end
216
-
217
-
218
214
  end
219
215
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appstats
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
4
+ hash: 9
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 10
10
- version: 0.0.10
9
+ - 11
10
+ version: 0.0.11
11
11
  platform: ruby
12
12
  authors:
13
13
  - Andrew Forward