commit-live-cli 0.0.5 → 0.0.6
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/commit-live/lesson/current.rb +2 -2
- data/lib/commit-live/lesson/open.rb +6 -6
- data/lib/commit-live/lesson/status.rb +2 -2
- data/lib/commit-live/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6e8762161f3d9535b69b4a113088de84cb28f30
|
4
|
+
data.tar.gz: dc59a7145700b08e441e7091bb29d3caedc91f0e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fcf6d9373c8c4cb18b1ee5f989f28597f5b96e03496b7aab91d13fcc78725680d2e5e91497029bcab8eca82a43e1fcacfa4f1263eda286e08bbc66cf3ee47d21
|
7
|
+
data.tar.gz: 5bba542060de14ae9ee46afe13c7b2bb68f84a1e3eb7cdefde3c8a3e54ece170c756392310a7a4edc2083a03bce18c26fe4de2093c7b0f9e062a921bf85c6db4
|
@@ -11,9 +11,9 @@ module CommitLive
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def getCurrentLesson(puzzle_name)
|
14
|
-
url = '/v1/
|
14
|
+
url = '/v1/current_track'
|
15
15
|
if !puzzle_name.empty?
|
16
|
-
url = "/v1/user/
|
16
|
+
url = "/v1/user/track/#{puzzle_name}"
|
17
17
|
end
|
18
18
|
getLesson(url)
|
19
19
|
end
|
@@ -25,10 +25,10 @@ module CommitLive
|
|
25
25
|
puts "Getting current lesson..."
|
26
26
|
lesson.getCurrentLesson(puzzle_name)
|
27
27
|
lessonData = lesson.getAttr('data')
|
28
|
-
if !lessonData['
|
29
|
-
@lessonName = lessonData['
|
28
|
+
if !lessonData['current_track'].nil?
|
29
|
+
@lessonName = lessonData['current_track']['track_slug']
|
30
30
|
else
|
31
|
-
@lessonName = lessonData['
|
31
|
+
@lessonName = lessonData['track_slug']
|
32
32
|
end
|
33
33
|
if !File.exists?("#{rootDir}/#{lessonName}")
|
34
34
|
# fork lesson repo via github api
|
@@ -39,7 +39,7 @@ module CommitLive
|
|
39
39
|
change_grp_owner
|
40
40
|
# lesson forked API change
|
41
41
|
puts 'Updating lesson status...'
|
42
|
-
lesson_status.update('
|
42
|
+
lesson_status.update('forked', lessonName)
|
43
43
|
end
|
44
44
|
# install dependencies
|
45
45
|
# cd into it and invoke bash
|
@@ -52,8 +52,8 @@ module CommitLive
|
|
52
52
|
begin
|
53
53
|
Timeout::timeout(15) do
|
54
54
|
lessonData = lesson.getAttr('data')
|
55
|
-
if !lessonData['
|
56
|
-
lessonRepo = lessonData['
|
55
|
+
if !lessonData['current_track'].nil?
|
56
|
+
lessonRepo = lessonData['current_track']['repo_url']
|
57
57
|
else
|
58
58
|
lessonRepo = lessonData['repo_url']
|
59
59
|
end
|
@@ -11,12 +11,12 @@ module CommitLive
|
|
11
11
|
@netrc = CommitLive::NetrcInteractor.new()
|
12
12
|
end
|
13
13
|
|
14
|
-
def update(type,
|
14
|
+
def update(type, trackName)
|
15
15
|
begin
|
16
16
|
Timeout::timeout(15) do
|
17
17
|
netrc.read
|
18
18
|
token = netrc.password
|
19
|
-
enc_url = URI.escape("/v1/user/
|
19
|
+
enc_url = URI.escape("/v1/user/track/#{trackName}")
|
20
20
|
response = api.post(
|
21
21
|
enc_url,
|
22
22
|
headers: { 'access-token' => "#{token}" },
|
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.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- greyatom
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-04-
|
11
|
+
date: 2017-04-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|