brick_and_mortar 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/brick_and_mortar/version.rb +1 -1
- data/spec/git_spec.rb +31 -15
- 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: c857cafa47b4119e92126eec01c9f93ee1043808
|
4
|
+
data.tar.gz: a06f47155edc8789a9894958b14a68e424f50747
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8b42ede0c25ac930fadb62962a122373ddca4871cb7f123f1e459ed50b6bb9f89d05f36ad09cbec76d125646188891e56db5cf93ebcdd15229ddddc2ce76ac1
|
7
|
+
data.tar.gz: 2caad38f0eb24ea56d4b517276ff076f34b406afa8eaedb97f8f8f911efeb34f64c6c98f4ff7669a0376f51af1a0f80ca075366d2d4ace8c1a97e780f7d4e7ee
|
data/spec/git_spec.rb
CHANGED
@@ -1,20 +1,28 @@
|
|
1
1
|
require_relative 'support/spec_helper'
|
2
|
+
require 'git'
|
2
3
|
|
3
4
|
require_relative '../lib/brick_and_mortar/git'
|
4
5
|
|
5
6
|
describe BrickAndMortar::Git do
|
6
|
-
describe 'given git
|
7
|
-
|
8
|
-
'mock_brick',
|
9
|
-
'0.0.1',
|
10
|
-
MockBrickLocation.new('git', 'git@github.com:dmorrill10/brick_and_mortar.git')
|
11
|
-
)
|
12
|
-
|
13
|
-
it 'downloads the brick with git ssh' do
|
7
|
+
describe 'given git brick configuration' do
|
8
|
+
it 'installs the brick with git' do
|
14
9
|
Dir.mktmpdir do |dir|
|
15
|
-
|
16
|
-
|
17
|
-
|
10
|
+
mock_git_repo = "#{dir}/git_remotes/mock_git_repo.git"
|
11
|
+
FileUtils.mkdir_p mock_git_repo
|
12
|
+
Git.init mock_git_repo, bare: true
|
13
|
+
git_brick_configruation = MockBrickConfiguration.new(
|
14
|
+
'mock_brick',
|
15
|
+
'0.0.1',
|
16
|
+
MockBrickLocation.new('git', mock_git_repo)
|
17
|
+
)
|
18
|
+
Dir.chdir dir do |_d|
|
19
|
+
BrickAndMortar::Git.clone_repo(
|
20
|
+
git_brick_configruation.location.url,
|
21
|
+
git_brick_configruation.name
|
22
|
+
)
|
23
|
+
File.directory?(
|
24
|
+
File.join(dir, git_brick_configruation.name)
|
25
|
+
).must_equal true
|
18
26
|
end
|
19
27
|
end
|
20
28
|
end
|
@@ -23,14 +31,22 @@ describe BrickAndMortar::Git do
|
|
23
31
|
git_https_brick_configruation = MockBrickConfiguration.new(
|
24
32
|
'mock_brick',
|
25
33
|
'0.0.1',
|
26
|
-
MockBrickLocation.new(
|
34
|
+
MockBrickLocation.new(
|
35
|
+
'git',
|
36
|
+
'https://github.com/dmorrill10/brick_and_mortar.git'
|
37
|
+
)
|
27
38
|
)
|
28
39
|
|
29
40
|
it 'downloads the brick with git https' do
|
30
41
|
Dir.mktmpdir do |dir|
|
31
|
-
Dir.chdir dir do |
|
32
|
-
BrickAndMortar::Git.clone_repo(
|
33
|
-
|
42
|
+
Dir.chdir dir do |_d|
|
43
|
+
BrickAndMortar::Git.clone_repo(
|
44
|
+
git_https_brick_configruation.location.url,
|
45
|
+
git_https_brick_configruation.name
|
46
|
+
)
|
47
|
+
File.directory?(
|
48
|
+
File.join(dir, git_https_brick_configruation.name)
|
49
|
+
).must_equal true
|
34
50
|
end
|
35
51
|
end
|
36
52
|
end
|