hammock 0.5.11 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/hammock.gemspec +4 -5
- data/lib/hammock.rb +2 -6
- data/lib/hammock/hamlink_to.rb +3 -1
- data/lib/hammock/monkey_patches/string.rb +1 -1
- metadata +14 -6
- data/init.rb +0 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.6.0
|
data/hammock.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{hammock}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.6.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Ben Hoskings"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-08-02}
|
13
13
|
s.description = %q{}
|
14
14
|
s.email = %q{ben@hoskings.net}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -25,7 +25,6 @@ Gem::Specification.new do |s|
|
|
25
25
|
"Rakefile",
|
26
26
|
"VERSION",
|
27
27
|
"hammock.gemspec",
|
28
|
-
"init.rb",
|
29
28
|
"lib/hammock.rb",
|
30
29
|
"lib/hammock/ajaxinate.rb",
|
31
30
|
"lib/hammock/callback.rb",
|
@@ -75,14 +74,14 @@ Gem::Specification.new do |s|
|
|
75
74
|
s.homepage = %q{http://github.com/benhoskings/hammock}
|
76
75
|
s.rdoc_options = ["--charset=UTF-8"]
|
77
76
|
s.require_paths = ["lib"]
|
78
|
-
s.rubygems_version = %q{1.3.
|
77
|
+
s.rubygems_version = %q{1.3.7}
|
79
78
|
s.summary = %q{Radically RESTful Rails.}
|
80
79
|
|
81
80
|
if s.respond_to? :specification_version then
|
82
81
|
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
83
82
|
s.specification_version = 3
|
84
83
|
|
85
|
-
if Gem::Version.new(Gem::
|
84
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
86
85
|
s.add_runtime_dependency(%q<rails>, ["~> 2.3.0"])
|
87
86
|
s.add_runtime_dependency(%q<benhoskings-ambitious-activerecord>, ["~> 0.1.3.7"])
|
88
87
|
else
|
data/lib/hammock.rb
CHANGED
@@ -1,10 +1,7 @@
|
|
1
|
-
gem 'benhoskings-ambition'
|
2
|
-
gem 'benhoskings-ambitious-activerecord'
|
3
|
-
require 'ambition'
|
4
1
|
require 'ambition/adapters/active_record'
|
5
2
|
|
6
3
|
module Hammock
|
7
|
-
VERSION = '0.
|
4
|
+
VERSION = '0.6.0'
|
8
5
|
IncludeTarget = ActionController::Base
|
9
6
|
|
10
7
|
def self.included base # :nodoc:
|
@@ -72,5 +69,4 @@ module Hammock
|
|
72
69
|
|
73
70
|
end
|
74
71
|
|
75
|
-
|
76
|
-
Hammock::IncludeTarget.send :include, Hammock if Hammock.loaded_from_gem?
|
72
|
+
Hammock::IncludeTarget.send :include, Hammock
|
data/lib/hammock/hamlink_to.rb
CHANGED
@@ -35,7 +35,9 @@ module Hammock
|
|
35
35
|
|
36
36
|
link_to(text || route.verb,
|
37
37
|
route.path(opts.delete(:params)),
|
38
|
-
opts.merge(
|
38
|
+
opts.merge(
|
39
|
+
:method => (route.http_method unless route.get?)
|
40
|
+
).dragnet(:method, :class, :id)
|
39
41
|
)
|
40
42
|
else
|
41
43
|
opts[:else] || opts[:text_or_else]
|
@@ -148,7 +148,7 @@ module Hammock
|
|
148
148
|
|
149
149
|
# Returns true if the string represents a valid email address.
|
150
150
|
def valid_email?
|
151
|
-
/^
|
151
|
+
/^[a-z0-9\-\+\=\&\'\_\.]+\@([a-z0-9\-]+\.)*[a-z0-9\-]{2,}\.[a-z0-9\-]{2,}$/ =~ self
|
152
152
|
end
|
153
153
|
|
154
154
|
def clean_email!
|
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hammock
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 7
|
4
5
|
prerelease: false
|
5
6
|
segments:
|
6
7
|
- 0
|
7
|
-
-
|
8
|
-
-
|
9
|
-
version: 0.
|
8
|
+
- 6
|
9
|
+
- 0
|
10
|
+
version: 0.6.0
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Ben Hoskings
|
@@ -14,16 +15,18 @@ autorequire:
|
|
14
15
|
bindir: bin
|
15
16
|
cert_chain: []
|
16
17
|
|
17
|
-
date: 2010-
|
18
|
+
date: 2010-08-02 00:00:00 +10:00
|
18
19
|
default_executable:
|
19
20
|
dependencies:
|
20
21
|
- !ruby/object:Gem::Dependency
|
21
22
|
name: rails
|
22
23
|
prerelease: false
|
23
24
|
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
24
26
|
requirements:
|
25
27
|
- - ~>
|
26
28
|
- !ruby/object:Gem::Version
|
29
|
+
hash: 3
|
27
30
|
segments:
|
28
31
|
- 2
|
29
32
|
- 3
|
@@ -35,9 +38,11 @@ dependencies:
|
|
35
38
|
name: benhoskings-ambitious-activerecord
|
36
39
|
prerelease: false
|
37
40
|
requirement: &id002 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
38
42
|
requirements:
|
39
43
|
- - ~>
|
40
44
|
- !ruby/object:Gem::Version
|
45
|
+
hash: 69
|
41
46
|
segments:
|
42
47
|
- 0
|
43
48
|
- 1
|
@@ -64,7 +69,6 @@ files:
|
|
64
69
|
- Rakefile
|
65
70
|
- VERSION
|
66
71
|
- hammock.gemspec
|
67
|
-
- init.rb
|
68
72
|
- lib/hammock.rb
|
69
73
|
- lib/hammock/ajaxinate.rb
|
70
74
|
- lib/hammock/callback.rb
|
@@ -120,23 +124,27 @@ rdoc_options:
|
|
120
124
|
require_paths:
|
121
125
|
- lib
|
122
126
|
required_ruby_version: !ruby/object:Gem::Requirement
|
127
|
+
none: false
|
123
128
|
requirements:
|
124
129
|
- - ">="
|
125
130
|
- !ruby/object:Gem::Version
|
131
|
+
hash: 3
|
126
132
|
segments:
|
127
133
|
- 0
|
128
134
|
version: "0"
|
129
135
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
136
|
+
none: false
|
130
137
|
requirements:
|
131
138
|
- - ">="
|
132
139
|
- !ruby/object:Gem::Version
|
140
|
+
hash: 3
|
133
141
|
segments:
|
134
142
|
- 0
|
135
143
|
version: "0"
|
136
144
|
requirements: []
|
137
145
|
|
138
146
|
rubyforge_project:
|
139
|
-
rubygems_version: 1.3.
|
147
|
+
rubygems_version: 1.3.7
|
140
148
|
signing_key:
|
141
149
|
specification_version: 3
|
142
150
|
summary: Radically RESTful Rails.
|
data/init.rb
DELETED