deleted_at 0.4.0rc1 → 0.5.0.pre.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/{spec/support/rails/public/favicon.ico → CHANGELOG.md} +0 -0
  3. data/{LICENSE.txt → LICENSE} +0 -0
  4. data/README.md +29 -15
  5. data/lib/deleted_at.rb +29 -29
  6. data/lib/deleted_at/active_record.rb +37 -0
  7. data/lib/deleted_at/core.rb +51 -0
  8. data/lib/deleted_at/{views.rb → legacy.rb} +23 -14
  9. data/lib/deleted_at/railtie.rb +5 -4
  10. data/lib/deleted_at/relation.rb +72 -0
  11. data/lib/deleted_at/table_definition.rb +10 -0
  12. data/lib/deleted_at/version.rb +1 -1
  13. metadata +30 -67
  14. data/.gitignore +0 -78
  15. data/.rspec +0 -2
  16. data/.travis.yml +0 -43
  17. data/CODE_OF_CONDUCT.md +0 -74
  18. data/Gemfile +0 -19
  19. data/Rakefile +0 -6
  20. data/deleted_at.gemspec +0 -42
  21. data/gemfiles/activerecord-4.0.Gemfile +0 -3
  22. data/gemfiles/activerecord-4.1.Gemfile +0 -3
  23. data/gemfiles/activerecord-4.2.Gemfile +0 -3
  24. data/gemfiles/activerecord-5.0.Gemfile +0 -3
  25. data/gemfiles/activerecord-5.1.Gemfile +0 -3
  26. data/lib/deleted_at/active_record/base.rb +0 -102
  27. data/lib/deleted_at/active_record/connection_adapters/abstract/schema_definition.rb +0 -17
  28. data/lib/deleted_at/active_record/relation.rb +0 -43
  29. data/spec/deleted_at/active_record/base_spec.rb +0 -21
  30. data/spec/deleted_at/active_record/relation_spec.rb +0 -166
  31. data/spec/deleted_at/views_spec.rb +0 -76
  32. data/spec/spec_helper.rb +0 -28
  33. data/spec/support/rails/app/models/animals/dog.rb +0 -5
  34. data/spec/support/rails/app/models/comment.rb +0 -6
  35. data/spec/support/rails/app/models/post.rb +0 -7
  36. data/spec/support/rails/app/models/user.rb +0 -7
  37. data/spec/support/rails/config/database.yml +0 -4
  38. data/spec/support/rails/config/routes.rb +0 -3
  39. data/spec/support/rails/db/schema.rb +0 -27
  40. data/spec/support/rails/log/.gitignore +0 -1
@@ -1,28 +0,0 @@
1
- ENV['RAILS_ENV'] = 'test'
2
-
3
- require 'database_cleaner'
4
- require 'combustion'
5
-
6
- require 'simplecov'
7
- SimpleCov.start do
8
- add_filter 'spec'
9
- end
10
-
11
- Combustion.path = 'spec/support/rails'
12
- Combustion.initialize! :active_record
13
-
14
- RSpec.configure do |config|
15
- config.order = 'random'
16
-
17
- # Configure the DatabaseCleaner
18
- config.before(:suite) do
19
- DatabaseCleaner.strategy = :transaction
20
- DatabaseCleaner.clean_with(:truncation)
21
- end
22
-
23
- config.around(:each) do |example|
24
- DatabaseCleaner.cleaning do
25
- example.run
26
- end
27
- end
28
- end
@@ -1,5 +0,0 @@
1
- module Animals
2
- class Dog < ::ActiveRecord::Base
3
- with_deleted_at
4
- end
5
- end
@@ -1,6 +0,0 @@
1
- class Comment < ::ActiveRecord::Base
2
- belongs_to :user
3
- belongs_to :post
4
-
5
- self.primary_key = :id
6
- end
@@ -1,7 +0,0 @@
1
- class Post < ::ActiveRecord::Base
2
- self.table_name = "documents"
3
- with_deleted_at
4
-
5
- belongs_to :user
6
- has_many :comments
7
- end
@@ -1,7 +0,0 @@
1
- class User < ::ActiveRecord::Base
2
- with_deleted_at
3
-
4
- has_many :posts
5
- has_many :comments
6
-
7
- end
@@ -1,4 +0,0 @@
1
- test:
2
- adapter: postgresql
3
- encoding: unicode
4
- database: deleted_at-test
@@ -1,3 +0,0 @@
1
- Rails.application.routes.draw do
2
- #
3
- end
@@ -1,27 +0,0 @@
1
- ActiveRecord::Schema.define do
2
- self.verbose = false
3
-
4
- create_table :users, schema: :public, force: true do |t|
5
- t.string :name
6
- t.string :email, index: :btree
7
- t.timestamps null: false, deleted_at: true
8
- end
9
-
10
- create_table :documents, id: :bigserial, force: true do |t|
11
- t.integer :user_id
12
- t.string :title
13
- t.timestamps null: false, deleted_at: true
14
- end
15
-
16
- create_table :comments, force: true do |t|
17
- t.string :title
18
- t.integer :user_id
19
- t.integer :post_id
20
- t.timestamps null: false
21
- end
22
-
23
- create_table :dogs, force: true do |t|
24
- t.string :name
25
- t.timestamps null: false, deleted_at: true
26
- end
27
- end
@@ -1 +0,0 @@
1
- *.log