ch-client 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +7 -0
  2. data/.codeclimate.yml +22 -0
  3. data/.gitignore +9 -0
  4. data/.travis.yml +3 -0
  5. data/CHANGELOG.md +58 -0
  6. data/Gemfile +3 -0
  7. data/MIT-LICENSE +20 -0
  8. data/README.md +262 -0
  9. data/Rakefile +15 -0
  10. data/VERSION +1 -0
  11. data/bin/clickhouse +9 -0
  12. data/clickhouse.gemspec +36 -0
  13. data/lib/clickhouse.rb +60 -0
  14. data/lib/clickhouse/cli.rb +46 -0
  15. data/lib/clickhouse/cli/client.rb +149 -0
  16. data/lib/clickhouse/cli/console.rb +73 -0
  17. data/lib/clickhouse/cli/server.rb +37 -0
  18. data/lib/clickhouse/cli/server/assets/css/clickhouse.css +177 -0
  19. data/lib/clickhouse/cli/server/assets/css/codemirror.css +341 -0
  20. data/lib/clickhouse/cli/server/assets/css/datatables.css +1 -0
  21. data/lib/clickhouse/cli/server/assets/css/normalize.css +427 -0
  22. data/lib/clickhouse/cli/server/assets/css/skeleton.css +418 -0
  23. data/lib/clickhouse/cli/server/assets/js/clickhouse.js +188 -0
  24. data/lib/clickhouse/cli/server/assets/js/codemirror.js +9096 -0
  25. data/lib/clickhouse/cli/server/assets/js/datatables.js +166 -0
  26. data/lib/clickhouse/cli/server/assets/js/disableswipeback.js +97 -0
  27. data/lib/clickhouse/cli/server/assets/js/jquery.js +11015 -0
  28. data/lib/clickhouse/cli/server/assets/js/sql.js +232 -0
  29. data/lib/clickhouse/cli/server/views/index.erb +46 -0
  30. data/lib/clickhouse/cluster.rb +43 -0
  31. data/lib/clickhouse/connection.rb +42 -0
  32. data/lib/clickhouse/connection/client.rb +135 -0
  33. data/lib/clickhouse/connection/logger.rb +12 -0
  34. data/lib/clickhouse/connection/query.rb +160 -0
  35. data/lib/clickhouse/connection/query/result_row.rb +36 -0
  36. data/lib/clickhouse/connection/query/result_set.rb +103 -0
  37. data/lib/clickhouse/connection/query/table.rb +50 -0
  38. data/lib/clickhouse/error.rb +18 -0
  39. data/lib/clickhouse/utils.rb +23 -0
  40. data/lib/clickhouse/version.rb +7 -0
  41. data/script/console +58 -0
  42. data/test/test_helper.rb +15 -0
  43. data/test/test_helper/coverage.rb +16 -0
  44. data/test/test_helper/minitest.rb +13 -0
  45. data/test/test_helper/simple_connection.rb +12 -0
  46. data/test/unit/connection/query/test_result_row.rb +36 -0
  47. data/test/unit/connection/query/test_result_set.rb +196 -0
  48. data/test/unit/connection/query/test_table.rb +39 -0
  49. data/test/unit/connection/test_client.rb +206 -0
  50. data/test/unit/connection/test_cluster.rb +81 -0
  51. data/test/unit/connection/test_logger.rb +35 -0
  52. data/test/unit/connection/test_query.rb +410 -0
  53. data/test/unit/test_clickhouse.rb +99 -0
  54. data/test/unit/test_connection.rb +55 -0
  55. data/test/unit/test_utils.rb +39 -0
  56. metadata +326 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 88c47c122ba0d7fb7ebcdfc89d4b65b7d106a53b
4
+ data.tar.gz: 15e1fdc1fe5b55c58239a54e6c693be2e0c85bfd
5
+ SHA512:
6
+ metadata.gz: f461ecaede2a1753d2da2d65a87ff2749659a0b30cdc0f1fb4604acc4d98c35117b703728b36ee5415be15f246b6c4175e0938502e5e628c71c4271c97a1ec82
7
+ data.tar.gz: 2a1cbe3419d5a2c9cbfc42d0c8305f3947aa15243f3589d1abae106abf912a1f96aef59db76b89d85700299a940576135feefefcb9604b1f248bd14a002a1a94
@@ -0,0 +1,22 @@
1
+ ---
2
+ engines:
3
+ csslint:
4
+ enabled: false
5
+ duplication:
6
+ enabled: true
7
+ config:
8
+ languages:
9
+ - ruby
10
+ eslint:
11
+ enabled: true
12
+ fixme:
13
+ enabled: true
14
+ rubocop:
15
+ enabled: true
16
+ ratings:
17
+ paths:
18
+ - "**.rb"
19
+ exclude_paths:
20
+ - lib/clickhouse/cli/
21
+ - script/
22
+ - test/
@@ -0,0 +1,9 @@
1
+ .DS_Store
2
+ .bundle
3
+ .env
4
+ .rvmrc
5
+ Gemfile.lock
6
+ coverage
7
+ doc
8
+ pkg
9
+ test/coverage
@@ -0,0 +1,3 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.3.1
@@ -0,0 +1,58 @@
1
+ ## Clickhouse CHANGELOG
2
+
3
+ ### Version 0.1.10 (January 13, 2017)
4
+
5
+ * Fixed `erubis` dependency once and for all
6
+
7
+ ### Version 0.1.9 (December 9, 2016)
8
+
9
+ * Added gem dependencies `sinatra` and `erubis` because excluding on purpose them did not really make sense
10
+
11
+ ### Version 0.1.8 (November 6, 2016)
12
+
13
+ * Fixed loading URLs in GUI
14
+
15
+ ### Version 0.1.7 (November 6, 2016) [YANKED]
16
+
17
+ * Corrected interpolating nested patterns
18
+ * Only upcasing whole (preserved) words
19
+
20
+ ### Version 0.1.6 (November 5, 2016) [YANKED]
21
+
22
+ * Improved clickhouse console and server
23
+ * Using Bundler >= 1.13.4
24
+ * Changed cluster timeout to 5 seconds
25
+
26
+ ### Version 0.1.5 (November 4, 2016) [YANKED]
27
+
28
+ * Added command line interface `clickhouse c`
29
+ * Being able to start a Sinatra based Clickhouse client using `clickhouse s`
30
+ * Using :debug to log queries
31
+
32
+ ### Version 0.1.4 (October 25, 2016)
33
+
34
+ * Ensured that Clickhouse does not modify the passed cluster config
35
+ * Introduced Clickhouse#connect which returns either a cluster or connection without memoizing it as Clickhouse#connection
36
+
37
+ ### Version 0.1.3 (October 21, 2016)
38
+
39
+ * Only removing connections from cluster connection pool after a Clickhouse::ConnectionError
40
+
41
+ ### Version 0.1.2 (October 20, 2016)
42
+
43
+ * Being able to specify a URL
44
+ * Raising a Clickhouse::ConnectionError when getting a Faraday::Error
45
+ * Made Clickhouse::Connection::Client#ping! public
46
+ * Supporting cluster connections using Pond (thanks @chanks)
47
+
48
+ ### Version 0.1.1 (October 19, 2016)
49
+
50
+ * Using the JSONCompact format as query output which does not brake when having a JSON string within the data
51
+ * Ensuring that Clickhouse::Connection::Query#count return an integer
52
+ * Made Clickhouse::Connection::Query#to_select_query public
53
+ * Being able to pass strings as :where or :having option
54
+ * Being able to symbolize the row to hash parsing
55
+
56
+ ### Version 0.1.0 (October 18, 2016)
57
+
58
+ * Initial release
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2016 Paul Engel
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,262 @@
1
+ # Clickhouse [![Build Status](https://travis-ci.org/archan937/clickhouse.svg?branch=master)](https://travis-ci.org/archan937/clickhouse) [![Code Climate](https://codeclimate.com/github/archan937/clickhouse/badges/gpa.svg)](https://codeclimate.com/github/archan937/clickhouse) [![Test Coverage](https://codeclimate.com/github/archan937/clickhouse/badges/coverage.svg)](https://codeclimate.com/github/archan937/clickhouse/coverage) [![Gem](https://img.shields.io/gem/v/clickhouse.svg)](https://rubygems.org/gems/clickhouse) [![Gem](https://img.shields.io/gem/dt/clickhouse.svg)](https://rubygems.org/gems/clickhouse)
2
+
3
+ A Ruby database driver for ClickHouse (also Clickhouse CLI and web GUI included).
4
+
5
+ ## Introduction
6
+
7
+ [ClickHouse](https://clickhouse.yandex) is a high-performance column-oriented database management system developed by [Yandex](https://yandex.com/company) which operates Russia's most popular search engine.
8
+
9
+ > ClickHouse manages extremely large volumes of data in a stable and sustainable manner. It currently powers Yandex.Metrica, world’s second largest web analytics platform, with over 13 trillion database records and over 20 billion events a day, generating customized reports on-the-fly, directly from non-aggregated data. This system was successfully implemented at CERN’s LHCb experiment to store and process metadata on 10bn events with over 1000 attributes per event registered in 2011.
10
+
11
+ On June 15th 2016, [Yandex open-sourced their awesome project](https://news.ycombinator.com/item?id=11908254) giving the community a [powerful asset](https://clickhouse.yandex/benchmark.html) which can compete with the big players like [Google BigQuery](https://cloud.google.com/bigquery/) and [Amazon Redshift](http://docs.aws.amazon.com/redshift/latest/mgmt/welcome.html) with an important advantage: the client can use ClickHouse in its infrastructure and does not have to pay for the cloud ([read more](https://translate.google.com/translate?sl=ru&tl=en&js=y&prev=_t&hl=en&ie=UTF-8&u=https://habrahabr.ru/company/yandex/blog/303282/)).
12
+
13
+ ![Using the Sinatra-based Clickhouse client web GUI](http://res.cloudinary.com/archan937/video/upload/c_scale,q_100,vc_h264:high,w_800/v1478425941/clickhouse.gif)
14
+
15
+ ### Why use the HTTP interface and not the TCP interface?
16
+
17
+ Well, the developers of ClickHouse themselves [discourage](https://github.com/yandex/ClickHouse/issues/45#issuecomment-231194134) using the TCP interface.
18
+
19
+ > TCP transport is more specific, we don't want to expose details.
20
+ Despite we have full compatibility of protocol of different versions of client and server, we want to keep the ability to "break" it for very old clients. And that protocol is not too clean to make a specification.
21
+
22
+ ### Why use the JSONCompact format and not the native format?
23
+
24
+ Despite of it being the most efficient format, using the native format is also [discouraged](https://clickhouse.yandex/reference_en.html#Native) by the ClickHouse developers.
25
+
26
+ > The most efficient format. Data is written and read by blocks in binary format. For each block, the number of rows, number of columns, column names and types, and parts of columns in this block are recorded one after another. In other words, this format is "columnar" - it doesn't convert columns to rows. This is the format used in the native interface for interaction between servers, for using the command-line client, and for C++ clients.
27
+ >
28
+ > You can use this format to quickly generate dumps that can only be read by the ClickHouse DBMS. It doesn't make sense to work with this format yourself.
29
+
30
+ ## Installation
31
+
32
+ Run the following command to install `Clickhouse`:
33
+
34
+ $ gem install "clickhouse"
35
+
36
+ ## Usage
37
+
38
+ ### Quick start
39
+
40
+ Require the Clickhouse gem.
41
+
42
+ ```ruby
43
+ require "clickhouse"
44
+ ```
45
+
46
+ Setup the logging output.
47
+
48
+ ```ruby
49
+ require "logger"
50
+ Clickhouse.logger = Logger.new(STDOUT)
51
+ ```
52
+
53
+ Establish the connection with the ClickHouse server (using the default config).
54
+
55
+ ```ruby
56
+ Clickhouse.establish_connection
57
+ => true
58
+ ```
59
+
60
+ List databases and tables.
61
+
62
+ ```ruby
63
+ Clickhouse.connection.databases
64
+ I, [2016-10-17T22:54:26.587401 #81829] INFO -- :
65
+ SQL (64.0ms) SHOW DATABASES;
66
+ => ["default", "system"]
67
+
68
+ Clickhouse.connection.tables
69
+ I, [2016-10-17T22:54:51.454012 #81829] INFO -- :
70
+ SQL (61.7ms) SHOW TABLES;
71
+ => []
72
+ ```
73
+
74
+ Create tables.
75
+
76
+ ```ruby
77
+ Clickhouse.connection.create_table("events") do |t|
78
+ t.fixed_string :id, 16
79
+ t.uint16 :year
80
+ t.date :date
81
+ t.date_time :time
82
+ t.string :event
83
+ t.uint32 :user_id
84
+ t.float32 :revenue
85
+ t.engine "MergeTree(date, (year, date), 8192)"
86
+ end
87
+ => true
88
+
89
+ Clickhouse.connection.query "DESCRIBE TABLE events" # or Clickhouse.connection.describe_table "events"
90
+ => #<Clickhouse::Connection::Query::ResultSet:0x007fa9ac137010
91
+ @names=["name", "type", "default_type", "default_expression"],
92
+ @rows=
93
+ [["id", "FixedString(16)", nil, nil],
94
+ ["year", "UInt16", nil, nil],
95
+ ["date", "Date", nil, nil],
96
+ ["time", "DateTime", nil, nil],
97
+ ["event", "String", nil, nil],
98
+ ["user_id", "UInt32", nil, nil],
99
+ ["revenue", "Float32", nil, nil]],
100
+ @types=["String", "String", "String", "String"]>
101
+ ```
102
+
103
+ Insert data.
104
+
105
+ ```ruby
106
+ Clickhouse.connection.insert_rows(events, :names => %w(id year date time event user_id revenue)) do |rows|
107
+ rows << [
108
+ "d91d1c90",
109
+ 2016,
110
+ "2016-10-17",
111
+ "2016-10-17 23:14:28",
112
+ "click",
113
+ 1982,
114
+ 0.18
115
+ ]
116
+ rows << [
117
+ "d91d2294",
118
+ 2016,
119
+ "2016-10-17",
120
+ "2016-10-17 23:14:41",
121
+ "click",
122
+ 1947,
123
+ 0.203
124
+ ]
125
+ end
126
+ => true
127
+ ```
128
+
129
+ Query data.
130
+
131
+ ```ruby
132
+ Clickhouse.connection.count :from => "events"
133
+ I, [2016-10-17T23:19:45.592602 #82196] INFO -- :
134
+ SQL (65.4ms) SELECT COUNT(*)
135
+ FROM events;
136
+ => 2
137
+
138
+ Clickhouse.connection.select_row :select => "COUNT(*), year, date, avg(revenue)", :from => "events", :group => "year, date"
139
+ I, [2016-10-17T23:22:47.340232 #82196] INFO -- :
140
+ SQL (67.7ms) SELECT COUNT(*), year, date, avg(revenue)
141
+ FROM events
142
+ GROUP BY year, date;
143
+ => [2, 2016, #<Date: 2016-10-17 ((2457679j,0s,0n),+0s,2299161j)>, 0.1915000081062317]
144
+ ```
145
+
146
+ ### Connecting to a cluster
147
+
148
+ To connect to a cluster you only need to specify the URLs of the cluster servers in `:urls` of the configuration and that is it! The API of using Clickhouse stays the same.
149
+
150
+ ```ruby
151
+ Clickhouse.establish_connection urls: %w(http://192.168.99.100:32809 http://192.168.99.100:32812 http://192.168.99.100:32815)
152
+ => true
153
+
154
+ Clickhouse.connection.tables
155
+ I, [2016-10-21T11:56:47.375772 #63374] INFO -- :
156
+ SQL (6.2ms) SHOW TABLES;
157
+ => ["events"]
158
+ ```
159
+
160
+ In case of a connection dropping out, Clickhouse will retry the request with another connection. The failed connection will also be removed from the connection pool.
161
+
162
+ ```ruby
163
+ Clickhouse.establish_connection urls: %w(http://192.168.99.100:32809 http://192.168.99.100:1 http://192.168.99.100:32815)
164
+ => true
165
+
166
+ Clickhouse.connection.pond.available.collect(&:url)
167
+ => ["http://192.168.99.100:1", "http://192.168.99.100:32815", "http://192.168.99.100:32809"]
168
+
169
+ Clickhouse.connection.tables
170
+ I, [2016-10-21T12:11:55.974573 #63527] INFO -- :
171
+ SQL (7.1ms) SHOW TABLES;
172
+ => ["events"]
173
+
174
+ Clickhouse.connection.pond.available.collect(&:url)
175
+ => ["http://192.168.99.100:32809", "http://192.168.99.100:32815"]
176
+ ```
177
+
178
+ If all the connections failed, it will just return `nil`.
179
+
180
+ ### Check out the tests
181
+
182
+ To see what more the `Clickhouse` gem has to offer, please take a look at the unit tests ( [test/unit/connection/test_query.rb](https://github.com/archan937/clickhouse/blob/master/test/unit/connection/test_query.rb) for instance).
183
+
184
+ ## Using the Sinatra-based browser GUI and Thor-based CLI
185
+
186
+ As of `Clickhouse v0.1.8`, the gem is provided with both a Sinatra-based GUI and a Thor-based CLI. Starting either of them is very easy:
187
+
188
+ * `clickhouse s localhost:8123` - (the `s` stands for server as we know from `rails s`)
189
+ * `clickhouse c localhost:8123` - (the `c` stands for console as we know from `rails c`)
190
+
191
+ Multiple connections should be passed comma separated:
192
+
193
+ `clickhouse s https://myserver.com:8123,https://myserver.com:8124`
194
+
195
+ Use `clickhouse help` to:
196
+
197
+ ```
198
+ $ clickhouse help server
199
+ Usage:
200
+ clickhouse server [HOSTS]
201
+
202
+ Options:
203
+ -p, [--port=N]
204
+ # Default: 1982
205
+ -u, [--username=USERNAME]
206
+ -P, [--password=PASSWORD]
207
+
208
+ Start a Sinatra server as ClickHouse client (HOSTS should be comma separated URIs)
209
+ ```
210
+
211
+ ## Using the console
212
+
213
+ As you probably already noticed, the `Clickhouse` repo is provided with a `script/console` file which you can use for development / testing purposes. Please note that you need to have a ClickHouse server running.
214
+
215
+ ### Running a ClickHouse server on your Mac or Windows computer
216
+
217
+ Despite that the ClickHouse build is not intended to work on Mac OS X or Windows (only x86_64 with SSE 4.2 is supported), you can still run a ClickHouse server instance on both the operating systems using the [ClickHouse Server Docker Image](https://hub.docker.com/r/yandex/clickhouse-server/) hosted on [https://hub.docker.com/](Docker Hub).
218
+
219
+ The installation process is just a matter of two simple steps:
220
+
221
+ * Download and install [Kitematic](https://kitematic.com/) (Docker Toolbox) on your computer
222
+ * Install the [clickhouse-server](https://hub.docker.com/r/yandex/clickhouse-server/) container using Kitematic
223
+
224
+ Et voilà! Your ClickHouse server instance is up and running locally. Please make sure to use the proper IP address and port to connect with. You can find it at the container details within Kitematic (it is the `Access URL` corresponded with the `8123/tcp Docker port`).
225
+
226
+ ### Example
227
+
228
+ $ script/console
229
+ Loading Clickhouse development environment (0.1.1)
230
+ [1] pry(main)> connect! host: "192.168.99.100", port: 32770
231
+ => true
232
+ [2] pry(main)> conn.databases
233
+ I, [2016-10-19T20:54:53.081388 #29847] INFO -- :
234
+ SQL (3.1ms) SHOW DATABASES;
235
+ => ["default", "system"]
236
+ [3] pry(main)>
237
+
238
+ ## Testing
239
+
240
+ Run the following command for testing:
241
+
242
+ $ rake
243
+
244
+ You can also run a single test file:
245
+
246
+ $ ruby test/unit/connection/test_query.rb
247
+
248
+ ## Contact me
249
+
250
+ For support, remarks and requests, please mail me at [pm_engel@icloud.com](mailto:pm_engel@icloud.com).
251
+
252
+ ## License
253
+
254
+ Copyright (c) 2016 Paul Engel, released under the MIT license
255
+
256
+ http://github.com/archan937 – http://twitter.com/archan937 – pm_engel@icloud.com
257
+
258
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
259
+
260
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
261
+
262
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env rake
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rake/testtask"
5
+
6
+ task :default => :test
7
+
8
+ desc "Run tests and report test coverage to Code Climate"
9
+ task :report do
10
+ exec "REPORT=1 rake"
11
+ end
12
+
13
+ Rake::TestTask.new do |test|
14
+ test.pattern = "test/**/test_*.rb"
15
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.0.1
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "rubygems"
4
+ require "clickhouse/cli"
5
+
6
+ begin
7
+ Clickhouse::CLI.start
8
+ rescue Interrupt
9
+ end
@@ -0,0 +1,36 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require File.expand_path("../lib/clickhouse/version", __FILE__)
3
+
4
+ Gem::Specification.new do |gem|
5
+ gem.authors = ["Paul Engel", "Shiv Bharthur"]
6
+ gem.email = ["pm_engel@icloud.com", "shiv.bharthur@gmail.com"]
7
+ gem.summary = %q{A Ruby database driver for ClickHouse (also Clickhouse CLI and web GUI included)}
8
+ gem.description = %q{A Ruby database driver for ClickHouse (also Clickhouse CLI and web GUI included)}
9
+ gem.homepage = "https://github.com/archan937/clickhouse"
10
+
11
+ gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
12
+ gem.files = `git ls-files`.split("\n")
13
+ gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
14
+ gem.name = "ch-client"
15
+ gem.require_paths = ["lib"]
16
+ gem.version = Clickhouse::VERSION
17
+ gem.licenses = ["MIT"]
18
+
19
+ gem.add_dependency "bundler", ">= 1.13.4"
20
+ gem.add_dependency "faraday"
21
+ gem.add_dependency "pond"
22
+ gem.add_dependency "activesupport", ">= 4.1.8"
23
+
24
+ gem.add_dependency "sinatra"
25
+ gem.add_dependency "erubis"
26
+ gem.add_dependency "launchy"
27
+ gem.add_dependency "thor"
28
+
29
+ gem.add_development_dependency "rake"
30
+ gem.add_development_dependency "pry"
31
+ gem.add_development_dependency "dotenv"
32
+ gem.add_development_dependency "codeclimate-test-reporter"
33
+ gem.add_development_dependency "simplecov"
34
+ gem.add_development_dependency "minitest"
35
+ gem.add_development_dependency "mocha"
36
+ end