commit-live-cli 0.0.9 → 0.0.11
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 255b50ad4ede6b25db231abc89280c5ae8419332
|
4
|
+
data.tar.gz: 3289fb66962b69f0a0c6019221b31ae279207f49
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c218f60d12759020baa239cce8f338c27c4002b472dc4a03e2827a1800d832bcbd49b7e7df01f88d2eff87c1ff3f8c179329fd08d29e3a902308cc3467dc891
|
7
|
+
data.tar.gz: a7b782b6a5f834d525332b07a4db176d711fc3b84ab4e8e8228375939fd21af8a44ab93bd5022413f885030c4db6880f5132c05e94d237bab657fd8d04e87792
|
@@ -1,6 +1,5 @@
|
|
1
1
|
require "commit-live/lesson/current"
|
2
2
|
require "commit-live/lesson/status"
|
3
|
-
require "commit-live/netrc-interactor"
|
4
3
|
require "commit-live/api"
|
5
4
|
require "commit-live/github"
|
6
5
|
require 'octokit'
|
@@ -45,7 +44,6 @@ module CommitLive
|
|
45
44
|
# change group owner
|
46
45
|
change_grp_owner
|
47
46
|
# lesson forked API change
|
48
|
-
puts 'Updating lesson status...'
|
49
47
|
lesson_status.update('forked', lessonName)
|
50
48
|
end
|
51
49
|
# install dependencies
|
@@ -93,12 +91,7 @@ module CommitLive
|
|
93
91
|
end
|
94
92
|
|
95
93
|
def change_grp_owner
|
96
|
-
|
97
|
-
if results
|
98
|
-
puts "..."
|
99
|
-
else
|
100
|
-
puts "Couldn't change group ownership"
|
101
|
-
end
|
94
|
+
system("chgrp -R ubuntu #{rootDir}/#{lessonName}")
|
102
95
|
end
|
103
96
|
|
104
97
|
def cdToLesson
|
@@ -12,6 +12,7 @@ module CommitLive
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def update(type, trackName)
|
15
|
+
puts 'Updating lesson status...'
|
15
16
|
begin
|
16
17
|
Timeout::timeout(15) do
|
17
18
|
netrc.read
|
@@ -25,10 +26,8 @@ module CommitLive
|
|
25
26
|
'action' => type
|
26
27
|
}
|
27
28
|
)
|
28
|
-
if response.status
|
29
|
-
puts "
|
30
|
-
else
|
31
|
-
puts "Something went wrong. Please try again."
|
29
|
+
if response.status != 202
|
30
|
+
puts "Failed updating lesson status."
|
32
31
|
exit 1
|
33
32
|
end
|
34
33
|
end
|
@@ -46,11 +46,11 @@ module CommitLive
|
|
46
46
|
end
|
47
47
|
|
48
48
|
def run(updateStatus = true)
|
49
|
+
clear_changes_in_tests
|
49
50
|
strategy.check_dependencies
|
50
51
|
strategy.configure
|
51
52
|
results = strategy.run
|
52
53
|
if updateStatus
|
53
|
-
puts 'Updating lesson status...'
|
54
54
|
lessonName = repo_name(remote: 'origin')
|
55
55
|
if results
|
56
56
|
# test case passed
|
@@ -67,6 +67,10 @@ module CommitLive
|
|
67
67
|
@strategy ||= strategies.map{ |s| s.new() }.detect(&:detect)
|
68
68
|
end
|
69
69
|
|
70
|
+
def clear_changes_in_tests
|
71
|
+
system("git checkout HEAD -- tests/")
|
72
|
+
end
|
73
|
+
|
70
74
|
private
|
71
75
|
|
72
76
|
def strategies
|
data/lib/commit-live/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: commit-live-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- greyatom
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-05-
|
11
|
+
date: 2017-05-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|