railyard 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -1
- data/lib/railyard/version.rb +1 -1
- data/lib/railyard.rb +21 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9fba1aa94dc3bd4007cb702d263d9451d96c5732
|
4
|
+
data.tar.gz: 846b11e45db07f891cf1c89d999ad85bce1f3f58
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb90f974a32b419f3312ba4c1f91177c7de570c0402c89a0e46e22f6f7080b4c071736c364ad1f5eae16b5e5ecf384835b297bc77fe15fd4940a29ea56add1ae
|
7
|
+
data.tar.gz: 60fa970069054bad89a2f176bf8469d7bf82ef8d137700ffe42971e96aa45e4a6428b37529f109ade1bbf4dc5f5cc5ba361307a0b9e1662637a68b8a550e729f
|
data/README.md
CHANGED
@@ -10,13 +10,18 @@ Install it globally with:
|
|
10
10
|
|
11
11
|
## Usage
|
12
12
|
|
13
|
-
There are only
|
13
|
+
There are only three commands, `version`, `new`, and `plugin`.
|
14
14
|
|
15
15
|
$ railyard version 4.1.1
|
16
16
|
$ railyard new APP_NAME
|
17
|
+
$ railyard plugin PLUGIN_NAME
|
17
18
|
|
18
19
|
Right now Railyard doesn't manage Ruby versions for you—Railyard runs in whatever Ruby version you've installed it on and are calling it from. You may be able to generate a skeleton for a version of Rails in a version of Ruby that Rails wasn't designed to run on, but it's recommended that you switch your Ruby version to one that is compatible with the version of Rails you're trying to generate a skeleton of.
|
19
20
|
|
21
|
+
### Plugin command
|
22
|
+
|
23
|
+
The plugin command is used to generate a [Rails Engine](http://guides.rubyonrails.org/engines.html).
|
24
|
+
|
20
25
|
## Contributing
|
21
26
|
|
22
27
|
1. Fork it ( https://github.com/brandonweiss/railyard/fork )
|
data/lib/railyard/version.rb
CHANGED
data/lib/railyard.rb
CHANGED
@@ -46,6 +46,23 @@ module Railyard
|
|
46
46
|
rails_new(args)
|
47
47
|
end
|
48
48
|
|
49
|
+
desc "plugin [APP_PATH]", "Create a new Rails Engine"
|
50
|
+
def plugin(app_path = nil, *args)
|
51
|
+
if !installed?
|
52
|
+
puts "Installing Rails..."
|
53
|
+
install
|
54
|
+
end
|
55
|
+
|
56
|
+
if app_path && app_path !~ /^--?/
|
57
|
+
args.unshift expand_path(app_path)
|
58
|
+
args << "--skip-bundle" unless args.include?("--skip-bundle")
|
59
|
+
else
|
60
|
+
args << "--help"
|
61
|
+
end
|
62
|
+
|
63
|
+
rails_plugin(args)
|
64
|
+
end
|
65
|
+
|
49
66
|
def help
|
50
67
|
puts "railyard #{Railyard::VERSION}"
|
51
68
|
super
|
@@ -57,6 +74,10 @@ module Railyard
|
|
57
74
|
sandbox("bundle exec rails new #{args.join(' ')}")
|
58
75
|
end
|
59
76
|
|
77
|
+
def rails_plugin(args)
|
78
|
+
sandbox("bundle exec rails plugin new #{args.join(' ')}")
|
79
|
+
end
|
80
|
+
|
60
81
|
def installed?
|
61
82
|
sandbox("bundle check > /dev/null")
|
62
83
|
end
|