padrino-helpers 0.7.2 → 0.7.3

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -9,9 +9,10 @@ begin
9
9
  gem.name = "padrino-helpers"
10
10
  gem.summary = "Helpers for padrino"
11
11
  gem.description = "Tag helpers, asset helpers, form helpers, form builders and many more helpers for padrino"
12
- gem.email = "nesquena@gmail.com"
12
+ gem.email = "padrinorb@gmail.com"
13
13
  gem.homepage = "http://github.com/padrino/padrino-framework/tree/master/padrino-helpers"
14
14
  gem.authors = ["Padrino Team", "Nathan Esquenazi", "Davide D'Agostino", "Arthur Chiu"]
15
+ gem.rubyforge_project = 'padrino-helpers'
15
16
  gem.add_runtime_dependency "sinatra", ">= 0.9.2"
16
17
  gem.add_runtime_dependency "padrino-core", "= #{GEM_VERSION}"
17
18
  gem.add_development_dependency "haml", ">= 2.2.1"
@@ -22,6 +23,7 @@ begin
22
23
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
23
24
  end
24
25
  Jeweler::GemcutterTasks.new
26
+ Jeweler::GemcutterTasks.new
25
27
  rescue LoadError
26
28
  puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
27
29
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.2
1
+ 0.7.3
@@ -30,20 +30,20 @@ module Padrino
30
30
  # condition padrino return true/false if the request.path_info match the given url
31
31
  #
32
32
  def link_to(*args, &block)
33
- options = args.extract_options!
34
- anchor = options[:anchor] ? "##{CGI.escape options.delete(:anchor).to_s}" : ""
33
+ options = args.extract_options!
34
+ anchor = "##{CGI.escape options.delete(:anchor).to_s}" if options[:anchor]
35
35
  options["data-remote"] = "true" if options.delete(:remote)
36
36
  if block_given?
37
- url = args[0] || 'javascript:void(0);'
38
- options.reverse_merge!(:href => url + anchor)
37
+ url = args[0] ? args[0] + anchor.to_s : anchor || 'javascript:void(0);'
38
+ options.reverse_merge!(:href => url)
39
39
  link_content = capture_html(&block)
40
40
  return name unless parse_conditions(url, options)
41
41
  result_link = content_tag(:a, link_content, options)
42
42
  block_is_template?(block) ? concat_content(result_link) : result_link
43
43
  else
44
- name, url = args[0], (args[1] || 'javascript:void(0);')
44
+ name, url = args[0], (args[1] ? args[1] + anchor.to_s : anchor || 'javascript:void(0);')
45
45
  return name unless parse_conditions(url, options)
46
- options.reverse_merge!(:href => url + anchor)
46
+ options.reverse_merge!(:href => url)
47
47
  content_tag(:a, name, options)
48
48
  end
49
49
  end
@@ -50,7 +50,7 @@ module Padrino
50
50
 
51
51
  unless count.zero?
52
52
  html = {}
53
- [:id, :class].each do |key|
53
+ [:id, :class, :style].each do |key|
54
54
  if options.include?(key)
55
55
  value = options[key]
56
56
  html[key] = value unless value.blank?
@@ -5,13 +5,13 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{padrino-helpers}
8
- s.version = "0.7.2"
8
+ s.version = "0.7.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Padrino Team", "Nathan Esquenazi", "Davide D'Agostino", "Arthur Chiu"]
12
- s.date = %q{2010-02-03}
12
+ s.date = %q{2010-02-07}
13
13
  s.description = %q{Tag helpers, asset helpers, form helpers, form builders and many more helpers for padrino}
14
- s.email = %q{nesquena@gmail.com}
14
+ s.email = %q{padrinorb@gmail.com}
15
15
  s.extra_rdoc_files = [
16
16
  "README.rdoc"
17
17
  ]
@@ -71,6 +71,7 @@ Gem::Specification.new do |s|
71
71
  s.homepage = %q{http://github.com/padrino/padrino-framework/tree/master/padrino-helpers}
72
72
  s.rdoc_options = ["--charset=UTF-8"]
73
73
  s.require_paths = ["lib"]
74
+ s.rubyforge_project = %q{padrino-helpers}
74
75
  s.rubygems_version = %q{1.3.5}
75
76
  s.summary = %q{Helpers for padrino}
76
77
 
@@ -80,7 +81,7 @@ Gem::Specification.new do |s|
80
81
 
81
82
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
82
83
  s.add_runtime_dependency(%q<sinatra>, [">= 0.9.2"])
83
- s.add_runtime_dependency(%q<padrino-core>, ["= 0.7.2"])
84
+ s.add_runtime_dependency(%q<padrino-core>, ["= 0.7.3"])
84
85
  s.add_development_dependency(%q<haml>, [">= 2.2.1"])
85
86
  s.add_development_dependency(%q<shoulda>, [">= 0"])
86
87
  s.add_development_dependency(%q<mocha>, [">= 0.9.7"])
@@ -88,7 +89,7 @@ Gem::Specification.new do |s|
88
89
  s.add_development_dependency(%q<webrat>, [">= 0.5.1"])
89
90
  else
90
91
  s.add_dependency(%q<sinatra>, [">= 0.9.2"])
91
- s.add_dependency(%q<padrino-core>, ["= 0.7.2"])
92
+ s.add_dependency(%q<padrino-core>, ["= 0.7.3"])
92
93
  s.add_dependency(%q<haml>, [">= 2.2.1"])
93
94
  s.add_dependency(%q<shoulda>, [">= 0"])
94
95
  s.add_dependency(%q<mocha>, [">= 0.9.7"])
@@ -97,7 +98,7 @@ Gem::Specification.new do |s|
97
98
  end
98
99
  else
99
100
  s.add_dependency(%q<sinatra>, [">= 0.9.2"])
100
- s.add_dependency(%q<padrino-core>, ["= 0.7.2"])
101
+ s.add_dependency(%q<padrino-core>, ["= 0.7.3"])
101
102
  s.add_dependency(%q<haml>, [">= 2.2.1"])
102
103
  s.add_dependency(%q<shoulda>, [">= 0"])
103
104
  s.add_dependency(%q<mocha>, [">= 0.9.7"])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: padrino-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Padrino Team
@@ -12,7 +12,7 @@ autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
14
 
15
- date: 2010-02-03 00:00:00 +01:00
15
+ date: 2010-02-07 00:00:00 +01:00
16
16
  default_executable:
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
@@ -33,7 +33,7 @@ dependencies:
33
33
  requirements:
34
34
  - - "="
35
35
  - !ruby/object:Gem::Version
36
- version: 0.7.2
36
+ version: 0.7.3
37
37
  version:
38
38
  - !ruby/object:Gem::Dependency
39
39
  name: haml
@@ -86,7 +86,7 @@ dependencies:
86
86
  version: 0.5.1
87
87
  version:
88
88
  description: Tag helpers, asset helpers, form helpers, form builders and many more helpers for padrino
89
- email: nesquena@gmail.com
89
+ email: padrinorb@gmail.com
90
90
  executables: []
91
91
 
92
92
  extensions: []
@@ -168,7 +168,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
168
168
  version:
169
169
  requirements: []
170
170
 
171
- rubyforge_project:
171
+ rubyforge_project: padrino-helpers
172
172
  rubygems_version: 1.3.5
173
173
  signing_key:
174
174
  specification_version: 3