persist_campaign 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1b82f1c95d7fab634604c373cdabbc334c781015
4
- data.tar.gz: 04f643c8a836396a7d5554d3ad8f2ab1e7f6b884
3
+ metadata.gz: 08a50334df2acc63f22c1a5bf50f0437d5346180
4
+ data.tar.gz: 20601bc1d3236e564c34f4a7d2d6d941646ffe63
5
5
  SHA512:
6
- metadata.gz: 43dbdc2fcad408c45976bcd54dc4ed08ae5bc04082c307847de09e645261e37f49efb63baf8fec18e9ee221bff02ba2535bcdb52630f1b8ef6d5901e5a970151
7
- data.tar.gz: cd52998655c3771d7d9b98dca6f7cf772319bed0a478f9b5d1b0c0bea5cc78dc8fea3d999cc25718161dc8b7863e28cd02f37982c32a45c2ee2e20af51fa315e
6
+ metadata.gz: b430df1df2f5b040076c4feb96a634da52ff6ccf8d02a92828fb90b6f18449cf60503f6f4ad8c516db2b70ed95056c34d996dec688bd78e3b3ebc0deafdda613
7
+ data.tar.gz: b7ee5db425505245f9a3abcb571338bcc22a9fe804dd37f653a8e199470c36e44c1eb306faa847bdf18ac7e4dcdfe609db0b391ccad39b4c6f56e1b8c98dcb5f
@@ -1,12 +1,11 @@
1
1
  language: ruby
2
2
  cache: bundler
3
3
  rvm:
4
- - 2.1.3
4
+ - 2.2.6
5
5
  gemfile:
6
- - gemfiles/rails_3.1.gemfile
7
- - gemfiles/rails_3.2.gemfile
8
6
  - gemfiles/rails_4.0.gemfile
9
7
  - gemfiles/rails_4.1.gemfile
10
8
  - gemfiles/rails_4.2.gemfile
9
+ - gemfiles/rails_5.0.gemfile
11
10
  before_install:
12
11
  gem install bundler
data/Appraisals CHANGED
@@ -1,13 +1,3 @@
1
- appraise "rails-3.1" do
2
- gem "rails", "~> 3.1.0"
3
- gemspec
4
- end
5
-
6
- appraise "rails-3.2" do
7
- gem "rails", "~> 3.2.1"
8
- gemspec
9
- end
10
-
11
1
  appraise "rails-4.0" do
12
2
  gem "rails", "~> 4.0.0"
13
3
  gemspec
@@ -22,3 +12,8 @@ appraise "rails-4.2" do
22
12
  gem "rails", "~> 4.2"
23
13
  gemspec
24
14
  end
15
+
16
+ appraise "rails-5.0" do
17
+ gem "rails", "~> 5.0"
18
+ gemspec
19
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "rails", "~> 3.1.0"
5
+ gem "rails", "~> 5.0"
6
6
 
7
7
  gemspec :path => "../"
@@ -1,8 +1,7 @@
1
1
  module PersistCampaign
2
2
  module Controller
3
3
  def self.included base
4
- base.send :include, InstanceMethods
5
- base.alias_method_chain :_compute_redirect_to_location, :persist_campaign_params
4
+ base.send :prepend, InstanceMethods
6
5
  end
7
6
 
8
7
  module InstanceMethods
@@ -10,13 +9,13 @@ module PersistCampaign
10
9
  # reproduced here under the MIT license
11
10
 
12
11
  if Gem::Version.new(Rails.version) >= Gem::Version.new('4.2.1')
13
- def _compute_redirect_to_location_with_persist_campaign_params(request, options = {})
14
- url = _compute_redirect_to_location_without_persist_campaign_params(request, options)
12
+ def _compute_redirect_to_location(request, options = {})
13
+ url = super(request, options)
15
14
  _add_persisted_keys_to(request, url)
16
15
  end
17
16
  else
18
- def _compute_redirect_to_location_with_persist_campaign_params(options = {})
19
- url = _compute_redirect_to_location_without_persist_campaign_params(options)
17
+ def _compute_redirect_to_location(options = {})
18
+ url = super(options)
20
19
  _add_persisted_keys_to(request, url)
21
20
  end
22
21
  end
@@ -1,3 +1,3 @@
1
1
  module PersistCampaign
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
22
22
 
23
23
  spec.add_development_dependency "bundler", "~> 1.5"
24
24
  spec.add_development_dependency "rake"
25
- spec.add_development_dependency 'rspec-rails', '~> 3.4.0'
25
+ spec.add_development_dependency 'rspec-rails'
26
26
  spec.add_development_dependency 'generator_spec', '~> 0.9.3'
27
27
  spec.add_development_dependency "appraisal"
28
28
  end
@@ -1,3 +1,5 @@
1
1
  Rails.application.routes.draw do
2
- get ':controller(/:action(/:id))(.:format)'
3
- end
2
+ get 'example/foo', to: 'example#foo'
3
+ get 'example/action_with_params', to: 'example#action_with_params'
4
+ get 'example/bar', to: 'example#bar'
5
+ end
@@ -5,6 +5,22 @@ require 'rspec/rails'
5
5
 
6
6
  Rails.backtrace_cleaner.remove_silencers!
7
7
 
8
+ module Rails5ControllerSpecShim
9
+ module InstanceMethods
10
+ private
11
+ def get(action, params = {})
12
+ super(action, params: params)
13
+ end
14
+ end
15
+
16
+ def self.included(base)
17
+ if Gem::Version.new(Rails.version) >= Gem::Version.new('5')
18
+ base.prepend(InstanceMethods)
19
+ end
20
+ end
21
+ end
22
+
8
23
  RSpec.configure do |config|
9
24
  config.infer_spec_type_from_file_location!
25
+ config.include Rails5ControllerSpecShim, type: :controller
10
26
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: persist_campaign
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Dust
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-07 00:00:00.000000000 Z
11
+ date: 2017-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -42,16 +42,16 @@ dependencies:
42
42
  name: rspec-rails
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: 3.4.0
47
+ version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: 3.4.0
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: generator_spec
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -97,11 +97,10 @@ files:
97
97
  - LICENSE.txt
98
98
  - README.md
99
99
  - Rakefile
100
- - gemfiles/rails_3.1.gemfile
101
- - gemfiles/rails_3.2.gemfile
102
100
  - gemfiles/rails_4.0.gemfile
103
101
  - gemfiles/rails_4.1.gemfile
104
102
  - gemfiles/rails_4.2.gemfile
103
+ - gemfiles/rails_5.0.gemfile
105
104
  - lib/generators/persist_campaign/install_generator.rb
106
105
  - lib/generators/persist_campaign/templates/initializer.rb
107
106
  - lib/persist_campaign.rb
@@ -143,7 +142,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
143
142
  version: '0'
144
143
  requirements: []
145
144
  rubyforge_project:
146
- rubygems_version: 2.4.6
145
+ rubygems_version: 2.4.5.2
147
146
  signing_key:
148
147
  specification_version: 4
149
148
  summary: Persist campaign parameters - such as utm_campaign, utm_source, etc - on
@@ -1,7 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "rails", "~> 3.2.1"
6
-
7
- gemspec :path => "../"