Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

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

0 notes on commit 972ed51

Please sign in to comment.
Something went wrong with that request. Please try again.