dm-validations-i18n 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- data/.gemtest +0 -0
- data/.gitignore +4 -0
- data/.travis.yml +5 -0
- data/Gemfile +2 -9
- data/Gemfile.lock +12 -24
- data/{README.rdoc → README.md} +7 -7
- data/Rakefile +4 -38
- data/dm-validations-i18n.gemspec +17 -72
- data/lib/data_mapper/validations/i18n/version.rb +7 -0
- data/lib/data_mapper/validations/i18n.rb +97 -0
- data/lib/dm-validations-i18n.rb +2 -96
- metadata +48 -150
- data/.document +0 -5
- data/VERSION +0 -1
data/.gemtest
ADDED
File without changes
|
data/.gitignore
ADDED
data/Gemfile
CHANGED
@@ -1,11 +1,4 @@
|
|
1
1
|
source "http://rubygems.org"
|
2
2
|
|
3
|
-
gem
|
4
|
-
|
5
|
-
group :development do
|
6
|
-
gem "shoulda", ">= 2.11.3"
|
7
|
-
gem "bundler", "~> 1.0.0"
|
8
|
-
gem "jeweler", "~> 1.5.2"
|
9
|
-
gem "rcov", ">= 0"
|
10
|
-
gem 'guard-test'
|
11
|
-
end
|
3
|
+
# Specify your gem's dependencies in dm-validations-i18n.gemspec
|
4
|
+
gemspec
|
data/Gemfile.lock
CHANGED
@@ -1,34 +1,22 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
dm-validations-i18n (0.3.4)
|
5
|
+
dm-validations (~> 1.2.0)
|
6
|
+
|
1
7
|
GEM
|
2
8
|
remote: http://rubygems.org/
|
3
9
|
specs:
|
4
10
|
addressable (2.2.6)
|
5
|
-
dm-core (1.
|
6
|
-
addressable (~> 2.2.
|
7
|
-
dm-validations (1.
|
8
|
-
dm-core (~> 1.
|
9
|
-
git (1.2.5)
|
10
|
-
guard (0.5.1)
|
11
|
-
thor (~> 0.14.6)
|
12
|
-
guard-test (0.3.0)
|
13
|
-
guard (>= 0.2.2)
|
14
|
-
test-unit (~> 2.2)
|
15
|
-
jeweler (1.5.2)
|
16
|
-
bundler (~> 1.0.0)
|
17
|
-
git (>= 1.2.5)
|
18
|
-
rake
|
19
|
-
rake (0.9.2)
|
20
|
-
rcov (0.9.9)
|
11
|
+
dm-core (1.2.0)
|
12
|
+
addressable (~> 2.2.6)
|
13
|
+
dm-validations (1.2.0)
|
14
|
+
dm-core (~> 1.2.0)
|
21
15
|
shoulda (2.11.3)
|
22
|
-
test-unit (2.3.0)
|
23
|
-
thor (0.14.6)
|
24
16
|
|
25
17
|
PLATFORMS
|
26
18
|
ruby
|
27
19
|
|
28
20
|
DEPENDENCIES
|
29
|
-
|
30
|
-
|
31
|
-
guard-test
|
32
|
-
jeweler (~> 1.5.2)
|
33
|
-
rcov
|
34
|
-
shoulda (>= 2.11.3)
|
21
|
+
dm-validations-i18n!
|
22
|
+
shoulda (~> 2.11.3)
|
data/{README.rdoc → README.md}
RENAMED
@@ -1,14 +1,14 @@
|
|
1
|
-
|
1
|
+
# dm-validations-i18n [<img src="https://secure.travis-ci.org/komagata/dm-validations-i18n.png"/>](http://travis-ci.org/komagata/dm-validations-i18n)
|
2
2
|
|
3
3
|
Localize error messages in dm-validations.
|
4
4
|
|
5
|
-
|
5
|
+
## Usage
|
6
6
|
|
7
|
-
|
8
|
-
|
7
|
+
require 'dm-validations-i18n'
|
8
|
+
DataMapper::Validations::I18n.localize! 'ja'
|
9
|
+
|
10
|
+
## Note on Patches/Pull Requests
|
9
11
|
|
10
|
-
== Note on Patches/Pull Requests
|
11
|
-
|
12
12
|
* Fork the project.
|
13
13
|
* Make your feature addition or bug fix.
|
14
14
|
* Add tests for it. This is important so I don't break it in a
|
@@ -17,6 +17,6 @@ Localize error messages in dm-validations.
|
|
17
17
|
(if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
|
18
18
|
* Send me a pull request. Bonus points for topic branches.
|
19
19
|
|
20
|
-
|
20
|
+
## Copyright
|
21
21
|
|
22
22
|
Copyright (c) 2010 Masaki KOMAGATA. See LICENSE for details.
|
data/Rakefile
CHANGED
@@ -1,31 +1,4 @@
|
|
1
|
-
require
|
2
|
-
require 'bundler'
|
3
|
-
begin
|
4
|
-
Bundler.setup(:default, :development)
|
5
|
-
rescue Bundler::BundlerError => e
|
6
|
-
$stderr.puts e.message
|
7
|
-
$stderr.puts "Run `bundle install` to install missing gems"
|
8
|
-
exit e.status_code
|
9
|
-
end
|
10
|
-
require 'rake'
|
11
|
-
|
12
|
-
require 'jeweler'
|
13
|
-
Jeweler::Tasks.new do |gem|
|
14
|
-
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
15
|
-
gem.name = "dm-validations-i18n"
|
16
|
-
gem.homepage = "http://github.com/komagata/dm-validations-i18n"
|
17
|
-
gem.license = "MIT"
|
18
|
-
gem.summary = %Q{localize dm-validations}
|
19
|
-
gem.description = %Q{Localize error messages in dm-validations.}
|
20
|
-
gem.email = "komagata@gmail.com"
|
21
|
-
gem.authors = ["Masaki Komagata"]
|
22
|
-
# Include your dependencies below. Runtime dependencies are required when using your gem,
|
23
|
-
# and development dependencies are only needed for development (ie running rake tasks, tests, etc)
|
24
|
-
gem.add_runtime_dependency 'dm-validations', '>= 1.0.2'
|
25
|
-
# gem.add_development_dependency 'rspec', '> 1.2.3'
|
26
|
-
end
|
27
|
-
Jeweler::RubygemsDotOrgTasks.new
|
28
|
-
|
1
|
+
require "bundler/gem_tasks"
|
29
2
|
require 'rake/testtask'
|
30
3
|
Rake::TestTask.new(:test) do |test|
|
31
4
|
test.libs << 'lib' << 'test'
|
@@ -33,19 +6,12 @@ Rake::TestTask.new(:test) do |test|
|
|
33
6
|
test.verbose = true
|
34
7
|
end
|
35
8
|
|
36
|
-
require 'rcov/rcovtask'
|
37
|
-
Rcov::RcovTask.new do |test|
|
38
|
-
test.libs << 'test'
|
39
|
-
test.pattern = 'test/**/test_*.rb'
|
40
|
-
test.verbose = true
|
41
|
-
end
|
42
|
-
|
43
9
|
task :default => :test
|
44
10
|
|
45
|
-
require '
|
11
|
+
require 'rdoc/task'
|
12
|
+
require 'data_mapper/validations/i18n/version'
|
46
13
|
Rake::RDocTask.new do |rdoc|
|
47
|
-
version =
|
48
|
-
|
14
|
+
version = DataMapper::Validations::I18n::VERSION
|
49
15
|
rdoc.rdoc_dir = 'rdoc'
|
50
16
|
rdoc.title = "dm-validations-i18n #{version}"
|
51
17
|
rdoc.rdoc_files.include('README*')
|
data/dm-validations-i18n.gemspec
CHANGED
@@ -1,79 +1,24 @@
|
|
1
|
-
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
1
|
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "data_mapper/validations/i18n"
|
4
|
+
require "data_mapper/validations/i18n/version"
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
|
-
s.name
|
8
|
-
s.version
|
9
|
-
|
10
|
-
s.
|
11
|
-
s.
|
12
|
-
s.
|
7
|
+
s.name = "dm-validations-i18n"
|
8
|
+
s.version = DataMapper::Validations::I18n::VERSION
|
9
|
+
s.authors = ["Masaki Komagata"]
|
10
|
+
s.email = ["komagata@gmail.com"]
|
11
|
+
s.homepage = "https://github.com/komagata/dm-validations-i18n"
|
12
|
+
s.summary = %q{Localize error messages in dm-validations.}
|
13
13
|
s.description = %q{Localize error messages in dm-validations.}
|
14
|
-
s.email = %q{komagata@gmail.com}
|
15
|
-
s.extra_rdoc_files = [
|
16
|
-
"LICENSE",
|
17
|
-
"README.rdoc"
|
18
|
-
]
|
19
|
-
s.files = [
|
20
|
-
".document",
|
21
|
-
"Gemfile",
|
22
|
-
"Gemfile.lock",
|
23
|
-
"LICENSE",
|
24
|
-
"README.rdoc",
|
25
|
-
"Rakefile",
|
26
|
-
"VERSION",
|
27
|
-
"dm-validations-i18n.gemspec",
|
28
|
-
"lib/class.rb",
|
29
|
-
"lib/dm-validations-i18n.rb",
|
30
|
-
"locale/en.yml",
|
31
|
-
"locale/it.yml",
|
32
|
-
"locale/ja.yml",
|
33
|
-
"locale/ru.yml",
|
34
|
-
"locale/zh-CN.yml",
|
35
|
-
"locale/zh-TW.yml",
|
36
|
-
"test/helper.rb",
|
37
|
-
"test/test_dm-validations-i18n.rb"
|
38
|
-
]
|
39
|
-
s.homepage = %q{http://github.com/komagata/dm-validations-i18n}
|
40
|
-
s.licenses = ["MIT"]
|
41
|
-
s.require_paths = ["lib"]
|
42
|
-
s.rubygems_version = %q{1.4.2}
|
43
|
-
s.summary = %q{localize dm-validations}
|
44
|
-
s.test_files = [
|
45
|
-
"test/helper.rb",
|
46
|
-
"test/test_dm-validations-i18n.rb"
|
47
|
-
]
|
48
14
|
|
49
|
-
|
50
|
-
s.specification_version = 3
|
15
|
+
s.rubyforge_project = "dm-validations-i18n"
|
51
16
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
|
57
|
-
s.add_development_dependency(%q<rcov>, [">= 0"])
|
58
|
-
s.add_development_dependency(%q<guard-test>, [">= 0"])
|
59
|
-
s.add_runtime_dependency(%q<dm-validations>, [">= 1.0.2"])
|
60
|
-
else
|
61
|
-
s.add_dependency(%q<dm-validations>, [">= 1.0.2"])
|
62
|
-
s.add_dependency(%q<shoulda>, [">= 2.11.3"])
|
63
|
-
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
64
|
-
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
65
|
-
s.add_dependency(%q<rcov>, [">= 0"])
|
66
|
-
s.add_dependency(%q<guard-test>, [">= 0"])
|
67
|
-
s.add_dependency(%q<dm-validations>, [">= 1.0.2"])
|
68
|
-
end
|
69
|
-
else
|
70
|
-
s.add_dependency(%q<dm-validations>, [">= 1.0.2"])
|
71
|
-
s.add_dependency(%q<shoulda>, [">= 2.11.3"])
|
72
|
-
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
73
|
-
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
74
|
-
s.add_dependency(%q<rcov>, [">= 0"])
|
75
|
-
s.add_dependency(%q<guard-test>, [">= 0"])
|
76
|
-
s.add_dependency(%q<dm-validations>, [">= 1.0.2"])
|
77
|
-
end
|
78
|
-
end
|
17
|
+
s.files = `git ls-files`.split("\n")
|
18
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
19
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
20
|
+
s.require_paths = ["lib"]
|
79
21
|
|
22
|
+
s.add_development_dependency "shoulda", "~> 2.11.3"
|
23
|
+
s.add_runtime_dependency "dm-validations", "~> 1.2.0"
|
24
|
+
end
|
@@ -0,0 +1,97 @@
|
|
1
|
+
require 'dm-validations'
|
2
|
+
require 'yaml'
|
3
|
+
require 'class'
|
4
|
+
require 'data_mapper/validations/i18n/version'
|
5
|
+
|
6
|
+
module DataMapper
|
7
|
+
module Validations
|
8
|
+
module I18n
|
9
|
+
class << self
|
10
|
+
cattr_accessor :locale
|
11
|
+
cattr_accessor :field_name_translator
|
12
|
+
|
13
|
+
def localize!(locale)
|
14
|
+
self.locale = locale
|
15
|
+
|
16
|
+
data = {}
|
17
|
+
load_locale(locale).each do |key, value|
|
18
|
+
data[key.to_sym] = value
|
19
|
+
end
|
20
|
+
DataMapper::Validations::ValidationErrors.default_error_messages = data
|
21
|
+
end
|
22
|
+
|
23
|
+
def translate_field_name_with(x = nil, &cb)
|
24
|
+
self.field_name_translator =
|
25
|
+
if (!x && cb)
|
26
|
+
FieldNameTranslator::Callback.new(self, &cb)
|
27
|
+
elsif (x.is_a? Hash)
|
28
|
+
FieldNameTranslator::Hash.new(self, x)
|
29
|
+
elsif (x == :rails)
|
30
|
+
FieldNameTranslator::Rails.new(self)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def load_locale(locale)
|
35
|
+
load_yml File.join(File.dirname(__FILE__), '..', '..', '..', 'locale', "#{locale}.yml")
|
36
|
+
end
|
37
|
+
|
38
|
+
def load_yml(filename)
|
39
|
+
YAML::load IO.read(filename)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
module FieldNameTranslator
|
45
|
+
class Callback
|
46
|
+
attr_accessor :context, :callback
|
47
|
+
|
48
|
+
def initialize(context, &cb)
|
49
|
+
self.context = context
|
50
|
+
self.callback = cb
|
51
|
+
end
|
52
|
+
|
53
|
+
def translate(field)
|
54
|
+
self.callback.call(field)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
class Hash < Callback
|
59
|
+
def initialize(context, x)
|
60
|
+
dict = x[context.locale]
|
61
|
+
|
62
|
+
self.context = context
|
63
|
+
self.callback = lambda do |field|
|
64
|
+
dict[field.to_s] || field
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
class Rails < Callback
|
70
|
+
def initialize(context)
|
71
|
+
self.context = context
|
72
|
+
self.callback = lambda do |field|
|
73
|
+
::I18n.t(field)
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
class DataMapper::Validations::ValidationErrors
|
82
|
+
class << self
|
83
|
+
def default_error_message_with_localized_field_name(key, field, *values)
|
84
|
+
translator = DataMapper::Validations::I18n.field_name_translator
|
85
|
+
|
86
|
+
if translator
|
87
|
+
field = translator.translate(field)
|
88
|
+
end
|
89
|
+
|
90
|
+
@@default_error_messages[key] % [field, *values].flatten
|
91
|
+
end
|
92
|
+
|
93
|
+
alias :default_error_message_without_localized_field_name :default_error_message
|
94
|
+
alias :default_error_message :default_error_message_with_localized_field_name
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
data/lib/dm-validations-i18n.rb
CHANGED
@@ -1,96 +1,2 @@
|
|
1
|
-
require '
|
2
|
-
require '
|
3
|
-
require 'class'
|
4
|
-
|
5
|
-
module DataMapper
|
6
|
-
module Validations
|
7
|
-
module I18n
|
8
|
-
class << self
|
9
|
-
cattr_accessor :locale
|
10
|
-
cattr_accessor :field_name_translator
|
11
|
-
|
12
|
-
def localize!(locale)
|
13
|
-
self.locale = locale
|
14
|
-
|
15
|
-
data = {}
|
16
|
-
load_locale(locale).each do |key, value|
|
17
|
-
data[key.to_sym] = value
|
18
|
-
end
|
19
|
-
DataMapper::Validations::ValidationErrors.default_error_messages = data
|
20
|
-
end
|
21
|
-
|
22
|
-
def translate_field_name_with(x = nil, &cb)
|
23
|
-
self.field_name_translator =
|
24
|
-
if (!x && cb)
|
25
|
-
FieldNameTranslator::Callback.new(self, &cb)
|
26
|
-
elsif (x.is_a? Hash)
|
27
|
-
FieldNameTranslator::Hash.new(self, x)
|
28
|
-
elsif (x == :rails)
|
29
|
-
FieldNameTranslator::Rails.new(self)
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
def load_locale(locale)
|
34
|
-
load_yml File.join(File.dirname(__FILE__), '..', 'locale', "#{locale}.yml")
|
35
|
-
end
|
36
|
-
|
37
|
-
def load_yml(filename)
|
38
|
-
YAML::load IO.read(filename)
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
|
-
module FieldNameTranslator
|
44
|
-
class Callback
|
45
|
-
attr_accessor :context, :callback
|
46
|
-
|
47
|
-
def initialize(context, &cb)
|
48
|
-
self.context = context
|
49
|
-
self.callback = cb
|
50
|
-
end
|
51
|
-
|
52
|
-
def translate(field)
|
53
|
-
self.callback.call(field)
|
54
|
-
end
|
55
|
-
end
|
56
|
-
|
57
|
-
class Hash < Callback
|
58
|
-
def initialize(context, x)
|
59
|
-
dict = x[context.locale]
|
60
|
-
|
61
|
-
self.context = context
|
62
|
-
self.callback = lambda do |field|
|
63
|
-
dict[field.to_s] || field
|
64
|
-
end
|
65
|
-
end
|
66
|
-
end
|
67
|
-
|
68
|
-
class Rails < Callback
|
69
|
-
def initialize(context)
|
70
|
-
self.context = context
|
71
|
-
self.callback = lambda do |field|
|
72
|
-
::I18n.t(field)
|
73
|
-
end
|
74
|
-
end
|
75
|
-
end
|
76
|
-
end
|
77
|
-
end
|
78
|
-
end
|
79
|
-
|
80
|
-
class DataMapper::Validations::ValidationErrors
|
81
|
-
class << self
|
82
|
-
def default_error_message_with_localized_field_name(key, field, *values)
|
83
|
-
translator = DataMapper::Validations::I18n.field_name_translator
|
84
|
-
|
85
|
-
if translator
|
86
|
-
field = translator.translate(field)
|
87
|
-
end
|
88
|
-
|
89
|
-
@@default_error_messages[key] % [field, *values].flatten
|
90
|
-
end
|
91
|
-
|
92
|
-
alias :default_error_message_without_localized_field_name :default_error_message
|
93
|
-
alias :default_error_message :default_error_message_with_localized_field_name
|
94
|
-
end
|
95
|
-
end
|
96
|
-
|
1
|
+
require 'data_mapper/validations/i18n'
|
2
|
+
require 'data_mapper/validations/i18n/version'
|
metadata
CHANGED
@@ -1,150 +1,57 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: dm-validations-i18n
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.3.4
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 3
|
9
|
-
- 3
|
10
|
-
version: 0.3.3
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Masaki Komagata
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
dependencies:
|
21
|
-
- !ruby/object:Gem::Dependency
|
22
|
-
prerelease: false
|
23
|
-
name: dm-validations
|
24
|
-
type: :runtime
|
25
|
-
version_requirements: &id001 !ruby/object:Gem::Requirement
|
26
|
-
none: false
|
27
|
-
requirements:
|
28
|
-
- - ">="
|
29
|
-
- !ruby/object:Gem::Version
|
30
|
-
hash: 19
|
31
|
-
segments:
|
32
|
-
- 1
|
33
|
-
- 0
|
34
|
-
- 2
|
35
|
-
version: 1.0.2
|
36
|
-
requirement: *id001
|
37
|
-
- !ruby/object:Gem::Dependency
|
38
|
-
prerelease: false
|
12
|
+
date: 2011-12-05 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
39
15
|
name: shoulda
|
40
|
-
|
41
|
-
version_requirements: &id002 !ruby/object:Gem::Requirement
|
16
|
+
requirement: &70288092935040 !ruby/object:Gem::Requirement
|
42
17
|
none: false
|
43
|
-
requirements:
|
44
|
-
- -
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
hash: 37
|
47
|
-
segments:
|
48
|
-
- 2
|
49
|
-
- 11
|
50
|
-
- 3
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
51
21
|
version: 2.11.3
|
52
|
-
requirement: *id002
|
53
|
-
- !ruby/object:Gem::Dependency
|
54
|
-
prerelease: false
|
55
|
-
name: bundler
|
56
22
|
type: :development
|
57
|
-
version_requirements: &id003 !ruby/object:Gem::Requirement
|
58
|
-
none: false
|
59
|
-
requirements:
|
60
|
-
- - ~>
|
61
|
-
- !ruby/object:Gem::Version
|
62
|
-
hash: 23
|
63
|
-
segments:
|
64
|
-
- 1
|
65
|
-
- 0
|
66
|
-
- 0
|
67
|
-
version: 1.0.0
|
68
|
-
requirement: *id003
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
23
|
prerelease: false
|
71
|
-
|
72
|
-
|
73
|
-
|
24
|
+
version_requirements: *70288092935040
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: dm-validations
|
27
|
+
requirement: &70288092933960 !ruby/object:Gem::Requirement
|
74
28
|
none: false
|
75
|
-
requirements:
|
29
|
+
requirements:
|
76
30
|
- - ~>
|
77
|
-
- !ruby/object:Gem::Version
|
78
|
-
|
79
|
-
segments:
|
80
|
-
- 1
|
81
|
-
- 5
|
82
|
-
- 2
|
83
|
-
version: 1.5.2
|
84
|
-
requirement: *id004
|
85
|
-
- !ruby/object:Gem::Dependency
|
86
|
-
prerelease: false
|
87
|
-
name: rcov
|
88
|
-
type: :development
|
89
|
-
version_requirements: &id005 !ruby/object:Gem::Requirement
|
90
|
-
none: false
|
91
|
-
requirements:
|
92
|
-
- - ">="
|
93
|
-
- !ruby/object:Gem::Version
|
94
|
-
hash: 3
|
95
|
-
segments:
|
96
|
-
- 0
|
97
|
-
version: "0"
|
98
|
-
requirement: *id005
|
99
|
-
- !ruby/object:Gem::Dependency
|
100
|
-
prerelease: false
|
101
|
-
name: guard-test
|
102
|
-
type: :development
|
103
|
-
version_requirements: &id006 !ruby/object:Gem::Requirement
|
104
|
-
none: false
|
105
|
-
requirements:
|
106
|
-
- - ">="
|
107
|
-
- !ruby/object:Gem::Version
|
108
|
-
hash: 3
|
109
|
-
segments:
|
110
|
-
- 0
|
111
|
-
version: "0"
|
112
|
-
requirement: *id006
|
113
|
-
- !ruby/object:Gem::Dependency
|
114
|
-
prerelease: false
|
115
|
-
name: dm-validations
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 1.2.0
|
116
33
|
type: :runtime
|
117
|
-
|
118
|
-
|
119
|
-
requirements:
|
120
|
-
- - ">="
|
121
|
-
- !ruby/object:Gem::Version
|
122
|
-
hash: 19
|
123
|
-
segments:
|
124
|
-
- 1
|
125
|
-
- 0
|
126
|
-
- 2
|
127
|
-
version: 1.0.2
|
128
|
-
requirement: *id007
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *70288092933960
|
129
36
|
description: Localize error messages in dm-validations.
|
130
|
-
email:
|
37
|
+
email:
|
38
|
+
- komagata@gmail.com
|
131
39
|
executables: []
|
132
|
-
|
133
40
|
extensions: []
|
134
|
-
|
135
|
-
|
136
|
-
-
|
137
|
-
-
|
138
|
-
|
139
|
-
- .document
|
41
|
+
extra_rdoc_files: []
|
42
|
+
files:
|
43
|
+
- .gemtest
|
44
|
+
- .gitignore
|
45
|
+
- .travis.yml
|
140
46
|
- Gemfile
|
141
47
|
- Gemfile.lock
|
142
48
|
- LICENSE
|
143
|
-
- README.
|
49
|
+
- README.md
|
144
50
|
- Rakefile
|
145
|
-
- VERSION
|
146
51
|
- dm-validations-i18n.gemspec
|
147
52
|
- lib/class.rb
|
53
|
+
- lib/data_mapper/validations/i18n.rb
|
54
|
+
- lib/data_mapper/validations/i18n/version.rb
|
148
55
|
- lib/dm-validations-i18n.rb
|
149
56
|
- locale/en.yml
|
150
57
|
- locale/it.yml
|
@@ -154,40 +61,31 @@ files:
|
|
154
61
|
- locale/zh-TW.yml
|
155
62
|
- test/helper.rb
|
156
63
|
- test/test_dm-validations-i18n.rb
|
157
|
-
|
158
|
-
|
159
|
-
licenses:
|
160
|
-
- MIT
|
64
|
+
homepage: https://github.com/komagata/dm-validations-i18n
|
65
|
+
licenses: []
|
161
66
|
post_install_message:
|
162
67
|
rdoc_options: []
|
163
|
-
|
164
|
-
require_paths:
|
68
|
+
require_paths:
|
165
69
|
- lib
|
166
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
70
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
167
71
|
none: false
|
168
|
-
requirements:
|
169
|
-
- -
|
170
|
-
- !ruby/object:Gem::Version
|
171
|
-
|
172
|
-
|
173
|
-
- 0
|
174
|
-
version: "0"
|
175
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ! '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
176
77
|
none: false
|
177
|
-
requirements:
|
178
|
-
- -
|
179
|
-
- !ruby/object:Gem::Version
|
180
|
-
|
181
|
-
segments:
|
182
|
-
- 0
|
183
|
-
version: "0"
|
78
|
+
requirements:
|
79
|
+
- - ! '>='
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '0'
|
184
82
|
requirements: []
|
185
|
-
|
186
|
-
|
187
|
-
rubygems_version: 1.4.2
|
83
|
+
rubyforge_project: dm-validations-i18n
|
84
|
+
rubygems_version: 1.8.10
|
188
85
|
signing_key:
|
189
86
|
specification_version: 3
|
190
|
-
summary:
|
191
|
-
test_files:
|
87
|
+
summary: Localize error messages in dm-validations.
|
88
|
+
test_files:
|
192
89
|
- test/helper.rb
|
193
90
|
- test/test_dm-validations-i18n.rb
|
91
|
+
has_rdoc:
|
data/.document
DELETED
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0.3.3
|