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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 80d003315bf5824c3353dd3ebd29e9ece7cd2bcd
4
- data.tar.gz: 93b0259479a5e8dfa5c71ad5b44729f53ce5d9a7
2
+ SHA256:
3
+ metadata.gz: 49028dfe96747f9e9597e498c53ed2ca72ff2d7af184d4823cc73679998c91c5
4
+ data.tar.gz: b0d1b5d1da91f2ee15c6f34f8a415fffe8d546e9bdf71c91cf39c38fb5905a52
5
5
  SHA512:
6
- metadata.gz: 693314e6cdddd0341a58fa51cd18c2e3fdce9e493889a5fc76383af6f8deee14c11abf5ffe0f6c85e3d5c4c75c0c5e135356076c92c316b53898ebb66c59d866
7
- data.tar.gz: 92eea0291ab3c39ea6bc7dde2e7c1c92395a2d1a76f5324fececd35d4bed2c7ebc4b1c709a94a314c579388693227fec08bec0c4d0fc8ecb91cd6c84ad73f654
6
+ metadata.gz: 51369b3960b21262523dd62b157cf22af3d8c634c2ef235dc7f67d5ade8443e2e22a52e71945b008ec78661d4fd217900e389ab93a883b1c8e900d5b6b913bea
7
+ data.tar.gz: 05feeba2d6047c508e9b6c9bb4efeb224940c779010c063bdf81e7ed76713261ccfff3d18f78eaae28af0e724a44c41ae1235a185719a7c7f734f1c8d245a06b
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 0.1.2
2
+
3
+ - Added support for HTTPS
4
+ - Added `open_timeout` and `read_timeout` options
5
+
1
6
  ## 0.1.1
2
7
 
3
8
  - Return columns in correct order
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
@@ -1,3 +1,3 @@
1
1
  class Drill
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
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.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
- bindir: exe
9
+ bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-24 00:00:00.000000000 Z
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
- - Rakefile
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: '0'
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.6.8
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
@@ -1,9 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /Gemfile.lock
4
- /_yardoc/
5
- /coverage/
6
- /doc/
7
- /pkg/
8
- /spec/reports/
9
- /tmp/
data/Gemfile DELETED
@@ -1,3 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec
data/Rakefile DELETED
@@ -1,11 +0,0 @@
1
- require "bundler/gem_tasks"
2
- require "rake/testtask"
3
-
4
- Rake::TestTask.new(:test) do |t|
5
- t.libs << "test"
6
- t.libs << "lib"
7
- t.test_files = FileList["test/**/*_test.rb"]
8
- t.warning = false
9
- end
10
-
11
- task default: :test
@@ -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
@@ -1 +0,0 @@
1
- require "drill"