r2 0.2.0 → 0.2.1
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/README.md +2 -0
- data/lib/r2.rb +4 -1
- data/lib/r2/version.rb +1 -1
- data/spec/r2_spec.rb +5 -0
- 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: 0a5183daf3e28928082401b7e9ab748e41080b7a
|
|
4
|
+
data.tar.gz: 7e223471bffd64f83bab5c4b6f9454d067759e8d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f4fbd3b2586d61ca723267911424da717054b69e072456da424c51a5bbf9070a430d926c404b53d464b07cc1511d5745bf821d7db5b3ef86243fd3498fcc2ed3
|
|
7
|
+
data.tar.gz: 7e3eff1221044f7b7e695044bf8c89b4d0ec8e587c7bc13a33811c7f5f8390085e19ee77737b6203da921b8a1222386e5be57d6c6eddd27f00b834854e47085f
|
data/README.md
CHANGED
|
@@ -23,6 +23,8 @@ Report bugs in the github project at http://github.com/mzsanford/r2rb
|
|
|
23
23
|
|
|
24
24
|
## Change Log
|
|
25
25
|
|
|
26
|
+
* v0.2.1 – CSS3 `box-shadow` fix
|
|
27
|
+
* [BUG] Correctly handle `box-shadow` declarations starting with `inset` (fix from [@wazeHQ](https://github.com/wazeHQ))
|
|
26
28
|
* v0.2.0 – CSS3 additions
|
|
27
29
|
* [FEATURE] Support `@media` queries by ignoring them (fix from [@haimlankry](https://github.com/haimlankry))
|
|
28
30
|
* [FEATURE] Correctly flip `box-shadow` values (bug report from [@aviaron](https://github.com/aviaron))
|
data/lib/r2.rb
CHANGED
|
@@ -150,9 +150,12 @@ module R2
|
|
|
150
150
|
def shadow_swap(val)
|
|
151
151
|
args = val.to_s.split(/\s+/)
|
|
152
152
|
|
|
153
|
+
#move 'inset' to the end
|
|
154
|
+
args.push(args.shift) if args && args[0] == "inset"
|
|
155
|
+
|
|
153
156
|
matched = args && args[0].match(/^([-+]?\d+)(\w*)$/)
|
|
154
157
|
if matched
|
|
155
|
-
return (["#{(-1 * matched[1].to_i)}#{matched[2]}"] +
|
|
158
|
+
return (["#{(-1 * matched[1].to_i)}#{matched[2]}"] + args[1..5]).compact.join(' ')
|
|
156
159
|
else
|
|
157
160
|
return val
|
|
158
161
|
end
|
data/lib/r2/version.rb
CHANGED
data/spec/r2_spec.rb
CHANGED
|
@@ -151,6 +151,11 @@ describe R2::Swapper do
|
|
|
151
151
|
it "should swap a 6 arg value" do
|
|
152
152
|
r2.shadow_swap("1px 2px 3px 4px #000 inset").should == "-1px 2px 3px 4px #000 inset"
|
|
153
153
|
end
|
|
154
|
+
|
|
155
|
+
it "should swap value starting with inset" do
|
|
156
|
+
r2.shadow_swap("inset 1px 2px").should == "-1px 2px inset"
|
|
157
|
+
end
|
|
158
|
+
|
|
154
159
|
end
|
|
155
160
|
|
|
156
161
|
describe "#border_radius_swap" do
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: r2
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Matt Sanford
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2013-05-
|
|
11
|
+
date: 2013-05-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|