active_archive 4.0.3 → 4.0.4
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/lib/active_archive.rb +19 -1
- data/lib/active_archive/version.rb +1 -1
- metadata +3 -4
- data/lib/active_archive/railtie.rb +0 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 842f1272b68cf44dda4f2d804c3722d122aa27e2
|
4
|
+
data.tar.gz: cb36567dee12c58196a6dee370e9789429fc7b68
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5da2c6a12f5b6b571b29bdb50535aea385b75294c3ea1e36e113c5c6daafd8d937bd5f154bcee1158ec255c13cca724e5129487b79548ea2213b28e6c55735f
|
7
|
+
data.tar.gz: 983e2e54ecbf9e519b5e842c14f5889b4b94a64a36041cd4099373f151720f6fb87040c9a1f09791715f59501a16059884dbdb8c1c36507717cd6192efd4b7fe
|
data/lib/active_archive.rb
CHANGED
@@ -1,7 +1,25 @@
|
|
1
1
|
require 'rails'
|
2
2
|
|
3
|
-
%w(version
|
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
|
|
7
7
|
require 'generators/active_archive/install_generator'
|
8
|
+
|
9
|
+
module ActiveArchive
|
10
|
+
class Railtie < ::Rails::Railtie
|
11
|
+
|
12
|
+
initializer 'active_archive' do |app|
|
13
|
+
ActiveArchive::Railtie.instance_eval do
|
14
|
+
[app.config.i18n.available_locales].flatten.each do |locale|
|
15
|
+
(I18n.load_path << path(locale)) if File.file?(path(locale))
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.path(locale)
|
21
|
+
File.expand_path("../../config/locales/#{locale}.yml", __FILE__)
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
end
|
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.
|
4
|
+
version: 4.0.4
|
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-10-
|
11
|
+
date: 2016-10-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -207,7 +207,6 @@ files:
|
|
207
207
|
- lib/active_archive/.DS_Store
|
208
208
|
- lib/active_archive/base.rb
|
209
209
|
- lib/active_archive/methods.rb
|
210
|
-
- lib/active_archive/railtie.rb
|
211
210
|
- lib/active_archive/scopes.rb
|
212
211
|
- lib/active_archive/settings.rb
|
213
212
|
- lib/active_archive/table_definition.rb
|
@@ -233,7 +232,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
233
232
|
version: '0'
|
234
233
|
requirements: []
|
235
234
|
rubyforge_project:
|
236
|
-
rubygems_version: 2.6.
|
235
|
+
rubygems_version: 2.6.7
|
237
236
|
signing_key:
|
238
237
|
specification_version: 4
|
239
238
|
summary: Gem for soft-deleting ActiveRecord objects.
|
@@ -1,19 +0,0 @@
|
|
1
|
-
module ActiveArchive
|
2
|
-
class Railtie < ::Rails::Railtie
|
3
|
-
|
4
|
-
initializer 'active_archive' do |app|
|
5
|
-
ActiveArchive::Railtie.instance_eval do
|
6
|
-
[app.config.i18n.available_locales].flatten.each do |locale|
|
7
|
-
(I18n.load_path << path(locale)) if File.file?(path(locale))
|
8
|
-
end
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
def self.path(locale)
|
13
|
-
File.expand_path("../../config/locales/#{locale}.yml", __FILE__)
|
14
|
-
end
|
15
|
-
|
16
|
-
private_class_method :path
|
17
|
-
|
18
|
-
end
|
19
|
-
end
|