skellington 0.4.16 → 0.5.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9314efa2e543396e6d7c0499ac5f885609a01326
4
- data.tar.gz: 501903a3cbd2783a152db0c91dd7d45440cab1b3
3
+ metadata.gz: f411bef35abe363debaf08e8cfe50e2d1a892f36
4
+ data.tar.gz: ae092e5416fc5596453980c6b294f5f9751198d9
5
5
  SHA512:
6
- metadata.gz: aad4f8daf6ba212ac7f101a0e04395c6c29150849e283a36131d8354a4787fdb46d4994e9dd33a03581dbd676b7b606e8ab8b562eb0493fc66b01cf1512b2b86
7
- data.tar.gz: 70d2b3a1068e304e430168b76ae408f1426e325ed2d15b0be856bbcf259d7ec258838e655e5c113e8f9800c57d8d94957c843e9d64957f1cfb072b602f8e82cc
6
+ metadata.gz: cc62f6456a077e1e713b8304b84b355822459531ab71796a0a0a5b777601dab14849627338c5e02547495a3e95519641b396963178a86b8c8737521fd6c34ec1
7
+ data.tar.gz: 04dc1289a9cae92de1856015d3df4932927da5e28c0390903c074e4142fd2961dff6f2c4e924943051ab27a1ec381e0c92e124a4bcf599776ebd10786e903be5
data/README.md CHANGED
@@ -10,8 +10,6 @@
10
10
 
11
11
  Extremely opinionated generator for your [Sinatra](http://www.sinatrarb.com/) app. Sets up:
12
12
 
13
- * [Cucumber](https://cucumber.io/)
14
- * with [cucumber-api-steps](https://github.com/jayzes/cucumber-api-steps)
15
13
  * [Rspec](http://rspec.info/)
16
14
  * [Jasmine](http://jasmine.github.io/2.0/introduction.html)
17
15
  * [Bootstrap](http://getbootstrap.com/)
data/config/config.yaml CHANGED
@@ -7,21 +7,16 @@ gems:
7
7
  - puma
8
8
 
9
9
  test:
10
- - cucumber
11
10
  - rspec
12
11
  - guard
13
12
  - guard-rspec
14
13
  - guard-jasmine
15
- - guard-cucumber
16
14
  - capybara
17
15
  - coveralls
18
16
  - jasmine
19
17
  - pry
20
18
  - actionpack
21
19
 
22
- test_require_false:
23
- - cucumber-api-steps
24
-
25
20
  files:
26
21
  Gemfile:
27
22
  LICENSE.md:
@@ -33,15 +28,9 @@ files:
33
28
  .gitignore:
34
29
  config.ru:
35
30
  # the template has this name
36
- features/first.feature:
31
+ lib/app.rb:
37
32
  # but the output file substitutes it like this, where wormname is an attribute
38
33
  # on the Generator object
39
- outpath: first/wormname
40
- features/json.feature:
41
- features/step_definitions/app_steps.rb:
42
- outpath: app/wormname
43
- features/support/env.rb:
44
- lib/app.rb:
45
34
  outpath: app/wormname
46
35
  lib/app/racks.rb:
47
36
  outpath: app/wormname/racks
@@ -1,3 +1,3 @@
1
1
  module Skellington
2
- VERSION = '0.4.16'
2
+ VERSION = '0.5.0'
3
3
  end
@@ -10,7 +10,4 @@ group :test do
10
10
  <% for gem in @gen.gems['test'] %>
11
11
  gem '<%= gem %>'
12
12
  <% end %>
13
- <% for gem in @gen.gems['test_require_false'] %>
14
- gem '<%= gem %>', require: false
15
- <% end %>
16
13
  end
@@ -1,12 +1,3 @@
1
- guard :cucumber do
2
- watch %r{^features/.+\.feature$}
3
- watch(%r{^features/support/.+$}) { 'features' }
4
-
5
- watch(%r{^features/step_definitions/(.+)_steps\.rb$}) do |m|
6
- Dir[File.join("**/#{m[1]}.feature")][0] || 'features'
7
- end
8
- end
9
-
10
1
  guard :jasmine do
11
2
  watch(%r{spec/javascripts/spec\.(js\.coffee|js|coffee)$}) { 'spec/javascripts' }
12
3
  watch(%r{spec/javascripts/.+_spec\.(js\.coffee|js|coffee)$})
@@ -2,14 +2,12 @@ require File.join(File.dirname(__FILE__), 'lib/<%= @gen.wormname %>.rb')
2
2
 
3
3
  unless ENV['RACK_ENV'] == 'production'
4
4
  require 'rspec/core/rake_task'
5
- require 'cucumber/rake/task'
6
5
  require 'coveralls/rake/task'
7
6
  require 'jasmine'
8
7
  load 'jasmine/tasks/jasmine.rake'
9
8
 
10
- Cucumber::Rake::Task.new
11
9
  RSpec::Core::RakeTask.new
12
10
  Coveralls::RakeTask.new
13
11
 
14
- task :default => [:cucumber, :spec, 'jasmine:ci', 'coveralls:push']
12
+ task :default => [:spec, 'jasmine:ci', 'coveralls:push']
15
13
  end
@@ -1,7 +1,21 @@
1
1
  module <%= @gen.camelname %>
2
+ JSON_HEADERS = { 'HTTP_ACCEPT' => 'application/json' }
3
+
2
4
  describe App do
3
- it 'knows the truth' do
4
- expect(true).to eq true
5
+ it 'says hello' do
6
+ get '/'
7
+ expect(last_response).to be_ok
8
+ expect(last_response.body).to match /Hello from <%= @gen.camelname %>/
9
+ end
10
+
11
+ it 'serves JSON' do
12
+ get '/', nil, JSON_HEADERS
13
+ expect(last_response).to be_ok
14
+ expect(JSON.parse last_response.body).to eq (
15
+ {
16
+ 'app' => '<%= @gen.camelname %>'
17
+ }
18
+ )
5
19
  end
6
20
  end
7
21
  end
data/skellington.gemspec CHANGED
@@ -8,14 +8,14 @@ Gem::Specification.new do |spec|
8
8
  spec.version = Skellington::VERSION
9
9
  spec.authors = ['pikesley']
10
10
  spec.email = ['sam@pikesley.org']
11
- spec.summary = %q{Opinionated boilerplate skeleton generator for a cuked Sinatra app}
12
- spec.description = %q{Generate tedious Cucumber and Sinatra boilerplate like a boss}
11
+ spec.summary = %q{Opinionated boilerplate skeleton generator for a Sinatra app}
12
+ spec.description = %q{Generate tedious Sinatra boilerplate like a boss}
13
13
  spec.homepage = 'http://sam.pikesley.org/projects/skellington/'
14
14
  spec.license = 'MIT'
15
15
 
16
16
  spec.files = `git ls-files -z`.split("\x0")
17
17
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
+ spec.test_files = spec.files.grep(%r{^(test|spec)/})
19
19
  spec.require_paths = ['lib']
20
20
 
21
21
  spec.add_dependency 'thor', '~> 0.19'
@@ -19,18 +19,15 @@ module Skellington
19
19
  gem 'puma'
20
20
 
21
21
  group :test do
22
- gem 'cucumber'
23
22
  gem 'rspec'
24
23
  gem 'guard'
25
24
  gem 'guard-rspec'
26
25
  gem 'guard-jasmine'
27
- gem 'guard-cucumber'
28
26
  gem 'capybara'
29
27
  gem 'coveralls'
30
28
  gem 'jasmine'
31
29
  gem 'pry'
32
30
  gem 'actionpack'
33
- gem 'cucumber-api-steps', require: false
34
31
  end
35
32
  """
36
33
  )
@@ -8,15 +8,6 @@ module Skellington
8
8
  subject.generate 'dummy_app'
9
9
  expect('dummy_app/Guardfile').to have_content (
10
10
  """
11
- guard :cucumber do
12
- /watch/
13
- /watch/
14
-
15
- /watch/
16
- /Dir/
17
- end
18
- end
19
-
20
11
  guard :jasmine do
21
12
  /watch/
22
13
  /watch/
@@ -12,16 +12,14 @@ module Skellington
12
12
 
13
13
  unless ENV['RACK_ENV'] == 'production'
14
14
  require 'rspec/core/rake_task'
15
- require 'cucumber/rake/task'
16
15
  require 'coveralls/rake/task'
17
16
  require 'jasmine'
18
17
  load 'jasmine/tasks/jasmine.rake'
19
18
 
20
- Cucumber::Rake::Task.new
21
19
  RSpec::Core::RakeTask.new
22
20
  Coveralls::RakeTask.new
23
21
 
24
- task :default => [:cucumber, :spec, 'jasmine:ci', 'coveralls:push']
22
+ task :default => [:spec, 'jasmine:ci', 'coveralls:push']
25
23
  end
26
24
  """
27
25
  )
@@ -36,9 +36,23 @@ module Skellington
36
36
  expect('dummy_app/spec/dummy_app/dummy_app_spec.rb').to have_content (
37
37
  """
38
38
  module DummyApp
39
+ JSON_HEADERS = { 'HTTP_ACCEPT' => 'application/json' }
40
+
39
41
  describe App do
40
- it 'knows the truth' do
41
- expect(true).to eq true
42
+ it 'says hello' do
43
+ get '/'
44
+ expect(last_response).to be_ok
45
+ expect(last_response.body).to match /Hello from DummyApp/
46
+ end
47
+
48
+ it 'serves JSON' do
49
+ get '/', nil, JSON_HEADERS
50
+ expect(last_response).to be_ok
51
+ expect(JSON.parse last_response.body).to eq (
52
+ {
53
+ 'app' => 'DummyApp'
54
+ }
55
+ )
42
56
  end
43
57
  end
44
58
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: skellington
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.16
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - pikesley
@@ -150,7 +150,7 @@ dependencies:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0.8'
153
- description: Generate tedious Cucumber and Sinatra boilerplate like a boss
153
+ description: Generate tedious Sinatra boilerplate like a boss
154
154
  email:
155
155
  - sam@pikesley.org
156
156
  executables:
@@ -168,7 +168,6 @@ files:
168
168
  - Rakefile
169
169
  - bin/skellington
170
170
  - config/config.yaml
171
- - files
172
171
  - lib/skellington.rb
173
172
  - lib/skellington/cli.rb
174
173
  - lib/skellington/generator.rb
@@ -184,10 +183,6 @@ files:
184
183
  - lib/templates/Procfile.eruby
185
184
  - lib/templates/Rakefile.eruby
186
185
  - lib/templates/config.ru.eruby
187
- - lib/templates/features/first.feature.eruby
188
- - lib/templates/features/json.feature.eruby
189
- - lib/templates/features/step_definitions/app_steps.rb.eruby
190
- - lib/templates/features/support/env.rb.eruby
191
186
  - lib/templates/lib/app.rb.eruby
192
187
  - lib/templates/lib/app/helpers.rb.eruby
193
188
  - lib/templates/lib/app/racks.rb.eruby
@@ -208,7 +203,6 @@ files:
208
203
  - spec/cli/app_spec.rb
209
204
  - spec/cli/bootstrap_spec.rb
210
205
  - spec/cli/config_ru_spec.rb
211
- - spec/cli/cukes_spec.rb
212
206
  - spec/cli/gemfile_spec.rb
213
207
  - spec/cli/git_spec.rb
214
208
  - spec/cli/guardfile_spec.rb
@@ -247,12 +241,11 @@ rubyforge_project:
247
241
  rubygems_version: 2.5.1
248
242
  signing_key:
249
243
  specification_version: 4
250
- summary: Opinionated boilerplate skeleton generator for a cuked Sinatra app
244
+ summary: Opinionated boilerplate skeleton generator for a Sinatra app
251
245
  test_files:
252
246
  - spec/cli/app_spec.rb
253
247
  - spec/cli/bootstrap_spec.rb
254
248
  - spec/cli/config_ru_spec.rb
255
- - spec/cli/cukes_spec.rb
256
249
  - spec/cli/gemfile_spec.rb
257
250
  - spec/cli/git_spec.rb
258
251
  - spec/cli/guardfile_spec.rb
data/files DELETED
@@ -1,24 +0,0 @@
1
- ./.rspec <
2
- ./.ruby-version <
3
- ./config.ru <
4
- ./features/json.feature <
5
- ./features/step_definitions/template_steps.rb <
6
- ./features/support/env.rb <
7
- ./features/template.feature <
8
- ./Gemfile <
9
- ./lib/template/helpers.rb <
10
- ./lib/template/racks.rb <
11
- ./lib/template.rb <
12
- ./Procfile <
13
- ./public/assets/favicon.ico <
14
- ./public/css/styles.css <
15
- ./public/js/template.js <
16
- ./Rakefile <
17
- ./spec/javascripts/support/jasmine.yml <
18
- ./spec/javascripts/support/jasmine_helper.rb <
19
- ./spec/javascripts/templateSpec.js <
20
- ./spec/spec_helper.rb <
21
- ./spec/template/template_spec.rb <
22
- ./views/default.erb
23
- ./views/includes/header.erb
24
- ./views/index.erb
@@ -1,5 +0,0 @@
1
- Feature: Make sure <%= @gen.camelname %> is plumbed in correctly
2
-
3
- Scenario: Get root
4
- When I send a GET request to "/"
5
- Then the response status should be "200"
@@ -1,9 +0,0 @@
1
- Feature: Get JSON
2
-
3
- Background:
4
- Given I send and accept JSON
5
-
6
- Scenario: Get JSON for a repo
7
- When I send a GET request to "/"
8
- Then the response status should be "200"
9
- And the JSON response should have "$app" with the text "<%= @gen.camelname %>"
@@ -1,27 +0,0 @@
1
- ENV['RACK_ENV'] = 'test'
2
- require 'coveralls'
3
- Coveralls.wear!
4
-
5
- require File.join(File.dirname(__FILE__), '..', '..', 'lib/<%= @gen.wormname %>.rb')
6
-
7
- require 'capybara'
8
- require 'capybara/cucumber'
9
- require 'rspec'
10
- require 'cucumber/api_steps'
11
- require 'active_support/core_ext/object/blank'
12
-
13
- Capybara.app = <%= @gen.camelname %>
14
-
15
- class <%= @gen.camelname %>World
16
- include Capybara::DSL
17
- include RSpec::Expectations
18
- include RSpec::Matchers
19
-
20
- def app
21
- <%= @gen.camelname %>::App
22
- end
23
- end
24
-
25
- World do
26
- <%= @gen.camelname %>World.new
27
- end
@@ -1,67 +0,0 @@
1
- module Skellington
2
- describe CLI do
3
- let :subject do
4
- described_class.new
5
- end
6
-
7
- it 'generates some cucumber file' do
8
- expect { subject.generate 'dummy_app' }.to produce_file 'dummy_app/features/step_definitions/dummy_app_steps.rb'
9
-
10
- expect('dummy_app/features/dummy_app.feature').to have_content (
11
- """
12
- Feature: Make sure DummyApp is plumbed in correctly
13
-
14
- Scenario: Get root
15
- When I send a GET request to \"/\"
16
- Then the response status should be \"200\"
17
- """
18
- )
19
-
20
- expect('dummy_app/features/json.feature').to have_content (
21
- """
22
- Feature: Get JSON
23
-
24
- Background:
25
- Given I send and accept JSON
26
-
27
- Scenario: Get JSON for a repo
28
- When I send a GET request to \"/\"
29
- Then the response status should be \"200\"
30
- And the JSON response should have \"$app\" with the text \"DummyApp\"
31
- """
32
- )
33
-
34
- expect('dummy_app/features/support/env.rb').to have_content (
35
- """
36
- ENV['RACK_ENV'] = 'test'
37
- require 'coveralls'
38
- Coveralls.wear!
39
-
40
- require File.join(File.dirname(__FILE__), '..', '..', 'lib/dummy_app.rb')
41
-
42
- require 'capybara'
43
- require 'capybara/cucumber'
44
- require 'rspec'
45
- require 'cucumber/api_steps'
46
- require 'active_support/core_ext/object/blank'
47
-
48
- Capybara.app = DummyApp
49
-
50
- class DummyAppWorld
51
- include Capybara::DSL
52
- include RSpec::Expectations
53
- include RSpec::Matchers
54
-
55
- def app
56
- DummyApp::App
57
- end
58
- end
59
-
60
- World do
61
- DummyAppWorld.new
62
- end
63
- """
64
- )
65
- end
66
- end
67
- end