fixture_builder 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fixture_builder/configuration.rb +6 -2
- data/lib/fixture_builder/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 88be66fdfa6b55c410181695639f1f8eccb4cf40
|
4
|
+
data.tar.gz: 1b67144f414b08d6b4eb1f9e7c6b9231d5e3abbd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f11e75f29b93eec5e1a3e80e57842859683b9966fb309645892f9ee8958e23b9c80599b0705d686c6efaf19aac0ae090bec867b428a1cc274d707436acd34adc
|
7
|
+
data.tar.gz: e7088a5a2d5efd38b7b3b2f2f744f1a62bd8b7955e58167526f01318d12a9909d8d1578d5b28d4b45d836189fe0758216a8df4b4dc7e51fa167300c2dedbf4ee
|
@@ -8,7 +8,7 @@ module FixtureBuilder
|
|
8
8
|
include Delegations::Namer
|
9
9
|
|
10
10
|
ACCESSIBLE_ATTRIBUTES = [:select_sql, :delete_sql, :skip_tables, :files_to_check, :record_name_fields,
|
11
|
-
:fixture_builder_file, :after_build, :legacy_fixtures, :model_name_procs]
|
11
|
+
:fixture_builder_file, :fixture_directory, :after_build, :legacy_fixtures, :model_name_procs]
|
12
12
|
attr_accessor(*ACCESSIBLE_ATTRIBUTES)
|
13
13
|
|
14
14
|
SCHEMA_FILES = ['db/schema.rb', 'db/development_structure.sql', 'db/test_structure.sql', 'db/production_structure.sql']
|
@@ -78,8 +78,12 @@ module FixtureBuilder
|
|
78
78
|
ActiveRecord::Base.connection.tables - skip_tables
|
79
79
|
end
|
80
80
|
|
81
|
+
def fixture_directory
|
82
|
+
@fixture_directory ||= File.expand_path(File.join(::Rails.root, spec_or_test_dir, 'fixtures'))
|
83
|
+
end
|
84
|
+
|
81
85
|
def fixtures_dir(path = '')
|
82
|
-
File.expand_path(File.join(
|
86
|
+
File.expand_path(File.join(fixture_directory, path))
|
83
87
|
end
|
84
88
|
|
85
89
|
private
|