amberbit-config 1.0.2 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. data/MIT-LICENSE +1 -1
  2. data/README.rdoc +89 -0
  3. data/VERSION +1 -1
  4. data/lib/amberbit-config.rb +27 -3
  5. data/lib/amberbit-config/config.rb +60 -0
  6. data/lib/amberbit-config/engine.rb +12 -0
  7. data/lib/amberbit-config/errors.rb +4 -0
  8. data/lib/amberbit-config/hash_struct.rb +59 -0
  9. data/lib/amberbit-config/version.rb +3 -0
  10. data/lib/tasks/amberbit-config.rake +37 -0
  11. metadata +75 -127
  12. data/.gitignore +0 -1
  13. data/README +0 -68
  14. data/Rakefile +0 -36
  15. data/amberbit-config.gemspec +0 -122
  16. data/init.rb +0 -2
  17. data/install.rb +0 -1
  18. data/lib/amber_bit_app_config.rb +0 -74
  19. data/lib/hash_struct.rb +0 -9
  20. data/rails/init.rb +0 -2
  21. data/spec/library_spec.rb +0 -20
  22. data/spec/plugin_spec.rb +0 -31
  23. data/spec/spec.opts +0 -1
  24. data/spec/spec_helper.rb +0 -38
  25. data/spec/testapp/README +0 -243
  26. data/spec/testapp/Rakefile +0 -11
  27. data/spec/testapp/app/controllers/application_controller.rb +0 -10
  28. data/spec/testapp/app/helpers/application_helper.rb +0 -3
  29. data/spec/testapp/config/application/config.yml +0 -8
  30. data/spec/testapp/config/application/default.yml +0 -6
  31. data/spec/testapp/config/boot.rb +0 -110
  32. data/spec/testapp/config/environment.rb +0 -14
  33. data/spec/testapp/config/environments/development.rb +0 -17
  34. data/spec/testapp/config/environments/production.rb +0 -28
  35. data/spec/testapp/config/environments/test.rb +0 -28
  36. data/spec/testapp/config/initializers/backtrace_silencers.rb +0 -7
  37. data/spec/testapp/config/initializers/inflections.rb +0 -10
  38. data/spec/testapp/config/initializers/mime_types.rb +0 -5
  39. data/spec/testapp/config/initializers/new_rails_defaults.rb +0 -19
  40. data/spec/testapp/config/initializers/session_store.rb +0 -15
  41. data/spec/testapp/config/locales/en.yml +0 -5
  42. data/spec/testapp/config/routes.rb +0 -43
  43. data/spec/testapp/db/test.sqlite3 +0 -0
  44. data/spec/testapp/doc/README_FOR_APP +0 -2
  45. data/spec/testapp/log/development.log +0 -0
  46. data/spec/testapp/log/production.log +0 -0
  47. data/spec/testapp/log/server.log +0 -0
  48. data/spec/testapp/log/test.log +0 -0
  49. data/spec/testapp/public/404.html +0 -30
  50. data/spec/testapp/public/422.html +0 -30
  51. data/spec/testapp/public/500.html +0 -30
  52. data/spec/testapp/public/favicon.ico +0 -0
  53. data/spec/testapp/public/images/rails.png +0 -0
  54. data/spec/testapp/public/index.html +0 -275
  55. data/spec/testapp/public/javascripts/application.js +0 -2
  56. data/spec/testapp/public/javascripts/controls.js +0 -963
  57. data/spec/testapp/public/javascripts/dragdrop.js +0 -973
  58. data/spec/testapp/public/javascripts/effects.js +0 -1128
  59. data/spec/testapp/public/javascripts/prototype.js +0 -4320
  60. data/spec/testapp/public/robots.txt +0 -5
  61. data/spec/testapp/script/about +0 -4
  62. data/spec/testapp/script/console +0 -3
  63. data/spec/testapp/script/dbconsole +0 -3
  64. data/spec/testapp/script/destroy +0 -3
  65. data/spec/testapp/script/generate +0 -3
  66. data/spec/testapp/script/performance/benchmarker +0 -3
  67. data/spec/testapp/script/performance/profiler +0 -3
  68. data/spec/testapp/script/plugin +0 -3
  69. data/spec/testapp/script/runner +0 -3
  70. data/spec/testapp/script/server +0 -3
  71. data/spec/testapp/test/performance/browsing_test.rb +0 -9
  72. data/spec/testapp/test/test_helper.rb +0 -38
  73. data/tasks/amberbit_app_config_tasks.rake +0 -79
  74. data/uninstall.rb +0 -1
@@ -1,5 +0,0 @@
1
- # See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
2
- #
3
- # To ban all spiders from the entire site uncomment the next two lines:
4
- # User-Agent: *
5
- # Disallow: /
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require File.dirname(__FILE__) + '/../config/boot'
3
- $LOAD_PATH.unshift "#{RAILTIES_PATH}/builtin/rails_info"
4
- require 'commands/about'
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require File.dirname(__FILE__) + '/../config/boot'
3
- require 'commands/console'
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require File.dirname(__FILE__) + '/../config/boot'
3
- require 'commands/dbconsole'
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require File.dirname(__FILE__) + '/../config/boot'
3
- require 'commands/destroy'
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require File.dirname(__FILE__) + '/../config/boot'
3
- require 'commands/generate'
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require File.dirname(__FILE__) + '/../../config/boot'
3
- require 'commands/performance/benchmarker'
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require File.dirname(__FILE__) + '/../../config/boot'
3
- require 'commands/performance/profiler'
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require File.dirname(__FILE__) + '/../config/boot'
3
- require 'commands/plugin'
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require File.dirname(__FILE__) + '/../config/boot'
3
- require 'commands/runner'
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require File.dirname(__FILE__) + '/../config/boot'
3
- require 'commands/server'
@@ -1,9 +0,0 @@
1
- require 'test_helper'
2
- require 'performance_test_help'
3
-
4
- # Profiling results for each test method are written to tmp/performance.
5
- class BrowsingTest < ActionController::PerformanceTest
6
- def test_homepage
7
- get '/'
8
- end
9
- end
@@ -1,38 +0,0 @@
1
- ENV["RAILS_ENV"] = "test"
2
- require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
3
- require 'test_help'
4
-
5
- class ActiveSupport::TestCase
6
- # Transactional fixtures accelerate your tests by wrapping each test method
7
- # in a transaction that's rolled back on completion. This ensures that the
8
- # test database remains unchanged so your fixtures don't have to be reloaded
9
- # between every test method. Fewer database queries means faster tests.
10
- #
11
- # Read Mike Clark's excellent walkthrough at
12
- # http://clarkware.com/cgi/blosxom/2005/10/24#Rails10FastTesting
13
- #
14
- # Every Active Record database supports transactions except MyISAM tables
15
- # in MySQL. Turn off transactional fixtures in this case; however, if you
16
- # don't care one way or the other, switching from MyISAM to InnoDB tables
17
- # is recommended.
18
- #
19
- # The only drawback to using transactional fixtures is when you actually
20
- # need to test transactions. Since your test is bracketed by a transaction,
21
- # any transactions started in your code will be automatically rolled back.
22
- self.use_transactional_fixtures = true
23
-
24
- # Instantiated fixtures are slow, but give you @david where otherwise you
25
- # would need people(:david). If you don't want to migrate your existing
26
- # test cases which use the @david style and don't mind the speed hit (each
27
- # instantiated fixtures translates to a database query per test method),
28
- # then set this back to true.
29
- self.use_instantiated_fixtures = false
30
-
31
- # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
32
- #
33
- # Note: You'll currently still have to declare fixtures explicitly in integration tests
34
- # -- they do not yet inherit this setting
35
- fixtures :all
36
-
37
- # Add more helper methods to be used by all tests here...
38
- end
@@ -1,79 +0,0 @@
1
- namespace :amberbit do
2
- namespace :config do
3
- desc "Creates config/application/default.yml and config/application/config.yml files"
4
- task :setup do
5
- if File.directory?(File.join(RAILS_ROOT, "config", "application"))
6
- puts 'Directory config/application already exists, skipping.'
7
- elsif !File.exists?(File.join(RAILS_ROOT, "config", "application"))
8
- Dir.mkdir(File.join(RAILS_ROOT, "config", "application"))
9
- puts "Directory config/application was created."
10
- else
11
- puts "AmberBit Config requires config/application to be a directory and it appears to be a regular file!"
12
- puts "Cannot continue, stopping!"
13
- exit -1
14
- end
15
-
16
- default_contents = {}
17
- default_contents['default'] = <<BEGIN
18
- # Store your application configuration defaults here. This file should be under
19
- # version control. In case you need installation specific settings please copy
20
- # config.template.yml to config.yml and ignore the latter with your version
21
- # control system.
22
- #
23
- # Usage
24
- # ------
25
- #
26
- # in this file:
27
- # default:
28
- # application_name: My Super App
29
- #
30
- # development:
31
- # title_prefix: Development Mode
32
- #
33
- # in your code:
34
- # This is <%= AppConfig['application_name'] %>
35
- #
36
- # or
37
- #
38
- # This is <%= AppConfig.application_name %>
39
- #
40
- default:
41
-
42
- development:
43
-
44
- test:
45
-
46
- staging:
47
-
48
- production:
49
-
50
- BEGIN
51
-
52
- default_contents['config.template'] = <<BEGIN
53
- # See default.yml for usage.
54
- default:
55
-
56
- development:
57
-
58
- test:
59
-
60
- staging:
61
-
62
- production:
63
-
64
- BEGIN
65
-
66
-
67
- %w(default config.template).each do |fn|
68
- if File.exists?(File.join(RAILS_ROOT, "config", "application", "#{fn}.yml"))
69
- puts "File config/application/#{fn}.yml already exists, skipping."
70
- else
71
- f = File.new(File.join(RAILS_ROOT, "config", "application", "#{fn}.yml"), "w+")
72
- f.write(default_contents[fn])
73
- f.close
74
- puts "File config/application/#{fn}.yml was created."
75
- end
76
- end
77
- end
78
- end
79
- end
data/uninstall.rb DELETED
@@ -1 +0,0 @@
1
- # Uninstall hook code here