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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 22d5092eb1b0d73ab705135ca5689caf33922de6
4
- data.tar.gz: c39715ec26816e038114d06538b38fcc91924d50
3
+ metadata.gz: de4d14577b333e5e65b5c00675af31f077177e21
4
+ data.tar.gz: 0230d9ff24aa368dc9e13de2e871a01929b9707f
5
5
  SHA512:
6
- metadata.gz: 7879377a15c490f747a4f6781fc5c9e99c647438c0d9fc49cced3e410fe7508389f985ae54c7f017c8f8bf6fb3f1fd63b03bfc6889f579632ac115a26b3b82f2
7
- data.tar.gz: fc010a297014c1a9e2d16a010c44dd5ef013249a0ae97cec89fe37f0755d93ce90a11969648a6671111fe46902df3e099f3fcbc5c4bf3961aab9b9560774a073
6
+ metadata.gz: 3350d91ef6aa0765275ff9b2593e265b6b8e1395229ae189eb2b2c51fcfee246154654c69a97c0bfa6b0d6ead2ee31d8b069a993a541e17d336e5b7f2e422eac
7
+ data.tar.gz: 03c5d72bcb682b0335b747c4818fe7c0981f212e11a2db11b45de47f39b9a9e07ee63abc3c98cb733c46521d0ee2fea4c84049c25cf7037f88ac5d16da206667
@@ -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
- File.expand_path('../../../templates', __FILE__)
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
- clone_repo(sinatra_repo)
33
- clone_repo(angular_repo) unless options[:'skip-angular']
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 templates/#{repo_name}"
53
- directory repo_name, @app_path
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
@@ -1,3 +1,3 @@
1
1
  module Singu
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: singu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Darek Finster