Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Add config files using generator

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

0 comments on commit d9f16d4

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