bradgessler-domain_slice 0.1.1 → 0.1.2

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.
Files changed (3) hide show
  1. data/VERSION.yml +1 -1
  2. data/lib/domain_slice/rails.rb +13 -1
  3. metadata +2 -2
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :minor: 1
3
- :patch: 1
3
+ :patch: 2
4
4
  :major: 0
@@ -7,7 +7,11 @@ module DomainSlice
7
7
  def init!
8
8
  ::Rails.public_path = File.join(root, 'public')
9
9
  ::ActionController::Routing::Routes.add_configuration_file File.join(config_path, 'routes.rb')
10
- ::ActionController::Base.view_paths.unshift File.join(root, %w[app views])
10
+ # Update frameworks with view_paths
11
+ [::ActionController, ::ActionMailer].each do |framework|
12
+ framework::Base.send(:view_paths).unshift(view_path)
13
+ end
14
+ @initialized = true
11
15
  end
12
16
 
13
17
  def root
@@ -26,12 +30,20 @@ module DomainSlice
26
30
  File.join(root, 'config')
27
31
  end
28
32
 
33
+ def view_path
34
+ File.join(root, %w[app views])
35
+ end
36
+
29
37
  def configure(configuration = ::Rails::Configuration.new)
30
38
  # Create our new configuration block here
31
39
  configuration.database_configuration_file = database_configuration_file
32
40
  return configuration
33
41
  end
34
42
 
43
+ def initialized?
44
+ @initialized
45
+ end
46
+
35
47
  protected
36
48
  def routes_configuration_file
37
49
  File.join(config_path, 'routes.rb')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bradgessler-domain_slice
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brad Gessler
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-03-30 00:00:00 -07:00
12
+ date: 2009-04-01 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15