css2cocoa 0.2.4 → 0.3.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.
- data/VERSION +1 -1
- data/css2cocoa.gemspec +2 -2
- data/lib/css2cocoa/gradient.rb +2 -2
- metadata +5 -5
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.3.1
|
data/css2cocoa.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{css2cocoa}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.3.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Seivan Heidari"]
|
12
|
-
s.date = %q{2010-12-
|
12
|
+
s.date = %q{2010-12-04}
|
13
13
|
s.default_executable = %q{css2cocoa}
|
14
14
|
s.description = %q{Converts CSS3 webkit stylish code to OBJ-C, like gradients}
|
15
15
|
s.email = %q{seivan@kth.se}
|
data/lib/css2cocoa/gradient.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#"color-stop(.9,#999999)"
|
2
2
|
#puts Gradient.parse_gradient("-webkit-gradient(linear, 0% 96%, 0% 100%, from(#38AFFF), to(#FFFFFF))")
|
3
3
|
class Gradient
|
4
|
-
def self.parse_gradient(css_gradient,
|
4
|
+
def self.parse_gradient(css_gradient, helper=true)
|
5
5
|
css_gradient_array = css_gradient.split(", ")
|
6
6
|
start_location = css_gradient.split(",")[1].split("%").last.to_f/100.0
|
7
7
|
end_location = css_gradient.split(",")[2].split("%").last.to_f/100.0
|
@@ -31,7 +31,7 @@ class Gradient
|
|
31
31
|
end
|
32
32
|
|
33
33
|
"""
|
34
|
-
#{Gradient.generate_rgb_helper}
|
34
|
+
#{Gradient.generate_rgb_helper if helper}
|
35
35
|
#{Gradient.generate_gradient_location_method(locations)}
|
36
36
|
#{Gradient.generate_gradient_color_method(colors)}
|
37
37
|
"""
|
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
|
-
-
|
8
|
-
-
|
9
|
-
version: 0.
|
7
|
+
- 3
|
8
|
+
- 1
|
9
|
+
version: 0.3.1
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Seivan Heidari
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-12-
|
17
|
+
date: 2010-12-04 00:00:00 +01:00
|
18
18
|
default_executable: css2cocoa
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -117,7 +117,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
117
117
|
requirements:
|
118
118
|
- - ">="
|
119
119
|
- !ruby/object:Gem::Version
|
120
|
-
hash:
|
120
|
+
hash: -2316318390802706822
|
121
121
|
segments:
|
122
122
|
- 0
|
123
123
|
version: "0"
|