buildbox 0.1.4 → 0.2
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/Gemfile.lock +1 -1
- data/bin/buildbox +3 -0
- data/lib/buildbox/configuration.rb +15 -4
- data/lib/buildbox/version.rb +1 -1
- 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: b7056fe7aa77fdbeac77396ab8bb9939e6fa63e8
|
4
|
+
data.tar.gz: f994d5019faba63cc0840248974183777757be4a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 39b14fa4bbfa431c6c918b08c8c23570bc39473432b8e7caa331a57ea2d816ef0f7ae7035bae57473aad3b8ee143816f8f41e1a4e4d3433afbb1b2e2af9b5f68
|
7
|
+
data.tar.gz: eb8ab79fe1c7c55ac9492297f4cd5b88fe69e1c76af611854e5f2630f7bc5be386acc479bd34cbba65d9655e47dc8ac2dc9bd4a7e16e1e2664a1353f5a8a01ec
|
data/Gemfile.lock
CHANGED
data/bin/buildbox
CHANGED
@@ -1,11 +1,22 @@
|
|
1
1
|
require 'rubygems'
|
2
|
-
require 'hashie/
|
2
|
+
require 'hashie/mash'
|
3
3
|
require 'json'
|
4
4
|
|
5
5
|
module Buildbox
|
6
|
-
class Configuration < Hashie::
|
7
|
-
|
8
|
-
|
6
|
+
class Configuration < Hashie::Mash
|
7
|
+
def worker_access_tokens
|
8
|
+
env_workers = ENV['BUILDBOX_WORKERS']
|
9
|
+
|
10
|
+
if env_workers.nil?
|
11
|
+
self[:worker_access_tokens] || []
|
12
|
+
else
|
13
|
+
env_workers.to_s.split(",")
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def api_endpoint
|
18
|
+
ENV['BUILDBOX_API_ENDPOINT'] || self[:api_endpoint] || "https://api.buildbox.io/v1"
|
19
|
+
end
|
9
20
|
|
10
21
|
def update(attributes)
|
11
22
|
attributes.each_pair { |key, value| self[key] = value }
|
data/lib/buildbox/version.rb
CHANGED