cigar 0.0.3

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/README.markdown ADDED
@@ -0,0 +1,11 @@
1
+ To get started:
2
+
3
+ gem install cigar
4
+
5
+ To generate a new Sinatra application:
6
+
7
+ cigar new [NAME]
8
+
9
+ For tutorials see the [wiki](https://github.com/tutuMatilda/cigar/wiki).
10
+
11
+ For more information see the [documentation](http://rdoc.info/github/tutuMatilda/cigar/master).
data/bin/cigar ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'cigar'
4
+
5
+ Cigar.start
data/cigar.gemspec ADDED
@@ -0,0 +1,24 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = 'cigar'
3
+ s.version = '0.0.3'
4
+ s.date = '2011-06-21'
5
+
6
+ s.description = "Quick skeleton generation for Sinatra."
7
+ s.summary = "Quick skeleton generation for Sinatra."
8
+
9
+ s.author = "tutuMatilda"
10
+ s.email = "tutuMatilda@me.com"
11
+
12
+ s.files = %w[
13
+ bin/cigar
14
+ cigar.gemspec
15
+ lib/cigar/templates/app.tt
16
+ lib/cigar.rb
17
+ README.markdown
18
+ ]
19
+
20
+ s.add_dependency 'thor', '~> 0.14.6'
21
+ s.executables << 'cigar'
22
+
23
+ s.homepage = "http://github.com/tutuMatilda/cigar"
24
+ end
@@ -0,0 +1,5 @@
1
+ class <%= @name.capitalize %> < Sinatra::Base
2
+ get '/' do
3
+ "Hello from <%= @name %>!"
4
+ end
5
+ end
data/lib/cigar.rb ADDED
@@ -0,0 +1,19 @@
1
+ require 'thor'
2
+
3
+ class Cigar < Thor
4
+ include Thor::Actions
5
+
6
+ # Sets the location of the templates
7
+ def self.source_root
8
+ File.dirname(__FILE__) + "/cigar/templates"
9
+ end
10
+
11
+ # Creates a standard Sinatra application.
12
+ #
13
+ # @param [String] name the name of the application to create
14
+ desc "new [NAME]", "Creates a standard Sinatra application."
15
+ def new(name)
16
+ @name = name
17
+ template("app.tt", "#{name}/#{name}.rb", @name)
18
+ end
19
+ end
metadata ADDED
@@ -0,0 +1,86 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: cigar
3
+ version: !ruby/object:Gem::Version
4
+ hash: 25
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 3
10
+ version: 0.0.3
11
+ platform: ruby
12
+ authors:
13
+ - tutuMatilda
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2011-06-21 00:00:00 -05:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: thor
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ hash: 43
30
+ segments:
31
+ - 0
32
+ - 14
33
+ - 6
34
+ version: 0.14.6
35
+ type: :runtime
36
+ version_requirements: *id001
37
+ description: Quick skeleton generation for Sinatra.
38
+ email: tutuMatilda@me.com
39
+ executables:
40
+ - cigar
41
+ extensions: []
42
+
43
+ extra_rdoc_files: []
44
+
45
+ files:
46
+ - bin/cigar
47
+ - cigar.gemspec
48
+ - lib/cigar/templates/app.tt
49
+ - lib/cigar.rb
50
+ - README.markdown
51
+ has_rdoc: true
52
+ homepage: http://github.com/tutuMatilda/cigar
53
+ licenses: []
54
+
55
+ post_install_message:
56
+ rdoc_options: []
57
+
58
+ require_paths:
59
+ - lib
60
+ required_ruby_version: !ruby/object:Gem::Requirement
61
+ none: false
62
+ requirements:
63
+ - - ">="
64
+ - !ruby/object:Gem::Version
65
+ hash: 3
66
+ segments:
67
+ - 0
68
+ version: "0"
69
+ required_rubygems_version: !ruby/object:Gem::Requirement
70
+ none: false
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ hash: 3
75
+ segments:
76
+ - 0
77
+ version: "0"
78
+ requirements: []
79
+
80
+ rubyforge_project:
81
+ rubygems_version: 1.6.2
82
+ signing_key:
83
+ specification_version: 3
84
+ summary: Quick skeleton generation for Sinatra.
85
+ test_files: []
86
+