fusionary-easel_helpers 0.1.9 → 0.2.0
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/easel_helpers.gemspec +2 -2
- data/lib/easel_helpers/helpers/form_helper.rb +1 -1
- data/test/form_helper_test.rb +11 -3
- metadata +2 -2
data/Rakefile
CHANGED
@@ -3,7 +3,7 @@ require 'rake/testtask'
|
|
3
3
|
require 'rake/rdoctask'
|
4
4
|
require 'echoe'
|
5
5
|
|
6
|
-
Echoe.new("easel_helpers", "0.
|
6
|
+
Echoe.new("easel_helpers", "0.2.0") do |p|
|
7
7
|
p.description = "Fusionary Rails View Helpers"
|
8
8
|
p.url = "http://github.com/fusionary/easel_helpers"
|
9
9
|
p.author = "Joshua Clayton"
|
data/easel_helpers.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{easel_helpers}
|
5
|
-
s.version = "0.
|
5
|
+
s.version = "0.2.0"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Joshua Clayton"]
|
9
|
-
s.date = %q{2009-05-
|
9
|
+
s.date = %q{2009-05-12}
|
10
10
|
s.description = %q{Fusionary Rails View Helpers}
|
11
11
|
s.email = %q{joshua.clayton@gmail.com}
|
12
12
|
s.extra_rdoc_files = ["lib/easel_helpers/helpers/date_helper.rb", "lib/easel_helpers/helpers/form_helper.rb", "lib/easel_helpers/helpers/grid_helper.rb", "lib/easel_helpers/helpers/link_helper.rb", "lib/easel_helpers/helpers/structure_helper.rb", "lib/easel_helpers/helpers/table_helper.rb", "lib/easel_helpers/helpers.rb", "lib/easel_helpers/rails_partial_caching.rb", "lib/easel_helpers.rb", "README.textile", "tasks/easel_helpers_tasks.rake"]
|
@@ -5,7 +5,7 @@ module EaselHelpers
|
|
5
5
|
def submit_button(value, *args)
|
6
6
|
options = args.extract_options!
|
7
7
|
css_classes = ["btn"] << options.delete(:class) << args
|
8
|
-
content_tag(:button, "<span>#{value}</span>", {:type => "submit", :class => clean_css_classes(css_classes, {"last" => last_column})}.merge(options))
|
8
|
+
content_tag(:button, "<span>#{value}</span>", {:value => value, :type => "submit", :class => clean_css_classes(css_classes, {"last" => last_column})}.merge(options))
|
9
9
|
end
|
10
10
|
|
11
11
|
def set(*args, &block)
|
data/test/form_helper_test.rb
CHANGED
@@ -6,7 +6,7 @@ class FormHelperTest < EaselHelpers::ViewTestCase
|
|
6
6
|
|
7
7
|
should "default with the correct structure" do
|
8
8
|
show_view "<%= submit_button 'Create' %>" do
|
9
|
-
assert_select "button.btn[type=submit]" do
|
9
|
+
assert_select "button.btn[type=submit][value=Create]" do
|
10
10
|
assert_select "span", "Create"
|
11
11
|
end
|
12
12
|
end
|
@@ -14,7 +14,7 @@ class FormHelperTest < EaselHelpers::ViewTestCase
|
|
14
14
|
|
15
15
|
should "allow adding additional classes" do
|
16
16
|
show_view "<%= submit_button 'Create', 'adtl-class', :dumb %>" do
|
17
|
-
assert_select "button.btn.adtl-class.dumb[type=submit]" do
|
17
|
+
assert_select "button.btn.adtl-class.dumb[type=submit][value=Create]" do
|
18
18
|
assert_select "span", "Create"
|
19
19
|
end
|
20
20
|
end
|
@@ -22,7 +22,15 @@ class FormHelperTest < EaselHelpers::ViewTestCase
|
|
22
22
|
|
23
23
|
should "handle additional attributes set" do
|
24
24
|
show_view "<%= submit_button 'Create', :kls, :id => 'my-id', :type => 'image' %>" do
|
25
|
-
assert_select "button.btn.kls#my-id[type=image]" do
|
25
|
+
assert_select "button.btn.kls#my-id[type=image][value=Create]" do
|
26
|
+
assert_select "span", "Create"
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
should "allow overriding of value" do
|
32
|
+
show_view "<%= submit_button 'Create', :value => 'override' %>" do
|
33
|
+
assert_select "button.btn[type=submit][value=override]" do
|
26
34
|
assert_select "span", "Create"
|
27
35
|
end
|
28
36
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fusionary-easel_helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joshua Clayton
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-05-
|
12
|
+
date: 2009-05-12 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|