js-routes 0.8.0 → 0.8.1
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/Gemfile +1 -2
- data/Gemfile.lock +2 -4
- data/Readme.md +1 -1
- data/VERSION +1 -1
- data/js-routes.gemspec +6 -9
- data/lib/js_routes.rb +41 -16
- data/lib/js_routes/engine.rb +7 -5
- data/lib/routes.js +31 -13
- data/spec/js_routes_spec.rb +87 -40
- data/spec/spec_helper.rb +12 -0
- metadata +15 -26
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -72,7 +72,6 @@ GEM
|
|
72
72
|
rdoc (~> 3.4)
|
73
73
|
thor (~> 0.14.6)
|
74
74
|
rake (0.9.2)
|
75
|
-
rcov (0.9.9)
|
76
75
|
rdoc (3.12)
|
77
76
|
json (~> 1.4)
|
78
77
|
rspec (2.7.0)
|
@@ -87,7 +86,7 @@ GEM
|
|
87
86
|
hike (~> 1.2)
|
88
87
|
rack (~> 1.0)
|
89
88
|
tilt (~> 1.1, != 1.3.0)
|
90
|
-
therubyracer (0.9.
|
89
|
+
therubyracer (0.9.10)
|
91
90
|
libv8 (~> 3.3.10)
|
92
91
|
thor (0.14.6)
|
93
92
|
tilt (1.3.3)
|
@@ -100,9 +99,8 @@ PLATFORMS
|
|
100
99
|
ruby
|
101
100
|
|
102
101
|
DEPENDENCIES
|
103
|
-
bundler (~> 1.
|
102
|
+
bundler (~> 1.1.0)
|
104
103
|
jeweler (~> 1.6.2)
|
105
104
|
rails (>= 3.2)
|
106
|
-
rcov
|
107
105
|
rspec (~> 2.7.0)
|
108
106
|
therubyracer
|
data/Readme.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.8.
|
1
|
+
0.8.1
|
data/js-routes.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "js-routes"
|
8
|
-
s.version = "0.8.
|
8
|
+
s.version = "0.8.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Bogdan Gusiev"]
|
12
|
-
s.date = "2012-
|
12
|
+
s.date = "2012-05-04"
|
13
13
|
s.description = "Generates javascript file that defines all Rails named routes as javascript helpers"
|
14
14
|
s.email = "agresso@gmail.com"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -39,7 +39,7 @@ Gem::Specification.new do |s|
|
|
39
39
|
s.homepage = "http://github.com/railsware/js-routes"
|
40
40
|
s.licenses = ["MIT"]
|
41
41
|
s.require_paths = ["lib"]
|
42
|
-
s.rubygems_version = "1.8.
|
42
|
+
s.rubygems_version = "1.8.11"
|
43
43
|
s.summary = "Brings Rails named routes to javascript"
|
44
44
|
|
45
45
|
if s.respond_to? :specification_version then
|
@@ -49,24 +49,21 @@ Gem::Specification.new do |s|
|
|
49
49
|
s.add_runtime_dependency(%q<rails>, [">= 3.2"])
|
50
50
|
s.add_development_dependency(%q<therubyracer>, [">= 0"])
|
51
51
|
s.add_development_dependency(%q<rspec>, ["~> 2.7.0"])
|
52
|
-
s.add_development_dependency(%q<bundler>, ["~> 1.
|
52
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.1.0"])
|
53
53
|
s.add_development_dependency(%q<jeweler>, ["~> 1.6.2"])
|
54
|
-
s.add_development_dependency(%q<rcov>, [">= 0"])
|
55
54
|
else
|
56
55
|
s.add_dependency(%q<rails>, [">= 3.2"])
|
57
56
|
s.add_dependency(%q<therubyracer>, [">= 0"])
|
58
57
|
s.add_dependency(%q<rspec>, ["~> 2.7.0"])
|
59
|
-
s.add_dependency(%q<bundler>, ["~> 1.
|
58
|
+
s.add_dependency(%q<bundler>, ["~> 1.1.0"])
|
60
59
|
s.add_dependency(%q<jeweler>, ["~> 1.6.2"])
|
61
|
-
s.add_dependency(%q<rcov>, [">= 0"])
|
62
60
|
end
|
63
61
|
else
|
64
62
|
s.add_dependency(%q<rails>, [">= 3.2"])
|
65
63
|
s.add_dependency(%q<therubyracer>, [">= 0"])
|
66
64
|
s.add_dependency(%q<rspec>, ["~> 2.7.0"])
|
67
|
-
s.add_dependency(%q<bundler>, ["~> 1.
|
65
|
+
s.add_dependency(%q<bundler>, ["~> 1.1.0"])
|
68
66
|
s.add_dependency(%q<jeweler>, ["~> 1.6.2"])
|
69
|
-
s.add_dependency(%q<rcov>, [">= 0"])
|
70
67
|
end
|
71
68
|
end
|
72
69
|
|
data/lib/js_routes.rb
CHANGED
@@ -52,7 +52,7 @@ class JsRoutes
|
|
52
52
|
new(opts).generate
|
53
53
|
end
|
54
54
|
|
55
|
-
def generate!(file_name, opts = {})
|
55
|
+
def generate!(file_name=nil, opts = {})
|
56
56
|
if file_name.is_a?(Hash)
|
57
57
|
opts = file_name
|
58
58
|
file_name = opts[:file]
|
@@ -64,7 +64,7 @@ class JsRoutes
|
|
64
64
|
# full environment will be available during asset compilation.
|
65
65
|
# This is required to ensure routes are loaded.
|
66
66
|
def assert_usable_configuration!
|
67
|
-
unless Rails.application.config.assets.initialize_on_precompile
|
67
|
+
unless Rails.application.config.assets.initialize_on_precompile
|
68
68
|
raise("Cannot precompile js-routes unless environment is initialized. Please set config.assets.initialize_on_precompile to true.")
|
69
69
|
end
|
70
70
|
true
|
@@ -92,11 +92,12 @@ class JsRoutes
|
|
92
92
|
js.gsub!("ROUTES", js_routes)
|
93
93
|
end
|
94
94
|
|
95
|
-
def generate!(file_name)
|
95
|
+
def generate!(file_name = nil)
|
96
96
|
# Some libraries like Devise do not yet loaded their routes so we will wait
|
97
97
|
# until initialization process finish
|
98
98
|
# https://github.com/railsware/js-routes/issues/7
|
99
99
|
Rails.configuration.after_initialize do
|
100
|
+
file_name ||= self.class.options['file']
|
100
101
|
File.open(Rails.root.join(file_name || DEFAULT_PATH), 'w') do |f|
|
101
102
|
f.write generate
|
102
103
|
end
|
@@ -108,26 +109,38 @@ class JsRoutes
|
|
108
109
|
def js_routes
|
109
110
|
Rails.application.reload_routes!
|
110
111
|
js_routes = Rails.application.routes.named_routes.routes.map do |_, route|
|
111
|
-
if
|
112
|
-
|
112
|
+
if route.app.respond_to?(:superclass) && route.app.superclass == Rails::Engine
|
113
|
+
route.app.routes.named_routes.map do |_, engine_route|
|
114
|
+
build_route_if_match(engine_route, route)
|
115
|
+
end
|
113
116
|
else
|
114
|
-
|
117
|
+
build_route_if_match(route)
|
115
118
|
end
|
116
|
-
end.compact
|
119
|
+
end.flatten.compact
|
117
120
|
|
118
121
|
"{\n" + js_routes.join(",\n") + "}\n"
|
119
122
|
end
|
120
123
|
|
121
|
-
def
|
124
|
+
def build_route_if_match(route, parent_route=nil)
|
125
|
+
if any_match?(route, parent_route, @options[:exclude]) || !any_match?(route, parent_route, @options[:include])
|
126
|
+
nil
|
127
|
+
else
|
128
|
+
build_js(route, parent_route)
|
129
|
+
end
|
130
|
+
end
|
131
|
+
|
132
|
+
def any_match?(route, parent_route, matchers)
|
122
133
|
matchers = Array(matchers)
|
123
|
-
matchers.any? {|regex| route.name =~ regex}
|
134
|
+
matchers.any? {|regex| [parent_route.try(:name), route.name].compact.join('') =~ regex}
|
124
135
|
end
|
125
136
|
|
126
|
-
def build_js(route)
|
137
|
+
def build_js(route, parent_route)
|
138
|
+
name = [parent_route.try(:name), route.name].compact
|
139
|
+
parent_spec = parent_route.try(:path).try(:spec)
|
127
140
|
_ = <<-JS.strip!
|
128
|
-
// #{
|
129
|
-
#{
|
130
|
-
return Utils.build_path(#{json(route.required_parts)}, #{json(serialize(route.path.spec))}, arguments)
|
141
|
+
// #{name.join('.')} => #{parent_spec}#{route.path.spec}
|
142
|
+
#{name.join('_')}_path: function(#{build_params(route)}) {
|
143
|
+
return Utils.build_path(#{json(route.required_parts)}, #{json(serialize(route.path.spec, parent_spec))}, arguments);
|
131
144
|
}
|
132
145
|
JS
|
133
146
|
end
|
@@ -149,12 +162,24 @@ class JsRoutes
|
|
149
162
|
# We do not use Hash for human readable serialization
|
150
163
|
# And preffer Array serialization because it is shorter.
|
151
164
|
# Routes.js file will be smaller.
|
152
|
-
def serialize(spec)
|
165
|
+
def serialize(spec, parent_spec=nil)
|
153
166
|
return nil unless spec
|
154
167
|
return spec.tr(':', '') if spec.is_a?(String)
|
155
|
-
|
168
|
+
result = serialize_spec(spec, parent_spec)
|
169
|
+
if parent_spec && result[1].is_a?(String)
|
170
|
+
result = [
|
171
|
+
NODE_TYPES[:CAT],
|
172
|
+
serialize_spec(parent_spec),
|
173
|
+
result
|
174
|
+
]
|
175
|
+
end
|
176
|
+
result
|
177
|
+
end
|
178
|
+
|
179
|
+
def serialize_spec(spec, parent_spec=nil)
|
180
|
+
[
|
156
181
|
NODE_TYPES[spec.type],
|
157
|
-
serialize(spec.left),
|
182
|
+
serialize(spec.left, parent_spec),
|
158
183
|
spec.respond_to?(:right) && serialize(spec.right)
|
159
184
|
]
|
160
185
|
end
|
data/lib/js_routes/engine.rb
CHANGED
@@ -1,13 +1,15 @@
|
|
1
|
-
if defined?(Rails)
|
1
|
+
if defined?(Rails) && Rails.version >= "3.1"
|
2
2
|
class JsRoutes
|
3
3
|
class Engine < Rails::Engine
|
4
4
|
JS_ROUTES_ASSET = 'js-routes'
|
5
5
|
|
6
6
|
initializer 'js-routes.dependent_on_routes', :after => "sprockets.environment" do
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
7
|
+
if Rails.application.assets.respond_to?(:register_preprocessor)
|
8
|
+
routes = Rails.root.join('config','routes.rb')
|
9
|
+
Rails.application.assets.register_preprocessor 'application/javascript', :'js-routes_dependent_on_routes' do |ctx,data|
|
10
|
+
ctx.depend_on(routes) if ctx.logical_path == JS_ROUTES_ASSET
|
11
|
+
data
|
12
|
+
end
|
11
13
|
end
|
12
14
|
end
|
13
15
|
end
|
data/lib/routes.js
CHANGED
@@ -62,7 +62,11 @@
|
|
62
62
|
return "";
|
63
63
|
}
|
64
64
|
if (typeof(object) == "object") {
|
65
|
-
|
65
|
+
var property = object.to_param || object.id || object;
|
66
|
+
if (typeof(property) == "function") {
|
67
|
+
property = property.call(object)
|
68
|
+
}
|
69
|
+
return property.toString();
|
66
70
|
} else {
|
67
71
|
return object.toString();
|
68
72
|
}
|
@@ -114,15 +118,9 @@
|
|
114
118
|
var right = route[2];
|
115
119
|
switch (type) {
|
116
120
|
case NodeTypes.GROUP:
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
if (e instanceof ParameterMissing) {
|
121
|
-
return "";
|
122
|
-
} else {
|
123
|
-
throw e;
|
124
|
-
}
|
125
|
-
}
|
121
|
+
return this.visit_group(left, options)
|
122
|
+
case NodeTypes.STAR:
|
123
|
+
return this.visit_group(left, options)
|
126
124
|
case NodeTypes.CAT:
|
127
125
|
return this.visit(left, options) + this.visit(right, options);
|
128
126
|
case NodeTypes.SYMBOL:
|
@@ -134,11 +132,10 @@
|
|
134
132
|
throw new ParameterMissing("Route parameter missing: " + left);
|
135
133
|
}
|
136
134
|
/*
|
137
|
-
* I don't know what
|
135
|
+
* I don't know what is this node type
|
138
136
|
* Please send your PR if you do
|
139
137
|
*/
|
140
138
|
//case NodeTypes.OR:
|
141
|
-
//case NodeTypes.STAR:
|
142
139
|
case NodeTypes.LITERAL:
|
143
140
|
return left;
|
144
141
|
case NodeTypes.SLASH:
|
@@ -151,6 +148,18 @@
|
|
151
148
|
|
152
149
|
},
|
153
150
|
|
151
|
+
visit_group: function(left, options) {
|
152
|
+
try {
|
153
|
+
return this.visit(left, options);
|
154
|
+
} catch(e) {
|
155
|
+
if (e instanceof ParameterMissing) {
|
156
|
+
return "";
|
157
|
+
} else {
|
158
|
+
throw e;
|
159
|
+
}
|
160
|
+
}
|
161
|
+
},
|
162
|
+
|
154
163
|
get_prefix: function(){
|
155
164
|
var prefix = defaults.prefix;
|
156
165
|
|
@@ -159,10 +168,19 @@
|
|
159
168
|
}
|
160
169
|
|
161
170
|
return prefix;
|
162
|
-
}
|
171
|
+
},
|
163
172
|
|
173
|
+
namespace: function (root, namespaceString) {
|
174
|
+
var parts = namespaceString ? namespaceString.split('.') : [];
|
175
|
+
if (parts.length > 0) {
|
176
|
+
current = parts.shift();
|
177
|
+
root[current] = root[current] || {};
|
178
|
+
Utils.namespace(root[current], parts.join('.'));
|
179
|
+
}
|
180
|
+
}
|
164
181
|
};
|
165
182
|
|
183
|
+
Utils.namespace(window, 'NAMESPACE');
|
166
184
|
window.NAMESPACE = ROUTES;
|
167
185
|
window.NAMESPACE.options = defaults;
|
168
186
|
})();
|
data/spec/js_routes_spec.rb
CHANGED
@@ -13,8 +13,9 @@ describe JsRoutes do
|
|
13
13
|
let(:_options) { {} }
|
14
14
|
|
15
15
|
let(:routes) { App.routes.url_helpers }
|
16
|
+
let(:blog_routes) { BlogEngine::Engine.routes.url_helpers }
|
16
17
|
|
17
|
-
describe "compatibility with Rails
|
18
|
+
describe "compatibility with Rails" do
|
18
19
|
|
19
20
|
it "should generate collection routing" do
|
20
21
|
evaljs("Routes.inboxes_path()").should == routes.inboxes_path()
|
@@ -59,6 +60,61 @@ describe JsRoutes do
|
|
59
60
|
it "should support url anchor given as parameter" do
|
60
61
|
evaljs("Routes.inbox_path(1, {anchor: 'hello'})").should == routes.inbox_path(1, :anchor => "hello")
|
61
62
|
end
|
63
|
+
|
64
|
+
it "should support engine routes" do
|
65
|
+
evaljs("Routes.blog_app_posts_path()").should == blog_routes.posts_path()
|
66
|
+
end
|
67
|
+
|
68
|
+
it "should support engine routes with parameter" do
|
69
|
+
evaljs("Routes.blog_app_post_path(1)").should == blog_routes.post_path(1)
|
70
|
+
end
|
71
|
+
|
72
|
+
context "routes globbing" do
|
73
|
+
it "should be supported as parameters" do
|
74
|
+
evaljs("Routes.book_path('thrillers', 1)").should == routes.book_path('thrillers', 1)
|
75
|
+
end
|
76
|
+
|
77
|
+
xit "should support routes globbing as hash" do
|
78
|
+
evaljs("Routes.book_path(1, {section: 'thrillers'})").should == routes.book_path(1, :section => 'thrillers')
|
79
|
+
end
|
80
|
+
|
81
|
+
xit "should bee support routes globbing as hash" do
|
82
|
+
evaljs("Routes.book_path(1)").should == routes.book_path(1)
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
context "using optional path fragments" do
|
87
|
+
context "including not optional parts" do
|
88
|
+
it "should include everything that is not optional" do
|
89
|
+
evaljs("Routes.foo_path()").should == routes.foo_path
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
context "but not including them" do
|
94
|
+
it "should not include the optional parts" do
|
95
|
+
evaljs("Routes.things_path()").should == routes.things_path
|
96
|
+
end
|
97
|
+
|
98
|
+
xit "should not require the optional parts as arguments" do
|
99
|
+
#TODO: fix this inconsistence
|
100
|
+
evaljs("Routes.thing_path(null, 5)").should == routes.thing_path(nil, 5)
|
101
|
+
end
|
102
|
+
|
103
|
+
it "should treat undefined as non-given optional part" do
|
104
|
+
evaljs("Routes.thing_path(5, {optional_id: undefined})").should == routes.thing_path(5, :optional_id => nil)
|
105
|
+
end
|
106
|
+
|
107
|
+
it "should treat null as non-given optional part" do
|
108
|
+
evaljs("Routes.thing_path(5, {optional_id: null})").should == routes.thing_path(5, :optional_id => nil)
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
context "and including them" do
|
113
|
+
it "should include the optional parts" do
|
114
|
+
evaljs("Routes.things_path({optional_id: 5})").should == routes.things_path(:optional_id => 5)
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
62
118
|
end
|
63
119
|
|
64
120
|
context "when wrong parameters given" do
|
@@ -153,19 +209,37 @@ describe JsRoutes do
|
|
153
209
|
|
154
210
|
end
|
155
211
|
|
156
|
-
|
212
|
+
describe "when namespace option is specified" do
|
157
213
|
let(:_options) { {:namespace => "PHM"} }
|
158
|
-
it "should use this
|
214
|
+
it "should use this namespace for routing" do
|
159
215
|
evaljs("window.Routes").should be_nil
|
160
216
|
evaljs("PHM.inbox_path").should_not be_nil
|
161
217
|
end
|
162
|
-
|
163
218
|
end
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
219
|
+
|
220
|
+
describe "when nested namespace option is specified" do
|
221
|
+
context "and defined on client" do
|
222
|
+
let(:_presetup) { "window.PHM = {}" }
|
223
|
+
let(:_options) { {:namespace => "PHM.Routes"} }
|
224
|
+
it "should use this namespace for routing" do
|
225
|
+
evaljs("PHM.Routes.inbox_path").should_not be_nil
|
226
|
+
end
|
227
|
+
end
|
228
|
+
|
229
|
+
context "but undefined on client" do
|
230
|
+
let(:_options) { {:namespace => "PHM.Routes"} }
|
231
|
+
it "should initialize namespace" do
|
232
|
+
evaljs("window.PHM.Routes.inbox_path").should_not be_nil
|
233
|
+
end
|
234
|
+
end
|
235
|
+
|
236
|
+
context "and some parts are defined" do
|
237
|
+
let(:_presetup) { "window.PHM = { Utils: {} };" }
|
238
|
+
let(:_options) { {:namespace => "PHM.Routes"} }
|
239
|
+
it "should not overwrite existing parts" do
|
240
|
+
evaljs("window.PHM.Utils").should_not be_nil
|
241
|
+
evaljs("window.PHM.Routes.inbox_path").should_not be_nil
|
242
|
+
end
|
169
243
|
end
|
170
244
|
end
|
171
245
|
|
@@ -185,6 +259,10 @@ describe JsRoutes do
|
|
185
259
|
evaljs("Routes.inbox_path({id: 1, to_param: function(){ return 'my';}})").should == routes.inbox_path(inbox)
|
186
260
|
end
|
187
261
|
|
262
|
+
it "should call id if it is a function" do
|
263
|
+
evaljs("Routes.inbox_path({id: function() { return 1;}})").should == routes.inbox_path(1)
|
264
|
+
end
|
265
|
+
|
188
266
|
it "should support options argument" do
|
189
267
|
evaljs(
|
190
268
|
"Routes.inbox_message_path({id:1, to_param: 'my'}, {id:2}, {custom: true, format: 'json'})"
|
@@ -192,37 +270,6 @@ describe JsRoutes do
|
|
192
270
|
end
|
193
271
|
end
|
194
272
|
|
195
|
-
context "using optional path fragments" do
|
196
|
-
context "including not optional parts" do
|
197
|
-
it "should include everything that is not optional" do
|
198
|
-
evaljs("Routes.foo_path()").should == routes.foo_path
|
199
|
-
end
|
200
|
-
end
|
201
|
-
|
202
|
-
context "but not including them" do
|
203
|
-
it "should not include the optional parts" do
|
204
|
-
evaljs("Routes.things_path()").should == routes.things_path
|
205
|
-
end
|
206
|
-
|
207
|
-
it "should not require the optional parts as arguments" do
|
208
|
-
evaljs("Routes.thing_path(5)").should == routes.thing_path(nil, 5)
|
209
|
-
end
|
210
|
-
|
211
|
-
it "should treat undefined as non-given optional part" do
|
212
|
-
evaljs("Routes.thing_path(5, {optional_id: undefined})").should == routes.thing_path(5, :optional_id => nil)
|
213
|
-
end
|
214
|
-
|
215
|
-
it "should treat null as non-given optional part" do
|
216
|
-
evaljs("Routes.thing_path(5, {optional_id: null})").should == routes.thing_path(5, :optional_id => nil)
|
217
|
-
end
|
218
|
-
end
|
219
|
-
|
220
|
-
context "and including them" do
|
221
|
-
it "should include the optional parts" do
|
222
|
-
evaljs("Routes.things_path({optional_id: 5})").should == routes.things_path(:optional_id => 5)
|
223
|
-
end
|
224
|
-
end
|
225
|
-
end
|
226
273
|
|
227
274
|
describe "generated js" do
|
228
275
|
subject { JsRoutes.generate }
|
data/spec/spec_helper.rb
CHANGED
@@ -16,7 +16,15 @@ def evaljs(string)
|
|
16
16
|
end
|
17
17
|
|
18
18
|
|
19
|
+
module BlogEngine
|
20
|
+
class Engine < Rails::Engine
|
21
|
+
isolate_namespace BlogEngine
|
22
|
+
end
|
19
23
|
|
24
|
+
Engine.routes.draw do
|
25
|
+
resources :posts
|
26
|
+
end
|
27
|
+
end
|
20
28
|
|
21
29
|
|
22
30
|
class App < Rails::Application
|
@@ -44,6 +52,10 @@ class App < Rails::Application
|
|
44
52
|
end
|
45
53
|
|
46
54
|
match "/other_optional/(:optional_id)" => "foo#foo", :as => :foo
|
55
|
+
|
56
|
+
match 'books/*section/:title' => 'books#show', :as => :book
|
57
|
+
|
58
|
+
mount BlogEngine::Engine => "/blog", :as => :blog_app
|
47
59
|
end
|
48
60
|
|
49
61
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: js-routes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.1
|
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-
|
12
|
+
date: 2012-05-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
16
|
-
requirement: &
|
16
|
+
requirement: &16473680 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '3.2'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *16473680
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: therubyracer
|
27
|
-
requirement: &
|
27
|
+
requirement: &16471960 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *16471960
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rspec
|
38
|
-
requirement: &
|
38
|
+
requirement: &16469100 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,21 +43,21 @@ dependencies:
|
|
43
43
|
version: 2.7.0
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *16469100
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: bundler
|
49
|
-
requirement: &
|
49
|
+
requirement: &16488880 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.
|
54
|
+
version: 1.1.0
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *16488880
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: jeweler
|
60
|
-
requirement: &
|
60
|
+
requirement: &16486860 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ~>
|
@@ -65,18 +65,7 @@ dependencies:
|
|
65
65
|
version: 1.6.2
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: rcov
|
71
|
-
requirement: &85242750 !ruby/object:Gem::Requirement
|
72
|
-
none: false
|
73
|
-
requirements:
|
74
|
-
- - ! '>='
|
75
|
-
- !ruby/object:Gem::Version
|
76
|
-
version: '0'
|
77
|
-
type: :development
|
78
|
-
prerelease: false
|
79
|
-
version_requirements: *85242750
|
68
|
+
version_requirements: *16486860
|
80
69
|
description: Generates javascript file that defines all Rails named routes as javascript
|
81
70
|
helpers
|
82
71
|
email: agresso@gmail.com
|
@@ -119,7 +108,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
119
108
|
version: '0'
|
120
109
|
segments:
|
121
110
|
- 0
|
122
|
-
hash:
|
111
|
+
hash: 950059294616459731
|
123
112
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
124
113
|
none: false
|
125
114
|
requirements:
|
@@ -128,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
128
117
|
version: '0'
|
129
118
|
requirements: []
|
130
119
|
rubyforge_project:
|
131
|
-
rubygems_version: 1.8.
|
120
|
+
rubygems_version: 1.8.11
|
132
121
|
signing_key:
|
133
122
|
specification_version: 3
|
134
123
|
summary: Brings Rails named routes to javascript
|