fusionary-easel_helpers 0.2.2 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/easel_helpers.gemspec +2 -2
- data/lib/easel_helpers/helpers/form_helper.rb +2 -2
- data/lib/easel_helpers/helpers/grid_helper.rb +1 -1
- data/lib/easel_helpers/helpers/structure_helper.rb +2 -2
- data/lib/easel_helpers/helpers/table_helper.rb +5 -7
- data/test/grid_helper_test.rb +4 -2
- 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.2.
|
6
|
+
Echoe.new("easel_helpers", "0.2.4") 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.2.
|
5
|
+
s.version = "0.2.4"
|
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-20}
|
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/flash_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"]
|
@@ -16,7 +16,7 @@ module EaselHelpers
|
|
16
16
|
|
17
17
|
css_classes = clean_css_classes(css_classes, {"last" => last_column})
|
18
18
|
|
19
|
-
html = clean_column
|
19
|
+
html = clean_column(css_classes) do
|
20
20
|
content_tag(:div, capture(&block), options.merge(:class => css_classes))
|
21
21
|
end
|
22
22
|
|
@@ -38,7 +38,7 @@ module EaselHelpers
|
|
38
38
|
|
39
39
|
css_classes = clean_css_classes(css_classes, {"last" => last_column})
|
40
40
|
|
41
|
-
html = clean_column
|
41
|
+
html = clean_column(css_classes) do
|
42
42
|
content_tag(:fieldset, legend + capture(&block), options.merge(:class => css_classes))
|
43
43
|
end
|
44
44
|
|
@@ -111,7 +111,7 @@ module EaselHelpers
|
|
111
111
|
size = :full if size.blank?
|
112
112
|
|
113
113
|
increase_depth(size)
|
114
|
-
output_tag = generate_output_tag(size, args, &block)
|
114
|
+
output_tag = generate_output_tag(size, *args, &block)
|
115
115
|
|
116
116
|
if block_given? && block_is_within_action_view?(block)
|
117
117
|
concat(output_tag)
|
@@ -6,7 +6,7 @@ module EaselHelpers
|
|
6
6
|
options = args.extract_options!
|
7
7
|
author = options.delete(:author)
|
8
8
|
|
9
|
-
bq = content_tag(:blockquote,
|
9
|
+
bq = content_tag(:blockquote,
|
10
10
|
(option_quote = textilize(options.delete(:quote))).blank? ? capture(&block) : option_quote
|
11
11
|
)
|
12
12
|
|
@@ -30,7 +30,7 @@ module EaselHelpers
|
|
30
30
|
if block_given?
|
31
31
|
block = lambda { yield }
|
32
32
|
html = content_tag(:body, capture(&block), @_page_body_attributes)
|
33
|
-
|
33
|
+
concat(html)
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
@@ -19,16 +19,14 @@ module EaselHelpers
|
|
19
19
|
head = [header].flatten
|
20
20
|
opts = head.extract_options!
|
21
21
|
|
22
|
-
css_classes = [] << case index
|
22
|
+
css_classes = [] << opts.delete(:class) << case index
|
23
23
|
when 0 then "first"
|
24
24
|
when (options[:headers].size - 1) then "last"
|
25
25
|
end
|
26
26
|
|
27
|
-
css_classes << opts.delete(:class)
|
28
|
-
|
29
27
|
headers << if head.first =~ /^\<th/
|
30
28
|
th = Hpricot(head.first)
|
31
|
-
th.at("th")["class"] = clean_css_classes([th.at("th")[
|
29
|
+
th.at("th")["class"] = clean_css_classes([th.at("th")["class"].to_s, css_classes])
|
32
30
|
th.to_html
|
33
31
|
else
|
34
32
|
content_tag(:th, head.first, opts.merge(:class => clean_css_classes(css_classes)))
|
@@ -38,9 +36,9 @@ module EaselHelpers
|
|
38
36
|
table_css_classes = ["recordset"] << options[:table].delete(:class) << args
|
39
37
|
|
40
38
|
css_classes = clean_css_classes(table_css_classes, {"last" => last_column})
|
41
|
-
html = clean_column
|
42
|
-
content_tag(:table,
|
43
|
-
content_tag(:thead, content_tag(:tr, headers.to_s)) + capture(&block),
|
39
|
+
html = clean_column(css_classes) do
|
40
|
+
content_tag(:table,
|
41
|
+
content_tag(:thead, content_tag(:tr, headers.to_s)) + capture(&block),
|
44
42
|
options[:table].merge(:class => css_classes, :cellspacing => 0))
|
45
43
|
end
|
46
44
|
|
data/test/grid_helper_test.rb
CHANGED
@@ -5,7 +5,7 @@ class GridHelperTest < EaselHelpers::ViewTestCase
|
|
5
5
|
template = %(
|
6
6
|
<% container do %>
|
7
7
|
<% column do %>
|
8
|
-
<% column :half do %>
|
8
|
+
<% column :half, :id => "primary" do %>
|
9
9
|
<% column :one_third do %>
|
10
10
|
one third of one half of 24 is 4
|
11
11
|
<% end %>
|
@@ -15,7 +15,7 @@ class GridHelperTest < EaselHelpers::ViewTestCase
|
|
15
15
|
<hr/>
|
16
16
|
more text
|
17
17
|
<% end %>
|
18
|
-
<% column :half, :last do %>
|
18
|
+
<% column :half, :last, :id => "secondary" do %>
|
19
19
|
second column
|
20
20
|
<% end %>
|
21
21
|
<hr/>
|
@@ -28,6 +28,8 @@ class GridHelperTest < EaselHelpers::ViewTestCase
|
|
28
28
|
assert_select ".container", 1
|
29
29
|
assert_select ".col-24", 1
|
30
30
|
assert_select ".col-12", 2
|
31
|
+
assert_select ".col-12#primary", 1
|
32
|
+
assert_select ".col-12#secondary", 1
|
31
33
|
assert_select ".col-4", 2
|
32
34
|
assert_select ".prepend-4", 1
|
33
35
|
assert_select ".col-24.col-last", 0
|
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.2.
|
4
|
+
version: 0.2.4
|
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-20 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|