app_config 0.2.0 → 0.2.1

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.
Files changed (4) hide show
  1. data/README +1 -0
  2. data/Rakefile +2 -69
  3. data/lib/app_config.rb +1 -1
  4. metadata +3 -3
data/README CHANGED
@@ -34,6 +34,7 @@ Want SQLite3 support? No problem!
34
34
  AppConfig.setup do |config|
35
35
  config[:storage_method] = :sqlite
36
36
  config[:database] = '/path/to/database.sqlite3'
37
+ config[:table] = 'app_config'
37
38
  end
38
39
 
39
40
  AppConfig[:column] # => 'value'
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
@@ -15,7 +15,7 @@ require 'core_ext/hashish'
15
15
  class UnknownStorageMethod < Exception; end
16
16
 
17
17
  module AppConfig
18
- VERSION = '0.2.0'
18
+ VERSION = '0.2.1'
19
19
 
20
20
  autoload :Base, 'app_config/base'
21
21
  autoload :Storage, 'app_config/storage'
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.0
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 "AppConfig"
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