inheritable_fixtures 0.1.3 → 0.2.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: 7682d59913d99ff3c89621d81e45b0d9422e71c0
4
- data.tar.gz: c6cd1619be1124fbe4354cb2bc9c20f012efe047
3
+ metadata.gz: b1a12d088640eec5e03ee6a56f46e496744a39b2
4
+ data.tar.gz: f6af4b8466bc81b8c4924b40bc1d2e73ab0c22b6
5
5
  SHA512:
6
- metadata.gz: 57b776ace7cb88dafcd74df3882a4cac4f334dcc1ce6deeb3cb6c45b8d84e59834f64d7873810749d97b2655ce1400f53c2124577b1f52c7df7d41ddebdcd3ac
7
- data.tar.gz: e410197bfcc0b0791990e64f92ff91be9e6d0a06c1b29da09194b7a701f3c620b389bf72cec9c49fe7a28cf57570720c59ae3944448a063085830f331aedee7b
6
+ metadata.gz: 373b57ddf376468dbb6c78386ec17f093d7a73d81ecce3f86c82fc9e8ed0456e40a51b75f59859fe62ebe8418cfcbaef5149cd9a3ffe2ba4f83e469937b4746b
7
+ data.tar.gz: b82f7e1a1ab4f614975fdc16fd2bf59475133629865d4a1442ed44ac17fb38080056a266cd4b9aa108df0ea8f58e8f4ef50d8e72fe8c384763b9a4b340269bd5
@@ -6,6 +6,7 @@ module InheritableFixtures
6
6
  end
7
7
 
8
8
  require 'inheritable_fixtures/rails_extensions/engine'
9
+ require 'inheritable_fixtures/rails_extensions/engine_configuration'
9
10
  require 'inheritable_fixtures/rails_extensions/test_fixtures'
10
11
  require 'inheritable_fixtures/rails_extensions/test_process'
11
12
  require 'inheritable_fixtures/engine'
@@ -30,4 +31,4 @@ module ActionDispatch
30
31
  end
31
32
 
32
33
  Rails::Engine.include(::InheritableFixtures::RailsExtensions::Engine)
33
-
34
+ Rails::Engine::Configuration.prepend(::InheritableFixtures::RailsExtensions::EngineConfiguration)
@@ -3,10 +3,14 @@ module InheritableFixtures
3
3
  module Engine
4
4
  def self.included(target)
5
5
  target.class_eval do
6
+ # I believe in Rails 4.1+ we can do,
7
+ #
8
+ # paths.add('lib/fixtures')
9
+ #
10
+ # and remove EngineConfiguration
11
+
6
12
  initializer :append_fixtures_paths, group: :all do |app|
7
- engine_name = self.class.name.split('::')[-2].underscore
8
- fixtures_path = root.join('lib', engine_name, 'test', 'fixtures').to_s
9
- app.config.fixtures_paths.unshift(fixtures_path) if File.exists?(fixtures_path)
13
+ app.config.fixtures_paths.unshift(*paths["lib/fixtures"].existent_directories)
10
14
  end
11
15
  end
12
16
  end
@@ -0,0 +1,13 @@
1
+ module InheritableFixtures
2
+ module RailsExtensions
3
+ module EngineConfiguration
4
+ def paths
5
+ paths = super
6
+ paths.add('lib/fixtures') if paths.add('lib/fixtures').nil?
7
+ paths
8
+ end
9
+ end
10
+ end
11
+ end
12
+
13
+
@@ -1,3 +1,3 @@
1
1
  module InheritableFixtures
2
- VERSION = "0.1.3"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inheritable_fixtures
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Kmiec
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-07-15 00:00:00.000000000 Z
11
+ date: 2015-07-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -48,6 +48,7 @@ files:
48
48
  - lib/inheritable_fixtures/engine.rb
49
49
  - lib/inheritable_fixtures/rails_extensions/db_fixtures.rake
50
50
  - lib/inheritable_fixtures/rails_extensions/engine.rb
51
+ - lib/inheritable_fixtures/rails_extensions/engine_configuration.rb
51
52
  - lib/inheritable_fixtures/rails_extensions/test_fixtures.rb
52
53
  - lib/inheritable_fixtures/rails_extensions/test_process.rb
53
54
  - lib/inheritable_fixtures/version.rb