rails-new 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/rails-new +14 -3
- data/lib/rails/new/gem/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c9f63a1b56bb93b9c6dc1d89d5ebe14879a8d13
|
4
|
+
data.tar.gz: 99d8b62c1d513aad577c3ce5eaa4ad6fe475d7ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a4baaa51b7061979600127f22f7d33bc2e057a68339c22733121f2aca381c8eea598cc1f2df7719b7367b28562f2ca0c3c456c15b701316dccae421fa718921
|
7
|
+
data.tar.gz: 7049d2579403dba12865fd432af8330a96fff260c012790861d70a40fd776e08bb941d1cd4950673d02a5058b13a9bc7f56a82ab3e12341a2802199c3d01d2f3
|
data/bin/rails-new
CHANGED
@@ -18,8 +18,10 @@ class RailsNewWrapper < Thor::Group
|
|
18
18
|
:desc => "The application name to pass to Rails",
|
19
19
|
:required => true
|
20
20
|
|
21
|
+
RAILS_NEW_API_SERVER = ENV['RAILS_NEW_API_SERVER'] || "https://rails-new.herokuapp.com"
|
22
|
+
|
21
23
|
TEMPLATE_URL = -> template_key do
|
22
|
-
"
|
24
|
+
"#{RAILS_NEW_API_SERVER}/api/v1/templates/#{template_key}.json"
|
23
25
|
end
|
24
26
|
|
25
27
|
def request_template_data
|
@@ -54,9 +56,18 @@ class RailsNewWrapper < Thor::Group
|
|
54
56
|
"rails", "new", @app_name, "-m", template_location, *@arguments, *extra_rails_arguments
|
55
57
|
]
|
56
58
|
|
57
|
-
say "
|
59
|
+
say "The following command will be executed:", :green, false
|
60
|
+
|
61
|
+
puts "\n\n"
|
58
62
|
say command.join(' '), :blue
|
59
|
-
|
63
|
+
puts
|
64
|
+
|
65
|
+
if yes? "Is this command safe?"
|
66
|
+
say "Executing template", :green
|
67
|
+
Kernel.system *command
|
68
|
+
else
|
69
|
+
say "Aborted command. Please review the template #{template_key}.", :red
|
70
|
+
end
|
60
71
|
end
|
61
72
|
end
|
62
73
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-new
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- juliogarciag
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|