prevent_blankification_validator 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.coveralls.yml +1 -0
- data/.travis.yml +0 -1
- data/README.md +4 -0
- data/lib/prevent_blankification_validator/version.rb +1 -1
- data/prevent_blankification_validator.gemspec +8 -7
- data/spec/prevent_blankification_validator_spec.rb +2 -2
- data/spec/spec_helper.rb +15 -10
- metadata +27 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7245d60d99ccaf28575b83cd8c2d1760ddd3de04
|
4
|
+
data.tar.gz: 4f98548c8082819376582638ff9e8126c3138f19
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3fb40857188f662898a623c207a134c678f684e17b5265f7f5ac18996e2da9b01fd260d93a2b4ad2ec712028b95f439f5108efc4df1e75f13e20f575775367c2
|
7
|
+
data.tar.gz: 495038aecebcbecc4f98db890cc0194e4c3a461cf036871ef36abaa00199b33ddf336d81e7c723b8b53018cf565c642f16cf775a463f813ceff68892a9db5340
|
data/.coveralls.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
service_name: travis-ci
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
# PreventBlankificationValidator
|
2
2
|
|
3
3
|
[![Build Status](https://travis-ci.org/gewo/prevent_blankification_validator.png)](https://travis-ci.org/gewo/prevent_blankification_validator/)
|
4
|
+
[![Code Coverage](https://coveralls.io/repos/gewo/prevent_blankification_validator/badge.png)](https://coveralls.io/r/gewo/prevent_blankification_validator)
|
5
|
+
[![Code Climate](https://codeclimate.com/github/gewo/prevent_blankification_validator.png)](https://codeclimate.com/github/gewo/prevent_blankification_validator)
|
6
|
+
[![Gem Version](https://badge.fury.io/rb/prevent_blankification_validator.png)](http://badge.fury.io/rb/prevent_blankification_validator)
|
7
|
+
[![Dependency Status](https://gemnasium.com/gewo/prevent_blankification_validator.png)](https://gemnasium.com/gewo/prevent_blankification_validator)
|
4
8
|
|
5
9
|
Rails 3 Validator, that prevents attributes from being changed to a blank value
|
6
10
|
once they're present.
|
@@ -4,24 +4,25 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
require 'prevent_blankification_validator/version'
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
|
-
s.name =
|
7
|
+
s.name = 'prevent_blankification_validator'
|
8
8
|
s.version = PreventBlankificationValidator::VERSION
|
9
|
-
s.authors = [
|
10
|
-
s.email = [
|
9
|
+
s.authors = ['Gebhard Wöstemeyer']
|
10
|
+
s.email = ['g.woestemeyer@gmail.com']
|
11
11
|
s.description = %q{Rails 3 Validator, that prevents attributes from being changed to a blank value once they're present.}
|
12
12
|
s.summary = %q{Rails 3 Validator, that prevents attributes from being changed to a blank value once they're present.}
|
13
|
-
s.homepage =
|
13
|
+
s.homepage = 'https://github.com/gewo/prevent_blankification_validator/'
|
14
|
+
s.license = 'MIT'
|
14
15
|
|
15
16
|
s.files = `git ls-files`.split($/)
|
16
17
|
s.executables = s.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
17
18
|
s.test_files = s.files.grep(%r{^spec/})
|
18
19
|
s.require_paths = ["lib"]
|
19
20
|
|
21
|
+
s.add_runtime_dependency 'activemodel'
|
20
22
|
|
21
|
-
s.
|
22
|
-
|
23
|
-
s.add_development_dependency 'activesupport', ['~> 3.0']
|
23
|
+
s.add_development_dependency 'activesupport'
|
24
24
|
s.add_development_dependency 'rake'
|
25
25
|
s.add_development_dependency 'rspec'
|
26
26
|
s.add_development_dependency 'simplecov'
|
27
|
+
s.add_development_dependency 'coveralls'
|
27
28
|
end
|
@@ -3,9 +3,9 @@ require 'spec_helper'
|
|
3
3
|
describe ActiveModel::Validations::PreventBlankificationValidator do
|
4
4
|
before :each do
|
5
5
|
@validator = ActiveModel::Validations::PreventBlankificationValidator.
|
6
|
-
new({ attributes:
|
6
|
+
new({ attributes: [:attribute] })
|
7
7
|
|
8
|
-
@mock =
|
8
|
+
@mock = double
|
9
9
|
@mock.stub('errors').and_return []
|
10
10
|
@mock.errors.stub('[]').and_return {}
|
11
11
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,17 +1,22 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
require 'simplecov'
|
2
|
+
require 'coveralls'
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
SimpleCov.start do
|
5
|
+
add_filter "/spec"
|
6
|
+
end
|
7
|
+
|
8
|
+
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
|
9
|
+
SimpleCov::Formatter::HTMLFormatter,
|
10
|
+
Coveralls::SimpleCov::Formatter
|
11
|
+
]
|
7
12
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
end
|
12
|
-
SimpleCov.result.format!
|
13
|
+
SimpleCov.at_exit do
|
14
|
+
File.open(File.join(SimpleCov.coverage_path, 'percent.txt'), 'w') do |f|
|
15
|
+
f.write SimpleCov.result.covered_percent
|
13
16
|
end
|
17
|
+
SimpleCov.result.format!
|
14
18
|
end
|
19
|
+
SimpleCov.start
|
15
20
|
|
16
21
|
require 'active_model'
|
17
22
|
require 'prevent_blankification_validator'
|
metadata
CHANGED
@@ -1,43 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prevent_blankification_validator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gebhard Wöstemeyer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-08-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: activesupport
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -80,6 +80,20 @@ dependencies:
|
|
80
80
|
- - '>='
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: coveralls
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
83
97
|
description: Rails 3 Validator, that prevents attributes from being changed to a blank
|
84
98
|
value once they're present.
|
85
99
|
email:
|
@@ -88,6 +102,7 @@ executables: []
|
|
88
102
|
extensions: []
|
89
103
|
extra_rdoc_files: []
|
90
104
|
files:
|
105
|
+
- .coveralls.yml
|
91
106
|
- .gitignore
|
92
107
|
- .rspec
|
93
108
|
- .ruby-gemset
|
@@ -106,7 +121,8 @@ files:
|
|
106
121
|
- spec/prevent_blankification_validator_spec.rb
|
107
122
|
- spec/spec_helper.rb
|
108
123
|
homepage: https://github.com/gewo/prevent_blankification_validator/
|
109
|
-
licenses:
|
124
|
+
licenses:
|
125
|
+
- MIT
|
110
126
|
metadata: {}
|
111
127
|
post_install_message:
|
112
128
|
rdoc_options: []
|