erector-rails4 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/erector/rails.rb +2 -1
- data/lib/erector/rails/autoload_monkeypatch.rb +18 -0
- data/lib/erector/version.rb +1 -1
- data/spec/dummy/spec/autoload_spec.rb +13 -0
- metadata +4 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c970e127c854beb86842b2b0e933b1ac0454943
|
4
|
+
data.tar.gz: 29b100b708674e78ee3c9197dc31e0b23aeb00ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 723e19c720846dab589f91907188d15a8815ccab33986877dc85ce2d8e74077721504f25bd1e7f53f8d7a316d35cfe1d3e6ac726823432d0a51e856a66cc747c
|
7
|
+
data.tar.gz: a857dfd076029db035f9c33494f44739e0f88f8f976e002335fa1cd5e6d05910907ff820e1d2bef225a472fbf39969035f8d98855b68d638837c0b033fabad50
|
data/Gemfile.lock
CHANGED
data/lib/erector/rails.rb
CHANGED
@@ -2,6 +2,7 @@ require "erector/rails/template_handler"
|
|
2
2
|
require "erector/rails/railtie"
|
3
3
|
require "erector/rails/widget_renderer"
|
4
4
|
require "erector/rails/form_builder"
|
5
|
+
require "erector/rails/autoload_monkeypatch"
|
5
6
|
|
6
7
|
module Erector
|
7
8
|
module Rails
|
@@ -130,7 +131,7 @@ module Erector
|
|
130
131
|
end
|
131
132
|
end
|
132
133
|
|
133
|
-
# Delegate to both Rails and custom helpers via method_missing,
|
134
|
+
# Delegate to both Rails and custom helpers via method_missing,
|
134
135
|
# and output return values that are html_safe
|
135
136
|
def method_missing(name, *args, &block)
|
136
137
|
if helpers.respond_to?(name)
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module ActiveSupport
|
2
|
+
module Dependencies
|
3
|
+
|
4
|
+
def search_for_file(path_suffix)
|
5
|
+
path_suffix = path_suffix.sub(/(\.rb)?$/, ".rb")
|
6
|
+
underscored_path_suffix = path_suffix.gsub(/\/([\w\.]*$)/, '/_\1')
|
7
|
+
|
8
|
+
autoload_paths.each do |root|
|
9
|
+
path = File.join(root, path_suffix)
|
10
|
+
return path if File.file? path
|
11
|
+
upath = File.join(root, underscored_path_suffix)
|
12
|
+
return upath if File.file? upath
|
13
|
+
end
|
14
|
+
nil # Gee, I sure wish we had first_match ;-)
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
18
|
+
end
|
data/lib/erector/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: erector-rails4
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Chaffee
|
@@ -208,6 +208,7 @@ files:
|
|
208
208
|
- lib/erector/output.rb
|
209
209
|
- lib/erector/promise.rb
|
210
210
|
- lib/erector/rails.rb
|
211
|
+
- lib/erector/rails/autoload_monkeypatch.rb
|
211
212
|
- lib/erector/rails/form_builder.rb
|
212
213
|
- lib/erector/rails/railtie.rb
|
213
214
|
- lib/erector/rails/template_handler.rb
|
@@ -263,6 +264,7 @@ files:
|
|
263
264
|
- spec/dummy/config/routes.rb
|
264
265
|
- spec/dummy/db/seeds.rb
|
265
266
|
- spec/dummy/script/rails
|
267
|
+
- spec/dummy/spec/autoload_spec.rb
|
266
268
|
- spec/dummy/spec/form_builder_spec.rb
|
267
269
|
- spec/dummy/spec/rails_helpers_spec.rb
|
268
270
|
- spec/dummy/spec/rails_spec_helper.rb
|
@@ -356,6 +358,7 @@ test_files:
|
|
356
358
|
- spec/dummy/config/routes.rb
|
357
359
|
- spec/dummy/db/seeds.rb
|
358
360
|
- spec/dummy/script/rails
|
361
|
+
- spec/dummy/spec/autoload_spec.rb
|
359
362
|
- spec/dummy/spec/form_builder_spec.rb
|
360
363
|
- spec/dummy/spec/rails_helpers_spec.rb
|
361
364
|
- spec/dummy/spec/rails_spec_helper.rb
|