consistency_fail 0.3.4 → 0.3.5

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: e39eaf9c01eac716941d478876cccf815cac17df
4
- data.tar.gz: ea14788fa3224a69441d52803d69992d910b360c
3
+ metadata.gz: c507681aa9fdff8f28a5bb8d5c1b5b5e90224865
4
+ data.tar.gz: c3ca7f71bdb87dccd25411da929196fdb6d4f318
5
5
  SHA512:
6
- metadata.gz: c60df52fb547fc080706b1e38f550fc26fd4aacf9cfbae471f8d39cebce76e9f03df7b782df0df7fe13ab5496d27650d526a815e481786900dc0c523d8802aa6
7
- data.tar.gz: d999a4beba6dddf954b7f5c670c117222b42247a64e92015bd4bae13ebc648df82988a49294eaac5bca22992a4b9daa719b98e997d06738c106b258a462cb35a
6
+ metadata.gz: d06468cad8ded7968fd766fb8acda9fcb8fee9e7c32a98ed54efe7696725fcf53d96a9463b59906f6ac37c0b08d8d76f6258e6940bf3fb236c3cc7622fbacf79
7
+ data.tar.gz: ef0b8fe78a001d6a82126dbe482e986a2092056be2399b4a3dd37e563438b7a06a3bf0f1353ec71d362c1120643b77b7b490ea33da161096935ff8ea07bf4394
@@ -1,17 +1,21 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
+ base_dir = File.join(Dir.pwd, ARGV.first.to_s)
4
+ puts "\nWarning! You are going out of current directory, ruby version may be wrong and some gems may be missing.\n" unless File.realpath(base_dir).start_with?(Dir.pwd)
5
+
3
6
  begin
4
- require File.join(Dir.pwd, "config", "boot")
5
- rescue LoadError => e
7
+
8
+ require File.join(base_dir, 'config', 'boot')
9
+ rescue LoadError
6
10
  puts "\nUh-oh! You must be in the root directory of a Rails project.\n"
7
11
  raise
8
12
  end
9
13
 
10
14
  require 'active_record'
11
- require File.join(Dir.pwd, "config", "environment")
15
+ require File.join(base_dir, 'config', 'environment')
12
16
 
13
- $:<< File.join(File.dirname(__FILE__), "..", "lib")
14
- require "consistency_fail"
17
+ $:<< File.join(File.dirname(__FILE__), '..', 'lib')
18
+ require 'consistency_fail'
15
19
 
16
20
  if ConsistencyFail.run
17
21
  exit 0
@@ -1,3 +1,3 @@
1
1
  module ConsistencyFail
2
- VERSION = "0.3.4"
2
+ VERSION = "0.3.5"
3
3
  end
@@ -2,7 +2,7 @@ require 'bundler/setup'
2
2
 
3
3
  Bundler.require(:default, :test)
4
4
 
5
- Dir['./spec/support/**/*.rb'].each { |file| require file }
5
+ Dir['./spec/support/**/*.rb'].sort.each { |file| require file }
6
6
 
7
7
  RSpec.configure do |config|
8
8
  config.around do |example|
@@ -11,4 +11,4 @@ RSpec.configure do |config|
11
11
  raise ActiveRecord::Rollback
12
12
  end
13
13
  end
14
- end
14
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: consistency_fail
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Colin Jones
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-02 00:00:00.000000000 Z
11
+ date: 2017-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -136,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
136
136
  version: '0'
137
137
  requirements: []
138
138
  rubyforge_project:
139
- rubygems_version: 2.4.5
139
+ rubygems_version: 2.5.1
140
140
  signing_key:
141
141
  specification_version: 4
142
142
  summary: A tool to detect missing unique indexes
@@ -168,3 +168,4 @@ test_files:
168
168
  - spec/support/models/wrong_post.rb
169
169
  - spec/support/models/wrong_user.rb
170
170
  - spec/support/schema.rb
171
+ has_rdoc: