lite-archive 1.0.7 → 1.1.3

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: 05c24a09d2048dfa4e351204489462d3d86ba453fcdcabbb2cd6920d0dd20a9b
4
- data.tar.gz: 2336963e85871ab47c5c58c8f9d0acbef1dfdcbc928694ef9c18a65b73eb031a
3
+ metadata.gz: bf3cdb58b65c9f3680ff20c9f72a495c7d06a4996b967a4597ebcdd5af121517
4
+ data.tar.gz: 9c26d266df7ff290be17677473d622cf16dffb83e6540baad3afa777afc2cb32
5
5
  SHA512:
6
- metadata.gz: e3083fb599fc8fa1043327aea5ef7823c804e51f48c93e6212e71d319d59fdd294b8f436eb4b9e4a564e3ecfea021dfa8da60972a2ff2c5997540d5ccf6406d4
7
- data.tar.gz: 10aece893c72226121d2b9f73c4d2aaeed29b1ce91859488877e44e5811b3ff9089e4dd36078e0ebe8f925a530c2b962def47fa5abf8149ec23d41ff208a26ef
6
+ metadata.gz: 94ac1d89830d5de82ee38c1fc31f555f66ed5c6a9ac79ab6d2201ba52a503634ae3f6a5c0f909b02afa429a7d1110054ed2b81d4c310bfed881e565edd3459c8
7
+ data.tar.gz: 64d6d6106e0fab93ef7c1a290008a765cf0d688cf4d5a014d3952d2a1eb7a5bb90691accbb0bfd67e8ff5d84d49f3a1647bd12778a72967460b8feb8dfa36892
data/.rubocop.yml CHANGED
@@ -1,8 +1,9 @@
1
1
  require:
2
2
  - rubocop-performance
3
+ - rubocop-rake
3
4
  - rubocop-rspec
4
5
  AllCops:
5
- TargetRubyVersion: 2.7
6
+ TargetRubyVersion: 3.0
6
7
  NewCops: enable
7
8
  DisplayCopNames: true
8
9
  DisplayStyleGuide: true
data/CHANGELOG.md CHANGED
@@ -6,6 +6,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.1.3] - 2021-07-22
10
+ ### Changed
11
+ - Move locales to lib
12
+
13
+ ## [1.1.2] - 2021-07-22
14
+ ### Changed
15
+ - Improved setup
16
+
17
+ ## [1.1.1] - 2021-07-21
18
+ ### Changed
19
+ - Improved Railtie support
20
+
21
+ ## [1.1.0] - 2021-07-19
22
+ ### Added
23
+ - Added Ruby 3.0 support
24
+
9
25
  ## [1.0.7] - 2020-11-03
10
26
  ### Changed
11
27
  - Improved migration support
data/Gemfile.lock CHANGED
@@ -1,64 +1,71 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lite-archive (1.0.7)
4
+ lite-archive (1.1.3)
5
5
  activerecord
6
6
  activesupport
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- actionpack (6.0.3.4)
12
- actionview (= 6.0.3.4)
13
- activesupport (= 6.0.3.4)
14
- rack (~> 2.0, >= 2.0.8)
11
+ actionpack (6.1.4)
12
+ actionview (= 6.1.4)
13
+ activesupport (= 6.1.4)
14
+ rack (~> 2.0, >= 2.0.9)
15
15
  rack-test (>= 0.6.3)
16
16
  rails-dom-testing (~> 2.0)
17
17
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
18
- actionview (6.0.3.4)
19
- activesupport (= 6.0.3.4)
18
+ actionview (6.1.4)
19
+ activesupport (= 6.1.4)
20
20
  builder (~> 3.1)
21
21
  erubi (~> 1.4)
22
22
  rails-dom-testing (~> 2.0)
23
23
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
24
- activemodel (6.0.3.4)
25
- activesupport (= 6.0.3.4)
26
- activerecord (6.0.3.4)
27
- activemodel (= 6.0.3.4)
28
- activesupport (= 6.0.3.4)
29
- activesupport (6.0.3.4)
24
+ activemodel (6.1.4)
25
+ activesupport (= 6.1.4)
26
+ activerecord (6.1.4)
27
+ activemodel (= 6.1.4)
28
+ activesupport (= 6.1.4)
29
+ activesupport (6.1.4)
30
30
  concurrent-ruby (~> 1.0, >= 1.0.2)
31
- i18n (>= 0.7, < 2)
32
- minitest (~> 5.1)
33
- tzinfo (~> 1.1)
34
- zeitwerk (~> 2.2, >= 2.2.2)
35
- ast (2.4.1)
31
+ i18n (>= 1.6, < 2)
32
+ minitest (>= 5.1)
33
+ tzinfo (~> 2.0)
34
+ zeitwerk (~> 2.3)
35
+ ast (2.4.2)
36
36
  builder (3.2.4)
37
37
  colorize (0.8.1)
38
- concurrent-ruby (1.1.7)
38
+ concurrent-ruby (1.1.9)
39
39
  crass (1.0.6)
40
- database_cleaner (1.8.5)
40
+ database_cleaner (2.0.1)
41
+ database_cleaner-active_record (~> 2.0.0)
42
+ database_cleaner-active_record (2.0.1)
43
+ activerecord (>= 5.a)
44
+ database_cleaner-core (~> 2.0.0)
45
+ database_cleaner-core (2.0.1)
41
46
  diff-lcs (1.4.4)
42
- erubi (1.9.0)
43
- fasterer (0.8.3)
47
+ erubi (1.10.0)
48
+ fasterer (0.9.0)
44
49
  colorize (~> 0.7)
45
50
  ruby_parser (>= 3.14.1)
46
51
  generator_spec (0.9.4)
47
52
  activesupport (>= 3.0.0)
48
53
  railties (>= 3.0.0)
49
- i18n (1.8.5)
54
+ i18n (1.8.10)
50
55
  concurrent-ruby (~> 1.0)
51
- loofah (2.7.0)
56
+ loofah (2.10.0)
52
57
  crass (~> 1.0.2)
53
58
  nokogiri (>= 1.5.9)
54
59
  method_source (1.0.0)
55
- mini_portile2 (2.4.0)
56
- minitest (5.14.2)
57
- nokogiri (1.10.10)
58
- mini_portile2 (~> 2.4.0)
59
- parallel (1.19.2)
60
- parser (2.7.2.0)
60
+ mini_portile2 (2.5.3)
61
+ minitest (5.14.4)
62
+ nokogiri (1.11.7)
63
+ mini_portile2 (~> 2.5.0)
64
+ racc (~> 1.4)
65
+ parallel (1.20.1)
66
+ parser (3.0.2.0)
61
67
  ast (~> 2.4.1)
68
+ racc (1.5.2)
62
69
  rack (2.2.3)
63
70
  rack-test (1.1.0)
64
71
  rack (>= 1.0, < 3)
@@ -67,65 +74,66 @@ GEM
67
74
  nokogiri (>= 1.6)
68
75
  rails-html-sanitizer (1.3.0)
69
76
  loofah (~> 2.3)
70
- railties (6.0.3.4)
71
- actionpack (= 6.0.3.4)
72
- activesupport (= 6.0.3.4)
77
+ railties (6.1.4)
78
+ actionpack (= 6.1.4)
79
+ activesupport (= 6.1.4)
73
80
  method_source
74
- rake (>= 0.8.7)
75
- thor (>= 0.20.3, < 2.0)
81
+ rake (>= 0.13)
82
+ thor (~> 1.0)
76
83
  rainbow (3.0.0)
77
- rake (13.0.1)
78
- regexp_parser (1.8.2)
79
- rexml (3.2.4)
84
+ rake (13.0.6)
85
+ regexp_parser (2.1.1)
86
+ rexml (3.2.5)
80
87
  rspec (3.10.0)
81
88
  rspec-core (~> 3.10.0)
82
89
  rspec-expectations (~> 3.10.0)
83
90
  rspec-mocks (~> 3.10.0)
84
- rspec-core (3.10.0)
91
+ rspec-core (3.10.1)
85
92
  rspec-support (~> 3.10.0)
86
- rspec-expectations (3.10.0)
93
+ rspec-expectations (3.10.1)
87
94
  diff-lcs (>= 1.2.0, < 2.0)
88
95
  rspec-support (~> 3.10.0)
89
- rspec-mocks (3.10.0)
96
+ rspec-mocks (3.10.2)
90
97
  diff-lcs (>= 1.2.0, < 2.0)
91
98
  rspec-support (~> 3.10.0)
92
- rspec-rails (4.0.1)
93
- actionpack (>= 4.2)
94
- activesupport (>= 4.2)
95
- railties (>= 4.2)
96
- rspec-core (~> 3.9)
97
- rspec-expectations (~> 3.9)
98
- rspec-mocks (~> 3.9)
99
- rspec-support (~> 3.9)
100
- rspec-support (3.10.0)
101
- rubocop (0.93.1)
99
+ rspec-rails (5.0.1)
100
+ actionpack (>= 5.2)
101
+ activesupport (>= 5.2)
102
+ railties (>= 5.2)
103
+ rspec-core (~> 3.10)
104
+ rspec-expectations (~> 3.10)
105
+ rspec-mocks (~> 3.10)
106
+ rspec-support (~> 3.10)
107
+ rspec-support (3.10.2)
108
+ rubocop (1.18.3)
102
109
  parallel (~> 1.10)
103
- parser (>= 2.7.1.5)
110
+ parser (>= 3.0.0.0)
104
111
  rainbow (>= 2.2.2, < 4.0)
105
- regexp_parser (>= 1.8)
112
+ regexp_parser (>= 1.8, < 3.0)
106
113
  rexml
107
- rubocop-ast (>= 0.6.0)
114
+ rubocop-ast (>= 1.7.0, < 2.0)
108
115
  ruby-progressbar (~> 1.7)
109
- unicode-display_width (>= 1.4.0, < 2.0)
110
- rubocop-ast (1.1.0)
111
- parser (>= 2.7.1.5)
112
- rubocop-performance (1.8.1)
113
- rubocop (>= 0.87.0)
116
+ unicode-display_width (>= 1.4.0, < 3.0)
117
+ rubocop-ast (1.8.0)
118
+ parser (>= 3.0.1.1)
119
+ rubocop-performance (1.11.4)
120
+ rubocop (>= 1.7.0, < 2.0)
114
121
  rubocop-ast (>= 0.4.0)
115
- rubocop-rspec (1.44.1)
116
- rubocop (~> 0.87)
117
- rubocop-ast (>= 0.7.1)
118
- ruby-progressbar (1.10.1)
119
- ruby_parser (3.15.0)
120
- sexp_processor (~> 4.9)
121
- sexp_processor (4.15.1)
122
+ rubocop-rake (0.6.0)
123
+ rubocop (~> 1.0)
124
+ rubocop-rspec (2.4.0)
125
+ rubocop (~> 1.0)
126
+ rubocop-ast (>= 1.1.0)
127
+ ruby-progressbar (1.11.0)
128
+ ruby_parser (3.16.0)
129
+ sexp_processor (~> 4.15, >= 4.15.1)
130
+ sexp_processor (4.15.3)
122
131
  sqlite3 (1.4.2)
123
- thor (1.0.1)
124
- thread_safe (0.3.6)
125
- tzinfo (1.2.7)
126
- thread_safe (~> 0.1)
127
- unicode-display_width (1.7.0)
128
- zeitwerk (2.4.1)
132
+ thor (1.1.0)
133
+ tzinfo (2.0.4)
134
+ concurrent-ruby (~> 1.0)
135
+ unicode-display_width (2.0.0)
136
+ zeitwerk (2.4.2)
129
137
 
130
138
  PLATFORMS
131
139
  ruby
@@ -141,8 +149,9 @@ DEPENDENCIES
141
149
  rspec-rails
142
150
  rubocop
143
151
  rubocop-performance
152
+ rubocop-rake
144
153
  rubocop-rspec
145
154
  sqlite3
146
155
 
147
156
  BUNDLED WITH
148
- 2.1.4
157
+ 2.2.24
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'rails/generators'
4
-
5
3
  module Lite
6
4
  module Archive
7
5
  class InstallGenerator < Rails::Generators::Base
data/lib/lite/archive.rb CHANGED
@@ -1,13 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'active_record'
4
- require 'active_support'
3
+ require 'active_record' unless defined?(ActiveRecord)
4
+ require 'active_support' unless defined?(ActiveSupport)
5
5
 
6
- require 'lite/archive/version'
7
- require 'lite/archive/railtie' if defined?(Rails)
8
-
9
- %w[configuration schema_statement table_definition methods scopes base].each do |name|
10
- require "lite/archive/#{name}"
11
- end
6
+ require 'generators/lite/archive/install_generator' if defined?(Rails::Generators)
12
7
 
13
- require 'generators/lite/archive/install_generator'
8
+ require 'lite/archive/railtie' if defined?(Rails::Railtie)
9
+ require 'lite/archive/version'
10
+ require 'lite/archive/configuration'
11
+ require 'lite/archive/schema_statement'
12
+ require 'lite/archive/table_definition'
13
+ require 'lite/archive/methods'
14
+ require 'lite/archive/scopes'
15
+ require 'lite/archive/base'
@@ -1,20 +1,18 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'rails/railtie'
4
-
5
3
  module Lite
6
4
  module Archive
7
- class Railtie < ::Rails::Railtie
5
+ class Railtie < Rails::Railtie
8
6
 
9
- initializer 'lite-archive.setup' do |app|
10
- Lite::Archive::Railtie.instance_eval do
11
- [app.config.i18n.available_locales].flatten.each do |locale|
12
- path = File.expand_path("../../../config/locales/#{locale}.yml", __FILE__)
13
- next if !File.file?(path) || I18n.load_path.include?(path)
7
+ initializer 'lite-archive.configure_locales' do |app|
8
+ Array(app.config.i18n.available_locales).each do |locale|
9
+ path = File.expand_path("../../../locales/#{locale}.yml", __FILE__)
10
+ next unless File.file?(path)
14
11
 
15
- I18n.load_path << path
16
- end
12
+ I18n.load_path << path
17
13
  end
14
+
15
+ I18n.reload!
18
16
  end
19
17
 
20
18
  end
@@ -3,7 +3,7 @@
3
3
  module Lite
4
4
  module Archive
5
5
 
6
- VERSION ||= '1.0.7'
6
+ VERSION = '1.1.3'
7
7
 
8
8
  end
9
9
  end
File without changes
data/lite-archive.gemspec CHANGED
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
25
25
  )
26
26
  else
27
27
  raise 'RubyGems 2.0 or newer is required to protect against ' \
28
- 'public gem pushes.'
28
+ 'public gem pushes.'
29
29
  end
30
30
 
31
31
  # Specify which files should be added to the gem when it is released.
@@ -49,6 +49,7 @@ Gem::Specification.new do |spec|
49
49
  spec.add_development_dependency 'rspec-rails'
50
50
  spec.add_development_dependency 'rubocop'
51
51
  spec.add_development_dependency 'rubocop-performance'
52
+ spec.add_development_dependency 'rubocop-rake'
52
53
  spec.add_development_dependency 'rubocop-rspec'
53
54
  spec.add_development_dependency 'sqlite3'
54
55
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lite-archive
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Gomez
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-11-03 00:00:00.000000000 Z
11
+ date: 2021-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -164,6 +164,20 @@ dependencies:
164
164
  - - ">="
165
165
  - !ruby/object:Gem::Version
166
166
  version: '0'
167
+ - !ruby/object:Gem::Dependency
168
+ name: rubocop-rake
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - ">="
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - ">="
179
+ - !ruby/object:Gem::Version
180
+ version: '0'
167
181
  - !ruby/object:Gem::Dependency
168
182
  name: rubocop-rspec
169
183
  requirement: !ruby/object:Gem::Requirement
@@ -214,7 +228,6 @@ files:
214
228
  - _config.yml
215
229
  - bin/console
216
230
  - bin/setup
217
- - config/locales/en.yml
218
231
  - lib/generators/lite/archive/install_generator.rb
219
232
  - lib/generators/lite/archive/templates/install.rb
220
233
  - lib/lite/archive.rb
@@ -226,6 +239,7 @@ files:
226
239
  - lib/lite/archive/scopes.rb
227
240
  - lib/lite/archive/table_definition.rb
228
241
  - lib/lite/archive/version.rb
242
+ - lib/locales/en.yml
229
243
  - lite-archive.gemspec
230
244
  homepage: http://drexed.github.io/lite-archive
231
245
  licenses:
@@ -246,7 +260,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
246
260
  - !ruby/object:Gem::Version
247
261
  version: '0'
248
262
  requirements: []
249
- rubygems_version: 3.1.4
263
+ rubygems_version: 3.2.24
250
264
  signing_key:
251
265
  specification_version: 4
252
266
  summary: Archive (soft-delete) ActiveRecord database records