mafia 0.1.0 → 0.1.2
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/lib/mafia.rb +13 -14
- data/lib/mafia/templates/gem.rb.tt +0 -6
- data/lib/version.rb +1 -1
- metadata +3 -3
data/lib/mafia.rb
CHANGED
@@ -37,7 +37,7 @@ module Mafia
|
|
37
37
|
end
|
38
38
|
|
39
39
|
def create_bin_file
|
40
|
-
if yes? "\n\nCreate a binary to run your application?", :
|
40
|
+
if yes? "\n\nCreate a binary to run your application?", :green
|
41
41
|
template("bin.tt", "#{name}/bin/#{name}")
|
42
42
|
end
|
43
43
|
end
|
@@ -69,7 +69,7 @@ module Mafia
|
|
69
69
|
end
|
70
70
|
|
71
71
|
def include_helpers
|
72
|
-
if yes? "\n\nInstall georgedrummond_sinatra_helpers gem into app?", :
|
72
|
+
if yes? "\n\nInstall georgedrummond_sinatra_helpers gem into app?", :green
|
73
73
|
insert_into_file "#{name}/#{name}.gemspec", " s.add_dependency \"georgedrummond_sinatra_helpers\"\n", :after => "s.add_dependency \"sass\"\n"
|
74
74
|
insert_into_file "#{name}/lib/#{name}/app.rb", " include GeorgeDrummond::Sinatra::Helpers\n", :after => "class Application < Sinatra::Base\n"
|
75
75
|
insert_into_file "#{name}/lib/#{name}/app.rb", "require \"georgedrummond_sinatra_helpers\"\n", :after => "require \"sass\"\n"
|
@@ -77,7 +77,7 @@ module Mafia
|
|
77
77
|
end
|
78
78
|
|
79
79
|
def create_license
|
80
|
-
if yes? "\n\nUse MIT License?", :
|
80
|
+
if yes? "\n\nUse MIT License?", :green
|
81
81
|
|
82
82
|
opts = {
|
83
83
|
:name => name,
|
@@ -91,7 +91,7 @@ module Mafia
|
|
91
91
|
|
92
92
|
def initalize_git_repo
|
93
93
|
target = File.join(Dir.pwd, name)
|
94
|
-
say "\n\nInitializating git repo in #{target}", :
|
94
|
+
say "\n\nInitializating git repo in #{target}", :green
|
95
95
|
Dir.chdir(target) {
|
96
96
|
run "git init", :verbose => false
|
97
97
|
run "git add .", :verbose => false
|
@@ -100,23 +100,22 @@ module Mafia
|
|
100
100
|
|
101
101
|
def run_bundle_command
|
102
102
|
target = File.join(Dir.pwd, name)
|
103
|
-
say "\n\nRunning Bundler", :
|
103
|
+
say "\n\nRunning Bundler", :green
|
104
104
|
Dir.chdir(target) {
|
105
105
|
run "bundle install", :verbose => false
|
106
106
|
}
|
107
107
|
end
|
108
108
|
|
109
109
|
def show_complete_message
|
110
|
-
complete = <<-COMPLETE
|
110
|
+
complete = <<-COMPLETE
|
111
111
|
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
say complete, :red
|
112
|
+
Sinatra gem has been generated
|
113
|
+
|
114
|
+
For help using sinatra please visit www.sinatrarb.com
|
115
|
+
|
116
|
+
COMPLETE
|
117
|
+
|
118
|
+
say complete, :green
|
120
119
|
|
121
120
|
end
|
122
121
|
end
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mafia
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2011-10-26 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: thor
|
16
|
-
requirement: &
|
16
|
+
requirement: &70363732672060 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70363732672060
|
25
25
|
description: Generator to create sinatra apps that are also gems
|
26
26
|
email:
|
27
27
|
- george@accountsapp.com
|