rails-new 0.0.3 → 0.0.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 36908b5cf1c64607ada48c0496e8acd59492fdb3
4
- data.tar.gz: 00020da07dbb52122e70b1881d008fd0a16cae80
3
+ metadata.gz: 4c9f63a1b56bb93b9c6dc1d89d5ebe14879a8d13
4
+ data.tar.gz: 99d8b62c1d513aad577c3ce5eaa4ad6fe475d7ca
5
5
  SHA512:
6
- metadata.gz: 0c45b5ab72f90fdb39d9b36d6fa77fe7aba9997749cfad782c97e77e402ef00ec7aa53292f649c2ec9885312dc229b3f2ba6813eed4198fea872470641381219
7
- data.tar.gz: 4a1dca49d1b2dc06b39c652122c7f7b331d25d5f3c8ebff0a785b6efda781fe378047f37e530971702bcb54ff690339e4d30ac8448e27ea517639b06a898888f
6
+ metadata.gz: 3a4baaa51b7061979600127f22f7d33bc2e057a68339c22733121f2aca381c8eea598cc1f2df7719b7367b28562f2ca0c3c456c15b701316dccae421fa718921
7
+ data.tar.gz: 7049d2579403dba12865fd432af8330a96fff260c012790861d70a40fd776e08bb941d1cd4950673d02a5058b13a9bc7f56a82ab3e12341a2802199c3d01d2f3
@@ -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
- "https://rails-new.herokuapp.com/api/v1/templates/#{template_key}.json"
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 "Running rails command ", :green, false
59
+ say "The following command will be executed:", :green, false
60
+
61
+ puts "\n\n"
58
62
  say command.join(' '), :blue
59
- Kernel.system *command
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
 
@@ -1,7 +1,7 @@
1
1
  module Rails
2
2
  module New
3
3
  module Gem
4
- VERSION = "0.0.3"
4
+ VERSION = "0.0.4"
5
5
  end
6
6
  end
7
7
  end
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.3
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-13 00:00:00.000000000 Z
11
+ date: 2015-03-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler