merb-helpers 0.9.9 → 0.9.10
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/Rakefile +1 -1
- data/lib/merb-helpers/form/builder.rb +1 -1
- data/spec/fixture/app/controllers/exceptions.rb +1 -1
- data/spec/fixture/config/router.rb +3 -1
- data/spec/merb.main.pid +1 -0
- data/spec/merb_helpers_form_spec.rb +7 -9
- data/spec/merb_helpers_tag_helper_spec.rb +3 -3
- data/spec/merb_test.log +9 -0
- metadata +7 -5
data/Rakefile
CHANGED
@@ -37,7 +37,7 @@ spec = Gem::Specification.new do |s|
|
|
37
37
|
s.author = GEM_AUTHOR
|
38
38
|
s.email = GEM_EMAIL
|
39
39
|
s.homepage = PROJECT_URL
|
40
|
-
s.add_dependency('merb-core', "
|
40
|
+
s.add_dependency('merb-core', ">= #{Merb::VERSION}")
|
41
41
|
s.require_path = 'lib'
|
42
42
|
s.files = %w(LICENSE README Rakefile TODO) + Dir.glob("{lib,spec}/**/*")
|
43
43
|
end
|
@@ -72,7 +72,7 @@ module Merb::Helpers::Form::Builder
|
|
72
72
|
val = control_value(method)
|
73
73
|
arr.map do |attrs|
|
74
74
|
attrs = {:value => attrs} unless attrs.is_a?(Hash)
|
75
|
-
attrs[:checked]
|
75
|
+
attrs[:checked] = true if (val == attrs[:value])
|
76
76
|
radio_group_item(method, attrs)
|
77
77
|
end.join
|
78
78
|
end
|
@@ -23,7 +23,9 @@ Merb.logger.info("Compiling routes...")
|
|
23
23
|
Merb::Router.prepare do |r|
|
24
24
|
# RESTful routes
|
25
25
|
# r.resources :posts
|
26
|
-
|
26
|
+
resources :fake_models
|
27
|
+
resources :obj
|
28
|
+
resources :models
|
27
29
|
|
28
30
|
# This is the default route for /:controller/:action/:id
|
29
31
|
# This is fine for most cases. If you're heavily using resource-based
|
data/spec/merb.main.pid
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
72928
|
@@ -42,11 +42,6 @@ Merb::Plugins.config[:helpers] = {
|
|
42
42
|
:default_builder => Merb::Helpers::Form::Builder::FormWithErrors
|
43
43
|
}
|
44
44
|
|
45
|
-
Merb::Router.append do
|
46
|
-
resources :obj
|
47
|
-
end
|
48
|
-
|
49
|
-
|
50
45
|
describe "error_messages_for" do
|
51
46
|
|
52
47
|
before :each do
|
@@ -652,10 +647,6 @@ describe "bound_hidden_field" do
|
|
652
647
|
|
653
648
|
model.stub!(:errors).and_return(errors)
|
654
649
|
|
655
|
-
Merb::Router.append do
|
656
|
-
resources :models
|
657
|
-
end
|
658
|
-
|
659
650
|
@c.instance_variable_set(:@model, model)
|
660
651
|
r = @c.render :hidden_error
|
661
652
|
r.should match_tag(:input, :type => "hidden", :name => "my_class[foo]", :class => "error hidden")
|
@@ -791,6 +782,13 @@ describe "bound_radio_group" do
|
|
791
782
|
radio[0].should match_tag(:input, :id => 'bar_id')
|
792
783
|
radio[1].should match_tag(:label, :for => 'bar_id')
|
793
784
|
end
|
785
|
+
|
786
|
+
it "should only have one element with the checked property" do
|
787
|
+
r = @c.render :basic
|
788
|
+
radio = r.scan(/<[^>]*>/)[2..-2]
|
789
|
+
radio[0].should match_tag(:input, :checked => "checked")
|
790
|
+
radio[3].should_not match_tag(:input, :checked => "false")
|
791
|
+
end
|
794
792
|
end
|
795
793
|
|
796
794
|
|
data/spec/merb_test.log
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
~ Compiling routes...
|
2
|
+
~ Params: {"format"=>"", "action"=>"tag_with_content", "id"=>"", "controller"=>"tag_helper"}
|
3
|
+
~ {:after_filters_time=>1.5e-05, :before_filters_time=>1.4e-05, :action_time=>0.000996}
|
4
|
+
~ Params: {"format"=>"", "action"=>"tag_with_content_in_the_block", "id"=>"", "controller"=>"tag_helper"}
|
5
|
+
~ {:after_filters_time=>6.0e-06, :before_filters_time=>6.0e-06, :action_time=>0.000538}
|
6
|
+
~ Params: {"format"=>"", "action"=>"tag_with_attributes", "id"=>"", "controller"=>"tag_helper"}
|
7
|
+
~ {:after_filters_time=>6.0e-06, :before_filters_time=>6.0e-06, :action_time=>0.000543}
|
8
|
+
~ Params: {"format"=>"", "action"=>"nested_tags", "id"=>"", "controller"=>"tag_helper"}
|
9
|
+
~ {:after_filters_time=>6.0e-06, :before_filters_time=>6.0e-06, :action_time=>0.000665}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: merb-helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael D. Ivey
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-10-
|
12
|
+
date: 2008-10-21 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -18,9 +18,9 @@ dependencies:
|
|
18
18
|
version_requirement:
|
19
19
|
version_requirements: !ruby/object:Gem::Requirement
|
20
20
|
requirements:
|
21
|
-
- - "
|
21
|
+
- - ">="
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: 0.9.
|
23
|
+
version: 0.9.10
|
24
24
|
version:
|
25
25
|
description: Helper support for Merb
|
26
26
|
email: ivey@gweezlebur.com
|
@@ -272,11 +272,13 @@ files:
|
|
272
272
|
- spec/fixture/public/merb.fcgi
|
273
273
|
- spec/fixture/public/stylesheets
|
274
274
|
- spec/fixture/public/stylesheets/master.css
|
275
|
+
- spec/merb.main.pid
|
275
276
|
- spec/merb_helpers_config_spec.rb
|
276
277
|
- spec/merb_helpers_date_time_spec.rb
|
277
278
|
- spec/merb_helpers_form_spec.rb
|
278
279
|
- spec/merb_helpers_tag_helper_spec.rb
|
279
280
|
- spec/merb_helpers_text_spec.rb
|
281
|
+
- spec/merb_test.log
|
280
282
|
- spec/numeric_extlib_spec.rb
|
281
283
|
- spec/ordinalize_spec.rb
|
282
284
|
- spec/spec_helper.rb
|
@@ -303,7 +305,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
303
305
|
requirements: []
|
304
306
|
|
305
307
|
rubyforge_project: merb
|
306
|
-
rubygems_version: 1.
|
308
|
+
rubygems_version: 1.3.0
|
307
309
|
signing_key:
|
308
310
|
specification_version: 2
|
309
311
|
summary: Helper support for Merb
|