corundum 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- data/doc/Specifications +1 -1
- data/doc/coverage/index.html +791 -587
- data/lib/corundum/gemcutter.rb +0 -1
- data/lib/corundum/github-pages.rb +38 -26
- data/lib/corundum/rspec.rb +2 -0
- data/lib/corundum/yardoc.rb +38 -17
- data/spec/smoking_spec.rb +2 -1
- metadata +5 -8
data/lib/corundum/gemcutter.rb
CHANGED
@@ -24,13 +24,14 @@ module Corundum
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def needed?
|
27
|
-
|
27
|
+
return true unless File.directory? target_dir
|
28
|
+
Dir.chdir target_dir do
|
28
29
|
super
|
29
30
|
end
|
30
31
|
end
|
31
32
|
|
32
33
|
def action
|
33
|
-
|
34
|
+
Dir.chdir target_dir do
|
34
35
|
super
|
35
36
|
end
|
36
37
|
end
|
@@ -72,34 +73,14 @@ module Corundum
|
|
72
73
|
|
73
74
|
def define
|
74
75
|
in_namespace do
|
75
|
-
InDirCommandTask.new(self) do |t|
|
76
|
-
t.task_name = :on_branch
|
77
|
-
t.verify_command = Mattock::PipelineChain.new do |chain|
|
78
|
-
chain.add git_command(%w{branch})
|
79
|
-
chain.add Mattock::CommandLine.new("grep", "-q", "'^[*] #{branch}'")
|
80
|
-
end
|
81
|
-
t.command = Mattock::PrereqChain.new do |chain|
|
82
|
-
chain.add git_command("checkout", branch)
|
83
|
-
end
|
84
|
-
end
|
85
|
-
|
86
76
|
file repo_dir do
|
87
77
|
fail "Refusing to clobber existing #{target_dir}" if File.exists?(target_dir)
|
88
78
|
|
89
79
|
url = git("config", "--get", "remote.origin.url").first
|
90
|
-
|
91
|
-
git("clone", url.chomp, "-b", branch, target_dir)
|
92
|
-
Mattock::CommandLine.new("rm", File::join(repo_dir, "hooks", "*")).must_succeed!
|
80
|
+
git("clone", url.chomp, target_dir)
|
93
81
|
end
|
94
82
|
|
95
|
-
|
96
|
-
FileUtils.cd target_dir do
|
97
|
-
git("pull")
|
98
|
-
end
|
99
|
-
end
|
100
|
-
|
101
|
-
InDirCommandTask.new(self) do |t|
|
102
|
-
t.task_name = :setup
|
83
|
+
InDirCommandTask.new(self, :remote_branch => repo_dir) do |t|
|
103
84
|
t.verify_command = Mattock::PipelineChain.new do |chain|
|
104
85
|
chain.add git_command(%w{branch -r})
|
105
86
|
chain.add Mattock::CommandLine.new("grep", "-q", branch)
|
@@ -112,9 +93,40 @@ module Corundum
|
|
112
93
|
cmd.add git_command("branch", "--set-upstream", branch, "origin/" + branch)
|
113
94
|
end
|
114
95
|
end
|
115
|
-
task :setup => repo_dir
|
116
96
|
|
117
|
-
|
97
|
+
InDirCommandTask.new(self, :local_branch => :remote_branch) do |t|
|
98
|
+
t.verify_command = Mattock::PipelineChain.new do |chain|
|
99
|
+
chain.add git_command(%w{branch})
|
100
|
+
chain.add Mattock::CommandLine.new("grep", "-q", "'#{branch}'")
|
101
|
+
end
|
102
|
+
t.command = Mattock::PrereqChain.new do |chain|
|
103
|
+
chain.add git_command("checkout", "-t", branch)
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
107
|
+
InDirCommandTask.new(self, :on_branch => [:remote_branch, :local_branch]) do |t|
|
108
|
+
t.verify_command = Mattock::PipelineChain.new do |chain|
|
109
|
+
chain.add git_command(%w{branch})
|
110
|
+
chain.add Mattock::CommandLine.new("grep", "-q", "'^[*] #{branch}'")
|
111
|
+
end
|
112
|
+
t.command = Mattock::PrereqChain.new do |chain|
|
113
|
+
chain.add git_command("checkout", branch)
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
117
|
+
task :pull => [repo_dir, :on_branch] do
|
118
|
+
FileUtils.cd target_dir do
|
119
|
+
git("pull")
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
task :cleanup_repo => repo_dir do
|
124
|
+
Mattock::CommandLine.new("rm", "-f", File::join(repo_dir, "hooks", "*")).must_succeed!
|
125
|
+
end
|
126
|
+
|
127
|
+
file target_dir => [:on_branch, :cleanup_repo]
|
128
|
+
|
129
|
+
task :pre_publish => [repo_dir, target_dir, :pull]
|
118
130
|
|
119
131
|
task :clobber_target => :on_branch do
|
120
132
|
Mattock::CommandLine.new(*%w{rm -rf}) do |cmd|
|
data/lib/corundum/rspec.rb
CHANGED
@@ -17,6 +17,7 @@ module Corundum
|
|
17
17
|
:warning, :rspec_path, :rspec_opts, :failure_message, :files_to_run
|
18
18
|
|
19
19
|
def default_configuration(rspec)
|
20
|
+
super
|
20
21
|
self.pattern = rspec.pattern
|
21
22
|
self.ruby_opts = rspec.ruby_opts
|
22
23
|
self.rspec_configs = rspec.rspec_configs
|
@@ -44,6 +45,7 @@ module Corundum
|
|
44
45
|
cmd.add ruby_command
|
45
46
|
cmd.add runner_command
|
46
47
|
end
|
48
|
+
super
|
47
49
|
end
|
48
50
|
end
|
49
51
|
|
data/lib/corundum/yardoc.rb
CHANGED
@@ -2,24 +2,55 @@ require 'corundum/tasklib'
|
|
2
2
|
require 'yard'
|
3
3
|
|
4
4
|
module Corundum
|
5
|
-
class
|
6
|
-
|
5
|
+
class DocumentationTask < TaskLib
|
6
|
+
setting :entry_point
|
7
|
+
setting :target_dir
|
8
|
+
setting :browser
|
9
|
+
|
10
|
+
def default_configuration(toolkit)
|
11
|
+
self.browser = toolkit.browser
|
12
|
+
end
|
13
|
+
|
14
|
+
def resolve_configuration
|
15
|
+
self.entry_point ||= File::join(target_dir, "index.html")
|
16
|
+
end
|
17
|
+
|
18
|
+
def define
|
19
|
+
directory target_dir
|
20
|
+
|
21
|
+
in_namespace do
|
22
|
+
desc "Open up a browser to view your documentation"
|
23
|
+
BrowserTask.new(self) do |t|
|
24
|
+
t.index_html = entry_point
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
desc "Generate documentation based on code using YARD"
|
29
|
+
task root_task => entry_point
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
class YARDoc < DocumentationTask
|
34
|
+
default_namespace :yardoc
|
7
35
|
|
8
36
|
setting :gemspec
|
9
37
|
setting :options, nil
|
10
|
-
setting :
|
11
|
-
setting :yardoc_index, nil
|
38
|
+
setting :entry_point, nil
|
12
39
|
|
13
40
|
setting(:target_dir, "yardoc")
|
14
41
|
setting(:readme, nil)
|
15
42
|
setting(:files, nested(:code => [], :docs => []))
|
16
43
|
setting(:extra_files, [])
|
17
44
|
|
45
|
+
def document_inputs
|
46
|
+
FileList["README*"] + files.code + files.docs + extra_files
|
47
|
+
end
|
48
|
+
|
18
49
|
def default_configuration(toolkit)
|
50
|
+
super
|
19
51
|
self.gemspec = toolkit.gemspec
|
20
52
|
toolkit.files.copy_settings_to(self.files)
|
21
53
|
self.files.docs = []
|
22
|
-
self.browser = toolkit.browser
|
23
54
|
end
|
24
55
|
|
25
56
|
def resolve_configuration
|
@@ -30,26 +61,16 @@ module Corundum
|
|
30
61
|
unless files.docs.empty? and extra_files.empty?
|
31
62
|
self.options += [ "-" ] + files.docs + extra_files
|
32
63
|
end
|
33
|
-
self.yardoc_index ||= File::join(target_dir, "index.html")
|
34
64
|
end
|
35
65
|
|
36
66
|
def define
|
37
|
-
directory target_dir
|
38
|
-
|
39
67
|
in_namespace do
|
40
|
-
file
|
41
|
-
FileList["README*"] + files.code + files.docs + extra_files do
|
68
|
+
file entry_point => document_inputs do
|
42
69
|
YARD::CLI::Yardoc.run( *(options) )
|
43
70
|
end
|
44
|
-
|
45
|
-
desc "Open up a browser to view your documentation"
|
46
|
-
BrowserTask.new(self) do |t|
|
47
|
-
t.index_html = yardoc_index
|
48
|
-
end
|
49
71
|
end
|
50
72
|
|
51
|
-
|
52
|
-
task root_task => yardoc_index
|
73
|
+
super
|
53
74
|
end
|
54
75
|
end
|
55
76
|
end
|
data/spec/smoking_spec.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: corundum
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.10
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Judson Lester
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2012-02-
|
13
|
+
date: 2012-02-04 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: corundum
|
@@ -129,10 +129,7 @@ dependencies:
|
|
129
129
|
requirements:
|
130
130
|
- - ">="
|
131
131
|
- !ruby/object:Gem::Version
|
132
|
-
|
133
|
-
- 0
|
134
|
-
- 1
|
135
|
-
version: "0.1"
|
132
|
+
version: 0.1.2
|
136
133
|
type: :runtime
|
137
134
|
prerelease: false
|
138
135
|
version_requirements: *id010
|
@@ -280,7 +277,7 @@ rdoc_options:
|
|
280
277
|
- --main
|
281
278
|
- doc/README
|
282
279
|
- --title
|
283
|
-
- corundum-0.0.
|
280
|
+
- corundum-0.0.10 RDoc
|
284
281
|
require_paths:
|
285
282
|
- lib/
|
286
283
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -288,7 +285,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
288
285
|
requirements:
|
289
286
|
- - ">="
|
290
287
|
- !ruby/object:Gem::Version
|
291
|
-
hash:
|
288
|
+
hash: -641191571
|
292
289
|
segments:
|
293
290
|
- 0
|
294
291
|
version: "0"
|