everdeen 0.1.1 → 0.2.0

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: 6677288f2a51c3f16bdf18bb6aaeb5a82ec1fb9c
4
- data.tar.gz: 09addd99b792834b89e11f965aff7b199ff8a5ef
3
+ metadata.gz: b99dee334fb5973e61cbaa2211700c82c7616983
4
+ data.tar.gz: 5c4023eb80a5690266d92bea1f6269b4c8cddd59
5
5
  SHA512:
6
- metadata.gz: 2fcd892082a9e8c1ed95422f40b546984607b6bdad12ef3c744cea456df64c2dcda21672213204e658b2c0afaff7b287b42c3fb716c62b5709234986ef17393e
7
- data.tar.gz: 611c205913160fbf2af3bcb1de59ca2b1397764a04e2a9d2b1eaf3329da17c10e0cd851f96b8ddba9b1d9321e23dd6e851e04ceb98a0e1c0d076df34a97238cb
6
+ metadata.gz: 8bbdaf60cd4790d036834f3b3312d3409e43293023f209baafd8c889ea8cd75f5995ff719bcac1b25755ab852e44d777c43f7a23bb8f0ec453d7d07a71d4198f
7
+ data.tar.gz: 244a804c43db4cb23199d29d60f8e22fb256462f8364bc4f7693274dd25564eaf947c153f93543cbe03577d48a2eb2f26432e5fbefa1b2410c4e52a9ee14d749
@@ -12,17 +12,24 @@ require 'everdeen/client'
12
12
  require 'everdeen/request'
13
13
 
14
14
  module Everdeen
15
- SUPPORTED_PLATFORMS = %w[x86_64-linux-gnu]
16
- BINARIES_DIR = File.expand_path('../../binaries', __FILE__)
15
+ BINARIES_DIR = File.expand_path('../../binaries', __FILE__)
17
16
 
18
17
  class UnsupportedPlatformError < StandardError
19
- def initialize
20
- super "Everdeen does not support this architecture: #{RUBY_PLATFORM}"
18
+ def initialize(platform)
19
+ super "Everdeen does not support this architecture (#{platform})"
21
20
  end
22
21
  end
23
22
 
24
23
  def self.bin_path
25
- raise UnsupportedPlatformError unless SUPPORTED_PLATFORMS.include? RUBY_PLATFORM
26
- File.join(BINARIES_DIR, "everdeen_#{Everdeen::SERVER_VERSION}_#{RUBY_PLATFORM}")
24
+ platform = `uname -sm`
25
+
26
+ platform_extension = case platform
27
+ when /^Darwin/ then 'darwin-amd64'
28
+ when /^Linux.*64/ then 'linux-amd64'
29
+ when /^Linux.*/ then 'linux-386'
30
+ else raise UnsupportedPlatformError, platform
31
+ end
32
+
33
+ File.join(BINARIES_DIR, "everdeen_#{SERVER_VERSION}_#{platform_extension}")
27
34
  end
28
35
  end
@@ -15,7 +15,7 @@ module Everdeen
15
15
  def initialize(opts = {})
16
16
  @proxy_port = opts.fetch(:proxy_port)
17
17
  @control_port = opts.fetch(:control_port)
18
- @stderr = opts.fetch(:stderr, Tempfile.new("everdeen"))
18
+ @stderr = opts.fetch(:stderr) { Tempfile.new("everdeen") }
19
19
  @ca_cert_path = opts.fetch(:ca_cert_path, nil)
20
20
  @ca_key_path = opts.fetch(:ca_key_path, nil)
21
21
  end
@@ -1,4 +1,4 @@
1
1
  module Everdeen
2
- VERSION = "0.1.1"
2
+ VERSION = "0.2.0"
3
3
  SERVER_VERSION = "0.1.0"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: everdeen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Upton
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2016-06-24 00:00:00.000000000 Z
12
+ date: 2016-06-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -70,7 +70,9 @@ files:
70
70
  - Rakefile
71
71
  - bin/console
72
72
  - bin/setup
73
- - binaries/everdeen_0.1.0_x86_64-linux-gnu
73
+ - binaries/everdeen_0.1.0_darwin-amd64
74
+ - binaries/everdeen_0.1.0_linux-386
75
+ - binaries/everdeen_0.1.0_linux-amd64
74
76
  - everdeen.gemspec
75
77
  - lib/everdeen.rb
76
78
  - lib/everdeen/client.rb