redis_analytics 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/Gemfile.lock +200 -0
  4. data/README.md +4 -2
  5. data/app/controllers/redis_analytics/api_controller.rb +1 -1
  6. data/app/helpers/redis_analytics/visits_helper.rb +1 -1
  7. data/config/routes.rb +1 -0
  8. data/coverage/assets/0.10.2/application.css +799 -0
  9. data/coverage/assets/0.10.2/application.js +1707 -0
  10. data/coverage/assets/0.10.2/colorbox/border.png +0 -0
  11. data/coverage/assets/0.10.2/colorbox/controls.png +0 -0
  12. data/coverage/assets/0.10.2/colorbox/loading.gif +0 -0
  13. data/coverage/assets/0.10.2/colorbox/loading_background.png +0 -0
  14. data/coverage/assets/0.10.2/favicon_green.png +0 -0
  15. data/coverage/assets/0.10.2/favicon_red.png +0 -0
  16. data/coverage/assets/0.10.2/favicon_yellow.png +0 -0
  17. data/coverage/assets/0.10.2/loading.gif +0 -0
  18. data/coverage/assets/0.10.2/magnify.png +0 -0
  19. data/coverage/assets/0.10.2/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  20. data/coverage/assets/0.10.2/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  21. data/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  22. data/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  23. data/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  24. data/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  25. data/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  26. data/coverage/assets/0.10.2/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  27. data/coverage/assets/0.10.2/smoothness/images/ui-icons_222222_256x240.png +0 -0
  28. data/coverage/assets/0.10.2/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
  29. data/coverage/assets/0.10.2/smoothness/images/ui-icons_454545_256x240.png +0 -0
  30. data/coverage/assets/0.10.2/smoothness/images/ui-icons_888888_256x240.png +0 -0
  31. data/coverage/assets/0.10.2/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
  32. data/coverage/index.html +3483 -0
  33. data/lib/redis_analytics/engine.rb +4 -4
  34. data/lib/redis_analytics/helpers.rb +1 -1
  35. data/lib/redis_analytics/metrics.rb +1 -1
  36. data/lib/redis_analytics/version.rb +1 -2
  37. data/lib/redis_analytics/visit.rb +1 -1
  38. data/redis_analytics.gemspec +1 -1
  39. data/spec/lib/redis_analytics/configuration_spec.rb +2 -2
  40. data/test/dummy/Gemfile.lock +121 -0
  41. metadata +32 -5
@@ -5,15 +5,15 @@ module RedisAnalytics
5
5
  module Dashboard
6
6
  class Engine < ::Rails::Engine
7
7
  isolate_namespace RedisAnalytics
8
-
8
+
9
9
  initializer "redis_analytics.middleware" do |app|
10
- app.config.app_middleware.use "RedisAnalytics::Tracker"
10
+ app.config.app_middleware.use RedisAnalytics::Tracker
11
11
  end
12
-
12
+
13
13
  initializer "redis_analytics.view_helpers" do |app|
14
14
  ActionController::Base.send :include, RedisAnalytics::Helpers
15
15
  end
16
-
16
+
17
17
  initializer "redis_analytics.precompile.hook", group: :all do |app|
18
18
  app.config.assets.precompile += %w[
19
19
  redis_analytics/redis_analytics.js
@@ -45,7 +45,7 @@ module RedisAnalytics
45
45
  else
46
46
  return time.zip(union.map{|x| Hash[RedisAnalytics.redis_connection.zrange(x, 0, -1, :with_scores => true)]})
47
47
  end
48
- elsif metric_type(metric_name) == 'Fixnum'
48
+ elsif metric_type(metric_name) == 'Integer'
49
49
  if aggregate
50
50
  return RedisAnalytics.redis_connection.mget(*union).map(&:to_i).inject(:+)
51
51
  else
@@ -8,7 +8,7 @@ module RedisAnalytics
8
8
 
9
9
  # Developers can override or define new public methods here
10
10
  # Methods should start with track and end with count or types
11
- # Return types should be Fixnum or String resp.
11
+ # Return types should be Integer or String resp.
12
12
  # If you return nil or an error nothing will be tracked
13
13
 
14
14
  def browser_ratio_per_visit
@@ -1,4 +1,3 @@
1
1
  module RedisAnalytics
2
- VERSION = '1.0.1'
2
+ VERSION = '1.1.0'
3
3
  end
4
-
@@ -105,7 +105,7 @@ module RedisAnalytics
105
105
  RedisAnalytics.redis_connection.hmset("#{@redis_key_prefix}#METRICS", metric_name, metric_value.class)
106
106
  for_each_time_range(@t) do |ts|
107
107
  key = "#{@redis_key_prefix}#{metric_name}:#{ts}"
108
- if metric_value.is_a?(Fixnum)
108
+ if metric_value.is_a?(Integer)
109
109
  n = RedisAnalytics.redis_connection.incrby(key, metric_value)
110
110
  else
111
111
  n = RedisAnalytics.redis_connection.zincrby(key, 1, metric_value)
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
21
21
  # spec.default_executable = 'redis_analytics_dashboard'
22
22
  spec.require_paths = ["lib"]
23
23
 
24
- spec.add_runtime_dependency 'rails', '>= 3.2.0', '< 5'
24
+ spec.add_runtime_dependency 'rails', '>= 3.2.0', '< 6'
25
25
  spec.add_runtime_dependency 'jquery-rails'
26
26
  spec.add_runtime_dependency 'redis'
27
27
  spec.add_runtime_dependency 'browser'
@@ -73,10 +73,10 @@ describe RedisAnalytics::Configuration do
73
73
  it 'should not be nil' do
74
74
  visitor_recency_slices.should_not be_nil
75
75
  end
76
- it 'should be an Array of Fixnum' do
76
+ it 'should be an Array of Integer' do
77
77
  visitor_recency_slices.instance_of? Array
78
78
  visitor_recency_slices.each do |value|
79
- value.instance_of? Fixnum
79
+ value.instance_of? Integer
80
80
  end
81
81
  end
82
82
  it 'can be set to another value' do
@@ -0,0 +1,121 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ actionmailer (4.2.11.1)
5
+ actionpack (= 4.2.11.1)
6
+ actionview (= 4.2.11.1)
7
+ activejob (= 4.2.11.1)
8
+ mail (~> 2.5, >= 2.5.4)
9
+ rails-dom-testing (~> 1.0, >= 1.0.5)
10
+ actionpack (4.2.11.1)
11
+ actionview (= 4.2.11.1)
12
+ activesupport (= 4.2.11.1)
13
+ rack (~> 1.6)
14
+ rack-test (~> 0.6.2)
15
+ rails-dom-testing (~> 1.0, >= 1.0.5)
16
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
17
+ actionview (4.2.11.1)
18
+ activesupport (= 4.2.11.1)
19
+ builder (~> 3.1)
20
+ erubis (~> 2.7.0)
21
+ rails-dom-testing (~> 1.0, >= 1.0.5)
22
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
23
+ activejob (4.2.11.1)
24
+ activesupport (= 4.2.11.1)
25
+ globalid (>= 0.3.0)
26
+ activemodel (4.2.11.1)
27
+ activesupport (= 4.2.11.1)
28
+ builder (~> 3.1)
29
+ activerecord (4.2.11.1)
30
+ activemodel (= 4.2.11.1)
31
+ activesupport (= 4.2.11.1)
32
+ arel (~> 6.0)
33
+ activesupport (4.2.11.1)
34
+ i18n (~> 0.7)
35
+ minitest (~> 5.1)
36
+ thread_safe (~> 0.3, >= 0.3.4)
37
+ tzinfo (~> 1.1)
38
+ arel (6.0.4)
39
+ browser (2.6.1)
40
+ builder (3.2.3)
41
+ concurrent-ruby (1.1.5)
42
+ crass (1.0.4)
43
+ erubis (2.7.0)
44
+ geoip (1.6.4)
45
+ globalid (0.4.2)
46
+ activesupport (>= 4.2.0)
47
+ i18n (0.9.5)
48
+ concurrent-ruby (~> 1.0)
49
+ jquery-rails (4.3.5)
50
+ rails-dom-testing (>= 1, < 3)
51
+ railties (>= 4.2.0)
52
+ thor (>= 0.14, < 2.0)
53
+ json (2.2.0)
54
+ loofah (2.2.3)
55
+ crass (~> 1.0.2)
56
+ nokogiri (>= 1.5.9)
57
+ mail (2.7.1)
58
+ mini_mime (>= 0.1.1)
59
+ mini_mime (1.0.2)
60
+ mini_portile2 (2.4.0)
61
+ minitest (5.11.3)
62
+ nokogiri (1.10.4)
63
+ mini_portile2 (~> 2.4.0)
64
+ rack (1.6.11)
65
+ rack-test (0.6.3)
66
+ rack (>= 1.0)
67
+ rails (4.2.11.1)
68
+ actionmailer (= 4.2.11.1)
69
+ actionpack (= 4.2.11.1)
70
+ actionview (= 4.2.11.1)
71
+ activejob (= 4.2.11.1)
72
+ activemodel (= 4.2.11.1)
73
+ activerecord (= 4.2.11.1)
74
+ activesupport (= 4.2.11.1)
75
+ bundler (>= 1.3.0, < 2.0)
76
+ railties (= 4.2.11.1)
77
+ sprockets-rails
78
+ rails-deprecated_sanitizer (1.0.3)
79
+ activesupport (>= 4.2.0.alpha)
80
+ rails-dom-testing (1.0.9)
81
+ activesupport (>= 4.2.0, < 5.0)
82
+ nokogiri (~> 1.6)
83
+ rails-deprecated_sanitizer (>= 1.0.1)
84
+ rails-html-sanitizer (1.2.0)
85
+ loofah (~> 2.2, >= 2.2.2)
86
+ railties (4.2.11.1)
87
+ actionpack (= 4.2.11.1)
88
+ activesupport (= 4.2.11.1)
89
+ rake (>= 0.8.7)
90
+ thor (>= 0.18.1, < 2.0)
91
+ rake (12.3.3)
92
+ redis (4.1.2)
93
+ redis_analytics (1.0.1)
94
+ browser
95
+ geoip
96
+ jquery-rails
97
+ json
98
+ rails (>= 3.2.0, < 5)
99
+ redis
100
+ sprockets (3.7.2)
101
+ concurrent-ruby (~> 1.0)
102
+ rack (> 1, < 3)
103
+ sprockets-rails (3.2.1)
104
+ actionpack (>= 4.0)
105
+ activesupport (>= 4.0)
106
+ sprockets (>= 3.0.0)
107
+ sqlite3 (1.4.1)
108
+ thor (0.20.3)
109
+ thread_safe (0.3.6)
110
+ tzinfo (1.2.5)
111
+ thread_safe (~> 0.1)
112
+
113
+ PLATFORMS
114
+ ruby
115
+
116
+ DEPENDENCIES
117
+ redis_analytics
118
+ sqlite3
119
+
120
+ BUNDLED WITH
121
+ 1.15.2
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redis_analytics
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Schubert Cardozo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-06 00:00:00.000000000 Z
11
+ date: 2019-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: 3.2.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '5'
22
+ version: '6'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: 3.2.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '5'
32
+ version: '6'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: jquery-rails
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -224,6 +224,7 @@ files:
224
224
  - CHANGELOG.md
225
225
  - CONTRIBUTING.md
226
226
  - Gemfile
227
+ - Gemfile.lock
227
228
  - Guardfile
228
229
  - MIT-LICENSE
229
230
  - README.md
@@ -256,6 +257,31 @@ files:
256
257
  - bin/GeoIP.dat
257
258
  - config.ru
258
259
  - config/routes.rb
260
+ - coverage/assets/0.10.2/application.css
261
+ - coverage/assets/0.10.2/application.js
262
+ - coverage/assets/0.10.2/colorbox/border.png
263
+ - coverage/assets/0.10.2/colorbox/controls.png
264
+ - coverage/assets/0.10.2/colorbox/loading.gif
265
+ - coverage/assets/0.10.2/colorbox/loading_background.png
266
+ - coverage/assets/0.10.2/favicon_green.png
267
+ - coverage/assets/0.10.2/favicon_red.png
268
+ - coverage/assets/0.10.2/favicon_yellow.png
269
+ - coverage/assets/0.10.2/loading.gif
270
+ - coverage/assets/0.10.2/magnify.png
271
+ - coverage/assets/0.10.2/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png
272
+ - coverage/assets/0.10.2/smoothness/images/ui-bg_flat_75_ffffff_40x100.png
273
+ - coverage/assets/0.10.2/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png
274
+ - coverage/assets/0.10.2/smoothness/images/ui-bg_glass_65_ffffff_1x400.png
275
+ - coverage/assets/0.10.2/smoothness/images/ui-bg_glass_75_dadada_1x400.png
276
+ - coverage/assets/0.10.2/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png
277
+ - coverage/assets/0.10.2/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png
278
+ - coverage/assets/0.10.2/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png
279
+ - coverage/assets/0.10.2/smoothness/images/ui-icons_222222_256x240.png
280
+ - coverage/assets/0.10.2/smoothness/images/ui-icons_2e83ff_256x240.png
281
+ - coverage/assets/0.10.2/smoothness/images/ui-icons_454545_256x240.png
282
+ - coverage/assets/0.10.2/smoothness/images/ui-icons_888888_256x240.png
283
+ - coverage/assets/0.10.2/smoothness/images/ui-icons_cd0a0a_256x240.png
284
+ - coverage/index.html
259
285
  - lib/redis_analytics.rb
260
286
  - lib/redis_analytics/configuration.rb
261
287
  - lib/redis_analytics/engine.rb
@@ -277,6 +303,7 @@ files:
277
303
  - spec/lib/redis_analytics/tracker_spec.rb
278
304
  - spec/spec_helper.rb
279
305
  - spec/support/fakeredis.rb
306
+ - test/dummy/Gemfile.lock
280
307
  - test/dummy/README.rdoc
281
308
  - test/dummy/Rakefile
282
309
  - test/dummy/app/assets/javascripts/application.js
@@ -340,7 +367,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
340
367
  version: '0'
341
368
  requirements: []
342
369
  rubyforge_project: redis_analytics
343
- rubygems_version: 2.2.2
370
+ rubygems_version: 2.6.14.3
344
371
  signing_key:
345
372
  specification_version: 4
346
373
  summary: Fast and efficient web analytics for Rack apps