asyncomni 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +41 -0
- data/app/controllers/omniture_controller.rb +1 -1
- data/app/views/omniture/{_omniture.haml → _send_to_omniture.haml} +4 -4
- data/lib/asyncomni/version.rb +1 -1
- data/lib/generators/asyncomni/install/install_generator.rb +29 -3
- data/spec/controllers/omniture_controller_spec.rb +1 -1
- data/spec/dummy/config/routes.rb +2 -0
- data/spec/dummy/log/test.log +37 -14
- metadata +99 -112
- data/README.rdoc +0 -38
- data/config/routes.rb +0 -3
- data/spec/dummy/log/development.log +0 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 9d25858e7c0b5c23323b0c7719a1d381204d8e96
|
4
|
+
data.tar.gz: e80248c36f147e25f0c517d3c28e2bae3455b1e8
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 1edde4965af59ea78697de3b621cd3179139bcbae4df8f32b30d07cee38aafe4f0d14c340d0f0bf6367d82bec7d7fc6b0ce02c806edd358aa335fb10eede0d7e
|
7
|
+
data.tar.gz: 5935cdd8a156bee1675c690fea5e3cff1a8cbef862fce59316fc35a718c4895a16a0dbca257c7f0ef989333e174868ed89a33b9e702fd1a24d77fbae133f987a
|
data/README.md
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
# Asyncomni
|
2
|
+
|
3
|
+
Omniture integration could be painful in rails application. This project uses simple concept of using iframe to make asynchronus calls (not ajax!) to omniture to send usage tracking information.
|
4
|
+
|
5
|
+
##Pre-requisites:
|
6
|
+
|
7
|
+
For Rails 3+ Applications.
|
8
|
+
|
9
|
+
##Installling
|
10
|
+
|
11
|
+
Install the gem by
|
12
|
+
|
13
|
+
gem install asyncomni
|
14
|
+
|
15
|
+
OR
|
16
|
+
|
17
|
+
Include the gem in your Gemfile and run bundle install.
|
18
|
+
|
19
|
+
gem 'asyncomni'
|
20
|
+
|
21
|
+
Run the generator
|
22
|
+
|
23
|
+
rails g asyncomni:install
|
24
|
+
|
25
|
+
This will create some file for you.
|
26
|
+
|
27
|
+
create config/omniture.yml
|
28
|
+
route resources :omniture, :only => [:index]
|
29
|
+
create app/views/layouts/_omniture.html.erb
|
30
|
+
append app/views/layouts/application.html.erb
|
31
|
+
|
32
|
+
Also require `omniture.js` is your `application.js`
|
33
|
+
|
34
|
+
= require 'omniture'
|
35
|
+
|
36
|
+
That's it! :pray:
|
37
|
+
|
38
|
+
**Note**
|
39
|
+
This gem is currenly in early beta version but provides support of tracking user id and page names for user visits.
|
40
|
+
|
41
|
+
This project uses MIT-LICENSE.
|
@@ -3,10 +3,10 @@
|
|
3
3
|
= javascript_include_tag 's_code'
|
4
4
|
%script{:language => "JavaScript"}
|
5
5
|
s.pageName=parent.document.getElementById('omnitureFrame').attributes.getNamedItem('data-page-name').value;
|
6
|
-
s.
|
7
|
-
s.
|
8
|
-
s.
|
9
|
-
s.
|
6
|
+
s.#{Omniture.sprop_for('user_id')}='#{user_id}';
|
7
|
+
s.#{Omniture.sprop_for('site_name')}='#{application_name}';
|
8
|
+
s.#{Omniture.sprop_for('session_id')}='#{request.session_options[:id]}';
|
9
|
+
s.#{Omniture.sprop_for('timestamp')}='#{omniture_formatted_time}';
|
10
10
|
%script{:language => "JavaScript"}
|
11
11
|
/
|
12
12
|
\/************* DO NOT ALTER ANYTHING BELOW THIS LINE ! **************/
|
data/lib/asyncomni/version.rb
CHANGED
@@ -3,12 +3,38 @@ require 'rails'
|
|
3
3
|
module Asyncomni
|
4
4
|
module Generators
|
5
5
|
class InstallGenerator < ::Rails::Generators::Base
|
6
|
-
desc "This generator copies omniture.yml to the application"
|
7
6
|
source_root File.expand_path('../../../../../config', __FILE__)
|
8
7
|
|
8
|
+
desc "This generator copies omniture.yml to the application"
|
9
9
|
def copy_omniture_config
|
10
10
|
copy_file "omniture.yml", "config/omniture.yml"
|
11
11
|
end
|
12
|
+
|
13
|
+
desc "This generator adds routes to routes.rb"
|
14
|
+
def add_routes
|
15
|
+
route "resources :omniture, :only => [:index]"
|
16
|
+
end
|
17
|
+
|
18
|
+
|
19
|
+
desc "This Generator is to create omniture partial"
|
20
|
+
def create_omniture_partial
|
21
|
+
create_file "app/views/omniture/_omniture.html.erb", <<-FILE
|
22
|
+
<%= tag(:iframe, id: 'omnitureFrame', name: 'omnitureFrame', width: '0', height: '0', style: 'visibility:hidden', data: {'page-name' => page_name, 'omniture-url' => omniture_url }) %>
|
23
|
+
FILE
|
24
|
+
end
|
25
|
+
|
26
|
+
desc "Append the render partial in the application layout"
|
27
|
+
def append_omniture_partial_to_application_layout
|
28
|
+
if File.exists?('app/views/layouts/application.html.erb')
|
29
|
+
append_to_file 'app/views/layouts/application.html.erb' do
|
30
|
+
"<%= render 'omniture/omniture' %>"
|
31
|
+
end
|
32
|
+
else File.exists?('app/views/layouts/application.html.haml')
|
33
|
+
append_to_file 'app/views/layouts/application.html.haml' do
|
34
|
+
"= render 'omniture/omniture'"
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
12
39
|
end
|
13
|
-
end
|
14
|
-
end
|
40
|
+
end
|
data/spec/dummy/config/routes.rb
CHANGED
data/spec/dummy/log/test.log
CHANGED
@@ -1,28 +1,51 @@
|
|
1
|
-
[1m[36m (
|
1
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
2
|
+
Processing by OmnitureController#index as HTML
|
3
|
+
Rendered /Users/gouravtiwari/rubyapps/asyncomni/app/views/omniture/_omniture.haml (0.6ms)
|
4
|
+
Completed 200 OK in 30ms (Views: 29.5ms | ActiveRecord: 0.0ms)
|
2
5
|
[1m[35m (0.1ms)[0m rollback transaction
|
3
|
-
[1m[36m (
|
4
|
-
[1m[35m (0.
|
6
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
7
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
8
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
9
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
10
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
11
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
12
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
13
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
5
14
|
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
6
|
-
[1m[35m (0.
|
7
|
-
[1m[36m (0.
|
15
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
16
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
17
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
18
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
8
19
|
Processing by OmnitureController#index as HTML
|
9
|
-
Rendered /
|
10
|
-
Completed 200 OK in
|
11
|
-
[1m[35m (0.1ms)[0m rollback transaction
|
12
|
-
[1m[36m (14.0ms)[0m [1mbegin transaction[0m
|
20
|
+
Rendered /Users/gouravtiwari/rubyapps/asyncomni/app/views/omniture/_send_to_omniture.haml (0.6ms)
|
21
|
+
Completed 200 OK in 28ms (Views: 27.8ms | ActiveRecord: 0.0ms)
|
13
22
|
[1m[35m (0.1ms)[0m rollback transaction
|
14
23
|
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
15
|
-
[1m[35m (0.
|
24
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
16
25
|
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
17
26
|
[1m[35m (0.1ms)[0m rollback transaction
|
18
27
|
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
19
28
|
[1m[35m (0.1ms)[0m rollback transaction
|
20
|
-
[1m[36m (0.
|
29
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
21
30
|
[1m[35m (0.1ms)[0m rollback transaction
|
22
31
|
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
23
32
|
[1m[35m (0.1ms)[0m rollback transaction
|
24
|
-
[1m[36m (0.
|
33
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
34
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
35
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
25
36
|
Processing by OmnitureController#index as HTML
|
26
|
-
Rendered /
|
27
|
-
Completed 200 OK in
|
37
|
+
Rendered /Users/gouravtiwari/rubyapps/asyncomni/app/views/omniture/_send_to_omniture.haml (0.6ms)
|
38
|
+
Completed 200 OK in 31ms (Views: 30.5ms | ActiveRecord: 0.0ms)
|
39
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
40
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
41
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
42
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
28
43
|
[1m[35m (0.1ms)[0m rollback transaction
|
44
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
45
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
46
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
47
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
48
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
49
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
50
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
51
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
metadata
CHANGED
@@ -1,36 +1,32 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: asyncomni
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.2
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Gourav Tiwari
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2013-10-26 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: rails
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: 3.2.2
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - '>='
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: 3.2.2
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: haml
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
31
|
- - ~>
|
36
32
|
- !ruby/object:Gem::Version
|
@@ -38,7 +34,6 @@ dependencies:
|
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
38
|
- - ~>
|
44
39
|
- !ruby/object:Gem::Version
|
@@ -46,23 +41,20 @@ dependencies:
|
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: sqlite3
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - '>='
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: '0'
|
54
48
|
type: :development
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- -
|
52
|
+
- - '>='
|
60
53
|
- !ruby/object:Gem::Version
|
61
54
|
version: '0'
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: rspec-rails
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
59
|
- - ~>
|
68
60
|
- !ruby/object:Gem::Version
|
@@ -70,7 +62,6 @@ dependencies:
|
|
70
62
|
type: :development
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
66
|
- - ~>
|
76
67
|
- !ruby/object:Gem::Version
|
@@ -83,170 +74,166 @@ executables: []
|
|
83
74
|
extensions: []
|
84
75
|
extra_rdoc_files: []
|
85
76
|
files:
|
86
|
-
- app/
|
87
|
-
- app/
|
77
|
+
- app/assets/javascripts/omniture.js
|
78
|
+
- app/assets/javascripts/s_code.js
|
88
79
|
- app/controllers/omniture_controller.rb
|
80
|
+
- app/helpers/omniture_helper.rb
|
89
81
|
- app/models/omniture.rb
|
90
|
-
- app/
|
91
|
-
- app/assets/javascripts/omniture.js
|
92
|
-
- config/routes.rb
|
93
|
-
- config/omniture.yml
|
82
|
+
- app/views/omniture/_send_to_omniture.haml
|
94
83
|
- config/initializers/omniture.rb
|
95
|
-
-
|
96
|
-
- lib/asyncomni.rb
|
84
|
+
- config/omniture.yml
|
97
85
|
- lib/asyncomni/version.rb
|
86
|
+
- lib/asyncomni.rb
|
87
|
+
- lib/generators/asyncomni/install/install_generator.rb
|
98
88
|
- lib/tasks/asyncomni_tasks.rake
|
99
89
|
- MIT-LICENSE
|
100
90
|
- Rakefile
|
101
|
-
- README.
|
102
|
-
- spec/
|
103
|
-
- spec/dummy/app/views/layouts/application.html.erb
|
104
|
-
- spec/dummy/app/helpers/application_helper.rb
|
105
|
-
- spec/dummy/app/controllers/application_controller.rb
|
106
|
-
- spec/dummy/app/assets/stylesheets/application.css
|
91
|
+
- README.md
|
92
|
+
- spec/controllers/omniture_controller_spec.rb
|
107
93
|
- spec/dummy/app/assets/javascripts/application.js
|
108
|
-
- spec/dummy/
|
109
|
-
- spec/dummy/
|
110
|
-
- spec/dummy/
|
111
|
-
- spec/dummy/
|
112
|
-
- spec/dummy/config/environment.rb
|
94
|
+
- spec/dummy/app/assets/stylesheets/application.css
|
95
|
+
- spec/dummy/app/controllers/application_controller.rb
|
96
|
+
- spec/dummy/app/helpers/application_helper.rb
|
97
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
113
98
|
- spec/dummy/config/application.rb
|
114
99
|
- spec/dummy/config/boot.rb
|
115
|
-
- spec/dummy/config/
|
116
|
-
- spec/dummy/config/
|
117
|
-
- spec/dummy/config/initializers/mime_types.rb
|
118
|
-
- spec/dummy/config/initializers/session_store.rb
|
119
|
-
- spec/dummy/config/initializers/backtrace_silencers.rb
|
120
|
-
- spec/dummy/config/initializers/secret_token.rb
|
100
|
+
- spec/dummy/config/database.yml
|
101
|
+
- spec/dummy/config/environment.rb
|
121
102
|
- spec/dummy/config/environments/development.rb
|
122
103
|
- spec/dummy/config/environments/production.rb
|
123
104
|
- spec/dummy/config/environments/test.rb
|
124
|
-
- spec/dummy/
|
125
|
-
- spec/dummy/
|
126
|
-
- spec/dummy/
|
127
|
-
- spec/dummy/
|
105
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
106
|
+
- spec/dummy/config/initializers/inflections.rb
|
107
|
+
- spec/dummy/config/initializers/mime_types.rb
|
108
|
+
- spec/dummy/config/initializers/secret_token.rb
|
109
|
+
- spec/dummy/config/initializers/session_store.rb
|
110
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
111
|
+
- spec/dummy/config/locales/en.yml
|
112
|
+
- spec/dummy/config/omniture.yml
|
113
|
+
- spec/dummy/config/routes.rb
|
114
|
+
- spec/dummy/config.ru
|
115
|
+
- spec/dummy/db/test.sqlite3
|
128
116
|
- spec/dummy/dummy/app/assets/javascripts/application.js
|
129
|
-
- spec/dummy/dummy/
|
130
|
-
- spec/dummy/dummy/
|
131
|
-
- spec/dummy/dummy/
|
132
|
-
- spec/dummy/dummy/
|
117
|
+
- spec/dummy/dummy/app/assets/stylesheets/application.css
|
118
|
+
- spec/dummy/dummy/app/controllers/application_controller.rb
|
119
|
+
- spec/dummy/dummy/app/helpers/application_helper.rb
|
120
|
+
- spec/dummy/dummy/app/views/layouts/application.html.erb
|
133
121
|
- spec/dummy/dummy/config/application.rb
|
134
122
|
- spec/dummy/dummy/config/boot.rb
|
135
|
-
- spec/dummy/dummy/config/
|
136
|
-
- spec/dummy/dummy/config/
|
137
|
-
- spec/dummy/dummy/config/initializers/mime_types.rb
|
138
|
-
- spec/dummy/dummy/config/initializers/session_store.rb
|
139
|
-
- spec/dummy/dummy/config/initializers/backtrace_silencers.rb
|
140
|
-
- spec/dummy/dummy/config/initializers/secret_token.rb
|
123
|
+
- spec/dummy/dummy/config/database.yml
|
124
|
+
- spec/dummy/dummy/config/environment.rb
|
141
125
|
- spec/dummy/dummy/config/environments/development.rb
|
142
126
|
- spec/dummy/dummy/config/environments/production.rb
|
143
127
|
- spec/dummy/dummy/config/environments/test.rb
|
128
|
+
- spec/dummy/dummy/config/initializers/backtrace_silencers.rb
|
129
|
+
- spec/dummy/dummy/config/initializers/inflections.rb
|
130
|
+
- spec/dummy/dummy/config/initializers/mime_types.rb
|
131
|
+
- spec/dummy/dummy/config/initializers/secret_token.rb
|
132
|
+
- spec/dummy/dummy/config/initializers/session_store.rb
|
133
|
+
- spec/dummy/dummy/config/initializers/wrap_parameters.rb
|
134
|
+
- spec/dummy/dummy/config/locales/en.yml
|
135
|
+
- spec/dummy/dummy/config/routes.rb
|
144
136
|
- spec/dummy/dummy/config.ru
|
145
|
-
- spec/dummy/dummy/script/rails
|
146
|
-
- spec/dummy/dummy/public/422.html
|
147
|
-
- spec/dummy/dummy/public/favicon.ico
|
148
137
|
- spec/dummy/dummy/public/404.html
|
138
|
+
- spec/dummy/dummy/public/422.html
|
149
139
|
- spec/dummy/dummy/public/500.html
|
140
|
+
- spec/dummy/dummy/public/favicon.ico
|
150
141
|
- spec/dummy/dummy/Rakefile
|
151
142
|
- spec/dummy/dummy/README.rdoc
|
152
|
-
- spec/dummy/
|
153
|
-
- spec/dummy/
|
154
|
-
- spec/dummy/public/422.html
|
155
|
-
- spec/dummy/public/favicon.ico
|
143
|
+
- spec/dummy/dummy/script/rails
|
144
|
+
- spec/dummy/log/test.log
|
156
145
|
- spec/dummy/public/404.html
|
146
|
+
- spec/dummy/public/422.html
|
157
147
|
- spec/dummy/public/500.html
|
148
|
+
- spec/dummy/public/favicon.ico
|
158
149
|
- spec/dummy/Rakefile
|
159
|
-
- spec/dummy/db/test.sqlite3
|
160
150
|
- spec/dummy/README.rdoc
|
161
|
-
- spec/dummy/
|
162
|
-
- spec/
|
163
|
-
- spec/controllers/omniture_controller_spec.rb
|
151
|
+
- spec/dummy/script/rails
|
152
|
+
- spec/helpers/omniture_helper_spec.rb
|
164
153
|
- spec/spec_helper.rb
|
165
154
|
homepage: https://github.com/gouravtiwari/asyncomni
|
166
155
|
licenses: []
|
156
|
+
metadata: {}
|
167
157
|
post_install_message:
|
168
158
|
rdoc_options: []
|
169
159
|
require_paths:
|
170
160
|
- lib
|
171
161
|
required_ruby_version: !ruby/object:Gem::Requirement
|
172
|
-
none: false
|
173
162
|
requirements:
|
174
|
-
- -
|
163
|
+
- - '>='
|
175
164
|
- !ruby/object:Gem::Version
|
176
165
|
version: '0'
|
177
166
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
178
|
-
none: false
|
179
167
|
requirements:
|
180
|
-
- -
|
168
|
+
- - '>='
|
181
169
|
- !ruby/object:Gem::Version
|
182
170
|
version: '0'
|
183
171
|
requirements: []
|
184
172
|
rubyforge_project:
|
185
|
-
rubygems_version:
|
173
|
+
rubygems_version: 2.0.6
|
186
174
|
signing_key:
|
187
|
-
specification_version:
|
175
|
+
specification_version: 4
|
188
176
|
summary: Makes omniture calls from rails 3.1 easier and asynchronous without ajax-calls
|
189
177
|
test_files:
|
190
|
-
- spec/
|
191
|
-
- spec/dummy/app/views/layouts/application.html.erb
|
192
|
-
- spec/dummy/app/helpers/application_helper.rb
|
193
|
-
- spec/dummy/app/controllers/application_controller.rb
|
194
|
-
- spec/dummy/app/assets/stylesheets/application.css
|
178
|
+
- spec/controllers/omniture_controller_spec.rb
|
195
179
|
- spec/dummy/app/assets/javascripts/application.js
|
196
|
-
- spec/dummy/
|
197
|
-
- spec/dummy/
|
198
|
-
- spec/dummy/
|
199
|
-
- spec/dummy/
|
200
|
-
- spec/dummy/config/environment.rb
|
180
|
+
- spec/dummy/app/assets/stylesheets/application.css
|
181
|
+
- spec/dummy/app/controllers/application_controller.rb
|
182
|
+
- spec/dummy/app/helpers/application_helper.rb
|
183
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
201
184
|
- spec/dummy/config/application.rb
|
202
185
|
- spec/dummy/config/boot.rb
|
203
|
-
- spec/dummy/config/
|
204
|
-
- spec/dummy/config/
|
205
|
-
- spec/dummy/config/initializers/mime_types.rb
|
206
|
-
- spec/dummy/config/initializers/session_store.rb
|
207
|
-
- spec/dummy/config/initializers/backtrace_silencers.rb
|
208
|
-
- spec/dummy/config/initializers/secret_token.rb
|
186
|
+
- spec/dummy/config/database.yml
|
187
|
+
- spec/dummy/config/environment.rb
|
209
188
|
- spec/dummy/config/environments/development.rb
|
210
189
|
- spec/dummy/config/environments/production.rb
|
211
190
|
- spec/dummy/config/environments/test.rb
|
212
|
-
- spec/dummy/
|
213
|
-
- spec/dummy/
|
214
|
-
- spec/dummy/
|
215
|
-
- spec/dummy/
|
191
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
192
|
+
- spec/dummy/config/initializers/inflections.rb
|
193
|
+
- spec/dummy/config/initializers/mime_types.rb
|
194
|
+
- spec/dummy/config/initializers/secret_token.rb
|
195
|
+
- spec/dummy/config/initializers/session_store.rb
|
196
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
197
|
+
- spec/dummy/config/locales/en.yml
|
198
|
+
- spec/dummy/config/omniture.yml
|
199
|
+
- spec/dummy/config/routes.rb
|
200
|
+
- spec/dummy/config.ru
|
201
|
+
- spec/dummy/db/test.sqlite3
|
216
202
|
- spec/dummy/dummy/app/assets/javascripts/application.js
|
217
|
-
- spec/dummy/dummy/
|
218
|
-
- spec/dummy/dummy/
|
219
|
-
- spec/dummy/dummy/
|
220
|
-
- spec/dummy/dummy/
|
203
|
+
- spec/dummy/dummy/app/assets/stylesheets/application.css
|
204
|
+
- spec/dummy/dummy/app/controllers/application_controller.rb
|
205
|
+
- spec/dummy/dummy/app/helpers/application_helper.rb
|
206
|
+
- spec/dummy/dummy/app/views/layouts/application.html.erb
|
221
207
|
- spec/dummy/dummy/config/application.rb
|
222
208
|
- spec/dummy/dummy/config/boot.rb
|
223
|
-
- spec/dummy/dummy/config/
|
224
|
-
- spec/dummy/dummy/config/
|
225
|
-
- spec/dummy/dummy/config/initializers/mime_types.rb
|
226
|
-
- spec/dummy/dummy/config/initializers/session_store.rb
|
227
|
-
- spec/dummy/dummy/config/initializers/backtrace_silencers.rb
|
228
|
-
- spec/dummy/dummy/config/initializers/secret_token.rb
|
209
|
+
- spec/dummy/dummy/config/database.yml
|
210
|
+
- spec/dummy/dummy/config/environment.rb
|
229
211
|
- spec/dummy/dummy/config/environments/development.rb
|
230
212
|
- spec/dummy/dummy/config/environments/production.rb
|
231
213
|
- spec/dummy/dummy/config/environments/test.rb
|
214
|
+
- spec/dummy/dummy/config/initializers/backtrace_silencers.rb
|
215
|
+
- spec/dummy/dummy/config/initializers/inflections.rb
|
216
|
+
- spec/dummy/dummy/config/initializers/mime_types.rb
|
217
|
+
- spec/dummy/dummy/config/initializers/secret_token.rb
|
218
|
+
- spec/dummy/dummy/config/initializers/session_store.rb
|
219
|
+
- spec/dummy/dummy/config/initializers/wrap_parameters.rb
|
220
|
+
- spec/dummy/dummy/config/locales/en.yml
|
221
|
+
- spec/dummy/dummy/config/routes.rb
|
232
222
|
- spec/dummy/dummy/config.ru
|
233
|
-
- spec/dummy/dummy/script/rails
|
234
|
-
- spec/dummy/dummy/public/422.html
|
235
|
-
- spec/dummy/dummy/public/favicon.ico
|
236
223
|
- spec/dummy/dummy/public/404.html
|
224
|
+
- spec/dummy/dummy/public/422.html
|
237
225
|
- spec/dummy/dummy/public/500.html
|
226
|
+
- spec/dummy/dummy/public/favicon.ico
|
238
227
|
- spec/dummy/dummy/Rakefile
|
239
228
|
- spec/dummy/dummy/README.rdoc
|
240
|
-
- spec/dummy/
|
241
|
-
- spec/dummy/
|
242
|
-
- spec/dummy/public/422.html
|
243
|
-
- spec/dummy/public/favicon.ico
|
229
|
+
- spec/dummy/dummy/script/rails
|
230
|
+
- spec/dummy/log/test.log
|
244
231
|
- spec/dummy/public/404.html
|
232
|
+
- spec/dummy/public/422.html
|
245
233
|
- spec/dummy/public/500.html
|
234
|
+
- spec/dummy/public/favicon.ico
|
246
235
|
- spec/dummy/Rakefile
|
247
|
-
- spec/dummy/db/test.sqlite3
|
248
236
|
- spec/dummy/README.rdoc
|
249
|
-
- spec/dummy/
|
250
|
-
- spec/
|
251
|
-
- spec/controllers/omniture_controller_spec.rb
|
237
|
+
- spec/dummy/script/rails
|
238
|
+
- spec/helpers/omniture_helper_spec.rb
|
252
239
|
- spec/spec_helper.rb
|
data/README.rdoc
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
= Asyncomni
|
2
|
-
Omniture integration could be painful in rails application. This project uses simple concept of using iframe to make asynchronus calls (not ajax!) to omniture to send usage tracking information.
|
3
|
-
|
4
|
-
= Disclaimer
|
5
|
-
This gem is currenly in early beta version but provides support of tracking user id and page names for user visits.
|
6
|
-
|
7
|
-
= Pre-requisites:
|
8
|
-
For rails 3.1.x applications:
|
9
|
-
|
10
|
-
gem install asyncomni
|
11
|
-
|
12
|
-
or in application's Gemfile add:
|
13
|
-
|
14
|
-
gem 'asyncomni'
|
15
|
-
gem 'haml' //this is for the time being!
|
16
|
-
|
17
|
-
= How to use:
|
18
|
-
|
19
|
-
run:
|
20
|
-
|
21
|
-
rails g asyncomni:install
|
22
|
-
|
23
|
-
Add below line to the layout, e.g. layout/aplication.html.erb
|
24
|
-
|
25
|
-
<iframe id ="omnitureFrame" name="omnitureFrame" width="0" height="0" style="visibility:hidden" data-page-name="<%=page_name %>" data-omniture-url="<%= omniture_url %>"> </iframe>
|
26
|
-
|
27
|
-
In case you are haml fan, add this to layout/application.html.haml:
|
28
|
-
|
29
|
-
%iframe#omnitureFrame{:name => "omnitureFrame", :width => "0", :height => "0", :style => '"visibility:hidden"', 'data-page-name' => page_name, 'data-omniture-url' => omniture_url}
|
30
|
-
|
31
|
-
|
32
|
-
Also, add omniture.js to asset pipeline. In application.js:
|
33
|
-
|
34
|
-
//= require omniture
|
35
|
-
|
36
|
-
That's it!
|
37
|
-
|
38
|
-
This project uses MIT-LICENSE.
|
data/config/routes.rb
DELETED
File without changes
|