appstats 0.24.0 → 0.25.0

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.24.0)
4
+ appstats (0.25.0)
5
5
  daemons
6
6
  net-scp
7
7
  rails (>= 3.2.1)
@@ -10,7 +10,6 @@ PATH
10
10
  GEM
11
11
  remote: http://rubygems.org/
12
12
  specs:
13
- Saikuro (1.1.0)
14
13
  ZenTest (4.6.2)
15
14
  actionmailer (3.2.1)
16
15
  actionpack (= 3.2.1)
@@ -40,74 +39,26 @@ GEM
40
39
  i18n (~> 0.6)
41
40
  multi_json (~> 1.0)
42
41
  arel (3.0.0)
43
- arrayfields (4.7.4)
44
42
  autotest-fsevent (0.2.7)
45
43
  sys-uname
46
44
  builder (3.0.0)
47
- chronic (0.3.0)
48
- churn (0.0.15)
49
- arrayfields (= 4.7.4)
50
- chronic (>= 0.2.3)
51
- chronic (>= 0.2.3)
52
- fattr (= 2.2.0)
53
- hirb (= 0.5.0)
54
- hirb
55
- jeweler (= 1.6.4)
56
- json (= 1.6.1)
57
- json_pure
58
- main
59
- main (>= 4.6.0)
60
- map (= 4.3.0)
61
- ruby_parser (= 2.3.1)
62
- ruby_parser (~> 2.3)
63
- sexp_processor (= 3.0.7)
64
- sexp_processor (~> 3.0.3)
65
- colored (1.2)
66
45
  daemons (1.1.6)
67
46
  diff-lcs (1.1.3)
68
47
  erubis (2.7.0)
69
- fattr (2.2.0)
70
48
  ffi (1.0.11)
71
- flay (1.4.3)
72
- ruby_parser (~> 2.0)
73
- sexp_processor (~> 3.0)
74
- flog (2.5.3)
75
- ruby_parser (~> 2.0)
76
- sexp_processor (~> 3.0)
77
- git (1.2.5)
78
49
  guard (1.0.0)
79
50
  ffi (>= 0.5.0)
80
51
  thor (~> 0.14.6)
81
52
  guard-rspec (0.6.0)
82
53
  guard (>= 0.10.0)
83
54
  hike (1.2.1)
84
- hirb (0.5.0)
85
55
  i18n (0.6.0)
86
- jeweler (1.6.4)
87
- bundler (~> 1.0)
88
- git (>= 1.2.5)
89
- rake
90
56
  journey (1.0.1)
91
- json (1.6.1)
92
- json_pure (1.6.5)
57
+ json (1.6.5)
93
58
  mail (2.4.1)
94
59
  i18n (>= 0.4.0)
95
60
  mime-types (~> 1.16)
96
61
  treetop (~> 1.4.8)
97
- main (4.7.1)
98
- map (4.3.0)
99
- metric_fu (2.1.1)
100
- Saikuro (>= 1.1.0)
101
- activesupport (>= 2.0.0)
102
- chronic (~> 0.3.0)
103
- churn (>= 0.0.7)
104
- flay (>= 1.2.1)
105
- flog (>= 2.3.0)
106
- rails_best_practices (>= 0.6.4)
107
- rcov (>= 0.8.3.3)
108
- reek (>= 1.2.6)
109
- roodi (>= 2.1.0)
110
- syntax
111
62
  mime-types (1.17.2)
112
63
  multi_json (1.0.4)
113
64
  mysql2 (0.3.11)
@@ -115,7 +66,6 @@ GEM
115
66
  net-ssh (>= 1.99.1)
116
67
  net-ssh (2.3.0)
117
68
  polyglot (0.3.3)
118
- progressbar (0.9.2)
119
69
  rack (1.4.1)
120
70
  rack-cache (1.1)
121
71
  rack (>= 0.4)
@@ -131,13 +81,6 @@ GEM
131
81
  activesupport (= 3.2.1)
132
82
  bundler (~> 1.0)
133
83
  railties (= 3.2.1)
134
- rails_best_practices (1.7.2)
135
- activesupport
136
- colored
137
- erubis
138
- i18n
139
- progressbar
140
- sexp_processor
141
84
  railties (3.2.1)
142
85
  actionpack (= 3.2.1)
143
86
  activesupport (= 3.2.1)
@@ -147,16 +90,9 @@ GEM
147
90
  thor (~> 0.14.6)
148
91
  rake (0.9.2.2)
149
92
  rb-fsevent (0.9.0)
150
- rcov (1.0.0)
151
93
  rdoc (3.12)
152
94
  json (~> 1.4)
153
95
  redis (2.2.2)
154
- reek (1.2.8)
155
- ruby2ruby (~> 1.2)
156
- ruby_parser (~> 2.0)
157
- sexp_processor (~> 3.0)
158
- roodi (2.1.0)
159
- ruby_parser
160
96
  rspec (2.8.0)
161
97
  rspec-core (~> 2.8.0)
162
98
  rspec-expectations (~> 2.8.0)
@@ -165,20 +101,13 @@ GEM
165
101
  rspec-expectations (2.8.0)
166
102
  diff-lcs (~> 1.1.2)
167
103
  rspec-mocks (2.8.0)
168
- ruby2ruby (1.3.1)
169
- ruby_parser (~> 2.0)
170
- sexp_processor (~> 3.0)
171
- ruby_parser (2.3.1)
172
- sexp_processor (~> 3.0)
173
- sexp_processor (3.0.7)
174
104
  sprockets (2.1.2)
175
105
  hike (~> 1.2)
176
106
  rack (~> 1.0)
177
- tilt (!= 1.3.0, ~> 1.1)
107
+ tilt (~> 1.1, != 1.3.0)
178
108
  standalone_migrations (1.0.5)
179
109
  activerecord (>= 3)
180
110
  rake
181
- syntax (1.0.0)
182
111
  sys-uname (0.9.0)
183
112
  ffi (>= 1.0.0)
184
113
  thor (0.14.6)
@@ -196,7 +125,6 @@ DEPENDENCIES
196
125
  appstats!
197
126
  autotest-fsevent
198
127
  guard-rspec
199
- metric_fu
200
128
  mysql2
201
129
  rake
202
130
  rb-fsevent
data/Rakefile CHANGED
@@ -10,7 +10,6 @@ if ENV['RAILS_BUNDLE_FIRST']
10
10
  end
11
11
 
12
12
  require 'appstats/tasks'
13
- require 'metric_fu'
14
13
  require 'rspec/core/rake_task'
15
14
  require 'tasks/standalone_migrations'
16
15
 
@@ -26,9 +25,3 @@ RSpec::Core::RakeTask.new(:spec) do |t|
26
25
  t.pattern = "spec/*_spec.rb"
27
26
  t.rspec_opts = "--color"
28
27
  end
29
-
30
- MetricFu::Configuration.run do |config|
31
- config.metrics = [:rcov]
32
- config.rcov[:test_files] = ['spec/*_spec.rb']
33
- config.rcov[:rcov_opts] << '-Ispec'
34
- end
@@ -22,7 +22,6 @@ Gem::Specification.new do |s|
22
22
  s.add_development_dependency('ZenTest')
23
23
  s.add_development_dependency('standalone_migrations')
24
24
  s.add_development_dependency('mysql2')
25
- s.add_development_dependency('metric_fu')
26
25
  s.add_development_dependency('guard-rspec')
27
26
  s.add_development_dependency('autotest-fsevent') if RUBY_PLATFORM =~ /darwin/i
28
27
  s.add_development_dependency('rb-fsevent') if RUBY_PLATFORM =~ /darwin/i
@@ -23,7 +23,6 @@ unless ARGV.any? {|a| a =~ /^gems/} # Don't load anything when running the gems:
23
23
  desc "Run QA"
24
24
  task :qa do
25
25
  Rake::Task['ci:rspec'].invoke
26
- Rake::Task['ci:rcov'].invoke
27
26
  end
28
27
 
29
28
  desc "Run Rspec"
@@ -38,18 +37,6 @@ unless ARGV.any? {|a| a =~ /^gems/} # Don't load anything when running the gems:
38
37
  t.fail_on_error = true
39
38
  end
40
39
 
41
- desc "Run Rcov"
42
- task :rcov do
43
- system "mkdir -p ../public/coverage" unless File.exists?("../public/coverage")
44
- Rake::Task['ci:rcov_run'].invoke
45
- end
46
-
47
- RSpec::Core::RakeTask.new(:rcov_run) do |t|
48
- t.pattern = "./spec/**/*spec.rb"
49
- t.rcov = true
50
- t.rcov_opts = %w{--exclude osx\/objc,gems\/,spec\/,features\/ --output ../public/coverage}
51
- end
52
-
53
40
  desc "The Build Succeeded, so tell our monitoring service"
54
41
  task :success do
55
42
  if File.exists?("/home/deployer/monitor/log")
@@ -38,8 +38,12 @@ module Appstats
38
38
  puts "Creating migrate directory"
39
39
  mkdir @app_migrate
40
40
  end
41
- puts "Moving migrations files from:\n> #{@gem_migrations}\nTo\n> #{@app_migrate}"
42
- system "cp -R #{@gem_migrations}/* #{@app_migrate}"
41
+ if @gem_migrations == @app_migrate
42
+ puts "Migrations already in the right place! (#{@app_migrate})"
43
+ else
44
+ puts "Moving migrations files from:\n> #{@gem_migrations}\nTo\n> #{@app_migrate}"
45
+ system "cp -R #{@gem_migrations}/* #{@app_migrate}"
46
+ end
43
47
  end
44
48
 
45
49
  desc "Install the logger for this gem (for application instances that log statistics)"
@@ -1,3 +1,3 @@
1
1
  module Appstats
2
- VERSION = "0.24.0"
2
+ VERSION = "0.25.0"
3
3
  end
@@ -94,49 +94,61 @@ module Appstats
94
94
  all[0].column_type.should == nil
95
95
  all[0].obj_type.should == nil
96
96
 
97
- all[1].obj_attr.should == "blah_string"
98
- all[1].column_type.should == "varchar(255)"
99
- all[1].obj_type.should == "string"
100
-
101
- all[2].obj_attr.should == "blah_timestamp"
97
+ all[1].obj_attr.should == "id"
98
+ all[1].column_type.should == "int(11)"
99
+ all[1].obj_type.should == "integer"
100
+
101
+ all[2].obj_attr.should == "created_at"
102
102
  all[2].column_type.should == "datetime"
103
103
  all[2].obj_type.should == "datetime"
104
104
 
105
- all[3].obj_attr.should == "created_at"
105
+ all[3].obj_attr.should == "updated_at"
106
106
  all[3].column_type.should == "datetime"
107
107
  all[3].obj_type.should == "datetime"
108
+
109
+ all[4].obj_attr.should == "blah_binary"
110
+ all[4].column_type.should == "blob"
111
+ all[4].obj_type.should == "binary"
112
+
113
+ all[5].obj_attr.should == "blah_boolean"
114
+ all[5].column_type.should == "tinyint(1)"
115
+ all[5].obj_type.should == "boolean"
108
116
 
109
- all[4].obj_attr.should == "updated_at"
110
- all[4].column_type.should == "datetime"
111
- all[4].obj_type.should == "datetime"
112
-
113
- all[5].obj_attr.should == "blah_decimal"
114
- all[5].column_type.should == "decimal(10,0)"
115
- all[5].obj_type.should == "integer"
116
-
117
- all[6].obj_attr.should == "id"
118
- all[6].column_type.should == "int(11)"
119
- all[6].obj_type.should == "integer"
117
+ all[6].obj_attr.should == "blah_date"
118
+ all[6].column_type.should == "date"
119
+ all[6].obj_type.should == "date"
120
120
 
121
- all[7].obj_attr.should == "blah_boolean"
122
- all[7].column_type.should == "tinyint(1)"
123
- all[7].obj_type.should == "boolean"
121
+ all[7].obj_attr.should == "blah_datetime"
122
+ all[7].column_type.should == "datetime"
123
+ all[7].obj_type.should == "datetime"
124
+
125
+ all[8].obj_attr.should == "blah_decimal"
126
+ all[8].column_type.should == "decimal(10,0)"
127
+ all[8].obj_type.should == "integer"
124
128
 
125
- all[8].obj_attr.should == "blah_binary"
126
- all[8].column_type.should == "blob"
127
- all[8].obj_type.should == "binary"
129
+ all[9].obj_attr.should == "blah_float"
130
+ all[9].column_type.should == "float"
131
+ all[9].obj_type.should == "float"
128
132
 
129
- all[9].obj_attr.should == "blah_time"
130
- all[9].column_type.should == "time"
131
- all[9].obj_type.should == "time"
133
+ all[10].obj_attr.should == "blah_integer"
134
+ all[10].column_type.should == "int(11)"
135
+ all[10].obj_type.should == "integer"
132
136
 
133
- all[10].obj_attr.should == "blah_text"
134
- all[10].column_type.should == "text"
135
- all[10].obj_type.should == "text"
137
+ all[11].obj_attr.should == "blah_string"
138
+ all[11].column_type.should == "varchar(255)"
139
+ all[11].obj_type.should == "string"
140
+
141
+ all[12].obj_attr.should == "blah_text"
142
+ all[12].column_type.should == "text"
143
+ all[12].obj_type.should == "text"
144
+
145
+ all[13].obj_attr.should == "blah_time"
146
+ all[13].column_type.should == "time"
147
+ all[13].obj_type.should == "time"
136
148
 
137
- all[11].obj_attr.should == "blah_integer"
138
- all[11].column_type.should == "int(11)"
139
- all[11].obj_type.should == "integer"
149
+ all[14].obj_attr.should == "blah_timestamp"
150
+ all[14].column_type.should == "datetime"
151
+ all[14].obj_type.should == "datetime"
140
152
  end
141
153
 
142
154
  end
@@ -311,6 +323,7 @@ module Appstats
311
323
  Audit.count.should == 5
312
324
 
313
325
  all = Audit.all
326
+
314
327
  audit = all[0]
315
328
  audit.table_name.should == "appstats_test_objects"
316
329
  audit.obj_name.should == "Appstats::TestObject"
@@ -325,6 +338,17 @@ module Appstats
325
338
  audit = all[1]
326
339
  audit.table_name.should == "appstats_test_objects"
327
340
  audit.obj_name.should == "Appstats::TestObject"
341
+ audit.obj_attr.should == 'id'
342
+ audit.obj_id.should == t.id
343
+ audit.action.should == "created"
344
+ audit.old_value.should == nil
345
+ audit.new_value.should == "#{t.id}"
346
+ audit.old_value_full.should == nil
347
+ audit.new_value_full.should == "#{t.id}"
348
+
349
+ audit = all[2]
350
+ audit.table_name.should == "appstats_test_objects"
351
+ audit.obj_name.should == "Appstats::TestObject"
328
352
  audit.obj_attr.should == 'name'
329
353
  audit.obj_id.should == t.id
330
354
  audit.action.should == "created"
@@ -333,7 +357,7 @@ module Appstats
333
357
  audit.old_value_full.should == nil
334
358
  audit.new_value_full.should == 'a'
335
359
 
336
- audit = all[2]
360
+ audit = all[3]
337
361
  audit.table_name.should == "appstats_test_objects"
338
362
  audit.obj_name.should == "Appstats::TestObject"
339
363
  audit.obj_attr.should == 'created_at'
@@ -344,7 +368,7 @@ module Appstats
344
368
  audit.old_value_full.should == nil
345
369
  audit.new_value_full.should == t.created_at.strftime("%Y-%m-%d %H:%M:%S")
346
370
 
347
- audit = all[3]
371
+ audit = all[4]
348
372
  audit.table_name.should == "appstats_test_objects"
349
373
  audit.obj_name.should == "Appstats::TestObject"
350
374
  audit.obj_attr.should == 'updated_at'
@@ -193,18 +193,18 @@ module Appstats
193
193
  end
194
194
 
195
195
  it "should understand an entry without contexts" do
196
- entry = Entry.create_from_logger_string("0.24.0 setup[:,=,-n] 2010-09-21 23:15:20 action=address_search")
196
+ entry = Entry.create_from_logger_string("0.25.0 setup[:,=,-n] 2010-09-21 23:15:20 action=address_search")
197
197
  Entry.count.should == @before_count + 1
198
198
  entry.action.should == "address_search"
199
- entry.raw_entry.should == "0.24.0 setup[:,=,-n] 2010-09-21 23:15:20 action=address_search"
199
+ entry.raw_entry.should == "0.25.0 setup[:,=,-n] 2010-09-21 23:15:20 action=address_search"
200
200
  entry.occurred_at.should == Time.parse("2010-09-21 23:15:20")
201
201
  end
202
202
 
203
203
  it "should understand contexts" do
204
- entry = Entry.create_from_logger_string("0.24.0 setup[:,=,-n] 2010-09-21 23:15:20 action=address_filter : app_name=Market : server=Live")
204
+ entry = Entry.create_from_logger_string("0.25.0 setup[:,=,-n] 2010-09-21 23:15:20 action=address_filter : app_name=Market : server=Live")
205
205
  Entry.count.should == @before_count + 1
206
206
  entry.action.should == "address_filter"
207
- entry.raw_entry.should == "0.24.0 setup[:,=,-n] 2010-09-21 23:15:20 action=address_filter : app_name=Market : server=Live"
207
+ entry.raw_entry.should == "0.25.0 setup[:,=,-n] 2010-09-21 23:15:20 action=address_filter : app_name=Market : server=Live"
208
208
  entry.occurred_at.should == Time.parse("2010-09-21 23:15:20")
209
209
  entry.contexts.size.should == 2
210
210
  entry.contexts[0].context_key = "app_name"
@@ -214,10 +214,10 @@ module Appstats
214
214
  end
215
215
 
216
216
  it "should handle 'action' as a context" do
217
- entry = Entry.create_from_logger_string('0.24.0 setup[:,=,-n] 2011-02-24 12:59:57 action=page-view : action=save_ovcen : app_name=cdb')
217
+ entry = Entry.create_from_logger_string('0.25.0 setup[:,=,-n] 2011-02-24 12:59:57 action=page-view : action=save_ovcen : app_name=cdb')
218
218
  Entry.count.should == @before_count + 1
219
219
  entry.action.should == "page-view"
220
- entry.raw_entry.should == "0.24.0 setup[:,=,-n] 2011-02-24 12:59:57 action=page-view : action=save_ovcen : app_name=cdb"
220
+ entry.raw_entry.should == "0.25.0 setup[:,=,-n] 2011-02-24 12:59:57 action=page-view : action=save_ovcen : app_name=cdb"
221
221
  entry.occurred_at.should == Time.parse("2011-02-24 12:59:57")
222
222
  entry.contexts.size.should == 2
223
223
  entry.contexts[0].context_key = "action"
@@ -228,10 +228,10 @@ module Appstats
228
228
  end
229
229
 
230
230
  it "should handle multiple of the same 'context'" do
231
- entry = Entry.create_from_logger_string('0.24.0 setup[:,=,-n] 2011-02-24 12:59:57 action=page-view : app_name=market : app_name=cdb')
231
+ entry = Entry.create_from_logger_string('0.25.0 setup[:,=,-n] 2011-02-24 12:59:57 action=page-view : app_name=market : app_name=cdb')
232
232
  Entry.count.should == @before_count + 1
233
233
  entry.action.should == "page-view"
234
- entry.raw_entry.should == "0.24.0 setup[:,=,-n] 2011-02-24 12:59:57 action=page-view : app_name=market : app_name=cdb"
234
+ entry.raw_entry.should == "0.25.0 setup[:,=,-n] 2011-02-24 12:59:57 action=page-view : app_name=market : app_name=cdb"
235
235
  entry.occurred_at.should == Time.parse("2011-02-24 12:59:57")
236
236
  entry.contexts.size.should == 2
237
237
  entry.contexts[0].context_key = "app_name"
@@ -122,12 +122,12 @@ module Appstats
122
122
 
123
123
  it "should accept numbers" do
124
124
  Appstats::Logger.entry(5, :blah => 6)
125
- Appstats::Logger.raw_read.should == ["0.24.0 setup[:,=,-n] 2010-09-21 23:15:20 action=5 : blah=6"]
125
+ Appstats::Logger.raw_read.should == ["0.25.0 setup[:,=,-n] 2010-09-21 23:15:20 action=5 : blah=6"]
126
126
  end
127
127
 
128
128
  it "should accept arrays" do
129
129
  Appstats::Logger.entry('search', :provider => [ 'one', 'two' ])
130
- Appstats::Logger.raw_read.should == ["0.24.0 setup[:,=,-n] 2010-09-21 23:15:20 action=search : provider=one : provider=two"]
130
+ Appstats::Logger.raw_read.should == ["0.25.0 setup[:,=,-n] 2010-09-21 23:15:20 action=search : provider=one : provider=two"]
131
131
  end
132
132
 
133
133
 
@@ -137,7 +137,7 @@ module Appstats
137
137
 
138
138
  it "should look similar to regular entry" do
139
139
  Appstats::Logger.exception_entry(RuntimeError.new("blah"),:on => "login")
140
- Appstats::Logger.raw_read.should == ["0.24.0 setup[:,=,-n] 2010-09-21 23:15:20 action=appstats-exception : error=blah : on=login"]
140
+ Appstats::Logger.raw_read.should == ["0.25.0 setup[:,=,-n] 2010-09-21 23:15:20 action=appstats-exception : error=blah : on=login"]
141
141
  end
142
142
 
143
143
  end
@@ -154,47 +154,47 @@ module Appstats
154
154
 
155
155
  it "should handle a statistics entry" do
156
156
  expected = { :action => "address_search", :timestamp => "2010-09-21 23:15:20" }
157
- actual = Appstats::Logger.entry_to_hash("0.24.0 setup[:,=,-n] 2010-09-21 23:15:20 action=address_search")
157
+ actual = Appstats::Logger.entry_to_hash("0.25.0 setup[:,=,-n] 2010-09-21 23:15:20 action=address_search")
158
158
  actual.should == expected
159
159
  end
160
160
 
161
161
  it "should handle contexts" do
162
162
  expected = { :action => "address_filter", :timestamp => "2010-09-21 23:15:20", :server => "Live", :app_name => 'Market' }
163
- actual = Appstats::Logger.entry_to_hash("0.24.0 setup[:,=,-n] 2010-09-21 23:15:20 action=address_filter : app_name=Market : server=Live")
163
+ actual = Appstats::Logger.entry_to_hash("0.25.0 setup[:,=,-n] 2010-09-21 23:15:20 action=address_filter : app_name=Market : server=Live")
164
164
  actual.should == expected
165
165
  end
166
166
 
167
167
  it "should handle multiple actions" do
168
168
  expected = { :action => ["address_filter", "blah"], :timestamp => "2010-09-21 23:15:20", :server => "Live", :app_name => 'Market' }
169
- actual = Appstats::Logger.entry_to_hash("0.24.0 setup[:,=,-n] 2010-09-21 23:15:20 action=address_filter : action=blah : app_name=Market : server=Live")
169
+ actual = Appstats::Logger.entry_to_hash("0.25.0 setup[:,=,-n] 2010-09-21 23:15:20 action=address_filter : action=blah : app_name=Market : server=Live")
170
170
  actual.should == expected
171
171
  end
172
172
 
173
173
  it "should handle multiple of same context" do
174
174
  expected = { :action => "address_filter", :timestamp => "2010-09-21 23:15:20", :server => "Live", :app_name => ['Sin','Market'] }
175
- actual = Appstats::Logger.entry_to_hash("0.24.0 setup[:,=,-n] 2010-09-21 23:15:20 action=address_filter : app_name=Sin : app_name=Market : server=Live")
175
+ actual = Appstats::Logger.entry_to_hash("0.25.0 setup[:,=,-n] 2010-09-21 23:15:20 action=address_filter : app_name=Sin : app_name=Market : server=Live")
176
176
  actual.should == expected
177
177
  end
178
178
 
179
179
  it "should handle no actions" do
180
180
  expected = { :action => "UNKNOWN_ACTION", :timestamp => "2010-09-21 23:15:20", :server => "Live", :app_name => 'Market' }
181
- actual = Appstats::Logger.entry_to_hash("0.24.0 setup[:,=,-n] 2010-09-21 23:15:20 app_name=Market : server=Live")
181
+ actual = Appstats::Logger.entry_to_hash("0.25.0 setup[:,=,-n] 2010-09-21 23:15:20 app_name=Market : server=Live")
182
182
  actual.should == expected
183
183
  end
184
184
 
185
185
  it "should handle actions with the delimiter (and change the delimiter)" do
186
186
  expected = { :action => "address:=search-n", :timestamp => "2010-09-21 23:15:20" }
187
- actual = Appstats::Logger.entry_to_hash("0.24.0 setup[::,==,--n] 2010-09-21 23:15:20 action==address:=search-n")
187
+ actual = Appstats::Logger.entry_to_hash("0.25.0 setup[::,==,--n] 2010-09-21 23:15:20 action==address:=search-n")
188
188
  actual.should == expected
189
189
 
190
190
  expected = { :action => "address::search==--n", :timestamp => "2010-09-21 23:15:20" }
191
- actual = Appstats::Logger.entry_to_hash("0.24.0 setup[:::,===,---n] 2010-09-21 23:15:20 action===address::search==--n")
191
+ actual = Appstats::Logger.entry_to_hash("0.25.0 setup[:::,===,---n] 2010-09-21 23:15:20 action===address::search==--n")
192
192
  actual.should == expected
193
193
  end
194
194
 
195
195
  it "should handle contexts with the delimiter (and change the delimiter)" do
196
196
  expected = { :action => "address", :timestamp => "2010-09-21 23:15:20", :server => "market:eval=-n" }
197
- actual = Appstats::Logger.entry_to_hash("0.24.0 setup[::,==,--n] 2010-09-21 23:15:20 action==address :: server==market:eval=-n")
197
+ actual = Appstats::Logger.entry_to_hash("0.25.0 setup[::,==,--n] 2010-09-21 23:15:20 action==address :: server==market:eval=-n")
198
198
  actual.should == expected
199
199
  end
200
200
 
@@ -203,66 +203,66 @@ module Appstats
203
203
  describe "#entry_to_s" do
204
204
 
205
205
  it "should handle a statistics entry" do
206
- expected = "0.24.0 setup[:,=,-n] 2010-09-21 23:15:20 action=address_search"
206
+ expected = "0.25.0 setup[:,=,-n] 2010-09-21 23:15:20 action=address_search"
207
207
  actual = Appstats::Logger.entry_to_s("address_search")
208
208
  actual.should == expected
209
209
  end
210
210
 
211
211
  it "should handle numbers" do
212
- expected = "0.24.0 setup[:,=,-n] 2010-09-21 23:15:20 action=1 : note=2.2"
212
+ expected = "0.25.0 setup[:,=,-n] 2010-09-21 23:15:20 action=1 : note=2.2"
213
213
  actual = Appstats::Logger.entry_to_s(1,:note => 2.2)
214
214
  actual.should == expected
215
215
  end
216
216
 
217
217
  it "should handle default contexts" do
218
218
  Appstats::Logger.default_contexts[:app_name] = "market"
219
- expected = "0.24.0 setup[:,=,-n] 2010-09-21 23:15:20 action=address_search : app_name=market"
219
+ expected = "0.25.0 setup[:,=,-n] 2010-09-21 23:15:20 action=address_search : app_name=market"
220
220
  actual = Appstats::Logger.entry_to_s("address_search")
221
221
  actual.should == expected
222
222
  end
223
223
 
224
224
  it "should handle contexts (and sort them by symbol)" do
225
- expected = "0.24.0 setup[:,=,-n] 2010-09-21 23:15:20 action=address_filter : app_name=Market : server=Live"
225
+ expected = "0.25.0 setup[:,=,-n] 2010-09-21 23:15:20 action=address_filter : app_name=Market : server=Live"
226
226
  actual = Appstats::Logger.entry_to_s("address_filter", { :server => "Live", :app_name => 'Market' })
227
227
  actual.should == expected
228
228
  end
229
229
 
230
230
  it "should handle actions with the delimiter (and change the delimiter)" do
231
- expected = "0.24.0 setup[::,==,--n] 2010-09-21 23:15:20 action==address:=search-n"
231
+ expected = "0.25.0 setup[::,==,--n] 2010-09-21 23:15:20 action==address:=search-n"
232
232
  actual = Appstats::Logger.entry_to_s("address:=search-n")
233
233
  actual.should == expected
234
234
 
235
- expected = "0.24.0 setup[:::,===,---n] 2010-09-21 23:15:20 action===address::search==--n"
235
+ expected = "0.25.0 setup[:::,===,---n] 2010-09-21 23:15:20 action===address::search==--n"
236
236
  actual = Appstats::Logger.entry_to_s("address::search==--n")
237
237
  actual.should == expected
238
238
  end
239
239
 
240
240
  it "should handle contexts with the delimiter (and change the delimiter)" do
241
- expected = "0.24.0 setup[::,==,--n] 2010-09-21 23:15:20 action==address :: server==market:eval=-n"
241
+ expected = "0.25.0 setup[::,==,--n] 2010-09-21 23:15:20 action==address :: server==market:eval=-n"
242
242
  actual = Appstats::Logger.entry_to_s("address", :server => 'market:eval=-n')
243
243
  actual.should == expected
244
244
  end
245
245
 
246
246
  it "should ignore spaces" do
247
- expected = "0.24.0 setup[:,=,-n] 2010-09-21 23:15:20 action=address search"
247
+ expected = "0.25.0 setup[:,=,-n] 2010-09-21 23:15:20 action=address search"
248
248
  actual = Appstats::Logger.entry_to_s("address search")
249
249
  actual.should == expected
250
250
  end
251
251
 
252
252
  it "should convert newlines in action" do
253
- expected = "0.24.0 setup[:,=,-n] 2010-09-21 23:15:20 action=address_-nsearch"
253
+ expected = "0.25.0 setup[:,=,-n] 2010-09-21 23:15:20 action=address_-nsearch"
254
254
  actual = Appstats::Logger.entry_to_s("address_\nsearch")
255
255
  actual.should == expected
256
256
  end
257
257
 
258
258
  it "should convert newlines in context" do
259
- expected = "0.24.0 setup[:,=,-n] 2010-09-21 23:15:20 action=address_search : blah=some-nlong-nstatement"
259
+ expected = "0.25.0 setup[:,=,-n] 2010-09-21 23:15:20 action=address_search : blah=some-nlong-nstatement"
260
260
  actual = Appstats::Logger.entry_to_s("address_search",:blah => "some\nlong\nstatement")
261
261
  actual.should == expected
262
262
  end
263
263
 
264
264
  it "should convert newlines based on the delimiter" do
265
- expected = "0.24.0 setup[::,==,--n] 2010-09-21 23:15:20 action==address:=--nsearch-n"
265
+ expected = "0.25.0 setup[::,==,--n] 2010-09-21 23:15:20 action==address:=--nsearch-n"
266
266
  actual = Appstats::Logger.entry_to_s("address:=\nsearch-n")
267
267
  actual.should == expected
268
268
  end
metadata CHANGED
@@ -1,216 +1,155 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: appstats
3
- version: !ruby/object:Gem::Version
4
- hash: 127
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.25.0
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 24
9
- - 0
10
- version: 0.24.0
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Andrew Forward
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2012-01-30 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
12
+ date: 2012-01-30 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
21
15
  name: rails
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &70145900976520 !ruby/object:Gem::Requirement
24
17
  none: false
25
- requirements:
26
- - - ">="
27
- - !ruby/object:Gem::Version
28
- hash: 13
29
- segments:
30
- - 3
31
- - 2
32
- - 1
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
33
21
  version: 3.2.1
34
22
  type: :runtime
35
- version_requirements: *id001
36
- - !ruby/object:Gem::Dependency
37
- name: daemons
38
23
  prerelease: false
39
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: *70145900976520
25
+ - !ruby/object:Gem::Dependency
26
+ name: daemons
27
+ requirement: &70145900976060 !ruby/object:Gem::Requirement
40
28
  none: false
41
- requirements:
42
- - - ">="
43
- - !ruby/object:Gem::Version
44
- hash: 3
45
- segments:
46
- - 0
47
- version: "0"
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
48
33
  type: :runtime
49
- version_requirements: *id002
50
- - !ruby/object:Gem::Dependency
51
- name: net-scp
52
34
  prerelease: false
53
- requirement: &id003 !ruby/object:Gem::Requirement
35
+ version_requirements: *70145900976060
36
+ - !ruby/object:Gem::Dependency
37
+ name: net-scp
38
+ requirement: &70145900975280 !ruby/object:Gem::Requirement
54
39
  none: false
55
- requirements:
56
- - - ">="
57
- - !ruby/object:Gem::Version
58
- hash: 3
59
- segments:
60
- - 0
61
- version: "0"
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
62
44
  type: :runtime
63
- version_requirements: *id003
64
- - !ruby/object:Gem::Dependency
65
- name: redis
66
45
  prerelease: false
67
- requirement: &id004 !ruby/object:Gem::Requirement
46
+ version_requirements: *70145900975280
47
+ - !ruby/object:Gem::Dependency
48
+ name: redis
49
+ requirement: &70145900974560 !ruby/object:Gem::Requirement
68
50
  none: false
69
- requirements:
70
- - - ">="
71
- - !ruby/object:Gem::Version
72
- hash: 3
73
- segments:
74
- - 0
75
- version: "0"
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
76
55
  type: :runtime
77
- version_requirements: *id004
78
- - !ruby/object:Gem::Dependency
79
- name: rake
80
56
  prerelease: false
81
- requirement: &id005 !ruby/object:Gem::Requirement
57
+ version_requirements: *70145900974560
58
+ - !ruby/object:Gem::Dependency
59
+ name: rake
60
+ requirement: &70145900973800 !ruby/object:Gem::Requirement
82
61
  none: false
83
- requirements:
84
- - - ">="
85
- - !ruby/object:Gem::Version
86
- hash: 3
87
- segments:
88
- - 0
89
- version: "0"
62
+ requirements:
63
+ - - ! '>='
64
+ - !ruby/object:Gem::Version
65
+ version: '0'
90
66
  type: :development
91
- version_requirements: *id005
92
- - !ruby/object:Gem::Dependency
93
- name: rspec
94
67
  prerelease: false
95
- requirement: &id006 !ruby/object:Gem::Requirement
68
+ version_requirements: *70145900973800
69
+ - !ruby/object:Gem::Dependency
70
+ name: rspec
71
+ requirement: &70145900972740 !ruby/object:Gem::Requirement
96
72
  none: false
97
- requirements:
98
- - - ">="
99
- - !ruby/object:Gem::Version
100
- hash: 3
101
- segments:
102
- - 0
103
- version: "0"
73
+ requirements:
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
104
77
  type: :development
105
- version_requirements: *id006
106
- - !ruby/object:Gem::Dependency
107
- name: ZenTest
108
78
  prerelease: false
109
- requirement: &id007 !ruby/object:Gem::Requirement
79
+ version_requirements: *70145900972740
80
+ - !ruby/object:Gem::Dependency
81
+ name: ZenTest
82
+ requirement: &70145900971920 !ruby/object:Gem::Requirement
110
83
  none: false
111
- requirements:
112
- - - ">="
113
- - !ruby/object:Gem::Version
114
- hash: 3
115
- segments:
116
- - 0
117
- version: "0"
84
+ requirements:
85
+ - - ! '>='
86
+ - !ruby/object:Gem::Version
87
+ version: '0'
118
88
  type: :development
119
- version_requirements: *id007
120
- - !ruby/object:Gem::Dependency
121
- name: standalone_migrations
122
89
  prerelease: false
123
- requirement: &id008 !ruby/object:Gem::Requirement
90
+ version_requirements: *70145900971920
91
+ - !ruby/object:Gem::Dependency
92
+ name: standalone_migrations
93
+ requirement: &70145900971280 !ruby/object:Gem::Requirement
124
94
  none: false
125
- requirements:
126
- - - ">="
127
- - !ruby/object:Gem::Version
128
- hash: 3
129
- segments:
130
- - 0
131
- version: "0"
95
+ requirements:
96
+ - - ! '>='
97
+ - !ruby/object:Gem::Version
98
+ version: '0'
132
99
  type: :development
133
- version_requirements: *id008
134
- - !ruby/object:Gem::Dependency
135
- name: mysql2
136
100
  prerelease: false
137
- requirement: &id009 !ruby/object:Gem::Requirement
101
+ version_requirements: *70145900971280
102
+ - !ruby/object:Gem::Dependency
103
+ name: mysql2
104
+ requirement: &70145900970280 !ruby/object:Gem::Requirement
138
105
  none: false
139
- requirements:
140
- - - ">="
141
- - !ruby/object:Gem::Version
142
- hash: 3
143
- segments:
144
- - 0
145
- version: "0"
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
146
110
  type: :development
147
- version_requirements: *id009
148
- - !ruby/object:Gem::Dependency
149
- name: metric_fu
150
111
  prerelease: false
151
- requirement: &id010 !ruby/object:Gem::Requirement
152
- none: false
153
- requirements:
154
- - - ">="
155
- - !ruby/object:Gem::Version
156
- hash: 3
157
- segments:
158
- - 0
159
- version: "0"
160
- type: :development
161
- version_requirements: *id010
162
- - !ruby/object:Gem::Dependency
112
+ version_requirements: *70145900970280
113
+ - !ruby/object:Gem::Dependency
163
114
  name: guard-rspec
164
- prerelease: false
165
- requirement: &id011 !ruby/object:Gem::Requirement
115
+ requirement: &70145900969680 !ruby/object:Gem::Requirement
166
116
  none: false
167
- requirements:
168
- - - ">="
169
- - !ruby/object:Gem::Version
170
- hash: 3
171
- segments:
172
- - 0
173
- version: "0"
117
+ requirements:
118
+ - - ! '>='
119
+ - !ruby/object:Gem::Version
120
+ version: '0'
174
121
  type: :development
175
- version_requirements: *id011
176
- - !ruby/object:Gem::Dependency
177
- name: autotest-fsevent
178
122
  prerelease: false
179
- requirement: &id012 !ruby/object:Gem::Requirement
123
+ version_requirements: *70145900969680
124
+ - !ruby/object:Gem::Dependency
125
+ name: autotest-fsevent
126
+ requirement: &70145900969020 !ruby/object:Gem::Requirement
180
127
  none: false
181
- requirements:
182
- - - ">="
183
- - !ruby/object:Gem::Version
184
- hash: 3
185
- segments:
186
- - 0
187
- version: "0"
128
+ requirements:
129
+ - - ! '>='
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
188
132
  type: :development
189
- version_requirements: *id012
190
- - !ruby/object:Gem::Dependency
191
- name: rb-fsevent
192
133
  prerelease: false
193
- requirement: &id013 !ruby/object:Gem::Requirement
134
+ version_requirements: *70145900969020
135
+ - !ruby/object:Gem::Dependency
136
+ name: rb-fsevent
137
+ requirement: &70145900968500 !ruby/object:Gem::Requirement
194
138
  none: false
195
- requirements:
196
- - - ">="
197
- - !ruby/object:Gem::Version
198
- hash: 3
199
- segments:
200
- - 0
201
- version: "0"
139
+ requirements:
140
+ - - ! '>='
141
+ - !ruby/object:Gem::Version
142
+ version: '0'
202
143
  type: :development
203
- version_requirements: *id013
144
+ prerelease: false
145
+ version_requirements: *70145900968500
204
146
  description: Provide usage statistics about how your application is being used
205
- email:
147
+ email:
206
148
  - aforward@gmail.com
207
149
  executables: []
208
-
209
150
  extensions: []
210
-
211
151
  extra_rdoc_files: []
212
-
213
- files:
152
+ files:
214
153
  - .gitignore
215
154
  - Gemfile
216
155
  - Gemfile.lock
@@ -536,38 +475,29 @@ files:
536
475
  - spec/test_object_spec.rb
537
476
  homepage: http://github.com/aforward/appstats
538
477
  licenses: []
539
-
540
478
  post_install_message:
541
479
  rdoc_options: []
542
-
543
- require_paths:
480
+ require_paths:
544
481
  - lib
545
- required_ruby_version: !ruby/object:Gem::Requirement
482
+ required_ruby_version: !ruby/object:Gem::Requirement
546
483
  none: false
547
- requirements:
548
- - - ">="
549
- - !ruby/object:Gem::Version
550
- hash: 3
551
- segments:
552
- - 0
553
- version: "0"
554
- required_rubygems_version: !ruby/object:Gem::Requirement
484
+ requirements:
485
+ - - ! '>='
486
+ - !ruby/object:Gem::Version
487
+ version: '0'
488
+ required_rubygems_version: !ruby/object:Gem::Requirement
555
489
  none: false
556
- requirements:
557
- - - ">="
558
- - !ruby/object:Gem::Version
559
- hash: 3
560
- segments:
561
- - 0
562
- version: "0"
490
+ requirements:
491
+ - - ! '>='
492
+ - !ruby/object:Gem::Version
493
+ version: '0'
563
494
  requirements: []
564
-
565
495
  rubyforge_project:
566
- rubygems_version: 1.8.6
496
+ rubygems_version: 1.8.10
567
497
  signing_key:
568
498
  specification_version: 3
569
499
  summary: Provide usage statistics about how your application is being used
570
- test_files:
500
+ test_files:
571
501
  - spec/action_context_key_spec.rb
572
502
  - spec/action_spec.rb
573
503
  - spec/acts_as_appstatsble_spec.rb