skellington 0.4.0 → 0.4.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.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/.rspec +1 -0
- data/Guardfile +1 -1
- data/README.md +44 -24
- data/Rakefile +1 -3
- data/config/config.yaml +28 -4
- data/files +24 -0
- data/lib/skellington/template.rb +1 -1
- data/lib/skellington/version.rb +1 -1
- data/lib/templates/.rspec.eruby +3 -0
- data/lib/templates/Rakefile.eruby +6 -1
- data/lib/templates/config.ru.eruby +1 -2
- data/lib/templates/features/json.feature.eruby +9 -0
- data/lib/templates/features/support/env.rb.eruby +2 -1
- data/lib/templates/lib/app.rb.eruby +28 -8
- data/lib/templates/lib/app/helpers.rb.eruby +4 -0
- data/lib/templates/lib/app/racks.rb.eruby +24 -0
- data/lib/templates/public/assets/favicon.ico.eruby +0 -0
- data/lib/templates/public/css/styles.css.eruby +0 -0
- data/lib/templates/public/js/app.js.eruby +0 -0
- data/lib/templates/spec/app/app_spec.rb.eruby +7 -0
- data/lib/templates/spec/javascripts/appSpec.js.eruby +5 -0
- data/lib/templates/spec/javascripts/support/jasmine.yml.eruby +15 -0
- data/lib/templates/spec/javascripts/support/jasmine_helper.rb.eruby +0 -0
- data/lib/templates/spec/spec_helper.rb.eruby +16 -0
- data/lib/templates/views/default.erb.eruby +15 -0
- data/lib/templates/views/includes/header.erb.eruby +22 -0
- data/lib/templates/{lib/views → views}/index.erb.eruby +0 -0
- data/skellington.gemspec +0 -3
- data/spec/cli/app_spec.rb +85 -0
- data/{features/bootstrap.feature → spec/cli/bootstrap_spec.rb} +41 -27
- data/spec/cli/config_ru_spec.rb +18 -0
- data/spec/cli/cukes_spec.rb +66 -0
- data/spec/cli/gemfile_spec.rb +38 -0
- data/spec/cli/git_spec.rb +12 -0
- data/spec/cli/javascript_spec.rb +42 -0
- data/spec/cli/non_local_path_spec.rb +55 -0
- data/spec/cli/procfile_spec.rb +16 -0
- data/spec/cli/public_spec.rb +14 -0
- data/spec/cli/rakefile_spec.rb +30 -0
- data/spec/cli/rbenv_spec.rb +17 -0
- data/spec/cli/spec_spec.rb +51 -0
- data/spec/cli_spec.rb +32 -0
- data/spec/hyphens_spec.rb +36 -0
- data/spec/spec_helper.rb +39 -0
- metadata +49 -78
- data/features/app.feature +0 -21
- data/features/cli.feature +0 -29
- data/features/config.ru.feature +0 -12
- data/features/cukes.feature +0 -50
- data/features/gemfile.feature +0 -27
- data/features/git.feature +0 -5
- data/features/guardfile.feature +0 -16
- data/features/hyphens.feature +0 -27
- data/features/naming.feature +0 -6
- data/features/non-local-path.feature +0 -29
- data/features/procfile.feature +0 -9
- data/features/rakefile.feature +0 -18
- data/features/rbenv.feature +0 -6
- data/features/support/env.rb +0 -6
- data/lib/templates/Guardfile.eruby +0 -8
- data/lib/templates/lib/views/default.erb.eruby +0 -35
data/features/config.ru.feature
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
Feature: Generate skellington
|
2
|
-
|
3
|
-
Scenario: generate config.ru
|
4
|
-
When I successfully run `skellington generate dummy_app`
|
5
|
-
Then a file named "dummy_app/config.ru" should exist
|
6
|
-
And the file "dummy_app/config.ru" should contain:
|
7
|
-
"""
|
8
|
-
require 'rubygems'
|
9
|
-
require File.join(File.dirname(__FILE__), 'lib/dummy_app.rb')
|
10
|
-
|
11
|
-
run DummyApp
|
12
|
-
"""
|
data/features/cukes.feature
DELETED
@@ -1,50 +0,0 @@
|
|
1
|
-
Feature: Generate skellington
|
2
|
-
|
3
|
-
Scenario: generate feature
|
4
|
-
When I successfully run `skellington generate dummy_app`
|
5
|
-
Then a directory named "dummy_app/features" should exist
|
6
|
-
And a file named "dummy_app/features/dummy_app.feature" should exist
|
7
|
-
And the file "dummy_app/features/dummy_app.feature" should contain:
|
8
|
-
"""
|
9
|
-
Feature: Make sure DummyApp is plumbed in correctly
|
10
|
-
|
11
|
-
Scenario: Get root
|
12
|
-
When I send a GET request to "/"
|
13
|
-
Then the response status should be "200"
|
14
|
-
"""
|
15
|
-
|
16
|
-
Scenario: generate env.rb
|
17
|
-
When I successfully run `skellington generate dummy_app`
|
18
|
-
And a file named "dummy_app/features/support/env.rb" should exist
|
19
|
-
And the file "dummy_app/features/support/env.rb" should contain:
|
20
|
-
"""
|
21
|
-
ENV['RACK_ENV'] = 'test'
|
22
|
-
|
23
|
-
require File.join(File.dirname(__FILE__), '..', '..', 'lib/dummy_app.rb')
|
24
|
-
|
25
|
-
require 'capybara'
|
26
|
-
require 'capybara/cucumber'
|
27
|
-
require 'rspec'
|
28
|
-
require 'cucumber/api_steps'
|
29
|
-
|
30
|
-
Capybara.app = DummyApp
|
31
|
-
|
32
|
-
class DummyAppWorld
|
33
|
-
include Capybara::DSL
|
34
|
-
include RSpec::Expectations
|
35
|
-
include RSpec::Matchers
|
36
|
-
|
37
|
-
def app
|
38
|
-
DummyApp
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
World do
|
43
|
-
DummyAppWorld.new
|
44
|
-
end
|
45
|
-
"""
|
46
|
-
|
47
|
-
Scenario: generate 'step_defintions' directory
|
48
|
-
When I successfully run `skellington generate dummy_app`
|
49
|
-
Then a directory named "dummy_app/features/step_definitions" should exist
|
50
|
-
And a file named "dummy_app/features/step_definitions/dummy_app_steps.rb" should exist
|
data/features/gemfile.feature
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
Feature: Generate skellington
|
2
|
-
|
3
|
-
Scenario: generate Gemfile
|
4
|
-
When I successfully run `skellington generate dummy_app`
|
5
|
-
Then a file named "dummy_app/Gemfile" should exist
|
6
|
-
And the file "dummy_app/Gemfile" should contain:
|
7
|
-
"""
|
8
|
-
source 'https://rubygems.org'
|
9
|
-
|
10
|
-
ruby '
|
11
|
-
"""
|
12
|
-
|
13
|
-
And the file "dummy_app/Gemfile" should contain:
|
14
|
-
"""
|
15
|
-
gem 'sinatra'
|
16
|
-
gem 'thin'
|
17
|
-
gem 'rake'
|
18
|
-
|
19
|
-
group :test do
|
20
|
-
gem 'cucumber'
|
21
|
-
gem 'capybara'
|
22
|
-
gem 'guard'
|
23
|
-
gem 'guard-cucumber'
|
24
|
-
gem 'pry'
|
25
|
-
gem 'cucumber-api-steps', require: false
|
26
|
-
end
|
27
|
-
"""
|
data/features/git.feature
DELETED
data/features/guardfile.feature
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
Feature: Generate skellington
|
2
|
-
|
3
|
-
Scenario: generate Guardfile
|
4
|
-
When I successfully run `skellington generate dummy_app`
|
5
|
-
Then a file named "dummy_app/Guardfile" should exist
|
6
|
-
And the file "dummy_app/Guardfile" should contain:
|
7
|
-
"""
|
8
|
-
guard :cucumber do
|
9
|
-
watch %r{^features/.+\.feature$}
|
10
|
-
watch(%r{^features/support/.+$}) { 'features' }
|
11
|
-
|
12
|
-
watch(%r{^features/step_definitions/(.+)_steps\.rb$}) do |m|
|
13
|
-
Dir[File.join("**/#{m[1]}.feature")][0] || 'features'
|
14
|
-
end
|
15
|
-
end
|
16
|
-
"""
|
data/features/hyphens.feature
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
Feature: Generate skellington
|
2
|
-
|
3
|
-
Scenario: change the names if there are hyphens
|
4
|
-
When I successfully run `skellington generate hyphenated-name`
|
5
|
-
Then the output should contain "Generating hyphenated_name/Gemfile"
|
6
|
-
And the output should contain "bundle"
|
7
|
-
And the output should contain:
|
8
|
-
"""
|
9
|
-
Your new Sinatra app HyphenatedName has been created
|
10
|
-
|
11
|
-
(Note that 'hyphenated-name' has been changed to 'hyphenated_name' because Ruby finds '-'s troubling)
|
12
|
-
|
13
|
-
Now do
|
14
|
-
|
15
|
-
cd hyphenated_name
|
16
|
-
bundle
|
17
|
-
bundle exec rake
|
18
|
-
|
19
|
-
And presuming that passes OK
|
20
|
-
|
21
|
-
git add .
|
22
|
-
git commit -m 'First commit'
|
23
|
-
|
24
|
-
You can run the app with
|
25
|
-
|
26
|
-
bundle exec rackup
|
27
|
-
"""
|
data/features/naming.feature
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
Feature: Generate skellington
|
2
|
-
|
3
|
-
Scenario: generate app at a non-local path
|
4
|
-
When I successfully run `skellington generate subdir/some_app`
|
5
|
-
Then a directory named "subdir/some_app/lib/" should exist
|
6
|
-
And a file named "subdir/some_app/lib/some_app.rb" should exist
|
7
|
-
And the file "subdir/some_app/lib/some_app.rb" should contain:
|
8
|
-
"""
|
9
|
-
require 'sinatra/base'
|
10
|
-
|
11
|
-
class SomeApp < Sinatra::Base
|
12
|
-
get '/' do
|
13
|
-
@content = '<h1>Hello from SomeApp</h1>'
|
14
|
-
@title = 'SomeApp'
|
15
|
-
erb :index, layout: :default
|
16
|
-
end
|
17
|
-
|
18
|
-
# start the server if ruby file executed directly
|
19
|
-
run! if app_file == $0
|
20
|
-
end
|
21
|
-
"""
|
22
|
-
And a file named "subdir/some_app/config.ru" should exist
|
23
|
-
And the file "subdir/some_app/config.ru" should contain:
|
24
|
-
"""
|
25
|
-
require 'rubygems'
|
26
|
-
require File.join(File.dirname(__FILE__), 'lib/some_app.rb')
|
27
|
-
|
28
|
-
run SomeApp
|
29
|
-
"""
|
data/features/procfile.feature
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
Feature: Generate skellington
|
2
|
-
|
3
|
-
Scenario: generate Procfile
|
4
|
-
When I successfully run `skellington generate dummy_app`
|
5
|
-
Then a file named "dummy_app/Procfile" should exist
|
6
|
-
And the file "dummy_app/Procfile" should contain:
|
7
|
-
"""
|
8
|
-
web: bundle exec ruby lib/dummy_app.rb
|
9
|
-
"""
|
data/features/rakefile.feature
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
Feature: Generate skellington
|
2
|
-
|
3
|
-
Scenario: generate Rakefile
|
4
|
-
When I successfully run `skellington generate dummy_app`
|
5
|
-
Then a file named "dummy_app/Rakefile" should exist
|
6
|
-
And the file "dummy_app/Rakefile" should contain:
|
7
|
-
"""
|
8
|
-
require File.join(File.dirname(__FILE__), 'lib/dummy_app.rb')
|
9
|
-
|
10
|
-
unless ENV['RACK_ENV'] == 'production'
|
11
|
-
require 'rspec/core/rake_task'
|
12
|
-
require 'cucumber/rake/task'
|
13
|
-
|
14
|
-
Cucumber::Rake::Task.new
|
15
|
-
|
16
|
-
task :default => [:cucumber]
|
17
|
-
end
|
18
|
-
"""
|
data/features/rbenv.feature
DELETED
data/features/support/env.rb
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html lang='en'>
|
3
|
-
<head>
|
4
|
-
<meta charset='utf-8' />
|
5
|
-
<meta http-equiv='X-UA-Compatible' content='IE=edge' />
|
6
|
-
<meta name='viewport' content='width=device-width, initial-scale=1' />
|
7
|
-
|
8
|
-
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
9
|
-
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
10
|
-
<!--[if lt IE 9]>
|
11
|
-
<script src='https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js'></script>
|
12
|
-
<script src='https://oss.maxcdn.com/respond/1.4.2/respond.min.js'></script>
|
13
|
-
<![endif]-->
|
14
|
-
|
15
|
-
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
|
16
|
-
<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js'></script>
|
17
|
-
<!-- Include all compiled plugins (below), or include individual files as needed -->
|
18
|
-
<script src='//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js'></script>
|
19
|
-
<link rel='stylesheet' href='//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css' type='text/css' />
|
20
|
-
<link rel='icon' type='image/png' href='/assets/favicon.ico' />
|
21
|
-
<title><%%= @title %></title>
|
22
|
-
</head>
|
23
|
-
|
24
|
-
<body>
|
25
|
-
<div class='container'>
|
26
|
-
<div class='row'>
|
27
|
-
<div class='col-md-2'></div>
|
28
|
-
<div class='col-md-8'>
|
29
|
-
<%%= yield %>
|
30
|
-
</div>
|
31
|
-
<div class='col-md-2'></div>
|
32
|
-
</div>
|
33
|
-
</div>
|
34
|
-
</body>
|
35
|
-
</html>
|