active_archive 4.0.5 → 4.0.6

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: 74be9dd94ea41db7c24ed37b5097ed0476887ec6
4
- data.tar.gz: 5459b2d17e1889b4e5a58092882a48978a2dba7c
3
+ metadata.gz: 92c1e713b49eefb44aeb6add213b87c81de0225d
4
+ data.tar.gz: 6c5106eff7503054c0793240d47a184c0463a713
5
5
  SHA512:
6
- metadata.gz: f5d3c97e628a578c26c1754e90142811e926057cbb9eeb787fc8542041f08677aa0c9ee7d98c635f1bce255f04203ee49cbd7596448e7d901b38b79b82583141
7
- data.tar.gz: c85daed0feb87534869f842257ff4b31945fce34b9d7582946e785b5cb8f7eb22d2297f60e78679e14bb65a81f2171b1333024a16578d8c8ad5fc88128bd2985
6
+ metadata.gz: '0369966d50e4af17708b1756466a6dce60afa64f061eeab2d56798b83679a8dc1be9764e7b18a171dd6a3511b60c919112f2ccdface89c4f04707478a30e0b88'
7
+ data.tar.gz: 69e4a6ccf751be3252291e924780d076f185cfafd4d542fc4c14e19d092b73821b5842843c6610a719ac75148f23e4325088f687f1605c47da62f23395efb75e
data/.rubocop.yml CHANGED
@@ -1,11 +1,25 @@
1
1
  AllCops:
2
2
  DisplayCopNames: true
3
3
  DisplayStyleGuide: true
4
- TargetRubyVersion: 2.3
4
+ TargetRubyVersion: 2.4
5
5
  Exclude:
6
6
  - 'spec/**/**/*'
7
+ Layout/ClosingParenthesisIndentation:
8
+ Enabled: false
9
+ Layout/EmptyLinesAroundBlockBody:
10
+ Enabled: false
11
+ Layout/EmptyLinesAroundClassBody:
12
+ Enabled: false
13
+ Layout/EmptyLinesAroundModuleBody:
14
+ Enabled: false
15
+ Layout/FirstParameterIndentation:
16
+ Enabled: false
17
+ Layout/MultilineMethodCallIndentation:
18
+ EnforcedStyle: aligned
7
19
  LineLength:
8
20
  Max: 100
21
+ Lint/ScriptPermission:
22
+ Enabled: false
9
23
  Metrics/ClassLength:
10
24
  Enabled: false
11
25
  Metrics/ModuleLength:
@@ -14,24 +28,12 @@ Style/Alias:
14
28
  EnforcedStyle: prefer_alias_method
15
29
  Style/BracesAroundHashParameters:
16
30
  Enabled: false
17
- Style/ClosingParenthesisIndentation:
18
- Enabled: false
19
31
  Style/Documentation:
20
32
  Enabled: false
21
- Style/EmptyLinesAroundBlockBody:
22
- Enabled: false
23
- Style/EmptyLinesAroundClassBody:
24
- Enabled: false
25
- Style/EmptyLinesAroundModuleBody:
26
- Enabled: false
27
33
  Style/HashSyntax:
28
34
  Enabled: false
29
- Style/FirstParameterIndentation:
30
- Enabled: false
31
35
  Style/FrozenStringLiteralComment:
32
36
  Enabled: false
33
- Style/MultilineMethodCallIndentation:
34
- EnforcedStyle: aligned
35
37
  Style/NumericLiterals:
36
38
  Enabled: false
37
39
  Style/RescueModifier:
@@ -1,4 +1,5 @@
1
1
  # coding: utf-8
2
+
2
3
  lib = File.expand_path('../lib', __FILE__)
3
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
5
  require 'active_archive/version'
@@ -16,7 +17,7 @@ Gem::Specification.new do |spec|
16
17
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
17
18
  spec.bindir = 'exe'
18
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
- spec.require_paths = ['lib']
20
+ spec.require_paths = %w[lib]
20
21
 
21
22
  spec.add_runtime_dependency 'rails'
22
23
  spec.add_runtime_dependency 'dry-configurable'
@@ -137,7 +137,7 @@ module ActiveArchive
137
137
 
138
138
  def unarchive_destroyed_dependent_records(force = nil)
139
139
  self.class.reflections
140
- .select { |_, ref| 'destroy' == ref.options[:dependent].to_s && ref.klass.archivable? }
140
+ .select { |_, ref| ref.options[:dependent].to_s == 'destroy' && ref.klass.archivable? }
141
141
  .each do |name, ref|
142
142
  dependent_records_for_unarchival(name, ref).each { |rec| rec.try(:unarchive, force) }
143
143
  reload
@@ -169,15 +169,15 @@ module ActiveArchive
169
169
  end
170
170
 
171
171
  def should_force_destroy?(force)
172
- force.is_a?(Hash) ? force[:force] : (:force == force)
172
+ force.is_a?(Hash) ? force[:force] : (force == :force)
173
173
  end
174
174
 
175
175
  def should_ignore_validations?(force)
176
- force.is_a?(Hash) && (false == force[:validate])
176
+ force.is_a?(Hash) && (force[:validate] == false)
177
177
  end
178
178
 
179
179
  def should_unarchive_parent_first?(order)
180
- order.is_a?(Hash) && (true == order[:reverse])
180
+ order.is_a?(Hash) && (order[:reverse] == true)
181
181
  end
182
182
 
183
183
  end
@@ -1,3 +1,3 @@
1
1
  module ActiveArchive
2
- VERSION = '4.0.5'.freeze
2
+ VERSION = '4.0.6'.freeze
3
3
  end
@@ -1,6 +1,6 @@
1
1
  require 'rails'
2
2
 
3
- %w(version settings table_definition methods scopes base).each do |file_name|
3
+ %w[version settings table_definition methods scopes base].each do |file_name|
4
4
  require "active_archive/#{file_name}"
5
5
  end
6
6
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_archive
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.5
4
+ version: 4.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Gomez
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-12-15 00:00:00.000000000 Z
11
+ date: 2017-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -232,7 +232,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
232
232
  version: '0'
233
233
  requirements: []
234
234
  rubyforge_project:
235
- rubygems_version: 2.6.8
235
+ rubygems_version: 2.6.12
236
236
  signing_key:
237
237
  specification_version: 4
238
238
  summary: Gem for soft-deleting ActiveRecord objects.