hemju-google-analytics 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/LICENSE ADDED
@@ -0,0 +1,3 @@
1
+ == google_analytics_plugin
2
+
3
+ Put appropriate LICENSE for your project here.
data/README ADDED
@@ -0,0 +1,4 @@
1
+ == google_analytics_plugin
2
+
3
+ You should document your project here.
4
+ df
data/Rakefile ADDED
@@ -0,0 +1,40 @@
1
+ require 'rubygems'
2
+ require 'rake'
3
+ require 'rake/clean'
4
+ require 'rake/gempackagetask'
5
+ require 'rake/rdoctask'
6
+ require 'rake/testtask'
7
+
8
+ spec = Gem::Specification.new do |s|
9
+ s.name = 'hemju-google-analytics'
10
+ s.version = '0.0.1'
11
+ s.has_rdoc = true
12
+ s.extra_rdoc_files = ['README', 'LICENSE']
13
+ s.summary = 'Your summary here'
14
+ s.description = s.summary
15
+ s.author = 'Helmut Michael Juskewycz'
16
+ s.email = 'hjuskewycz@hemju.com'
17
+ # s.executables = ['your_executable_here']
18
+ s.files = %w(LICENSE README Rakefile) + Dir.glob("{bin,lib,spec}/**/*")
19
+ s.require_path = "lib"
20
+ s.bindir = "bin"
21
+ end
22
+
23
+ Rake::GemPackageTask.new(spec) do |p|
24
+ p.gem_spec = spec
25
+ p.need_tar = true
26
+ p.need_zip = true
27
+ end
28
+
29
+ Rake::RDocTask.new do |rdoc|
30
+ files =['README', 'LICENSE', 'lib/**/*.rb']
31
+ rdoc.rdoc_files.add(files)
32
+ rdoc.main = "README" # page to start on
33
+ rdoc.title = "google-analytics Docs"
34
+ rdoc.rdoc_dir = 'doc/rdoc' # rdoc output folder
35
+ rdoc.options << '--line-numbers'
36
+ end
37
+
38
+ Rake::TestTask.new do |t|
39
+ t.test_files = FileList['test/**/*.rb']
40
+ end
@@ -0,0 +1,10 @@
1
+ module Hemju::GoogleAnalytics
2
+ class InstallGenerator < Rails::Generators::Base
3
+ source_root File.expand_path("../templates", __FILE__)
4
+
5
+ # all public methods in here will be run in order
6
+ def add_my_initializer
7
+ template "initializer.rb", "config/initializers/google_analytics_initializer.rb"
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,5 @@
1
+ <% if !Hemju::GoogleAnalytics.production_only || Rails.env="production" %>
2
+ <script type="text/javascript">
3
+ var _gaq = _gaq || [];_gaq.push(['_setAccount', Hemju::GoogleAnalytics.account]);_gaq.push(['_setDomainName', Hemju::GoogleAnalytics.domain]);_gaq.push(['_trackPageview']);(function() {var ga = document.createElement('script');ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';ga.setAttribute('async', 'true');document.documentElement.firstChild.appendChild(ga);})();
4
+ </script>
5
+ <% end -%>
@@ -0,0 +1,8 @@
1
+ Hemju::GoogleAnalytics.setup do |config|
2
+
3
+ config.account = "'UA-xxxxxxx-x'"
4
+ config.domain = ".your-domain"
5
+
6
+ config.production_only = true
7
+
8
+ end
@@ -0,0 +1,3 @@
1
+ module Hemju::GoogleAnalytics
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,17 @@
1
+ module Hemju::GoogleAnalytics
2
+ class Railtie < ::Rails::Railtie
3
+ rake_tasks do
4
+ #load "google_analytics/railties/databases.rake"
5
+ end
6
+ end
7
+
8
+ attr_accessor :account
9
+ attr_accessor :domain
10
+
11
+ attr_accessor :production_only
12
+
13
+ def self.setup
14
+ yield self
15
+ end
16
+
17
+ end
metadata ADDED
@@ -0,0 +1,75 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: hemju-google-analytics
3
+ version: !ruby/object:Gem::Version
4
+ hash: 29
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 1
10
+ version: 0.0.1
11
+ platform: ruby
12
+ authors:
13
+ - Helmut Michael Juskewycz
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2010-06-21 00:00:00 +02:00
19
+ default_executable:
20
+ dependencies: []
21
+
22
+ description: Your summary here
23
+ email: hjuskewycz@hemju.com
24
+ executables: []
25
+
26
+ extensions: []
27
+
28
+ extra_rdoc_files:
29
+ - README
30
+ - LICENSE
31
+ files:
32
+ - LICENSE
33
+ - README
34
+ - Rakefile
35
+ - lib/hemju_google_analytics/generators/install_generator.rb
36
+ - lib/hemju_google_analytics/templates/_google_analytics.html.erb.erb
37
+ - lib/hemju_google_analytics/templates/initializer.rb
38
+ - lib/hemju_google_analytics/version.rb
39
+ - lib/hemju_google_analytics.rb
40
+ has_rdoc: true
41
+ homepage:
42
+ licenses: []
43
+
44
+ post_install_message:
45
+ rdoc_options: []
46
+
47
+ require_paths:
48
+ - lib
49
+ required_ruby_version: !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ hash: 3
55
+ segments:
56
+ - 0
57
+ version: "0"
58
+ required_rubygems_version: !ruby/object:Gem::Requirement
59
+ none: false
60
+ requirements:
61
+ - - ">="
62
+ - !ruby/object:Gem::Version
63
+ hash: 3
64
+ segments:
65
+ - 0
66
+ version: "0"
67
+ requirements: []
68
+
69
+ rubyforge_project:
70
+ rubygems_version: 1.3.7
71
+ signing_key:
72
+ specification_version: 3
73
+ summary: Your summary here
74
+ test_files: []
75
+