honkster-giternal 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION.yml +1 -1
- data/features/checking_out_externals.feature +27 -1
- data/features/steps/repository_steps.rb +4 -0
- data/giternal_helper.rb +2 -2
- data/lib/giternal/app.rb +10 -2
- metadata +3 -3
data/VERSION.yml
CHANGED
@@ -22,4 +22,30 @@ Feature: Checking out and updating externals
|
|
22
22
|
And content is added to 'first_external'
|
23
23
|
Then 'first_external' should not be up to date
|
24
24
|
When I update the externals
|
25
|
-
Then 'first_external' should be up to date
|
25
|
+
Then 'first_external' should be up to date
|
26
|
+
|
27
|
+
Scenario: Two Repositories checked out and one updated
|
28
|
+
Given an external repository named 'first_external'
|
29
|
+
And an external repository named 'second_external'
|
30
|
+
And the externals are up to date
|
31
|
+
And content is added to 'first_external'
|
32
|
+
And content is added to 'second_external'
|
33
|
+
Then 'first_external' should not be up to date
|
34
|
+
And 'second_external' should not be up to date
|
35
|
+
When I update the external 'second_external'
|
36
|
+
Then 'first_external' should not be up to date
|
37
|
+
And 'second_external' should be up to date
|
38
|
+
|
39
|
+
Scenario: One repo frozen, one repo unfrozen, and all updated
|
40
|
+
Given an external repository named 'first_external'
|
41
|
+
And an external repository named 'second_external'
|
42
|
+
And the externals are up to date
|
43
|
+
And the externals are frozen
|
44
|
+
And content is added to 'first_external'
|
45
|
+
And content is added to 'second_external'
|
46
|
+
Then 'first_external' should not be up to date
|
47
|
+
And 'second_external' should not be up to date
|
48
|
+
When I unfreeze the external 'second_external'
|
49
|
+
And I update the externals
|
50
|
+
Then 'first_external' should not be up to date
|
51
|
+
And 'second_external' should be up to date
|
@@ -68,6 +68,10 @@ When "I update the externals" do
|
|
68
68
|
GiternalHelper.update_externals
|
69
69
|
end
|
70
70
|
|
71
|
+
When /I update the external '(.*)'/ do |external_name|
|
72
|
+
GiternalHelper.update_externals("dependencies/#{external_name}")
|
73
|
+
end
|
74
|
+
|
71
75
|
When "I freeze the externals" do
|
72
76
|
GiternalHelper.freeze_externals
|
73
77
|
end
|
data/giternal_helper.rb
CHANGED
@@ -69,9 +69,9 @@ class GiternalHelper
|
|
69
69
|
%w(GIT_DIR GIT_WORK_TREE GIT_INDEX_FILE).each {|var| ENV[var] = nil }
|
70
70
|
end
|
71
71
|
|
72
|
-
def self.update_externals
|
72
|
+
def self.update_externals(*args)
|
73
73
|
Dir.chdir(tmp_path + '/main_repo') do
|
74
|
-
GiternalHelper.run('update')
|
74
|
+
GiternalHelper.run('update', *args)
|
75
75
|
end
|
76
76
|
end
|
77
77
|
|
data/lib/giternal/app.rb
CHANGED
@@ -4,8 +4,16 @@ module Giternal
|
|
4
4
|
@base_dir = base_dir
|
5
5
|
end
|
6
6
|
|
7
|
-
def update
|
8
|
-
|
7
|
+
def update(*dirs)
|
8
|
+
if dirs.empty?
|
9
|
+
config.each_repo {|r| r.update }
|
10
|
+
else
|
11
|
+
dirs.each do |dir|
|
12
|
+
if repo = config.find_repo(dir)
|
13
|
+
repo.update
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
9
17
|
end
|
10
18
|
|
11
19
|
def freezify(*dirs)
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: honkster-giternal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 3
|
10
|
+
version: 0.2.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Pat Maddox
|