mv-core 2.2.1 → 2.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +4 -0
- data/lib/mv/core/validation/base.rb +8 -8
- 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: 0a01c36b1e328430b27a0d5b565592f87b8399c0
|
4
|
+
data.tar.gz: 1a7afd2f49ba84f87885354ec4a0f94796e32011
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3854f1d68ce8e5c9e44e9004fbce93477d01124c5b97f908f02501cd2a48acaa9dea1ca5df58050f63cf5ee5bf0876d03c5f54eb24481d946f34bf1b48e3bef8
|
7
|
+
data.tar.gz: d27fa5f1e151a9946b444347d2bcf2fd8a9e4c7fe2a5f62f4a6310e86a0e0e43082918076c36814da21a8bbfdf36b2785cf228aabab2e5c4a959270eee06527a
|
data/README.md
CHANGED
@@ -354,6 +354,10 @@ So - see detailed info here:
|
|
354
354
|
|
355
355
|
* Fix issue with invalid parameters number in `add_column` and `change_column` methods
|
356
356
|
|
357
|
+
**(2.2.2)** (23 Nov, 2015)
|
358
|
+
|
359
|
+
* Do not camel case column name in error message
|
360
|
+
|
357
361
|
## Contributing
|
358
362
|
|
359
363
|
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
|
@@ -5,7 +5,7 @@ module Mv
|
|
5
5
|
include Comparable
|
6
6
|
include ActiveModel::Validations
|
7
7
|
|
8
|
-
attr_reader :table_name, :column_name, :message, :on, :create_trigger_name,
|
8
|
+
attr_reader :table_name, :column_name, :message, :on, :create_trigger_name,
|
9
9
|
:update_trigger_name, :allow_nil, :allow_blank, :as, :options
|
10
10
|
|
11
11
|
validates :on, inclusion: { in: :available_on }, allow_nil: true
|
@@ -33,14 +33,14 @@ module Mv
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def to_a
|
36
|
-
[table_name.to_s, column_name.to_s, message.to_s, on.to_s, create_trigger_name.to_s,
|
36
|
+
[table_name.to_s, column_name.to_s, message.to_s, on.to_s, create_trigger_name.to_s,
|
37
37
|
update_trigger_name.to_s, allow_nil, allow_blank, as.to_s]
|
38
38
|
end
|
39
39
|
|
40
40
|
def <=> other_validation
|
41
41
|
[self.class.name, to_a] <=> [other_validation.class.name, other_validation.to_a]
|
42
42
|
end
|
43
|
-
|
43
|
+
|
44
44
|
def update?
|
45
45
|
[:save, :update].include?(on.try(:to_sym))
|
46
46
|
end
|
@@ -49,17 +49,17 @@ module Mv
|
|
49
49
|
[:save, :create].include?(on.try(:to_sym))
|
50
50
|
end
|
51
51
|
|
52
|
-
def full_message
|
52
|
+
def full_message
|
53
53
|
compose_full_message(message)
|
54
54
|
end
|
55
55
|
|
56
|
-
protected
|
56
|
+
protected
|
57
57
|
|
58
58
|
def available_as
|
59
59
|
[:trigger]
|
60
60
|
end
|
61
61
|
|
62
|
-
def available_on
|
62
|
+
def available_on
|
63
63
|
[:save, :update, :create]
|
64
64
|
end
|
65
65
|
|
@@ -92,7 +92,7 @@ module Mv
|
|
92
92
|
end
|
93
93
|
|
94
94
|
def compose_full_message message
|
95
|
-
"#{column_name.to_s
|
95
|
+
"#{column_name.to_s} #{message}"
|
96
96
|
end
|
97
97
|
|
98
98
|
private
|
@@ -103,4 +103,4 @@ module Mv
|
|
103
103
|
end
|
104
104
|
end
|
105
105
|
end
|
106
|
-
end
|
106
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mv-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Valeriy Prokopchuk
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|