subdomainitis 0.9.31 → 0.9.32
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.
- data/lib/subdomainitis.rb +24 -1
- metadata +6 -6
data/lib/subdomainitis.rb
CHANGED
@@ -91,6 +91,11 @@ module Subdomainitis
|
|
91
91
|
@route_set, @dispatcher, @subdomain_key = route_set, dispatcher, subdomain_key
|
92
92
|
end
|
93
93
|
|
94
|
+
# so running rake routes doesn't spew a bunch of gibberish
|
95
|
+
def inspect
|
96
|
+
self.class
|
97
|
+
end
|
98
|
+
|
94
99
|
attr_reader :route_set, :subdomain_key, :dispatcher
|
95
100
|
delegate :use_fake_subdomains, :tld_length, :to => :route_set
|
96
101
|
|
@@ -212,4 +217,22 @@ module Subdomainitis
|
|
212
217
|
end
|
213
218
|
end
|
214
219
|
|
215
|
-
|
220
|
+
class << self
|
221
|
+
def monkeypatch_route_inspector!
|
222
|
+
require 'rails/application/route_inspector'
|
223
|
+
|
224
|
+
name = :discover_rack_app
|
225
|
+
if defined? Rails::Application::RouteInspector
|
226
|
+
if Rails::Application::RouteInspector.instance_methods.include? name
|
227
|
+
old_discover_rack_app = Rails::Application::RouteInspector.instance_method name
|
228
|
+
Rails::Application::RouteInspector.instance_eval do
|
229
|
+
define_method name do |app|
|
230
|
+
old_discover_rack_app.bind(self).call(app) unless app.is_a? RouteSetMiddleware
|
231
|
+
end
|
232
|
+
end
|
233
|
+
end
|
234
|
+
end
|
235
|
+
end
|
236
|
+
end
|
237
|
+
|
238
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: subdomainitis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.32
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-05-
|
12
|
+
date: 2012-05-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement: &
|
16
|
+
requirement: &2173771340 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2173771340
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rails
|
27
|
-
requirement: &
|
27
|
+
requirement: &2173770800 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: 3.0.3
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *2173770800
|
36
36
|
description: subdomainitis provides easy, simple support for using wildcard subdomains
|
37
37
|
as controller parameters in Rails 3
|
38
38
|
email:
|