acts_as_removable 3.0.0 → 3.0.1

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
  SHA256:
3
- metadata.gz: 2104af4e96da53bc63227ea60da8acd3916de925b60a21b4b07612d06a38afd5
4
- data.tar.gz: 4207a15fff8f2d84931726ac8a46dae342f505ec5249a353e029bbdd9ace6038
3
+ metadata.gz: 73a8321dc5f10d5b391838d8ef5e5ae42fd9234f79e11acd8897499baa529ff8
4
+ data.tar.gz: 35e65edd2a3231765e29002fe0685851b41ad5ef4917db4d85f4158f367085b5
5
5
  SHA512:
6
- metadata.gz: fe7c2c196cedcee69c6e675b2eb728f91250d0e15f697a56e67b126e2eeaf31f20997944d6c12c5a770e6c4731fe42f0b15d670a1b8410465c1199f457b04ffc
7
- data.tar.gz: 4f4f97cf7baa15f67589383eef923753ac01e18c1b25d34dc3f11e1320f79042a2f9291cd86416cbf671126d9d625109961d0b5074ec6589ddfd611f6c9c0908
6
+ metadata.gz: 8385b5a3e3c992401e4690cd4c76520a1760d35a9c19543064cc4fa668b77164768df84a5cd2bb8e6966496b70f82a0e3779853443c4113abc6c4ba14ed46441
7
+ data.tar.gz: 7e403cfae73a20e6d76bcb255f9e0cbd1c0f73b8ca67ac5f3c23f686dd5c34c4501a20769e0dda38fd15a55acec4ad13bc4b8f6f83aad05dfe6437e4d84ee574
@@ -0,0 +1,24 @@
1
+ require:
2
+ - rubocop-performance
3
+
4
+ AllCops:
5
+ TargetRubyVersion: 2.4
6
+
7
+ Layout/AlignHash:
8
+ EnforcedHashRocketStyle: table
9
+ EnforcedColonStyle: table
10
+
11
+ Metrics/LineLength:
12
+ Max: 120
13
+
14
+ Metrics/AbcSize:
15
+ Enabled: false
16
+
17
+ Metrics/MethodLength:
18
+ Enabled: false
19
+
20
+ Metrics/BlockLength:
21
+ Enabled: false
22
+
23
+ Style/Documentation:
24
+ Enabled: false
@@ -3,16 +3,22 @@ sudo: false
3
3
  language: ruby
4
4
 
5
5
  rvm:
6
- - 2.2.5
7
- - 2.3.1
6
+ - 2.4.7
7
+ - 2.5.6
8
+ - 2.6.4
8
9
 
9
10
  gemfile:
10
- - gemfiles/rails40
11
- - gemfiles/rails41
12
- - gemfiles/rails42
13
11
  - gemfiles/rails50
12
+ - gemfiles/rails51
13
+ - gemfiles/rails52
14
+ - gemfiles/rails60
15
+
16
+ matrix:
17
+ exclude:
18
+ - rvm: 2.4.7
19
+ gemfile: gemfiles/rails60
14
20
 
15
21
  script: bundle exec rake spec
16
22
 
17
23
  before_install:
18
- - gem install bundler -v '~> 1.12'
24
+ - gem install bundler -v '~> 2.0'
@@ -3,6 +3,9 @@ Changelog
3
3
 
4
4
  #### Unreleased
5
5
 
6
+ #### 3.0.1 (2019-11-06)
7
+ * Fix support for Rails 6.0.X patch level releases
8
+
6
9
  #### 3.0.0 (2019-08-26)
7
10
  * Support for Rails 6.0.0
8
11
  * Drop support for Rails < 5.0.0
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
3
5
  # Specify your gem's dependencies in acts_as_removable.gemspec
data/Rakefile CHANGED
@@ -1,7 +1,9 @@
1
- require "bundler/gem_tasks"
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/gem_tasks'
2
4
 
3
5
  require 'rspec/core'
4
6
  require 'rspec/core/rake_task'
5
7
  RSpec::Core::RakeTask.new(:spec)
6
8
 
7
- task :default => :spec
9
+ task default: :spec
@@ -1,28 +1,32 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
1
+ # frozen_string_literal: true
2
+
3
+ lib = File.expand_path('lib', __dir__)
3
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
+ require 'English'
4
6
  require 'acts_as_removable/version'
5
7
 
6
8
  Gem::Specification.new do |spec|
7
9
  spec.name = 'acts_as_removable'
8
10
  spec.version = ActsAsRemovable::VERSION
9
11
  spec.authors = ['Florian Schwab', 'Erik-B. Ernst']
10
- spec.email = ['florian.schwab@sic-software.com']
12
+ spec.email = ['florian.schwab@sic.software', 'erik.ernst@sic.software']
11
13
  spec.description = 'Simplifies handling of pseudo removed records.'
12
14
  spec.summary = 'Simplifies handling of pseudo removed records.'
13
15
  spec.homepage = 'https://github.com/SICSoftwareGmbH/acts_as_removable'
14
16
  spec.license = 'MIT'
15
17
 
16
- spec.files = `git ls-files`.split($/)
18
+ spec.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
17
19
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
20
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
21
  spec.require_paths = ['lib']
20
22
 
21
- spec.add_dependency 'activerecord', '>= 5.0', '<= 6.0'
22
- spec.add_dependency 'activesupport', '>= 5.0', '<= 6.0'
23
+ spec.add_dependency 'activerecord', '>= 5.0', '< 6.1'
24
+ spec.add_dependency 'activesupport', '>= 5.0', '< 6.1'
23
25
 
24
- spec.add_development_dependency 'bundler', '>= 1.3'
26
+ spec.add_development_dependency 'bundler', '~> 2.0'
25
27
  spec.add_development_dependency 'rake'
26
28
  spec.add_development_dependency 'rspec'
29
+ spec.add_development_dependency 'rubocop'
30
+ spec.add_development_dependency 'rubocop-performance'
27
31
  spec.add_development_dependency 'sqlite3'
28
32
  end
@@ -4,4 +4,4 @@ source 'https://rubygems.org'
4
4
  gemspec path: '..'
5
5
 
6
6
 
7
- gem 'railties', '~> 4.0'
7
+ gem 'railties', '~> 5.1'
@@ -4,4 +4,4 @@ source 'https://rubygems.org'
4
4
  gemspec path: '..'
5
5
 
6
6
 
7
- gem 'railties', '~> 4.1'
7
+ gem 'railties', '~> 5.2'
@@ -4,4 +4,4 @@ source 'https://rubygems.org'
4
4
  gemspec path: '..'
5
5
 
6
6
 
7
- gem 'railties', '~> 4.2'
7
+ gem 'railties', '~> 6.0'
@@ -1,6 +1,8 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'active_support/concern'
2
4
  require 'active_record'
3
- require "acts_as_removable/version"
5
+ require 'acts_as_removable/version'
4
6
 
5
7
  module ActsAsRemovable
6
8
  extend ActiveSupport::Concern
@@ -17,11 +19,11 @@ module ActsAsRemovable
17
19
  def acts_as_removable(options = {})
18
20
  _acts_as_removable_options.merge!(options)
19
21
 
20
- scope :removed, -> {
22
+ scope :removed, lambda {
21
23
  where(all.table[_acts_as_removable_options[:column_name]].not_eq(nil).to_sql)
22
24
  }
23
25
 
24
- scope :actives, -> {
26
+ scope :actives, lambda {
25
27
  where(all.table[_acts_as_removable_options[:column_name]].eq(nil).to_sql)
26
28
  }
27
29
 
@@ -76,9 +78,7 @@ module ActsAsRemovable
76
78
  end
77
79
 
78
80
  def _acts_as_removable_options
79
- @_acts_as_removable_options ||= {
80
- column_name: 'removed_at'
81
- }
81
+ @_acts_as_removable_options ||= { column_name: 'removed_at' }
82
82
  end
83
83
  end
84
84
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module ActsAsRemovable
2
- VERSION = '3.0.0'
4
+ VERSION = '3.0.1'
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  describe 'acts_as_removable' do
@@ -26,10 +28,10 @@ describe 'acts_as_removable' do
26
28
  before do
27
29
  # setup database
28
30
  db_file = File.expand_path(File.join(File.dirname(__FILE__), '..', 'tmp', 'acts_as_removable.db'))
29
- Dir::mkdir(File.dirname(db_file)) unless File.exists?(File.dirname(db_file))
31
+ Dir.mkdir(File.dirname(db_file)) unless File.exist?(File.dirname(db_file))
30
32
  ActiveRecord::Base.establish_connection(
31
- :adapter => 'sqlite3',
32
- :database => "#{File.expand_path(File.join(File.dirname(__FILE__), '..'))}/tmp/acts_as_removable.db"
33
+ adapter: 'sqlite3',
34
+ database: "#{File.expand_path(File.join(File.dirname(__FILE__), '..'))}/tmp/acts_as_removable.db"
33
35
  )
34
36
  ActiveRecord::Base.connection.execute("DROP TABLE IF EXISTS 'my_models'")
35
37
  ActiveRecord::Base.connection.create_table(:my_models) do |t|
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'rubygems'
2
4
  require 'bundler/setup'
3
5
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acts_as_removable
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Schwab
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-08-26 00:00:00.000000000 Z
12
+ date: 2019-11-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord
@@ -18,9 +18,9 @@ dependencies:
18
18
  - - ">="
19
19
  - !ruby/object:Gem::Version
20
20
  version: '5.0'
21
- - - "<="
21
+ - - "<"
22
22
  - !ruby/object:Gem::Version
23
- version: '6.0'
23
+ version: '6.1'
24
24
  type: :runtime
25
25
  prerelease: false
26
26
  version_requirements: !ruby/object:Gem::Requirement
@@ -28,9 +28,9 @@ dependencies:
28
28
  - - ">="
29
29
  - !ruby/object:Gem::Version
30
30
  version: '5.0'
31
- - - "<="
31
+ - - "<"
32
32
  - !ruby/object:Gem::Version
33
- version: '6.0'
33
+ version: '6.1'
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: activesupport
36
36
  requirement: !ruby/object:Gem::Requirement
@@ -38,9 +38,9 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '5.0'
41
- - - "<="
41
+ - - "<"
42
42
  - !ruby/object:Gem::Version
43
- version: '6.0'
43
+ version: '6.1'
44
44
  type: :runtime
45
45
  prerelease: false
46
46
  version_requirements: !ruby/object:Gem::Requirement
@@ -48,23 +48,23 @@ dependencies:
48
48
  - - ">="
49
49
  - !ruby/object:Gem::Version
50
50
  version: '5.0'
51
- - - "<="
51
+ - - "<"
52
52
  - !ruby/object:Gem::Version
53
- version: '6.0'
53
+ version: '6.1'
54
54
  - !ruby/object:Gem::Dependency
55
55
  name: bundler
56
56
  requirement: !ruby/object:Gem::Requirement
57
57
  requirements:
58
- - - ">="
58
+ - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: '1.3'
60
+ version: '2.0'
61
61
  type: :development
62
62
  prerelease: false
63
63
  version_requirements: !ruby/object:Gem::Requirement
64
64
  requirements:
65
- - - ">="
65
+ - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: '1.3'
67
+ version: '2.0'
68
68
  - !ruby/object:Gem::Dependency
69
69
  name: rake
70
70
  requirement: !ruby/object:Gem::Requirement
@@ -93,6 +93,34 @@ dependencies:
93
93
  - - ">="
94
94
  - !ruby/object:Gem::Version
95
95
  version: '0'
96
+ - !ruby/object:Gem::Dependency
97
+ name: rubocop
98
+ requirement: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ version: '0'
103
+ type: :development
104
+ prerelease: false
105
+ version_requirements: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - ">="
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ - !ruby/object:Gem::Dependency
111
+ name: rubocop-performance
112
+ requirement: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - ">="
115
+ - !ruby/object:Gem::Version
116
+ version: '0'
117
+ type: :development
118
+ prerelease: false
119
+ version_requirements: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - ">="
122
+ - !ruby/object:Gem::Version
123
+ version: '0'
96
124
  - !ruby/object:Gem::Dependency
97
125
  name: sqlite3
98
126
  requirement: !ruby/object:Gem::Requirement
@@ -109,12 +137,14 @@ dependencies:
109
137
  version: '0'
110
138
  description: Simplifies handling of pseudo removed records.
111
139
  email:
112
- - florian.schwab@sic-software.com
140
+ - florian.schwab@sic.software
141
+ - erik.ernst@sic.software
113
142
  executables: []
114
143
  extensions: []
115
144
  extra_rdoc_files: []
116
145
  files:
117
146
  - ".gitignore"
147
+ - ".rubocop.yml"
118
148
  - ".travis.yml"
119
149
  - Changelog.md
120
150
  - Gemfile
@@ -122,10 +152,10 @@ files:
122
152
  - README.md
123
153
  - Rakefile
124
154
  - acts_as_removable.gemspec
125
- - gemfiles/rails40
126
- - gemfiles/rails41
127
- - gemfiles/rails42
128
155
  - gemfiles/rails50
156
+ - gemfiles/rails51
157
+ - gemfiles/rails52
158
+ - gemfiles/rails60
129
159
  - lib/acts_as_removable.rb
130
160
  - lib/acts_as_removable/version.rb
131
161
  - spec/acts_as_removable_spec.rb
@@ -149,7 +179,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
149
179
  - !ruby/object:Gem::Version
150
180
  version: '0'
151
181
  requirements: []
152
- rubygems_version: 3.0.3
182
+ rubygems_version: 3.0.6
153
183
  signing_key:
154
184
  specification_version: 4
155
185
  summary: Simplifies handling of pseudo removed records.