lite-archive 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b25f37ea6d009012219dde5ff133fcfb1f15e41d1d0efce866508a02595158ad
4
- data.tar.gz: 8af53ea0791d742cb1d70f73fa781c94d171ecfcd041d7c2a577695d3eb50424
3
+ metadata.gz: 851598e0a76d9695dd9eaeb19dc963dfac444ad698b7181a604a4783538dfc41
4
+ data.tar.gz: 61f17b3822835e73a51e44ebba4294ce7fb3ec5ec2d991e295c28d31a008ddda
5
5
  SHA512:
6
- metadata.gz: dd2624cd77803ae2ace19bd3d30b9a9396f447e6d05057c5f1d76bfa1d4a78ea7be078c022a684f60e17a829f3c12fafbbd4e988e6f9c44c33a3a560c072934a
7
- data.tar.gz: 8f206cde5b3aad7199375bde2c4af8743e87b0ad20c3fa33dba54bd36b1df96afefeedef3350f1fe195a92e5416927660841da688e9790271ddf189d9e22cccd
6
+ metadata.gz: 93521127ebf7885e35a8cc33e41df535e3379681f4d4f8e70f16030832215a27f8ba5ade973f1ffd5165f45cc47137e273b1a9d9a0d05f9fa97dd25d58dbdb40
7
+ data.tar.gz: e13824f54810e733fa66311af86b65088beed5ba307e9074c62a43ca491d7ddb9fb9e132b91f5c3df04971dfb7ddc0326a504c1d9e44c1ac368e67f95bd98961
data/CHANGELOG.md CHANGED
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.1.1] - 2021-07-21
10
+ ### Changed
11
+ - Improved Railtie support
12
+
9
13
  ## [1.1.0] - 2021-07-19
10
14
  ### Added
11
15
  - Added Ruby 3.0 support
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lite-archive (1.1.0)
4
+ lite-archive (1.1.1)
5
5
  activerecord
6
6
  activesupport
7
7
 
@@ -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,13 @@
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 'generators/lite/archive/install_generator' if defined?(Rails::Generators)
7
+
8
+ require 'lite/archive/railtie' if defined?(Rails::Railtie)
6
9
  require 'lite/archive/version'
7
- require 'lite/archive/railtie' if defined?(Rails)
8
10
 
9
11
  %w[configuration schema_statement table_definition methods scopes base].each do |name|
10
12
  require "lite/archive/#{name}"
11
13
  end
12
-
13
- require 'generators/lite/archive/install_generator'
File without changes
@@ -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.1.0'
6
+ VERSION = '1.1.1'
7
7
 
8
8
  end
9
9
  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.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Gomez
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-07-20 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
@@ -228,12 +228,12 @@ files:
228
228
  - _config.yml
229
229
  - bin/console
230
230
  - bin/setup
231
- - config/locales/en.yml
232
231
  - lib/generators/lite/archive/install_generator.rb
233
232
  - lib/generators/lite/archive/templates/install.rb
234
233
  - lib/lite/archive.rb
235
234
  - lib/lite/archive/base.rb
236
235
  - lib/lite/archive/configuration.rb
236
+ - lib/lite/archive/locales/en.yml
237
237
  - lib/lite/archive/methods.rb
238
238
  - lib/lite/archive/railtie.rb
239
239
  - lib/lite/archive/schema_statement.rb