Permalink
Browse files

Add config files using generator

  • Loading branch information...
1 parent 7ec206f commit d9f16d4ff6b0ba44320fa96234bfa2258f8c16c1 Jiren committed Aug 23, 2010
View
5 generators/splat_generator.rb → generators/splat_config/splat_generator.rb
@@ -1,8 +1,9 @@
class SplatGenerator < Rails::Generator::Base
+
def manifest
record do |m|
- m.file 'config/splat.yml', 'config/facebooker.yml'
- m.file 'config/vendors.yml', 'config/vendors.yml'
+ m.file 'splat.yml', 'config/splat.yml'
+ m.file 'vendors.yml', 'config/vendors.yml'
end
end
View
4 generators/templates/config/splat.yml → generators/splat_config/templates/splat.yml
@@ -26,7 +26,3 @@ default:
use_default_insertion: true
default_insertion: ""
-bogus_gateway:
- provider_url: "http//test.com"
- username: test
- password: test
View
0 generators/templates/config/vendors.yml → ...rators/splat_config/templates/vendors.yml
File renamed without changes.
View
2 init.rb
@@ -0,0 +1,2 @@
+
+require File.dirname(__FILE__) + '/lib/splat'
View
12 install.rb
@@ -1,12 +0,0 @@
-require 'fileutils'
-require 'rubygems'
-
-dir = File.dirname(__FILE__)
-templates = File.join(dir, 'generators', 'templates')
-config = File.join('config', 'splat.yml')
-vendor_sconfig = File.join('config', 'vendors.yml')
-
-[config, script].each do |path|
- FileUtils.cp File.join(templates, path), File.join(RAILS_ROOT, path) unless File.exist?(File.join(RAILS_ROOT, path))
-end
-puts IO.read(File.join(dir, 'README.rdoc'))
View
11 splat.gemspec
@@ -37,13 +37,10 @@ Gem::Specification.new do |s|
"VERSION",
"test/helper.rb",
"test/test_splat.rb",
- "generators",
- "generators/splat_generator.rb",
- "generators/templates",
- "generators/templates/config",
- "generators/templates/config/splat.yml",
- "generators/templates/config/vendors.yml",
- "install.rb",
+ "generators/splat_config/splat_generator.rb",
+ "generators/splat_config/templates/splat.yml",
+ "generators/splat_config/templates/vendors.yml",
+ "init.rb",
"lib/splat/configuration.rb",
"lib/splat/error.rb",
"lib/splat/gateway.rb",

0 comments on commit d9f16d4

Please sign in to comment.