css_compare 0.1.1 → 0.1.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/lib/css_compare/constants.rb +1 -1
- data/lib/css_compare/css/component/selector.rb +3 -3
- data/lib/css_compare/css/engine.rb +1 -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: e83f7576f73a2cf226d0daaf3175bd8e8ffe9a6a
|
4
|
+
data.tar.gz: ff07aef3047cd2e8cd257f307c2c3908f8782582
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b418225b008b5850fae00431a4bdeb493594c86fb073399099ffe8e7fc1e57e0d2a317f56fc02b173d25f559eb57ee73553d78c6f115dedc54020d256565cae6
|
7
|
+
data.tar.gz: 1f37d0a034d1db5caced9920e6b7b4f1159a1e70d446bbe2191927335c3d315c02616432b6720ccbffe55008eecc360df9f399e20fbc1fedf336e5e042818d19
|
@@ -16,11 +16,11 @@ module CssCompare
|
|
16
16
|
# @return [Hash{String => Component::Property}] properties
|
17
17
|
attr_accessor :properties
|
18
18
|
|
19
|
-
# @param [String] name
|
19
|
+
# @param [String] name the selector's name
|
20
20
|
# @param [Array<Sass::Tree::PropNode>] properties to be included
|
21
21
|
# @param [Array<String>] conditions @media query conditions
|
22
22
|
def initialize(name, properties, conditions)
|
23
|
-
@name = name
|
23
|
+
@name = name.strip
|
24
24
|
@properties = {}
|
25
25
|
process_properties(properties, conditions)
|
26
26
|
end
|
@@ -80,7 +80,7 @@ module CssCompare
|
|
80
80
|
# @return [Selector] a copy of self
|
81
81
|
def deep_copy(name = @name)
|
82
82
|
copy = dup
|
83
|
-
copy.name = name
|
83
|
+
copy.name = name.strip
|
84
84
|
copy.properties = {}
|
85
85
|
@properties.each { |k, v| copy.properties[k] = v.deep_copy }
|
86
86
|
copy
|
@@ -88,8 +88,7 @@ module CssCompare
|
|
88
88
|
# @param [Engine] other the engine to compare this with.
|
89
89
|
# @return [Boolean]
|
90
90
|
def ==(other)
|
91
|
-
keys = @engine.keys
|
92
|
-
return false unless keys.uniq! # @todo this won't work
|
91
|
+
keys = @engine.keys
|
93
92
|
keys.all? { |key| @engine[key] == other.engine[key] }
|
94
93
|
end
|
95
94
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: css_compare
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Attila Večerek
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04-
|
11
|
+
date: 2016-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sass
|