listrophy-suprails 0.1 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.suprails.example +6 -1
- data/README +39 -2
- data/bin/suprails +1 -1
- data/lib/runner.rb +16 -17
- data/lib/suprails.rb +1 -7
- metadata +2 -2
data/.suprails.example
CHANGED
@@ -101,10 +101,15 @@ git
|
|
101
101
|
# Example:
|
102
102
|
# svn
|
103
103
|
|
104
|
+
# Need a command not supplied (yet!) by suprails?
|
105
|
+
# You can extend it by using runcommand
|
106
|
+
# Example:
|
107
|
+
# runcommand "capify ."
|
108
|
+
|
104
109
|
# Oh yeah, you can use plugins, too. Except, to prevent confusion with real
|
105
110
|
# rails plugins, we call them facets for suprails. They should be installed at:
|
106
111
|
# ~/.suprails/facets
|
107
112
|
# Haml is one such facet. It requires special attention because installing it
|
108
113
|
# as a plugin does not complete its installation into the rails app
|
109
114
|
# Example:
|
110
|
-
# haml
|
115
|
+
# haml
|
data/README
CHANGED
@@ -30,12 +30,49 @@ Instead of me, the Suprails author, deciding what you should have in your rails
|
|
30
30
|
app, you get to decide. In addition, any time you execute Suprails, you have
|
31
31
|
the option to update any gems that would otherwise be out-of-date.
|
32
32
|
|
33
|
+
Example configuration file (~/.suprails/config)
|
34
|
+
===============================================
|
35
|
+
|
36
|
+
# Notice that ruby comments work just fine!
|
37
|
+
# gems.update "rspec", "rails", "rspec-rails", "haml", "capistrano"
|
38
|
+
frozen_rails
|
39
|
+
gems.config :haml
|
40
|
+
gems.unpack
|
41
|
+
plugin "git://github.com/rails/exception_notification"
|
42
|
+
generate :rspec
|
43
|
+
folder "public/stylesheets/sass"
|
44
|
+
delete "public/index.html"
|
45
|
+
gpl
|
46
|
+
git
|
47
|
+
haml
|
48
|
+
|
33
49
|
Installation
|
34
50
|
============
|
35
51
|
|
36
|
-
|
52
|
+
$ sudo gem install listrophy-suprails --source http://gems.github.com
|
53
|
+
|
54
|
+
Execution
|
55
|
+
============
|
56
|
+
|
57
|
+
First, run suprails without any arguments:
|
58
|
+
|
59
|
+
$ suprails
|
37
60
|
|
38
|
-
|
61
|
+
This will initialize your ~/.suprails/ folder and configuration in that folder
|
62
|
+
|
63
|
+
You will now want to edit the configuration file to your liking. It is located
|
64
|
+
at: ~/.suprails/config
|
65
|
+
|
66
|
+
Now, run suprails instead of rails:
|
67
|
+
|
68
|
+
$ suprails AppName
|
69
|
+
|
70
|
+
History/Bugs
|
39
71
|
====
|
40
72
|
|
73
|
+
0.1.1 - Added the runcommand verb
|
74
|
+
|
75
|
+
0.1 - The DB commands do not yet work. You have to just use the file command
|
76
|
+
instead.
|
77
|
+
|
41
78
|
0.0.0 - Initial readme. No code.
|
data/bin/suprails
CHANGED
@@ -50,7 +50,7 @@ if opts.length == 0
|
|
50
50
|
puts 'You must provide a Rails Application Name'
|
51
51
|
else
|
52
52
|
# If options include -v or --version, print the version and exit
|
53
|
-
if opts.
|
53
|
+
if opts.any? {|opt| %w{-v --version}.include?(x)}
|
54
54
|
puts SUPRAILS_VERSION
|
55
55
|
exit
|
56
56
|
end
|
data/lib/runner.rb
CHANGED
@@ -75,17 +75,11 @@ class Runner
|
|
75
75
|
end
|
76
76
|
|
77
77
|
def plugin plugin_location
|
78
|
-
|
78
|
+
runcommand("script/plugin install #{plugin_location}")
|
79
79
|
end
|
80
80
|
|
81
81
|
def generate generator, *opts
|
82
|
-
|
83
|
-
args = ''
|
84
|
-
opts.each {|x| args += " #{x}"}
|
85
|
-
`cd #{Runner.app_name}; script/generate #{generator} #{args}`
|
86
|
-
else
|
87
|
-
`cd #{Runner.app_name}; script/generate #{generator}`
|
88
|
-
end
|
82
|
+
runcommand("script/generate #{generator} #{opts.join(' ')}")
|
89
83
|
end
|
90
84
|
|
91
85
|
def folder folder_name
|
@@ -129,13 +123,7 @@ class Runner
|
|
129
123
|
end
|
130
124
|
|
131
125
|
def rake *opts
|
132
|
-
|
133
|
-
args = ''
|
134
|
-
opts.each {|x| args += " #{x}"}
|
135
|
-
`cd #{Runner.app_name}; rake #{args}`
|
136
|
-
else
|
137
|
-
`cd #{Runner.app_name}; rake`
|
138
|
-
end
|
126
|
+
runcommand("rake #{opts.join(' ')}")
|
139
127
|
end
|
140
128
|
|
141
129
|
def git
|
@@ -148,11 +136,22 @@ class Runner
|
|
148
136
|
if gem
|
149
137
|
g = Git.init(@base)
|
150
138
|
else
|
151
|
-
|
139
|
+
runcommand 'git init'
|
152
140
|
end
|
153
141
|
end
|
154
142
|
|
155
143
|
def svn
|
156
|
-
|
144
|
+
runcommand 'svnadmin create'
|
145
|
+
end
|
146
|
+
|
147
|
+
def runcommand *opts
|
148
|
+
shell "cd #{Runner.app_name}; #{opts.join(' ')}"
|
157
149
|
end
|
150
|
+
|
151
|
+
private
|
152
|
+
|
153
|
+
def shell cmd
|
154
|
+
`#{cmd}`
|
155
|
+
end
|
156
|
+
|
158
157
|
end
|
data/lib/suprails.rb
CHANGED
@@ -23,19 +23,13 @@ require File.dirname(__FILE__) + '/runner'
|
|
23
23
|
|
24
24
|
class Suprails
|
25
25
|
|
26
|
+
attr_accessor :app_name
|
26
27
|
|
27
28
|
def initialize(app_name = "")
|
28
29
|
@app_name = app_name
|
29
30
|
@run_file = ""
|
30
31
|
end
|
31
32
|
|
32
|
-
def app_name=(val)
|
33
|
-
@app_name = val
|
34
|
-
end
|
35
|
-
def app_name
|
36
|
-
@app_name
|
37
|
-
end
|
38
|
-
|
39
33
|
def create_project
|
40
34
|
Runner.new(@app_name).run
|
41
35
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: listrophy-suprails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bradley Grzesiak
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-10-
|
12
|
+
date: 2008-10-31 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|