lite-regulations 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 +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/lib/lite/regulations.rb +3 -3
- data/{config → lib/lite/regulations}/locales/en.yml +0 -0
- data/lib/lite/regulations/railtie.rb +8 -10
- data/lib/lite/regulations/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6acbbef86579433a77664ff0bcd047b9425afbce5883b676b3bad427d24b9c87
|
|
4
|
+
data.tar.gz: e77daf09160432da89a91c178a7bffb340c3e1e096fb453c2f8eb4c3f53074db
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 58dcf0493ba2cb0448bdd06910fb099a77bb9dee27a1ad81fb6471e1d2072dbc75b4f61e73816a14e4aa5c78e9c763566d7fb9dd448a2dd8942370f967e0718e
|
|
7
|
+
data.tar.gz: ba0d5cac1e383674a0b7b4910d5e9bfa796356c29ab393cacd7488dabe65b71fb33a92b98d1af85f7f499df31a29bc538287c22fc0bbc70f858c4e6b5c467214
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/lib/lite/regulations.rb
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
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/regulations/railtie' if defined?(Rails::Railtie)
|
|
6
7
|
require 'lite/regulations/version'
|
|
7
|
-
require 'lite/regulations/railtie' if defined?(Rails)
|
|
8
8
|
|
|
9
9
|
%w[base activation containment expiration quarantine suspension visibility].each do |name|
|
|
10
10
|
require "lite/regulations/#{name}"
|
|
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 Regulations
|
|
7
|
-
class Railtie <
|
|
5
|
+
class Railtie < Rails::Railtie
|
|
8
6
|
|
|
9
|
-
initializer 'lite-regulations' do |app|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
next if !File.file?(path) || I18n.load_path.include?(path)
|
|
7
|
+
initializer 'lite-regulations.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
|
-
|
|
16
|
-
end
|
|
12
|
+
I18n.load_path << path
|
|
17
13
|
end
|
|
14
|
+
|
|
15
|
+
I18n.reload!
|
|
18
16
|
end
|
|
19
17
|
|
|
20
18
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: lite-regulations
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
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-
|
|
11
|
+
date: 2021-07-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activerecord
|
|
@@ -215,7 +215,6 @@ files:
|
|
|
215
215
|
- _config.yml
|
|
216
216
|
- bin/console
|
|
217
217
|
- bin/setup
|
|
218
|
-
- config/locales/en.yml
|
|
219
218
|
- docs/ACTIVATION.md
|
|
220
219
|
- docs/CONTAINMENT.md
|
|
221
220
|
- docs/EXPIRATION.md
|
|
@@ -227,6 +226,7 @@ files:
|
|
|
227
226
|
- lib/lite/regulations/base.rb
|
|
228
227
|
- lib/lite/regulations/containment.rb
|
|
229
228
|
- lib/lite/regulations/expiration.rb
|
|
229
|
+
- lib/lite/regulations/locales/en.yml
|
|
230
230
|
- lib/lite/regulations/quarantine.rb
|
|
231
231
|
- lib/lite/regulations/railtie.rb
|
|
232
232
|
- lib/lite/regulations/suspension.rb
|