active_sanity 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 8248c888df98cac5aaf92207bc779e65d8f5ce6b
4
+ data.tar.gz: f6d28662717362e4ff29c15928764d377bd4568c
5
+ SHA512:
6
+ metadata.gz: eacaaa0e54fb59f9c86b61a24a38d0afe33a5a1412c187bb137e5853f4ef3a8238e0c4cb66ede65faf2ee2128f267870899e6da4bc0fc20325a65aeb9b9aa83b
7
+ data.tar.gz: e1ee326e7b619d50fb1453c4b585baf186ebb253c8d78d5b04bc11459d9183b35b3e3331d6c2eb1109d7c24135b485e1f9db10ec2b0cd3e104245ce44d9b2dba
data/.gitignore CHANGED
@@ -1,5 +1,7 @@
1
1
  *.gem
2
2
  .bundle
3
+ .ruby-gemset
4
+ .ruby-version
3
5
  Gemfile.lock
4
6
  pkg/*
5
7
  test/rails_app
@@ -0,0 +1,33 @@
1
+ AllCops:
2
+ Include:
3
+ - 'Gemfile'
4
+ - 'Rakefile'
5
+ - '*.gemspec'
6
+ - 'lib/**/*'
7
+ - 'test/**/*'
8
+ Exclude:
9
+ - 'features/**/*'
10
+ - 'test/rails_app/**/*'
11
+ RunRailsCops: false
12
+ Metrics/LineLength:
13
+ Enabled: false
14
+ Style/AlignHash:
15
+ EnforcedHashRocketStyle: table
16
+ EnforcedColonStyle: table
17
+ Style/Documentation:
18
+ Enabled: false
19
+ Style/RegexpLiteral:
20
+ Enabled: false
21
+ Style/CollectionMethods:
22
+ # Mapping from undesired method to desired_method
23
+ # e.g. to use `detect` over `find`:
24
+ #
25
+ # CollectionMethods:
26
+ # PreferredMethods:
27
+ # find: detect
28
+ PreferredMethods:
29
+ map: 'collect'
30
+ map!: 'collect!'
31
+ reduce: 'inject'
32
+ detect: 'find'
33
+ select: 'find_all'
@@ -1,3 +1,9 @@
1
+ ## 0.3.0
2
+
3
+ * Add Rails ~4 compatibility.
4
+ * Does not rerun validations for the 'InvalidRecord' model on the second pass.
5
+ * batch size for fetched records is now configurable by setting ActiveSanity::Checker.batch_size after the gem has been loaded ie in 'config\application.rb' (or 'config\environments\test.rb') inside an 'after_initialize' block
6
+
1
7
  ## 0.2.0
2
8
 
3
9
  * Add Rails ~3.1 compatibility. Pull Request [#6][] by [@skateinmars][].
@@ -15,4 +21,4 @@ Initial release.
15
21
  [#1]: https://github.com/versapay/active_sanity/issues/1
16
22
  [#6]: https://github.com/versapay/active_sanity/issues/6
17
23
  [@skateinmars]: https://github.com/skateinmars
18
- [@vraravam]: https://github.com/vraravam
24
+ [@vraravam]: https://github.com/vraravam
data/Gemfile CHANGED
@@ -1,9 +1,4 @@
1
- source "http://rubygems.org"
1
+ source 'http://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in active_sanity.gemspec
4
4
  gemspec
5
-
6
- group :development do
7
- gem 'rails', '~> 3.1.0'
8
- end
9
-
data/README.md CHANGED
@@ -7,8 +7,9 @@ validation.
7
7
 
8
8
  ## Requirements
9
9
 
10
- ActiveSanity 0.2.0 requires Rails ~ 3.1
11
- ActiveSanity 0.1.1 requires Rails ~ 3.0
10
+ * ActiveSanity ~0.3 requires Rails ~4.0
11
+ * ActiveSanity ~0.2 requires Rails ~3.1
12
+ * ActiveSanity ~0.1 requires Rails ~3.0
12
13
 
13
14
  ## Install
14
15
 
@@ -38,6 +39,15 @@ The output might look like the following:
38
39
  Flight | 123 | { "arrival_time" => ["can't be nil"], "departure_time" => ["is invalid"] }
39
40
  Flight | 323 | { "arrival_time" => ["can't be nil"] }
40
41
 
42
+ By default, the number of records fetched from the database for validation is set to 500. If this causes any issues in your domain/codebase, you can configure it this way in 'config\application.rb' (or 'config\environments\test.rb'):
43
+
44
+ class Application < Rails::Application
45
+ config.after_initialize do
46
+ ActiveSanity::Checker.batch_size = 439
47
+ end
48
+ end
49
+
50
+
41
51
  ## Contribute & Dev environment
42
52
 
43
53
  Usual fork & pull request.
data/Rakefile CHANGED
@@ -1,16 +1,14 @@
1
1
  require 'bundler'
2
2
  Bundler::GemHelper.install_tasks
3
3
 
4
- task :default => :features
4
+ task default: :features
5
5
 
6
- desc "Run features"
6
+ desc 'Run features'
7
7
  task :features do
8
- raise "Failed!" unless system('export RAILS_ENV=test && bundle exec cucumber features')
8
+ fail 'Failed!' unless system('export RAILS_ENV=test && bundle exec cucumber features')
9
9
  end
10
10
 
11
- desc "Clean test rails app"
11
+ desc 'Clean test rails app'
12
12
  task :clean do
13
- if system('rm -r test/rails_app')
14
- puts "test/rails_app deleted successfully"
15
- end
13
+ puts 'test/rails_app deleted successfully' if system('rm -r test/rails_app')
16
14
  end
@@ -1,26 +1,27 @@
1
1
  # -*- encoding: utf-8 -*-
2
- $:.push File.expand_path("../lib", __FILE__)
3
- require "active_sanity/version"
2
+ $LOAD_PATH.push File.expand_path('../lib', __FILE__)
3
+ require 'active_sanity/version'
4
4
 
5
5
  Gem::Specification.new do |s|
6
- s.name = "active_sanity"
6
+ s.name = 'active_sanity'
7
7
  s.version = ActiveSanity::VERSION
8
8
  s.platform = Gem::Platform::RUBY
9
- s.authors = ["VersaPay", "Philippe Creux"]
10
- s.email = ["philippe.creux@versapay.com"]
11
- s.homepage = ""
12
- s.summary = %q{Checks Sanity of Active Record records}
13
- s.description = %q{Performs a Sanity Check of your database by logging all invalid Active Records}
14
- s.homepage = "https://github.com/versapay/active_sanity"
9
+ s.authors = ['VersaPay', 'Philippe Creux']
10
+ s.email = ['philippe.creux@versapay.com']
11
+ s.summary = 'Checks Sanity of Active Record records'
12
+ s.description = 'Performs a Sanity Check of your database by logging all invalid Active Records'
13
+ s.homepage = 'https://github.com/versapay/active_sanity'
15
14
 
16
- s.add_dependency "rails", ">=3.1.0"
15
+ s.add_dependency 'rails', '>=4.0'
17
16
 
18
- s.add_development_dependency "rspec"
19
- s.add_development_dependency "cucumber"
20
- s.add_development_dependency "sqlite3"
17
+ s.required_ruby_version = '>= 1.9.3'
18
+
19
+ s.add_development_dependency 'rspec', '~>3.1'
20
+ s.add_development_dependency 'cucumber', '~>1.3'
21
+ s.add_development_dependency 'sqlite3', '~>1.3'
21
22
 
22
23
  s.files = `git ls-files`.split("\n")
23
24
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
24
- s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
25
- s.require_paths = ["lib"]
25
+ s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
26
+ s.require_paths = ['lib']
26
27
  end
@@ -9,7 +9,7 @@ Feature: Check sanity
9
9
 
10
10
  Scenario: Check sanity on empty database
11
11
  When I run "rake db:check_sanity"
12
- Then I should see "Checking the following models: Category, InvalidRecord, Post, User"
12
+ Then I should see "Checking the following models: Category, Post, User"
13
13
  Then I should not see any invalid records
14
14
 
15
15
  Scenario: Check sanity on database with valid records
@@ -9,7 +9,7 @@ Feature: Check sanity with db storage
9
9
 
10
10
  Scenario: Check sanity on empty database
11
11
  When I run "rake db:check_sanity"
12
- Then I should see "Checking the following models: Category, InvalidRecord, Post, User"
12
+ Then I should see "Checking the following models: Category, Post, User"
13
13
  Then the table "invalid_records" should be empty
14
14
 
15
15
  Scenario: Check sanity on database with valid records
@@ -1,15 +1,15 @@
1
1
  def setup_rails_app
2
- return if File.directory?("test/rails_app")
2
+ return if File.directory?('test/rails_app')
3
3
 
4
- unless system "bundle exec rails new test/rails_app -m test/rails_template.rb && cd ./test/rails_app && RAILS_ENV=test rake db:migrate"
5
- system("rm -fr test/rails_app")
6
- raise "Failed to generate test/rails_app"
4
+ unless system 'bundle exec rails new test/rails_app -m test/rails_template.rb && cd ./test/rails_app && RAILS_ENV=test rake db:migrate'
5
+ system('rm -fr test/rails_app')
6
+ fail 'Failed to generate test/rails_app'
7
7
  end
8
8
  end
9
9
 
10
10
  Given /^I have a rails app using 'active_sanity'$/ do
11
- Dir["./test/rails_app/db/migrate/*create_invalid_records.rb"].each do |migration|
12
- raise unless system("rm #{migration}")
11
+ Dir['./test/rails_app/db/migrate/*create_invalid_records.rb'].each do |migration|
12
+ fail unless system("rm #{migration}")
13
13
  end
14
14
 
15
15
  setup_rails_app
@@ -23,7 +23,7 @@ end
23
23
  Given /^I have a rails app using 'active_sanity' with db storage$/ do
24
24
  setup_rails_app
25
25
 
26
- raise unless system("cd ./test/rails_app && rails generate active_sanity && RAILS_ENV=test rake db:migrate")
26
+ fail unless system('cd ./test/rails_app && rails generate active_sanity && RAILS_ENV=test rake db:migrate')
27
27
 
28
28
  require './test/rails_app/config/environment'
29
29
 
@@ -33,16 +33,16 @@ Given /^I have a rails app using 'active_sanity' with db storage$/ do
33
33
  end
34
34
 
35
35
  Given /^the database contains a few valid records$/ do
36
- Author.create!(:first_name => "Greg", :last_name => "Bell", :username => "gregbell")
37
- Publisher.create!(:first_name => "Sam", :last_name => "Vincent", :username => "samvincent")
38
- Category.create!(:name => "Uncategorized")
39
- Post.create!(:author => Author.first, :category => Category.first,
40
- :title => "How ActiveAdmin changed the world", :body => "Lot of love.",
41
- :published_at => 4.years.from_now)
36
+ Author.create!(first_name: 'Greg', last_name: 'Bell', username: 'gregbell')
37
+ Publisher.create!(first_name: 'Sam', last_name: 'Vincent', username: 'samvincent')
38
+ Category.create!(name: 'Uncategorized')
39
+ Post.create!(author: Author.first, category: Category.first,
40
+ title: 'How ActiveAdmin changed the world', body: 'Lot of love.',
41
+ published_at: 4.years.from_now)
42
42
  end
43
43
 
44
44
  Given /^the first author's username is empty and the first post category_id is nil$/ do
45
- Author.first.update_attribute(:username, "")
45
+ Author.first.update_attribute(:username, '')
46
46
  Post.first.update_attribute(:category_id, nil)
47
47
  end
48
48
 
@@ -58,13 +58,11 @@ Given /^the first post title is empty$/ do
58
58
  Post.first.update_attribute('title', '')
59
59
  end
60
60
 
61
-
62
61
  When /^I run "([^"]*)"$/ do |command|
63
62
  puts @output = `cd ./test/rails_app && export RAILS_ENV=test && bundle exec #{command} --trace; echo "RETURN:$?"`
64
- raise unless @output['RETURN:0']
63
+ fail unless @output['RETURN:0']
65
64
  end
66
65
 
67
-
68
66
  Then /^I should see the following invalid records:$/ do |table|
69
67
  table.raw.each do |model, id, errors|
70
68
  @output.should =~ /#{model}\s+\|\s+#{id}\s+\|\s+#{Regexp.escape errors}/
@@ -85,7 +83,7 @@ end
85
83
 
86
84
  Then /^the table "([^"]*)" should contain:$/ do |_, table|
87
85
  table.raw.each do |model, id, errors|
88
- invalid_record = InvalidRecord.where(:record_type => model, :record_id => id).first
86
+ invalid_record = InvalidRecord.where(record_type: model, record_id: id).first
89
87
  invalid_record.should be_an_instance_of(InvalidRecord)
90
88
  errors = eval(errors)
91
89
  errors.each do |k, v|
@@ -95,6 +93,5 @@ Then /^the table "([^"]*)" should contain:$/ do |_, table|
95
93
  end
96
94
 
97
95
  Then /^the table "([^"]*)" should not contain errors for "([^"]*)" "([^"]*)"$/ do |_, model, id|
98
- InvalidRecord.where(:record_type => model, :record_id => id).first.should be_nil
96
+ InvalidRecord.where(record_type: model, record_id: id).first.should be_nil
99
97
  end
100
-
@@ -1,18 +1,18 @@
1
1
  ENV['BUNDLE_GEMFILE'] = File.expand_path('../../../Gemfile', __FILE__)
2
2
 
3
3
  require 'rubygems'
4
- require "bundler"
4
+ require 'bundler'
5
5
  Bundler.setup
6
6
 
7
- if File.directory?("test/rails_app")
8
- Dir.chdir("test/rails_app") do
9
- raise unless system("rm -f db/migrate/*create_invalid_records.rb && RAILS_ENV=test rake db:drop db:create db:migrate")
7
+ if File.directory?('test/rails_app')
8
+ Dir.chdir('test/rails_app') do
9
+ fail unless system('rm -f db/migrate/*create_invalid_records.rb && RAILS_ENV=test rake db:drop db:create db:migrate')
10
10
  end
11
11
  end
12
12
 
13
13
  After do
14
14
  # Reset DB!
15
- tables = ['categories', 'invalid_records', 'posts', 'users']
15
+ tables = %w(categories invalid_records posts users)
16
16
  conn = ActiveRecord::Base.connection
17
17
  tables.each do |table|
18
18
  if conn.table_exists?(table)
@@ -1,4 +1,3 @@
1
1
  require File.dirname(__FILE__) + '/active_sanity/checker'
2
2
  require File.dirname(__FILE__) + '/active_sanity/invalid_record'
3
3
  require File.dirname(__FILE__) + '/active_sanity/railtie'
4
-
@@ -1,11 +1,19 @@
1
1
  module ActiveSanity
2
2
  class Checker
3
+ class << self
4
+ attr_accessor :batch_size
5
+ end
6
+
7
+ def initialize
8
+ Checker.batch_size ||= 500
9
+ end
10
+
3
11
  def self.check!
4
12
  new.check!
5
13
  end
6
14
 
7
15
  def check!
8
- puts "Sanity Check"
16
+ puts 'Sanity Check'
9
17
  puts "Checking the following models: #{models.join(', ')}"
10
18
 
11
19
  # TODO: Wouldnt this list already be checked by the next all records call if those records do exist?
@@ -22,6 +30,7 @@ module ActiveSanity
22
30
  load_all_models
23
31
 
24
32
  @models ||= direct_active_record_base_descendants
33
+ @models -= [InvalidRecord]
25
34
  end
26
35
 
27
36
  protected
@@ -52,7 +61,7 @@ module ActiveSanity
52
61
  def check_previously_invalid_records
53
62
  return unless InvalidRecord.table_exists?
54
63
 
55
- InvalidRecord.find_each do |invalid_record|
64
+ InvalidRecord.find_each(batch_size: Checker.batch_size) do |invalid_record|
56
65
  begin
57
66
  invalid_record.destroy if invalid_record.record.valid?
58
67
  rescue
@@ -64,14 +73,12 @@ module ActiveSanity
64
73
 
65
74
  # Go over every single record. When the record is not valid
66
75
  # log it to STDOUT and into the invalid_records table if it exists.
67
- #
68
76
  def check_all_records
69
77
  models.each do |model|
70
78
  begin
71
- model.find_each do |record|
72
- unless record.valid?
73
- invalid_record!(record)
74
- end
79
+ # TODO: Can we filter based on those records that are already present in the 'invalid_records' table - especially since they have been re-verified in the method before?
80
+ model.find_each(batch_size: Checker.batch_size) do |record|
81
+ invalid_record!(record) unless record.valid?
75
82
  end
76
83
  rescue => e
77
84
  # Rescue from exceptions (table does not exists,
@@ -98,7 +105,7 @@ module ActiveSanity
98
105
  def store_invalid_record(record)
99
106
  return unless InvalidRecord.table_exists?
100
107
 
101
- invalid_record = InvalidRecord.where(:record_type => type_of(record), :record_id => record.id).first
108
+ invalid_record = InvalidRecord.where(record_type: type_of(record), record_id: record.id).first
102
109
  invalid_record ||= InvalidRecord.new
103
110
  invalid_record.record = record
104
111
  invalid_record.validation_errors = record.errors.messages
@@ -1,6 +1,7 @@
1
1
  class InvalidRecord < ActiveRecord::Base
2
- belongs_to :record, :polymorphic => true
2
+ belongs_to :record, polymorphic: true
3
3
  serialize :validation_errors
4
4
 
5
- validates_presence_of :record, :validation_errors
5
+ validates :record, :validation_errors, presence: true
6
+ validates :record_id, presence: true, uniqueness: { scope: :record_type }
6
7
  end
@@ -8,4 +8,3 @@ module ActiveSanity
8
8
  end
9
9
  end
10
10
  end
11
-
@@ -1,7 +1,6 @@
1
1
  namespace :db do
2
- desc "Check records sanity"
3
- task :check_sanity => :environment do
2
+ desc 'Check records sanity'
3
+ task check_sanity: :environment do
4
4
  ActiveSanity::Checker.check!
5
5
  end
6
6
  end
7
-
@@ -1,3 +1,3 @@
1
1
  module ActiveSanity
2
- VERSION = "0.2.0"
2
+ VERSION = '0.3.0'
3
3
  end
@@ -6,20 +6,20 @@ module ActiveSanity
6
6
  include Rails::Generators::Migration
7
7
 
8
8
  def self.source_root
9
- @source_root ||= File.join(File.dirname(__FILE__), 'templates')
9
+ @source_root ||= File.join(File.dirname(__FILE__), 'templates')
10
10
  end
11
11
 
12
12
  def self.next_migration_number(dirname) #:nodoc:
13
13
  next_migration_number = current_migration_number(dirname) + 1
14
14
  if ActiveRecord::Base.timestamped_migrations
15
- [Time.now.utc.strftime("%Y%m%d%H%M%S"), "%.14d" % next_migration_number].max
15
+ [Time.now.utc.strftime('%Y%m%d%H%M%S'), '%.14d' % next_migration_number].max
16
16
  else
17
- "%.3d" % next_migration_number
17
+ '%.3d' % next_migration_number
18
18
  end
19
19
  end
20
20
 
21
21
  def create_migration_file
22
- migration_template 'create_invalid_records.rb', 'db/migrate/create_invalid_records.rb'
22
+ migration_template 'create_invalid_records.rb', 'db/migrate/create_invalid_records.rb'
23
23
  end
24
24
  end
25
25
  end
@@ -1,7 +1,7 @@
1
1
  class CreateInvalidRecords < ActiveRecord::Migration
2
2
  def self.up
3
3
  create_table :invalid_records do |t|
4
- t.references :record, :polymorphic => true, :null => false
4
+ t.references :record, polymorphic: true, null: false
5
5
  t.text :validation_errors
6
6
  t.timestamps
7
7
  end
@@ -12,4 +12,3 @@ class CreateInvalidRecords < ActiveRecord::Migration
12
12
  drop_table :invalid_records
13
13
  end
14
14
  end
15
-
@@ -2,46 +2,54 @@
2
2
  # Generate some test models
3
3
 
4
4
  # Post
5
- generate :model, "post title:string body:text published_at:datetime author_id:integer category_id:integer"
5
+ generate :model, 'post title:string body:text published_at:datetime author_id:integer category_id:integer'
6
6
  post_code = <<-CODE
7
7
  belongs_to :author, :class_name => 'User'
8
8
  belongs_to :category
9
9
  accepts_nested_attributes_for :author
10
10
 
11
- validates_presence_of :author, :category, :title, :published_at
11
+ validates :author, :category, :title, :published_at, presence: true
12
12
  CODE
13
- inject_into_file 'app/models/post.rb', post_code, :after => "class Post < ActiveRecord::Base\n"
13
+ inject_into_file 'app/models/post.rb', post_code, after: "class Post < ActiveRecord::Base\n"
14
14
 
15
15
  # Category
16
16
  generate :model, 'category name:string description:text'
17
17
  category_code = <<-CODE
18
18
  has_many :posts
19
19
 
20
- validates_presence_of :name
20
+ validates :name, presence: true
21
21
  CODE
22
- inject_into_file 'app/models/category.rb', category_code, :after => "class Category < ActiveRecord::Base\n"
22
+ inject_into_file 'app/models/category.rb', category_code, after: "class Category < ActiveRecord::Base\n"
23
23
 
24
24
  # User
25
- generate :model, "user first_name:string last_name:string username:string type:string"
25
+ generate :model, 'user first_name:string last_name:string username:string type:string'
26
26
  user_code = <<-CODE
27
27
  has_many :posts, :foreign_key => 'author_id'
28
28
 
29
- validates_presence_of :first_name, :last_name, :username
30
- validates_length_of :username, :minimum => 3
29
+ validates :first_name, :last_name, :username, presence: true
30
+ validates :username, length: { minimum: 3 }
31
31
  CODE
32
- inject_into_file 'app/models/user.rb', user_code, :after => "class User < ActiveRecord::Base\n"
32
+ inject_into_file 'app/models/user.rb', user_code, after: "class User < ActiveRecord::Base\n"
33
33
 
34
34
  # Author < User
35
- create_file 'app/models/author.rb', "class Author < User; end"
35
+ create_file 'app/models/author.rb', 'class Author < User; end'
36
36
  # Publisher < User
37
- create_file 'app/models/publisher.rb', "class Publisher < User; end"
38
-
37
+ create_file 'app/models/publisher.rb', 'class Publisher < User; end'
39
38
 
40
39
  # NotAModel
41
- create_file 'app/models/not_a_model.rb', "class NotAModel; end"
40
+ create_file 'app/models/not_a_model.rb', 'class NotAModel; end'
42
41
 
43
42
  # Add active_sanity
44
43
  append_file 'Gemfile', "gem 'active_sanity', :path => '../../'"
45
44
 
46
- run "bundle"
47
- rake "db:migrate"
45
+ # Configure for custom batch_size
46
+ custom_batch_size_code = <<-CODE
47
+ config.after_initialize do
48
+ ActiveSanity::Checker.batch_size = 439
49
+ end
50
+ CODE
51
+
52
+ inject_into_file 'config/application.rb', custom_batch_size_code, after: " < Rails::Application\n"
53
+
54
+ run 'bundle'
55
+ rake 'db:migrate'
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_sanity
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
5
- prerelease:
4
+ version: 0.3.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - VersaPay
@@ -10,52 +9,64 @@ authors:
10
9
  autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2012-05-25 00:00:00.000000000 Z
12
+ date: 2015-02-23 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: rails
17
- requirement: &70154013012080 !ruby/object:Gem::Requirement
18
- none: false
16
+ requirement: !ruby/object:Gem::Requirement
19
17
  requirements:
20
- - - ! '>='
18
+ - - ">="
21
19
  - !ruby/object:Gem::Version
22
- version: 3.1.0
20
+ version: '4.0'
23
21
  type: :runtime
24
22
  prerelease: false
25
- version_requirements: *70154013012080
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ version: '4.0'
26
28
  - !ruby/object:Gem::Dependency
27
29
  name: rspec
28
- requirement: &70154013011660 !ruby/object:Gem::Requirement
29
- none: false
30
+ requirement: !ruby/object:Gem::Requirement
30
31
  requirements:
31
- - - ! '>='
32
+ - - "~>"
32
33
  - !ruby/object:Gem::Version
33
- version: '0'
34
+ version: '3.1'
34
35
  type: :development
35
36
  prerelease: false
36
- version_requirements: *70154013011660
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - "~>"
40
+ - !ruby/object:Gem::Version
41
+ version: '3.1'
37
42
  - !ruby/object:Gem::Dependency
38
43
  name: cucumber
39
- requirement: &70154013011180 !ruby/object:Gem::Requirement
40
- none: false
44
+ requirement: !ruby/object:Gem::Requirement
41
45
  requirements:
42
- - - ! '>='
46
+ - - "~>"
43
47
  - !ruby/object:Gem::Version
44
- version: '0'
48
+ version: '1.3'
45
49
  type: :development
46
50
  prerelease: false
47
- version_requirements: *70154013011180
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - "~>"
54
+ - !ruby/object:Gem::Version
55
+ version: '1.3'
48
56
  - !ruby/object:Gem::Dependency
49
57
  name: sqlite3
50
- requirement: &70154013010760 !ruby/object:Gem::Requirement
51
- none: false
58
+ requirement: !ruby/object:Gem::Requirement
52
59
  requirements:
53
- - - ! '>='
60
+ - - "~>"
54
61
  - !ruby/object:Gem::Version
55
- version: '0'
62
+ version: '1.3'
56
63
  type: :development
57
64
  prerelease: false
58
- version_requirements: *70154013010760
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: '1.3'
59
70
  description: Performs a Sanity Check of your database by logging all invalid Active
60
71
  Records
61
72
  email:
@@ -64,7 +75,8 @@ executables: []
64
75
  extensions: []
65
76
  extra_rdoc_files: []
66
77
  files:
67
- - .gitignore
78
+ - ".gitignore"
79
+ - ".rubocop.yml"
68
80
  - CHANGELOG.md
69
81
  - Gemfile
70
82
  - README.md
@@ -85,27 +97,26 @@ files:
85
97
  - test/rails_template.rb
86
98
  homepage: https://github.com/versapay/active_sanity
87
99
  licenses: []
100
+ metadata: {}
88
101
  post_install_message:
89
102
  rdoc_options: []
90
103
  require_paths:
91
104
  - lib
92
105
  required_ruby_version: !ruby/object:Gem::Requirement
93
- none: false
94
106
  requirements:
95
- - - ! '>='
107
+ - - ">="
96
108
  - !ruby/object:Gem::Version
97
- version: '0'
109
+ version: 1.9.3
98
110
  required_rubygems_version: !ruby/object:Gem::Requirement
99
- none: false
100
111
  requirements:
101
- - - ! '>='
112
+ - - ">="
102
113
  - !ruby/object:Gem::Version
103
114
  version: '0'
104
115
  requirements: []
105
116
  rubyforge_project:
106
- rubygems_version: 1.8.11
117
+ rubygems_version: 2.2.2
107
118
  signing_key:
108
- specification_version: 3
119
+ specification_version: 4
109
120
  summary: Checks Sanity of Active Record records
110
121
  test_files:
111
122
  - features/check_sanity.feature
@@ -113,4 +124,3 @@ test_files:
113
124
  - features/step_definitions/rails_app.rb
114
125
  - features/support/env.rb
115
126
  - test/rails_template.rb
116
- has_rdoc: