speakeasy 0.1.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.
- data/.gitignore +4 -0
- data/Gemfile +8 -0
- data/LICENSE +22 -0
- data/README.md +14 -0
- data/Rakefile +1 -0
- data/bin/speakeasy +61 -0
- data/lib/speakeasy.rb +5 -0
- data/lib/speakeasy/version.rb +3 -0
- data/lib/templates/Gemfile +9 -0
- data/lib/templates/README.markdown +5 -0
- data/lib/templates/app/assets/javascripts/app.js.coffee +6 -0
- data/lib/templates/app/assets/stylesheets/app.css.scss +3 -0
- data/lib/templates/config.ru +20 -0
- data/lib/templates/public/assets/.gitkeep +0 -0
- data/lib/templates/server +3 -0
- data/lib/templates/views/index.slim +3 -0
- data/lib/templates/views/layout.slim +8 -0
- data/speakeasy.gemspec +22 -0
- metadata +81 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2011, 2012 Jesse Trimble
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person
|
4
|
+
obtaining a copy of this software and associated documentation
|
5
|
+
files (the "Software"), to deal in the Software without
|
6
|
+
restriction, including without limitation the rights to use,
|
7
|
+
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8
|
+
copies of the Software, and to permit persons to whom the
|
9
|
+
Software is furnished to do so, subject to the following
|
10
|
+
conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be
|
13
|
+
included in all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
16
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
17
|
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
18
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
19
|
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
20
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
21
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
22
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
# Speakeasy
|
2
|
+
|
3
|
+
Speakeasy gives you a quick way to get up and running with Sinatra and
|
4
|
+
Sprockets.
|
5
|
+
|
6
|
+
---
|
7
|
+
|
8
|
+
## Contributing
|
9
|
+
|
10
|
+
1. Fork it
|
11
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
12
|
+
3. Commit your changes *with* tests (`git commit -am 'Added some feature'`)
|
13
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
14
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/bin/speakeasy
ADDED
@@ -0,0 +1,61 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# encoding: UTF-8
|
3
|
+
|
4
|
+
require 'thor'
|
5
|
+
|
6
|
+
class Speakeasy < Thor
|
7
|
+
include Thor::Actions
|
8
|
+
attr_accessor :app_name
|
9
|
+
attr_accessor :constant_name
|
10
|
+
|
11
|
+
desc 'new [APP_NAME]', 'Make a new sinatra app with assets'
|
12
|
+
def new(app_name)
|
13
|
+
@app_name = app_name
|
14
|
+
@constant_name = constant_name_from(File.split(app_name)[1])
|
15
|
+
|
16
|
+
setup
|
17
|
+
|
18
|
+
copy_file 'README.markdown'
|
19
|
+
copy_file 'Gemfile'
|
20
|
+
|
21
|
+
copy_file 'server'
|
22
|
+
chmod "server", 0755
|
23
|
+
|
24
|
+
template 'config.ru'
|
25
|
+
|
26
|
+
directory 'app'
|
27
|
+
directory 'public'
|
28
|
+
|
29
|
+
copy_file 'views/index.slim'
|
30
|
+
template 'views/layout.slim'
|
31
|
+
|
32
|
+
say_status 'git', `git init #{app_name}`, true
|
33
|
+
|
34
|
+
say <<-GETSTARTED, Thor::Shell::Color::CYAN
|
35
|
+
|
36
|
+
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
|
37
|
+
Next steps:
|
38
|
+
|
39
|
+
- run `cd #{app_name}`
|
40
|
+
- run `bundle install`
|
41
|
+
- run `./server`
|
42
|
+
- navigate to http://localhost:3000
|
43
|
+
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
|
44
|
+
|
45
|
+
GETSTARTED
|
46
|
+
end
|
47
|
+
|
48
|
+
private
|
49
|
+
|
50
|
+
def setup
|
51
|
+
source_paths << File.expand_path(File.join(__FILE__, '../../lib/templates'))
|
52
|
+
self.destination_root = File.expand_path(File.join('.', @app_name))
|
53
|
+
end
|
54
|
+
|
55
|
+
def constant_name_from(name)
|
56
|
+
name.split(/[\-_]/).map { |word| letters = word.split(//); letters.unshift(letters.shift.upcase); letters.join }.join
|
57
|
+
end
|
58
|
+
|
59
|
+
end
|
60
|
+
|
61
|
+
Speakeasy.start
|
data/lib/speakeasy.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'sinatra'
|
2
|
+
require 'sprockets'
|
3
|
+
require 'slim'
|
4
|
+
|
5
|
+
class <%= constant_name %> < Sinatra::Base
|
6
|
+
get '/' do
|
7
|
+
slim :index
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
map '/assets' do
|
12
|
+
environment = Sprockets::Environment.new
|
13
|
+
environment.append_path 'app/assets/javascripts'
|
14
|
+
environment.append_path 'app/assets/stylesheets'
|
15
|
+
run environment
|
16
|
+
end
|
17
|
+
|
18
|
+
map '/' do
|
19
|
+
run <%= constant_name %>
|
20
|
+
end
|
File without changes
|
data/speakeasy.gemspec
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "speakeasy/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "speakeasy"
|
7
|
+
s.version = Speakeasy::VERSION
|
8
|
+
s.authors = ["Jesse Trimble"]
|
9
|
+
s.email = ["jlowelltrim@gmail.com"]
|
10
|
+
s.homepage = ""
|
11
|
+
s.summary = %q{Generator for sinatra apps pre-wired for coffeescript, scss, and slim templates.}
|
12
|
+
s.description = %q{Generator for sinatra apps pre-wired for coffeescript, scss, and slim templates.}
|
13
|
+
|
14
|
+
s.rubyforge_project = "speakeasy"
|
15
|
+
|
16
|
+
s.files = `git ls-files`.split("\n")
|
17
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
18
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
19
|
+
s.require_paths = ["lib"]
|
20
|
+
|
21
|
+
s.add_runtime_dependency "thor"
|
22
|
+
end
|
metadata
ADDED
@@ -0,0 +1,81 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: speakeasy
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Jesse Trimble
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-11-07 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: thor
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
description: Generator for sinatra apps pre-wired for coffeescript, scss, and slim
|
31
|
+
templates.
|
32
|
+
email:
|
33
|
+
- jlowelltrim@gmail.com
|
34
|
+
executables:
|
35
|
+
- speakeasy
|
36
|
+
extensions: []
|
37
|
+
extra_rdoc_files: []
|
38
|
+
files:
|
39
|
+
- .gitignore
|
40
|
+
- Gemfile
|
41
|
+
- LICENSE
|
42
|
+
- README.md
|
43
|
+
- Rakefile
|
44
|
+
- bin/speakeasy
|
45
|
+
- lib/speakeasy.rb
|
46
|
+
- lib/speakeasy/version.rb
|
47
|
+
- lib/templates/Gemfile
|
48
|
+
- lib/templates/README.markdown
|
49
|
+
- lib/templates/app/assets/javascripts/app.js.coffee
|
50
|
+
- lib/templates/app/assets/stylesheets/app.css.scss
|
51
|
+
- lib/templates/config.ru
|
52
|
+
- lib/templates/public/assets/.gitkeep
|
53
|
+
- lib/templates/server
|
54
|
+
- lib/templates/views/index.slim
|
55
|
+
- lib/templates/views/layout.slim
|
56
|
+
- speakeasy.gemspec
|
57
|
+
homepage: ''
|
58
|
+
licenses: []
|
59
|
+
post_install_message:
|
60
|
+
rdoc_options: []
|
61
|
+
require_paths:
|
62
|
+
- lib
|
63
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
64
|
+
none: false
|
65
|
+
requirements:
|
66
|
+
- - ! '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
70
|
+
none: false
|
71
|
+
requirements:
|
72
|
+
- - ! '>='
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0'
|
75
|
+
requirements: []
|
76
|
+
rubyforge_project: speakeasy
|
77
|
+
rubygems_version: 1.8.24
|
78
|
+
signing_key:
|
79
|
+
specification_version: 3
|
80
|
+
summary: Generator for sinatra apps pre-wired for coffeescript, scss, and slim templates.
|
81
|
+
test_files: []
|