corundum 0.0.13 → 0.0.15
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/README.md +28 -6
- data/lib/corundum.rb +3 -114
- data/lib/corundum/configuration-store.rb +16 -0
- data/lib/corundum/core.rb +128 -0
- data/lib/corundum/documentation-task.rb +2 -2
- data/lib/corundum/documentation/yardoc.rb +21 -0
- data/lib/corundum/email.rb +2 -2
- data/lib/corundum/gem_building.rb +2 -2
- data/lib/corundum/gemcutter.rb +2 -2
- data/lib/corundum/gemspec_sanity.rb +2 -2
- data/lib/corundum/github-pages.rb +12 -6
- data/lib/corundum/questionable-content.rb +58 -0
- data/lib/corundum/rubyforge.rb +2 -2
- data/lib/corundum/tasklibs.rb +1 -0
- data/lib/corundum/version_control.rb +2 -2
- metadata +15 -10
- data/lib/corundum/configuration_store.rb +0 -38
- data/lib/corundum/tasklib.rb +0 -7
data/README.md
CHANGED
@@ -1,10 +1,12 @@
|
|
1
1
|
## Corundum
|
2
2
|
### Foolproof rubygems
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
4
|
+
With Corudum added as a developement dependancy to your gemspec, and configured
|
5
|
+
(quickly) in your Rakefile you can do:
|
6
|
+
|
7
|
+
rake release
|
8
|
+
|
9
|
+
and know that you're publishing something you won't be embarrassed by.
|
8
10
|
|
9
11
|
### (Yet Another Rubygems packager)
|
10
12
|
|
@@ -13,8 +15,26 @@ to generate code - it doesn't exist to build gems for you if you don't know
|
|
13
15
|
how. For that, check out Jeweler, and come back once you've understood what a
|
14
16
|
.gemspec is and how it works.
|
15
17
|
|
18
|
+
Really, writing a gem is pretty easy - you can do it in a gist if you want. And releasing Gems isn't all that hard either - rubygems has good tools to package up gems and push them to gem servers. So why Corundum?
|
19
|
+
|
20
|
+
Because releasing a gem that will actually help the Ruby community at large is
|
21
|
+
actually quite difficult. There are lot of fiddly details to get wrong, and
|
22
|
+
even experienced devs can be doofuses sometimes. Corundum serves as a
|
23
|
+
collection of safeguards against common errors in releasing gems - certainly
|
24
|
+
every one that's happened to me.
|
25
|
+
|
16
26
|
### Using Corundum
|
17
27
|
|
28
|
+
In your coolgem.gemspec:
|
29
|
+
|
30
|
+
spec.add_development_dependency "corundum"
|
31
|
+
|
32
|
+
In you Gemfile:
|
33
|
+
|
34
|
+
gemspec
|
35
|
+
|
36
|
+
(But you were doing that anyway, right?)
|
37
|
+
|
18
38
|
Check out this Rakefile:
|
19
39
|
|
20
40
|
require 'corundum/tasklibs'
|
@@ -43,8 +63,8 @@ Check out this Rakefile:
|
|
43
63
|
end
|
44
64
|
end
|
45
65
|
|
46
|
-
That's the whole thing. 'rake release' will push the current version of
|
47
|
-
gem, but only if we can go through a complete a correct QA process.
|
66
|
+
That's the whole thing. Now 'rake release' will push the current version of
|
67
|
+
the gem, but only if we can go through a complete a correct QA process.
|
48
68
|
(Incidentally, that's the Rakefile for Corundum itself.)
|
49
69
|
|
50
70
|
The other goal with Corundum is to present all of these tools as
|
@@ -54,3 +74,5 @@ to do
|
|
54
74
|
task :default => :release
|
55
75
|
|
56
76
|
Then 'rake' will do your releases.
|
77
|
+
|
78
|
+
Digging in, the first thing to look at is {Corundum::Toolkit}
|
data/lib/corundum.rb
CHANGED
@@ -1,117 +1,6 @@
|
|
1
|
-
require 'corundum/
|
2
|
-
require 'corundum/
|
3
|
-
|
4
|
-
#require 'rubygems'
|
5
|
-
#require 'rubygems/installer'
|
1
|
+
require 'corundum/configuration-store'
|
2
|
+
require 'corundum/core'
|
3
|
+
require 'mattock/tasklib'
|
6
4
|
|
7
5
|
module Corundum
|
8
|
-
extend Rake::DSL
|
9
|
-
|
10
|
-
class Toolkit < TaskLib
|
11
|
-
settings(
|
12
|
-
:gemspec => nil,
|
13
|
-
:gemspec_path => nil,
|
14
|
-
:corundum_dir => "corundum",
|
15
|
-
:finished_dir => nil,
|
16
|
-
:package_dir => "pkg",
|
17
|
-
:doc_dir => "rubydoc",
|
18
|
-
:browser => Corundum.user_preferences["browser"],
|
19
|
-
:finished_files => nested.nil_fields(:build, :qa, :package, :release, :press),
|
20
|
-
:files => nested.nil_fields(:code, :test, :docs),
|
21
|
-
:rubyforge => nested.nil_fields(:group_id, :package_id, :release_name, :home_page, :project_page),
|
22
|
-
:email => nested(
|
23
|
-
:servers => [ nested({ :server => "ruby-lang.org", :helo => "gmail.com" }) ],
|
24
|
-
:announce_to_email => "ruby-talk@ruby-lang.org"
|
25
|
-
),
|
26
|
-
:file_lists => nested(:code => FileList['lib/**/*.rb'],
|
27
|
-
:test => FileList['test/**/*.rb','spec/**/*.rb','features/**/*.rb'],
|
28
|
-
:docs => FileList['doc/**/*.rb'],
|
29
|
-
:project => FileList['Rakefile'],
|
30
|
-
:all => nil)
|
31
|
-
)
|
32
|
-
|
33
|
-
def load_gemspec
|
34
|
-
@gemspec_path ||= guess_gemspec
|
35
|
-
@gemspec ||= Gem::Specification::load(gemspec_path)
|
36
|
-
return gemspec
|
37
|
-
end
|
38
|
-
|
39
|
-
def resolve_configuration
|
40
|
-
load_gemspec
|
41
|
-
|
42
|
-
self.finished_dir ||= File::join(corundum_dir, "finished")
|
43
|
-
@finished_files.build ||= File::join( package_dir, "#{gemspec.full_name}.gem")
|
44
|
-
|
45
|
-
@finished_files.qa ||= File::join( finished_dir, "qa_#{gemspec.version}")
|
46
|
-
@finished_files.release ||= File::join( finished_dir, "release_#{gemspec.version}")
|
47
|
-
@finished_files.press ||= File::join( finished_dir, "press_#{gemspec.version}")
|
48
|
-
|
49
|
-
@files.code ||= gemspec.files.grep(%r{^lib/})
|
50
|
-
@files.test ||= gemspec.files.grep(%r{^spec/})
|
51
|
-
@files.docs ||= gemspec.files.grep(%r{^doc/})
|
52
|
-
|
53
|
-
@file_lists.project << gemspec_path
|
54
|
-
@file_lists.all ||=
|
55
|
-
file_lists.code +
|
56
|
-
file_lists.test +
|
57
|
-
file_lists.docs
|
58
|
-
|
59
|
-
@rubyforge.group_id ||= gemspec.rubyforge_project
|
60
|
-
@rubyforge.package_id ||= gemspec.name.downcase
|
61
|
-
@rubyforge.release_name ||= gemspec.full_name
|
62
|
-
@rubyforge.home_page ||= gemspec.homepage
|
63
|
-
@rubyforge.project_page ||= "http://rubyforge.org/project/#{gemspec.rubyforge_project}/"
|
64
|
-
end
|
65
|
-
|
66
|
-
def guess_gemspec
|
67
|
-
speclist = Dir[File.expand_path("*.gemspec", Rake::original_dir)]
|
68
|
-
if speclist.length == 0
|
69
|
-
puts "Found no *.gemspec files"
|
70
|
-
exit 1
|
71
|
-
elsif speclist.length > 1
|
72
|
-
puts "Found too many *.gemspec files: #{speclist.inspect}"
|
73
|
-
exit 1
|
74
|
-
end
|
75
|
-
speclist[0]
|
76
|
-
end
|
77
|
-
|
78
|
-
def define
|
79
|
-
in_namespace do
|
80
|
-
directory finished_dir
|
81
|
-
|
82
|
-
desc "Run preflight checks"
|
83
|
-
task :preflight
|
84
|
-
|
85
|
-
desc "Run quality assurance tasks"
|
86
|
-
task :qa => [:preflight, finished_files.qa]
|
87
|
-
file finished_files.qa =>
|
88
|
-
[finished_dir] + file_lists.project + file_lists.code + file_lists.test do |task|
|
89
|
-
Rake::Task[:qa].invoke #because I don't want this to be needed if it's not
|
90
|
-
touch task.name
|
91
|
-
end
|
92
|
-
|
93
|
-
desc "Build the package"
|
94
|
-
task :build => [finished_files.qa, :preflight, finished_files.build]
|
95
|
-
file finished_files.build =>
|
96
|
-
[finished_dir] + file_lists.code + file_lists.project do |task|
|
97
|
-
Rake::Task[:build].invoke
|
98
|
-
touch task.name
|
99
|
-
end
|
100
|
-
|
101
|
-
desc "Push package out to the world"
|
102
|
-
task :release => [finished_files.build, :preflight, finished_files.release]
|
103
|
-
file finished_files.release => [finished_dir] do |task|
|
104
|
-
Rake::Task[:release].invoke
|
105
|
-
touch task.name
|
106
|
-
end
|
107
|
-
|
108
|
-
desc "Announce publication"
|
109
|
-
task :press => [finished_files.release, finished_files.press]
|
110
|
-
file finished_files.press => [finished_dir] do |task|
|
111
|
-
Rake::Task[:press].invoke
|
112
|
-
touch task.name
|
113
|
-
end
|
114
|
-
end
|
115
|
-
end
|
116
|
-
end
|
117
6
|
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'mattock/configuration-store'
|
2
|
+
module Corundum
|
3
|
+
def self.configuration_store
|
4
|
+
@configuration_store ||=
|
5
|
+
Mattock::ConfigurationStore.new("corundum",
|
6
|
+
File::expand_path("../default_configuration", __FILE__))
|
7
|
+
end
|
8
|
+
|
9
|
+
def self.register_project(rakefile)
|
10
|
+
configuration_store.register_search_path(rakefile)
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.user_preferences
|
14
|
+
configuration_store.user_preferences
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,128 @@
|
|
1
|
+
require 'corundum'
|
2
|
+
require 'mattock/tasklib'
|
3
|
+
|
4
|
+
module Corundum
|
5
|
+
#This is the core tasklib for Corundum. It defines a series of lifecycle
|
6
|
+
#steps that define the release process. The real work is done by other
|
7
|
+
#Tasklibs that hook into the lifecycle.
|
8
|
+
#
|
9
|
+
#The lifecycle steps (as implied by the Rakefile definition) are:
|
10
|
+
#
|
11
|
+
#[ preflight ] simple tests before we do anything at all
|
12
|
+
#[ qa ]
|
13
|
+
# quality assurance - make sure everything is acceptable
|
14
|
+
# before we build the gem
|
15
|
+
# [build] construct the actual gem
|
16
|
+
# [release] push the gem out to the world
|
17
|
+
# [press] send out notifications that the gem has been published
|
18
|
+
class Core < Mattock::TaskLib
|
19
|
+
settings(
|
20
|
+
:gemspec => nil,
|
21
|
+
:gemspec_path => nil,
|
22
|
+
:corundum_dir => "corundum",
|
23
|
+
:finished_dir => nil,
|
24
|
+
:package_dir => "pkg",
|
25
|
+
:doc_dir => "rubydoc",
|
26
|
+
:browser => Corundum.user_preferences["browser"],
|
27
|
+
:finished_files => nested.nil_fields(:build, :qa, :package, :release, :press),
|
28
|
+
:files => nested.nil_fields(:code, :test, :docs),
|
29
|
+
:rubyforge => nested.nil_fields(:group_id, :package_id, :release_name, :home_page, :project_page),
|
30
|
+
:email => nested(
|
31
|
+
:servers => [ nested({ :server => "ruby-lang.org", :helo => "gmail.com" }) ],
|
32
|
+
:announce_to_email => "ruby-talk@ruby-lang.org"
|
33
|
+
),
|
34
|
+
:file_lists => nested(:code => FileList['lib/**/*.rb'],
|
35
|
+
:test => FileList['test/**/*.rb','spec/**/*.rb','features/**/*.rb'],
|
36
|
+
:docs => FileList['doc/**/*.rb'],
|
37
|
+
:project => FileList['Rakefile'],
|
38
|
+
:all => nil)
|
39
|
+
)
|
40
|
+
|
41
|
+
def load_gemspec
|
42
|
+
@gemspec_path ||= guess_gemspec
|
43
|
+
@gemspec ||= Gem::Specification::load(gemspec_path)
|
44
|
+
return gemspec
|
45
|
+
end
|
46
|
+
|
47
|
+
def resolve_configuration
|
48
|
+
load_gemspec
|
49
|
+
|
50
|
+
self.finished_dir ||= File::join(corundum_dir, "finished")
|
51
|
+
@finished_files.build ||= File::join( package_dir, "#{gemspec.full_name}.gem")
|
52
|
+
|
53
|
+
@finished_files.qa ||= File::join( finished_dir, "qa_#{gemspec.version}")
|
54
|
+
@finished_files.release ||= File::join( finished_dir, "release_#{gemspec.version}")
|
55
|
+
@finished_files.press ||= File::join( finished_dir, "press_#{gemspec.version}")
|
56
|
+
|
57
|
+
@files.code ||= gemspec.files.grep(%r{^lib/})
|
58
|
+
@files.test ||= gemspec.files.grep(%r{^spec/})
|
59
|
+
@files.docs ||= gemspec.files.grep(%r{^doc/})
|
60
|
+
|
61
|
+
@file_lists.project << gemspec_path
|
62
|
+
@file_lists.all ||=
|
63
|
+
file_lists.code +
|
64
|
+
file_lists.test +
|
65
|
+
file_lists.docs
|
66
|
+
|
67
|
+
@rubyforge.group_id ||= gemspec.rubyforge_project
|
68
|
+
@rubyforge.package_id ||= gemspec.name.downcase
|
69
|
+
@rubyforge.release_name ||= gemspec.full_name
|
70
|
+
@rubyforge.home_page ||= gemspec.homepage
|
71
|
+
@rubyforge.project_page ||= "http://rubyforge.org/project/#{gemspec.rubyforge_project}/"
|
72
|
+
end
|
73
|
+
|
74
|
+
def guess_gemspec
|
75
|
+
speclist = Dir[File.expand_path("*.gemspec", Rake::original_dir)]
|
76
|
+
if speclist.length == 0
|
77
|
+
puts "Found no *.gemspec files"
|
78
|
+
exit 1
|
79
|
+
elsif speclist.length > 1
|
80
|
+
puts "Found too many *.gemspec files: #{speclist.inspect}"
|
81
|
+
exit 1
|
82
|
+
end
|
83
|
+
speclist[0]
|
84
|
+
end
|
85
|
+
|
86
|
+
def define
|
87
|
+
in_namespace do
|
88
|
+
directory finished_dir
|
89
|
+
|
90
|
+
desc "Run preflight checks"
|
91
|
+
task :preflight
|
92
|
+
|
93
|
+
desc "Run quality assurance tasks"
|
94
|
+
task :qa => [:preflight, finished_files.qa]
|
95
|
+
file finished_files.qa =>
|
96
|
+
[finished_dir] + file_lists.project + file_lists.code + file_lists.test do |task|
|
97
|
+
Rake::Task[:qa].invoke #because I don't want this to be needed if it's not
|
98
|
+
touch task.name
|
99
|
+
end
|
100
|
+
|
101
|
+
desc "Build the package"
|
102
|
+
task :build => [finished_files.qa, :preflight, finished_files.build]
|
103
|
+
file finished_files.build =>
|
104
|
+
[finished_dir] + file_lists.code + file_lists.project do |task|
|
105
|
+
Rake::Task[:build].invoke
|
106
|
+
touch task.name
|
107
|
+
end
|
108
|
+
|
109
|
+
desc "Push package out to the world"
|
110
|
+
task :release => [finished_files.build, :preflight, finished_files.release]
|
111
|
+
file finished_files.release => [finished_dir] do |task|
|
112
|
+
Rake::Task[:release].invoke
|
113
|
+
touch task.name
|
114
|
+
end
|
115
|
+
|
116
|
+
desc "Announce publication"
|
117
|
+
task :press => [finished_files.release, finished_files.press]
|
118
|
+
file finished_files.press => [finished_dir] do |task|
|
119
|
+
Rake::Task[:press].invoke
|
120
|
+
touch task.name
|
121
|
+
end
|
122
|
+
end
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
126
|
+
#deprecated name for Core
|
127
|
+
Toolkit = Core
|
128
|
+
end
|
@@ -14,6 +14,14 @@ module Corundum
|
|
14
14
|
:files => nested(:code => [], :docs => []),
|
15
15
|
:extra_files => [] )
|
16
16
|
|
17
|
+
settings(:server_options => [],
|
18
|
+
:server => nested(
|
19
|
+
:port => 8888,
|
20
|
+
:docroot => "/tmp/yard",
|
21
|
+
:plugins => [])
|
22
|
+
)
|
23
|
+
|
24
|
+
|
17
25
|
def document_inputs
|
18
26
|
FileList["README*"] + files.code + files.docs + extra_files
|
19
27
|
end
|
@@ -34,6 +42,14 @@ module Corundum
|
|
34
42
|
end
|
35
43
|
super
|
36
44
|
self.options += [ "--output-dir", target_dir]
|
45
|
+
|
46
|
+
|
47
|
+
self.server_options += ["--reload"]
|
48
|
+
self.server_options += ["--port", server.port.to_s]
|
49
|
+
self.server_options += ["--docroot", server.docroot]
|
50
|
+
self.server.plugins.each do |plugin|
|
51
|
+
self.server_options += ["--plugin", plugin]
|
52
|
+
end
|
37
53
|
end
|
38
54
|
|
39
55
|
def define
|
@@ -41,6 +57,11 @@ module Corundum
|
|
41
57
|
file entry_point => document_inputs do
|
42
58
|
YARD::CLI::Yardoc.run( *(options) )
|
43
59
|
end
|
60
|
+
|
61
|
+
desc "Start a live YARD server for editing inline docs"
|
62
|
+
task :live do
|
63
|
+
YARD::CLI::Server.run( *(server_options) )
|
64
|
+
end
|
44
65
|
end
|
45
66
|
|
46
67
|
super
|
data/lib/corundum/email.rb
CHANGED
data/lib/corundum/gemcutter.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'mattock/tasklib'
|
2
2
|
require 'mattock/task'
|
3
3
|
|
4
4
|
module Corundum
|
@@ -37,7 +37,7 @@ module Corundum
|
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
40
|
-
class GithubPages < TaskLib
|
40
|
+
class GithubPages < Mattock::TaskLib
|
41
41
|
default_namespace :publish_docs
|
42
42
|
|
43
43
|
setting(:target_dir, "gh-pages")
|
@@ -102,7 +102,10 @@ module Corundum
|
|
102
102
|
chain.add Mattock::CommandLine.new("grep", "-q", "'#{branch}'")
|
103
103
|
end
|
104
104
|
t.command = Mattock::PrereqChain.new do |chain|
|
105
|
-
chain.add git_command("checkout", "-
|
105
|
+
chain.add git_command("checkout", "-b", branch)
|
106
|
+
chain.add git_command("branch", "--set-upstream", branch, "origin/" + branch)
|
107
|
+
chain.add Mattock::CommandLine.new("rm", "-f", '.git/index')
|
108
|
+
chain.add git_command("clean", "-fdx")
|
106
109
|
end
|
107
110
|
end
|
108
111
|
|
@@ -118,19 +121,22 @@ module Corundum
|
|
118
121
|
|
119
122
|
task :pull => [repo_dir, :on_branch] do
|
120
123
|
FileUtils.cd target_dir do
|
121
|
-
git("pull")
|
124
|
+
git("pull", "-X", "ours")
|
122
125
|
end
|
123
126
|
end
|
124
127
|
|
125
128
|
task :cleanup_repo => repo_dir do
|
126
129
|
Mattock::CommandLine.new("rm", "-f", File::join(repo_dir, "hooks", "*")).must_succeed!
|
130
|
+
File::open(File::join(repo_dir, ".gitignore"), "w") do |file|
|
131
|
+
file.write ".sw?"
|
132
|
+
end
|
127
133
|
end
|
128
134
|
|
129
135
|
file target_dir => [:on_branch, :cleanup_repo]
|
130
136
|
|
131
|
-
task :pre_publish => [repo_dir, target_dir
|
137
|
+
task :pre_publish => [repo_dir, target_dir]
|
132
138
|
|
133
|
-
task :clobber_target => :on_branch do
|
139
|
+
task :clobber_target => [:on_branch, :pull] do
|
134
140
|
Mattock::CommandLine.new(*%w{rm -rf}) do |cmd|
|
135
141
|
cmd.options << target_dir + "/*"
|
136
142
|
end.must_succeed!
|
@@ -0,0 +1,58 @@
|
|
1
|
+
require 'mattock/tasklib'
|
2
|
+
|
3
|
+
module Corundum
|
4
|
+
class QuestionableContent < Mattock::Tasklib
|
5
|
+
default_namespace :content
|
6
|
+
setting :type, :debugging
|
7
|
+
settings :words => ["p", "debugger"], :limit => 0 #ok
|
8
|
+
setting :comments, false
|
9
|
+
setting :accept_token, /#ok/
|
10
|
+
setting :files
|
11
|
+
|
12
|
+
def default_configuration(core)
|
13
|
+
self.files = core.file_lists.code
|
14
|
+
end
|
15
|
+
|
16
|
+
def define
|
17
|
+
in_namespace do
|
18
|
+
task type do
|
19
|
+
word_regexp = %r{#{words.map{|word| "\\b#{word}\\b"}.join("|")}}
|
20
|
+
line_regexp = comments ? %r{\A\s*#.*#{word_regexp}} : word_regexp
|
21
|
+
unless accept_token.nil?
|
22
|
+
line_regexp = /#{line_regexp}(?:.(?!#{accept_token}))*\s*\Z/
|
23
|
+
|
24
|
+
end
|
25
|
+
|
26
|
+
found_words = Hash.new do |h,k|
|
27
|
+
h[k] = 0
|
28
|
+
end
|
29
|
+
|
30
|
+
files_with_words = Hash.new do |h,k|
|
31
|
+
h[k] = {}
|
32
|
+
end
|
33
|
+
|
34
|
+
|
35
|
+
files.each do |filename|
|
36
|
+
File::open(filename) do |file|
|
37
|
+
file.grep(line_regexp) do |line|
|
38
|
+
line.scan(word_regexp) do |word|
|
39
|
+
files_with_words[filename][word] = true
|
40
|
+
found_words[word] += 1
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
total = found_words.values.inject{|acc, num| acc + num} || 0
|
47
|
+
|
48
|
+
if total > limit
|
49
|
+
require 'pp'
|
50
|
+
report = PP::pp([files_with_words, found_words], "")
|
51
|
+
fail "Exceeded limits on words: #{words.join(",")}. Full report:\n#{report}"
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
task :qa => in_namespace(type)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
data/lib/corundum/rubyforge.rb
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
require '
|
1
|
+
require 'mattock/tasklib'
|
2
2
|
|
3
3
|
#Big XXX: this totally isn't done. It's some notes against ever wanting to
|
4
4
|
#publish announcements to rubyforge ever again
|
5
5
|
|
6
6
|
module Corundum
|
7
|
-
class Publishing < TaskLib
|
7
|
+
class Publishing < Mattock::TaskLib
|
8
8
|
default_namespace :rubyforge
|
9
9
|
|
10
10
|
setting(:rubyforge, nested(:package_id => nil, :group_id => nil, :release_name => nil))
|
data/lib/corundum/tasklibs.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.15
|
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-
|
13
|
+
date: 2012-03-12 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: corundum
|
@@ -92,6 +92,10 @@ dependencies:
|
|
92
92
|
requirements:
|
93
93
|
- - ">="
|
94
94
|
- !ruby/object:Gem::Version
|
95
|
+
segments:
|
96
|
+
- 0
|
97
|
+
- 5
|
98
|
+
- 4
|
95
99
|
version: 0.5.4
|
96
100
|
type: :runtime
|
97
101
|
prerelease: false
|
@@ -105,9 +109,9 @@ dependencies:
|
|
105
109
|
- !ruby/object:Gem::Version
|
106
110
|
segments:
|
107
111
|
- 1
|
112
|
+
- 1
|
108
113
|
- 0
|
109
|
-
|
110
|
-
version: 1.0.0
|
114
|
+
version: 1.1.0
|
111
115
|
type: :runtime
|
112
116
|
prerelease: false
|
113
117
|
version_requirements: *id008
|
@@ -129,7 +133,7 @@ dependencies:
|
|
129
133
|
requirements:
|
130
134
|
- - ">="
|
131
135
|
- !ruby/object:Gem::Version
|
132
|
-
version: 0.
|
136
|
+
version: 0.2.10
|
133
137
|
type: :runtime
|
134
138
|
prerelease: false
|
135
139
|
version_requirements: *id010
|
@@ -193,6 +197,9 @@ extra_rdoc_files:
|
|
193
197
|
- doc/coverage/assets/0.5.3/loading.gif
|
194
198
|
- doc/coverage/assets/0.5.3/jquery-1.6.2.min.js
|
195
199
|
files:
|
200
|
+
- lib/corundum.rb
|
201
|
+
- lib/corundum/configuration-store.rb
|
202
|
+
- lib/corundum/core.rb
|
196
203
|
- lib/corundum/browser-task.rb
|
197
204
|
- lib/corundum/github-pages.rb
|
198
205
|
- lib/corundum/rspec.rb
|
@@ -200,7 +207,6 @@ files:
|
|
200
207
|
- lib/corundum/email.rb
|
201
208
|
- lib/corundum/gemspec_sanity.rb
|
202
209
|
- lib/corundum/gemcutter.rb
|
203
|
-
- lib/corundum/tasklib.rb
|
204
210
|
- lib/corundum/documentation.rb
|
205
211
|
- lib/corundum/documentation-task.rb
|
206
212
|
- lib/corundum/documentation/yardoc.rb
|
@@ -209,13 +215,12 @@ files:
|
|
209
215
|
- lib/corundum/tasklibs.rb
|
210
216
|
- lib/corundum/simplecov.rb
|
211
217
|
- lib/corundum/rubyforge.rb
|
218
|
+
- lib/corundum/questionable-content.rb
|
212
219
|
- lib/corundum/version_control.rb
|
213
220
|
- lib/corundum/version_control/monotone.rb
|
214
221
|
- lib/corundum/version_control/git.rb
|
215
|
-
- lib/corundum/configuration_store.rb
|
216
222
|
- lib/corundum/default_configuration/preferences.yaml
|
217
223
|
- lib/corundum/default_configuration/templates/doc_assembly/index.html.erb
|
218
|
-
- lib/corundum.rb
|
219
224
|
- README.md
|
220
225
|
- spec/smoking_spec.rb
|
221
226
|
- spec_help/spec_helper.rb
|
@@ -279,7 +284,7 @@ licenses:
|
|
279
284
|
post_install_message: Another tidy package brought to you by Judson
|
280
285
|
rdoc_options:
|
281
286
|
- --title
|
282
|
-
- corundum-0.0.
|
287
|
+
- corundum-0.0.15 RDoc
|
283
288
|
require_paths:
|
284
289
|
- lib/
|
285
290
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -287,7 +292,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
287
292
|
requirements:
|
288
293
|
- - ">="
|
289
294
|
- !ruby/object:Gem::Version
|
290
|
-
hash:
|
295
|
+
hash: 522495789
|
291
296
|
segments:
|
292
297
|
- 0
|
293
298
|
version: "0"
|
@@ -1,38 +0,0 @@
|
|
1
|
-
require 'valise'
|
2
|
-
|
3
|
-
module Corundum
|
4
|
-
class ConfigurationStore
|
5
|
-
def initialize
|
6
|
-
@valise = Valise::Set.define do
|
7
|
-
rw "~/.corundum"
|
8
|
-
rw "/usr/share/corundum"
|
9
|
-
rw "/etc/corundum"
|
10
|
-
ro from_here("default_configuration")
|
11
|
-
|
12
|
-
handle "preferences.yaml", :yaml, :hash_merge
|
13
|
-
end
|
14
|
-
|
15
|
-
@loaded ||= Hash.new{|h,k| h[k] = @valise.find(k).contents}
|
16
|
-
end
|
17
|
-
|
18
|
-
attr_reader :loaded, :valise
|
19
|
-
|
20
|
-
def register_search_path(from_file)
|
21
|
-
directory = File::expand_path("../.corundum", from_file)
|
22
|
-
@valise.prepend_search_root(Valise::SearchRoot.new(directory))
|
23
|
-
loaded.clear
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
def self.configuration_store
|
28
|
-
@configuration_store ||= ConfigurationStore.new
|
29
|
-
end
|
30
|
-
|
31
|
-
def self.register_project(rakefile)
|
32
|
-
configuration_store.register_search_path(rakefile)
|
33
|
-
end
|
34
|
-
|
35
|
-
def self.user_preferences
|
36
|
-
configuration_store.loaded["preferences.yaml"]
|
37
|
-
end
|
38
|
-
end
|