remarkable_activemodel 4.0.0.alpha2 → 4.0.0.alpha3

Sign up to get free protection for your applications and to get access to all the features.
data/README CHANGED
@@ -48,7 +48,7 @@ All Remarkable macros can be accessed in two different ways. For those who prefe
48
48
  should_validate_presence_of :title
49
49
  end
50
50
 
51
- For those who likes more the Rspec way can simply do:
51
+ For those who likes more the RSpec way can simply do:
52
52
 
53
53
  describe Post do
54
54
  it { should validate_presence_of(:body) }
@@ -81,7 +81,7 @@ a few things:
81
81
  2. Include the matchers. Remarkable Rails gem is the responsable to add
82
82
  ActiveModel matchers to rspec. If you are not using it, you have to do:
83
83
 
84
- Remarkable.include_matchers!(Remarkable::ActiveModel, Rspec::Core::ExampleGroup)
84
+ Remarkable.include_matchers!(Remarkable::ActiveModel, RSpec::Core::ExampleGroup)
85
85
 
86
86
  This will make ActiveModel matchers available in all rspec example groups.
87
87
 
@@ -154,7 +154,7 @@ module Remarkable
154
154
  #
155
155
  # This allows a couple things from the user side:
156
156
  #
157
- # 1. Rspecify symbols in their tests:
157
+ # 1. RSpecify symbols in their tests:
158
158
  #
159
159
  # should_allow_values_for(:shirt_size, 'S', 'M', 'L', :message => :inclusion)
160
160
  #
@@ -11,4 +11,4 @@ Dir[File.join(dir, 'active_model', 'matchers', '*.rb')].each do |file|
11
11
  require file
12
12
  end
13
13
 
14
- Remarkable.include_matchers!(Remarkable::ActiveModel, Rspec::Core::ExampleGroup)
14
+ Remarkable.include_matchers!(Remarkable::ActiveModel, RSpec::Core::ExampleGroup)
data/locale/en.yml CHANGED
@@ -2,12 +2,12 @@ en:
2
2
  remarkable:
3
3
  active_model:
4
4
  describe:
5
- each: "{{key}} is {{value}}"
5
+ each: "%{key} is %{value}"
6
6
  prepend: "when "
7
7
  connector: " and "
8
8
  expectations:
9
- allow_nil: "{{subject_name}} to {{not}}allow nil values for {{attribute}}"
10
- allow_blank: "{{subject_name}} to {{not}}allow blank values for {{attribute}}"
9
+ allow_nil: "%{subject_name} to %{not}allow nil values for %{attribute}"
10
+ allow_blank: "%{subject_name} to %{not}allow blank values for %{attribute}"
11
11
  optionals:
12
12
  allow_nil:
13
13
  positive: "allowing nil values"
@@ -17,66 +17,66 @@ en:
17
17
  negative: "not allowing blank values"
18
18
 
19
19
  allow_values_for:
20
- description: "allow {{in}} as values for {{attributes}}"
20
+ description: "allow %{in} as values for %{attributes}"
21
21
  expectations:
22
- is_valid: "{{subject_name}} to be valid when {{attribute}} is set to {{value}}"
22
+ is_valid: "%{subject_name} to be valid when %{attribute} is set to %{value}"
23
23
 
24
24
  validate_acceptance_of:
25
- description: "require {{attributes}} to be accepted"
25
+ description: "require %{attributes} to be accepted"
26
26
  expectations:
27
- requires_acceptance: "{{subject_name}} to be invalid if {{attribute}} is not accepted"
28
- accept_is_valid: "{{subject_name}} to be valid when {{attribute}} is accepted with value {{accept}}"
27
+ requires_acceptance: "%{subject_name} to be invalid if %{attribute} is not accepted"
28
+ accept_is_valid: "%{subject_name} to be valid when %{attribute} is accepted with value %{accept}"
29
29
  optionals:
30
30
  accept:
31
- positive: "with value {{inspect}}"
31
+ positive: "with value %{inspect}"
32
32
 
33
33
  validate_confirmation_of:
34
- description: "require {{attributes}} to be confirmed"
34
+ description: "require %{attributes} to be confirmed"
35
35
  expectations:
36
- responds_to_confirmation: "{{subject_name}} instance responds to {{attribute}}_confirmation"
37
- confirms: "{{subject_name}} to be valid only when {{attribute}} is confirmed"
36
+ responds_to_confirmation: "%{subject_name} instance responds to %{attribute}_confirmation"
37
+ confirms: "%{subject_name} to be valid only when %{attribute} is confirmed"
38
38
 
39
39
  validate_exclusion_of:
40
- description: "ensure exclusion of {{attributes}} in {{in}}"
40
+ description: "ensure exclusion of %{attributes} in %{in}"
41
41
  expectations:
42
- is_valid: "{{subject_name}} to be valid when {{attribute}} is set to {{value}}"
43
- is_invalid: "{{subject_name}} to be invalid when {{attribute}} is set to {{value}}"
42
+ is_valid: "%{subject_name} to be valid when %{attribute} is set to %{value}"
43
+ is_invalid: "%{subject_name} to be invalid when %{attribute} is set to %{value}"
44
44
 
45
45
  validate_inclusion_of:
46
- description: "ensure inclusion of {{attributes}} in {{in}}"
46
+ description: "ensure inclusion of %{attributes} in %{in}"
47
47
  expectations:
48
- is_valid: "{{subject_name}} to be valid when {{attribute}} is set to {{value}}"
49
- is_invalid: "{{subject_name}} to be invalid when {{attribute}} is set to {{value}}"
48
+ is_valid: "%{subject_name} to be valid when %{attribute} is set to %{value}"
49
+ is_invalid: "%{subject_name} to be invalid when %{attribute} is set to %{value}"
50
50
 
51
51
  validate_length_of:
52
- description: "ensure length of {{attributes}}"
52
+ description: "ensure length of %{attributes}"
53
53
  expectations:
54
- less_than_min_length: "{{subject_name}} to be invalid when {{attribute}} length is less than {{minimum}} characters"
55
- exactly_min_length: "{{subject_name}} to be valid when {{attribute}} length is {{minimum}} characters"
56
- more_than_max_length: "{{subject_name}} to be invalid when {{attribute}} length is more than {{maximum}} characters"
57
- exactly_max_length: "{{subject_name}} to be valid when {{attribute}} length is {{maximum}} characters"
54
+ less_than_min_length: "%{subject_name} to be invalid when %{attribute} length is less than %{minimum} characters"
55
+ exactly_min_length: "%{subject_name} to be valid when %{attribute} length is %{minimum} characters"
56
+ more_than_max_length: "%{subject_name} to be invalid when %{attribute} length is more than %{maximum} characters"
57
+ exactly_max_length: "%{subject_name} to be valid when %{attribute} length is %{maximum} characters"
58
58
  optionals:
59
59
  within:
60
- positive: "is within {{inspect}} characters"
60
+ positive: "is within %{inspect} characters"
61
61
  maximum:
62
- positive: "is maximum {{inspect}} characters"
62
+ positive: "is maximum %{inspect} characters"
63
63
  minimum:
64
- positive: "is minimum {{inspect}} characters"
64
+ positive: "is minimum %{inspect} characters"
65
65
  is:
66
- positive: "is equal to {{inspect}} characters"
66
+ positive: "is equal to %{inspect} characters"
67
67
  with_kind_of:
68
- positive: "with kind of {{value}}"
68
+ positive: "with kind of %{value}"
69
69
 
70
70
  validate_numericality_of:
71
- description: "ensure numericality of {{attributes}}"
71
+ description: "ensure numericality of %{attributes}"
72
72
  expectations:
73
- only_numeric_values: "{{subject_name}} to allow only numeric values for {{attribute}}"
74
- only_integer: "{{subject_name}} to {{not}}allow only integer values for {{attribute}}"
75
- only_even: "{{subject_name}} to allow only even values for {{attribute}}"
76
- only_odd: "{{subject_name}} to allow only odd values for {{attribute}}"
77
- equals_to: "{{subject_name}} to be valid only when {{attribute}} is equal to {{count}}"
78
- more_than_maximum: "{{subject_name}} to be invalid when {{attribute}} is greater than {{count}}"
79
- less_than_minimum: "{{subject_name}} to be invalid when {{attribute}} is less than {{count}}"
73
+ only_numeric_values: "%{subject_name} to allow only numeric values for %{attribute}"
74
+ only_integer: "%{subject_name} to %{not}allow only integer values for %{attribute}"
75
+ only_even: "%{subject_name} to allow only even values for %{attribute}"
76
+ only_odd: "%{subject_name} to allow only odd values for %{attribute}"
77
+ equals_to: "%{subject_name} to be valid only when %{attribute} is equal to %{count}"
78
+ more_than_maximum: "%{subject_name} to be invalid when %{attribute} is greater than %{count}"
79
+ less_than_minimum: "%{subject_name} to be invalid when %{attribute} is less than %{count}"
80
80
  optionals:
81
81
  only_integer:
82
82
  positive: "allowing only integer values"
@@ -85,31 +85,31 @@ en:
85
85
  even:
86
86
  positive: "allowing only even values"
87
87
  equal_to:
88
- positive: "is equal to {{inspect}}"
88
+ positive: "is equal to %{inspect}"
89
89
  less_than:
90
- positive: "is less than {{inspect}}"
90
+ positive: "is less than %{inspect}"
91
91
  greater_than:
92
- positive: "is greater than {{inspect}}"
92
+ positive: "is greater than %{inspect}"
93
93
  less_than_or_equal_to:
94
- positive: "is less than or equal to {{inspect}}"
94
+ positive: "is less than or equal to %{inspect}"
95
95
  greater_than_or_equal_to:
96
- positive: "is greater than or equal to {{inspect}}"
96
+ positive: "is greater than or equal to %{inspect}"
97
97
 
98
98
  validate_presence_of:
99
- description: "require {{attributes}} to be set"
99
+ description: "require %{attributes} to be set"
100
100
  expectations:
101
- allow_nil: "{{subject_name}} to require {{attribute}} to be set"
101
+ allow_nil: "%{subject_name} to require %{attribute} to be set"
102
102
 
103
103
  validate_uniqueness_of:
104
- description: "require unique values for {{attributes}}"
104
+ description: "require unique values for %{attributes}"
105
105
  expectations:
106
- responds_to_scope: "{{subject_name}} instance responds to {{method}}"
107
- is_unique: "{{subject_name}} to require unique values for {{attribute}}"
108
- case_sensitive: "{{subject_name}} to {{not}}be case sensitive on {{attribute}} validation"
109
- valid_with_new_scope: "{{subject_name}} to be valid when {{attribute}} scope ({{method}}) change"
106
+ responds_to_scope: "%{subject_name} instance responds to %{method}"
107
+ is_unique: "%{subject_name} to require unique values for %{attribute}"
108
+ case_sensitive: "%{subject_name} to %{not}be case sensitive on %{attribute} validation"
109
+ valid_with_new_scope: "%{subject_name} to be valid when %{attribute} scope (%{method}) change"
110
110
  optionals:
111
111
  scope:
112
- positive: "scoped to {{sentence}}"
112
+ positive: "scoped to %{sentence}"
113
113
  case_sensitive:
114
114
  positive: "case sensitive"
115
115
  negative: "case insensitive"
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{remarkable_activemodel}
8
- s.version = "4.0.0.alpha2"
8
+ s.version = "4.0.0.alpha3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ho-Sheng Hsiao", "Carlos Brando", "Jos\303\251 Valim", "Diego Carrion"]
12
- s.date = %q{2010-05-26}
12
+ s.date = %q{2010-06-08}
13
13
  s.description = %q{Remarkable ActiveModel: collection of matchers and macros with I18n for ActiveModel}
14
14
  s.email = ["hosh@sparkfly.com", "eduardobrando@gmail.com", "jose.valim@gmail.com", "dc.rec1@gmail.com"]
15
15
  s.extra_rdoc_files = [
@@ -47,15 +47,15 @@ Gem::Specification.new do |s|
47
47
  s.specification_version = 3
48
48
 
49
49
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
50
- s.add_runtime_dependency(%q<rspec>, [">= 2.0.0.alpha8"])
51
- s.add_runtime_dependency(%q<remarkable>, ["~> 4.0.0.alpha2"])
50
+ s.add_runtime_dependency(%q<rspec>, [">= 2.0.0.alpha11"])
51
+ s.add_runtime_dependency(%q<remarkable>, ["~> 4.0.0.alpha3"])
52
52
  else
53
- s.add_dependency(%q<rspec>, [">= 2.0.0.alpha8"])
54
- s.add_dependency(%q<remarkable>, ["~> 4.0.0.alpha2"])
53
+ s.add_dependency(%q<rspec>, [">= 2.0.0.alpha11"])
54
+ s.add_dependency(%q<remarkable>, ["~> 4.0.0.alpha3"])
55
55
  end
56
56
  else
57
- s.add_dependency(%q<rspec>, [">= 2.0.0.alpha8"])
58
- s.add_dependency(%q<remarkable>, ["~> 4.0.0.alpha2"])
57
+ s.add_dependency(%q<rspec>, [">= 2.0.0.alpha11"])
58
+ s.add_dependency(%q<remarkable>, ["~> 4.0.0.alpha3"])
59
59
  end
60
60
  end
61
61
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: remarkable_activemodel
3
3
  version: !ruby/object:Gem::Version
4
- hash: -1710980496
4
+ hash: -1710980495
5
5
  prerelease: true
6
6
  segments:
7
7
  - 4
8
8
  - 0
9
9
  - 0
10
- - alpha2
11
- version: 4.0.0.alpha2
10
+ - alpha3
11
+ version: 4.0.0.alpha3
12
12
  platform: ruby
13
13
  authors:
14
14
  - Ho-Sheng Hsiao
@@ -19,7 +19,7 @@ autorequire:
19
19
  bindir: bin
20
20
  cert_chain: []
21
21
 
22
- date: 2010-05-26 00:00:00 -04:00
22
+ date: 2010-06-08 00:00:00 -04:00
23
23
  default_executable:
24
24
  dependencies:
25
25
  - !ruby/object:Gem::Dependency
@@ -30,13 +30,13 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- hash: -1710980374
33
+ hash: 1369027956
34
34
  segments:
35
35
  - 2
36
36
  - 0
37
37
  - 0
38
- - alpha8
39
- version: 2.0.0.alpha8
38
+ - alpha11
39
+ version: 2.0.0.alpha11
40
40
  type: :runtime
41
41
  version_requirements: *id001
42
42
  - !ruby/object:Gem::Dependency
@@ -47,13 +47,13 @@ dependencies:
47
47
  requirements:
48
48
  - - ~>
49
49
  - !ruby/object:Gem::Version
50
- hash: -1710980496
50
+ hash: -1710980495
51
51
  segments:
52
52
  - 4
53
53
  - 0
54
54
  - 0
55
- - alpha2
56
- version: 4.0.0.alpha2
55
+ - alpha3
56
+ version: 4.0.0.alpha3
57
57
  type: :runtime
58
58
  version_requirements: *id002
59
59
  description: "Remarkable ActiveModel: collection of matchers and macros with I18n for ActiveModel"