serf-td-agent 0.1.0 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/CHANGELOG.md +12 -0
- data/ext/serf-td-agent/extconf.rb +26 -6
- data/serf-td-agent.gemspec +2 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e4178df0cba89bdc39c46fe72ce29c333d400b36
|
4
|
+
data.tar.gz: 04f77bdb843c3813f2413f0b809c08b6b11ceeca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca074d0fb15ed2509a0a235da2757a0f3a171375e98125e907cd644ad8d561b44ec91565c6da2ec9fb5ef3ef502d9d325952590ce0b24d864730f3a91013c85d
|
7
|
+
data.tar.gz: 39092875c039c64611c315cced8cb6ef45e73463348af648e3ee2e6bb44fb88331d3fe35e379fe641b08f10e547989ceb9d039d3bbf42e183fc461e7929605d9
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -2,9 +2,29 @@ require 'mkmf'
|
|
2
2
|
# I actually do not need this, but it looks gem install requires Makefile anyway
|
3
3
|
create_makefile('serf-td-agent')
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
5
|
+
def http_download(uri, dest = nil)
|
6
|
+
require 'open-uri'
|
7
|
+
require 'openssl'
|
8
|
+
dest ||= File.basename(uri)
|
9
|
+
open(dest, 'wb') do |file|
|
10
|
+
open(uri, ssl_verify_mode: OpenSSL::SSL::VERIFY_NONE, redirect: true) do |data|
|
11
|
+
file.write(data.read)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
def unzip(zip_file, dest = '.')
|
17
|
+
require 'zip/zip'
|
18
|
+
Zip::ZipFile.open(zip_file) do |zip|
|
19
|
+
zip.each do |entry|
|
20
|
+
entry.restore_permissions = true
|
21
|
+
entry.extract("#{dest}/#{entry.to_s}") { true } # true to overwrite
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
# http://dl.bintray.com/mitchellh/serf/0.6.0_linux_amd64.zip
|
27
|
+
SERF_BASEURI="http://dl.bintray.com/mitchellh/serf"
|
8
28
|
SERF_VERSION="0.6.0"
|
9
29
|
|
10
30
|
os, arch = nil, nil
|
@@ -12,7 +32,7 @@ case RUBY_PLATFORM
|
|
12
32
|
when /linux/
|
13
33
|
os = 'linux'
|
14
34
|
when /darwin/
|
15
|
-
os = '
|
35
|
+
os = 'darwin'
|
16
36
|
when /mingw|win32/
|
17
37
|
os = 'windows'
|
18
38
|
when /freebsd/
|
@@ -28,5 +48,5 @@ when /arm/
|
|
28
48
|
end
|
29
49
|
|
30
50
|
zip_filename = "#{SERF_VERSION}_#{os}_#{arch}.zip"
|
31
|
-
|
32
|
-
|
51
|
+
http_download("#{SERF_BASEURI}/#{zip_filename}")
|
52
|
+
unzip(zip_filename, "#{File.expand_path('../../../bin', __FILE__)}")
|
data/serf-td-agent.gemspec
CHANGED
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "serf-td-agent"
|
6
|
-
s.version = "0.1.
|
6
|
+
s.version = "0.1.2"
|
7
7
|
s.authors = ["Naotoshi Seo"]
|
8
8
|
s.email = ["sonots@gmail.com"]
|
9
9
|
s.homepage = "http://github.com/sonots/serf-td-agent"
|
@@ -18,5 +18,6 @@ Gem::Specification.new do |s|
|
|
18
18
|
# s.require_paths = ["lib"]
|
19
19
|
|
20
20
|
s.add_runtime_dependency "gem-path", '~> 0'
|
21
|
+
s.add_runtime_dependency "rubyzip", '~> 0'
|
21
22
|
s.add_development_dependency "rake", '~> 0'
|
22
23
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: serf-td-agent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Naotoshi Seo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gem-path
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rubyzip
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: rake
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|