lense 0.1.6 → 0.1.7

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/lense +4 -3
  3. data/lib/lense.rb +8 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e57f0dc616f844c3cdf0be4a168f7363f7d93290
4
- data.tar.gz: 745d9d7c22f7568265390eb0b0945bb2e14f05c7
3
+ metadata.gz: bb76341de398504bd254e2924424dd490bb79aed
4
+ data.tar.gz: 65530d6b58000248ed7f0b6c854406e93754b913
5
5
  SHA512:
6
- metadata.gz: 5b78317ff92e1c59f5e81d85778261b8a5f3b4cb624a48fdc61aa2b526d8ec02a89a1b476dab96642e0be0df5400735d05e517beda4cd5cc130f7f0ef84f1fab
7
- data.tar.gz: 350e85f87211b0ed09382569da9901d5e91086704bb98009c00509d94018de93aadac855e316995654e40eeb1ec126eb5242bebab81e4ce4ec3de8ea5981eba4
6
+ metadata.gz: 76062ac51ff5fb8b207891d94b3788643a21bd68f48e6dc06e7d580df4fb40ecae56ba4d413fd2116fc79db66fca79256544059a49f3f473fd9ebea22a873a8e
7
+ data.tar.gz: c04d159cde4c0e71abf5353f8c9d43503ea8b0cb4141118bf966dac014434ef84b79d0b74049ed30006630262892ac6c5859c5293d7b1da714d7393c4a46bb40
data/bin/lense CHANGED
@@ -18,9 +18,10 @@ pre do |global_options,command,options,args|
18
18
  docker_running = found_docker && system_check('docker version')
19
19
  found_vagrant = system_check('which vagrant')
20
20
 
21
- puts "WARNING: Docker not found. Unable to run courses that use Docker!" unless found_docker || global_options[:quiet]
22
- puts "WARNING: Docker is not running. Unable to run courses that use Docker!" if (found_docker && !docker_running) && !global_options[:quiet]
23
- puts "WARNING: Vagrant not found. Unable to run courses that use Vagrant!" unless found_vagrant || global_options[:quiet]
21
+ be_quiet = global_options[:quiet] || LENSE_APP.config["quiet"]
22
+ puts "WARNING: Docker not found. Unable to run courses that use Docker!" unless found_docker || be_quiet
23
+ puts "WARNING: Docker is not running. Unable to run courses that use Docker!" if (found_docker && !docker_running) && !be_quiet
24
+ puts "WARNING: Vagrant not found. Unable to run courses that use Vagrant!" unless found_vagrant || be_quiet
24
25
 
25
26
  minimal_needed = found_docker || found_vagrant
26
27
  puts "ERROR: Must have either Docker or Vagrant!" unless minimal_needed
data/lib/lense.rb CHANGED
@@ -1,7 +1,14 @@
1
1
  class LENSE
2
- VERSION = '0.1.6'
2
+ attr_reader :config
3
+
4
+ VERSION = '0.1.7'
3
5
  LENSE_DIR = File.join(ENV['HOME'],'.lense')
6
+
4
7
  def initialize()
5
8
  Dir.mkdir(LENSE_DIR) unless File.directory?(LENSE_DIR)
9
+ config_file = File.join(LENSE_DIR,'config')
10
+ config_str = File.file?(config_file) ? File.read(config_file) : ''
11
+ @config = Psych.load(str)
6
12
  end
13
+
7
14
  end
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.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Manuel Zubieta