singu 0.2.0 → 0.2.1
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 +4 -4
- data/lib/singu/cli.rb +3 -7
- data/lib/singu/version.rb +1 -1
- 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: 22d5092eb1b0d73ab705135ca5689caf33922de6
|
|
4
|
+
data.tar.gz: c39715ec26816e038114d06538b38fcc91924d50
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7879377a15c490f747a4f6781fc5c9e99c647438c0d9fc49cced3e410fe7508389f985ae54c7f017c8f8bf6fb3f1fd63b03bfc6889f579632ac115a26b3b82f2
|
|
7
|
+
data.tar.gz: fc010a297014c1a9e2d16a010c44dd5ef013249a0ae97cec89fe37f0755d93ce90a11969648a6671111fe46902df3e099f3fcbc5c4bf3961aab9b9560774a073
|
data/lib/singu/cli.rb
CHANGED
|
@@ -19,20 +19,16 @@ module Singu
|
|
|
19
19
|
argument :name, type: :string, desc: "The name of the new application"
|
|
20
20
|
class_option :gems, type: :array, description: "The names of gems you want to add to the new application"
|
|
21
21
|
class_option :template, type: :hash, description: "The github repo ex: regedarek/skeleton", enum: 2
|
|
22
|
-
class_option :'skip-angular', :
|
|
22
|
+
class_option :'skip-angular', type: :boolean
|
|
23
23
|
|
|
24
24
|
def setup
|
|
25
25
|
@app_path = name.directory_name
|
|
26
26
|
@name = name.file_name
|
|
27
|
-
|
|
28
|
-
# options.each do |key, value|
|
|
29
|
-
# instance_variable_set "@#{key.to_s}".to_sym, value
|
|
30
|
-
# end
|
|
31
27
|
end
|
|
32
28
|
|
|
33
29
|
def create_app_from_template
|
|
34
|
-
sinatra_repo = options
|
|
35
|
-
angular_repo = options
|
|
30
|
+
sinatra_repo = options.fetch(:template){{}}.fetch('sinatra', DEFAULT_SINATRA_TEMPLATE_REPO)
|
|
31
|
+
angular_repo = options.fetch(:template){{}}.fetch('angular', DEFAULT_ANGULAR_TEMPLATE_REPO)
|
|
36
32
|
clone_repo(sinatra_repo)
|
|
37
33
|
clone_repo(angular_repo) unless options[:'skip-angular']
|
|
38
34
|
end
|
data/lib/singu/version.rb
CHANGED