tabs_on_rails 1.3.1 → 1.3.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,13 @@
1
1
  = Changelog
2
2
 
3
+
4
+ == Release 1.3.2
5
+
6
+ * CHANGED: Use Bundler to declare dependencies.
7
+
8
+ * FIXED: Some Rails 2 user can experience a NoMethodError: undefined method `html_safe'.
9
+
10
+
3
11
  == Release 1.3.1
4
12
 
5
13
  * FIXED: Error wrong number of arguments (2 for 3) (closes #3)
@@ -1,7 +1,7 @@
1
- = TabsOnRails
1
+ = Tabs on Rails
2
2
 
3
- TabsOnRails is a simple Rails plugin for creating and managing Tabs.
4
- It provides helpers for creating tabs with a flexible interface.
3
+ *TabsOnRails* is a simple Rails plugin for creating tabs and navigation menus.
4
+ It provides helpers for generating navigation menus with a flexible interface.
5
5
 
6
6
 
7
7
  == Requirements
@@ -13,22 +13,21 @@ or
13
13
 
14
14
  * Rails 3
15
15
 
16
- Warning: TabsOnRails doesn't work with Rails 2.1 or previous versions
16
+ Warning: *TabsOnRails* doesn't work with Rails 2.1 or previous versions
17
17
  (see {this comment}[http://www.simonecarletti.com/blog/2009/04/tabsonrails/#comment-2901]
18
18
  and {this commit}[http://github.com/weppos/tabs_on_rails/commit/d5ae9f401e3d0acc87251fa8957a8625e90ba4b3]).
19
19
 
20
20
 
21
21
  == Installation
22
22
 
23
- === As a Gem (Rails 2)
23
+ === As a Gem
24
24
 
25
- RubyGems is the preferred way to install TabsOnRails and the best way if you want install a stable version.
26
- The GEM is hosted on {RubyGems}[http://rubygems.org/gems/tabs_on_rails].
25
+ {RubyGems}[http://rubygems.org] is the preferred way to install *TabsOnRails* and the best way if you want install a stable version.
27
26
 
28
27
  $ gem install tabs_on_rails
29
28
 
30
- With Rails >= 2.2, specify the Gem dependency in your environment.rb file so that Rails
31
- will automatically check the requirement on startup.
29
+ With Rails >= 2.2, specify the Gem dependency in your <tt>environment.rb</tt>
30
+ file so that Rails will automatically check the requirement on startup.
32
31
 
33
32
  Rails::Initializer.run do |config|
34
33
 
@@ -39,7 +38,8 @@ will automatically check the requirement on startup.
39
38
 
40
39
  end
41
40
 
42
- With Rails 3, specify the Gem dependency in the {Bundler}[http://gembundler.com/] Gemfile.
41
+ With Rails 3, specify the Gem dependency in the
42
+ {Bundler}[http://gembundler.com] Gemfile.
43
43
 
44
44
  gem "tabs_on_rails"
45
45
 
@@ -49,7 +49,8 @@ With Rails 3, specify the Gem dependency in the {Bundler}[http://gembundler.com/
49
49
  $ script/plugin install git://github.com/weppos/tabs_on_rails.git
50
50
 
51
51
  Warning: this method is deprecated and will be removed in a future version.
52
- Use Bundler and the {:git option}[http://gembundler.com/v1.0/git.html]
52
+ Use {Bundler}[http://gembundler.com]
53
+ and the {:git option}[http://gembundler.com/v1.0/git.html]
53
54
  if you want to grab the latest version from the Git repository.
54
55
 
55
56
 
@@ -74,14 +75,15 @@ The example above produces the following HTML output.
74
75
  The usage is similar to the Rails route file.
75
76
  You create named tabs with the syntax <tt>tab.name_of_tab</tt>.
76
77
 
77
- The name you use creating a tab is the same you're going to refer to in your controller
78
- when you want to mark a tab as the current tab.
78
+ The name you use creating a tab is the same you're going to refer to
79
+ in your controller when you want to mark a tab as the current tab.
79
80
 
80
81
  class DashboardController < ApplicationController
81
82
  set_tab :dashboard
82
83
  end
83
84
 
84
- Now, if the action belongs to <tt>DashboardController</tt>, the template will automatically render the following HTML code.
85
+ Now, if the action belongs to <tt>DashboardController</tt>,
86
+ the template will automatically render the following HTML code.
85
87
 
86
88
  <ul>
87
89
  <li><a href="/">Homepage</a></li>
@@ -89,7 +91,8 @@ Now, if the action belongs to <tt>DashboardController</tt>, the template will au
89
91
  <li><a href="/account">Account</a></li>
90
92
  </ul>
91
93
 
92
- Use the <tt>current_tab</tt> helper method if you need to access the value of current tab in your controller or template.
94
+ Use the <tt>current_tab</tt> helper method if you need to access
95
+ the value of current tab in your controller or template.
93
96
 
94
97
  class DashboardController < ApplicationController
95
98
  set_tab :dashboard
@@ -314,7 +317,6 @@ This is the final result.
314
317
  * {Homepage}[http://www.simonecarletti.com/code/tabs_on_rails]
315
318
  * {Source}[http://github.com/weppos/tabs_on_rails]
316
319
  * {API Documentation}[http://www.simonecarletti.com/code/tabs_on_rails/api/]
317
- * {Wiki}[http://code.simonecarletti.com/projects/tabsonrails]
318
320
  * {Bugs & Features}[http://github.com/weppos/tabs_on_rails/issues]
319
321
 
320
322
 
data/Rakefile CHANGED
@@ -61,7 +61,7 @@ spec = Gem::Specification.new do |s|
61
61
  s.rdoc_options = %w(--main README.rdoc)
62
62
 
63
63
  # Add any extra files to include in the gem (like your README)
64
- s.files = %w(Rakefile init.rb) + Dir.glob("*.{rdoc,gemspec}") + Dir.glob("{test,lib,rails}/**/*")
64
+ s.files = %w( Rakefile init.rb ) + Dir.glob("*.{rdoc,gemspec}") + Dir.glob("{test,lib,rails}/**/*")
65
65
  s.require_paths = ["lib"]
66
66
 
67
67
  # If you want to depend on other gems, add them here, along with any
@@ -69,7 +69,7 @@ spec = Gem::Specification.new do |s|
69
69
  # s.add_dependency("some_other_gem", "~> 0.1.0")
70
70
 
71
71
  # If your tests use any gems, include them here
72
- # s.add_development_dependency("mocha") # for example
72
+ s.add_development_dependency("bundler")
73
73
  end
74
74
 
75
75
  # This task actually builds the gem. We also regenerate a static
@@ -21,8 +21,17 @@ require 'tabs_on_rails/version'
21
21
 
22
22
 
23
23
  module TabsOnRails
24
-
24
+
25
25
  NAME = "Tabs on Rails"
26
26
  GEM = "tabs_on_rails"
27
27
 
28
28
  end
29
+
30
+ # Compatibility with Rails 2
31
+ unless "".respond_to?(:html_safe)
32
+ class String
33
+ def html_safe
34
+ self
35
+ end
36
+ end
37
+ end
@@ -82,7 +82,7 @@ module TabsOnRails
82
82
  # Implements Builder#close_tabs.
83
83
  #
84
84
  def close_tabs(options = {})
85
- "</ul>".try(:html_safe)
85
+ "</ul>".html_safe
86
86
  end
87
87
 
88
88
  end
@@ -16,15 +16,17 @@
16
16
 
17
17
  module TabsOnRails
18
18
 
19
+ # Holds information about library version.
19
20
  module Version
20
21
  MAJOR = 1
21
22
  MINOR = 3
22
- PATCH = 1
23
+ PATCH = 2
23
24
  BUILD = nil
24
25
 
25
26
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join(".")
26
27
  end
27
28
 
29
+ # The current library version.
28
30
  VERSION = Version::STRING
29
31
 
30
32
  end
@@ -0,0 +1,30 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = %q{tabs_on_rails}
5
+ s.version = "1.3.1"
6
+
7
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
+ s.authors = ["Simone Carletti"]
9
+ s.date = %q{2010-08-16}
10
+ s.description = %q{ TabsOnRails is a simple Ruby on Rails plugin for creating and managing Tabs. It provides helpers for creating tabs with a flexible interface.
11
+ }
12
+ s.email = %q{weppos@weppos.net}
13
+ s.extra_rdoc_files = ["CHANGELOG.rdoc", "LICENSE.rdoc", "README.rdoc"]
14
+ s.files = ["Rakefile", "init.rb", "CHANGELOG.rdoc", "LICENSE.rdoc", "README.rdoc", "test/controller_mixin_test.rb", "test/fixtures/mixin/default.html.erb", "test/fixtures/mixin/with_item_options.html.erb", "test/fixtures/mixin/with_open_close_tabs.html.erb", "test/tabs/builder_test.rb", "test/tabs/tabs_builder_test.rb", "test/tabs_test.rb", "test/test_helper.rb", "lib/tabs_on_rails/controller_mixin.rb", "lib/tabs_on_rails/railtie.rb", "lib/tabs_on_rails/tabs/builder.rb", "lib/tabs_on_rails/tabs/tabs_builder.rb", "lib/tabs_on_rails/tabs.rb", "lib/tabs_on_rails/version.rb", "lib/tabs_on_rails.rb", "rails/init.rb"]
15
+ s.homepage = %q{http://www.simonecarletti.com/code/tabs_on_rails}
16
+ s.rdoc_options = ["--main", "README.rdoc"]
17
+ s.require_paths = ["lib"]
18
+ s.rubygems_version = %q{1.3.7}
19
+ s.summary = %q{A simple Ruby on Rails plugin for creating and managing Tabs.}
20
+
21
+ if s.respond_to? :specification_version then
22
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
23
+ s.specification_version = 3
24
+
25
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
26
+ else
27
+ end
28
+ else
29
+ end
30
+ end
@@ -1,12 +1,7 @@
1
1
  require 'rubygems'
2
- gem 'rails', '~>2.3.5'
3
- gem 'mocha', '~>0.9.8'
4
-
5
- # Remember! Due to some Mocha internal changes,
6
- # Rails 2.2.x requires Mocha 0.9.5 and
7
- # Rails 2.3.x requires Mocha 0.9.7
8
- # gem 'rails', '2.2.2'
9
- # gem 'mocha', '0.9.5'
2
+ require 'bundler'
3
+ Bundler.setup(:default, :test)
4
+
10
5
 
11
6
  require 'test/unit'
12
7
  require 'active_support'
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tabs_on_rails
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 31
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 3
9
- - 1
10
- version: 1.3.1
9
+ - 2
10
+ version: 1.3.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Simone Carletti
@@ -15,10 +15,23 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-08-16 00:00:00 +02:00
18
+ date: 2010-12-21 00:00:00 +01:00
19
19
  default_executable:
20
- dependencies: []
21
-
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: bundler
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ hash: 3
30
+ segments:
31
+ - 0
32
+ version: "0"
33
+ type: :development
34
+ version_requirements: *id001
22
35
  description: " TabsOnRails is a simple Ruby on Rails plugin for creating and managing Tabs. It provides helpers for creating tabs with a flexible interface.\n"
23
36
  email: weppos@weppos.net
24
37
  executables: []
@@ -35,6 +48,7 @@ files:
35
48
  - CHANGELOG.rdoc
36
49
  - LICENSE.rdoc
37
50
  - README.rdoc
51
+ - tabs_on_rails.gemspec
38
52
  - test/controller_mixin_test.rb
39
53
  - test/fixtures/mixin/default.html.erb
40
54
  - test/fixtures/mixin/with_item_options.html.erb