Skip to content

Commit 27d569e

Browse files
committed
Add rack-tracker
1 parent de9ec6e commit 27d569e

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ gem 'puma'
88
# Project requirements
99
gem 'rake'
1010
gem 'rinku'
11+
gem 'rack-tracker'
1112

1213
# Component requirements
1314
gem 'slim'

Gemfile.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ GEM
7575
rack
7676
rack-test (0.6.2)
7777
rack (>= 1.0)
78+
rack-tracker (0.2.1)
79+
activesupport (~> 4.1.0)
80+
rack (~> 1.5.2)
81+
tilt (~> 1.4.1)
7882
rake (10.3.2)
7983
rinku (1.7.3)
8084
rspec (3.0.0)
@@ -119,6 +123,7 @@ DEPENDENCIES
119123
pry-padrino
120124
puma
121125
rack-test
126+
rack-tracker
122127
rake
123128
rinku
124129
rspec

config/boot.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88

99
Padrino::Logger::Config[:production][:colorize_logging] = false
1010

11+
if Padrino.env == :production
12+
Padrino.use Rack::Tracker do
13+
handler :google_analytics, { tracker: 'UA-54887802-1' }
14+
end
15+
end
16+
1117
Padrino.before_load do
1218
I18n.enforce_available_locales = true
1319
I18n.default_locale = :ja

0 commit comments

Comments
 (0)