commit-live-cli 0.0.21 → 0.0.22

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: 4ba81323b5f5c7f8ca8d5f820d683d1e180f1629
4
- data.tar.gz: 22efc594c1e70294b7de25e80fc9486a027f90a5
3
+ metadata.gz: 4ee94f5abf354545825381e45b21b4963df7ad04
4
+ data.tar.gz: b7e29ad9cab705dbd8df0be2e601b4e8621ae916
5
5
  SHA512:
6
- metadata.gz: ae40e6ab867dd6ac55788e39c95dc7e53a10e5505117006d9fb82c0397f83c92651930ae31bb67a588db1336fec8c00b882225083b9cdcc83a52cc07f870a5a9
7
- data.tar.gz: 643f94b1b676a3941ee41948afa01d9abdcc2fae2095fd32b004b8487e1e8537b21ff889ee849790e29ec0781fd15889b9510902da855592d57beb70f980f04e
6
+ metadata.gz: 75a67be0ff19a908cec43b56b7a824e9371c1fa51b3476429eade4cd9cd2b37262883358a065b2be1b35eaeb3cf64c9e146b5e25276295176673f9b203b27a60
7
+ data.tar.gz: 38f60d388d8851116ea3f21b27b35919933361dd856c05b7cdebb89bb4436742c885971c87fa70c332b4d0df3f1baaf61ba6881f7691e76a1e0258dfaed4544e
@@ -100,7 +100,7 @@ module CommitLive
100
100
  rescue Git::GitExecuteError => e
101
101
  if e.message.match(/nothing to commit/)
102
102
  puts "It looks like you have no changes to commit."
103
- exit 1
103
+ puts "Pushing previous commits if any."
104
104
  else
105
105
  puts 'Sorry, something went wrong. Please try again.'
106
106
  exit 1
@@ -134,8 +134,8 @@ module CommitLive
134
134
  end
135
135
  rescue Git::GitExecuteError => e
136
136
  rollback_last_commit()
137
- if e.message.match(/You may want to first integrate the remote changes/)
138
- puts "It seems that you have made changes to the assignment outside of our IDE."
137
+ if e.message.match(/Integrate the remote changes/)
138
+ puts "There are some remote changes to pull."
139
139
  puts "Pulling the changes..."
140
140
  pull_changes
141
141
  else
@@ -73,6 +73,8 @@ module CommitLive
73
73
  if lesson_type == "PRACTICE"
74
74
  open_lesson
75
75
  end
76
+ else
77
+ open_lesson
76
78
  end
77
79
  # install dependencies
78
80
  # cd into it and invoke bash
@@ -19,9 +19,9 @@ module CommitLive
19
19
  end
20
20
 
21
21
  def update(type, trackName)
22
+ enc_url = URI.escape("/v1/user/track/#{trackName}")
22
23
  begin
23
- Timeout::timeout(15) do
24
- enc_url = URI.escape("/v1/user/track/#{trackName}")
24
+ Timeout::timeout(60) do
25
25
  response = api.post(
26
26
  enc_url,
27
27
  headers: { 'access-token' => "#{token}" },
@@ -47,8 +47,16 @@ module CommitLive
47
47
  end
48
48
  rescue Timeout::Error
49
49
  puts "Error while updating lesson status."
50
- puts "Please check your internet connection."
51
- exit
50
+ sentry.log_message("Update Lesson Status Failed",
51
+ {
52
+ 'url' => enc_url,
53
+ 'track_name' => trackName,
54
+ 'params' => {
55
+ 'method' => 'assignment_status',
56
+ 'action' => type
57
+ },
58
+ }
59
+ )
52
60
  end
53
61
  end
54
62
  end
@@ -1,5 +1,5 @@
1
1
  module CommitLive
2
2
  module Cli
3
- VERSION = "0.0.21"
3
+ VERSION = "0.0.22"
4
4
  end
5
5
  end
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.21
4
+ version: 0.0.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - greyatom
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-21 00:00:00.000000000 Z
11
+ date: 2017-08-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler