validates_cvr 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/locales/da.yml +11 -0
- data/config/locales/en.yml +11 -0
- data/lib/validates_cvr/railtie.rb +13 -0
- data/lib/validates_cvr/version.rb +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7acbdf0a829f8a17611a9a41922052f466872dc7
|
4
|
+
data.tar.gz: 93b1cb24863e52e7e6c0d6ca0051a0e94e66c822
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e0cc6b9809c80b14d01cfd1bdb35bbfc63da81f79661b86abcf938d5cea43e379f1fbb7221be050bdeeafcdc7d2f75241484ae10ecd5adbc303709c990bc0fc
|
7
|
+
data.tar.gz: f89f14706f0c8c4af1024e58d168184a9a2938e564e9f841283404ce16af7687130178838d998d17e223fbdcea28e9831bd0771034e18aa894b7fe181931c557
|
@@ -1,4 +1,17 @@
|
|
1
1
|
module ValidatesCvr; end
|
2
2
|
|
3
3
|
class ValidatesCvr::Railtie < ::Rails::Railtie
|
4
|
+
initializer "validates_cvr" do |app|
|
5
|
+
ValidatesCvr::Railtie.instance_eval do
|
6
|
+
pattern = pattern_from app.config.i18n.available_locales
|
7
|
+
pattern = "config/locales/#{pattern}.yml"
|
8
|
+
files = Dir[File.join(File.dirname(__FILE__), "../..", pattern)]
|
9
|
+
I18n.load_path.concat(files)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.pattern_from(args)
|
14
|
+
array = Array(args || [])
|
15
|
+
array.blank? ? "*" : "{#{array.join(',')}}"
|
16
|
+
end
|
4
17
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: validates_cvr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kaspernj
|
@@ -90,6 +90,8 @@ files:
|
|
90
90
|
- MIT-LICENSE
|
91
91
|
- README.md
|
92
92
|
- Rakefile
|
93
|
+
- config/locales/da.yml
|
94
|
+
- config/locales/en.yml
|
93
95
|
- lib/cvr_validator.rb
|
94
96
|
- lib/tasks/validates_cvr_tasks.rake
|
95
97
|
- lib/validates_cvr.rb
|