asyncomni 0.0.1 → 0.0.2

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.
@@ -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
@@ -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.
@@ -1,6 +1,6 @@
1
1
  class OmnitureController < ApplicationController
2
2
  def index
3
3
  @omniture = Omniture.new(params)
4
- render :partial => 'omniture'
4
+ render :partial => 'omniture/send_to_omniture'
5
5
  end
6
6
  end
@@ -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.prop12='#{user_id}';
7
- s.prop26='#{application_name}';
8
- s.prop37='#{request.session_options[:id]}';
9
- s.prop98='#{omniture_formatted_time}';
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 ! **************/
@@ -1,3 +1,3 @@
1
1
  module Asyncomni
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -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
@@ -6,7 +6,7 @@ describe OmnitureController do
6
6
  get :index
7
7
 
8
8
  response.should be_success
9
- response.should render_template("omniture/_omniture")
9
+ response.should render_template("omniture/_send_to_omniture")
10
10
  assigns[:omniture].should_not be_nil
11
11
  end
12
12
  end
@@ -1,4 +1,6 @@
1
1
  Dummy::Application.routes.draw do
2
+ resources :omniture, :only => [:index]
3
+
2
4
  # The priority is based upon order of creation:
3
5
  # first created -> highest priority.
4
6
 
@@ -1,28 +1,51 @@
1
-  (3.2ms) begin transaction
1
+  (0.4ms) begin transaction
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
   (0.1ms) rollback transaction
3
-  (77.2ms) begin transaction
4
-  (0.2ms) rollback transaction
6
+  (0.0ms) begin transaction
7
+  (0.0ms) rollback transaction
8
+  (0.0ms) begin transaction
9
+  (0.0ms) rollback transaction
10
+  (0.0ms) begin transaction
11
+  (0.0ms) rollback transaction
12
+  (0.0ms) begin transaction
13
+  (0.0ms) rollback transaction
5
14
   (0.1ms) begin transaction
6
-  (0.1ms) rollback transaction
7
-  (0.7ms) begin transaction
15
+  (0.0ms) rollback transaction
16
+  (0.0ms) begin transaction
17
+  (0.0ms) rollback transaction
18
+  (0.2ms) begin transaction
8
19
  Processing by OmnitureController#index as HTML
9
- Rendered /home/gourav/rubyapps/asyncomni/app/views/omniture/_omniture.haml (0.7ms)
10
- Completed 200 OK in 98ms (Views: 97.6ms | ActiveRecord: 0.0ms)
11
-  (0.1ms) rollback transaction
12
-  (14.0ms) begin transaction
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
   (0.1ms) rollback transaction
14
23
   (0.1ms) begin transaction
15
-  (0.1ms) rollback transaction
24
+  (0.0ms) rollback transaction
16
25
   (0.0ms) begin transaction
17
26
   (0.1ms) rollback transaction
18
27
   (0.1ms) begin transaction
19
28
   (0.1ms) rollback transaction
20
-  (0.0ms) begin transaction
29
+  (0.1ms) begin transaction
21
30
   (0.1ms) rollback transaction
22
31
   (0.1ms) begin transaction
23
32
   (0.1ms) rollback transaction
24
-  (0.0ms) begin transaction
33
+  (0.1ms) begin transaction
34
+  (0.1ms) rollback transaction
35
+  (0.2ms) begin transaction
25
36
  Processing by OmnitureController#index as HTML
26
- Rendered /home/gourav/rubyapps/asyncomni/app/views/omniture/_omniture.haml (0.8ms)
27
- Completed 200 OK in 47ms (Views: 45.9ms | ActiveRecord: 0.0ms)
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
+  (0.1ms) rollback transaction
40
+  (0.1ms) begin transaction
41
+  (0.1ms) rollback transaction
42
+  (0.1ms) begin transaction
28
43
   (0.1ms) rollback transaction
44
+  (0.1ms) begin transaction
45
+  (0.1ms) rollback transaction
46
+  (0.1ms) begin transaction
47
+  (0.0ms) rollback transaction
48
+  (0.0ms) begin transaction
49
+  (0.0ms) rollback transaction
50
+  (0.0ms) begin transaction
51
+  (0.0ms) 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.1
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: 2012-04-17 00:00:00.000000000 Z
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/views/omniture/_omniture.haml
87
- - app/helpers/omniture_helper.rb
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/assets/javascripts/s_code.js
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
- - lib/generators/asyncomni/install/install_generator.rb
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.rdoc
102
- - spec/helpers/omniture_helper_spec.rb
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/config/routes.rb
109
- - spec/dummy/config/locales/en.yml
110
- - spec/dummy/config/omniture.yml
111
- - spec/dummy/config/database.yml
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/initializers/wrap_parameters.rb
116
- - spec/dummy/config/initializers/inflections.rb
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/dummy/app/views/layouts/application.html.erb
125
- - spec/dummy/dummy/app/helpers/application_helper.rb
126
- - spec/dummy/dummy/app/controllers/application_controller.rb
127
- - spec/dummy/dummy/app/assets/stylesheets/application.css
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/config/routes.rb
130
- - spec/dummy/dummy/config/locales/en.yml
131
- - spec/dummy/dummy/config/database.yml
132
- - spec/dummy/dummy/config/environment.rb
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/initializers/wrap_parameters.rb
136
- - spec/dummy/dummy/config/initializers/inflections.rb
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/config.ru
153
- - spec/dummy/script/rails
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/log/test.log
162
- - spec/dummy/log/development.log
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: 1.8.21
173
+ rubygems_version: 2.0.6
186
174
  signing_key:
187
- specification_version: 3
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/helpers/omniture_helper_spec.rb
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/config/routes.rb
197
- - spec/dummy/config/locales/en.yml
198
- - spec/dummy/config/omniture.yml
199
- - spec/dummy/config/database.yml
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/initializers/wrap_parameters.rb
204
- - spec/dummy/config/initializers/inflections.rb
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/dummy/app/views/layouts/application.html.erb
213
- - spec/dummy/dummy/app/helpers/application_helper.rb
214
- - spec/dummy/dummy/app/controllers/application_controller.rb
215
- - spec/dummy/dummy/app/assets/stylesheets/application.css
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/config/routes.rb
218
- - spec/dummy/dummy/config/locales/en.yml
219
- - spec/dummy/dummy/config/database.yml
220
- - spec/dummy/dummy/config/environment.rb
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/initializers/wrap_parameters.rb
224
- - spec/dummy/dummy/config/initializers/inflections.rb
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/config.ru
241
- - spec/dummy/script/rails
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/log/test.log
250
- - spec/dummy/log/development.log
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
@@ -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 %>">&nbsp;</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.
@@ -1,3 +0,0 @@
1
- Rails.application.routes.draw do
2
- resources :omniture, :only => [:index]
3
- end
File without changes