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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 34eb576359e124b8847490c739ee379d057da549
4
- data.tar.gz: b795c8c4a6ae416baa9a35b5dd922226ffc73ee6
3
+ metadata.gz: 7acbdf0a829f8a17611a9a41922052f466872dc7
4
+ data.tar.gz: 93b1cb24863e52e7e6c0d6ca0051a0e94e66c822
5
5
  SHA512:
6
- metadata.gz: 1e760e15c7956869d0eaf2f899ef411522ffe5c00db098c661d5c3b8fe899d4fd448885d45cdbdfad360eecf29d62620f39294f501ca49a0cc35829d1225d2e6
7
- data.tar.gz: 868c342ca501c5857efe73218a379559cc6569af4db5428dd96fb9f4fa68143124f666b279cd92534679263c35106dd66dabff57dee5c4e519bc59b2cdcc066e
6
+ metadata.gz: 3e0cc6b9809c80b14d01cfd1bdb35bbfc63da81f79661b86abcf938d5cea43e379f1fbb7221be050bdeeafcdc7d2f75241484ae10ecd5adbc303709c990bc0fc
7
+ data.tar.gz: f89f14706f0c8c4af1024e58d168184a9a2938e564e9f841283404ce16af7687130178838d998d17e223fbdcea28e9831bd0771034e18aa894b7fe181931c557
@@ -0,0 +1,11 @@
1
+ da:
2
+ activerecord:
3
+ errors:
4
+ models:
5
+ customer:
6
+ attributes:
7
+ vat_number:
8
+ bad_format: har et ugyldigt format
9
+ invalid_cvr_number: er et ugyldigt CVR nummer
10
+ too_long: er for kort
11
+ too_short: er for langt
@@ -0,0 +1,11 @@
1
+ en:
2
+ activerecord:
3
+ errors:
4
+ models:
5
+ customer:
6
+ attributes:
7
+ vat_number:
8
+ bad_format: has an invalid format
9
+ invalid_cvr_number: is an invalid CVR number
10
+ too_long: is too long
11
+ too_short: is too short
@@ -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
@@ -1,3 +1,3 @@
1
1
  module ValidatesCvr
2
- VERSION = "0.0.2".freeze
2
+ VERSION = "0.0.3".freeze
3
3
  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.2
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