touchstone 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.markdown CHANGED
@@ -29,7 +29,7 @@ Once the gem has been installed run `rails g touchstone`
29
29
  This will:
30
30
 
31
31
  * Copy an initializer file to `config/initializers/touchstone.rb`. You should read this file and set your configuration options before proceeding
32
- * Add a before filter to your application controller. *NB*: This defaults to setting a private method for the filter. If you already have `private` defined in your application controller, you will need to remove the duplicate declaration.
32
+ * ~~Add a before filter to your application controller. *NB*: This defaults to setting a private method for the filter. If you already have `private` defined in your application controller, you will need to remove the duplicate declaration.~~ **Not currently working. You will need to update application\_controller.rb manually. See below.**
33
33
  * Mounts the engine in your routes.rb file
34
34
 
35
35
  ## Installation continued
@@ -11,13 +11,13 @@ class TouchstoneGenerator < Rails::Generators::Base
11
11
  copy_file 'touchstone.rb', 'config/initializers/touchstone.rb'
12
12
  end
13
13
 
14
- def set_before_filter
15
- puts "Setting before filter in application_controller.rb..."
16
- insert_into_file 'app/controllers/application_controller.rb', "\n\n\tbefore_filter :set_cookie_and_record_visit", :after => 'ActionController::Base'
17
- insert_into_file 'app/controllers/application_controller.rb', :before => "end" do
18
- "\tprivate\n\n\tdef set_cookie_and_record_visit\n\t\tif params[:cid] && Campaign.find_by_id(params[:cid]) && !CampaignVisit.find_by_request_ip(request.remote_ip)\n\t\t\tif !cookies['touchstone_campaign_id']\n\t\t\t\tcookies['touchstone_campaign_id'] = params[:cid]\n\t\t\t\tCampaignVisit.create(:campaign_id => params[:cid], :request_ip => request.remote_ip)\n\t\t\tend\n\t\tend\n\tend\n"
19
- end
20
- end
14
+ # def set_before_filter
15
+ # puts "Setting before filter in application_controller.rb..."
16
+ # insert_into_file 'app/controllers/application_controller.rb', "\n\n\tbefore_filter :set_cookie_and_record_visit", :after => 'ActionController::Base'
17
+ # insert_into_file 'app/controllers/application_controller.rb', :before => "end" do
18
+ # "\tprivate\n\n\tdef set_cookie_and_record_visit\n\t\tif params[:cid] && Campaign.find_by_id(params[:cid]) && !CampaignVisit.find_by_request_ip(request.remote_ip)\n\t\t\tif !cookies['touchstone_campaign_id']\n\t\t\t\tcookies['touchstone_campaign_id'] = params[:cid]\n\t\t\t\tCampaignVisit.create(:campaign_id => params[:cid], :request_ip => request.remote_ip)\n\t\t\tend\n\t\tend\n\tend\n"
19
+ # end
20
+ # end
21
21
 
22
22
  def mount_engine
23
23
  puts "Mounting engine into routes.rb..."
@@ -1,3 +1,3 @@
1
1
  module Touchstone
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: touchstone
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -159,7 +159,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
159
159
  version: '0'
160
160
  segments:
161
161
  - 0
162
- hash: 3458186603622929131
162
+ hash: -3797469945151478900
163
163
  required_rubygems_version: !ruby/object:Gem::Requirement
164
164
  none: false
165
165
  requirements:
@@ -168,7 +168,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
168
168
  version: '0'
169
169
  segments:
170
170
  - 0
171
- hash: 3458186603622929131
171
+ hash: -3797469945151478900
172
172
  requirements: []
173
173
  rubyforge_project:
174
174
  rubygems_version: 1.8.20