singu 0.2.1 → 0.2.2
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 +9 -5
- 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: de4d14577b333e5e65b5c00675af31f077177e21
|
4
|
+
data.tar.gz: 0230d9ff24aa368dc9e13de2e871a01929b9707f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3350d91ef6aa0765275ff9b2593e265b6b8e1395229ae189eb2b2c51fcfee246154654c69a97c0bfa6b0d6ead2ee31d8b069a993a541e17d336e5b7f2e422eac
|
7
|
+
data.tar.gz: 03c5d72bcb682b0335b747c4818fe7c0981f212e11a2db11b45de47f39b9a9e07ee63abc3c98cb733c46521d0ee2fea4c84049c25cf7037f88ac5d16da206667
|
data/lib/singu/cli.rb
CHANGED
@@ -12,7 +12,7 @@ module Singu
|
|
12
12
|
DEFAULT_ANGULAR_TEMPLATE_REPO = 'regedarek/singu-angular-template'
|
13
13
|
|
14
14
|
def self.source_root
|
15
|
-
|
15
|
+
"."
|
16
16
|
end
|
17
17
|
|
18
18
|
desc "Creates a new Sinatra + Angular.js application"
|
@@ -29,8 +29,10 @@ module Singu
|
|
29
29
|
def create_app_from_template
|
30
30
|
sinatra_repo = options.fetch(:template){{}}.fetch('sinatra', DEFAULT_SINATRA_TEMPLATE_REPO)
|
31
31
|
angular_repo = options.fetch(:template){{}}.fetch('angular', DEFAULT_ANGULAR_TEMPLATE_REPO)
|
32
|
-
|
33
|
-
|
32
|
+
inside(@app_path) do
|
33
|
+
clone_repo(sinatra_repo)
|
34
|
+
clone_repo(angular_repo) unless options[:'skip-angular']
|
35
|
+
end
|
34
36
|
end
|
35
37
|
|
36
38
|
def initialize_git_repo
|
@@ -49,8 +51,10 @@ module Singu
|
|
49
51
|
|
50
52
|
def clone_repo(repo)
|
51
53
|
repo_name = repo.split('/').last
|
52
|
-
system "git clone -q --depth 1 git@github.com:#{repo}.git
|
53
|
-
directory
|
54
|
+
system "git clone -q --depth 1 git@github.com:#{repo}.git tmp/#{@name}"
|
55
|
+
directory "tmp/#{@name}", @app_path
|
56
|
+
remove_dir "tmp"
|
57
|
+
remove_file ".git"
|
54
58
|
end
|
55
59
|
end
|
56
60
|
end
|
data/lib/singu/version.rb
CHANGED