skellington 0.4.9 → 0.4.10
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/README.md +7 -27
- data/config/config.yaml +1 -0
- data/lib/skellington/cli.rb +25 -0
- data/lib/skellington/generator.rb +1 -0
- data/lib/skellington/version.rb +1 -1
- data/lib/templates/LICENSE.md.eruby +27 -0
- data/lib/templates/post-run.eruby +8 -0
- data/skellington.gemspec +1 -0
- data/spec/cli/license_spec.rb +74 -0
- data/spec/cli_spec.rb +30 -0
- data/spec/spec_helper.rb +1 -0
- metadata +18 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f792949505bdf108189229c2efc1417fb6d60bf
|
4
|
+
data.tar.gz: d2c5d61429ec03098c5f7f92ce326ec0cd3a819f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 17260eb6ab5f9591ae7b986ee866abbd1b6e4182e55424de8b5a75011d7efbb741a33e191aa7a069b41d0b797b25067ae7c19fb520a64b9fdc932a0817d30b8d
|
7
|
+
data.tar.gz: eaff58d31ec7c5464c079209b667b8f933f44a72cbab00da3e509903c379dcbdb25fdafb914e79364e2c55f5c49de4010d37b8b186a1f9d0ff62f35cce2fd3a6
|
data/README.md
CHANGED
@@ -15,37 +15,13 @@ Extremely opinionated generator for your [Sinatra](http://www.sinatrarb.com/) ap
|
|
15
15
|
* [Rspec](http://rspec.info/)
|
16
16
|
* [Jasmine](http://jasmine.github.io/2.0/introduction.html)
|
17
17
|
* [Bootstrap](http://getbootstrap.com/)
|
18
|
+
* An MIT License file
|
18
19
|
|
19
20
|
Should work fine for both RVM- and rbenv-based setups
|
20
21
|
|
21
22
|
$ gem install skellington
|
22
|
-
$ skellington generate naming-things-is-hard
|
23
|
-
Generating
|
24
|
-
Generating naming_things_is_hard/Guardfile...done
|
25
|
-
Generating naming_things_is_hard/Rakefile...done
|
26
|
-
Generating naming_things_is_hard/Procfile...done
|
27
|
-
Generating naming_things_is_hard/.ruby-version...done
|
28
|
-
Generating naming_things_is_hard/.rspec...done
|
29
|
-
Generating naming_things_is_hard/.gitignore...done
|
30
|
-
Generating naming_things_is_hard/config.ru...done
|
31
|
-
Generating naming_things_is_hard/features/naming_things_is_hard.feature...done
|
32
|
-
Generating naming_things_is_hard/features/json.feature...done
|
33
|
-
Generating naming_things_is_hard/features/step_definitions/naming_things_is_hard_steps.rb...done
|
34
|
-
Generating naming_things_is_hard/features/support/env.rb...done
|
35
|
-
Generating naming_things_is_hard/lib/naming_things_is_hard.rb...done
|
36
|
-
Generating naming_things_is_hard/lib/naming_things_is_hard/racks.rb...done
|
37
|
-
Generating naming_things_is_hard/lib/naming_things_is_hard/helpers.rb...done
|
38
|
-
Generating naming_things_is_hard/views/default.erb...done
|
39
|
-
Generating naming_things_is_hard/views/index.erb...done
|
40
|
-
Generating naming_things_is_hard/views/includes/header.erb...done
|
41
|
-
Generating naming_things_is_hard/spec/spec_helper.rb...done
|
42
|
-
Generating naming_things_is_hard/spec/naming_things_is_hard/naming_things_is_hard_spec.rb...done
|
43
|
-
Generating naming_things_is_hard/spec/javascripts/support/jasmine.yml...done
|
44
|
-
Generating naming_things_is_hard/spec/javascripts/support/jasmine_helper.rb...done
|
45
|
-
Generating naming_things_is_hard/spec/javascripts/naming_things_is_hardSpec.js...done
|
46
|
-
Generating naming_things_is_hard/public/assets/favicon.ico...done
|
47
|
-
Generating naming_things_is_hard/public/css/styles.css...done
|
48
|
-
Generating naming_things_is_hard/public/js/naming_things_is_hard.js...done
|
23
|
+
$ skellington generate naming-things-is-hard --licensee 'Beyoncé'
|
24
|
+
Generating <lots of stuff>... done
|
49
25
|
|
50
26
|
Your new Sinatra app NamingThingsIsHard has been created
|
51
27
|
|
@@ -66,6 +42,10 @@ Should work fine for both RVM- and rbenv-based setups
|
|
66
42
|
|
67
43
|
rackup
|
68
44
|
|
45
|
+
For post-install hints, try
|
46
|
+
|
47
|
+
skellington postinstall
|
48
|
+
|
69
49
|
This assumes a bunch of things, at least:
|
70
50
|
|
71
51
|
* That you have a reasonable git installation
|
data/config/config.yaml
CHANGED
data/lib/skellington/cli.rb
CHANGED
@@ -7,9 +7,34 @@ module Skellington
|
|
7
7
|
map %w(-v --version) => :version
|
8
8
|
|
9
9
|
desc 'generate some_path', 'Generate a skeleton Sinatra app named SomePath at some_path'
|
10
|
+
method_option :licensee,
|
11
|
+
aliases: '-l',
|
12
|
+
description: 'Name to insert into the license file'
|
10
13
|
def generate wormname
|
11
14
|
@g = Generator.new wormname
|
15
|
+
@g.licensee = options[:licensee]
|
12
16
|
@g.run
|
13
17
|
end
|
18
|
+
|
19
|
+
desc 'postinstall', 'Show some helpful hints'
|
20
|
+
def postinstall
|
21
|
+
s = 'Some other things you might find useful (sweeten to taste):'
|
22
|
+
s << "\n\n"
|
23
|
+
s << '* Set up continuous integration in Travis:'
|
24
|
+
s << "\n\n"
|
25
|
+
s << ' travis init'
|
26
|
+
s << "\n\n"
|
27
|
+
s << '* Configure a Heroku app:'
|
28
|
+
s << "\n\n"
|
29
|
+
s << " heroku apps:create YOUR-APP-NAME-HERE --region=eu"
|
30
|
+
s << "\n\n"
|
31
|
+
s << '* Get Travis to continuously deploy to Heroku:'
|
32
|
+
s << "\n\n"
|
33
|
+
s << ' travis setup heroku'
|
34
|
+
s << "\n\n"
|
35
|
+
s << "(This all depends on you having Travis and Heroku installed and configured)"
|
36
|
+
|
37
|
+
puts s
|
38
|
+
end
|
14
39
|
end
|
15
40
|
end
|
data/lib/skellington/version.rb
CHANGED
@@ -0,0 +1,27 @@
|
|
1
|
+
<% if @gen.licensee %>
|
2
|
+
<% l = @gen.licensee %>
|
3
|
+
<% else %>
|
4
|
+
<% l = 'YOUR-NAME-HERE' %>
|
5
|
+
<% end %>
|
6
|
+
##Copyright (c) <%= Time.new.strftime "%Y" %> <%= l %>
|
7
|
+
|
8
|
+
#MIT License
|
9
|
+
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
11
|
+
a copy of this software and associated documentation files (the
|
12
|
+
'Software'), to deal in the Software without restriction, including
|
13
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
14
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
15
|
+
permit persons to whom the Software is furnished to do so, subject to
|
16
|
+
the following conditions:
|
17
|
+
|
18
|
+
The above copyright notice and this permission notice shall be
|
19
|
+
included in all copies or substantial portions of the Software.
|
20
|
+
|
21
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
22
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
23
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
24
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
25
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
26
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
27
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/skellington.gemspec
CHANGED
@@ -0,0 +1,74 @@
|
|
1
|
+
module Skellington
|
2
|
+
describe CLI do
|
3
|
+
let :subject do
|
4
|
+
described_class.new
|
5
|
+
end
|
6
|
+
|
7
|
+
context 'generate a LICENSE' do
|
8
|
+
it 'plain license' do
|
9
|
+
Timecop.freeze Time.local 2016, 01, 19
|
10
|
+
subject.generate 'dummy_app'
|
11
|
+
expect('dummy_app/LICENSE.md').to have_content (
|
12
|
+
"""
|
13
|
+
##Copyright (c) 2016 YOUR-NAME-HERE
|
14
|
+
|
15
|
+
#MIT License
|
16
|
+
|
17
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
18
|
+
a copy of this software and associated documentation files (the
|
19
|
+
'Software'), to deal in the Software without restriction, including
|
20
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
21
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
22
|
+
permit persons to whom the Software is furnished to do so, subject to
|
23
|
+
the following conditions:
|
24
|
+
|
25
|
+
The above copyright notice and this permission notice shall be
|
26
|
+
included in all copies or substantial portions of the Software.
|
27
|
+
|
28
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
29
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
30
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
31
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
32
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
33
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
34
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
35
|
+
"""
|
36
|
+
)
|
37
|
+
Timecop.return
|
38
|
+
end
|
39
|
+
|
40
|
+
it 'with a provided name' do
|
41
|
+
Timecop.freeze Time.local 2016, 01, 19
|
42
|
+
subject.options = {licensee: 'Beyoncé'}
|
43
|
+
subject.generate 'dummy_app'
|
44
|
+
expect('dummy_app/LICENSE.md').to have_content (
|
45
|
+
"""
|
46
|
+
##Copyright (c) 2016 Beyoncé
|
47
|
+
|
48
|
+
#MIT License
|
49
|
+
|
50
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
51
|
+
a copy of this software and associated documentation files (the
|
52
|
+
'Software'), to deal in the Software without restriction, including
|
53
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
54
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
55
|
+
permit persons to whom the Software is furnished to do so, subject to
|
56
|
+
the following conditions:
|
57
|
+
|
58
|
+
The above copyright notice and this permission notice shall be
|
59
|
+
included in all copies or substantial portions of the Software.
|
60
|
+
|
61
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
62
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
63
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
64
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
65
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
66
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
67
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
68
|
+
"""
|
69
|
+
)
|
70
|
+
Timecop.return
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
data/spec/cli_spec.rb
CHANGED
@@ -26,6 +26,36 @@ And presuming that passes OK
|
|
26
26
|
You can run the app with
|
27
27
|
|
28
28
|
bundle exec rackup
|
29
|
+
|
30
|
+
You should also fill in your name in LICENSE.md
|
31
|
+
|
32
|
+
For post-install hints, try
|
33
|
+
|
34
|
+
skellington postinstall
|
35
|
+
/).to_stdout
|
36
|
+
end
|
37
|
+
|
38
|
+
it 'suppresses the LICENSE help when supplied with a licensee' do
|
39
|
+
subject.options = {licensee: 'Beyoncé'}
|
40
|
+
expect { subject.generate 'dummy_app' }.to_not output(/
|
41
|
+
You should also fill in your name in LICENSE.md
|
42
|
+
/).to_stdout
|
43
|
+
end
|
44
|
+
|
45
|
+
it 'gives helpful post-generate advice' do
|
46
|
+
expect { subject.postinstall }.to output(/Some other things you might find useful \(sweeten to taste\):
|
47
|
+
|
48
|
+
\* Set up continuous integration in Travis:
|
49
|
+
|
50
|
+
travis init
|
51
|
+
|
52
|
+
\* Configure a Heroku app:
|
53
|
+
|
54
|
+
heroku apps:create YOUR-APP-NAME-HERE --region=eu
|
55
|
+
|
56
|
+
\* Get Travis to continuously deploy to Heroku:
|
57
|
+
|
58
|
+
travis setup heroku
|
29
59
|
/).to_stdout
|
30
60
|
end
|
31
61
|
end
|
data/spec/spec_helper.rb
CHANGED
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.
|
4
|
+
version: 0.4.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pikesley
|
@@ -136,6 +136,20 @@ dependencies:
|
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0.1'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: timecop
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0.8'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0.8'
|
139
153
|
description: Generate tedious Cucumber and Sinatra boilerplate like a boss
|
140
154
|
email:
|
141
155
|
- sam@pikesley.org
|
@@ -166,6 +180,7 @@ files:
|
|
166
180
|
- lib/templates/.ruby-version.eruby
|
167
181
|
- lib/templates/Gemfile.eruby
|
168
182
|
- lib/templates/Guardfile.eruby
|
183
|
+
- lib/templates/LICENSE.md.eruby
|
169
184
|
- lib/templates/Procfile.eruby
|
170
185
|
- lib/templates/Rakefile.eruby
|
171
186
|
- lib/templates/config.ru.eruby
|
@@ -197,6 +212,7 @@ files:
|
|
197
212
|
- spec/cli/git_spec.rb
|
198
213
|
- spec/cli/guardfile_spec.rb
|
199
214
|
- spec/cli/javascript_spec.rb
|
215
|
+
- spec/cli/license_spec.rb
|
200
216
|
- spec/cli/non_local_path_spec.rb
|
201
217
|
- spec/cli/procfile_spec.rb
|
202
218
|
- spec/cli/public_spec.rb
|
@@ -240,6 +256,7 @@ test_files:
|
|
240
256
|
- spec/cli/git_spec.rb
|
241
257
|
- spec/cli/guardfile_spec.rb
|
242
258
|
- spec/cli/javascript_spec.rb
|
259
|
+
- spec/cli/license_spec.rb
|
243
260
|
- spec/cli/non_local_path_spec.rb
|
244
261
|
- spec/cli/procfile_spec.rb
|
245
262
|
- spec/cli/public_spec.rb
|