cane-hashcheck 0.9.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/lib/cane/hashcheck/hash_check.rb +1 -1
- data/lib/cane/hashcheck/version.rb +1 -1
- data/spec/cane/hash_check_spec.rb +10 -6
- 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: ad5b2a9165abf78a92dcc3580fe11c26c96e831f
|
4
|
+
data.tar.gz: 75b1346acb4d209e86cfbf30c23f51177d02c8fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c574db145582aa594f27c6ef0342c3bebcff6255e16825a9092a0ea5b63e4e492fb50df8bc2fb02be0f9ceec5c49451f5b2e1eaabfdceb7adc157e1ec8d0734
|
7
|
+
data.tar.gz: 908465e611ffb9146b74dd7fdde825d25f816d43eefdb8fcf1f862499a495bccf48df31c62e1ca5f8b36efd81b9fd2b6a7bf7ecb6a8166706655df156056538b
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# cane-hashcheck
|
2
2
|
|
3
3
|
`cane-hashcheck` enforces Ruby 1.9 hash syntax in your Ruby project using
|
4
4
|
[cane](https://github.com/square/cane).
|
@@ -19,8 +19,8 @@ def options
|
|
19
19
|
end
|
20
20
|
```
|
21
21
|
|
22
|
-
When we run
|
23
|
-
|
22
|
+
When we run our quality rake task, we are scolded for using the old hash syntax
|
23
|
+
and encouraged to make a change on three lines:
|
24
24
|
|
25
25
|
```bash
|
26
26
|
$ rake quality
|
@@ -19,24 +19,28 @@ describe Cane::HashCheck do
|
|
19
19
|
{ :not => 'valid' }
|
20
20
|
{
|
21
21
|
totally: 'valid',
|
22
|
-
:not
|
23
|
-
TOTALLY => :valid
|
22
|
+
:not => :valid,
|
23
|
+
TOTALLY => :valid,
|
24
|
+
18 => 1 # this is valid, hash rockets are required for ints
|
25
|
+
}
|
26
|
+
{
|
27
|
+
'also' => 'valid',
|
28
|
+
"and also" => 'valid'
|
24
29
|
}
|
25
|
-
{ 'also' => 'valid' }
|
26
30
|
RUBY
|
27
31
|
end
|
28
32
|
|
29
|
-
it 'has a violation for each hash rocket' do
|
33
|
+
it 'has a violation for each invalid hash rocket' do
|
30
34
|
expect(subject.violations.count).to eq 2
|
31
35
|
end
|
32
36
|
|
33
|
-
it '
|
37
|
+
it 'puts the offending file name in the violation' do
|
34
38
|
subject.violations.each do |violation|
|
35
39
|
expect(violation[:file]).to eq file.path
|
36
40
|
end
|
37
41
|
end
|
38
42
|
|
39
|
-
it '
|
43
|
+
it 'puts the offending line number in the violation' do
|
40
44
|
expect(subject.violations[0][:line]).to eq 2
|
41
45
|
expect(subject.violations[1][:line]).to eq 5
|
42
46
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cane-hashcheck
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Hunt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-05-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|