tabit 0.3.4 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
data/lib/tabit/config.rb CHANGED
@@ -3,6 +3,7 @@ module Tabit
3
3
  class Config
4
4
  attr_accessor :builder_class
5
5
 
6
+ attr_accessor :active_scope
6
7
  attr_accessor :active_detect
7
8
  attr_accessor :active_class
8
9
  attr_accessor :heading_class
@@ -11,6 +12,7 @@ module Tabit
11
12
  def initialize(&block)
12
13
  @builder_class = Tabit::Builder
13
14
 
15
+ @active_scope = :outer
14
16
  @active_detect = :exclusive
15
17
  @active_class = 'active'
16
18
  @heading_class = 'nav-header'
data/lib/tabit/item.rb CHANGED
@@ -61,9 +61,16 @@ module Tabit
61
61
  ''
62
62
  end
63
63
 
64
- options[:outer][:class] = '' if @options[:outer][:class].nil?
65
- options[:outer][:class] << " #{clazz}"
66
- options[:outer][:class].strip!
64
+ case configuration.active_scope
65
+ when :outer
66
+ options[:outer][:class] = '' if @options[:outer][:class].nil?
67
+ options[:outer][:class] << " #{clazz}"
68
+ options[:outer][:class].strip!
69
+ when :inner
70
+ options[:inner][:class] = '' if @options[:inner][:class].nil?
71
+ options[:inner][:class] << " #{clazz}"
72
+ options[:inner][:class].strip!
73
+ end
67
74
 
68
75
  case @type
69
76
  when :dropdown
data/lib/tabit/version.rb CHANGED
@@ -2,8 +2,8 @@
2
2
  module Tabit
3
3
  module Version
4
4
  MAJOR = 0
5
- MINOR = 3
6
- PATCH = 4
5
+ MINOR = 4
6
+ PATCH = 0
7
7
  BUILD = nil
8
8
 
9
9
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.')
data/tabit.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "tabit"
8
- s.version = "0.3.4"
8
+ s.version = "0.4.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Thomas Boerger"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tabit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.4.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -147,7 +147,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
147
147
  version: '0'
148
148
  segments:
149
149
  - 0
150
- hash: -3872227393288834238
150
+ hash: 1497893305618295686
151
151
  required_rubygems_version: !ruby/object:Gem::Requirement
152
152
  none: false
153
153
  requirements: