cocoadex 1.5.2 → 1.6

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/lib/cocoadex.rb CHANGED
@@ -10,8 +10,8 @@ require 'cocoadex/model'
10
10
  require 'cocoadex/parser'
11
11
  require 'cocoadex/keyword'
12
12
  require 'cocoadex/tools/completion_helper'
13
- require 'extensions'
14
- require 'progressbar'
13
+ require 'cocoadex/extensions'
14
+ require 'ruby-progressbar'
15
15
  require 'term/ansicolor'
16
16
 
17
17
  module Cocoadex
@@ -0,0 +1,4 @@
1
+ require File.expand_path File.join(__FILE__,'../../ext/nil')
2
+ require File.expand_path File.join(__FILE__,'../../ext/string')
3
+ require File.expand_path File.join(__FILE__,'../../ext/xml_element')
4
+ require File.expand_path File.join(__FILE__,'../../ext/template_helpers')
@@ -35,12 +35,14 @@ module Cocoadex
35
35
 
36
36
  files = Dir.glob(docset_path+"/**/*.html").select {|f| not ignored?(f) }
37
37
 
38
- pbar = ProgressBar.new("#{docset.platform} #{docset.version}",files.size)
39
- files.each_with_index do |f,i|
40
- index_html(docset,f,i)
41
- pbar.inc
38
+ if files.size > 0
39
+ pbar = ProgressBar.create(:title => "#{docset.platform} #{docset.version}",:total => files.size)
40
+ files.each_with_index do |f,i|
41
+ index_html(docset,f,i)
42
+ pbar.increment
43
+ end
44
+ pbar.finish
42
45
  end
43
- pbar.finish
44
46
 
45
47
  logger.info " Tokens Indexed: #{Tokenizer.tokens.size}"
46
48
  docset
@@ -1,3 +1,3 @@
1
1
  module Cocoadex
2
- VERSION = "1.5.2"
2
+ VERSION = "1.6"
3
3
  end
data/lib/ext/nil.rb CHANGED
@@ -8,6 +8,10 @@ class NilClass
8
8
  ""
9
9
  end
10
10
 
11
+ def first
12
+ nil
13
+ end
14
+
11
15
  def css selector
12
16
  nil
13
17
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoadex
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.2
4
+ version: '1.6'
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-27 00:00:00.000000000 Z
12
+ date: 2012-09-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rdoc
@@ -142,8 +142,8 @@ files:
142
142
  - bin/cocoadex
143
143
  - bin/cdex_completion
144
144
  - lib/cocoadex.rb
145
- - lib/extensions.rb
146
145
  - lib/cocoadex/docset_helper.rb
146
+ - lib/cocoadex/extensions.rb
147
147
  - lib/cocoadex/keyword.rb
148
148
  - lib/cocoadex/model.rb
149
149
  - lib/cocoadex/models/callback.rb
data/lib/extensions.rb DELETED
@@ -1,4 +0,0 @@
1
- require 'ext/nil'
2
- require 'ext/string'
3
- require 'ext/xml_element'
4
- require 'ext/template_helpers'