lense 0.2.11 → 0.2.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/lense.rb +4 -4
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a8a2ff85f2d0387074199a1a943929a9dbe8dad6
4
- data.tar.gz: e9a68d59792f893e687137e0050e95603a5f3657
3
+ metadata.gz: b963955df28452b0e8ccd32570432e5a54fc1135
4
+ data.tar.gz: 66f39c1c5fefc7c41db57e4af7eb121dabe46dcf
5
5
  SHA512:
6
- metadata.gz: bbf46243b28667a015eb07487fc349f566f5a32d39434cb158520f0a1934a980f3f31a2cc8b6d0653faac0348492a3d460dcdd8d552039146a6bb344c0736be9
7
- data.tar.gz: 959cb899b96352c7d244c26c962b0ba08e13af20e7308bb2d2dfb9eb596773b5031756143a978834f9a42059a83a8251f63d565ad2e6e364731ab7f59ede6853
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.11'
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)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lense
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.11
4
+ version: 0.2.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Manuel Zubieta