timescaledb 0.1.5 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/Gemfile.scenic.lock +2 -2
  4. data/README.md +23 -16
  5. data/bin/console +2 -2
  6. data/bin/tsdb +6 -6
  7. data/examples/{Gemfile → all_in_one/Gemfile} +0 -0
  8. data/examples/{Gemfile.lock → all_in_one/Gemfile.lock} +0 -0
  9. data/examples/{all_in_one.rb → all_in_one/all_in_one.rb} +0 -0
  10. data/examples/ranking/.gitattributes +7 -0
  11. data/examples/ranking/.gitignore +29 -0
  12. data/examples/ranking/.ruby-version +1 -0
  13. data/examples/ranking/Gemfile +33 -0
  14. data/examples/ranking/Gemfile.lock +189 -0
  15. data/examples/ranking/README.md +166 -0
  16. data/examples/ranking/Rakefile +6 -0
  17. data/examples/ranking/app/controllers/application_controller.rb +2 -0
  18. data/examples/ranking/app/controllers/concerns/.keep +0 -0
  19. data/examples/ranking/app/jobs/application_job.rb +7 -0
  20. data/examples/ranking/app/models/application_record.rb +3 -0
  21. data/examples/ranking/app/models/concerns/.keep +0 -0
  22. data/examples/ranking/app/models/game.rb +2 -0
  23. data/examples/ranking/app/models/play.rb +7 -0
  24. data/examples/ranking/bin/bundle +114 -0
  25. data/examples/ranking/bin/rails +4 -0
  26. data/examples/ranking/bin/rake +4 -0
  27. data/examples/ranking/bin/setup +33 -0
  28. data/examples/ranking/config/application.rb +39 -0
  29. data/examples/ranking/config/boot.rb +4 -0
  30. data/examples/ranking/config/credentials.yml.enc +1 -0
  31. data/examples/ranking/config/database.yml +86 -0
  32. data/examples/ranking/config/environment.rb +5 -0
  33. data/examples/ranking/config/environments/development.rb +60 -0
  34. data/examples/ranking/config/environments/production.rb +75 -0
  35. data/examples/ranking/config/environments/test.rb +53 -0
  36. data/examples/ranking/config/initializers/cors.rb +16 -0
  37. data/examples/ranking/config/initializers/filter_parameter_logging.rb +8 -0
  38. data/examples/ranking/config/initializers/inflections.rb +16 -0
  39. data/examples/ranking/config/initializers/timescale.rb +3 -0
  40. data/examples/ranking/config/locales/en.yml +33 -0
  41. data/examples/ranking/config/puma.rb +43 -0
  42. data/examples/ranking/config/routes.rb +6 -0
  43. data/examples/ranking/config/storage.yml +34 -0
  44. data/examples/ranking/config.ru +6 -0
  45. data/examples/ranking/db/migrate/20220209120747_create_games.rb +10 -0
  46. data/examples/ranking/db/migrate/20220209120910_create_plays.rb +19 -0
  47. data/examples/ranking/db/migrate/20220209143347_create_score_per_hours.rb +5 -0
  48. data/examples/ranking/db/schema.rb +47 -0
  49. data/examples/ranking/db/seeds.rb +7 -0
  50. data/examples/ranking/db/views/score_per_hours_v01.sql +7 -0
  51. data/examples/ranking/lib/tasks/.keep +0 -0
  52. data/examples/ranking/log/.keep +0 -0
  53. data/examples/ranking/public/robots.txt +1 -0
  54. data/examples/ranking/storage/.keep +0 -0
  55. data/examples/ranking/tmp/.keep +0 -0
  56. data/examples/ranking/tmp/pids/.keep +0 -0
  57. data/examples/ranking/tmp/storage/.keep +0 -0
  58. data/examples/ranking/vendor/.keep +0 -0
  59. data/lib/{timescale → timescaledb}/acts_as_hypertable/core.rb +1 -1
  60. data/lib/{timescale → timescaledb}/acts_as_hypertable.rb +6 -6
  61. data/lib/{timescale → timescaledb}/chunk.rb +1 -1
  62. data/lib/{timescale → timescaledb}/compression_settings.rb +1 -1
  63. data/lib/{timescale → timescaledb}/continuous_aggregates.rb +3 -3
  64. data/lib/{timescale → timescaledb}/dimensions.rb +1 -1
  65. data/lib/{timescale → timescaledb}/hypertable.rb +4 -4
  66. data/lib/{timescale → timescaledb}/job.rb +1 -1
  67. data/lib/{timescale → timescaledb}/job_stats.rb +1 -1
  68. data/lib/{timescale → timescaledb}/migration_helpers.rb +2 -2
  69. data/lib/{timescale → timescaledb}/scenic/adapter.rb +2 -2
  70. data/lib/timescaledb/scenic/extension.rb +72 -0
  71. data/lib/{timescale → timescaledb}/schema_dumper.rb +4 -4
  72. data/lib/{timescale → timescaledb}/stats_report.rb +2 -2
  73. data/lib/timescaledb/version.rb +3 -0
  74. data/lib/timescaledb.rb +64 -0
  75. data/{timescale.gemspec → timescaledb.gemspec} +3 -3
  76. metadata +73 -23
  77. data/lib/timescale/version.rb +0 -3
  78. data/lib/timescale.rb +0 -62
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: timescaledb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jônatas Davi Paganini
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-14 00:00:00.000000000 Z
11
+ date: 2022-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg
@@ -160,31 +160,81 @@ files:
160
160
  - bin/console
161
161
  - bin/setup
162
162
  - bin/tsdb
163
- - examples/Gemfile
164
- - examples/Gemfile.lock
165
- - examples/all_in_one.rb
166
- - lib/timescale.rb
167
- - lib/timescale/acts_as_hypertable.rb
168
- - lib/timescale/acts_as_hypertable/core.rb
169
- - lib/timescale/chunk.rb
170
- - lib/timescale/compression_settings.rb
171
- - lib/timescale/continuous_aggregates.rb
172
- - lib/timescale/dimensions.rb
173
- - lib/timescale/hypertable.rb
174
- - lib/timescale/job.rb
175
- - lib/timescale/job_stats.rb
176
- - lib/timescale/migration_helpers.rb
177
- - lib/timescale/scenic/adapter.rb
178
- - lib/timescale/schema_dumper.rb
179
- - lib/timescale/stats_report.rb
180
- - lib/timescale/version.rb
181
- - timescale.gemspec
182
- homepage: https://github.com/jonatas/timescale
163
+ - examples/all_in_one/Gemfile
164
+ - examples/all_in_one/Gemfile.lock
165
+ - examples/all_in_one/all_in_one.rb
166
+ - examples/ranking/.gitattributes
167
+ - examples/ranking/.gitignore
168
+ - examples/ranking/.ruby-version
169
+ - examples/ranking/Gemfile
170
+ - examples/ranking/Gemfile.lock
171
+ - examples/ranking/README.md
172
+ - examples/ranking/Rakefile
173
+ - examples/ranking/app/controllers/application_controller.rb
174
+ - examples/ranking/app/controllers/concerns/.keep
175
+ - examples/ranking/app/jobs/application_job.rb
176
+ - examples/ranking/app/models/application_record.rb
177
+ - examples/ranking/app/models/concerns/.keep
178
+ - examples/ranking/app/models/game.rb
179
+ - examples/ranking/app/models/play.rb
180
+ - examples/ranking/bin/bundle
181
+ - examples/ranking/bin/rails
182
+ - examples/ranking/bin/rake
183
+ - examples/ranking/bin/setup
184
+ - examples/ranking/config.ru
185
+ - examples/ranking/config/application.rb
186
+ - examples/ranking/config/boot.rb
187
+ - examples/ranking/config/credentials.yml.enc
188
+ - examples/ranking/config/database.yml
189
+ - examples/ranking/config/environment.rb
190
+ - examples/ranking/config/environments/development.rb
191
+ - examples/ranking/config/environments/production.rb
192
+ - examples/ranking/config/environments/test.rb
193
+ - examples/ranking/config/initializers/cors.rb
194
+ - examples/ranking/config/initializers/filter_parameter_logging.rb
195
+ - examples/ranking/config/initializers/inflections.rb
196
+ - examples/ranking/config/initializers/timescale.rb
197
+ - examples/ranking/config/locales/en.yml
198
+ - examples/ranking/config/puma.rb
199
+ - examples/ranking/config/routes.rb
200
+ - examples/ranking/config/storage.yml
201
+ - examples/ranking/db/migrate/20220209120747_create_games.rb
202
+ - examples/ranking/db/migrate/20220209120910_create_plays.rb
203
+ - examples/ranking/db/migrate/20220209143347_create_score_per_hours.rb
204
+ - examples/ranking/db/schema.rb
205
+ - examples/ranking/db/seeds.rb
206
+ - examples/ranking/db/views/score_per_hours_v01.sql
207
+ - examples/ranking/lib/tasks/.keep
208
+ - examples/ranking/log/.keep
209
+ - examples/ranking/public/robots.txt
210
+ - examples/ranking/storage/.keep
211
+ - examples/ranking/tmp/.keep
212
+ - examples/ranking/tmp/pids/.keep
213
+ - examples/ranking/tmp/storage/.keep
214
+ - examples/ranking/vendor/.keep
215
+ - lib/timescaledb.rb
216
+ - lib/timescaledb/acts_as_hypertable.rb
217
+ - lib/timescaledb/acts_as_hypertable/core.rb
218
+ - lib/timescaledb/chunk.rb
219
+ - lib/timescaledb/compression_settings.rb
220
+ - lib/timescaledb/continuous_aggregates.rb
221
+ - lib/timescaledb/dimensions.rb
222
+ - lib/timescaledb/hypertable.rb
223
+ - lib/timescaledb/job.rb
224
+ - lib/timescaledb/job_stats.rb
225
+ - lib/timescaledb/migration_helpers.rb
226
+ - lib/timescaledb/scenic/adapter.rb
227
+ - lib/timescaledb/scenic/extension.rb
228
+ - lib/timescaledb/schema_dumper.rb
229
+ - lib/timescaledb/stats_report.rb
230
+ - lib/timescaledb/version.rb
231
+ - timescaledb.gemspec
232
+ homepage: https://github.com/jonatas/timescaledb
183
233
  licenses:
184
234
  - MIT
185
235
  metadata:
186
236
  allowed_push_host: https://rubygems.org
187
- homepage_uri: https://github.com/jonatas/timescale
237
+ homepage_uri: https://github.com/jonatas/timescaledb
188
238
  post_install_message:
189
239
  rdoc_options: []
190
240
  require_paths:
@@ -1,3 +0,0 @@
1
- module Timescale
2
- VERSION = '0.1.5'
3
- end
data/lib/timescale.rb DELETED
@@ -1,62 +0,0 @@
1
- require 'active_record'
2
-
3
- require_relative 'timescale/acts_as_hypertable'
4
- require_relative 'timescale/acts_as_hypertable/core'
5
- require_relative 'timescale/chunk'
6
- require_relative 'timescale/compression_settings'
7
- require_relative 'timescale/continuous_aggregates'
8
- require_relative 'timescale/dimensions'
9
- require_relative 'timescale/hypertable'
10
- require_relative 'timescale/job'
11
- require_relative 'timescale/job_stats'
12
- require_relative 'timescale/schema_dumper'
13
- require_relative 'timescale/stats_report'
14
- require_relative 'timescale/migration_helpers'
15
- require_relative 'timescale/version'
16
-
17
- module Timescale
18
- module_function
19
-
20
- def chunks
21
- Chunk.all
22
- end
23
-
24
- def hypertables
25
- Hypertable.all
26
- end
27
-
28
- def continuous_aggregates
29
- ContinuousAggregates.all
30
- end
31
-
32
- def compression_settings
33
- CompressionSettings.all
34
- end
35
-
36
- def jobs
37
- Job.all
38
- end
39
-
40
- def job_stats
41
- JobStats.all
42
- end
43
-
44
- def stats(scope=Hypertable.all)
45
- StatsReport.resume(scope)
46
- end
47
-
48
- def default_hypertable_options
49
- Timescale::ActsAsHypertable::DEFAULT_OPTIONS
50
- end
51
- end
52
-
53
- begin
54
- require 'scenic'
55
- require_relative 'timescale/scenic/adapter'
56
-
57
- Scenic.configure do |config|
58
- config.database = Timescale::Scenic::Adapter.new
59
- end
60
- rescue LoadError
61
- # This is expected when the scenic gem is not being used
62
- end