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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 11915f30f055af7962245e50b8bb3acd299d72e8
4
- data.tar.gz: a536b287f02596d20774cce78c37e81a24eb32fd
3
+ metadata.gz: 0a5183daf3e28928082401b7e9ab748e41080b7a
4
+ data.tar.gz: 7e223471bffd64f83bab5c4b6f9454d067759e8d
5
5
  SHA512:
6
- metadata.gz: 6915646f994723a8ea9755e19ea764d00afe85c6f50f8ec356c373778729b08ccf07c0cf3ef1b4342d161902e3bce3365c1e2639fad435d4b97f8d96ab125666
7
- data.tar.gz: 36b1614dd763a3c4f5534858f549c97e2fd06a467089437dcf082dfbc1ec0a748bf6121826bbe30e1f382f5ede46b6e331d7630c33dc8a5df6a92bb932e4bcb8
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]}"] + Array(args.values_at(1..5))).compact.join(' ')
158
+ return (["#{(-1 * matched[1].to_i)}#{matched[2]}"] + args[1..5]).compact.join(' ')
156
159
  else
157
160
  return val
158
161
  end
@@ -1,3 +1,3 @@
1
1
  module R2
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
@@ -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.0
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-23 00:00:00.000000000 Z
11
+ date: 2013-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake