lense 0.2.11 → 0.2.12
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/lense.rb +4 -4
- 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: b963955df28452b0e8ccd32570432e5a54fc1135
|
4
|
+
data.tar.gz: 66f39c1c5fefc7c41db57e4af7eb121dabe46dcf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40ecffbd7085d7663840deec4ad3725901f3af6502fe60b168c39bbd568466c37768f35946adeb8f8ea6a79a2d2089ba84108067fc6a720ae6d0567becebbc0c
|
7
|
+
data.tar.gz: 390168e5d7bfe1d8a4df09f28f89ae97b546b2850997f9eeb370bc25d0bcc0eb7b0d9549dcc4a33093026fc747e4b8fc727744747b5c79e86b6af4b324b25461
|
data/lib/lense.rb
CHANGED
@@ -7,7 +7,7 @@ require 'base64'
|
|
7
7
|
class LENSE
|
8
8
|
attr_reader :config, :current_course, :lense_file_hash
|
9
9
|
|
10
|
-
VERSION = '0.2.
|
10
|
+
VERSION = '0.2.12'
|
11
11
|
LENSE_DIR = File.join(ENV['HOME'],'.lense')
|
12
12
|
COURSES_DIR = File.join(LENSE_DIR,'courses')
|
13
13
|
CURRENT_COURSE_FILE = File.join(LENSE_DIR,'current_course')
|
@@ -267,6 +267,9 @@ class LENSE
|
|
267
267
|
end
|
268
268
|
|
269
269
|
def clone(repo)
|
270
|
+
exit_now!("Invalid repo name.") unless repo =~ /\A\w+\/\w+\Z/
|
271
|
+
username, project_name = repo.split '/'
|
272
|
+
|
270
273
|
say "making dirs ..."
|
271
274
|
# make repo dir in current directory
|
272
275
|
Dir.mkdir project_name unless File.directory? project_name
|
@@ -289,9 +292,6 @@ class LENSE
|
|
289
292
|
end
|
290
293
|
|
291
294
|
def install_repo(repo,action)
|
292
|
-
exit_now!("Invalid repo name.") unless repo =~ /\A\w+\/\w+\Z/
|
293
|
-
username, project_name = repo.split '/'
|
294
|
-
|
295
295
|
say "making rest call"
|
296
296
|
response = RestClient.get "#{API_BASE}/#{repo}/#{action.to_s}", { params: { format: 'json' } }
|
297
297
|
repository = JSON.parse(response)
|