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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 012a7c65df71835132e2f936e8abf9bc7a0a3ee5
4
- data.tar.gz: 87bf3e88d66331b223d1be16f3f07045a2ecbad8
3
+ metadata.gz: d659651396fb719ad0f9571c471f934755699ff5
4
+ data.tar.gz: c74bc64b4cf49b594a6eee141fa8dc37658e9a0b
5
5
  SHA512:
6
- metadata.gz: 05299ca35a87e42c57a79a37e7775fecd49fac33f1bdced20f838e565369515e403fdbf8d2b7c262ad150d0fd0d6d408ed1200667a86e304140da67b198ff0e5
7
- data.tar.gz: 3fcdf61eb80b189664c331f7c91c97578467a1290452dec7e42749fc50a0bc1bdb800d5baca8595fb1639823a155c05ebeda64a9c7c50020c817877d5bbfe028
6
+ metadata.gz: 0baaf1d931ebbb69790efa61c78c104cce8f1a6b55c68b72761263327598aeef87ac39efc12e3f23b6711727be029e55736fa72850bfb735814919029f6b9291
7
+ data.tar.gz: b28eca616d5fd8f9456a9062dc60b73ef5b72b4cc741883feb8d2897c6c1b4a347d70c1ba4ec081ed32a9a5258cc2db5da101b8c6146bbb852b23e5a4efa4c3b
@@ -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
 
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Cyborg
2
- VERSION = "0.5.33"
2
+ VERSION = "0.6.0"
3
3
  end
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.5.33
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-23 00:00:00.000000000 Z
11
+ date: 2017-08-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sass