eco-helpers 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d1fc8637aef6c15d4e73834479411965ecc2de80df899df4f937d4eb7b002718
4
- data.tar.gz: 104e50e1d40d9009af0674d432e03e63ba3b327be70fac18909d011b2cf55ce6
3
+ metadata.gz: db7768619b97c307a3bed9edede57a9cc0fc32defce50ddbe43972544cc5b915
4
+ data.tar.gz: f4c69c66654881629ce0d070f1b912982d73df87d3b608e428cd12182c5f3729
5
5
  SHA512:
6
- metadata.gz: d66f400ec477cd5c2ea341231adea190475d34580fb97492467ad18952ed1565c643fb6dc3776dcc0993c05087b92f5621bd012dc2da2d529f56b60fed9fef3e
7
- data.tar.gz: 70d2695c6eb5421cfe17bac16543df3706a2740481013fcd5a7ad76139cfe6650449e2ee8321cbf85e907b087436e6970597ff321f296e064ba952c164b2aac6
6
+ metadata.gz: e2d69f4364ad41db88ceb7d7876251d0fc560dbd027cc79e5e6f7640c7f830a3680722c482eaed2c8647938bb7e6d8961b336c195ec0d53192ec856ec332440e
7
+ data.tar.gz: de56af0c58ef50d7caadc1162cf30a04137c8fd35af6453c0a970473be9e9c98ff3192c29460fbc2085805d4a914706dfe0e34c37f9b2defe790765a11188690
@@ -117,9 +117,17 @@ module Eco
117
117
  files.working_directory = path
118
118
  end
119
119
 
120
- def working_directory(mode: :active_api)
120
+ def working_directory(mode: nil)
121
+ unless mode
122
+ wd = files.working_directory
123
+ return wd unless wd.to_s.strip.empty?
124
+ end
125
+
126
+ mode ||= :active_api
121
127
  if mode == :active_api
122
128
  apis.active_root_name
129
+ elsif mode == :raw_api_name
130
+ apis.active_name
123
131
  else
124
132
  files.working_directory
125
133
  end
@@ -40,7 +40,7 @@ module Eco
40
40
  def active_name=(name)
41
41
  raise "'#{name}' Api environment not defined" if !apis[name]
42
42
  self["active-name"] = name
43
- self["active-api"] = apis[name]
43
+ self["active-api"] = apis[name]
44
44
  self
45
45
  end
46
46
 
data/lib/eco/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Eco
2
- VERSION = "1.0.4"
2
+ VERSION = "1.0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eco-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oscar Segura