corundum 0.0.7 → 0.0.8
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 +536 -286
- data/lib/corundum.rb +2 -1
- data/lib/corundum/configuration_store.rb +38 -0
- data/lib/corundum/default_configuration/preferences.yaml +1 -0
- data/lib/corundum/github-pages.rb +0 -2
- metadata +6 -4
data/lib/corundum.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'corundum/tasklib'
|
2
|
+
require 'corundum/configuration_store'
|
2
3
|
|
3
4
|
#require 'rubygems'
|
4
5
|
#require 'rubygems/installer'
|
@@ -13,7 +14,7 @@ module Corundum
|
|
13
14
|
:finished_dir => "corundum",
|
14
15
|
:package_dir => "pkg",
|
15
16
|
:doc_dir => "rubydoc",
|
16
|
-
:browser => "
|
17
|
+
:browser => Corundum.user_preferences["browser"],
|
17
18
|
:finished_files => nested.nil_fields(:build, :qa, :package, :release, :press),
|
18
19
|
:files => nested.nil_fields(:code, :test, :docs),
|
19
20
|
:rubyforge => nested.nil_fields(:group_id, :package_id, :release_name, :home_page, :project_page),
|
@@ -0,0 +1,38 @@
|
|
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
|
19
|
+
|
20
|
+
def register_search_path(from_file)
|
21
|
+
directory = File::dirname(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
|
@@ -0,0 +1 @@
|
|
1
|
+
browser: chromium
|
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.8
|
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-01
|
13
|
+
date: 2012-02-01 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: corundum
|
@@ -211,6 +211,8 @@ files:
|
|
211
211
|
- lib/corundum/version_control.rb
|
212
212
|
- lib/corundum/version_control/monotone.rb
|
213
213
|
- lib/corundum/version_control/git.rb
|
214
|
+
- lib/corundum/configuration_store.rb
|
215
|
+
- lib/corundum/default_configuration/preferences.yaml
|
214
216
|
- lib/corundum.rb
|
215
217
|
- README.md
|
216
218
|
- spec/smoking_spec.rb
|
@@ -278,7 +280,7 @@ rdoc_options:
|
|
278
280
|
- --main
|
279
281
|
- doc/README
|
280
282
|
- --title
|
281
|
-
- corundum-0.0.
|
283
|
+
- corundum-0.0.8 RDoc
|
282
284
|
require_paths:
|
283
285
|
- lib/
|
284
286
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -286,7 +288,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
286
288
|
requirements:
|
287
289
|
- - ">="
|
288
290
|
- !ruby/object:Gem::Version
|
289
|
-
hash:
|
291
|
+
hash: 508057427
|
290
292
|
segments:
|
291
293
|
- 0
|
292
294
|
version: "0"
|