drill-sergeant 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +5 -0
- data/README.md +8 -0
- data/lib/{drill.rb → drill-sergeant.rb} +4 -1
- data/lib/drill/version.rb +1 -1
- metadata +9 -14
- data/.gitignore +0 -9
- data/Gemfile +0 -3
- data/Rakefile +0 -11
- data/drill-sergeant.gemspec +0 -25
- data/lib/drill/sergeant.rb +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 49028dfe96747f9e9597e498c53ed2ca72ff2d7af184d4823cc73679998c91c5
|
4
|
+
data.tar.gz: b0d1b5d1da91f2ee15c6f34f8a415fffe8d546e9bdf71c91cf39c38fb5905a52
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51369b3960b21262523dd62b157cf22af3d8c634c2ef235dc7f67d5ade8443e2e22a52e71945b008ec78661d4fd217900e389ab93a883b1c8e900d5b6b913bea
|
7
|
+
data.tar.gz: 05feeba2d6047c508e9b6c9bb4efeb224940c779010c063bdf81e7ed76713261ccfff3d18f78eaae28af0e724a44c41ae1235a185719a7c7f734f1c8d245a06b
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -30,6 +30,14 @@ And query away
|
|
30
30
|
drill.query("SELECT * FROM dfs.`/path/to/some/file.csvh`")
|
31
31
|
```
|
32
32
|
|
33
|
+
## Reference
|
34
|
+
|
35
|
+
Set timeouts
|
36
|
+
|
37
|
+
```ruby
|
38
|
+
Drill.new(open_timeout: 5, read_timeout: 120)
|
39
|
+
```
|
40
|
+
|
33
41
|
## History
|
34
42
|
|
35
43
|
View the [changelog](https://github.com/ankane/drill-sergeant/blob/master/CHANGELOG.md)
|
@@ -10,11 +10,14 @@ class Drill
|
|
10
10
|
"Accept" => "application/json"
|
11
11
|
}
|
12
12
|
|
13
|
-
def initialize(url: nil)
|
13
|
+
def initialize(url: nil, open_timeout: 3, read_timeout: nil)
|
14
14
|
url ||= ENV["DRILL_URL"] || "http://localhost:8047"
|
15
15
|
# strip trailing slash if exists
|
16
16
|
@uri = URI.parse("#{url.sub(/\/\z/, "")}/query.json")
|
17
17
|
@http = Net::HTTP.new(@uri.host, @uri.port)
|
18
|
+
@http.use_ssl = true if @uri.scheme == "https"
|
19
|
+
@http.open_timeout = open_timeout if open_timeout
|
20
|
+
@http.read_timeout = read_timeout if read_timeout
|
18
21
|
end
|
19
22
|
|
20
23
|
def query(statement)
|
data/lib/drill/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: drill-sergeant
|
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
|
- Andrew Kane
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-07-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -53,23 +53,18 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
description:
|
56
|
-
email:
|
57
|
-
- andrew@chartkick.com
|
56
|
+
email: andrew@chartkick.com
|
58
57
|
executables: []
|
59
58
|
extensions: []
|
60
59
|
extra_rdoc_files: []
|
61
60
|
files:
|
62
|
-
- ".gitignore"
|
63
61
|
- CHANGELOG.md
|
64
|
-
- Gemfile
|
65
62
|
- README.md
|
66
|
-
-
|
67
|
-
- drill-sergeant.gemspec
|
68
|
-
- lib/drill.rb
|
69
|
-
- lib/drill/sergeant.rb
|
63
|
+
- lib/drill-sergeant.rb
|
70
64
|
- lib/drill/version.rb
|
71
65
|
homepage: https://github.com/ankane/drill-sergeant
|
72
|
-
licenses:
|
66
|
+
licenses:
|
67
|
+
- MIT
|
73
68
|
metadata: {}
|
74
69
|
post_install_message:
|
75
70
|
rdoc_options: []
|
@@ -79,7 +74,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
79
74
|
requirements:
|
80
75
|
- - ">="
|
81
76
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
77
|
+
version: '2.2'
|
83
78
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
84
79
|
requirements:
|
85
80
|
- - ">="
|
@@ -87,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
87
82
|
version: '0'
|
88
83
|
requirements: []
|
89
84
|
rubyforge_project:
|
90
|
-
rubygems_version: 2.
|
85
|
+
rubygems_version: 2.7.7
|
91
86
|
signing_key:
|
92
87
|
specification_version: 4
|
93
88
|
summary: Ruby client for Apache Drill
|
data/.gitignore
DELETED
data/Gemfile
DELETED
data/Rakefile
DELETED
data/drill-sergeant.gemspec
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
lib = File.expand_path("../lib", __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require "drill/version"
|
5
|
-
|
6
|
-
Gem::Specification.new do |spec|
|
7
|
-
spec.name = "drill-sergeant"
|
8
|
-
spec.version = Drill::VERSION
|
9
|
-
spec.authors = ["Andrew Kane"]
|
10
|
-
spec.email = ["andrew@chartkick.com"]
|
11
|
-
|
12
|
-
spec.summary = "Ruby client for Apache Drill"
|
13
|
-
spec.homepage = "https://github.com/ankane/drill-sergeant"
|
14
|
-
|
15
|
-
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
16
|
-
f.match(%r{^(test|spec|features)/})
|
17
|
-
end
|
18
|
-
spec.bindir = "exe"
|
19
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
|
-
spec.require_paths = ["lib"]
|
21
|
-
|
22
|
-
spec.add_development_dependency "bundler"
|
23
|
-
spec.add_development_dependency "rake"
|
24
|
-
spec.add_development_dependency "minitest"
|
25
|
-
end
|
data/lib/drill/sergeant.rb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
require "drill"
|