schema-tools 1.0.4 → 1.0.5

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
  SHA256:
3
- metadata.gz: 85f554d54d4b8d6279927e4aefbd0b54311e1f09acb72fd7b32979b2a869ba10
4
- data.tar.gz: b8bda0335ebd5db723620301f2d83cd0168d8b08208230497a5f616de7f3ccf1
3
+ metadata.gz: d7eb15996fbabd0923cf28e8ecd2142a28c3af1fb7ce0373220d64470f9f2aee
4
+ data.tar.gz: 6806c8094271fb77e1e61c4bb98f3efc7d670fb40652f75c642f30445ee19adc
5
5
  SHA512:
6
- metadata.gz: 94f970235179e236828b02bc53e7fa89b53c223bd671eda73419ab2bf6496ee14972b3288658d12d9856be44511f2cceb41b62badf8b913f73a56db5411a71a7
7
- data.tar.gz: c7de4ac81c1a17dc4fe42799e434ae861523c3fdcfd3f20dac61bfde8d1983d0151ae8fd33dfac54db4ab458220ef9554bba0641f0825c6642f97fe0ed018731
6
+ metadata.gz: 661f85da42d258a77599d4e4fe4165d8db11d9b235cedc7af77d1cbc48f41a6297f5a7c8449720b3f51ae02ac67ddefbef68ab0a777bb6425adaddefc567203c
7
+ data.tar.gz: a8bf7e23038a9059ad52faa347e58f6a5a4e50d228699a98a90a3d51c1f88c2be108d29e22370745e3a43979b6528af73dbf8dcdce580d5b042cd5d181a3d980
@@ -8,9 +8,10 @@ module SchemaTools
8
8
  schema_rake_file = File.join(File.dirname(__FILE__), '..', 'tasks', 'schema.rake')
9
9
  load schema_rake_file if File.exist?(schema_rake_file)
10
10
 
11
- # Load test.rake only in development/test environment
12
- if defined?(Rails) && (Rails.env.development? || Rails.env.test?) ||
13
- !defined?(Rails) && (ENV['RAILS_ENV'] == 'development' || ENV['RAILS_ENV'] == 'test' || ENV['RAILS_ENV'].nil?)
11
+ # Load test.rake only when we're in the gem's own development environment
12
+ # Check if we're in the gem's source directory (not a consuming app)
13
+ gem_root = File.expand_path(File.join(File.dirname(__FILE__), '..', '..'))
14
+ if File.exist?(File.join(gem_root, 'test')) && File.exist?(File.join(gem_root, 'test', 'spec_helper.rb'))
14
15
  test_rake_file = File.join(File.dirname(__FILE__), '..', 'tasks', 'test.rake')
15
16
  load test_rake_file if File.exist?(test_rake_file)
16
17
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: schema-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rich Kuzsma