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 +4 -4
- data/.travis.yml +2 -3
- data/Appraisals +5 -10
- data/gemfiles/{rails_3.1.gemfile → rails_5.0.gemfile} +1 -1
- data/lib/persist_campaign/controller.rb +5 -6
- data/lib/persist_campaign/version.rb +1 -1
- data/persist_campaign.gemspec +1 -1
- data/spec/dummy/config/routes.rb +4 -2
- data/spec/spec_helper.rb +16 -0
- metadata +8 -9
- data/gemfiles/rails_3.2.gemfile +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 08a50334df2acc63f22c1a5bf50f0437d5346180
|
4
|
+
data.tar.gz: 20601bc1d3236e564c34f4a7d2d6d941646ffe63
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b430df1df2f5b040076c4feb96a634da52ff6ccf8d02a92828fb90b6f18449cf60503f6f4ad8c516db2b70ed95056c34d996dec688bd78e3b3ebc0deafdda613
|
7
|
+
data.tar.gz: b7ee5db425505245f9a3abcb571338bcc22a9fe804dd37f653a8e199470c36e44c1eb306faa847bdf18ac7e4dcdfe609db0b391ccad39b4c6f56e1b8c98dcb5f
|
data/.travis.yml
CHANGED
@@ -1,12 +1,11 @@
|
|
1
1
|
language: ruby
|
2
2
|
cache: bundler
|
3
3
|
rvm:
|
4
|
-
- 2.
|
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
|
@@ -1,8 +1,7 @@
|
|
1
1
|
module PersistCampaign
|
2
2
|
module Controller
|
3
3
|
def self.included base
|
4
|
-
base.send :
|
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
|
14
|
-
url =
|
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
|
19
|
-
url =
|
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
|
data/persist_campaign.gemspec
CHANGED
@@ -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'
|
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
|
data/spec/dummy/config/routes.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -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.
|
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:
|
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:
|
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:
|
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.
|
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
|