incurve 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.3
1
+ 0.1.4
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{incurve}
8
- s.version = "0.1.3"
8
+ s.version = "0.1.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Stefano Verna ~ http://www.weLaika.com"]
12
- s.date = %q{2010-07-30}
12
+ s.date = %q{2010-09-12}
13
13
  s.description = %q{InCurve provides some handy helper methods for your Rails app, letting you easily inline your CSS code.}
14
14
  s.email = %q{stefano.verna@welaika.com}
15
15
  s.extra_rdoc_files = [
@@ -1,11 +1,20 @@
1
1
  module InCurve
2
2
  module ViewHelpers
3
-
3
+
4
4
  def incurve_css(&block)
5
5
  c = capture(&block)
6
6
  premailer = StringPremailer.new(StringIO.new(c))
7
- premailer.to_inline_css.html_safe
7
+ inlined = premailer.to_inline_css
8
+
9
+ if Rails::VERSION::MAJOR == 2
10
+ concat(inlined, proc.binding)
11
+ elsif Rails::VERSION::MAJOR == 3
12
+ inlined.html_safe
13
+ else
14
+ puts "Whoa! inline gem can only work with Rails 2.x and Rails 3.x"
15
+ end
16
+
8
17
  end
9
-
18
+
10
19
  end
11
20
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: incurve
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 3
10
- version: 0.1.3
9
+ - 4
10
+ version: 0.1.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Stefano Verna ~ http://www.weLaika.com
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-07-30 00:00:00 +02:00
18
+ date: 2010-09-12 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency