headstart 0.6.2 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.7.0
|
@@ -13,6 +13,8 @@ class HeadstartGenerator < Rails::Generator::Base
|
|
13
13
|
m.directory File.join("app", "views", "layouts")
|
14
14
|
m.directory File.join("app", "views", "sessions")
|
15
15
|
m.file "application.html.erb", "app/views/layouts/application.html.erb"
|
16
|
+
m.file "_woopra.html.erb", "app/views/layouts/_woopra.html.erb"
|
17
|
+
m.file "_google_analytics.html.erb", "app/views/layouts/_google_analytics.html.erb"
|
16
18
|
m.file "app/views/sessions/index.html.erb", "app/views/sessions/index.html.erb"
|
17
19
|
m.insert_into "app/helpers/application_helper.rb",
|
18
20
|
'def format_title(title)
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<script type="text/javascript">
|
2
|
+
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
3
|
+
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
|
4
|
+
</script>
|
5
|
+
|
6
|
+
<script type="text/javascript">
|
7
|
+
try {
|
8
|
+
var pageTracker = _gat._getTracker("<%= Settings.google_analytics %>");
|
9
|
+
pageTracker._trackPageview();
|
10
|
+
} catch(err) {}
|
11
|
+
</script>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<!-- Woopra Code Start -->
|
2
|
+
<script type="text/javascript" src="//static.woopra.com/js/woopra.v2.js"></script>
|
3
|
+
<script type="text/javascript">
|
4
|
+
<% if logged_in? %>
|
5
|
+
woopraTracker.addVisitorProperty("name", '<%= current_user.name %>');
|
6
|
+
woopraTracker.addVisitorProperty("email", '<%= current_user.email %>');
|
7
|
+
<% end %>
|
8
|
+
woopraTracker.track();
|
9
|
+
</script>
|
10
|
+
<!-- Woopra Code End -->
|
@@ -74,7 +74,10 @@
|
|
74
74
|
|
75
75
|
</div>
|
76
76
|
|
77
|
-
|
77
|
+
<% if ENV["RAILS_ENV"] == "production" %>
|
78
|
+
<% if Settings.woopra.present? %><%= render :partial => 'layouts/woopra' %><% end %>
|
79
|
+
<% if Settings.google_analytics.present? %><%= render :partial => 'layouts/google_analytics' %>
|
80
|
+
<% end %>
|
78
81
|
|
79
82
|
</body>
|
80
83
|
</html>
|
metadata
CHANGED
@@ -5,9 +5,9 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 7
|
9
|
+
- 0
|
10
|
+
version: 0.7.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Bran Burridge
|
@@ -120,6 +120,8 @@ files:
|
|
120
120
|
- generators/headstart/lib/insert_commands.rb
|
121
121
|
- generators/headstart/lib/rake_commands.rb
|
122
122
|
- generators/headstart/templates/README
|
123
|
+
- generators/headstart/templates/_google_analytics.html.erb
|
124
|
+
- generators/headstart/templates/_woopra.html.erb
|
123
125
|
- generators/headstart/templates/add.png
|
124
126
|
- generators/headstart/templates/app/controllers/sessions_controller.rb
|
125
127
|
- generators/headstart/templates/app/helpers/application_helper.rb
|