myreplicator 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/myreplicator/engine.rb +32 -32
- data/lib/myreplicator/version.rb +1 -1
- metadata +3 -3
data/lib/myreplicator/engine.rb
CHANGED
@@ -1,44 +1,44 @@
|
|
1
1
|
module Myreplicator
|
2
2
|
class Engine < ::Rails::Engine
|
3
3
|
# isolate_namespace Myreplicator
|
4
|
+
|
5
|
+
if Rails::Engine.method_defined?(:isolate_namespace)
|
6
|
+
isolate_namespace Myreplicator
|
7
|
+
else
|
8
|
+
puts "Defined"
|
9
|
+
def self.isolate_namespace(mod)
|
10
|
+
engine_name(ActiveSupport::Inflector.underscore(mod).gsub("/", "_"))
|
11
|
+
|
12
|
+
self.routes.default_scope = { :module => ActiveSupport::Inflector.underscore(mod.name) }
|
13
|
+
self.isolated = true
|
4
14
|
|
5
|
-
|
6
|
-
|
7
|
-
else
|
8
|
-
puts "Defined"
|
9
|
-
def isolate_namespace(mod)
|
10
|
-
engine_name(ActiveSupport::Inflector.underscore(mod).gsub("/", "_"))
|
15
|
+
unless mod.respond_to?(:railtie_namespace)
|
16
|
+
name, railtie = engine_name, self
|
11
17
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
unless mod.respond_to?(:railtie_namespace)
|
16
|
-
name, railtie = engine_name, self
|
17
|
-
|
18
|
-
mod.singleton_class.instance_eval do
|
19
|
-
define_method(:railtie_namespace) { railtie }
|
20
|
-
|
21
|
-
unless mod.respond_to?(:table_name_prefix)
|
22
|
-
define_method(:table_name_prefix) { "#{name}_" }
|
23
|
-
end
|
18
|
+
mod.singleton_class.instance_eval do
|
19
|
+
define_method(:railtie_namespace) { railtie }
|
24
20
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
21
|
+
unless mod.respond_to?(:table_name_prefix)
|
22
|
+
define_method(:table_name_prefix) { "#{name}_" }
|
23
|
+
end
|
24
|
+
|
25
|
+
unless mod.respond_to?(:use_relative_model_naming?)
|
26
|
+
class_eval "def use_relative_model_naming?; true; end", __FILE__, __LINE__
|
27
|
+
end
|
28
|
+
|
29
|
+
unless mod.respond_to?(:railtie_helpers_paths)
|
30
|
+
define_method(:railtie_helpers_paths) { railtie.helpers_paths }
|
31
|
+
end
|
32
|
+
|
33
|
+
unless mod.respond_to?(:railtie_routes_url_helpers)
|
34
|
+
define_method(:railtie_routes_url_helpers) { railtie.routes_url_helpers }
|
37
35
|
end
|
38
36
|
end
|
39
|
-
|
40
|
-
isolate_namespace Myreplicator
|
41
37
|
end
|
38
|
+
end
|
39
|
+
self.isolate_namespace Myreplicator
|
40
|
+
end
|
42
41
|
|
43
42
|
end
|
44
43
|
end
|
44
|
+
|
data/lib/myreplicator/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: myreplicator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -308,7 +308,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
308
308
|
version: '0'
|
309
309
|
segments:
|
310
310
|
- 0
|
311
|
-
hash:
|
311
|
+
hash: 1559318785656920257
|
312
312
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
313
313
|
none: false
|
314
314
|
requirements:
|
@@ -317,7 +317,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
317
317
|
version: '0'
|
318
318
|
segments:
|
319
319
|
- 0
|
320
|
-
hash:
|
320
|
+
hash: 1559318785656920257
|
321
321
|
requirements: []
|
322
322
|
rubyforge_project:
|
323
323
|
rubygems_version: 1.8.23
|