style_cop 0.0.2 → 0.0.3
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/.gitignore +1 -1
- data/README.md +13 -8
- data/lib/style_cop.rb +2 -0
- data/lib/style_cop/selector.rb +4 -1
- data/spec/lib/selector_spec.rb +2 -0
- data/style_cop.gemspec +2 -2
- metadata +16 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f0deadbeafa491fb043389be48f10c69b26d88df
|
4
|
+
data.tar.gz: 576aaf038c73ea9cd1aa5c99af00e1946870637b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff57bb5fafeb04fc51d02666893a5030e17d4e68a030438a2a55f75fc752478ef658a5d0c5673a0612673ac918c0906eefa3587d1bfa3ed9629a69ae93915608
|
7
|
+
data.tar.gz: 8ef33caaba24494f9f21a1eb91599c849ec8b9e6068554705ea6e1f320fe38c8432b88dec27c82bb28d86b354987dad57c7a3818b4f1d4351af68d608cf291af
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -35,12 +35,17 @@ you will need to do two things:
|
|
35
35
|
|
36
36
|
2. Add code like this somewhere in an integration test:
|
37
37
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
38
|
+
```
|
39
|
+
context "some context", style_cop: true do
|
40
|
+
it "tests something" do
|
41
|
+
visit "/some/path"
|
42
|
+
selector = page.find(".your-selector")
|
43
|
+
expect(selector).to match_styleguide(styleguide_page("/your/styleguide/path"))
|
44
|
+
end
|
44
45
|
end
|
45
|
-
|
46
|
-
|
46
|
+
```
|
47
|
+
|
48
|
+
## Developer Notes
|
49
|
+
|
50
|
+
If you find there are css elements that are giving you failures that you want to ignore you can
|
51
|
+
open up selector.rb and add those css elements to the EXCLUDED_KEYS constant.
|
data/lib/style_cop.rb
CHANGED
data/lib/style_cop/selector.rb
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
module StyleCop
|
2
2
|
class Selector
|
3
|
-
EXCLUDED_KEYS = [
|
3
|
+
EXCLUDED_KEYS = [
|
4
|
+
"width", "height", "top", "bottom", "right", "left",
|
5
|
+
"-webkit-perspective-origin", "-webkit-transform-origin"
|
6
|
+
]
|
4
7
|
|
5
8
|
def initialize(selector)
|
6
9
|
@selector = selector
|
data/spec/lib/selector_spec.rb
CHANGED
@@ -83,6 +83,8 @@ module StyleCop
|
|
83
83
|
it { should_not have_key("bottom") }
|
84
84
|
it { should_not have_key("right") }
|
85
85
|
it { should_not have_key("left") }
|
86
|
+
it { should_not have_key("-webkit-perspective-origin") }
|
87
|
+
it { should_not have_key("-webkit-transform-origin") }
|
86
88
|
end
|
87
89
|
end
|
88
90
|
end
|
data/style_cop.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'style_cop'
|
3
|
-
s.version = '0.0.
|
4
|
-
s.date = '2014-03-
|
3
|
+
s.version = '0.0.3'
|
4
|
+
s.date = '2014-03-13'
|
5
5
|
s.summary = "Gem for testing style"
|
6
6
|
s.description = "Gem for testing style"
|
7
7
|
s.authors = ["Ward Penney", "David Tengdin", "Jordi Noguera"]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: style_cop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ward Penney
|
@@ -10,62 +10,62 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-03-
|
13
|
+
date: 2014-03-13 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rspec
|
17
17
|
requirement: !ruby/object:Gem::Requirement
|
18
18
|
requirements:
|
19
|
-
- -
|
19
|
+
- - '>='
|
20
20
|
- !ruby/object:Gem::Version
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
|
-
- -
|
26
|
+
- - '>='
|
27
27
|
- !ruby/object:Gem::Version
|
28
28
|
version: '0'
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: capybara-webkit
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
32
32
|
requirements:
|
33
|
-
- -
|
33
|
+
- - '>='
|
34
34
|
- !ruby/object:Gem::Version
|
35
35
|
version: '0'
|
36
36
|
type: :runtime
|
37
37
|
prerelease: false
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
|
-
- -
|
40
|
+
- - '>='
|
41
41
|
- !ruby/object:Gem::Version
|
42
42
|
version: '0'
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: pry
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
|
-
- -
|
47
|
+
- - '>='
|
48
48
|
- !ruby/object:Gem::Version
|
49
49
|
version: '0'
|
50
50
|
type: :development
|
51
51
|
prerelease: false
|
52
52
|
version_requirements: !ruby/object:Gem::Requirement
|
53
53
|
requirements:
|
54
|
-
- -
|
54
|
+
- - '>='
|
55
55
|
- !ruby/object:Gem::Version
|
56
56
|
version: '0'
|
57
57
|
- !ruby/object:Gem::Dependency
|
58
58
|
name: sinatra
|
59
59
|
requirement: !ruby/object:Gem::Requirement
|
60
60
|
requirements:
|
61
|
-
- -
|
61
|
+
- - '>='
|
62
62
|
- !ruby/object:Gem::Version
|
63
63
|
version: '0'
|
64
64
|
type: :development
|
65
65
|
prerelease: false
|
66
66
|
version_requirements: !ruby/object:Gem::Requirement
|
67
67
|
requirements:
|
68
|
-
- -
|
68
|
+
- - '>='
|
69
69
|
- !ruby/object:Gem::Version
|
70
70
|
version: '0'
|
71
71
|
description: Gem for testing style
|
@@ -74,9 +74,9 @@ executables: []
|
|
74
74
|
extensions: []
|
75
75
|
extra_rdoc_files: []
|
76
76
|
files:
|
77
|
-
-
|
78
|
-
-
|
79
|
-
-
|
77
|
+
- .gitignore
|
78
|
+
- .pairs
|
79
|
+
- .rspec
|
80
80
|
- Gemfile
|
81
81
|
- README.md
|
82
82
|
- lib/style_cop.rb
|
@@ -105,17 +105,17 @@ require_paths:
|
|
105
105
|
- lib
|
106
106
|
required_ruby_version: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - '>='
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
112
112
|
requirements:
|
113
|
-
- -
|
113
|
+
- - '>='
|
114
114
|
- !ruby/object:Gem::Version
|
115
115
|
version: '0'
|
116
116
|
requirements: []
|
117
117
|
rubyforge_project:
|
118
|
-
rubygems_version: 2.
|
118
|
+
rubygems_version: 2.1.10
|
119
119
|
signing_key:
|
120
120
|
specification_version: 4
|
121
121
|
summary: Gem for testing style
|