corneal 0.1.5 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +41 -17
- data/bin/corneal +1 -1
- data/lib/corneal.rb +9 -0
- data/lib/corneal/cli.rb +12 -119
- data/lib/corneal/generators/app/app_generator.rb +129 -0
- data/lib/{templates → corneal/generators/app/templates}/Gemfile +0 -0
- data/lib/{templates → corneal/generators/app/templates}/README.md +0 -0
- data/lib/{templates → corneal/generators/app/templates}/Rakefile +0 -0
- data/lib/{templates → corneal/generators/app/templates}/app/controllers/application_controller.rb +0 -0
- data/lib/{templates → corneal/generators/app/templates}/app/models/.gitkeep +0 -0
- data/lib/{templates → corneal/generators/app/templates}/app/views/layout.erb.tt +0 -0
- data/lib/{templates → corneal/generators/app/templates}/app/views/welcome.erb +0 -0
- data/lib/{templates → corneal/generators/app/templates}/config.ru +0 -0
- data/lib/{templates → corneal/generators/app/templates}/config/db.yml +0 -0
- data/lib/{templates → corneal/generators/app/templates}/config/environment.rb +0 -0
- data/lib/{templates → corneal/generators/app/templates}/config/initializers/database.rb +0 -0
- data/lib/{templates → corneal/generators/app/templates}/config/initializers/redis.rb +0 -0
- data/lib/{templates → corneal/generators/app/templates}/config/redis.yml +0 -0
- data/lib/{templates → corneal/generators/app/templates}/public/favicon.ico +0 -0
- data/lib/{templates → corneal/generators/app/templates}/public/images/.gitkeep +0 -0
- data/lib/{templates → corneal/generators/app/templates}/public/images/corneal-small.png +0 -0
- data/lib/{templates → corneal/generators/app/templates}/public/javascripts/.gitkeep +0 -0
- data/lib/{templates → corneal/generators/app/templates}/public/stylesheets/main.css +0 -0
- data/lib/{templates → corneal/generators/app/templates}/spec/application_controller_spec.rb +0 -0
- data/lib/{templates → corneal/generators/app/templates}/spec/spec_helper.rb +0 -0
- data/lib/corneal/generators/model/migration.rb.erb +10 -0
- data/lib/corneal/generators/model/model.rb.erb +2 -0
- data/lib/corneal/generators/model/model_generator.rb +58 -0
- data/lib/corneal/version.rb +3 -3
- data/spec/corneal/cli_spec.rb +3 -3
- metadata +41 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c72255b709457456984468ae88732cf41560024
|
4
|
+
data.tar.gz: 35dc9fb6162d07a9613bf4cf5e22a2bac58dd3bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b68e2d04e08205ae6de10c4ca8db909ec6045a6faa3388ddd10aa38a88627594cd7a55b4c529852f558d5371589c3b468191ad3499ef5797881be2b654fff5fc
|
7
|
+
data.tar.gz: b6c5dcc630915ec6a2a5a5bd1d18038ba5bc4c491828399b6767dfdd11b1d9c9a04c1f641c1d8a5255329aebc95cc7e542a46c006dc6ba4aab1511b17c4ace28
|
data/README.md
CHANGED
@@ -10,7 +10,7 @@ When I was creating my first major Sinatra project, [Cook This Way](https://gith
|
|
10
10
|
|
11
11
|
I also wanted to create a gem for future Learn students so they could easily get started building their projects. Although built with them in mind, this can get you off and running with any Sinatra app.
|
12
12
|
|
13
|
-
Install the gem, run `corneal app-name`, run `bundle`, and you're all set! You can start up your server with `shotgun` and verify everything is working. It is as simple as that.
|
13
|
+
Install the gem, run `corneal new app-name`, run `bundle install`, and you're all set! You can start up your server with `shotgun` and verify everything is working. It is as simple as that.
|
14
14
|
|
15
15
|
It uses a file structure similar to what you would see with Rails.
|
16
16
|
|
@@ -32,9 +32,7 @@ Directory structure:
|
|
32
32
|
│ ├── initializers
|
33
33
|
│ └── environment.rb
|
34
34
|
├── db
|
35
|
-
│
|
36
|
-
│ ├── schema.rb
|
37
|
-
│ └── test.sqlite
|
35
|
+
│ └── migrate
|
38
36
|
├── lib
|
39
37
|
│ └── .gitkeep
|
40
38
|
└── public
|
@@ -52,29 +50,55 @@ Directory structure:
|
|
52
50
|
|
53
51
|
gem install corneal
|
54
52
|
|
55
|
-
##
|
53
|
+
## Commands
|
54
|
+
```
|
55
|
+
corneal -v # Show Corneal version number
|
56
|
+
corneal help [COMMAND] # Describe available commands or one specific command
|
57
|
+
corneal model NAME # Generate a model
|
58
|
+
corneal new APP_PATH # Creates a new Sinatra application
|
59
|
+
```
|
56
60
|
|
57
|
-
|
58
|
-
* `--bundle` Run bundle after generating the app
|
59
|
-
* `--git` Initialize a Git repository
|
61
|
+
## Using Corneal
|
60
62
|
|
61
|
-
|
63
|
+
To generate your app:
|
62
64
|
|
63
|
-
|
65
|
+
corneal new app-name
|
64
66
|
|
65
|
-
|
67
|
+
After Corneal is done generating your app, run `bundle install` from your app's directory:
|
66
68
|
|
67
|
-
|
68
|
-
|
69
|
+
cd app-name
|
70
|
+
bundle install
|
69
71
|
|
70
|
-
|
72
|
+
You can then start your server with `shotgun`:
|
71
73
|
|
72
|
-
|
74
|
+
shotgun
|
75
|
+
|
76
|
+
You can generate a model and migration file:
|
77
|
+
|
78
|
+
corneal model NAME
|
79
|
+
|
80
|
+
You can also add your model attributes when you generate the model and have them added to your migration file:
|
73
81
|
|
74
|
-
|
82
|
+
corneal model NAME name:string age:integer
|
83
|
+
|
84
|
+
```
|
85
|
+
class CreateUsers < ActiveRecord::Migration
|
86
|
+
def change
|
87
|
+
create_table :users do |t|
|
88
|
+
t.string :name
|
89
|
+
t.age :integer
|
90
|
+
|
91
|
+
t.timestamps null: false
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
```
|
96
|
+
|
97
|
+
Visit [http://localhost:9393/](http://localhost:9393/) to verify your app is running.
|
75
98
|
|
76
|
-
|
99
|
+
You can also verify it is working by running `rspec` to see the passing test:
|
77
100
|
|
101
|
+
1 example, 0 failures
|
78
102
|
|
79
103
|
## Contributing
|
80
104
|
|
data/bin/corneal
CHANGED
data/lib/corneal.rb
ADDED
data/lib/corneal/cli.rb
CHANGED
@@ -1,129 +1,22 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
require "extensions/string"
|
4
|
-
require "thor/group"
|
1
|
+
require "thor"
|
5
2
|
|
6
3
|
module Corneal
|
7
|
-
class CLI < Thor
|
8
|
-
include Thor::Actions
|
9
|
-
|
10
|
-
desc "Creates a new Sinatra application"
|
11
|
-
argument :name, :type => :string, :desc => "The name of the new application"
|
12
|
-
class_option :capistrano, :type => :boolean, :desc => "Include Capistrano configuration"
|
13
|
-
class_option :database, :aliases => "-d", :default => "", :desc => "The type of database to use"
|
14
|
-
class_option :redis, :type => :boolean, :desc => "Include Redis configuration"
|
15
|
-
class_option :rvm, :type => :boolean, :desc => "Create .ruby-version (ruby-2.1.0) and .ruby-gemset"
|
16
|
-
class_option :bundle, :type => :boolean, :desc => "Run bundle after generating the app"
|
17
|
-
class_option :git, :type => :boolean, :desc => "Initialize a Git repository"
|
18
|
-
|
19
|
-
# Creates instance variables from options passed to corneal.
|
20
|
-
def setup
|
21
|
-
@app_path = name.directory_name
|
22
|
-
@name = name.file_name
|
23
|
-
|
24
|
-
options.each do |key, value|
|
25
|
-
instance_variable_set "@#{key.to_s}".to_sym, value
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
def self.source_root
|
30
|
-
File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "lib", "templates"))
|
31
|
-
end
|
32
|
-
|
33
|
-
# Create empty directories
|
34
|
-
def create_empty_directories
|
35
|
-
%w{config/initializers lib spec}.each do |dir|
|
36
|
-
empty_directory File.join(@app_path, dir)
|
37
|
-
end
|
38
|
-
|
39
|
-
empty_directory File.join(@app_path, 'db/migrate') unless @database.empty?
|
40
|
-
|
41
|
-
create_file File.join(@app_path, "lib", ".gitkeep")
|
42
|
-
template "config/environment.rb", File.join(@app_path, "config/environment.rb")
|
43
|
-
end
|
44
|
-
|
45
|
-
def create_public_directory
|
46
|
-
%w{public/stylesheets public/javascripts public/images}.each do |dir|
|
47
|
-
directory dir, File.join(@app_path, dir)
|
48
|
-
end
|
49
|
-
|
50
|
-
template "public/favicon.ico", File.join(@app_path, "public/favicon.ico")
|
51
|
-
end
|
52
|
-
|
53
|
-
def create_app_directory
|
54
|
-
%w{app/controllers app/views app/models}.each do |dir|
|
55
|
-
directory dir, File.join(@app_path, dir)
|
56
|
-
end
|
57
|
-
end
|
4
|
+
class CLI < Thor
|
58
5
|
|
59
|
-
|
60
|
-
|
6
|
+
desc "-v", "Show Corneal version number"
|
7
|
+
map %w[-v --version] => :version
|
8
|
+
# USAGE: corneal -v
|
9
|
+
def version
|
10
|
+
say "Corneal #{Corneal::VERSION::STRING}"
|
61
11
|
end
|
62
12
|
|
63
|
-
def create_spec_helper
|
64
|
-
template "spec/spec_helper.rb", File.join(@app_path, "spec/spec_helper.rb")
|
65
|
-
end
|
66
13
|
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
def create_gemfile
|
72
|
-
template "Gemfile", File.join(@app_path, "Gemfile")
|
73
|
-
end
|
74
|
-
|
75
|
-
def create_rakefile
|
76
|
-
template "Rakefile", File.join(@app_path, "Rakefile")
|
77
|
-
end
|
78
|
-
|
79
|
-
def create_readme
|
80
|
-
copy_file "README.md", File.join(@app_path, "README.md")
|
81
|
-
end
|
82
|
-
|
83
|
-
def create_db_config
|
84
|
-
template("config/db.yml", File.join(@app_path, "config/db.yml")) unless @database.empty?
|
85
|
-
end
|
86
|
-
|
87
|
-
def create_database_initializer
|
88
|
-
template("config/initializers/database.rb", File.join(@app_path, "config/initializers/database.rb")) unless @database.empty?
|
89
|
-
end
|
90
|
-
|
91
|
-
def create_redis_config
|
92
|
-
copy_file("config/redis.yml", File.join(@app_path, "config/redis.yml")) if @redis
|
93
|
-
end
|
94
|
-
|
95
|
-
def create_redis_initializer
|
96
|
-
template("config/initializers/redis.rb", File.join(@app_path, "config/initializers/redis.rb")) if @redis
|
97
|
-
end
|
98
|
-
|
99
|
-
def create_capistrano_config
|
100
|
-
if @capistrano
|
101
|
-
inside(@app_path) do
|
102
|
-
run('cap install')
|
103
|
-
end
|
104
|
-
end
|
105
|
-
end
|
106
|
-
|
107
|
-
def create_rvm_gemset
|
108
|
-
if @rvm
|
109
|
-
create_file(File.join(@app_path, '.ruby-version'), 'ruby-2.1.0')
|
110
|
-
create_file(File.join(@app_path, '.ruby-gemset'), @app_path)
|
111
|
-
|
112
|
-
@bundle = false
|
113
|
-
puts "You need to run 'bundle install' manually."
|
114
|
-
end
|
115
|
-
end
|
116
|
-
|
117
|
-
def initialize_git_repo
|
118
|
-
inside(@app_path) do
|
119
|
-
run('git init .') if @git
|
120
|
-
end
|
121
|
-
end
|
14
|
+
# register(class_name, subcommand_alias, usage_list_string, description_string)
|
15
|
+
register Corneal::Generators::AppGenerator, "new", "new APP_PATH", "Creates a new Sinatra application"
|
16
|
+
register Corneal::Generators::ModelGenerator, "model", "model NAME", "Generate a model"
|
122
17
|
|
123
|
-
def
|
124
|
-
|
125
|
-
run('bundle') if @bundle
|
126
|
-
end
|
18
|
+
def self.exit_on_failure
|
19
|
+
true
|
127
20
|
end
|
128
21
|
end
|
129
22
|
end
|
@@ -0,0 +1,129 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
require "thor/group"
|
3
|
+
|
4
|
+
module Corneal
|
5
|
+
module Generators
|
6
|
+
class AppGenerator < Thor::Group
|
7
|
+
include Thor::Actions
|
8
|
+
|
9
|
+
desc "Creates a new Sinatra application"
|
10
|
+
argument :name, :type => :string, :desc => "The name of the new application"
|
11
|
+
class_option :capistrano, :type => :boolean, :desc => "Include Capistrano configuration"
|
12
|
+
class_option :database, :aliases => "-d", :default => "", :desc => "The type of database to use"
|
13
|
+
class_option :redis, :type => :boolean, :desc => "Include Redis configuration"
|
14
|
+
class_option :rvm, :type => :boolean, :desc => "Create .ruby-version (ruby-2.1.0) and .ruby-gemset"
|
15
|
+
class_option :bundle, :type => :boolean, :desc => "Run bundle after generating the app"
|
16
|
+
class_option :git, :type => :boolean, :desc => "Initialize a Git repository"
|
17
|
+
|
18
|
+
# Creates instance variables from options passed to corneal.
|
19
|
+
def setup
|
20
|
+
@app_path = name.directory_name
|
21
|
+
@name = name.file_name
|
22
|
+
|
23
|
+
options.each do |key, value|
|
24
|
+
instance_variable_set "@#{key.to_s}".to_sym, value
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
def self.source_root
|
29
|
+
File.expand_path(File.join(File.dirname(__FILE__), "templates"))
|
30
|
+
end
|
31
|
+
|
32
|
+
# Create empty directories
|
33
|
+
def create_empty_directories
|
34
|
+
%w{config/initializers lib spec}.each do |dir|
|
35
|
+
empty_directory File.join(@app_path, dir)
|
36
|
+
end
|
37
|
+
|
38
|
+
empty_directory File.join(@app_path, 'db/migrate')
|
39
|
+
|
40
|
+
create_file File.join(@app_path, "lib", ".gitkeep")
|
41
|
+
template "config/environment.rb", File.join(@app_path, "config/environment.rb")
|
42
|
+
end
|
43
|
+
|
44
|
+
def create_public_directory
|
45
|
+
%w{public/stylesheets public/javascripts public/images}.each do |dir|
|
46
|
+
directory dir, File.join(@app_path, dir)
|
47
|
+
end
|
48
|
+
|
49
|
+
template "public/favicon.ico", File.join(@app_path, "public/favicon.ico")
|
50
|
+
end
|
51
|
+
|
52
|
+
def create_app_directory
|
53
|
+
%w{app/controllers app/views app/models}.each do |dir|
|
54
|
+
directory dir, File.join(@app_path, dir)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
def create_app_spec
|
59
|
+
template "spec/application_controller_spec.rb", File.join(@app_path, "spec/application_controller_spec.rb")
|
60
|
+
end
|
61
|
+
|
62
|
+
def create_spec_helper
|
63
|
+
template "spec/spec_helper.rb", File.join(@app_path, "spec/spec_helper.rb")
|
64
|
+
end
|
65
|
+
|
66
|
+
def create_config
|
67
|
+
template "config.ru", File.join(@app_path, "config.ru")
|
68
|
+
end
|
69
|
+
|
70
|
+
def create_gemfile
|
71
|
+
template "Gemfile", File.join(@app_path, "Gemfile")
|
72
|
+
end
|
73
|
+
|
74
|
+
def create_rakefile
|
75
|
+
template "Rakefile", File.join(@app_path, "Rakefile")
|
76
|
+
end
|
77
|
+
|
78
|
+
def create_readme
|
79
|
+
copy_file "README.md", File.join(@app_path, "README.md")
|
80
|
+
end
|
81
|
+
|
82
|
+
def create_db_config
|
83
|
+
template("config/db.yml", File.join(@app_path, "config/db.yml")) unless @database.empty?
|
84
|
+
end
|
85
|
+
|
86
|
+
def create_database_initializer
|
87
|
+
template("config/initializers/database.rb", File.join(@app_path, "config/initializers/database.rb")) unless @database.empty?
|
88
|
+
end
|
89
|
+
|
90
|
+
def create_redis_config
|
91
|
+
copy_file("config/redis.yml", File.join(@app_path, "config/redis.yml")) if @redis
|
92
|
+
end
|
93
|
+
|
94
|
+
def create_redis_initializer
|
95
|
+
template("config/initializers/redis.rb", File.join(@app_path, "config/initializers/redis.rb")) if @redis
|
96
|
+
end
|
97
|
+
|
98
|
+
def create_capistrano_config
|
99
|
+
if @capistrano
|
100
|
+
inside(@app_path) do
|
101
|
+
run('cap install')
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
def create_rvm_gemset
|
107
|
+
if @rvm
|
108
|
+
create_file(File.join(@app_path, '.ruby-version'), 'ruby-2.1.0')
|
109
|
+
create_file(File.join(@app_path, '.ruby-gemset'), @app_path)
|
110
|
+
|
111
|
+
@bundle = false
|
112
|
+
puts "You need to run 'bundle install' manually."
|
113
|
+
end
|
114
|
+
end
|
115
|
+
|
116
|
+
def initialize_git_repo
|
117
|
+
inside(@app_path) do
|
118
|
+
run('git init .') if @git
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
def install_dependencies
|
123
|
+
inside(@app_path) do
|
124
|
+
run('bundle') if @bundle
|
125
|
+
end
|
126
|
+
end
|
127
|
+
end
|
128
|
+
end
|
129
|
+
end
|
File without changes
|
File without changes
|
File without changes
|
data/lib/{templates → corneal/generators/app/templates}/app/controllers/application_controller.rb
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,10 @@
|
|
1
|
+
class <%= migration_class_name %> < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :<%= table_name %> do |t|
|
4
|
+
<% attributes.each do |attribute| -%>
|
5
|
+
t.<%= attribute[:type] %> :<%= attribute[:name] %>
|
6
|
+
<% end %>
|
7
|
+
t.timestamps null: false
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
require "thor/group"
|
2
|
+
require 'active_support/inflector'
|
3
|
+
|
4
|
+
module Corneal
|
5
|
+
module Generators
|
6
|
+
class ModelGenerator < Thor::Group
|
7
|
+
include Thor::Actions
|
8
|
+
attr_reader :file_name, :class_name, :model_name, :migration_name, :migration_class_name, :table_name
|
9
|
+
|
10
|
+
desc "Generate an ActiveRecord model"
|
11
|
+
argument :name, :type => :string, :desc => "Name of the model"
|
12
|
+
argument :attributes, type: :array, default: [], banner: "field:type field:type"
|
13
|
+
|
14
|
+
class_option :migration, type: :boolean, default: true, desc: "Generate migration for model"
|
15
|
+
|
16
|
+
def self.source_root
|
17
|
+
File.dirname(__FILE__)
|
18
|
+
end
|
19
|
+
|
20
|
+
def setup
|
21
|
+
@model_name = name.singularize
|
22
|
+
@class_name = model_name.camel_case
|
23
|
+
@file_name = model_name.file_name
|
24
|
+
@table_name = @file_name.pluralize
|
25
|
+
@migration_name = "create_#{@table_name}"
|
26
|
+
@migration_class_name = @migration_name.camel_case
|
27
|
+
|
28
|
+
attributes.map! do |attribute|
|
29
|
+
field = attribute.split(":")
|
30
|
+
{ name: field[0], type: (field[1] || "string") }
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def create_model
|
35
|
+
unless model_name == name
|
36
|
+
say "[WARNING] The model name '#{name}' was recognized as a plural, using the singular '#{model_name}' instead."
|
37
|
+
end
|
38
|
+
|
39
|
+
template "model.rb.erb", File.join("app/models", "#{file_name}.rb")
|
40
|
+
end
|
41
|
+
|
42
|
+
def create_migration
|
43
|
+
return unless options[:migration]
|
44
|
+
|
45
|
+
migration_files = Dir.entries("db/migrate").select { |path| !File.directory? path }
|
46
|
+
|
47
|
+
if duplicate = migration_files.find { |file| file.include?(migration_name) }
|
48
|
+
say_status :identical, "db/migrate/#{duplicate}", :blue
|
49
|
+
else
|
50
|
+
version = Time.now.utc.strftime("%Y%m%d%H%M%S")
|
51
|
+
migration_file_name = "#{version}_#{migration_name}.rb"
|
52
|
+
|
53
|
+
template "migration.rb.erb", File.join("db/migrate", migration_file_name)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
data/lib/corneal/version.rb
CHANGED
data/spec/corneal/cli_spec.rb
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
require 'fakefs'
|
2
2
|
require_relative "../spec_helper"
|
3
|
-
require_relative "../../lib/corneal
|
3
|
+
require_relative "../../lib/corneal"
|
4
4
|
|
5
5
|
describe Corneal::VERSION do
|
6
|
-
subject { Corneal::
|
6
|
+
subject { Corneal::Generators::AppGenerator }
|
7
7
|
|
8
8
|
describe "source_root" do
|
9
9
|
it "should return with a full path" do
|
10
10
|
pwd = File.dirname(__FILE__)
|
11
|
-
template_path = pwd.sub 'spec/corneal', 'lib/templates'
|
11
|
+
template_path = pwd.sub 'spec/corneal', 'lib/corneal/generators/app/templates'
|
12
12
|
subject.source_root.must_equal template_path
|
13
13
|
end
|
14
14
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: corneal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Emory
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-08-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0.18'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: activesupport
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '5.0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '5.0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: bundler
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -71,29 +85,34 @@ files:
|
|
71
85
|
- README.md
|
72
86
|
- Rakefile
|
73
87
|
- bin/corneal
|
88
|
+
- lib/corneal.rb
|
74
89
|
- lib/corneal/cli.rb
|
90
|
+
- lib/corneal/generators/app/app_generator.rb
|
91
|
+
- lib/corneal/generators/app/templates/Gemfile
|
92
|
+
- lib/corneal/generators/app/templates/README.md
|
93
|
+
- lib/corneal/generators/app/templates/Rakefile
|
94
|
+
- lib/corneal/generators/app/templates/app/controllers/application_controller.rb
|
95
|
+
- lib/corneal/generators/app/templates/app/models/.gitkeep
|
96
|
+
- lib/corneal/generators/app/templates/app/views/layout.erb.tt
|
97
|
+
- lib/corneal/generators/app/templates/app/views/welcome.erb
|
98
|
+
- lib/corneal/generators/app/templates/config.ru
|
99
|
+
- lib/corneal/generators/app/templates/config/db.yml
|
100
|
+
- lib/corneal/generators/app/templates/config/environment.rb
|
101
|
+
- lib/corneal/generators/app/templates/config/initializers/database.rb
|
102
|
+
- lib/corneal/generators/app/templates/config/initializers/redis.rb
|
103
|
+
- lib/corneal/generators/app/templates/config/redis.yml
|
104
|
+
- lib/corneal/generators/app/templates/public/favicon.ico
|
105
|
+
- lib/corneal/generators/app/templates/public/images/.gitkeep
|
106
|
+
- lib/corneal/generators/app/templates/public/images/corneal-small.png
|
107
|
+
- lib/corneal/generators/app/templates/public/javascripts/.gitkeep
|
108
|
+
- lib/corneal/generators/app/templates/public/stylesheets/main.css
|
109
|
+
- lib/corneal/generators/app/templates/spec/application_controller_spec.rb
|
110
|
+
- lib/corneal/generators/app/templates/spec/spec_helper.rb
|
111
|
+
- lib/corneal/generators/model/migration.rb.erb
|
112
|
+
- lib/corneal/generators/model/model.rb.erb
|
113
|
+
- lib/corneal/generators/model/model_generator.rb
|
75
114
|
- lib/corneal/version.rb
|
76
115
|
- lib/extensions/string.rb
|
77
|
-
- lib/templates/Gemfile
|
78
|
-
- lib/templates/README.md
|
79
|
-
- lib/templates/Rakefile
|
80
|
-
- lib/templates/app/controllers/application_controller.rb
|
81
|
-
- lib/templates/app/models/.gitkeep
|
82
|
-
- lib/templates/app/views/layout.erb.tt
|
83
|
-
- lib/templates/app/views/welcome.erb
|
84
|
-
- lib/templates/config.ru
|
85
|
-
- lib/templates/config/db.yml
|
86
|
-
- lib/templates/config/environment.rb
|
87
|
-
- lib/templates/config/initializers/database.rb
|
88
|
-
- lib/templates/config/initializers/redis.rb
|
89
|
-
- lib/templates/config/redis.yml
|
90
|
-
- lib/templates/public/favicon.ico
|
91
|
-
- lib/templates/public/images/.gitkeep
|
92
|
-
- lib/templates/public/images/corneal-small.png
|
93
|
-
- lib/templates/public/javascripts/.gitkeep
|
94
|
-
- lib/templates/public/stylesheets/main.css
|
95
|
-
- lib/templates/spec/application_controller_spec.rb
|
96
|
-
- lib/templates/spec/spec_helper.rb
|
97
116
|
- spec/corneal/cli_spec.rb
|
98
117
|
- spec/corneal/version_spec.rb
|
99
118
|
- spec/spec_helper.rb
|