prox_gem 0.0.1 → 0.0.2

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/prox_gem/prox_gem.rb +19 -3
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 42e60f1652e9231bd690ab4a187c43bd9f407a21
4
- data.tar.gz: ef6d67939db3802dcbae605abdfe925a60e54084
3
+ metadata.gz: 20fd30784ff8dfc152c7720d195979865bc15fd6
4
+ data.tar.gz: ca8dc2cbd27dc9132dccbd37a5a66de598a6495b
5
5
  SHA512:
6
- metadata.gz: d69c62a2b2301a25f634d4cd820cbd9a1777b7807d2916b68cbc05239c113628a9b73560e368bdf1392ed170dfd0d2531c1ea37dfe77fc6f46fe1d16986d142e
7
- data.tar.gz: cd74606c2926af3bc3743687e1549f605ff23417e0df58cc25e264a5f1485783c30347756267350f0c536e6725f00bf975c465709db279f7071ddbfae40e6a2c
6
+ metadata.gz: 3d30902357d4d916c2324b884ef3e2d83f368eb05e1eafc1ed61bda085f7d7fd40890c8f3fea60bf0fe514e7f758c48d50cae43c743d447ea6306f93947bb270
7
+ data.tar.gz: 1919670a1b5d25664b428a2d0b4408c3c87519e43466855bb3be165d9b8cb35b411b5b8993908187a01992eb33e7a2787da7bfe73b55b3e6eef403074082e2bd
@@ -17,15 +17,31 @@ def _options(gem_name, options={})
17
17
  end
18
18
 
19
19
  def _prox_gem_mode
20
- ENV['PROX_GEM_MODE'] || "off"
20
+ mode = ENV['PROX_GEM_MODE']
21
+ return mode if _set? mode
22
+ "off"
21
23
  end
22
24
 
23
25
  def _gem_dir
24
- ENV['PROX_GEM_DIR'] || (_print_gem_dir_error && raise)
26
+ gem_dir = ENV['PROX_GEM_DIR']
27
+
28
+ return gem_dir if _set? gem_dir
29
+
30
+ _print_gem_dir_error
31
+ raise
25
32
  end
26
33
 
27
34
  def _prox_gem_git_uri
28
- ENV['PROX_GEM_GIT_URI'] || (_print_git_repo_uri_error && raise)
35
+ get_uri = ENV['PROX_GEM_GIT_URI']
36
+
37
+ return git_uri if _set? git_uri
38
+
39
+ _print_git_repo_uri_error
40
+ raise
41
+ end
42
+
43
+ def _set(val)
44
+ !val.nil? && !val.strip.empty?
29
45
  end
30
46
 
31
47
  def _file_system_path(gem_name)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prox_gem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Sans Collective
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-17 00:00:00.000000000 Z
11
+ date: 2015-01-20 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: