clickhouse 0.1.4 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.codeclimate.yml +22 -0
- data/.travis.yml +0 -2
- data/CHANGELOG.md +21 -0
- data/README.md +28 -1
- data/VERSION +1 -1
- data/bin/clickhouse +9 -0
- data/clickhouse.gemspec +7 -2
- data/lib/clickhouse.rb +7 -2
- data/lib/clickhouse/cli.rb +55 -0
- data/lib/clickhouse/cli/client.rb +149 -0
- data/lib/clickhouse/cli/console.rb +73 -0
- data/lib/clickhouse/cli/server.rb +36 -0
- data/lib/clickhouse/cli/server/assets/css/clickhouse.css +177 -0
- data/lib/clickhouse/cli/server/assets/css/codemirror.css +341 -0
- data/lib/clickhouse/cli/server/assets/css/datatables.css +1 -0
- data/lib/clickhouse/cli/server/assets/css/normalize.css +427 -0
- data/lib/clickhouse/cli/server/assets/css/skeleton.css +418 -0
- data/lib/clickhouse/cli/server/assets/js/clickhouse.js +188 -0
- data/lib/clickhouse/cli/server/assets/js/codemirror.js +9096 -0
- data/lib/clickhouse/cli/server/assets/js/datatables.js +166 -0
- data/lib/clickhouse/cli/server/assets/js/disableswipeback.js +97 -0
- data/lib/clickhouse/cli/server/assets/js/jquery.js +11015 -0
- data/lib/clickhouse/cli/server/assets/js/sql.js +232 -0
- data/lib/clickhouse/cli/server/views/index.erb +46 -0
- data/lib/clickhouse/cluster.rb +2 -1
- data/lib/clickhouse/connection.rb +2 -2
- data/lib/clickhouse/connection/client.rb +79 -10
- data/lib/clickhouse/connection/query.rb +7 -8
- data/lib/clickhouse/connection/query/result_set.rb +2 -0
- data/lib/clickhouse/utils.rb +23 -0
- data/lib/clickhouse/version.rb +1 -1
- data/test/unit/connection/test_client.rb +75 -10
- data/test/unit/connection/test_cluster.rb +1 -1
- data/test/unit/connection/test_logger.rb +3 -3
- data/test/unit/connection/test_query.rb +25 -23
- data/test/unit/test_utils.rb +39 -0
- metadata +86 -6
@@ -0,0 +1,23 @@
|
|
1
|
+
module Clickhouse
|
2
|
+
module Utils
|
3
|
+
extend self
|
4
|
+
|
5
|
+
def normalize_url(url)
|
6
|
+
if url.match(/^\w+:\/\//)
|
7
|
+
url
|
8
|
+
else
|
9
|
+
"#{Clickhouse::Connection::DEFAULT_CONFIG[:scheme]}://#{url}"
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
def extract_format(query)
|
14
|
+
format = nil
|
15
|
+
query = query.gsub(/ FORMAT (\w+)/i) do
|
16
|
+
format = $1
|
17
|
+
""
|
18
|
+
end
|
19
|
+
[query.strip, format]
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
end
|
data/lib/clickhouse/version.rb
CHANGED
@@ -11,6 +11,8 @@ module Unit
|
|
11
11
|
describe Clickhouse::Connection::Client do
|
12
12
|
before do
|
13
13
|
@connection = Connection.new
|
14
|
+
@connection.stubs(:parse_stats)
|
15
|
+
@connection.stubs(:write_log)
|
14
16
|
end
|
15
17
|
|
16
18
|
describe "#connect!" do
|
@@ -60,18 +62,18 @@ module Unit
|
|
60
62
|
describe "#get" do
|
61
63
|
it "sends a GET request the server" do
|
62
64
|
@connection.instance_variable_set :@client, (client = mock)
|
63
|
-
client.expects(:get).with("/?query=foo", nil).returns(stub(:status => 200, :body => ""))
|
65
|
+
client.expects(:get).with("/?query=foo&output_format_write_statistics=1", nil).returns(stub(:status => 200, :body => ""))
|
64
66
|
@connection.stubs(:log)
|
65
|
-
@connection.get(
|
67
|
+
@connection.get("foo")
|
66
68
|
end
|
67
69
|
end
|
68
70
|
|
69
71
|
describe "#post" do
|
70
72
|
it "sends a POST request the server" do
|
71
73
|
@connection.instance_variable_set :@client, (client = mock)
|
72
|
-
client.expects(:post).with("/?query=foo", "body").returns(stub(:status => 200, :body => ""))
|
74
|
+
client.expects(:post).with("/?query=foo&output_format_write_statistics=1", "body").returns(stub(:status => 200, :body => ""))
|
73
75
|
@connection.stubs(:log)
|
74
|
-
@connection.post(
|
76
|
+
@connection.post("foo", "body")
|
75
77
|
end
|
76
78
|
end
|
77
79
|
|
@@ -89,14 +91,15 @@ module Unit
|
|
89
91
|
|
90
92
|
it "queries the server returning the response" do
|
91
93
|
@connection.instance_variable_set :@client, (client = mock)
|
92
|
-
client.expects(:get).with("/?query=SELECT+1", nil).returns(
|
93
|
-
|
94
|
+
client.expects(:get).with("/?query=SELECT+1&output_format_write_statistics=1", nil).returns(stub(:status => 200, :body => ""))
|
95
|
+
@connection.expects(:parse_body).returns(data = mock)
|
96
|
+
assert_equal data, @connection.send(:request, :get, "SELECT 1")
|
94
97
|
end
|
95
98
|
|
96
99
|
describe "when not receiving status 200" do
|
97
100
|
it "raises a Clickhouse::QueryError" do
|
98
101
|
@connection.instance_variable_set :@client, (client = mock)
|
99
|
-
client.expects(:get).with("/?query=SELECT+1", nil).returns(stub(:status => 500, :body => ""))
|
102
|
+
client.expects(:get).with("/?query=SELECT+1&output_format_write_statistics=1", nil).returns(stub(:status => 500, :body => ""))
|
100
103
|
assert_raises Clickhouse::QueryError do
|
101
104
|
@connection.send(:request, :get, "SELECT 1")
|
102
105
|
end
|
@@ -112,16 +115,25 @@ module Unit
|
|
112
115
|
end
|
113
116
|
end
|
114
117
|
end
|
118
|
+
|
119
|
+
it "parses the body" do
|
120
|
+
json = <<-JSON
|
121
|
+
{"meta": []}
|
122
|
+
JSON
|
123
|
+
@connection.instance_variable_set :@client, (client = mock)
|
124
|
+
client.expects(:get).with("/?query=SELECT+1+FORMAT+JSONCompact&output_format_write_statistics=1", nil).returns(stub(:status => 200, :body => json))
|
125
|
+
assert_equal({"meta" => []}, @connection.send(:request, :get, "SELECT 1 FORMAT JSONCompact"))
|
126
|
+
end
|
115
127
|
end
|
116
128
|
|
117
129
|
describe "configuration" do
|
118
130
|
describe "database" do
|
119
131
|
it "includes the database in the querystring" do
|
120
|
-
@connection.expects(:log)
|
121
132
|
@connection.instance_variable_get(:@config)[:database] = "system"
|
122
133
|
@connection.instance_variable_set(:@client, (client = mock))
|
123
|
-
client.expects(:get).with("/?database=system&query=SELECT+1", nil).returns(
|
124
|
-
|
134
|
+
client.expects(:get).with("/?database=system&query=SELECT+1&output_format_write_statistics=1", nil).returns(stub(:status => 200, :body => ""))
|
135
|
+
@connection.expects(:parse_body).returns(data = mock)
|
136
|
+
assert_equal data, @connection.send(:request, :get, "SELECT 1")
|
125
137
|
end
|
126
138
|
end
|
127
139
|
|
@@ -134,6 +146,59 @@ module Unit
|
|
134
146
|
end
|
135
147
|
end
|
136
148
|
end
|
149
|
+
|
150
|
+
describe "statistics" do
|
151
|
+
before do
|
152
|
+
@connection = Connection.new
|
153
|
+
@json = <<-JSON
|
154
|
+
{
|
155
|
+
"rows": 1947,
|
156
|
+
"statistics": {
|
157
|
+
"elapsed": 0.1882,
|
158
|
+
"rows_read": 1982,
|
159
|
+
"bytes_read": 2003
|
160
|
+
}
|
161
|
+
}
|
162
|
+
JSON
|
163
|
+
end
|
164
|
+
|
165
|
+
it "parses the statistics" do
|
166
|
+
@connection.stubs(:log)
|
167
|
+
@connection.instance_variable_set :@client, (client = mock)
|
168
|
+
Time.expects(:now).returns(1882).twice
|
169
|
+
|
170
|
+
client.expects(:get).with("/?query=SELECT+1+FORMAT+JSONCompact&output_format_write_statistics=1", nil).returns(stub(:status => 200, :body => @json))
|
171
|
+
@connection.expects(:write_log).with(
|
172
|
+
0, "SELECT 1", {
|
173
|
+
"elapsed" => "188.2ms",
|
174
|
+
"rows_read" => "1.98 thousand",
|
175
|
+
"bytes_read" => 2003,
|
176
|
+
"rows" => 1947,
|
177
|
+
"rows_per_second" => "10.53 thousand",
|
178
|
+
"data_per_second" => "10.39 KB",
|
179
|
+
"data_read" => "1.96 KB"
|
180
|
+
}
|
181
|
+
)
|
182
|
+
@connection.send(:request, :get, "SELECT 1 FORMAT JSONCompact")
|
183
|
+
end
|
184
|
+
|
185
|
+
it "write the expected logs" do
|
186
|
+
@connection.instance_variable_set :@client, (client = mock)
|
187
|
+
Time.expects(:now).returns(1882).twice
|
188
|
+
|
189
|
+
client.expects(:get).with("/?query=SELECT+1+FORMAT+JSONCompact&output_format_write_statistics=1", nil).returns(stub(:status => 200, :body => @json))
|
190
|
+
log = "\n \e[1m\e[35mSQL (0.0ms)\e\e[0m SELECT 1;\e\n \e[1m\e[36m1947 rows in set. Elapsed: 188.2ms. Processed: 1.98 thousand rows, 1.96 KB (10.53 thousand rows/s, 10.39 KB/s)\e[0m "
|
191
|
+
|
192
|
+
@connection.expects(:log).with(:debug, log)
|
193
|
+
@connection.send(:request, :get, "SELECT 1 FORMAT JSONCompact")
|
194
|
+
end
|
195
|
+
|
196
|
+
describe "#number_to_human_duration" do
|
197
|
+
it "returns in seconds when more than 1 seconds" do
|
198
|
+
assert_equal "2.0s", @connection.send(:number_to_human_duration, 2)
|
199
|
+
end
|
200
|
+
end
|
201
|
+
end
|
137
202
|
end
|
138
203
|
|
139
204
|
end
|
@@ -13,7 +13,7 @@ module Unit
|
|
13
13
|
it "does not modify the passed config" do
|
14
14
|
config = {:urls => %w(localhost:1234 localhost:1235 localhost:1236)}
|
15
15
|
Clickhouse::Cluster.new config
|
16
|
-
assert_equal({:urls => %w(localhost:1234 localhost:1235 localhost:1236)}, config)
|
16
|
+
assert_equal({:urls => %w(http://localhost:1234 http://localhost:1235 http://localhost:1236)}, config)
|
17
17
|
end
|
18
18
|
|
19
19
|
describe "when connection succeeds" do
|
@@ -16,15 +16,15 @@ module Unit
|
|
16
16
|
describe "#log" do
|
17
17
|
describe "when having specified a logger" do
|
18
18
|
it "delegates to logger" do
|
19
|
-
(logger = mock).expects(:
|
19
|
+
(logger = mock).expects(:debug, "Hello world!")
|
20
20
|
Clickhouse.expects(:logger).returns(logger).twice
|
21
|
-
@connection.send(:log, :
|
21
|
+
@connection.send(:log, :debug, "Hello world!")
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
25
25
|
describe "when not having specified a logger" do
|
26
26
|
it "does nothing" do
|
27
|
-
assert_nil @connection.send(:log, :
|
27
|
+
assert_nil @connection.send(:log, :debug, "Boo!")
|
28
28
|
end
|
29
29
|
end
|
30
30
|
end
|
@@ -12,17 +12,19 @@ module Unit
|
|
12
12
|
describe Clickhouse::Connection::Query do
|
13
13
|
before do
|
14
14
|
@connection = Connection.new
|
15
|
+
@connection.stubs(:parse_stats)
|
16
|
+
@connection.stubs(:write_log)
|
15
17
|
end
|
16
18
|
|
17
19
|
describe "#execute" do
|
18
20
|
it "sends a POST request" do
|
19
|
-
@connection.expects(:post).with("sql", nil).returns(
|
21
|
+
@connection.expects(:post).with("sql", nil).returns("")
|
20
22
|
assert_equal true, @connection.execute("sql")
|
21
23
|
end
|
22
24
|
|
23
25
|
describe "when server returns a non-empty body" do
|
24
26
|
it "returns the body of the response" do
|
25
|
-
@connection.expects(:post).with("sql", "body").returns(
|
27
|
+
@connection.expects(:post).with("sql", "body").returns("Ok.")
|
26
28
|
assert_equal "Ok.", @connection.execute("sql", "body")
|
27
29
|
end
|
28
30
|
end
|
@@ -30,24 +32,24 @@ module Unit
|
|
30
32
|
|
31
33
|
describe "#query" do
|
32
34
|
it "sends a GET request requesting a TSV response including names and types" do
|
33
|
-
@connection.expects(:get).with("sql FORMAT JSONCompact")
|
34
|
-
@connection.stubs(:
|
35
|
+
@connection.expects(:get).with("sql FORMAT JSONCompact")
|
36
|
+
@connection.stubs(:parse_data)
|
35
37
|
assert_equal [], @connection.query("sql").to_a
|
36
38
|
end
|
37
39
|
end
|
38
40
|
|
39
41
|
describe "#databases" do
|
40
42
|
it "sends a 'SHOW DATABASES' query" do
|
41
|
-
@connection.expects(:get).with("SHOW DATABASES FORMAT JSONCompact")
|
42
|
-
@connection.stubs(:
|
43
|
-
@connection.databases
|
43
|
+
@connection.expects(:get).with("SHOW DATABASES FORMAT JSONCompact")
|
44
|
+
@connection.stubs(:parse_data).returns([])
|
45
|
+
assert_equal [], @connection.databases
|
44
46
|
end
|
45
47
|
end
|
46
48
|
|
47
49
|
describe "#tables" do
|
48
50
|
it "sends a 'SHOW TABLES' query" do
|
49
|
-
@connection.expects(:get).with("SHOW TABLES FORMAT JSONCompact")
|
50
|
-
@connection.stubs(:
|
51
|
+
@connection.expects(:get).with("SHOW TABLES FORMAT JSONCompact")
|
52
|
+
@connection.stubs(:parse_data).returns([])
|
51
53
|
@connection.tables
|
52
54
|
end
|
53
55
|
end
|
@@ -65,7 +67,7 @@ CREATE TABLE logs_test (
|
|
65
67
|
)
|
66
68
|
ENGINE = MergeTree(date, 8192)
|
67
69
|
SQL
|
68
|
-
@connection.expects(:post).with(sql.strip, nil).returns(
|
70
|
+
@connection.expects(:post).with(sql.strip, nil).returns("")
|
69
71
|
@connection.create_table("logs_test") do |t|
|
70
72
|
t.uint8 :id
|
71
73
|
t.float32 :price
|
@@ -80,8 +82,8 @@ ENGINE = MergeTree(date, 8192)
|
|
80
82
|
|
81
83
|
describe "#describe_table" do
|
82
84
|
it "sends a 'DESCRIBE TABLE <name>' query" do
|
83
|
-
@connection.expects(:get).with("DESCRIBE TABLE logs FORMAT JSONCompact")
|
84
|
-
@connection.stubs(:
|
85
|
+
@connection.expects(:get).with("DESCRIBE TABLE logs FORMAT JSONCompact")
|
86
|
+
@connection.stubs(:parse_data)
|
85
87
|
@connection.describe_table("logs")
|
86
88
|
end
|
87
89
|
end
|
@@ -89,7 +91,7 @@ ENGINE = MergeTree(date, 8192)
|
|
89
91
|
describe "#rename_table" do
|
90
92
|
describe "when passing an array with an even number of names" do
|
91
93
|
it "sends a POST request containing a RENAME TABLE statement" do
|
92
|
-
@connection.expects(:post).with("RENAME TABLE foo TO bar, baz TO qux", nil).returns(
|
94
|
+
@connection.expects(:post).with("RENAME TABLE foo TO bar, baz TO qux", nil).returns("").twice
|
93
95
|
assert_equal true, @connection.rename_table("foo", "bar", "baz", "qux")
|
94
96
|
assert_equal true, @connection.rename_table(["foo", "bar"], ["baz", "qux"])
|
95
97
|
end
|
@@ -108,7 +110,7 @@ ENGINE = MergeTree(date, 8192)
|
|
108
110
|
|
109
111
|
describe "when passing a hash" do
|
110
112
|
it "sends a POST request containing a RENAME TABLE statement" do
|
111
|
-
@connection.expects(:post).with("RENAME TABLE foo TO bar, baz TO qux", nil).returns(
|
113
|
+
@connection.expects(:post).with("RENAME TABLE foo TO bar, baz TO qux", nil).returns("")
|
112
114
|
assert_equal true, @connection.rename_table(:foo => "bar", :baz => "qux")
|
113
115
|
end
|
114
116
|
end
|
@@ -116,7 +118,7 @@ ENGINE = MergeTree(date, 8192)
|
|
116
118
|
|
117
119
|
describe "#drop_table" do
|
118
120
|
it "sends a POST request containing a 'DROP TABLE' statement" do
|
119
|
-
@connection.expects(:post).with("DROP TABLE logs", nil).returns(
|
121
|
+
@connection.expects(:post).with("DROP TABLE logs", nil).returns("")
|
120
122
|
assert_equal true, @connection.drop_table("logs")
|
121
123
|
end
|
122
124
|
end
|
@@ -133,7 +135,7 @@ ENGINE = MergeTree(date, 8192)
|
|
133
135
|
|
134
136
|
describe "when using hashes" do
|
135
137
|
it "sends a POST request containing a 'INSERT INTO' statement using CSV" do
|
136
|
-
@connection.expects(:post).with("INSERT INTO logs FORMAT CSVWithNames", @csv).returns(
|
138
|
+
@connection.expects(:post).with("INSERT INTO logs FORMAT CSVWithNames", @csv).returns("")
|
137
139
|
assert_equal true, @connection.insert_rows("logs") { |rows|
|
138
140
|
rows << {:id => 12345, :first_name => "Paul", :last_name => "Engel"}
|
139
141
|
rows << {:id => 67890, :first_name => "Bruce", :last_name => "Wayne"}
|
@@ -143,7 +145,7 @@ ENGINE = MergeTree(date, 8192)
|
|
143
145
|
|
144
146
|
describe "when using arrays" do
|
145
147
|
it "sends a POST request containing a 'INSERT INTO' statement using CSV" do
|
146
|
-
@connection.expects(:post).with("INSERT INTO logs FORMAT CSVWithNames", @csv).returns(
|
148
|
+
@connection.expects(:post).with("INSERT INTO logs FORMAT CSVWithNames", @csv).returns("")
|
147
149
|
assert_equal true, @connection.insert_rows("logs", :names => %w(id first_name last_name)) { |rows|
|
148
150
|
rows << [12345, "Paul", "Engel"]
|
149
151
|
rows << [67890, "Bruce", "Wayne"]
|
@@ -167,8 +169,8 @@ ENGINE = MergeTree(date, 8192)
|
|
167
169
|
}
|
168
170
|
JAVASCRIPT
|
169
171
|
|
170
|
-
@connection.expects(:to_select_query).with(options = {:from => "logs"})
|
171
|
-
@connection.expects(:get).returns(
|
172
|
+
@connection.expects(:to_select_query).with(options = {:from => "logs"}).returns("")
|
173
|
+
@connection.expects(:get).returns(JSON.parse(body))
|
172
174
|
|
173
175
|
assert_equal [
|
174
176
|
[1982, "Paul"],
|
@@ -187,9 +189,9 @@ ENGINE = MergeTree(date, 8192)
|
|
187
189
|
describe "#select_values" do
|
188
190
|
describe "when empty result set" do
|
189
191
|
it "returns an empty array" do
|
190
|
-
@connection.expects(:to_select_query)
|
192
|
+
@connection.expects(:to_select_query).returns("")
|
191
193
|
@connection.expects(:get).returns(stub(:body => ""))
|
192
|
-
@connection.stubs(:
|
194
|
+
@connection.stubs(:parse_data).returns([])
|
193
195
|
assert_equal [], @connection.select_values({})
|
194
196
|
end
|
195
197
|
end
|
@@ -209,8 +211,8 @@ ENGINE = MergeTree(date, 8192)
|
|
209
211
|
}
|
210
212
|
JAVASCRIPT
|
211
213
|
|
212
|
-
@connection.expects(:to_select_query)
|
213
|
-
@connection.expects(:get).returns(
|
214
|
+
@connection.expects(:to_select_query).returns("")
|
215
|
+
@connection.expects(:get).returns(JSON.parse(body))
|
214
216
|
assert_equal [
|
215
217
|
1982,
|
216
218
|
1947
|
@@ -0,0 +1,39 @@
|
|
1
|
+
require_relative "../test_helper"
|
2
|
+
|
3
|
+
module Unit
|
4
|
+
class TestUtils < MiniTest::Test
|
5
|
+
|
6
|
+
describe Clickhouse::Utils do
|
7
|
+
describe ".normalize_url" do
|
8
|
+
describe "when passing scheme" do
|
9
|
+
it "returns the passed url" do
|
10
|
+
assert_equal "paul://engel", Clickhouse::Utils.normalize_url("paul://engel")
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
describe "when not passing scheme" do
|
15
|
+
it "prepends the default scheme" do
|
16
|
+
assert_equal "http://engel", Clickhouse::Utils.normalize_url("engel")
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
describe ".extract_format" do
|
22
|
+
describe "when not having a format" do
|
23
|
+
it "returns the query and nil as format" do
|
24
|
+
assert_equal ["SELECT 1", nil], Clickhouse::Utils.extract_format("SELECT 1")
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
it "strips the query" do
|
29
|
+
assert_equal ["SELECT 1", nil], Clickhouse::Utils.extract_format("SELECT 1 ")
|
30
|
+
end
|
31
|
+
|
32
|
+
it "extracts the format from the query" do
|
33
|
+
assert_equal ["SELECT 1", "SomeFormat"], Clickhouse::Utils.extract_format("SELECT 1 FORMAT SomeFormat")
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
end
|
39
|
+
end
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clickhouse
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Engel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 1.13.4
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 1.13.4
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: faraday
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -38,6 +52,48 @@ dependencies:
|
|
38
52
|
- - ">="
|
39
53
|
- !ruby/object:Gem::Version
|
40
54
|
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: activesupport
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 4.1.8
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 4.1.8
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: thor
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: launchy
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
41
97
|
- !ruby/object:Gem::Dependency
|
42
98
|
name: rake
|
43
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -136,13 +192,16 @@ dependencies:
|
|
136
192
|
- - ">="
|
137
193
|
- !ruby/object:Gem::Version
|
138
194
|
version: '0'
|
139
|
-
description: A Ruby database driver for ClickHouse
|
195
|
+
description: A Ruby database driver for ClickHouse (also Clickhouse CLI and web GUI
|
196
|
+
included)
|
140
197
|
email:
|
141
198
|
- pm_engel@icloud.com
|
142
|
-
executables:
|
199
|
+
executables:
|
200
|
+
- clickhouse
|
143
201
|
extensions: []
|
144
202
|
extra_rdoc_files: []
|
145
203
|
files:
|
204
|
+
- ".codeclimate.yml"
|
146
205
|
- ".gitignore"
|
147
206
|
- ".travis.yml"
|
148
207
|
- CHANGELOG.md
|
@@ -151,8 +210,25 @@ files:
|
|
151
210
|
- README.md
|
152
211
|
- Rakefile
|
153
212
|
- VERSION
|
213
|
+
- bin/clickhouse
|
154
214
|
- clickhouse.gemspec
|
155
215
|
- lib/clickhouse.rb
|
216
|
+
- lib/clickhouse/cli.rb
|
217
|
+
- lib/clickhouse/cli/client.rb
|
218
|
+
- lib/clickhouse/cli/console.rb
|
219
|
+
- lib/clickhouse/cli/server.rb
|
220
|
+
- lib/clickhouse/cli/server/assets/css/clickhouse.css
|
221
|
+
- lib/clickhouse/cli/server/assets/css/codemirror.css
|
222
|
+
- lib/clickhouse/cli/server/assets/css/datatables.css
|
223
|
+
- lib/clickhouse/cli/server/assets/css/normalize.css
|
224
|
+
- lib/clickhouse/cli/server/assets/css/skeleton.css
|
225
|
+
- lib/clickhouse/cli/server/assets/js/clickhouse.js
|
226
|
+
- lib/clickhouse/cli/server/assets/js/codemirror.js
|
227
|
+
- lib/clickhouse/cli/server/assets/js/datatables.js
|
228
|
+
- lib/clickhouse/cli/server/assets/js/disableswipeback.js
|
229
|
+
- lib/clickhouse/cli/server/assets/js/jquery.js
|
230
|
+
- lib/clickhouse/cli/server/assets/js/sql.js
|
231
|
+
- lib/clickhouse/cli/server/views/index.erb
|
156
232
|
- lib/clickhouse/cluster.rb
|
157
233
|
- lib/clickhouse/connection.rb
|
158
234
|
- lib/clickhouse/connection/client.rb
|
@@ -162,6 +238,7 @@ files:
|
|
162
238
|
- lib/clickhouse/connection/query/result_set.rb
|
163
239
|
- lib/clickhouse/connection/query/table.rb
|
164
240
|
- lib/clickhouse/error.rb
|
241
|
+
- lib/clickhouse/utils.rb
|
165
242
|
- lib/clickhouse/version.rb
|
166
243
|
- script/console
|
167
244
|
- test/test_helper.rb
|
@@ -177,8 +254,10 @@ files:
|
|
177
254
|
- test/unit/connection/test_query.rb
|
178
255
|
- test/unit/test_clickhouse.rb
|
179
256
|
- test/unit/test_connection.rb
|
257
|
+
- test/unit/test_utils.rb
|
180
258
|
homepage: https://github.com/archan937/clickhouse
|
181
|
-
licenses:
|
259
|
+
licenses:
|
260
|
+
- MIT
|
182
261
|
metadata: {}
|
183
262
|
post_install_message:
|
184
263
|
rdoc_options: []
|
@@ -199,7 +278,7 @@ rubyforge_project:
|
|
199
278
|
rubygems_version: 2.4.5.1
|
200
279
|
signing_key:
|
201
280
|
specification_version: 4
|
202
|
-
summary: A Ruby database driver for ClickHouse
|
281
|
+
summary: A Ruby database driver for ClickHouse (also Clickhouse CLI and web GUI included)
|
203
282
|
test_files:
|
204
283
|
- test/test_helper.rb
|
205
284
|
- test/test_helper/coverage.rb
|
@@ -214,3 +293,4 @@ test_files:
|
|
214
293
|
- test/unit/connection/test_query.rb
|
215
294
|
- test/unit/test_clickhouse.rb
|
216
295
|
- test/unit/test_connection.rb
|
296
|
+
- test/unit/test_utils.rb
|