sinatra-mapping 1.0.0 → 1.0.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/CHANGES CHANGED
@@ -1,17 +1,20 @@
1
1
  = Changes
2
2
 
3
+ [1.0.1 - July 2009]
4
+ * The method for creates links has been fixed.
5
+
3
6
  [1.0.0 - July 2009]
4
7
  * Added new helper method for creates links.
5
8
 
6
9
  * All features for first release have been finished.
7
10
 
8
11
  [0.2.1 - July 2009]
9
- * The helper method for show title path has been fixed.
12
+ * The helper method for show title path has been fixed.
10
13
 
11
- * Added new task for show the current version.
14
+ * Added new task for show the current version.
12
15
 
13
16
  [0.2.0 - July 2009]
14
- * New method for mapping of paths has been added.
17
+ * New method for mapping of paths has been added.
15
18
 
16
19
  [0.1.1 - July 2009]
17
20
  * New helper methods have been added.
data/VERSION CHANGED
@@ -4,4 +4,4 @@
4
4
  :cycle: Release
5
5
  :major: 1
6
6
  :minor: 0
7
- :patch: 0
7
+ :patch: 1
@@ -32,7 +32,8 @@ module Sinatra
32
32
  # # => <a href="/tasks/status/finished">All finished</a>
33
33
  def link_to(name = nil, *args)
34
34
  options = args.last.kind_of?(Hash) ? args.pop : {}
35
- "<a href=\"#{path_to *args}\" #{extract_tags_attributes options}>#{name}</a>"
35
+ url = args.shift if args.first.to_s =~ /^\w.*:\/\//
36
+ "<a href=\"#{url || path_to(*args)}\" #{extract_tags_attributes options}>#{name}</a>"
36
37
  end
37
38
 
38
39
  # Returns all paths with query parameters. Example:
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinatra-mapping
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hallison Batista