app_config 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README +1 -0
- data/Rakefile +2 -69
- data/lib/app_config.rb +1 -1
- metadata +3 -3
data/README
CHANGED
data/Rakefile
CHANGED
@@ -1,77 +1,10 @@
|
|
1
1
|
require 'spec/rake/spectask'
|
2
2
|
|
3
|
+
FileList[File.dirname(__FILE__) + '/tasks/**/*.rake'].each { |task| load task }
|
4
|
+
|
3
5
|
task :default => [:spec]
|
4
6
|
|
5
7
|
desc 'Start an irb session with AppConfig loaded'
|
6
8
|
task :console do
|
7
9
|
sh "irb -I ./lib -r 'app_config'"
|
8
10
|
end
|
9
|
-
|
10
|
-
desc 'Run the specs with autotest'
|
11
|
-
task :autotest do
|
12
|
-
ENV['RSPEC'] = 'true'
|
13
|
-
sh 'autotest'
|
14
|
-
end
|
15
|
-
|
16
|
-
desc 'Run all specs in spec directory'
|
17
|
-
Spec::Rake::SpecTask.new(:spec) do |t|
|
18
|
-
t.spec_opts = ['--options', 'spec/spec.opts']
|
19
|
-
t.spec_files = FileList['spec/**/*_spec.rb']
|
20
|
-
end
|
21
|
-
|
22
|
-
desc 'Run all specs in spec directory with RCov'
|
23
|
-
Spec::Rake::SpecTask.new(:rcov) do |t|
|
24
|
-
t.spec_opts = ['--options', 'spec/spec.opts']
|
25
|
-
t.spec_files = FileList['spec/**/*_spec.rb']
|
26
|
-
t.rcov = true
|
27
|
-
t.rcov_opts = lambda do
|
28
|
-
IO.readlines('spec/rcov.opts').map {|l| l.chomp.split ' '}.flatten
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
desc 'Generate API documentation'
|
33
|
-
task :doc do
|
34
|
-
Rake::Task['doc:api'].invoke
|
35
|
-
end
|
36
|
-
|
37
|
-
namespace :doc do
|
38
|
-
task :setup_rdoc do
|
39
|
-
@file_list = FileList[ "#{File.dirname(__FILE__)}/README",
|
40
|
-
"#{File.dirname(__FILE__)}/lib/**/*.rb" ]
|
41
|
-
# Substitute APP_ROOT with a dot. Makes for a better index in the generated docs.
|
42
|
-
@files = @file_list.collect {|f| f.gsub(/#{File.dirname(__FILE__)}/, '.')}
|
43
|
-
@options = %W[
|
44
|
-
--all
|
45
|
-
--inline-source
|
46
|
-
--line-numbers
|
47
|
-
--main README
|
48
|
-
--op #{File.join(File.dirname(__FILE__), 'doc', 'api')}
|
49
|
-
--title 'AppConfig API Documentation'
|
50
|
-
]
|
51
|
-
# Generate a diagram, yes/no?
|
52
|
-
@options << '-d' if RUBY_PLATFORM !~ /win32/ && `which dot` =~ /\/dot/ && !ENV['NODOT']
|
53
|
-
end
|
54
|
-
|
55
|
-
task :api => [:setup_rdoc] do
|
56
|
-
run_rdoc(@options, @files)
|
57
|
-
end
|
58
|
-
|
59
|
-
desc 'Remove generated API documentation'
|
60
|
-
task :clear do
|
61
|
-
system("rm -rf #{File.dirname(__FILE__) + '/doc/api'}")
|
62
|
-
end
|
63
|
-
|
64
|
-
desc 'Rebuild API documentation'
|
65
|
-
task :rebuild do
|
66
|
-
Rake::Task['doc:clear'].invoke
|
67
|
-
Rake::Task['doc:api'].invoke
|
68
|
-
end
|
69
|
-
end
|
70
|
-
|
71
|
-
private
|
72
|
-
|
73
|
-
def run_rdoc(options, files)
|
74
|
-
options = options.join(' ') if options.is_a? Array
|
75
|
-
files = files.join(' ') if files.is_a? Array
|
76
|
-
system("rdoc #{options} #{files}")
|
77
|
-
end
|
data/lib/app_config.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: app_config
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dale Campbell
|
@@ -49,11 +49,11 @@ has_rdoc: true
|
|
49
49
|
homepage: http://oshuma.github.com/app_config
|
50
50
|
post_install_message:
|
51
51
|
rdoc_options:
|
52
|
-
- --title
|
52
|
+
- --title
|
53
|
+
- AppConfig
|
53
54
|
- --all
|
54
55
|
- --inline-source
|
55
56
|
- --line-numbers
|
56
|
-
- --main README
|
57
57
|
require_paths:
|
58
58
|
- lib
|
59
59
|
required_ruby_version: !ruby/object:Gem::Requirement
|