buildbox 0.1.4 → 0.2

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
  SHA1:
3
- metadata.gz: 1b76bf6bc33ef1f87601dedd4dc1a6eefed0ed2c
4
- data.tar.gz: aaa97fcc886c1e55e7dd4fde4c91c2aaa514b269
3
+ metadata.gz: b7056fe7aa77fdbeac77396ab8bb9939e6fa63e8
4
+ data.tar.gz: f994d5019faba63cc0840248974183777757be4a
5
5
  SHA512:
6
- metadata.gz: f42ebc6c4718990e2b5dfdaa67828e923e3b1ecf1f5b228262f631c0e6451e63b21aaa6e86ce85b78554a08d978b2ff89102f04da697cc548aae156ea204d53e
7
- data.tar.gz: ff5f689b68da01fcbd56e3b9da34cdcc31d9a404b3fef28bd11f6d7d8363d7f50cd93def71b5f29eb13cba26c2d9f8c6418a0b3a60e296719db0b8bc49376194
6
+ metadata.gz: 39b14fa4bbfa431c6c918b08c8c23570bc39473432b8e7caa331a57ea2d816ef0f7ae7035bae57473aad3b8ee143816f8f41e1a4e4d3433afbb1b2e2af9b5f68
7
+ data.tar.gz: eb8ab79fe1c7c55ac9492297f4cd5b88fe69e1c76af611854e5f2630f7bc5be386acc479bd34cbba65d9655e47dc8ac2dc9bd4a7e16e1e2664a1353f5a8a01ec
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- buildbox (0.1.4)
4
+ buildbox (0.2)
5
5
  celluloid (~> 0.14)
6
6
  faraday (~> 0.8)
7
7
  faraday_middleware (~> 0.9)
@@ -1,5 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
+ # Disable stdout,stderr buffering
4
+ STDERR.sync = STDOUT.sync = true
5
+
3
6
  dir = File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib'))
4
7
  $LOAD_PATH.unshift(dir) unless $LOAD_PATH.include?(dir)
5
8
 
@@ -1,11 +1,22 @@
1
1
  require 'rubygems'
2
- require 'hashie/dash'
2
+ require 'hashie/mash'
3
3
  require 'json'
4
4
 
5
5
  module Buildbox
6
- class Configuration < Hashie::Dash
7
- property :worker_access_tokens, :default => []
8
- property :api_endpoint, :default => "https://api.buildbox.io/v1"
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 }
@@ -1,3 +1,3 @@
1
1
  module Buildbox
2
- VERSION = "0.1.4"
2
+ VERSION = "0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: buildbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: '0.2'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Keith Pitt