weppos-helperful 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.rdoc CHANGED
@@ -1,6 +1,11 @@
1
1
  = Changelog
2
2
 
3
3
 
4
+ == Release 0.5.0
5
+
6
+ * REMOVED: ContentHelper#sidebar method. It was nothing special and just a wrapper for a simple Rails execution.
7
+
8
+
4
9
  == Release 0.4.0
5
10
 
6
11
  * ADDED: javascript and stylesheet AssetTag Helpers.
data/Manifest CHANGED
@@ -21,10 +21,7 @@ test/asset_tag_helper_test.rb
21
21
  test/content_helper_test.rb
22
22
  test/fixtures/content/has_content.html.erb
23
23
  test/fixtures/content/has_content_is_called_alone.html.erb
24
- test/fixtures/content/sidebar.html.erb
25
- test/fixtures/content/sidebar_concatenate.html.erb
26
24
  test/fixtures/layouts/has_content.html.erb
27
- test/fixtures/layouts/sidebar.html.erb
28
25
  test/helperful_test.rb
29
26
  test/javascript_helper_test.rb
30
27
  test/test_helper.rb
data/README.rdoc CHANGED
@@ -127,19 +127,6 @@ The <tt>tradedoubler_verification_tag</tt> helper method returns the site verifi
127
127
 
128
128
  Provides a set of helpers for capturing and working with your page content in a more effective way.
129
129
 
130
- The <tt>sidebar</tt> helper method is a syntactic sugar addition to store content for your website sidebars.
131
-
132
- <% sidebar do %>
133
- <div>This is a sidebar module.</div>
134
- <% end %>
135
- <% sidebar do %>
136
- <div>This is an other sidebar module.</div>
137
- <% end %>
138
-
139
- <%= yield :sidebar # Produces the following output %>
140
- <div>This is an other sidebar module.</div>
141
- <div>This is a sidebar module.</div>
142
-
143
130
  The <tt>has_content?</tt> helper is a natural fulfillment for the original <tt>content_for</tt> helper.
144
131
 
145
132
  <% content_for :foo do %>
data/helperful.gemspec CHANGED
@@ -2,16 +2,16 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{helperful}
5
- s.version = "0.4.0"
5
+ s.version = "0.5.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 = ["Simone Carletti"]
9
- s.date = %q{2009-06-30}
9
+ s.date = %q{2009-07-03}
10
10
  s.description = %q{ Helperful aims to be a collection of useful and reusable Rails helpers.
11
11
  }
12
12
  s.email = %q{weppos@weppos.net}
13
13
  s.extra_rdoc_files = ["CHANGELOG.rdoc", "lib/helperful/affiliations_helper.rb", "lib/helperful/asset_tag_helper.rb", "lib/helperful/content_helper.rb", "lib/helperful/deprecations.rb", "lib/helperful/javascript_helper.rb", "lib/helperful/title_helper.rb", "lib/helperful/version.rb", "lib/helperful.rb", "LICENSE.rdoc", "README.rdoc"]
14
- s.files = ["CHANGELOG.rdoc", "helperful.gemspec", "init.rb", "install.rb", "lib/helperful/affiliations_helper.rb", "lib/helperful/asset_tag_helper.rb", "lib/helperful/content_helper.rb", "lib/helperful/deprecations.rb", "lib/helperful/javascript_helper.rb", "lib/helperful/title_helper.rb", "lib/helperful/version.rb", "lib/helperful.rb", "LICENSE.rdoc", "Manifest", "rails/init.rb", "Rakefile", "README.rdoc", "tasks/helperful_tasks.rake", "test/affiliations_helper_test.rb", "test/asset_tag_helper_test.rb", "test/content_helper_test.rb", "test/fixtures/content/has_content.html.erb", "test/fixtures/content/has_content_is_called_alone.html.erb", "test/fixtures/content/sidebar.html.erb", "test/fixtures/content/sidebar_concatenate.html.erb", "test/fixtures/layouts/has_content.html.erb", "test/fixtures/layouts/sidebar.html.erb", "test/helperful_test.rb", "test/javascript_helper_test.rb", "test/test_helper.rb", "test/title_helper_test.rb", "uninstall.rb"]
14
+ s.files = ["CHANGELOG.rdoc", "helperful.gemspec", "init.rb", "install.rb", "lib/helperful/affiliations_helper.rb", "lib/helperful/asset_tag_helper.rb", "lib/helperful/content_helper.rb", "lib/helperful/deprecations.rb", "lib/helperful/javascript_helper.rb", "lib/helperful/title_helper.rb", "lib/helperful/version.rb", "lib/helperful.rb", "LICENSE.rdoc", "Manifest", "rails/init.rb", "Rakefile", "README.rdoc", "tasks/helperful_tasks.rake", "test/affiliations_helper_test.rb", "test/asset_tag_helper_test.rb", "test/content_helper_test.rb", "test/fixtures/content/has_content.html.erb", "test/fixtures/content/has_content_is_called_alone.html.erb", "test/fixtures/layouts/has_content.html.erb", "test/helperful_test.rb", "test/javascript_helper_test.rb", "test/test_helper.rb", "test/title_helper_test.rb", "uninstall.rb"]
15
15
  s.homepage = %q{http://code.simonecarletti.com/helperful}
16
16
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Helperful", "--main", "README.rdoc"]
17
17
  s.require_paths = ["lib"]
@@ -39,27 +39,6 @@ module Helperful
39
39
  end
40
40
  end
41
41
 
42
- #
43
- # Evaluates the content of <tt>block</tt> and stores the result as <tt>content_for :sidebar</tt>.
44
- #
45
- # Because <tt>content_for</tt> concatenates the block, you can call <tt>sidebar</tt> multiple time
46
- # and yield all the final content once.
47
- #
48
- # See <tt>ActionView::Helpers::CaptureHelper#content_for</tt> for the full API documentation.
49
- #
50
- # ==== Examples
51
- #
52
- # <% sidebar do %>
53
- # <p>Sidebar</p>
54
- # <% end %>
55
- #
56
- # <%= yield :sidebar %>
57
- # # => <p>Sidebar</p>
58
- #
59
- def sidebar(&block)
60
- content_for :sidebar, &block
61
- end
62
-
63
42
  #
64
43
  # Returns <tt>true</tt> if <tt>name</tt> has any content,
65
44
  # in other workds if content_for(name) has ever been called.
@@ -19,7 +19,7 @@ module Helperful
19
19
 
20
20
  module Version
21
21
  MAJOR = 0
22
- MINOR = 4
22
+ MINOR = 5
23
23
  TINY = 0
24
24
 
25
25
  STRING = [MAJOR, MINOR, TINY].join('.')
@@ -27,6 +27,6 @@ module Helperful
27
27
 
28
28
  VERSION = Version::STRING
29
29
  STATUS = 'alpha'
30
- BUILD = ''.match(/(\d+)/).to_a.first
30
+ BUILD = nil
31
31
 
32
32
  end
@@ -6,14 +6,6 @@ class ContentController < ActionController::Base
6
6
 
7
7
  helperful "content"
8
8
 
9
- def sidebar
10
- render :layout => "sidebar"
11
- end
12
-
13
- def sidebar_concatenate
14
- render :layout => "sidebar"
15
- end
16
-
17
9
  def has_content
18
10
  render :layout => "has_content"
19
11
  end
@@ -38,16 +30,6 @@ class ContentTest < ActiveSupport::TestCase
38
30
  @request.host = "test.host"
39
31
  end
40
32
 
41
- def test_sidebar
42
- get :sidebar
43
- assert_equal expected_sidebar_content_for_output, @response.body
44
- end
45
-
46
- def test_sidebar_concatenate
47
- get :sidebar_concatenate
48
- assert_equal expected_sidebar_content_for_output, @response.body
49
- end
50
-
51
33
  def test_has_content
52
34
  get :has_content
53
35
  assert_equal %Q{
@@ -63,19 +45,5 @@ class ContentTest < ActiveSupport::TestCase
63
45
  assert_response :success
64
46
  assert_equal('bar', @response.body)
65
47
  end
66
-
67
- protected
68
-
69
- def expected_sidebar_content_for_output
70
- <<-EOS
71
- <title>This is the title</title>
72
- <div id="first">
73
- <p>First Sidebar</p>
74
- </div>
75
- <div id="second">
76
- <p>Second Sidebar</p>
77
- </div>
78
- EOS
79
- end
80
48
 
81
49
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: weppos-helperful
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simone Carletti
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-06-30 00:00:00 -07:00
12
+ date: 2009-07-03 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -84,10 +84,7 @@ files:
84
84
  - test/content_helper_test.rb
85
85
  - test/fixtures/content/has_content.html.erb
86
86
  - test/fixtures/content/has_content_is_called_alone.html.erb
87
- - test/fixtures/content/sidebar.html.erb
88
- - test/fixtures/content/sidebar_concatenate.html.erb
89
87
  - test/fixtures/layouts/has_content.html.erb
90
- - test/fixtures/layouts/sidebar.html.erb
91
88
  - test/helperful_test.rb
92
89
  - test/javascript_helper_test.rb
93
90
  - test/test_helper.rb
@@ -1,8 +0,0 @@
1
- <% sidebar do -%>
2
- <div id="first">
3
- <p>First Sidebar</p>
4
- </div>
5
- <div id="second">
6
- <p>Second Sidebar</p>
7
- </div>
8
- <% end %>
@@ -1,10 +0,0 @@
1
- <% sidebar do -%>
2
- <div id="first">
3
- <p>First Sidebar</p>
4
- </div>
5
- <% end %>
6
- <% sidebar do -%>
7
- <div id="second">
8
- <p>Second Sidebar</p>
9
- </div>
10
- <% end %>
@@ -1,2 +0,0 @@
1
- <title>This is the title</title>
2
- <%= yield :sidebar %>