activerecord-pinot-adapter 0.1.0 → 0.2.0

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
2
  SHA256:
3
- metadata.gz: 34d05b55c0db37ef45a48eb13874ea21fd328e0d68fbdf1cfda03371401ff123
4
- data.tar.gz: 0732be5d8c9cfc27ab00017d8daee56e07b1e8924996919bd8e673553cc8a635
3
+ metadata.gz: 28c4f9381e73ca7e68d549d47f4a7dff6b7740b33bd965833e0397f07e27c3da
4
+ data.tar.gz: 05220a45210bd4e03329891870bb428c4f613ea60a4d4367c7d9bccf1b1d66f2
5
5
  SHA512:
6
- metadata.gz: 88cbf5c67cc7dcdf077aaa5ab65b9da04926861acbc588793017f07b06b7cf316fc6984f59e83b36f17ab16543a1521efaa73fa390af85b566ec49641962f2db
7
- data.tar.gz: 104d88ad0b25397026ab01f5a8d6a9f4aa2373adde0de49ba5166b60eeeaccb3605ccfa0b7a1f86ae92a25137c03c58aa85d2cba480a8e3b9790ea8575105e2c
6
+ metadata.gz: a4d61494dcafd454bfac76959c8e77bab174cc9472187dd19bd0715cf8ba8786b610afb86852b19c55694709ca2e2b6ab40076ebd25be28f3ea4a4bb127281aa
7
+ data.tar.gz: 2b723803e42dd71eab40751e15c34246fd9eca74593fc87fc4318565c0a46eccf60f291bc7efcac1bd8a5cf36c79c39fc1f09dafd27e6e82a6945e0af79d013b
data/Guardfile ADDED
@@ -0,0 +1,42 @@
1
+ # A sample Guardfile
2
+ # More info at https://github.com/guard/guard#readme
3
+
4
+ ## Uncomment and set this to only include directories you want to watch
5
+ # directories %w(app lib config test spec features) \
6
+ # .select{|d| Dir.exist?(d) ? d : UI.warning("Directory #{d} does not exist")}
7
+
8
+ ## Note: if you are using the `directories` clause above and you are not
9
+ ## watching the project directory ('.'), then you will want to move
10
+ ## the Guardfile to a watched dir and symlink it back, e.g.
11
+ #
12
+ # $ mkdir config
13
+ # $ mv Guardfile config/
14
+ # $ ln -s config/Guardfile .
15
+ #
16
+ # and, you'll have to watch "config/Guardfile" instead of "Guardfile"
17
+
18
+ guard :minitest do
19
+ # with Minitest::Unit
20
+ watch(%r{^test/(.*)/?test_(.*)\.rb$})
21
+ watch(%r{^lib/(.*/)?([^/]+)\.rb$}) { |m| "test/#{m[1]}test_#{m[2]}.rb" }
22
+ watch(%r{^test/test_helper\.rb$}) { "test" }
23
+
24
+ # with Minitest::Spec
25
+ # watch(%r{^spec/(.*)_spec\.rb$})
26
+ # watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
27
+ # watch(%r{^spec/spec_helper\.rb$}) { 'spec' }
28
+
29
+ # Rails 4
30
+ # watch(%r{^app/(.+)\.rb$}) { |m| "test/#{m[1]}_test.rb" }
31
+ # watch(%r{^app/controllers/application_controller\.rb$}) { 'test/controllers' }
32
+ # watch(%r{^app/controllers/(.+)_controller\.rb$}) { |m| "test/integration/#{m[1]}_test.rb" }
33
+ # watch(%r{^app/views/(.+)_mailer/.+}) { |m| "test/mailers/#{m[1]}_mailer_test.rb" }
34
+ # watch(%r{^lib/(.+)\.rb$}) { |m| "test/lib/#{m[1]}_test.rb" }
35
+ # watch(%r{^test/.+_test\.rb$})
36
+ # watch(%r{^test/test_helper\.rb$}) { 'test' }
37
+
38
+ # Rails < 4
39
+ # watch(%r{^app/controllers/(.*)\.rb$}) { |m| "test/functional/#{m[1]}_test.rb" }
40
+ # watch(%r{^app/helpers/(.*)\.rb$}) { |m| "test/helpers/#{m[1]}_test.rb" }
41
+ # watch(%r{^app/models/(.*)\.rb$}) { |m| "test/unit/#{m[1]}_test.rb" }
42
+ end
data/README.md CHANGED
@@ -1,24 +1,63 @@
1
- # Activerecord::Pinot::Adapter
1
+ # Pinot Adapter
2
2
 
3
- TODO: Delete this and the text below, and describe your gem
3
+ Ruby on Rails Active Record database adapter for Apache Pinot, a client library for Pinot-compatible database servers.
4
4
 
5
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/activerecord/pinot/adapter`. To experiment with that code, run `bin/console` for an interactive prompt.
5
+ Disclaimer: This is alpha stage software, please use with caution.
6
6
 
7
7
  ## Installation
8
8
 
9
- TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
10
-
11
9
  Install the gem and add to the application's Gemfile by executing:
12
10
 
13
- $ bundle add UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
11
+ $ bundle add activerecord-pinot-adapter
14
12
 
15
13
  If bundler is not being used to manage dependencies, install the gem by executing:
16
14
 
17
- $ gem install UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
15
+ $ gem install activerecord-pinot-adapter
16
+
17
+ This adapter uses the [pinot](https://rubygems.org/gems/pinot) gem, that is the Apache Pinot client, you can install an specific version of the client, but it's highly recommended to let this gem manage its own dependency.
18
18
 
19
19
  ## Usage
20
20
 
21
21
  TODO: Write usage instructions here
22
+ First step is to configure the `config/database.yml`
23
+
24
+ ```yaml
25
+ pinot:
26
+ adapter: pinot
27
+ host: host.to.your.broker.com
28
+ port: 443
29
+ controller_host: host.to.your.controller.com
30
+ controller_port: 443
31
+ protocol: https
32
+ ```
33
+
34
+ Adapter also supports:
35
+
36
+ - `socks5_uri` in case you are using are using a jump host as your socks proxy. Please provide the full uri with protocol and port (eg. `socks5://127.0.0.1:8080`)
37
+ - `bearer_token` in case your broker/host need a bearer token to authenticate the requests
38
+ - `query_options` in case needs to specify pinot [query options](https://docs.pinot.apache.org/users/user-guide-query/query-options), it's a hash, and keys are on the _underscore_ format.
39
+
40
+ By design we avoided trying to guess the port and protocol based on any provided information, so port is always required, and protocol by default is `http` to make easier to test local, and then must be specified as `https` for production.
41
+
42
+ ### Models
43
+
44
+ To start using on your application, it's recommended to create an abstract class, so it's only needed to specify the connection database in one place.
45
+
46
+ ```ruby
47
+ class PinotRecord < ApplicationRecord
48
+ self.abstract_class = true
49
+ connects_to database: {writing: :pinot, reading: :pinot}
50
+ end
51
+ ```
52
+
53
+ After abstract class, just use it on any class you want to use.
54
+
55
+ ```ruby
56
+ class MyModel < PinotRecord
57
+ end
58
+ ```
59
+
60
+ If you are incrementally migrating from one database to Pinot, or want to use both in parallel, prefix your models on a namespace, and use `self.table_name=` to specify the correct table name for the model.
22
61
 
23
62
  ## Development
24
63
 
@@ -0,0 +1,43 @@
1
+ version: '3.7'
2
+ services:
3
+ pinot-zookeeper:
4
+ image: zookeeper:3.5.6
5
+ container_name: pinot-zookeeper
6
+ ports:
7
+ - "2181:2181"
8
+ environment:
9
+ ZOOKEEPER_CLIENT_PORT: 2181
10
+ ZOOKEEPER_TICK_TIME: 2000
11
+ pinot-controller:
12
+ image: apachepinot/pinot:1.0.0
13
+ command: "StartController -zkAddress pinot-zookeeper:2181"
14
+ container_name: pinot-controller
15
+ restart: unless-stopped
16
+ ports:
17
+ - "9000:9000"
18
+ environment:
19
+ JAVA_OPTS: "-Dplugins.dir=/opt/pinot/plugins -Xms1G -Xmx4G -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -Xloggc:gc-pinot-controller.log"
20
+ depends_on:
21
+ - pinot-zookeeper
22
+ pinot-broker:
23
+ image: apachepinot/pinot:1.0.0
24
+ command: "StartBroker -zkAddress pinot-zookeeper:2181"
25
+ restart: unless-stopped
26
+ container_name: "pinot-broker"
27
+ ports:
28
+ - "8099:8099"
29
+ environment:
30
+ JAVA_OPTS: "-Dplugins.dir=/opt/pinot/plugins -Xms4G -Xmx4G -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -Xloggc:gc-pinot-broker.log"
31
+ depends_on:
32
+ - pinot-controller
33
+ pinot-server:
34
+ image: apachepinot/pinot:1.0.0
35
+ command: "StartServer -zkAddress pinot-zookeeper:2181"
36
+ restart: unless-stopped
37
+ container_name: "pinot-server"
38
+ ports:
39
+ - "8098:8098"
40
+ environment:
41
+ JAVA_OPTS: "-Dplugins.dir=/opt/pinot/plugins -Xms4G -Xmx16G -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -Xloggc:gc-pinot-server.log"
42
+ depends_on:
43
+ - pinot-broker
@@ -0,0 +1,54 @@
1
+ module ActiveRecord
2
+ module ConnectionAdapters
3
+ class PinotAdapter < AbstractAdapter
4
+ module TableStructure
5
+ def self.from_schema(schema)
6
+ fields = []
7
+ schema["dimensionFieldSpecs"].each do |f|
8
+ fields << {
9
+ "name" => f["name"],
10
+ "type" => f["dataType"],
11
+ "pinot_type" => "dimension"
12
+ }
13
+ end
14
+ schema["metricFieldSpecs"] ||= []
15
+ schema["metricFieldSpecs"].each do |f|
16
+ fields << {
17
+ "name" => f["name"],
18
+ "type" => f["dataType"],
19
+ "pinot_type" => "metric"
20
+ }
21
+ end
22
+ schema["dateTimeFieldSpecs"].each do |f|
23
+ fields << {
24
+ "name" => f.delete("name"),
25
+ "type" => f.delete("dataType"),
26
+ "pinot_type" => "dateTime",
27
+ "metadata" => f
28
+ }
29
+ end
30
+ # normalize values
31
+ fields.each do |f|
32
+ f["type"] = normalize_type(f["type"])
33
+ end
34
+ # set primary keys
35
+ primary_key_columns = schema["primaryKeyColumns"] || []
36
+ primary_key_columns.each do |pk|
37
+ pk_fields = fields.select { |x| x["name"] == pk }
38
+ pk_fields.each { |field| field["pk"] = 1 }
39
+ end
40
+ fields
41
+ end
42
+
43
+ def self.normalize_type(type)
44
+ case type
45
+ when "INT" then "integer"
46
+ when "STRING" then "varchar"
47
+ else
48
+ type
49
+ end
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end
@@ -0,0 +1,155 @@
1
+ require_relative "pinot_adapter/table_structure"
2
+
3
+ module ActiveRecord
4
+ module ConnectionHandling # :nodoc:
5
+ def pinot_adapter_class
6
+ ConnectionAdapters::PinotAdapter
7
+ end
8
+
9
+ def pinot_connection(config)
10
+ pinot_adapter_class.new(config)
11
+ end
12
+ end
13
+
14
+ module ConnectionAdapters
15
+ class PinotAdapter < AbstractAdapter
16
+ TYPES = {
17
+ "INT" => Type::Integer.new,
18
+ "TIMESTAMP" => Type::DateTime.new,
19
+ "FLOAT" => Type::Decimal.new,
20
+ "LONG" => Type::Decimal.new,
21
+ "STRING" => Type::String.new,
22
+ "JSON" => ActiveRecord::Type::Json.new
23
+ }
24
+ def initialize(config = {})
25
+ @pinot_host = config.fetch(:host)
26
+ @pinot_port = config.fetch(:port)
27
+ @pinot_controller_port = config.fetch(:controller_port)
28
+ @pinot_controller_host = config.fetch(:controller_host) || @pinot_host
29
+ @pinot_socks5_uri = config.fetch(:socks5_uri, nil)
30
+ @pinot_bearer_token = config.fetch(:bearer_token, nil)
31
+ @pinot_protocol = config.fetch(:protocol, "http")
32
+ @pinot_query_options = config.fetch(:query_options, {})
33
+ # TODO: does it need connection pooling?
34
+
35
+ @pinot_client = ::Pinot::Client.new(
36
+ host: @pinot_host,
37
+ port: @pinot_port,
38
+ controller_host: @pinot_controller_host,
39
+ controller_port: @pinot_controller_port,
40
+ protocol: @pinot_protocol,
41
+ socks5_uri: @pinot_socks5_uri,
42
+ bearer_token: @pinot_bearer_token,
43
+ query_options: @pinot_query_options
44
+ )
45
+
46
+ super(config)
47
+ end
48
+
49
+ def default_prepared_statements
50
+ false
51
+ end
52
+
53
+ def prepared_statements
54
+ false
55
+ end
56
+
57
+ def table_structure(table_name)
58
+ schema = @pinot_client.schema(table_name)
59
+ @table_structure = TableStructure.from_schema(schema)
60
+ @table_structure.sort_by! { |x| x[:name] }
61
+ end
62
+
63
+ def data_sources
64
+ @pinot_data_sources ||= @pinot_client.tables["tables"]
65
+ end
66
+
67
+ def new_column_from_field(table_name, field, definitions = nil)
68
+ default = nil
69
+
70
+ type_metadata = fetch_type_metadata(field["type"])
71
+ default_value = extract_value_from_default(default)
72
+ default_function = extract_default_function(default_value, default)
73
+
74
+ Column.new(
75
+ field["name"],
76
+ default_value,
77
+ type_metadata,
78
+ field["notnull"].to_i == 0,
79
+ default_function,
80
+ collation: field["collation"]
81
+ )
82
+ end
83
+ alias_method :column_definitions, :table_structure
84
+
85
+ def extract_value_from_default(default)
86
+ case default
87
+ when /^null$/i
88
+ nil
89
+ # Quoted types
90
+ when /^'([^|]*)'$/m
91
+ $1.gsub("''", "'")
92
+ # Quoted types
93
+ when /^"([^|]*)"$/m
94
+ $1.gsub('""', '"')
95
+ # Numeric types
96
+ when /\A-?\d+(\.\d*)?\z/
97
+ $&
98
+ # Binary columns
99
+ when /x'(.*)'/
100
+ [$1].pack("H*")
101
+ else
102
+ # Anything else is blank or some function
103
+ # and we can't know the value of that, so return nil.
104
+ nil
105
+ end
106
+ end
107
+
108
+ def extract_default_function(default_value, default)
109
+ default if has_default_function?(default_value, default)
110
+ end
111
+
112
+ def has_default_function?(default_value, default)
113
+ !default_value && %r{\w+\(.*\)|CURRENT_TIME|CURRENT_DATE|CURRENT_TIMESTAMP|\|\|}.match?(default)
114
+ end
115
+
116
+ INTEGER_REGEX = /integer/i
117
+ def is_column_the_rowid?(field, column_definitions)
118
+ return false unless INTEGER_REGEX.match?(field["type"]) && field["pk"] == 1
119
+ # is the primary key a single column?
120
+ column_definitions.one? { |c|
121
+ col_pk = c["pk"] || 0
122
+ col_pk > 0
123
+ }
124
+ end
125
+
126
+ def internal_exec_query(sql, name = "SQL", binds = [], prepare: false, async: false) # :nodoc:
127
+ # rows = [
128
+ # [Time.now, 1, 2.0],
129
+ # [Time.now, 2, 2.0],
130
+ # [Time.now, 2, 2.0]
131
+ # ]
132
+ response = @pinot_client.execute(sql)
133
+ rows = response.rows
134
+ columns = response.columns
135
+ columns.transform_values! { |value| TYPES.fetch(value, value) }
136
+ ActiveRecord::Result.new(
137
+ response.columns.keys,
138
+ rows.to_a,
139
+ columns
140
+ )
141
+ end
142
+
143
+ def exec_query(sql, name = "SQL", binds = [], prepare: false)
144
+ internal_exec_query(sql, name, binds, prepare: prepare, async: false)
145
+ end
146
+
147
+ def primary_keys(table_name)
148
+ # TODO: implement
149
+ [:id]
150
+ end
151
+ end
152
+
153
+ ActiveSupport.run_load_hooks(:active_record_pinotadapter, PinotAdapter)
154
+ end
155
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "pinot"
4
+ require "active_record"
5
+ require_relative "../connection_adapters/pinot_adapter"
6
+
7
+ module ActiveRecord
8
+ module Pinot
9
+ module Adapter
10
+ class Error < StandardError; end
11
+ # Your code goes here...
12
+ end
13
+ end
14
+ end
@@ -3,7 +3,7 @@
3
3
  module Activerecord
4
4
  module Pinot
5
5
  module Adapter
6
- VERSION = "0.1.0"
6
+ VERSION = "0.2.0"
7
7
  end
8
8
  end
9
9
  end
@@ -1,12 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative "adapter/version"
4
-
5
- module Activerecord
6
- module Pinot
7
- module Adapter
8
- class Error < StandardError; end
9
- # Your code goes here...
10
- end
11
- end
12
- end
4
+ require "pinot"
5
+ require "active_record"
6
+ require "active_record/pinot/adapter"
metadata CHANGED
@@ -1,15 +1,105 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-pinot-adapter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Celso Fernandes
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-01-16 00:00:00.000000000 Z
12
- dependencies: []
11
+ date: 2024-07-12 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: activerecord
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 5.2.0
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '7.2'
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: 5.2.0
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '7.2'
33
+ - !ruby/object:Gem::Dependency
34
+ name: pinot
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: 0.2.0
40
+ type: :runtime
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: 0.2.0
47
+ - !ruby/object:Gem::Dependency
48
+ name: guard
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: '0'
61
+ - !ruby/object:Gem::Dependency
62
+ name: guard-minitest
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ version: '0'
68
+ type: :development
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
75
+ - !ruby/object:Gem::Dependency
76
+ name: minitest-reporters
77
+ requirement: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ version: '0'
82
+ type: :development
83
+ prerelease: false
84
+ version_requirements: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ - !ruby/object:Gem::Dependency
90
+ name: minitest-focus
91
+ requirement: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - ">="
94
+ - !ruby/object:Gem::Version
95
+ version: '0'
96
+ type: :development
97
+ prerelease: false
98
+ version_requirements: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ version: '0'
13
103
  description: ActiveRecord Apache Pinot Adapter
14
104
  email:
15
105
  - celso.fernandes@clickfunnels.com
@@ -20,9 +110,13 @@ files:
20
110
  - ".standard.yml"
21
111
  - CHANGELOG.md
22
112
  - CODE_OF_CONDUCT.md
113
+ - Guardfile
23
114
  - README.md
24
115
  - Rakefile
25
- - activerecord-pinot-adapter.gemspec
116
+ - docker-compose.yml
117
+ - lib/active_record/connection_adapters/pinot_adapter.rb
118
+ - lib/active_record/connection_adapters/pinot_adapter/table_structure.rb
119
+ - lib/active_record/pinot/adapter.rb
26
120
  - lib/activerecord/pinot/adapter.rb
27
121
  - lib/activerecord/pinot/adapter/version.rb
28
122
  - sig/activerecord/pinot/adapter.rbs
@@ -32,7 +126,7 @@ metadata:
32
126
  homepage_uri: https://github.com/fernandes/activerecord-pinot-adapter
33
127
  source_code_uri: https://github.com/fernandes/activerecord-pinot-adapter
34
128
  changelog_uri: https://github.com/fernandes/activerecord-pinot-adapter/blob/main/CHANGELOG.md
35
- post_install_message:
129
+ post_install_message:
36
130
  rdoc_options: []
37
131
  require_paths:
38
132
  - lib
@@ -47,8 +141,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
47
141
  - !ruby/object:Gem::Version
48
142
  version: '0'
49
143
  requirements: []
50
- rubygems_version: 3.4.21
51
- signing_key:
144
+ rubygems_version: 3.5.14
145
+ signing_key:
52
146
  specification_version: 4
53
147
  summary: ActiveRecord Apache Pinot Adapter
54
148
  test_files: []
@@ -1,37 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative "lib/activerecord/pinot/adapter/version"
4
-
5
- Gem::Specification.new do |spec|
6
- spec.name = "activerecord-pinot-adapter"
7
- spec.version = Activerecord::Pinot::Adapter::VERSION
8
- spec.authors = ["Celso Fernandes"]
9
- spec.email = ["celso.fernandes@clickfunnels.com"]
10
-
11
- spec.summary = "ActiveRecord Apache Pinot Adapter"
12
- spec.description = "ActiveRecord Apache Pinot Adapter"
13
- spec.homepage = "https://github.com/fernandes/activerecord-pinot-adapter"
14
- spec.required_ruby_version = ">= 2.6.0"
15
-
16
- spec.metadata["homepage_uri"] = spec.homepage
17
- spec.metadata["source_code_uri"] = "https://github.com/fernandes/activerecord-pinot-adapter"
18
- spec.metadata["changelog_uri"] = "https://github.com/fernandes/activerecord-pinot-adapter/blob/main/CHANGELOG.md"
19
-
20
- # Specify which files should be added to the gem when it is released.
21
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
22
- spec.files = Dir.chdir(__dir__) do
23
- `git ls-files -z`.split("\x0").reject do |f|
24
- (File.expand_path(f) == __FILE__) ||
25
- f.start_with?(*%w[bin/ test/ spec/ features/ .git .circleci appveyor Gemfile])
26
- end
27
- end
28
- spec.bindir = "exe"
29
- spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
30
- spec.require_paths = ["lib"]
31
-
32
- # Uncomment to register a new dependency of your gem
33
- # spec.add_dependency "example-gem", "~> 1.0"
34
-
35
- # For more information and examples about making a new gem, check out our
36
- # guide at: https://bundler.io/guides/creating_gem.html
37
- end