r2 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/README.md +14 -5
  2. data/lib/r2.rb +13 -0
  3. data/lib/r2/version.rb +1 -1
  4. metadata +4 -4
data/README.md CHANGED
@@ -1,23 +1,32 @@
1
- == R2
1
+ ## R2
2
2
 
3
3
  Library for swapping CSS values for right-to-left display. A direct Ruby port of the Javascript/Node project at https://github.com/ded/R2.
4
4
 
5
- == Installation ==
5
+ ## Installation
6
6
 
7
7
  $ gem install r2
8
8
 
9
- == Usage ==
9
+ ## Usage
10
10
 
11
11
  You can use the handy static method for flipping any CSS string via:
12
12
 
13
13
  > R2.r2("/* Comment */\nbody { direction: rtl; }")
14
14
  #=> "body{direction:ltr;}"
15
15
 
16
- == Reporting bugs ==
16
+ ## Reporting bugs
17
17
 
18
18
  Report bugs in the github project at http://github.com/mzsanford/r2rb
19
19
 
20
- == Copyright and License ==
20
+ ## Change Log
21
+
22
+ * v0.0.3 - Feature release
23
+ * [FEATURE] Added -moz and -webkit border support
24
+ * [FEATURE] Added box-shadow (+moz and webkit) support
25
+ * [DOC] Added change log
26
+ * v0.0.2 - Documentation updated
27
+ * v0.0.1 - Initial release
28
+
29
+ ## Copyright and License
21
30
 
22
31
  Copyright 2011 Twitter, Inc.
23
32
 
data/lib/r2.rb CHANGED
@@ -29,8 +29,18 @@ module R2
29
29
 
30
30
  'border-radius-bottomleft' => 'border-radius-bottomright',
31
31
  'border-radius-bottomright' => 'border-radius-bottomleft',
32
+ 'border-radius-topleft' => 'border-radius-topright',
33
+ 'border-radius-topright' => 'border-radius-topleft',
34
+
32
35
  '-moz-border-radius-bottomright' => '-moz-border-radius-bottomleft',
33
36
  '-moz-border-radius-bottomleft' => '-moz-border-radius-bottomright',
37
+ '-moz-border-radius-topright' => '-moz-border-radius-topleft',
38
+ '-moz-border-radius-topleft' => '-moz-border-radius-topright',
39
+
40
+ '-webkit-border-top-right-radius' => '-webkit-border-top-left-radius',
41
+ '-webkit-border-top-left-radius' => '-webkit-border-top-right-radius',
42
+ '-webkit-border-bottom-right-radius' => '-webkit-border-bottom-left-radius',
43
+ '-webkit-border-bottom-left-radius' => '-webkit-border-bottom-right-radius',
34
44
 
35
45
  'left' => 'right',
36
46
  'right' => 'left'
@@ -41,6 +51,9 @@ module R2
41
51
  'margin' => lambda {|obj,val| obj.quad_swap(val) },
42
52
  'text-align' => lambda {|obj,val| obj.side_swap(val) },
43
53
  'float' => lambda {|obj,val| obj.side_swap(val) },
54
+ 'box-shadow' => lambda {|obj,val| obj.quad_swap(val) },
55
+ '-webkit-box-shadow' => lambda {|obj,val| obj.quad_swap(val) },
56
+ '-moz-box-shadow' => lambda {|obj,val| obj.quad_swap(val) },
44
57
  'direction' => lambda {|obj,val| obj.direction_swap(val) }
45
58
  }
46
59
 
data/lib/r2/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module R2
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: r2
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 2
10
- version: 0.0.2
9
+ - 3
10
+ version: 0.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Matt Sanford
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-06-17 00:00:00 -07:00
18
+ date: 2011-06-23 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies: []
21
21