doc 0.2.7 → 0.2.8

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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'doc'
5
- s.version = '0.2.7'
5
+ s.version = '0.2.8'
6
6
  s.summary = %q{Get all ruby documentation in one place}
7
7
  s.description = %Q{Generate `Rakefile` with `docr` and get searchable documentation for ruby, rails, gems, plugins and all other ruby code in one place}
8
8
  s.homepage = "http://github.com/toy/#{s.name}"
@@ -26,6 +26,7 @@ module Doc
26
26
  end
27
27
  if [:separate, :integrate].include?(@format)
28
28
  @stdlib_config = stdlib_config(update) or raise 'can\'t get stdlib config'
29
+ stdlib_config_path.touch
29
30
  end
30
31
 
31
32
  @except_regexp = /^(?:lib|ext)\/(?:#{Array(config[:except]).map(&Regexp.method(:escape)).join('|')})(?:.rb$|\/)/
@@ -4,8 +4,10 @@ require 'progress'
4
4
  module Doc
5
5
  class Documentor
6
6
  attr_reader :title, :min_update_interval, :clean_after, :configurators
7
- attr_reader :base_dir, :sources_dir, :docs_dir, :public_dir
7
+ attr_reader :base_dir, :sources_dir, :docs_dir, :public_dir, :started
8
8
  def initialize(*arguments, &block)
9
+ @started = Time.now
10
+
9
11
  config = RootConfig.new(self, *arguments, &block)
10
12
  config.check_options!([], [:title, :min_update_interval, :clean_after, :public_dir])
11
13
 
@@ -45,13 +47,15 @@ module Doc
45
47
  end
46
48
 
47
49
  def build(update = false)
48
- started = Time.now
49
50
  root_task = config(update)
50
51
 
51
52
  root_task.run
52
53
 
53
54
  if clean_after
54
- (sources_dir.directory? ? sources_dir.children : [] + docs_dir.children).each do |dir|
55
+ candidates = []
56
+ candidates += sources_dir.children if sources_dir.directory?
57
+ candidates += docs_dir.children if docs_dir.directory?
58
+ candidates.each do |dir|
55
59
  if started - dir.mtime > clean_after
56
60
  dir.rmtree_verbose
57
61
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: doc
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 7
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 7
10
- version: 0.2.7
9
+ - 8
10
+ version: 0.2.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ivan Kuchin
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-01-03 00:00:00 Z
18
+ date: 2012-01-14 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: sdoc
@@ -155,7 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
155
155
  requirements: []
156
156
 
157
157
  rubyforge_project: doc
158
- rubygems_version: 1.8.12
158
+ rubygems_version: 1.8.13
159
159
  signing_key:
160
160
  specification_version: 3
161
161
  summary: Get all ruby documentation in one place