active_regulation 4.0.1 → 4.0.2

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: 30875d0bf46d728cb1021b4fa80cde08c436527a
4
- data.tar.gz: 766b6a5db843f4d4f9c9fc17742c28c02c3114b8
3
+ metadata.gz: 0ca9e1f21b6b01f47b110d68380e1130ac932b1a
4
+ data.tar.gz: a94651edb8e3ff2066adda543a69b2a0cbb045af
5
5
  SHA512:
6
- metadata.gz: 91fc3f8c31592ae65415c19b43a71213bd32d5d32b5578ebb9e482da23d758627810fdf04658064f2b9a5f0ec355970ddab0c3e9ef34672236f9b675e26ee192
7
- data.tar.gz: 711fbe9d4283038e9f037903a187b8041ea004c164324456ffdc75f5d154e7082b3489a8047467ab419c00e8b00db2c820d8fba4cb093bef0d6abab9fa569577
6
+ metadata.gz: 3b93da4bdf3b1afafcd1a52559eb420e07c7380e296e25e39fd583ee47d1a6963f1ea3dad66a27419be2f104a5454566765e66e07239f9aa20e2b00638f98319
7
+ data.tar.gz: 5725d7afa804653f1102d46a111dea937b45cbd8e8fe523b19c152c3a5fe09c0cfd9f8a0aebfed3bb8c1c0aa621004d68829517af9ba6c59d74ac5a36562f910
@@ -1,3 +1,3 @@
1
1
  module ActiveRegulation
2
- VERSION = '4.0.1'.freeze
2
+ VERSION = '4.0.2'.freeze
3
3
  end
@@ -1,3 +1,25 @@
1
1
  %w(version activation containment expiration quarantine suspension visibility).each do |file_name|
2
2
  require "active_regulation/#{file_name}"
3
3
  end
4
+
5
+ if defined?(Rails)
6
+ require 'rails'
7
+
8
+ module ActiveRegulation
9
+ class Railtie < ::Rails::Railtie
10
+
11
+ initializer 'active_regulation' do |app|
12
+ ActiveRegulation::Railtie.instance_eval do
13
+ [app.config.i18n.available_locales].flatten.each do |locale|
14
+ (I18n.load_path << path(locale)) if File.file?(path(locale))
15
+ end
16
+ end
17
+ end
18
+
19
+ def path(locale)
20
+ File.expand_path("../../config/locales/#{locale}.yml", __FILE__)
21
+ end
22
+
23
+ end
24
+ end
25
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_regulation
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.1
4
+ version: 4.0.2
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-01 00:00:00.000000000 Z
11
+ date: 2016-10-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -193,7 +193,6 @@ files:
193
193
  - lib/active_regulation/containment.rb
194
194
  - lib/active_regulation/expiration.rb
195
195
  - lib/active_regulation/quarantine.rb
196
- - lib/active_regulation/railtie.rb
197
196
  - lib/active_regulation/suspension.rb
198
197
  - lib/active_regulation/version.rb
199
198
  - lib/active_regulation/visibility.rb
@@ -218,7 +217,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
218
217
  version: '0'
219
218
  requirements: []
220
219
  rubyforge_project:
221
- rubygems_version: 2.6.6
220
+ rubygems_version: 2.6.7
222
221
  signing_key:
223
222
  specification_version: 4
224
223
  summary: Gem for commonly used record states.
@@ -1,21 +0,0 @@
1
- if defined?(Rails)
2
- module ActiveRegulation
3
- class Railtie < ::Rails::Railtie
4
-
5
- initializer 'active_regulation' do |app|
6
- ActiveRegulation::Railtie.instance_eval do
7
- [app.config.i18n.available_locales].flatten.each do |locale|
8
- (I18n.load_path << path(locale)) if File.file?(path(locale))
9
- end
10
- end
11
- end
12
-
13
- def path(locale)
14
- File.expand_path("../../config/locales/#{locale}.yml", __FILE__)
15
- end
16
-
17
- private_class_method :path
18
-
19
- end
20
- end
21
- end