yeqs_sexybuttons 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,7 +1,7 @@
1
1
  source "http://rubygems.org"
2
2
 
3
3
 
4
- gem "rails", "3.0.0"
4
+ gem "rails", ">=3.0.0"
5
5
 
6
6
  group :development do
7
7
  if RUBY_VERSION < '1.9'
@@ -10,7 +10,7 @@ group :development do
10
10
  end
11
11
 
12
12
  group :test do
13
- gem "rspec-rails", ">= 2.0.0.beta"
13
+ gem "rspec-rails", ">= 2.0.0"
14
14
  gem "capybara", ">= 0.3.8"
15
15
  gem "sqlite3-ruby", :require => "sqlite3"
16
16
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.6
1
+ 0.0.7
@@ -4,12 +4,13 @@ module SexybuttonHelper
4
4
  tag(:link, :type => 'text/css', :media => 'screen', :rel => 'stylesheet', :href => '/components/SexyButtons/sexybuttons.css')
5
5
  end
6
6
 
7
- def sexybutton(text, url = nil)
7
+ def sexybutton(text, url = nil, image = nil)
8
8
  tag_name = 'button'
9
9
 
10
10
  btn = SexyButton.new
11
11
  yield btn if block_given?
12
12
 
13
+ image ||= btn.image
13
14
  html_class = "sexybutton sexysimple sexy#{btn.color}"
14
15
  if btn.style
15
16
  html_class << " #{btn.style}"
@@ -22,7 +23,7 @@ module SexybuttonHelper
22
23
  tag_name = 'a'
23
24
  end
24
25
 
25
- content = btn.image ? content_tag(:span, text, :class => btn.image) : text
26
+ content = image.nil? ? text : content_tag(:span, text, :class => image)
26
27
  content_tag(tag_name, content, html_options)
27
28
  end
28
29
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 6
9
- version: 0.0.6
8
+ - 7
9
+ version: 0.0.7
10
10
  platform: ruby
11
11
  authors:
12
12
  - Tower He
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-09-01 00:00:00 +08:00
17
+ date: 2010-10-18 00:00:00 +08:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -22,7 +22,7 @@ dependencies:
22
22
  requirement: &id001 !ruby/object:Gem::Requirement
23
23
  none: false
24
24
  requirements:
25
- - - "="
25
+ - - ">="
26
26
  - !ruby/object:Gem::Version
27
27
  segments:
28
28
  - 3