twitter-bootstrap-markup-rails 0.3.2 → 0.3.2.1

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/.travis.yml CHANGED
@@ -1,8 +1,13 @@
1
1
  language: ruby
2
+
2
3
  rvm:
3
4
  - 1.8.7
4
- #- ree
5
5
  - 1.9.2
6
6
  - 1.9.3
7
- #- jruby
8
7
  - rbx
8
+
9
+ gemfile:
10
+ - Gemfile
11
+ - rails-3.gemfile
12
+ - rails-3.1.gemfile
13
+ - rails-3.2.gemfile
data/CONTRIBUTORS.md CHANGED
@@ -5,3 +5,5 @@ Carlos Vilhena, https://github.com/carvil
5
5
  Cristian Bica, https://github.com/cristianbica
6
6
  Ryan Feng, https://github.com/rfeng
7
7
  Kai Schlichting, https://github.com/lacco
8
+ Ryan Wilcox, https://github.com/rwilcox
9
+ Vince Cima, https://github.com/vincecima
data/Gemfile CHANGED
@@ -3,13 +3,10 @@ source 'https://rubygems.org'
3
3
  # Specify your gem's dependencies in bootstrap-rails.gemspec
4
4
  gemspec
5
5
 
6
+ gem "rails"
7
+
6
8
  group :development do
7
- gem "rails"
8
- gem "rspec-rails"
9
- gem "rspec_tag_matchers"
10
- gem "rake"
11
9
  gem "yard"
12
10
  gem "redcarpet"
13
11
  gem "yard-tomdoc"
14
- gem "simple-navigation"
15
12
  end
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  <table>
4
4
  <tr>
5
5
  <th>Version</th>
6
- <td>v0.3.2</td>
6
+ <td>v0.3.2.1</td>
7
7
  </tr>
8
8
  <tr>
9
9
  <th>Build Status</th>
@@ -27,7 +27,7 @@ This gem focuses on making it easier to use Twitter's Bootstrap 2.0. It's a coll
27
27
  Add to your `Gemfile`:
28
28
 
29
29
  ```ruby
30
- gem 'twitter-bootstrap-markup-rails', '0.3.2'
30
+ gem 'twitter-bootstrap-markup-rails', '0.3.2.1'
31
31
  ```
32
32
 
33
33
  ## Currently Supported
@@ -40,6 +40,7 @@ module Twitter::Bootstrap::Markup::Rails::Components
40
40
  classes = %w( nav )
41
41
  classes << "nav-#{ options[:type] || "tabs" }"
42
42
  classes << "nav-stacked" if options[:stacked]
43
+ classes << options[:custom_classes]
43
44
  classes.join(" ")
44
45
  end
45
46
  end
@@ -8,6 +8,7 @@ module Twitter::Bootstrap::Markup::Rails::Helpers
8
8
  # @param [Hash] options hash containing options (default: {}):
9
9
  # :type - could be either 'tabs' or 'pills'. Default is 'tabs'.
10
10
  # :stacked - if true, renders the navigation list in stacked mode.
11
+ # :custom_classes - add additional classes to the navigation UL
11
12
  #
12
13
  # Examples
13
14
  #
@@ -55,7 +55,8 @@ class SimpleNavigation::Renderer::BootstrapTopbarList < SimpleNavigation::Render
55
55
  opts = special_options.merge(link_options)
56
56
  opts[:class] = [link_options[:class], item.selected_class, dropdown_link_class(item)].flatten.compact.join(' ')
57
57
  if include_sub_navigation?(item) && !options[:is_subnavigation]
58
- opts['data-toggle'] = 'dropdown'
58
+ opts[:'data-toggle'] = 'dropdown'
59
+ opts[:'data-target'] = '#'
59
60
  end
60
61
  opts.delete(:class) if opts[:class].nil? || opts[:class] == ''
61
62
  opts
@@ -2,7 +2,7 @@ module Twitter
2
2
  module Bootstrap
3
3
  module Markup
4
4
  module Rails
5
- VERSION = "0.3.2"
5
+ VERSION = "0.3.2.1"
6
6
  end
7
7
  end
8
8
  end
data/rails-3.1.gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in bootstrap-rails.gemspec
4
+ gemspec
5
+
6
+ gem "rails", '~> 3.1.0'
data/rails-3.2.gemfile ADDED
@@ -0,0 +1,7 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in bootstrap-rails.gemspec
4
+ gemspec
5
+
6
+ gem "rails", '~> 3.2.0'
7
+
data/rails-3.gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in bootstrap-rails.gemspec
4
+ gemspec
5
+
6
+ gem "rails", '~> 3.0.0'
@@ -22,6 +22,18 @@ describe Twitter::Bootstrap::Markup::Rails::Helpers::NavigationHelpers do
22
22
  end
23
23
  end
24
24
 
25
+ it "should create a basic navigation list of type tabs with a custom, user specified, ID" do
26
+ build_bootstrap_navigation(:custom_classes => "testing") do |nav|
27
+ nav.link_to "Nav1", "/link1", :active_nav => true
28
+ nav.link_to "Nav2", "/link2"
29
+ end
30
+
31
+ output_buffer.should have_tag('ul.nav.nav-tabs.testing') do |ul|
32
+ ul.should have_tag('li[@class="active"] a[@href="/link1"]')
33
+ ul.should have_tag('li a[@href="/link1"]')
34
+ end
35
+ end
36
+
25
37
  it "should create a basic navigation list of type pills" do
26
38
  build_bootstrap_navigation(:type => "pills") do |nav|
27
39
  nav.link_to "Nav1", "/link1"
data/spec/spec_helper.rb CHANGED
@@ -1,10 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
- if RUBY_VERSION =~ /^1\.9/
4
- require 'simplecov'
5
- ENV["COVERAGE"] && SimpleCov.start
6
- end
7
-
8
3
  require File.expand_path(File.join(File.dirname(__FILE__), '../lib/twitter-bootstrap-markup-rails'))
9
4
  require File.expand_path(File.join(File.dirname(__FILE__), '../lib/twitter-bootstrap-markup-rails/engine'))
10
5
 
@@ -17,4 +17,7 @@ Gem::Specification.new do |gem|
17
17
  gem.platform = Gem::Platform::RUBY
18
18
 
19
19
  gem.add_dependency "railties", "~> 3.0"
20
+ gem.add_development_dependency "rspec-rails"
21
+ gem.add_development_dependency "rspec_tag_matchers"
22
+ gem.add_development_dependency "simple-navigation"
20
23
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twitter-bootstrap-markup-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -27,6 +27,54 @@ dependencies:
27
27
  - - ~>
28
28
  - !ruby/object:Gem::Version
29
29
  version: '3.0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: rspec-rails
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: rspec_tag_matchers
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ - !ruby/object:Gem::Dependency
63
+ name: simple-navigation
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ type: :development
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
30
78
  description: Ruby on Rails helpers for Bootstrap 2.0 - HTML, CSS, and JS toolkit from
31
79
  Twitter
32
80
  email:
@@ -71,6 +119,9 @@ files:
71
119
  - lib/twitter-bootstrap-markup-rails/plugins/simple_navigation/renderer/bootstrap_topbar_list.rb
72
120
  - lib/twitter-bootstrap-markup-rails/version.rb
73
121
  - log/development.log
122
+ - rails-3.1.gemfile
123
+ - rails-3.2.gemfile
124
+ - rails-3.gemfile
74
125
  - spec/helpers/alert_helpers_spec.rb
75
126
  - spec/helpers/button_helpers_spec.rb
76
127
  - spec/helpers/form_helpers_spec.rb