sdoc 0.2.17 → 0.2.18
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/VERSION.yml +1 -1
- data/lib/sdoc/github.rb +10 -13
- data/lib/sdoc/merge.rb +2 -2
- data/sdoc.gemspec +2 -2
- metadata +3 -3
data/Rakefile
CHANGED
@@ -47,5 +47,5 @@ begin
|
|
47
47
|
symlink File.expand_path('.'), path
|
48
48
|
end
|
49
49
|
rescue LoadError
|
50
|
-
puts "Jeweler not available. Install it with: sudo gem install
|
50
|
+
puts "Jeweler not available. Install it with: (sudo) gem install jeweler"
|
51
51
|
end
|
data/VERSION.yml
CHANGED
data/lib/sdoc/github.rb
CHANGED
@@ -18,10 +18,16 @@ module SDoc::GitHub
|
|
18
18
|
end
|
19
19
|
|
20
20
|
protected
|
21
|
-
|
21
|
+
|
22
|
+
def have_git?
|
23
|
+
@have_git = system('git --version > /dev/null 2>&1') if @have_git.nil?
|
24
|
+
@have_git
|
25
|
+
end
|
26
|
+
|
22
27
|
def commit_sha1(path)
|
28
|
+
return false unless have_git?
|
23
29
|
name = File.basename(path)
|
24
|
-
s =
|
30
|
+
s = Dir.chdir(File.join(basedir, File.dirname(path))) do
|
25
31
|
`git log -1 --pretty=format:"commit %H" #{name}`
|
26
32
|
end
|
27
33
|
m = s.match(/commit\s+(\S+)/)
|
@@ -29,7 +35,8 @@ module SDoc::GitHub
|
|
29
35
|
end
|
30
36
|
|
31
37
|
def repository_url(path)
|
32
|
-
|
38
|
+
return false unless have_git?
|
39
|
+
s = Dir.chdir(File.join(basedir, File.dirname(path))) do
|
33
40
|
`git config --get remote.origin.url`
|
34
41
|
end
|
35
42
|
m = s.match(%r{github.com[/:](.*)\.git$})
|
@@ -50,15 +57,5 @@ module SDoc::GitHub
|
|
50
57
|
path = File.dirname(path)
|
51
58
|
end
|
52
59
|
''
|
53
|
-
end
|
54
|
-
|
55
|
-
def in_dir(dir)
|
56
|
-
pwd = Dir.pwd
|
57
|
-
Dir.chdir dir
|
58
|
-
return yield
|
59
|
-
rescue Exception => e
|
60
|
-
return ''
|
61
|
-
ensure
|
62
|
-
Dir.chdir pwd
|
63
60
|
end
|
64
61
|
end
|
data/lib/sdoc/merge.rb
CHANGED
@@ -82,7 +82,7 @@ class SDoc::Merge
|
|
82
82
|
dst = File.join @op_dir, RDoc::Generator::SHtml::TREE_FILE
|
83
83
|
FileUtils.mkdir_p File.dirname(dst)
|
84
84
|
File.open(dst, "w", 0644) do |f|
|
85
|
-
f.write('var tree = '); f.write(tree.to_json)
|
85
|
+
f.write('var tree = '); f.write(tree.to_json(:max_nesting => 35))
|
86
86
|
end
|
87
87
|
end
|
88
88
|
|
@@ -216,4 +216,4 @@ class SDoc::Merge
|
|
216
216
|
raise RDoc::Error, msg
|
217
217
|
end
|
218
218
|
|
219
|
-
end
|
219
|
+
end
|
data/sdoc.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{sdoc}
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.18"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Volodya Kolesnikov"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-06-02}
|
13
13
|
s.email = %q{voloko@gmail.com}
|
14
14
|
s.executables = ["sdoc", "sdoc-merge"]
|
15
15
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 2
|
8
|
-
-
|
9
|
-
version: 0.2.
|
8
|
+
- 18
|
9
|
+
version: 0.2.18
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Volodya Kolesnikov
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-06-02 00:00:00 +04:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|