cyborg 0.5.33 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cyborg.rb +2 -2
- data/lib/cyborg/plugin.rb +4 -1
- data/lib/cyborg/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d659651396fb719ad0f9571c471f934755699ff5
|
4
|
+
data.tar.gz: c74bc64b4cf49b594a6eee141fa8dc37658e9a0b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0baaf1d931ebbb69790efa61c78c104cce8f1a6b55c68b72761263327598aeef87ac39efc12e3f23b6711727be029e55736fa72850bfb735814919029f6b9291
|
7
|
+
data.tar.gz: b28eca616d5fd8f9456a9062dc60b73ef5b72b4cc741883feb8d2897c6c1b4a347d70c1ba4ec081ed32a9a5258cc2db5da101b8c6146bbb852b23e5a4efa4c3b
|
data/lib/cyborg.rb
CHANGED
@@ -31,9 +31,9 @@ module Cyborg
|
|
31
31
|
Cyborg::ConfigData.read(Cyborg.plugin.root, Rails.root)
|
32
32
|
end
|
33
33
|
|
34
|
-
def register(plugin_module, options={})
|
34
|
+
def register(plugin_module, options={}, &block)
|
35
35
|
@plugin = plugin_module.new(options)
|
36
|
-
@plugin.create_engine
|
36
|
+
@plugin.create_engine(&block)
|
37
37
|
patch_rails
|
38
38
|
end
|
39
39
|
|
data/lib/cyborg/plugin.rb
CHANGED
@@ -19,7 +19,7 @@ module Cyborg
|
|
19
19
|
@engine.name.sub(/::Engine/,'')
|
20
20
|
end
|
21
21
|
|
22
|
-
def create_engine
|
22
|
+
def create_engine(&block)
|
23
23
|
# Create a new Rails::Engine
|
24
24
|
@engine = parent_module.const_set('Engine', Class.new(Rails::Engine) do
|
25
25
|
|
@@ -42,7 +42,10 @@ module Cyborg
|
|
42
42
|
app.middleware.insert_before ::ActionDispatch::Static, Rack::Deflater
|
43
43
|
end
|
44
44
|
end
|
45
|
+
|
45
46
|
end)
|
47
|
+
|
48
|
+
@engine.instance_eval(&block) if block_given?
|
46
49
|
end
|
47
50
|
|
48
51
|
def parent_module
|
data/lib/cyborg/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cyborg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brandon Mathis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-08-
|
11
|
+
date: 2017-08-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sass
|