subdomain_router 1.0.0 → 1.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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: beddf2d4b4cb474736fe40b722c3bbf965d40dbb6fd8318f5d1ab8111de3c22d
4
+ data.tar.gz: 265256f1fb39214e0296fd5027ddccb2893aa0b846b767a2f5b204eae4babad4
5
+ SHA512:
6
+ metadata.gz: e29f380bfce2af2672c6860a3e200ec984369413b2709912a0603b12484c668c65b313db08f1c8edd33e67c149cdb40ed497d7f430d46179da8d9a94cefd79aa
7
+ data.tar.gz: d9a7b96516f27b6cfe59b7cec2009089705db66fd984b9aa61f0767e9892116a5552b79e3090f920eb8c9f23af1d54af67e50bd53f5ee4d1af5f423a853fdd02
data/.rspec CHANGED
@@ -1 +1,2 @@
1
1
  --color
2
+ --format documentation
data/.ruby-gemset ADDED
@@ -0,0 +1 @@
1
+ subdomain_router
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.4.2
data/Gemfile CHANGED
@@ -1,6 +1,6 @@
1
1
  source 'http://rubygems.org'
2
2
 
3
- gem 'rails'
3
+ gem 'rails', '>= 5.0.0'
4
4
 
5
5
  group :development do
6
6
  # SPECS
@@ -12,5 +12,5 @@ group :development do
12
12
 
13
13
  # DEVELOPMENT
14
14
  gem 'bundler'
15
- gem 'jeweler'
15
+ gem 'juwelier'
16
16
  end
data/Gemfile.lock CHANGED
@@ -1,107 +1,175 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- actionmailer (3.2.3)
5
- actionpack (= 3.2.3)
6
- mail (~> 2.4.4)
7
- actionpack (3.2.3)
8
- activemodel (= 3.2.3)
9
- activesupport (= 3.2.3)
10
- builder (~> 3.0.0)
11
- erubis (~> 2.7.0)
12
- journey (~> 1.0.1)
13
- rack (~> 1.4.0)
14
- rack-cache (~> 1.2)
15
- rack-test (~> 0.6.1)
16
- sprockets (~> 2.1.2)
17
- activemodel (3.2.3)
18
- activesupport (= 3.2.3)
19
- builder (~> 3.0.0)
20
- activerecord (3.2.3)
21
- activemodel (= 3.2.3)
22
- activesupport (= 3.2.3)
23
- arel (~> 3.0.2)
24
- tzinfo (~> 0.3.29)
25
- activeresource (3.2.3)
26
- activemodel (= 3.2.3)
27
- activesupport (= 3.2.3)
28
- activesupport (3.2.3)
29
- i18n (~> 0.6)
30
- multi_json (~> 1.0)
31
- arel (3.0.2)
32
- builder (3.0.0)
33
- diff-lcs (1.1.3)
34
- erubis (2.7.0)
35
- git (1.2.5)
36
- hike (1.2.1)
37
- i18n (0.6.0)
38
- jeweler (1.8.3)
39
- bundler (~> 1.0)
40
- git (>= 1.2.5)
4
+ actioncable (5.1.4)
5
+ actionpack (= 5.1.4)
6
+ nio4r (~> 2.0)
7
+ websocket-driver (~> 0.6.1)
8
+ actionmailer (5.1.4)
9
+ actionpack (= 5.1.4)
10
+ actionview (= 5.1.4)
11
+ activejob (= 5.1.4)
12
+ mail (~> 2.5, >= 2.5.4)
13
+ rails-dom-testing (~> 2.0)
14
+ actionpack (5.1.4)
15
+ actionview (= 5.1.4)
16
+ activesupport (= 5.1.4)
17
+ rack (~> 2.0)
18
+ rack-test (>= 0.6.3)
19
+ rails-dom-testing (~> 2.0)
20
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
21
+ actionview (5.1.4)
22
+ activesupport (= 5.1.4)
23
+ builder (~> 3.1)
24
+ erubi (~> 1.4)
25
+ rails-dom-testing (~> 2.0)
26
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
27
+ activejob (5.1.4)
28
+ activesupport (= 5.1.4)
29
+ globalid (>= 0.3.6)
30
+ activemodel (5.1.4)
31
+ activesupport (= 5.1.4)
32
+ activerecord (5.1.4)
33
+ activemodel (= 5.1.4)
34
+ activesupport (= 5.1.4)
35
+ arel (~> 8.0)
36
+ activesupport (5.1.4)
37
+ concurrent-ruby (~> 1.0, >= 1.0.2)
38
+ i18n (~> 0.7)
39
+ minitest (~> 5.1)
40
+ tzinfo (~> 1.1)
41
+ addressable (2.5.2)
42
+ public_suffix (>= 2.0.2, < 4.0)
43
+ arel (8.0.0)
44
+ builder (3.2.3)
45
+ concurrent-ruby (1.0.5)
46
+ crass (1.0.3)
47
+ descendants_tracker (0.0.4)
48
+ thread_safe (~> 0.3, >= 0.3.1)
49
+ diff-lcs (1.3)
50
+ erubi (1.7.0)
51
+ faraday (0.12.2)
52
+ multipart-post (>= 1.2, < 3)
53
+ git (1.3.0)
54
+ github_api (0.18.2)
55
+ addressable (~> 2.4)
56
+ descendants_tracker (~> 0.0.4)
57
+ faraday (~> 0.8)
58
+ hashie (~> 3.5, >= 3.5.2)
59
+ oauth2 (~> 1.0)
60
+ globalid (0.4.1)
61
+ activesupport (>= 4.2.0)
62
+ hashie (3.5.6)
63
+ highline (1.7.10)
64
+ i18n (0.9.1)
65
+ concurrent-ruby (~> 1.0)
66
+ juwelier (2.4.7)
67
+ builder
68
+ bundler
69
+ git
70
+ github_api
71
+ highline
72
+ kamelcase (~> 0)
73
+ nokogiri
74
+ psych
41
75
  rake
42
76
  rdoc
43
- journey (1.0.3)
44
- json (1.6.6)
45
- mail (2.4.4)
46
- i18n (>= 0.4.0)
47
- mime-types (~> 1.16)
48
- treetop (~> 1.4.8)
49
- mime-types (1.18)
50
- multi_json (1.3.2)
51
- polyglot (0.3.3)
52
- rack (1.4.1)
53
- rack-cache (1.2)
54
- rack (>= 0.4)
55
- rack-ssl (1.3.2)
56
- rack
57
- rack-test (0.6.1)
58
- rack (>= 1.0)
59
- rails (3.2.3)
60
- actionmailer (= 3.2.3)
61
- actionpack (= 3.2.3)
62
- activerecord (= 3.2.3)
63
- activeresource (= 3.2.3)
64
- activesupport (= 3.2.3)
65
- bundler (~> 1.0)
66
- railties (= 3.2.3)
67
- railties (3.2.3)
68
- actionpack (= 3.2.3)
69
- activesupport (= 3.2.3)
70
- rack-ssl (~> 1.3.2)
77
+ semver2
78
+ jwt (1.5.6)
79
+ kamelcase (0.0.1)
80
+ semver2 (~> 3)
81
+ loofah (2.1.1)
82
+ crass (~> 1.0.2)
83
+ nokogiri (>= 1.5.9)
84
+ mail (2.7.0)
85
+ mini_mime (>= 0.1.1)
86
+ method_source (0.9.0)
87
+ mini_mime (1.0.0)
88
+ mini_portile2 (2.3.0)
89
+ minitest (5.10.3)
90
+ multi_json (1.12.2)
91
+ multi_xml (0.6.0)
92
+ multipart-post (2.0.0)
93
+ nio4r (2.1.0)
94
+ nokogiri (1.8.1)
95
+ mini_portile2 (~> 2.3.0)
96
+ oauth2 (1.4.0)
97
+ faraday (>= 0.8, < 0.13)
98
+ jwt (~> 1.0)
99
+ multi_json (~> 1.3)
100
+ multi_xml (~> 0.5)
101
+ rack (>= 1.2, < 3)
102
+ psych (3.0.1)
103
+ public_suffix (3.0.1)
104
+ rack (2.0.3)
105
+ rack-test (0.8.2)
106
+ rack (>= 1.0, < 3)
107
+ rails (5.1.4)
108
+ actioncable (= 5.1.4)
109
+ actionmailer (= 5.1.4)
110
+ actionpack (= 5.1.4)
111
+ actionview (= 5.1.4)
112
+ activejob (= 5.1.4)
113
+ activemodel (= 5.1.4)
114
+ activerecord (= 5.1.4)
115
+ activesupport (= 5.1.4)
116
+ bundler (>= 1.3.0)
117
+ railties (= 5.1.4)
118
+ sprockets-rails (>= 2.0.0)
119
+ rails-dom-testing (2.0.3)
120
+ activesupport (>= 4.2.0)
121
+ nokogiri (>= 1.6)
122
+ rails-html-sanitizer (1.0.3)
123
+ loofah (~> 2.0)
124
+ railties (5.1.4)
125
+ actionpack (= 5.1.4)
126
+ activesupport (= 5.1.4)
127
+ method_source
71
128
  rake (>= 0.8.7)
72
- rdoc (~> 3.4)
73
- thor (~> 0.14.6)
74
- rake (0.9.2.2)
75
- rdoc (3.12)
76
- json (~> 1.4)
77
- redcarpet (2.1.1)
78
- rspec (2.9.0)
79
- rspec-core (~> 2.9.0)
80
- rspec-expectations (~> 2.9.0)
81
- rspec-mocks (~> 2.9.0)
82
- rspec-core (2.9.0)
83
- rspec-expectations (2.9.1)
84
- diff-lcs (~> 1.1.3)
85
- rspec-mocks (2.9.0)
86
- sprockets (2.1.2)
87
- hike (~> 1.2)
88
- rack (~> 1.0)
89
- tilt (~> 1.1, != 1.3.0)
90
- thor (0.14.6)
91
- tilt (1.3.3)
92
- treetop (1.4.10)
93
- polyglot
94
- polyglot (>= 0.3.1)
95
- tzinfo (0.3.33)
96
- yard (0.7.5)
129
+ thor (>= 0.18.1, < 2.0)
130
+ rake (12.3.0)
131
+ rdoc (6.0.0)
132
+ redcarpet (3.4.0)
133
+ rspec (3.7.0)
134
+ rspec-core (~> 3.7.0)
135
+ rspec-expectations (~> 3.7.0)
136
+ rspec-mocks (~> 3.7.0)
137
+ rspec-core (3.7.0)
138
+ rspec-support (~> 3.7.0)
139
+ rspec-expectations (3.7.0)
140
+ diff-lcs (>= 1.2.0, < 2.0)
141
+ rspec-support (~> 3.7.0)
142
+ rspec-mocks (3.7.0)
143
+ diff-lcs (>= 1.2.0, < 2.0)
144
+ rspec-support (~> 3.7.0)
145
+ rspec-support (3.7.0)
146
+ semver2 (3.4.2)
147
+ sprockets (3.7.1)
148
+ concurrent-ruby (~> 1.0)
149
+ rack (> 1, < 3)
150
+ sprockets-rails (3.2.1)
151
+ actionpack (>= 4.0)
152
+ activesupport (>= 4.0)
153
+ sprockets (>= 3.0.0)
154
+ thor (0.20.0)
155
+ thread_safe (0.3.6)
156
+ tzinfo (1.2.4)
157
+ thread_safe (~> 0.1)
158
+ websocket-driver (0.6.5)
159
+ websocket-extensions (>= 0.1.0)
160
+ websocket-extensions (0.1.3)
161
+ yard (0.9.12)
97
162
 
98
163
  PLATFORMS
99
164
  ruby
100
165
 
101
166
  DEPENDENCIES
102
167
  bundler
103
- jeweler
104
- rails
168
+ juwelier
169
+ rails (>= 5.0.0)
105
170
  redcarpet
106
171
  rspec
107
172
  yard
173
+
174
+ BUNDLED WITH
175
+ 1.16.0
data/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ > ⚠️ **DEPRECATED**: subdomain_router is no longer maintained. Modern Rails has built-in subdomain routing constraints that cover the same use cases. This is the final release.
2
+
1
3
  Subdomain Router
2
4
  ================
3
5
 
data/Rakefile CHANGED
@@ -11,8 +11,8 @@ rescue Bundler::BundlerError => e
11
11
  end
12
12
  require 'rake'
13
13
 
14
- require 'jeweler'
15
- Jeweler::Tasks.new do |gem|
14
+ require 'juwelier'
15
+ Juwelier::Tasks.new do |gem|
16
16
  # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
17
17
  gem.name = "subdomain_router"
18
18
  gem.homepage = "http://github.com/RISCfuture/subdomain_router"
@@ -23,7 +23,7 @@ Jeweler::Tasks.new do |gem|
23
23
  gem.authors = ["Tim Morgan"]
24
24
  # dependencies defined in Gemfile
25
25
  end
26
- Jeweler::RubygemsDotOrgTasks.new
26
+ Juwelier::RubygemsDotOrgTasks.new
27
27
 
28
28
  require 'rspec/core'
29
29
  require 'rspec/core/rake_task'
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.0.2
@@ -15,65 +15,65 @@ describe SubdomainRouter::Controller do
15
15
 
16
16
  describe "#url_for" do
17
17
  it "should call the superclass unless a hash is given" do
18
- @controller.url_for('foo').should eql('foo')
18
+ expect(@controller.url_for('foo')).to eql('foo')
19
19
  end
20
20
 
21
21
  context "[given host]" do
22
22
  before :each do
23
- @controller.stub!(:request).and_return(mock('ActionDispatch::Request', host: 'test.host'))
23
+ allow(@controller).to receive(:request).and_return(double('ActionDispatch::Request', host: 'test.host'))
24
24
  end
25
25
 
26
26
  it "should leave the domain untouched if :subdomain => nil" do
27
- @controller.url_for(host: 'foo.bar').should eql(host: 'foo.bar')
28
- @controller.url_for(host: 'sd.foo.bar').should eql(host: 'sd.foo.bar')
29
- @controller.url_for(host: 'baz.bat.foo.bar').should eql(host: 'baz.bat.foo.bar')
27
+ expect(@controller.url_for(host: 'foo.bar')).to eql(host: 'foo.bar')
28
+ expect(@controller.url_for(host: 'sd.foo.bar')).to eql(host: 'sd.foo.bar')
29
+ expect(@controller.url_for(host: 'baz.bat.foo.bar')).to eql(host: 'baz.bat.foo.bar')
30
30
  end
31
31
 
32
32
  it "should replace the subdomain if :subdomain is given" do
33
- @controller.url_for(host: 'foo.bar', subdomain: 'sd').should eql(host: 'sd.foo.bar')
34
- @controller.url_for(host: 'baz.foo.bar', subdomain: 'sd').should eql(host: 'sd.foo.bar')
35
- @controller.url_for(host: 'baz.bat.foo.bar', subdomain: 'sd').should eql(host: 'sd.foo.bar')
33
+ expect(@controller.url_for(host: 'foo.bar', subdomain: 'sd')).to eql(host: 'sd.foo.bar')
34
+ expect(@controller.url_for(host: 'baz.foo.bar', subdomain: 'sd')).to eql(host: 'sd.foo.bar')
35
+ expect(@controller.url_for(host: 'baz.bat.foo.bar', subdomain: 'sd')).to eql(host: 'sd.foo.bar')
36
36
  end
37
37
 
38
38
  it "should use the default subdomain if :subdomain is false" do
39
- @controller.url_for(host: 'foo.bar', subdomain: false).should eql(host: 'foo.bar')
40
- @controller.url_for(host: 'baz.foo.bar', subdomain: false).should eql(host: 'foo.bar')
41
- @controller.url_for(host: 'baz.bat.foo.bar', subdomain: false).should eql(host: 'foo.bar')
39
+ expect(@controller.url_for(host: 'foo.bar', subdomain: false)).to eql(host: 'foo.bar')
40
+ expect(@controller.url_for(host: 'baz.foo.bar', subdomain: false)).to eql(host: 'foo.bar')
41
+ expect(@controller.url_for(host: 'baz.bat.foo.bar', subdomain: false)).to eql(host: 'foo.bar')
42
42
  end
43
43
  end
44
44
 
45
45
  context "[request host]" do
46
46
  it "should leave the domain untouched if :subdomain => nil" do
47
- @controller.stub!(:request).and_return(mock('ActionDispatch::Request', host: 'foo.bar'))
48
- @controller.url_for(subdomain: nil).should eql({})
47
+ allow(@controller).to receive(:request).and_return(double('ActionDispatch::Request', host: 'foo.bar'))
48
+ expect(@controller.url_for(subdomain: nil)).to eql({})
49
49
 
50
- @controller.stub!(:request).and_return(mock('ActionDispatch::Request', host: 'sd.foo.bar'))
51
- @controller.url_for(subdomain: nil).should eql({})
50
+ allow(@controller).to receive(:request).and_return(double('ActionDispatch::Request', host: 'sd.foo.bar'))
51
+ expect(@controller.url_for(subdomain: nil)).to eql({})
52
52
 
53
- @controller.stub!(:request).and_return(mock('ActionDispatch::Request', host: 'baz.bat.foo.bar'))
54
- @controller.url_for(subdomain: nil).should eql({})
53
+ allow(@controller).to receive(:request).and_return(double('ActionDispatch::Request', host: 'baz.bat.foo.bar'))
54
+ expect(@controller.url_for(subdomain: nil)).to eql({})
55
55
  end
56
56
 
57
57
  it "should replace the subdomain if :subdomain is given" do
58
- @controller.stub!(:request).and_return(mock('ActionDispatch::Request', host: 'foo.bar'))
59
- @controller.url_for(subdomain: 'sd').should eql(host: 'sd.foo.bar')
58
+ allow(@controller).to receive(:request).and_return(double('ActionDispatch::Request', host: 'foo.bar'))
59
+ expect(@controller.url_for(subdomain: 'sd')).to eql(host: 'sd.foo.bar')
60
60
 
61
- @controller.stub!(:request).and_return(mock('ActionDispatch::Request', host: 'baz.foo.bar'))
62
- @controller.url_for(subdomain: 'sd').should eql(host: 'sd.foo.bar')
61
+ allow(@controller).to receive(:request).and_return(double('ActionDispatch::Request', host: 'baz.foo.bar'))
62
+ expect(@controller.url_for(subdomain: 'sd')).to eql(host: 'sd.foo.bar')
63
63
 
64
- @controller.stub!(:request).and_return(mock('ActionDispatch::Request', host: 'baz.bat.foo.bar'))
65
- @controller.url_for(subdomain: 'sd').should eql(host: 'sd.foo.bar')
64
+ allow(@controller).to receive(:request).and_return(double('ActionDispatch::Request', host: 'baz.bat.foo.bar'))
65
+ expect(@controller.url_for(subdomain: 'sd')).to eql(host: 'sd.foo.bar')
66
66
  end
67
67
 
68
68
  it "should use the default subdomain if :subdomain is false" do
69
- @controller.stub!(:request).and_return(mock('ActionDispatch::Request', host: 'foo.bar'))
70
- @controller.url_for(subdomain: false).should eql(host: 'foo.bar')
69
+ allow(@controller).to receive(:request).and_return(double('ActionDispatch::Request', host: 'foo.bar'))
70
+ expect(@controller.url_for(subdomain: false)).to eql(host: 'foo.bar')
71
71
 
72
- @controller.stub!(:request).and_return(mock('ActionDispatch::Request', host: 'baz.foo.bar'))
73
- @controller.url_for(subdomain: false).should eql(host: 'foo.bar')
72
+ allow(@controller).to receive(:request).and_return(double('ActionDispatch::Request', host: 'baz.foo.bar'))
73
+ expect(@controller.url_for(subdomain: false)).to eql(host: 'foo.bar')
74
74
 
75
- @controller.stub!(:request).and_return(mock('ActionDispatch::Request', host: 'baz.bat.foo.bar'))
76
- @controller.url_for(subdomain: false).should eql(host: 'foo.bar')
75
+ allow(@controller).to receive(:request).and_return(double('ActionDispatch::Request', host: 'baz.bat.foo.bar'))
76
+ expect(@controller.url_for(subdomain: false)).to eql(host: 'foo.bar')
77
77
  end
78
78
  end
79
79
 
@@ -88,15 +88,15 @@ describe SubdomainRouter::Controller do
88
88
 
89
89
  it "should leave the domain untouched if :subdomain => nil" do
90
90
  # no host provided = exception
91
- -> { @mailer.url_for(controller: 'users', action: 'new', subdomain: nil) }.should raise_error(ArgumentError)
91
+ expect { @mailer.url_for(controller: 'users', action: 'new', subdomain: nil) }.to raise_error(ArgumentError)
92
92
  end
93
93
 
94
94
  it "should replace the subdomain if :subdomain is given" do
95
- @mailer.url_for(controller: 'users', action: 'new', subdomain: 'sd').should eql('http://sd.test.host/users/new')
95
+ expect(@mailer.url_for(controller: 'users', action: 'new', subdomain: 'sd')).to eql('http://sd.test.host/users/new')
96
96
  end
97
97
 
98
98
  it "should use the default subdomain if :subdomain is false" do
99
- @mailer.url_for(controller: 'users', action: 'new', subdomain: false).should eql('http://test.host/users/new')
99
+ expect(@mailer.url_for(controller: 'users', action: 'new', subdomain: false)).to eql('http://test.host/users/new')
100
100
  end
101
101
  end
102
102
  end
@@ -106,40 +106,40 @@ describe SubdomainRouter::Constraint do
106
106
  describe ".matches?" do
107
107
  before :each do
108
108
  @env = {}
109
- @request = mock('ActionDispatch::Request', env: @env)
109
+ @request = double('ActionDispatch::Request', env: @env)
110
110
  end
111
111
 
112
112
  it "should return false if there is more than one subdomain" do
113
- @request.stub!(:subdomains).and_return(%w( foo bar ))
114
- SubdomainRouter::Constraint.matches?(@request).should be_false
113
+ allow(@request).to receive(:subdomains).and_return(%w( foo bar ))
114
+ expect(SubdomainRouter::Constraint.matches?(@request)).to eql(false)
115
115
  end
116
116
 
117
117
  it "should return false if there is no subdomain" do
118
- @request.stub!(:subdomains).and_return([])
119
- SubdomainRouter::Constraint.matches?(@request).should be_false
118
+ allow(@request).to receive(:subdomains).and_return([])
119
+ expect(SubdomainRouter::Constraint.matches?(@request)).to eql(false)
120
120
  end
121
121
 
122
122
  it "should return false if the subdomain is equal to the default subdomain" do
123
123
  SubdomainRouter::Config.default_subdomain = 'www'
124
- @request.stub!(:subdomains).and_return(%w( www ))
125
- SubdomainRouter::Constraint.matches?(@request).should be_false
124
+ allow(@request).to receive(:subdomains).and_return(%w( www ))
125
+ expect(SubdomainRouter::Constraint.matches?(@request)).to eql(false)
126
126
  end
127
127
 
128
128
  it "should return false if the subdomain does not belong to any user" do
129
- @request.stub!(:subdomains).and_return(%w( not-found ))
130
- SubdomainRouter::Constraint.matches?(@request).should be_false
129
+ allow(@request).to receive(:subdomains).and_return(%w( not-found ))
130
+ expect(SubdomainRouter::Constraint.matches?(@request)).to eql(false)
131
131
  end
132
132
 
133
133
  it "should return true if the subdomain belongs to a user and save the user to the env" do
134
134
  SubdomainRouter::Config.subdomain_matcher = ->(subdomain, request) { subdomain == 'valid' }
135
- @request.stub!(:subdomains).and_return([ 'valid' ])
136
- SubdomainRouter::Constraint.matches?(@request).should be_true
135
+ allow(@request).to receive(:subdomains).and_return([ 'valid' ])
136
+ expect(SubdomainRouter::Constraint.matches?(@request)).to eql(true)
137
137
  end
138
138
 
139
139
  it "should downcase the subdomain" do
140
140
  SubdomainRouter::Config.subdomain_matcher = ->(subdomain, request) { subdomain == 'valid' }
141
- @request.stub!(:subdomains).and_return([ 'VALID' ])
142
- SubdomainRouter::Constraint.matches?(@request).should be_true
141
+ allow(@request).to receive(:subdomains).and_return([ 'VALID' ])
142
+ expect(SubdomainRouter::Constraint.matches?(@request)).to eql(true)
143
143
  end
144
144
  end
145
145
  end
@@ -1,17 +1,19 @@
1
- # Generated by jeweler
1
+ # Generated by juwelier
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
3
+ # Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
+ # stub: subdomain_router 1.0.2 ruby lib
5
6
 
6
7
  Gem::Specification.new do |s|
7
- s.name = "subdomain_router"
8
- s.version = "1.0.0"
8
+ s.name = "subdomain_router".freeze
9
+ s.version = "1.0.2"
9
10
 
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Tim Morgan"]
12
- s.date = "2012-04-23"
13
- s.description = "This adds a routing constraint and controller methods to allow dynamic subdomain-based routing."
14
- s.email = "gemcutter@timothymorgan.info"
11
+ s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
+ s.require_paths = ["lib".freeze]
13
+ s.authors = ["Tim Morgan".freeze]
14
+ s.date = "2016-07-04"
15
+ s.description = "This adds a routing constraint and controller methods to allow dynamic subdomain-based routing.".freeze
16
+ s.email = "gemcutter@timothymorgan.info".freeze
15
17
  s.extra_rdoc_files = [
16
18
  "LICENSE.txt",
17
19
  "README.md"
@@ -19,7 +21,8 @@ Gem::Specification.new do |s|
19
21
  s.files = [
20
22
  ".document",
21
23
  ".rspec",
22
- ".rvmrc",
24
+ ".ruby-gemset",
25
+ ".ruby-version",
23
26
  "Gemfile",
24
27
  "Gemfile.lock",
25
28
  "LICENSE.txt",
@@ -28,39 +31,48 @@ Gem::Specification.new do |s|
28
31
  "VERSION",
29
32
  "lib/subdomain_router.rb",
30
33
  "spec/spec_helper.rb",
31
- "spec/subdomain_router_spec.rb"
34
+ "spec/subdomain_router_spec.rb",
35
+ "subdomain_router.gemspec"
32
36
  ]
33
- s.homepage = "http://github.com/RISCfuture/subdomain_router"
34
- s.licenses = ["MIT"]
35
- s.require_paths = ["lib"]
36
- s.rubygems_version = "1.8.23"
37
- s.summary = "Use dynamic subdomains in your Rails website"
37
+ s.homepage = "http://github.com/RISCfuture/subdomain_router".freeze
38
+ s.licenses = ["MIT".freeze]
39
+ s.rubygems_version = "2.6.6".freeze
40
+ s.summary = "[DEPRECATED] Use dynamic subdomains in your Rails website".freeze
41
+ s.post_install_message = <<~MSG
42
+
43
+ ⚠️ DEPRECATED: subdomain_router is no longer maintained.
44
+
45
+ No longer maintained. Modern Rails has built-in subdomain routing constraints that cover the same use cases.
46
+
47
+ This is the final release. No further updates are planned.
48
+
49
+ MSG
38
50
 
39
51
  if s.respond_to? :specification_version then
40
- s.specification_version = 3
52
+ s.specification_version = 4
41
53
 
42
54
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
43
- s.add_runtime_dependency(%q<rails>, [">= 0"])
44
- s.add_development_dependency(%q<rspec>, [">= 0"])
45
- s.add_development_dependency(%q<yard>, [">= 0"])
46
- s.add_development_dependency(%q<redcarpet>, [">= 0"])
47
- s.add_development_dependency(%q<bundler>, [">= 0"])
48
- s.add_development_dependency(%q<jeweler>, [">= 0"])
55
+ s.add_runtime_dependency(%q<rails>.freeze, [">= 5.0.0"])
56
+ s.add_development_dependency(%q<rspec>.freeze, [">= 0"])
57
+ s.add_development_dependency(%q<yard>.freeze, [">= 0"])
58
+ s.add_development_dependency(%q<redcarpet>.freeze, [">= 0"])
59
+ s.add_development_dependency(%q<bundler>.freeze, [">= 0"])
60
+ s.add_development_dependency(%q<juwelier>.freeze, [">= 0"])
49
61
  else
50
- s.add_dependency(%q<rails>, [">= 0"])
51
- s.add_dependency(%q<rspec>, [">= 0"])
52
- s.add_dependency(%q<yard>, [">= 0"])
53
- s.add_dependency(%q<redcarpet>, [">= 0"])
54
- s.add_dependency(%q<bundler>, [">= 0"])
55
- s.add_dependency(%q<jeweler>, [">= 0"])
62
+ s.add_dependency(%q<rails>.freeze, [">= 5.0.0"])
63
+ s.add_dependency(%q<rspec>.freeze, [">= 0"])
64
+ s.add_dependency(%q<yard>.freeze, [">= 0"])
65
+ s.add_dependency(%q<redcarpet>.freeze, [">= 0"])
66
+ s.add_dependency(%q<bundler>.freeze, [">= 0"])
67
+ s.add_dependency(%q<juwelier>.freeze, [">= 0"])
56
68
  end
57
69
  else
58
- s.add_dependency(%q<rails>, [">= 0"])
59
- s.add_dependency(%q<rspec>, [">= 0"])
60
- s.add_dependency(%q<yard>, [">= 0"])
61
- s.add_dependency(%q<redcarpet>, [">= 0"])
62
- s.add_dependency(%q<bundler>, [">= 0"])
63
- s.add_dependency(%q<jeweler>, [">= 0"])
70
+ s.add_dependency(%q<rails>.freeze, [">= 5.0.0"])
71
+ s.add_dependency(%q<rspec>.freeze, [">= 0"])
72
+ s.add_dependency(%q<yard>.freeze, [">= 0"])
73
+ s.add_dependency(%q<redcarpet>.freeze, [">= 0"])
74
+ s.add_dependency(%q<bundler>.freeze, [">= 0"])
75
+ s.add_dependency(%q<juwelier>.freeze, [">= 0"])
64
76
  end
65
77
  end
66
78
 
metadata CHANGED
@@ -1,110 +1,96 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: subdomain_router
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
5
- prerelease:
4
+ version: 1.0.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Tim Morgan
9
- autorequire:
10
8
  bindir: bin
11
9
  cert_chain: []
12
- date: 2012-04-23 00:00:00.000000000 Z
10
+ date: 2016-07-04 00:00:00.000000000 Z
13
11
  dependencies:
14
12
  - !ruby/object:Gem::Dependency
15
13
  name: rails
16
14
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
15
  requirements:
19
- - - ! '>='
16
+ - - ">="
20
17
  - !ruby/object:Gem::Version
21
- version: '0'
18
+ version: 5.0.0
22
19
  type: :runtime
23
20
  prerelease: false
24
21
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
22
  requirements:
27
- - - ! '>='
23
+ - - ">="
28
24
  - !ruby/object:Gem::Version
29
- version: '0'
25
+ version: 5.0.0
30
26
  - !ruby/object:Gem::Dependency
31
27
  name: rspec
32
28
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
29
  requirements:
35
- - - ! '>='
30
+ - - ">="
36
31
  - !ruby/object:Gem::Version
37
32
  version: '0'
38
33
  type: :development
39
34
  prerelease: false
40
35
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
36
  requirements:
43
- - - ! '>='
37
+ - - ">="
44
38
  - !ruby/object:Gem::Version
45
39
  version: '0'
46
40
  - !ruby/object:Gem::Dependency
47
41
  name: yard
48
42
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
43
  requirements:
51
- - - ! '>='
44
+ - - ">="
52
45
  - !ruby/object:Gem::Version
53
46
  version: '0'
54
47
  type: :development
55
48
  prerelease: false
56
49
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
50
  requirements:
59
- - - ! '>='
51
+ - - ">="
60
52
  - !ruby/object:Gem::Version
61
53
  version: '0'
62
54
  - !ruby/object:Gem::Dependency
63
55
  name: redcarpet
64
56
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
57
  requirements:
67
- - - ! '>='
58
+ - - ">="
68
59
  - !ruby/object:Gem::Version
69
60
  version: '0'
70
61
  type: :development
71
62
  prerelease: false
72
63
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
64
  requirements:
75
- - - ! '>='
65
+ - - ">="
76
66
  - !ruby/object:Gem::Version
77
67
  version: '0'
78
68
  - !ruby/object:Gem::Dependency
79
69
  name: bundler
80
70
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
71
  requirements:
83
- - - ! '>='
72
+ - - ">="
84
73
  - !ruby/object:Gem::Version
85
74
  version: '0'
86
75
  type: :development
87
76
  prerelease: false
88
77
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
78
  requirements:
91
- - - ! '>='
79
+ - - ">="
92
80
  - !ruby/object:Gem::Version
93
81
  version: '0'
94
82
  - !ruby/object:Gem::Dependency
95
- name: jeweler
83
+ name: juwelier
96
84
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
85
  requirements:
99
- - - ! '>='
86
+ - - ">="
100
87
  - !ruby/object:Gem::Version
101
88
  version: '0'
102
89
  type: :development
103
90
  prerelease: false
104
91
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
92
  requirements:
107
- - - ! '>='
93
+ - - ">="
108
94
  - !ruby/object:Gem::Version
109
95
  version: '0'
110
96
  description: This adds a routing constraint and controller methods to allow dynamic
@@ -116,9 +102,10 @@ extra_rdoc_files:
116
102
  - LICENSE.txt
117
103
  - README.md
118
104
  files:
119
- - .document
120
- - .rspec
121
- - .rvmrc
105
+ - ".document"
106
+ - ".rspec"
107
+ - ".ruby-gemset"
108
+ - ".ruby-version"
122
109
  - Gemfile
123
110
  - Gemfile.lock
124
111
  - LICENSE.txt
@@ -132,29 +119,31 @@ files:
132
119
  homepage: http://github.com/RISCfuture/subdomain_router
133
120
  licenses:
134
121
  - MIT
135
- post_install_message:
122
+ metadata: {}
123
+ post_install_message: |2+
124
+
125
+ ⚠️ DEPRECATED: subdomain_router is no longer maintained.
126
+
127
+ No longer maintained. Modern Rails has built-in subdomain routing constraints that cover the same use cases.
128
+
129
+ This is the final release. No further updates are planned.
130
+
136
131
  rdoc_options: []
137
132
  require_paths:
138
133
  - lib
139
134
  required_ruby_version: !ruby/object:Gem::Requirement
140
- none: false
141
135
  requirements:
142
- - - ! '>='
136
+ - - ">="
143
137
  - !ruby/object:Gem::Version
144
138
  version: '0'
145
- segments:
146
- - 0
147
- hash: -4479704525159209868
148
139
  required_rubygems_version: !ruby/object:Gem::Requirement
149
- none: false
150
140
  requirements:
151
- - - ! '>='
141
+ - - ">="
152
142
  - !ruby/object:Gem::Version
153
143
  version: '0'
154
144
  requirements: []
155
- rubyforge_project:
156
- rubygems_version: 1.8.23
157
- signing_key:
158
- specification_version: 3
159
- summary: Use dynamic subdomains in your Rails website
145
+ rubygems_version: 4.0.11
146
+ specification_version: 4
147
+ summary: "[DEPRECATED] Use dynamic subdomains in your Rails website"
160
148
  test_files: []
149
+ ...
data/.rvmrc DELETED
@@ -1 +0,0 @@
1
- rvm 1.9.3@subdomain_router --create