fixture_builder 0.4.0 → 0.4.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6430cc162885cf416713e94086950ebde4a11daf
4
- data.tar.gz: c5bae14c5c36cb5dcb3417754dc2e0ea9e5148e9
3
+ metadata.gz: 88be66fdfa6b55c410181695639f1f8eccb4cf40
4
+ data.tar.gz: 1b67144f414b08d6b4eb1f9e7c6b9231d5e3abbd
5
5
  SHA512:
6
- metadata.gz: 827e45c3ab31588adff3ffbcab7bf2d058e0e48710fd948dbc777fc2f40fce5a9d44da594b0d437d20b2917bd494c97db62e1c57c4aaa15628ce1c965f83f260
7
- data.tar.gz: 3f5d6a715b0950b19ce8c110b070df278a4a52a670cd8d6a5c74cd5aa1f91a3d47aa4af0f193e2370c121a30305ff1189ec838539d981a23c23e385fb626f855
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(::Rails.root, spec_or_test_dir, 'fixtures', path))
86
+ File.expand_path(File.join(fixture_directory, path))
83
87
  end
84
88
 
85
89
  private
@@ -1,3 +1,3 @@
1
1
  module FixtureBuilder
2
- VERSION = '0.4.0'
2
+ VERSION = '0.4.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fixture_builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Dy