-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Generate Rails 4.x - Add README.md - Remove public/index.html - Remove README.rdoc
- Loading branch information
Onur Özgür ÖZKAN
committed
May 6, 2013
1 parent
eca13d5
commit 282b70c
Showing
11 changed files
with
228 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
source 'https://rubygems.org' | ||
|
||
# Specify your gem's dependencies in cybele.gemspec | ||
gemspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
PATH | ||
remote: . | ||
specs: | ||
cybele (0.1.0) | ||
bundler (~> 1.3) | ||
rails (= 4.0.0.rc1) | ||
|
||
GEM | ||
remote: https://rubygems.org/ | ||
specs: | ||
actionmailer (4.0.0.rc1) | ||
actionpack (= 4.0.0.rc1) | ||
mail (~> 2.5.3) | ||
actionpack (4.0.0.rc1) | ||
activesupport (= 4.0.0.rc1) | ||
builder (~> 3.1.0) | ||
erubis (~> 2.7.0) | ||
rack (~> 1.5.2) | ||
rack-test (~> 0.6.2) | ||
activemodel (4.0.0.rc1) | ||
activesupport (= 4.0.0.rc1) | ||
builder (~> 3.1.0) | ||
activerecord (4.0.0.rc1) | ||
activemodel (= 4.0.0.rc1) | ||
activerecord-deprecated_finders (~> 1.0.2) | ||
activesupport (= 4.0.0.rc1) | ||
arel (~> 4.0.0) | ||
activerecord-deprecated_finders (1.0.2) | ||
activesupport (4.0.0.rc1) | ||
i18n (~> 0.6, >= 0.6.4) | ||
minitest (~> 4.2) | ||
multi_json (~> 1.3) | ||
thread_safe (~> 0.1) | ||
tzinfo (~> 0.3.37) | ||
arel (4.0.0) | ||
atomic (1.1.8) | ||
builder (3.1.4) | ||
erubis (2.7.0) | ||
hike (1.2.2) | ||
i18n (0.6.4) | ||
mail (2.5.3) | ||
i18n (>= 0.4.0) | ||
mime-types (~> 1.16) | ||
treetop (~> 1.4.8) | ||
mime-types (1.23) | ||
minitest (4.7.4) | ||
multi_json (1.7.2) | ||
polyglot (0.3.3) | ||
rack (1.5.2) | ||
rack-test (0.6.2) | ||
rack (>= 1.0) | ||
rails (4.0.0.rc1) | ||
actionmailer (= 4.0.0.rc1) | ||
actionpack (= 4.0.0.rc1) | ||
activerecord (= 4.0.0.rc1) | ||
activesupport (= 4.0.0.rc1) | ||
bundler (>= 1.3.0, < 2.0) | ||
railties (= 4.0.0.rc1) | ||
sprockets-rails (~> 2.0.0.rc4) | ||
railties (4.0.0.rc1) | ||
actionpack (= 4.0.0.rc1) | ||
activesupport (= 4.0.0.rc1) | ||
rake (>= 0.8.7) | ||
thor (>= 0.18.1, < 2.0) | ||
rake (10.0.4) | ||
sprockets (2.9.3) | ||
hike (~> 1.2) | ||
multi_json (~> 1.0) | ||
rack (~> 1.0) | ||
tilt (~> 1.1, != 1.3.0) | ||
sprockets-rails (2.0.0.rc4) | ||
actionpack (>= 3.0) | ||
activesupport (>= 3.0) | ||
sprockets (~> 2.8) | ||
thor (0.18.1) | ||
thread_safe (0.1.0) | ||
atomic | ||
tilt (1.4.0) | ||
treetop (1.4.12) | ||
polyglot | ||
polyglot (>= 0.3.1) | ||
tzinfo (0.3.37) | ||
|
||
PLATFORMS | ||
ruby | ||
|
||
DEPENDENCIES | ||
bundler (~> 1.3) | ||
cybele! | ||
rake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Copyright (c) 2013 lab2023 - internet technologies | ||
|
||
MIT License | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining | ||
a copy of this software and associated documentation files (the | ||
"Software"), to deal in the Software without restriction, including | ||
without limitation the rights to use, copy, modify, merge, publish, | ||
distribute, sublicense, and/or sell copies of the Software, and to | ||
permit persons to whom the Software is furnished to do so, subject to | ||
the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
require "bundler/gem_tasks" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env ruby | ||
|
||
require File.expand_path(File.join('..', 'lib', 'cybele', 'generators', 'app_generator'), File.dirname(__FILE__)) | ||
require File.expand_path(File.join('..', 'lib', 'cybele', 'app_builder'), File.dirname(__FILE__)) | ||
|
||
templates_root = File.expand_path(File.join("..", "templates"), File.dirname(__FILE__)) | ||
Cybele::AppGenerator.source_root templates_root | ||
Cybele::AppGenerator.source_paths << Rails::Generators::AppGenerator.source_root << templates_root | ||
Cybele::AppGenerator.start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# coding: utf-8 | ||
lib = File.expand_path('../lib', __FILE__) | ||
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) | ||
require 'cybele/version' | ||
|
||
Gem::Specification.new do |spec| | ||
spec.name = 'cybele' | ||
spec.version = Cybele::VERSION | ||
spec.authors = %w[lab2023] | ||
spec.email = %w[[email protected]] | ||
spec.description = %q{Yet another rails template gem} | ||
spec.summary = %q{Yet another rails template gem} | ||
spec.homepage = 'https://github.com/lab2023/cybele' | ||
spec.license = 'MIT' | ||
|
||
spec.required_ruby_version = '>= 2.0.0' | ||
spec.add_dependency 'bundler', '~> 1.3' | ||
spec.add_dependency 'rails', '4.0.0.rc1' | ||
|
||
spec.files = `git ls-files`.split($/) | ||
spec.executables = %w[cybele] | ||
spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) | ||
spec.require_paths = %w[lib] | ||
|
||
spec.add_development_dependency "bundler", "~> 1.3" | ||
spec.add_development_dependency "rake" | ||
|
||
spec.extra_rdoc_files = %w[README.md LICENSE.txt] | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
module Cybele | ||
class AppBuilder < Rails::AppBuilder | ||
|
||
include Thor::Actions | ||
include Thor::Shell | ||
|
||
def add_readme_md | ||
template 'README.md.erb', 'README.md', :force => true | ||
end | ||
|
||
def remove_public_index | ||
say 'public' | ||
remove_file 'public/index.html' | ||
end | ||
|
||
def remove_readme_rdoc | ||
say 'readme' | ||
remove_file 'README.rdoc' | ||
end | ||
|
||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
require 'rails/generators' | ||
require 'rails/generators/rails/app/app_generator' | ||
|
||
module Cybele | ||
class AppGenerator < Rails::Generators::AppGenerator | ||
class_option :database, :type => :string, :aliases => '-d', :default => 'postgresql', | ||
:desc => "Preconfigure for selected database (options: #{DATABASES.join('/')})" | ||
|
||
class_option :skip_test_unit, :type => :boolean, :aliases => '-T', :default => true, | ||
:desc => 'Skip Test::Unit files' | ||
|
||
def finish_template | ||
invoke :customization | ||
super | ||
end | ||
|
||
def customization | ||
invoke :add_readme_md | ||
invoke :remove_files_we_dont_need | ||
end | ||
|
||
def add_readme_md | ||
say 'Add README.md' | ||
build :readme | ||
end | ||
|
||
def remove_files_we_dont_need | ||
say 'Remove files we don\'t need' | ||
build :remove_public_index | ||
build :remove_readme_rdoc | ||
end | ||
|
||
protected | ||
|
||
def get_builder_class | ||
Cybele::AppBuilder | ||
end | ||
|
||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module Cybele | ||
VERSION = '0.1.0' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# <%= app_name %> | ||
|