valhammer 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Guardfile +3 -3
- data/lib/valhammer/validations.rb +2 -0
- data/lib/valhammer/version.rb +1 -1
- data/spec/db/schema.rb +1 -0
- data/spec/dummy/app/models/resource.rb +2 -0
- data/spec/lib/valhammer/validations_spec.rb +4 -0
- data/valhammer.gemspec +2 -2
- 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: 6ea291bcc9bb1f0c3931b9f5f83b8837f75be21e
|
4
|
+
data.tar.gz: 508cdc21ee92a31b986f5dbc9c6d449f5948355a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 15ccdb15b5890eecf69712db5dd761562389294bbb18eee58aaf76f5a15a7b6ffb73fe50c21fe89974c13ed4e5493f8ceb736c03fc351e34806b6a2f525df9d3
|
7
|
+
data.tar.gz: e73bcfc221876e783226d08f9ce828ccb15783b4147df604f89c3259ed9d8f279d54f4b0716f7076c0cce20274d4436f9434f08d3eaf47ec1305728ce2fb1545
|
data/Guardfile
CHANGED
@@ -4,13 +4,13 @@ guard :bundler do
|
|
4
4
|
end
|
5
5
|
|
6
6
|
guard :rspec, cmd: 'bundle exec rspec' do
|
7
|
-
watch(
|
8
|
-
watch(
|
7
|
+
watch(%r{^spec/.+_spec\.rb$})
|
8
|
+
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
|
9
9
|
watch('spec/spec_helper.rb') { 'spec' }
|
10
10
|
watch(%r{spec/(db|dummy)/.*\.rb}) { 'spec' }
|
11
11
|
end
|
12
12
|
|
13
13
|
guard :rubocop do
|
14
14
|
watch(/.+\.rb$/)
|
15
|
-
watch(
|
15
|
+
watch(%r{(?:.+/)?\.rubocop\.yml$}) { |m| File.dirname(m[0]) }
|
16
16
|
end
|
data/lib/valhammer/version.rb
CHANGED
data/spec/db/schema.rb
CHANGED
@@ -9,6 +9,7 @@ ActiveRecord::Schema.define(version: 0) do
|
|
9
9
|
t.integer :age, null: true, default: nil
|
10
10
|
t.decimal :gpa, null: false, default: 3.0
|
11
11
|
t.integer :socialness, null: false, default: 5
|
12
|
+
t.integer :sex, null: false, default: 0
|
12
13
|
t.boolean :injected, null: false, default: false
|
13
14
|
|
14
15
|
t.timestamps null: false
|
@@ -115,6 +115,10 @@ RSpec.describe Valhammer::Validations do
|
|
115
115
|
.to include(a_validator_for(:socialness, :numericality, opts))
|
116
116
|
end
|
117
117
|
end
|
118
|
+
|
119
|
+
context 'when used as enum' do
|
120
|
+
it { is_expected.not_to include(a_validator_for(:sex, :numericality)) }
|
121
|
+
end
|
118
122
|
end
|
119
123
|
|
120
124
|
context 'with a numeric column' do
|
data/valhammer.gemspec
CHANGED
@@ -14,8 +14,8 @@ Gem::Specification.new do |spec|
|
|
14
14
|
spec.license = 'Apache-2.0'
|
15
15
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0")
|
17
|
-
spec.executables = spec.files.grep(
|
18
|
-
spec.test_files = spec.files.grep(
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ['lib']
|
20
20
|
|
21
21
|
spec.add_dependency 'activerecord', '~> 4.1'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: valhammer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shaun Mangelsdorf
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-04-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|