saucy-kiss 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/CHANGELOG.md +4 -0
  2. data/README.rdoc +21 -11
  3. metadata +2 -2
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ 0.2.3
2
+
3
+ Use snogmetrics 0.1.9, fix to correctly use KM JS property syntax.
4
+
1
5
  0.2.2
2
6
 
3
7
  Use newly published snogmetrics 0.1.8 instead of git repo.
data/README.rdoc CHANGED
@@ -86,18 +86,28 @@ Emit KISSmetrics javascript into your view (note the %== or equivalent #html_saf
86
86
  The KISSmetrics javascript is asynchronous, so it's safe to load at the top of
87
87
  your page.
88
88
 
89
- Note: Saucy::Kiss will automatically instantiate the Snogmetrics gem like this:
90
-
91
- api_key = Saucy::Kiss::API_KEYS[Rails.env]
92
- session = data[:request].session
93
- console_log_output = Rails.env.development?
94
- Snogmetrics::KissmetricsApi.new(api_key, session, console_log_output)
95
-
96
- and the Kissmetrics gem like this:
97
-
98
- Kissmetrics::HttpClient.new(Saucy::Kiss::API_KEYS[Rails.env])
89
+ Configure Snogmetrics separately in config/initializers/snogmetrics.rb:
90
+ (eventually this should be handled by saucy-kiss automatically)
91
+
92
+ module Snogmetrics
93
+ def output_strategy
94
+ case Rails.env.to_s
95
+ when 'development'
96
+ :console_log
97
+ when 'test'
98
+ :array
99
+ else
100
+ :live
101
+ end
102
+ end
99
103
 
100
- TODO: Is that ^ still accurate?
104
+ def kissmetrics_api_key
105
+ {
106
+ 'staging' => 'abc123',
107
+ 'production' => 'def456'
108
+ }[Rails.env]
109
+ end
110
+ end
101
111
 
102
112
  == Customization
103
113
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: saucy-kiss
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.2.2
5
+ version: 0.2.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - Jason Morrison
@@ -99,7 +99,7 @@ dependencies:
99
99
  requirements:
100
100
  - - ~>
101
101
  - !ruby/object:Gem::Version
102
- version: 0.1.8
102
+ version: 0.1.9
103
103
  type: :runtime
104
104
  version_requirements: *id008
105
105
  - !ruby/object:Gem::Dependency