sparkler 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in sparkler.gemspec
4
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2012 Chris Moore
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,29 @@
1
+ # Sparkler
2
+
3
+ TODO: Write a gem description
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'sparkler'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install sparkler
18
+
19
+ ## Usage
20
+
21
+ TODO: Write usage instructions here
22
+
23
+ ## Contributing
24
+
25
+ 1. Fork it
26
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
27
+ 3. Commit your changes (`git commit -am 'Added some feature'`)
28
+ 4. Push to the branch (`git push origin my-new-feature`)
29
+ 5. Create new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env rake
2
+ require "bundler/gem_tasks"
3
+ require 'rake/testtask'
4
+
5
+ Rake::TestTask.new do |t|
6
+ t.libs << 'lib/sparkler'
7
+ t.test_files = FileList['test/lib/sparkler/*_test.rb']
8
+ t.verbose = true
9
+ end
10
+
11
+ task :default => :test
data/bin/sparkler ADDED
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require File.expand_path(File.join('..', 'lib', 'sparkler', 'generators', 'app_generator'), File.dirname(__FILE__))
4
+ require File.expand_path(File.join('..', 'lib', 'sparkler', 'app_builder'), File.dirname(__FILE__))
5
+
6
+ templates_root = File.expand_path(File.join("..", "templates"), File.dirname(__FILE__))
7
+ Sparkler::AppGenerator.source_root templates_root
8
+ Sparkler::AppGenerator.source_paths << Rails::Generators::AppGenerator.source_root << templates_root
9
+
10
+ Sparkler::AppGenerator.start
11
+
@@ -0,0 +1,16 @@
1
+ module Sparkler
2
+ class AppBuilder < Rails::AppBuilder
3
+
4
+ def remove_public_index
5
+ remove_file 'public/index.html'
6
+ end
7
+
8
+ def remove_rails_logo_image
9
+ remove_file 'app/assets/images/rails.png'
10
+ end
11
+
12
+ def setup_staging_environment
13
+ run 'cp config/environments/production.rb config/environments/staging.rb'
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,42 @@
1
+ require 'rails/generators'
2
+ require 'rails/generators/rails/app/app_generator'
3
+
4
+ module Sparkler
5
+ class AppGenerator < Rails::Generators::AppGenerator
6
+
7
+ def finish_template
8
+ invoke :sparkler_customization
9
+ super
10
+ end
11
+
12
+ def sparkler_customization
13
+ invoke :remove_useless_files
14
+ end
15
+
16
+ def remove_useless_files
17
+ build :remove_public_index
18
+ build :remove_rails_logo_image
19
+ end
20
+
21
+ def setup_staging_environment
22
+ say 'Setting up the staging environment'
23
+ build :setup_staging_environment
24
+ build :initialize_on_precompile
25
+ end
26
+
27
+ def run_bundle
28
+
29
+ end
30
+
31
+ protected
32
+
33
+ def get_builder_class
34
+ Sparkler::AppBuilder
35
+ end
36
+
37
+ def using_active_record?
38
+ !options[:skip_active_record]
39
+ end
40
+ end
41
+ end
42
+
@@ -0,0 +1,3 @@
1
+ module Sparkler
2
+ VERSION = "0.0.1"
3
+ end
data/lib/sparkler.rb ADDED
@@ -0,0 +1,5 @@
1
+ require "sparkler/version"
2
+
3
+ module Sparkler
4
+ # Your code goes here...
5
+ end
data/sparkler.gemspec ADDED
@@ -0,0 +1,21 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require File.expand_path('../lib/sparkler/version', __FILE__)
3
+
4
+ Gem::Specification.new do |gem|
5
+ gem.name = "sparkler"
6
+ gem.version = Sparkler::VERSION
7
+ gem.date = Date.today.strftime('%Y-%m-%d')
8
+ gem.authors = ["Chris Moore"]
9
+ gem.email = ["chrism@gaslightsoftware.com"]
10
+ gem.summary = %q{Generate a Rails app using Gaslight's choices of gems and frameworks.}
11
+ gem.description = %q{}
12
+ gem.homepage = "https://github.com/gaslight/sparkler"
13
+
14
+ gem.files = `git ls-files`.split($\)
15
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
16
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
17
+ gem.require_paths = ["lib"]
18
+
19
+ gem.add_dependency 'rails', '3.2.8'
20
+ gem.add_dependency 'bundler', '>= 1.1'
21
+ end
@@ -0,0 +1,7 @@
1
+ require_relative '../../test_helper'
2
+
3
+ describe Sparkler do
4
+ it "is versioned" do
5
+ Sparkler::VERSION.wont_be_nil
6
+ end
7
+ end
@@ -0,0 +1,3 @@
1
+ require 'minitest/autorun'
2
+ require 'minitest/pride'
3
+ require 'sparkler'
metadata ADDED
@@ -0,0 +1,83 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: sparkler
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Chris Moore
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-09-09 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rails
16
+ requirement: &70293825788640 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - =
20
+ - !ruby/object:Gem::Version
21
+ version: 3.2.8
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *70293825788640
25
+ - !ruby/object:Gem::Dependency
26
+ name: bundler
27
+ requirement: &70293825786380 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '1.1'
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: *70293825786380
36
+ description: ''
37
+ email:
38
+ - chrism@gaslightsoftware.com
39
+ executables:
40
+ - sparkler
41
+ extensions: []
42
+ extra_rdoc_files: []
43
+ files:
44
+ - .gitignore
45
+ - Gemfile
46
+ - LICENSE
47
+ - README.md
48
+ - Rakefile
49
+ - bin/sparkler
50
+ - lib/sparkler.rb
51
+ - lib/sparkler/app_builder.rb
52
+ - lib/sparkler/generators/app_generator.rb
53
+ - lib/sparkler/version.rb
54
+ - sparkler.gemspec
55
+ - test/lib/sparkler/version_test.rb
56
+ - test/test_helper.rb
57
+ homepage: https://github.com/gaslight/sparkler
58
+ licenses: []
59
+ post_install_message:
60
+ rdoc_options: []
61
+ require_paths:
62
+ - lib
63
+ required_ruby_version: !ruby/object:Gem::Requirement
64
+ none: false
65
+ requirements:
66
+ - - ! '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ required_rubygems_version: !ruby/object:Gem::Requirement
70
+ none: false
71
+ requirements:
72
+ - - ! '>='
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
75
+ requirements: []
76
+ rubyforge_project:
77
+ rubygems_version: 1.8.11
78
+ signing_key:
79
+ specification_version: 3
80
+ summary: Generate a Rails app using Gaslight's choices of gems and frameworks.
81
+ test_files:
82
+ - test/lib/sparkler/version_test.rb
83
+ - test/test_helper.rb