robinsp-robinsp-robins_html_helpers 0.1.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.
@@ -0,0 +1 @@
1
+ # Helpers for HTML stuff I use frequently.
@@ -0,0 +1,15 @@
1
+ # Rakefile
2
+ require 'rubygems'
3
+ require 'rake'
4
+ require 'echoe'
5
+
6
+ Echoe.new('robinsp-robins_html_helpers', '0.1.0') do |p|
7
+ p.description = "HTML stuff I use frequently."
8
+ p.url = "http://github.com/robinsp/robins_html_helpers"
9
+ p.author = "Robin Spainhour"
10
+ p.email = "robin@robinspainhour.com"
11
+ p.ignore_pattern = ["tmp/*", "script/*", ".project"]
12
+ p.development_dependencies = []
13
+ end
14
+
15
+ Dir["#{File.dirname(__FILE__)}/tasks/*.rake"].sort.each { |ext| load ext }
@@ -0,0 +1,44 @@
1
+ module RobinsHtmlHelpers
2
+
3
+ # TODO: Document the options argument
4
+ def boxed_content(options = {}, &block)
5
+ # Default class names
6
+ options[:bottom_left_class] ||= 'box_bottom_left'
7
+ options[:bottom_right_class] ||= 'box_bottom_right'
8
+ options[:top_left_class] ||= 'box_top_left'
9
+ options[:top_right_class] ||= 'box_top_right'
10
+
11
+ if options[:inner_class]
12
+ options[:inner_class] = options[:inner_class] + " " + options[:top_right_class]
13
+ else
14
+ options[:inner_class] = options[:top_right_class]
15
+ end
16
+
17
+ if options[:outer_class]
18
+ options[:outer_class] = options[:outer_class] + " " + options[:bottom_left_class]
19
+ else
20
+ options[:outer_class] = options[:bottom_left_class]
21
+ end
22
+
23
+ concat(
24
+
25
+ content_tag(:div, :style => "padding-top: 1px;") do # Extra div to fix margin problems in IE 6
26
+ content_tag(:div, :class => options[:outer_class], :id => options[:outer_id] ) do
27
+ content_tag(:div, :class => options[:bottom_right_class]) do
28
+ content_tag(:div, :class => options[:top_left_class]) do
29
+ content_tag(:div, :class => options[:inner_class], :id => options[:inner_id]) do
30
+ capture(&block)
31
+ end
32
+ end
33
+
34
+ end
35
+ end
36
+ end
37
+ )
38
+ end
39
+ end
40
+
41
+
42
+ ActionView::Base.class_eval do
43
+ include RobinsHtmlHelpers
44
+ end
@@ -0,0 +1,31 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = %q{robins_html_helpers}
5
+ s.version = "0.1.0"
6
+
7
+ s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
+ s.authors = ["Robin Spainhour"]
9
+ s.date = %q{2008-12-04}
10
+ s.description = %q{HTML stuff I use frequently.}
11
+ s.email = %q{robin@robinspainhour.com}
12
+ s.extra_rdoc_files = ["lib/robins_html_helpers.rb", "README.rdoc"]
13
+ s.files = ["Rakefile", "Manifest", "lib/robins_html_helpers.rb", "README.rdoc", "robins_html_helpers.gemspec"]
14
+ s.has_rdoc = true
15
+ s.homepage = %q{http://github.com/robinsp/robins_html_helpers}
16
+ s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Robins_html_helpers", "--main", "README.rdoc"]
17
+ s.require_paths = ["lib"]
18
+ s.rubyforge_project = %q{robins_html_helpers}
19
+ s.rubygems_version = %q{1.3.1}
20
+ s.summary = %q{HTML stuff I use frequently.}
21
+
22
+ if s.respond_to? :specification_version then
23
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
24
+ s.specification_version = 2
25
+
26
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
27
+ else
28
+ end
29
+ else
30
+ end
31
+ end
@@ -0,0 +1,31 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = %q{robinsp-robins_html_helpers}
5
+ s.version = "0.1.0"
6
+
7
+ s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
+ s.authors = ["Robin Spainhour"]
9
+ s.date = %q{2008-12-04}
10
+ s.description = %q{HTML stuff I use frequently.}
11
+ s.email = %q{robin@robinspainhour.com}
12
+ s.extra_rdoc_files = ["lib/robins_html_helpers.rb", "README.rdoc"]
13
+ s.files = ["robins_html_helpers.gemspec", "Rakefile", "Manifest", "lib/robins_html_helpers.rb", "README.rdoc", "robinsp-robins_html_helpers.gemspec"]
14
+ s.has_rdoc = true
15
+ s.homepage = %q{http://github.com/robinsp/robins_html_helpers}
16
+ s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Robinsp-robins_html_helpers", "--main", "README.rdoc"]
17
+ s.require_paths = ["lib"]
18
+ s.rubyforge_project = %q{robinsp-robins_html_helpers}
19
+ s.rubygems_version = %q{1.3.1}
20
+ s.summary = %q{HTML stuff I use frequently.}
21
+
22
+ if s.respond_to? :specification_version then
23
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
24
+ s.specification_version = 2
25
+
26
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
27
+ else
28
+ end
29
+ else
30
+ end
31
+ end
metadata ADDED
@@ -0,0 +1,64 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: robinsp-robinsp-robins_html_helpers
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Robin Spainhour
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2008-12-04 00:00:00 -08:00
13
+ default_executable:
14
+ dependencies: []
15
+
16
+ description: HTML stuff I use frequently.
17
+ email: robin@robinspainhour.com
18
+ executables: []
19
+
20
+ extensions: []
21
+
22
+ extra_rdoc_files:
23
+ - lib/robins_html_helpers.rb
24
+ - README.rdoc
25
+ files:
26
+ - robins_html_helpers.gemspec
27
+ - Rakefile
28
+ - Manifest
29
+ - lib/robins_html_helpers.rb
30
+ - README.rdoc
31
+ - robinsp-robins_html_helpers.gemspec
32
+ has_rdoc: true
33
+ homepage: http://github.com/robinsp/robins_html_helpers
34
+ post_install_message:
35
+ rdoc_options:
36
+ - --line-numbers
37
+ - --inline-source
38
+ - --title
39
+ - Robinsp-robins_html_helpers
40
+ - --main
41
+ - README.rdoc
42
+ require_paths:
43
+ - lib
44
+ required_ruby_version: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ version: "0"
49
+ version:
50
+ required_rubygems_version: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: "1.2"
55
+ version:
56
+ requirements: []
57
+
58
+ rubyforge_project: robinsp-robins_html_helpers
59
+ rubygems_version: 1.2.0
60
+ signing_key:
61
+ specification_version: 2
62
+ summary: HTML stuff I use frequently.
63
+ test_files: []
64
+