babl 0.2.0 → 0.2.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1641d06ad7919dea5e8f35e357ec3bdd817067bc
4
- data.tar.gz: dd055fbca5a62c0835580288613d5731b72956a0
3
+ metadata.gz: ef8873db4e771ecb8a0ab02a25d20359ed99899b
4
+ data.tar.gz: a2f0e6476980336b234e2fc149c399fc548954ea
5
5
  SHA512:
6
- metadata.gz: 016340714de0a77198ad356cc0dbb2f13eb57c14489ab81bfe781446d217d9e4a14086834f391672f9f82283465cd1f457dbf434df753548f9009b6bc5081b5b
7
- data.tar.gz: 16c8281887affbda075c2cee162777903389c1d18468b44975008e9eb63b4a8cd66d4f214e87048687abf09c0ff961d039f3570c1434b99369049be9f600b8cb
6
+ metadata.gz: e9d5fa22f98ad093032c23acca16d8cee3f9cbec7a1b974bf9afcb1fe228cacdc7b54727eda3d1e42e956aad6cdb51b4855a3aa08beed6ffca82990202fe1d16
7
+ data.tar.gz: a188c8b6df32991672050e91c7d5a77c0ae0ccca6601a2668536c82c7b221b5edde337afb3f1f8de47406d40f49791a68110578879405a63ed98348dbcd91c8c
data/babl.gemspec CHANGED
@@ -5,7 +5,7 @@ require 'babl'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "babl"
8
- spec.version = Babl.version
8
+ spec.version = "0.2.1"
9
9
  spec.authors = ["Lars Kluge"]
10
10
  spec.email = ["l@larskluge.com"]
11
11
 
Binary file
Binary file
data/lib/babl.rb CHANGED
@@ -4,10 +4,15 @@ require 'base64'
4
4
 
5
5
  module Babl
6
6
  def self.bin_path
7
- bin = 'babl-rpc_'
8
- bin += "linux_amd64" if RUBY_PLATFORM =~ /linux/
9
- bin += "darwin_amd64" if RUBY_PLATFORM =~ /darwin/
10
- File.expand_path("../../bin/#{bin}", __FILE__)
7
+ system = `which babl-rpc`.strip
8
+ if system.empty?
9
+ bin = 'babl-rpc_'
10
+ bin += "linux_amd64" if RUBY_PLATFORM =~ /linux/
11
+ bin += "darwin_amd64" if RUBY_PLATFORM =~ /darwin/
12
+ File.expand_path("../../bin/#{bin}", __FILE__)
13
+ else
14
+ system
15
+ end
11
16
  end
12
17
 
13
18
  def self.version
@@ -15,13 +20,14 @@ module Babl
15
20
  end
16
21
 
17
22
  def self.client
23
+ puts "Using bin '#{bin_path}'"
18
24
  @client ||= Quartz::Client.new(bin_path: bin_path)
19
25
  end
20
26
 
21
27
  def self.module name, opts = {}
22
28
  params = {'Name' => name}
23
29
  if opts[:in]
24
- params['Stdin'] = Base64.encode64(opts[:in])
30
+ params['Stdin'] = Base64.encode64(opts[:in]).strip
25
31
  end
26
32
  if opts[:env]
27
33
  params['Env'] = opts[:env].inject({}) { |h, (k,v)| h[k.to_s] = v; h }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: babl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lars Kluge
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-12-08 00:00:00.000000000 Z
11
+ date: 2016-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: quartz
@@ -122,7 +122,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
122
122
  version: '0'
123
123
  requirements: []
124
124
  rubyforge_project:
125
- rubygems_version: 2.4.5.1
125
+ rubygems_version: 2.5.1
126
126
  signing_key:
127
127
  specification_version: 4
128
128
  summary: Access the Babl network