Permalink
Browse files

Removed the Rails 2 generator and added a Rails 3 generator. Fixes #4

  • Loading branch information...
1 parent bb7af77 commit 972ed515af4876688f2fc6039088df0102351251 @markbates committed Dec 8, 2011
View
@@ -1,7 +1,7 @@
GEM
remote: http://rubygems.org/
specs:
- activesupport (3.1.0)
+ activesupport (3.1.3)
multi_json (~> 1.0)
diff-lcs (1.1.3)
erubis (2.7.0)
@@ -12,19 +12,19 @@ GEM
rspec (>= 2.0.0)
genosaurus (1.2.4)
erubis
- hashie (1.1.0)
+ hashie (1.2.0)
mark_facets (0.2.0)
hashie
- multi_json (1.0.3)
- rake (0.9.2)
- rspec (2.6.0)
- rspec-core (~> 2.6.0)
- rspec-expectations (~> 2.6.0)
- rspec-mocks (~> 2.6.0)
- rspec-core (2.6.4)
- rspec-expectations (2.6.0)
+ multi_json (1.0.4)
+ rake (0.9.2.2)
+ rspec (2.7.0)
+ rspec-core (~> 2.7.0)
+ rspec-expectations (~> 2.7.0)
+ rspec-mocks (~> 2.7.0)
+ rspec-core (2.7.1)
+ rspec-expectations (2.7.0)
diff-lcs (~> 1.1.2)
- rspec-mocks (2.6.0)
+ rspec-mocks (2.7.0)
yamler (0.1.0)
PLATFORMS
View
@@ -17,13 +17,13 @@ Bundler.require
Gemstub.test_framework = :rspec
Gemstub.gem_spec do |s|
- s.version = "2.8.4"
+ s.version = "2.9.0"
s.summary = "A powerful Ruby configuration system."
s.rubyforge_project = "magrathea"
s.add_dependency('yamler', '>=0.1.0')
s.email = 'mark@markbates.com'
s.homepage = 'http://www.metabates.com'
- s.files = FileList['lib/**/*.*', 'README.textile', 'LICENSE', 'bin/**/*.*', 'generators/**/*.*']
+ s.files = FileList['lib/**/*.*', 'README.textile', 'LICENSE', 'bin/**/*.*']
end
Gemstub.rdoc do |rd|
View
@@ -2,15 +2,15 @@
Gem::Specification.new do |s|
s.name = "configatron"
- s.version = "2.8.4.20111116101657"
+ s.version = "2.9.0.20111208155705"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["markbates"]
- s.date = "2011-11-16"
+ s.date = "2011-12-08"
s.description = "configatron was developed by: markbates"
s.email = "mark@markbates.com"
s.extra_rdoc_files = ["LICENSE"]
- s.files = ["lib/configatron/configatron.rb", "lib/configatron/core_ext/class.rb", "lib/configatron/core_ext/kernel.rb", "lib/configatron/core_ext/object.rb", "lib/configatron/core_ext/string.rb", "lib/configatron/errors.rb", "lib/configatron/proc.rb", "lib/configatron/rails.rb", "lib/configatron/store.rb", "lib/configatron.rb", "README.textile", "LICENSE", "generators/configatron_generator.rb", "generators/templates/configatron/cucumber.rb", "generators/templates/configatron/defaults.rb", "generators/templates/configatron/development.rb", "generators/templates/configatron/production.rb", "generators/templates/configatron/test.rb", "generators/templates/initializers/configatron.rb"]
+ s.files = ["lib/configatron/configatron.rb", "lib/configatron/core_ext/class.rb", "lib/configatron/core_ext/kernel.rb", "lib/configatron/core_ext/object.rb", "lib/configatron/core_ext/string.rb", "lib/configatron/errors.rb", "lib/configatron/proc.rb", "lib/configatron/rails.rb", "lib/configatron/store.rb", "lib/configatron.rb", "lib/generators/configatron/install/install_generator.rb", "lib/generators/configatron/install/templates/configatron/defaults.rb", "lib/generators/configatron/install/templates/configatron/development.rb", "lib/generators/configatron/install/templates/configatron/production.rb", "lib/generators/configatron/install/templates/configatron/test.rb", "lib/generators/configatron/install/templates/initializers/configatron.rb", "README.textile", "LICENSE"]
s.homepage = "http://www.metabates.com"
s.require_paths = ["lib"]
s.rubyforge_project = "magrathea"
@@ -1,20 +0,0 @@
-require 'rails_generator'
-class ConfigatronGenerator < Rails::Generator::Base # :nodoc:
-
- def manifest
- record do |m|
- m.directory 'config/configatron'
- m.directory 'config/configatron/development'
- m.directory 'config/configatron/test'
- m.directory 'config/configatron/production'
- m.directory 'config/configatron/cucumber'
- m.file 'initializers/configatron.rb', 'config/initializers/configatron.rb'
- m.file 'configatron/development.rb', 'config/configatron/development.rb'
- m.file 'configatron/production.rb', 'config/configatron/production.rb'
- m.file 'configatron/test.rb', 'config/configatron/test.rb'
- m.file 'configatron/cucumber.rb', 'config/configatron/cucumber.rb'
- m.file 'configatron/defaults.rb', 'config/configatron/defaults.rb'
- end
- end
-
-end # ConfigatronGenerator
@@ -1,4 +0,0 @@
-# Override your default settings for the Cucumber environment here.
-
-# By default load in the settings from the test environment:
-require File.join(File.dirname(__FILE__), 'test')
@@ -0,0 +1,24 @@
+require 'rails/generators/base'
+
+class Configatron
+ class InstallGenerator < ::Rails::Generators::Base #:nodoc:
+
+ desc 'Generates configatron files for the default Rails environments.'
+
+ def self.source_root
+ @_configatron_source_root ||= File.expand_path(File.join(File.dirname(__FILE__), 'templates'))
+ end
+
+ def self.banner
+ "rails generate configatron:install"
+ end
+
+ def copy_files
+ template 'initializers/configatron.rb', 'config/initializers/configatron.rb'
+ %w{defaults development production test}.each do |env|
+ template "configatron/#{env}.rb", "config/configatron/#{env}.rb"
+ end
+ end
+
+ end
+end

0 comments on commit 972ed51

Please sign in to comment.