levtera 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/levtera.gemspec +2 -0
- data/lib/levtera/concerns/make.rb +1 -0
- data/lib/levtera/concerns/model.rb +1 -0
- data/lib/levtera/concerns/provided.rb +0 -2
- data/lib/levtera/concerns/vehicle.rb +1 -0
- data/lib/levtera/concerns/version.rb +1 -0
- data/lib/levtera/version.rb +1 -1
- data/spec/support/example_groups/make_groups.rb +1 -0
- data/spec/support/example_groups/model_groups.rb +1 -0
- data/spec/support/example_groups/provided_groups.rb +1 -1
- data/spec/support/example_groups/vehicle_groups.rb +1 -0
- data/spec/support/example_groups/version_groups.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e59f3fae8fb19e7da23d43b9749b8ce9f1e1bca2
|
4
|
+
data.tar.gz: b4d98e4f0a9882ac6fad30e4783323ed63d734e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3caf8a483f32ec443a5b008c94e3b1f3f83ddb4a07b043e8c9e5f782dcbbb4dc814828c845ab2eec52c55d7337ff8e1349944aa2a46d7dd5c54d7ca7677f7e9d
|
7
|
+
data.tar.gz: 55242836efeb8e7a0f8168eb0f3275a0ed770003e771cfd22bac89d412284960b60d592a0ba3cc2a3eb46c55dada34f3f1c9a27ed649ac7907224adecb5cece2
|
data/Gemfile.lock
CHANGED
data/levtera.gemspec
CHANGED
@@ -30,6 +30,7 @@ module Levtera::Concerns
|
|
30
30
|
# validates :valves_amounts , numericality: { only_integer: true, allow_nil: true, greater_than: 0 }
|
31
31
|
# validates :body_types , inclusion: { in: BODY_TYPES }
|
32
32
|
# validates :transmission_types , inclusion: { in: TRANSMISSION_TYPES }
|
33
|
+
validates :provider_id, uniqueness: { allow_nil: true, scope: :model_id }
|
33
34
|
end
|
34
35
|
end
|
35
36
|
end
|
data/lib/levtera/version.rb
CHANGED
@@ -4,5 +4,6 @@ shared_examples :levtera_vehicle do
|
|
4
4
|
it { should validate_numericality_of(:fabrication_year).to_allow only_integer: true, allow_nil: true, greater_than: 0 }
|
5
5
|
it { should validate_numericality_of(:model_year).to_allow only_integer: true, allow_nil: true, greater_than: 0 }
|
6
6
|
it { should validate_inclusion_of(:engine_feeding).on(Levtera::Concerns::Vehicle::ENGINE_FEEDINGS_NAMES) }
|
7
|
+
it { should validate_uniqueness_of(:provider_id).scoped_to(:version_id) }
|
7
8
|
|
8
9
|
end
|
@@ -8,6 +8,7 @@ shared_examples :levtera_version do
|
|
8
8
|
# it { should validate_numericality_of(:valves_amount).to_allow only_integer: true, allow_nil: true, greater_than: 0 }
|
9
9
|
# it { should validate_inclusion_of(:transmission_type).on(Levtera::Concerns::Version::TRANSMISSION_TYPES) }
|
10
10
|
# it { should validate_inclusion_of(:body_type).on(Levtera::Concerns::Version::BODY_TYPES) }
|
11
|
+
it { should validate_uniqueness_of(:provider_id).scoped_to(:model_id) }
|
11
12
|
end
|
12
13
|
|
13
14
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: levtera
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Heitor Salazar Baldelli
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|