repo
stringlengths
5
92
file_url
stringlengths
80
287
file_path
stringlengths
5
197
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:37:27
2026-01-04 17:58:21
truncated
bool
2 classes
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/examples/ranking/db/schema.rb
examples/ranking/db/schema.rb
# This file is auto-generated from the current state of the database. Instead # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. # # This file is the source Rails uses to define your schema when running `bin/rai...
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/examples/ranking/db/migrate/20220209120910_create_plays.rb
examples/ranking/db/migrate/20220209120910_create_plays.rb
class CreatePlays < ActiveRecord::Migration[7.0] def change enable_extension("timescaledb") unless extensions.include? "timescaledb" hypertable_options = { time_column: 'created_at', chunk_time_interval: '1 day', compress_segmentby: 'game_id', compress_orderby: 'created_at', ...
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/examples/ranking/db/migrate/20220209120747_create_games.rb
examples/ranking/db/migrate/20220209120747_create_games.rb
class CreateGames < ActiveRecord::Migration[7.0] def change create_table :games do |t| t.string :name t.string :description t.timestamps end end end
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/examples/ranking/db/migrate/20220209143347_create_score_per_hours.rb
examples/ranking/db/migrate/20220209143347_create_score_per_hours.rb
class CreateScorePerHours < ActiveRecord::Migration[7.0] def change create_scenic_continuous_aggregate :score_per_hours end end
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/examples/ranking/config/application.rb
examples/ranking/config/application.rb
require_relative "boot" require "rails" # Pick the frameworks you want: require "active_model/railtie" require "active_job/railtie" require "active_record/railtie" require "active_storage/engine" require "action_controller/railtie" # require "action_mailer/railtie" require "action_mailbox/engine" require "action_text/...
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/examples/ranking/config/environment.rb
examples/ranking/config/environment.rb
# Load the Rails application. require_relative "application" # Initialize the Rails application. Rails.application.initialize!
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/examples/ranking/config/puma.rb
examples/ranking/config/puma.rb
# Puma can serve each request in a thread from an internal thread pool. # The `threads` method setting takes two numbers: a minimum and maximum. # Any libraries that use thread pools should be configured to match # the maximum value specified for Puma. Default is set to 5 threads for minimum # and maximum; this matches...
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/examples/ranking/config/routes.rb
examples/ranking/config/routes.rb
Rails.application.routes.draw do # Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html # Defines the root path route ("/") # root "articles#index" end
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/examples/ranking/config/boot.rb
examples/ranking/config/boot.rb
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) require "bundler/setup" # Set up gems listed in the Gemfile. require "bootsnap/setup" # Speed up boot time by caching expensive operations.
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/examples/ranking/config/initializers/filter_parameter_logging.rb
examples/ranking/config/initializers/filter_parameter_logging.rb
# Be sure to restart your server when you modify this file. # Configure parameters to be filtered from the log file. Use this to limit dissemination of # sensitive information. See the ActiveSupport::ParameterFilter documentation for supported # notations and behaviors. Rails.application.config.filter_parameters += [ ...
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/examples/ranking/config/initializers/timescale.rb
examples/ranking/config/initializers/timescale.rb
require 'timescaledb' require 'scenic' ActiveSupport.on_load(:active_record) { extend Timescaledb::ActsAsHypertable }
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/examples/ranking/config/initializers/inflections.rb
examples/ranking/config/initializers/inflections.rb
# Be sure to restart your server when you modify this file. # Add new inflection rules using the following format. Inflections # are locale specific, and you may define rules for as many different # locales as you wish. All of these examples are active by default: # ActiveSupport::Inflector.inflections(:en) do |inflec...
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/examples/ranking/config/initializers/cors.rb
examples/ranking/config/initializers/cors.rb
# Be sure to restart your server when you modify this file. # Avoid CORS issues when API is called from the frontend app. # Handle Cross-Origin Resource Sharing (CORS) in order to accept cross-origin AJAX requests. # Read more: https://github.com/cyu/rack-cors # Rails.application.config.middleware.insert_before 0, R...
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/examples/ranking/config/environments/test.rb
examples/ranking/config/environments/test.rb
require "active_support/core_ext/integer/time" # The test environment is used exclusively to run your application's # test suite. You never need to work with it otherwise. Remember that # your test database is "scratch space" for the test suite and is wiped # and recreated between test runs. Don't rely on the data the...
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/examples/ranking/config/environments/development.rb
examples/ranking/config/environments/development.rb
require "active_support/core_ext/integer/time" Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # In the development environment your application's code is reloaded any time # it changes. This slows down response time but is perfect for developme...
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/examples/ranking/config/environments/production.rb
examples/ranking/config/environments/production.rb
require "active_support/core_ext/integer/time" Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # Code is not reloaded between requests. config.cache_classes = true # Eager load code on boot. This eager loads most of Rails and # your applica...
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/examples/chatgpt/openai-cli.rb
examples/chatgpt/openai-cli.rb
require 'bundler/inline' gemfile(true) do source 'https://rubygems.org' gem 'timescaledb', path: '../../' #git: 'https://github.com/jonatas/timescaledb.git' gem 'rest-client' gem 'pry' gem 'markdown' gem 'rouge' gem 'redcarpet' gem 'tty-markdown' gem 'tty-link' gem 'readline' gem 'ruby-openai' en...
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/examples/all_in_one/benchmark_comparison.rb
examples/all_in_one/benchmark_comparison.rb
require 'bundler/inline' #require only what you need gemfile(true) do gem 'timescaledb', path: '../..' gem 'pry' gem 'faker' gem 'benchmark-ips', require: "benchmark/ips", git: 'https://github.com/evanphx/benchmark-ips' end require 'pp' require 'benchmark' # ruby all_in_one.rb postgres://user:pass@host:port...
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/examples/all_in_one/query_data.rb
examples/all_in_one/query_data.rb
require 'bundler/inline' #require only what you need gemfile(true) do gem 'timescaledb', path: '../..' gem 'pry' gem 'faker' end require 'pp' # ruby all_in_one.rb postgres://user:pass@host:port/db_name ActiveRecord::Base.establish_connection( ARGV.last) # Simple example class Event < ActiveRecord::Base self...
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/examples/all_in_one/all_in_one.rb
examples/all_in_one/all_in_one.rb
require 'bundler/inline' #require only what you need gemfile(true) do gem 'timescaledb', path: '../..' gem 'pry' gem 'faker' end require 'timescaledb' require 'pp' require 'pry' # ruby all_in_one.rb postgres://user:pass@host:port/db_name ActiveRecord::Base.establish_connection( ARGV.last) # Simple example cl...
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/examples/all_in_one/caggs.rb
examples/all_in_one/caggs.rb
require 'bundler/inline' #require only what you need gemfile(true) do gem 'timescaledb', path: '../..' gem 'pry' end require 'pp' # ruby caggs.rb postgres://user:pass@host:port/db_name ActiveRecord::Base.establish_connection( ARGV.last) class Tick < ActiveRecord::Base self.table_name = 'ticks' self.primary...
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/lib/timescaledb.rb
lib/timescaledb.rb
require 'active_record' require_relative 'timescaledb/application_record' require_relative 'timescaledb/acts_as_hypertable' require_relative 'timescaledb/acts_as_hypertable/core' require_relative 'timescaledb/continuous_aggregates_helper' require_relative 'timescaledb/connection' require_relative 'timescaledb/toolkit'...
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/lib/timescaledb/chunk.rb
lib/timescaledb/chunk.rb
module Timescaledb class Chunk < ::Timescaledb::ApplicationRecord self.table_name = "timescaledb_information.chunks" self.primary_key = "chunk_name" belongs_to :hypertable, foreign_key: :hypertable_name scope :compressed, -> { where(is_compressed: true) } scope :uncompressed, -> { where(is_compr...
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/lib/timescaledb/version.rb
lib/timescaledb/version.rb
module Timescaledb VERSION = '0.3.2' end
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/lib/timescaledb/stats_report.rb
lib/timescaledb/stats_report.rb
require "active_support/core_ext/numeric/conversions" module Timescaledb module StatsReport module_function def resume(scope=Hypertable.all) base_filter = {hypertable_name: scope.pluck(:hypertable_name)} { hypertables: { count: scope.count, uncompressed: scope.to_a.cou...
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/lib/timescaledb/hypertable.rb
lib/timescaledb/hypertable.rb
require 'ostruct' module Timescaledb class Hypertable < ::Timescaledb::ApplicationRecord self.table_name = "timescaledb_information.hypertables" self.primary_key = "hypertable_name" has_many :jobs, foreign_key: "hypertable_name" has_many :chunks, foreign_key: "hypertable_name" has_many :compres...
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/lib/timescaledb/job_stats.rb
lib/timescaledb/job_stats.rb
module Timescaledb class JobStat < ::Timescaledb::ApplicationRecord self.table_name = "timescaledb_information.job_stats" belongs_to :job # attribute :last_run_duration, :interval scope :success, -> { where(last_run_status: "Success") } scope :scheduled, -> { where(job_status: "Scheduled") } ...
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/lib/timescaledb/acts_as_hypertable.rb
lib/timescaledb/acts_as_hypertable.rb
# frozen_string_literal: true module Timescaledb # If you want your model to hook into its underlying hypertable # as well as have access to TimescaleDB specific data, methods, and more, # specify this macro in your model. # # @note Your model's table needs to have already been converted to a hypertable # ...
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/lib/timescaledb/migration_helpers.rb
lib/timescaledb/migration_helpers.rb
require 'active_record/connection_adapters/postgresql_adapter' # Useful methods to run TimescaleDB in you Ruby app. module Timescaledb # Migration helpers can help you to setup hypertables by default. module MigrationHelpers # `create_table` accepts a `hypertable` argument with options for creating # a Tim...
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/lib/timescaledb/stats.rb
lib/timescaledb/stats.rb
require_relative './stats/continuous_aggregates' require_relative './stats/hypertables' require_relative './stats/job_stats' module Timescaledb class Stats # @param [Array<OpenStruct>] hypertables The list of hypertables. # @param [Timescaledb:Connection] connection The PG connection. def initialize(hype...
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/lib/timescaledb/connection_handling.rb
lib/timescaledb/connection_handling.rb
module Timescaledb class ConnectionNotEstablishedError < StandardError; end module_function # @param [String] config with the postgres connection string. def establish_connection(config) # Establish connection for Timescaledb Connection.instance.config = config # Also establish connection f...
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/lib/timescaledb/continuous_aggregates.rb
lib/timescaledb/continuous_aggregates.rb
module Timescaledb class ContinuousAggregates < ::Timescaledb::ApplicationRecord self.table_name = "timescaledb_information.continuous_aggregates" self.primary_key = 'materialization_hypertable_name' has_many :jobs, foreign_key: "hypertable_name", class_name: "Timescaledb::Job" has_many :chunk...
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/lib/timescaledb/compression_settings.rb
lib/timescaledb/compression_settings.rb
module Timescaledb class CompressionSetting < ::Timescaledb::ApplicationRecord self.table_name = "timescaledb_information.compression_settings" belongs_to :hypertable, foreign_key: :hypertable_name end CompressionSettings = CompressionSetting end
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/lib/timescaledb/schema_dumper.rb
lib/timescaledb/schema_dumper.rb
require 'active_record/connection_adapters/postgresql_adapter' require 'active_support/core_ext/string/indent' module Timescaledb # Schema dumper overrides default schema dumper to include: # * hypertables # * retention policies # * continuous aggregates # * compression settings # It also ignores Timescale...
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/lib/timescaledb/connection.rb
lib/timescaledb/connection.rb
require 'singleton' require 'ostruct' module Timescaledb # Minimal connection setup for Timescaledb directly with the PG. # The concept is use a singleton component that can query # independently of the ActiveRecord::Base connections. # This is useful for the extension and hypertable metadata. # It can also ...
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/lib/timescaledb/application_record.rb
lib/timescaledb/application_record.rb
# frozen_string_literal: true module Timescaledb class ApplicationRecord < ::ActiveRecord::Base self.abstract_class = true end end
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/lib/timescaledb/continuous_aggregates_helper.rb
lib/timescaledb/continuous_aggregates_helper.rb
module Timescaledb module ContinuousAggregatesHelper extend ActiveSupport::Concern included do class_attribute :rollup_rules, default: { /count\(\*\)\s+as\s+(\w+)/ => 'sum(\1) as \1', /sum\((\w+)\)\s+as\s+(\w+)/ => 'sum(\2) as \2', /min\((\w+)\)\s+as\s+(\w+)/ => 'min(\2) as \2',...
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/lib/timescaledb/toolkit.rb
lib/timescaledb/toolkit.rb
require_relative "toolkit/helpers" require_relative "toolkit/time_vector"
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/lib/timescaledb/extension.rb
lib/timescaledb/extension.rb
module Timescaledb # Provides metadata around the extension in the database module Extension module_function # @return String version of the timescaledb extension def version @version ||= Timescaledb.connection.query_first(<<~SQL)&.version SELECT extversion as version FROM pg_exte...
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/lib/timescaledb/job.rb
lib/timescaledb/job.rb
module Timescaledb class Job < ::Timescaledb::ApplicationRecord self.table_name = "timescaledb_information.jobs" self.primary_key = "job_id" scope :compression, -> { where(proc_name: [:tsbs_compress_chunks, :policy_compression]) } scope :refresh_continuous_aggregate, -> { where(proc_name: :policy_ref...
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/lib/timescaledb/dimensions.rb
lib/timescaledb/dimensions.rb
module Timescaledb class Dimension < ::Timescaledb::ApplicationRecord self.table_name = "timescaledb_information.dimensions" # attribute :time_interval, :interval end Dimensions = Dimension end
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/lib/timescaledb/database.rb
lib/timescaledb/database.rb
require_relative 'database/chunk_statements' require_relative 'database/hypertable_statements' require_relative 'database/quoting' require_relative 'database/schema_statements' require_relative 'database/types' module Timescaledb class Database extend ChunkStatements extend HypertableStatements extend Qu...
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/lib/timescaledb/toolkit/helpers.rb
lib/timescaledb/toolkit/helpers.rb
require 'active_record/connection_adapters/postgresql_adapter' # Useful methods to run TimescaleDB with Toolkit functions in you Ruby app. module Timescaledb # Helpers methods to setup queries that uses the toolkit. module Toolkit module Helpers # Includes toolkit_experimental in the search path to make...
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/lib/timescaledb/toolkit/time_vector.rb
lib/timescaledb/toolkit/time_vector.rb
# frozen_string_literal: true module Timescaledb module Toolkit module TimeVector def self.included(base) base.extend(ClassMethods) end module ClassMethods def value_column @value_column ||= hypertable_options[:value_column] || :val end def time_colum...
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/lib/timescaledb/scenic/adapter.rb
lib/timescaledb/scenic/adapter.rb
require 'scenic/adapters/postgres' require 'scenic/adapters/postgres/views' module Timescaledb module Scenic class Views < ::Scenic::Adapters::Postgres::Views # All of the views that this connection has defined, excluding any # Timescale continuous aggregates. Those should be defined using # +c...
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/lib/timescaledb/scenic/extension.rb
lib/timescaledb/scenic/extension.rb
# Scenic does not include `WITH` option that is used with continuous aggregates. module Timescaledb module Scenic module Extension # @override Scenic::Adapters::Postgres#create_materialized_view # Creates a materialized view in the database # # @param name The name of the materialized view...
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/lib/timescaledb/stats/job_stats.rb
lib/timescaledb/stats/job_stats.rb
module Timescaledb class Stats class JobStats # @param [Timescaledb:Connection] connection The PG connection. def initialize(connection = Timescaledb.connection) @connection = connection end delegate :query_first, to: :@connection # @return [Hash] The job_stats stats ...
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/lib/timescaledb/stats/hypertables.rb
lib/timescaledb/stats/hypertables.rb
require_relative './chunks' module Timescaledb class Stats class Hypertables # @param [Timescaledb:Connection] connection The PG connection. # @param [Array<String>] hypertables The list of hypertable names. def initialize(hypertables = [], connection = Timescaledb.connection) @connecti...
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/lib/timescaledb/stats/continuous_aggregates.rb
lib/timescaledb/stats/continuous_aggregates.rb
module Timescaledb class Stats class ContinuousAggregates # @param [Timescaledb:Connection] connection The PG connection. def initialize(connection = Timescaledb.connection) @connection = connection end delegate :query_count, to: :@connection # @return [Hash] The continuou...
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/lib/timescaledb/stats/chunks.rb
lib/timescaledb/stats/chunks.rb
module Timescaledb class Stats class Chunks # @param [Array<String>] hypertables The list of hypertable names. # @param [Timescaledb:Connection] connection The PG connection. def initialize(hypertables = [], connection = Timescaledb.connection) @connection = connection @hypertabl...
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/lib/timescaledb/acts_as_hypertable/core.rb
lib/timescaledb/acts_as_hypertable/core.rb
# frozen_string_literal: true module Timescaledb module ActsAsHypertable module Core def self.included(base) base.extend(ClassMethods) end module ClassMethods def time_column @time_column ||= hypertable_options[:time_column] || :created_at end protect...
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/lib/timescaledb/database/schema_statements.rb
lib/timescaledb/database/schema_statements.rb
module Timescaledb class Database module SchemaStatements # @see https://docs.timescale.com/api/latest/hypertable/create_hypertable/#create_hypertable # # @param [String] relation The identifier of the table to convert to hypertable # @param [String] time_column_name The name of the column...
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/lib/timescaledb/database/types.rb
lib/timescaledb/database/types.rb
module Timescaledb class Database module Types # @param [String, Integer] interval The interval value # @return [String] def interval_to_sql(interval) return 'NULL' if interval.nil? return interval if interval.kind_of?(Integer) "INTERVAL #{quote(interval)}" end ...
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/lib/timescaledb/database/quoting.rb
lib/timescaledb/database/quoting.rb
module Timescaledb class Database module Quoting # Quotes given value and escapes single quote and backslash characters. # # @return [String] The given value between quotes def quote(value) "'#{value.gsub("\\", '\&\&').gsub("'", "''")}'" end end end end
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/lib/timescaledb/database/hypertable_statements.rb
lib/timescaledb/database/hypertable_statements.rb
module Timescaledb class Database module HypertableStatements # @see https://docs.timescale.com/api/latest/hypertable/hypertable_size/ # # @param [String] hypertable The hypertable to show size of # @return [String] The hypertable_size SQL statement def hypertable_size_sql(hypertable...
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
timescale/timescaledb-ruby
https://github.com/timescale/timescaledb-ruby/blob/e15cabd97d1b0901abedea39c4443386b305f184/lib/timescaledb/database/chunk_statements.rb
lib/timescaledb/database/chunk_statements.rb
module Timescaledb class Database module ChunkStatements # @see https://docs.timescale.com/api/latest/compression/compress_chunk/ # # @param [String] chunk_name The name of the chunk to be compressed # @return [String] The compress_chunk SQL statement def compress_chunk_sql(chunk_nam...
ruby
MIT
e15cabd97d1b0901abedea39c4443386b305f184
2026-01-04T17:50:22.541182Z
false
kumogata/kumogata
https://github.com/kumogata/kumogata/blob/1c4eadd07e9bf2d7bdef6333a993f7096adcec97/spec/kumogata_convert_spec.rb
spec/kumogata_convert_spec.rb
describe 'Kumogata::Client#convert' do it 'convert Ruby template to JSON template' do template = <<-EOS Resources do myEC2Instance do Type "AWS::EC2::Instance" Properties do ImageId "ami-XXXXXXXX" InstanceType "t1.micro" end end end Outputs do AZ do Value do Fn__GetAtt "my...
ruby
MIT
1c4eadd07e9bf2d7bdef6333a993f7096adcec97
2026-01-04T17:51:03.061350Z
true
kumogata/kumogata
https://github.com/kumogata/kumogata/blob/1c4eadd07e9bf2d7bdef6333a993f7096adcec97/spec/kumogata_update_spec.rb
spec/kumogata_update_spec.rb
describe 'Kumogata::Client#update' do it 'update a stack from Ruby template' do template = <<-EOS Resources do myEC2Instance do Type "AWS::EC2::Instance" Properties do ImageId "ami-XXXXXXXX" InstanceType "t1.micro" end end end Outputs do AZ do Value do Fn__GetAtt "myEC2Ins...
ruby
MIT
1c4eadd07e9bf2d7bdef6333a993f7096adcec97
2026-01-04T17:51:03.061350Z
false
kumogata/kumogata
https://github.com/kumogata/kumogata/blob/1c4eadd07e9bf2d7bdef6333a993f7096adcec97/spec/kumogata_list_spec.rb
spec/kumogata_list_spec.rb
describe 'Kumogata::Client#list' do it 'list stacks' do json = run_client(:list) do |client, cf| stack1 = make_double('stack1') do |obj| expect(obj).to receive(:name) { 'stack1' } expect(obj).to receive(:creation_time) { '2014-03-02 16:17:18 UTC' } expect(obj).to receive(:status) { '...
ruby
MIT
1c4eadd07e9bf2d7bdef6333a993f7096adcec97
2026-01-04T17:51:03.061350Z
false
kumogata/kumogata
https://github.com/kumogata/kumogata/blob/1c4eadd07e9bf2d7bdef6333a993f7096adcec97/spec/kumogata_show_events_spec.rb
spec/kumogata_show_events_spec.rb
describe 'Kumogata::Client#show_events' do it 'show events' do resources = run_client(:show_events, :arguments => ['MyStack']) do |client, cf| event = make_double('event') do |obj| expect(obj).to receive(:event_id) { "f45e6070-a4f7-11e3-9326-5088487c4896" } expect(obj).to receive(:logical_r...
ruby
MIT
1c4eadd07e9bf2d7bdef6333a993f7096adcec97
2026-01-04T17:51:03.061350Z
false
kumogata/kumogata
https://github.com/kumogata/kumogata/blob/1c4eadd07e9bf2d7bdef6333a993f7096adcec97/spec/string_stream_spec.rb
spec/string_stream_spec.rb
describe Kumogata::StringStream do it 'pass the line ("\n")' do lines = [] sstream = Kumogata::StringStream.new do |line| lines << line end sstream.push("chunk1") sstream.push("chunk2\n") sstream.push("chunk3") sstream.push("chunk4") sstream.push("chunk5\n") sstream.push("\...
ruby
MIT
1c4eadd07e9bf2d7bdef6333a993f7096adcec97
2026-01-04T17:51:03.061350Z
false
kumogata/kumogata
https://github.com/kumogata/kumogata/blob/1c4eadd07e9bf2d7bdef6333a993f7096adcec97/spec/kumogata_create_spec.rb
spec/kumogata_create_spec.rb
describe 'Kumogata::Client#create' do it 'create a stack from Ruby template' do template = <<-EOS Resources do myEC2Instance do Type "AWS::EC2::Instance" Properties do ImageId "ami-XXXXXXXX" InstanceType "t1.micro" end end end Outputs do AZ do Value do Fn__GetAtt "myEC2Ins...
ruby
MIT
1c4eadd07e9bf2d7bdef6333a993f7096adcec97
2026-01-04T17:51:03.061350Z
true
kumogata/kumogata
https://github.com/kumogata/kumogata/blob/1c4eadd07e9bf2d7bdef6333a993f7096adcec97/spec/kumogata_validate_spec.rb
spec/kumogata_validate_spec.rb
describe 'Kumogata::Client#validate' do it 'validate Ruby template (without error)' do template = <<-EOS Resources do myEC2Instance do Type "AWS::EC2::Instance" Properties do ImageId "ami-XXXXXXXX" InstanceType "t1.micro" end end end Outputs do AZ do Value do Fn__GetAtt "m...
ruby
MIT
1c4eadd07e9bf2d7bdef6333a993f7096adcec97
2026-01-04T17:51:03.061350Z
false
kumogata/kumogata
https://github.com/kumogata/kumogata/blob/1c4eadd07e9bf2d7bdef6333a993f7096adcec97/spec/kumogata_delete_spec.rb
spec/kumogata_delete_spec.rb
describe 'Kumogata::Client#delete' do it 'update a stack from Ruby template' do run_client(:delete, :arguments => ['MyStack'], :options => {:force => true}) do |client, cf| expect(client).to receive(:print_event_log).once expect(client).to receive(:create_event_log).once stack = make_double('st...
ruby
MIT
1c4eadd07e9bf2d7bdef6333a993f7096adcec97
2026-01-04T17:51:03.061350Z
false
kumogata/kumogata
https://github.com/kumogata/kumogata/blob/1c4eadd07e9bf2d7bdef6333a993f7096adcec97/spec/kumogata_show_resources_spec.rb
spec/kumogata_show_resources_spec.rb
describe 'Kumogata::Client#show_resources' do it 'show resources' do resources = run_client(:show_resources, :arguments => ['MyStack']) do |client, cf| stack = make_double('stack') do |obj| expect(obj).to receive(:status) { 'CREATE_COMPLETE' } expect(obj).to receive(:resource_summaries).and...
ruby
MIT
1c4eadd07e9bf2d7bdef6333a993f7096adcec97
2026-01-04T17:51:03.061350Z
false
kumogata/kumogata
https://github.com/kumogata/kumogata/blob/1c4eadd07e9bf2d7bdef6333a993f7096adcec97/spec/kumogata_diff_spec.rb
spec/kumogata_diff_spec.rb
describe 'Kumogata::Client#diff' do let(:drupal_single_instance_template) do path = File.expand_path('../Drupal_Single_Instance.template', __FILE__) open(path) {|f| f.read } end let(:drupal_single_instance_template_rb) do path = File.expand_path('../Drupal_Single_Instance.template.rb', __FILE__) ...
ruby
MIT
1c4eadd07e9bf2d7bdef6333a993f7096adcec97
2026-01-04T17:51:03.061350Z
false
kumogata/kumogata
https://github.com/kumogata/kumogata/blob/1c4eadd07e9bf2d7bdef6333a993f7096adcec97/spec/kumogata_utils_spec.rb
spec/kumogata_utils_spec.rb
describe Kumogata::Utils do it 'should stringify the hash' do hash = { :foo => { 'bar' => ['1', 2, 3], 'zoo' => :value, }, 12 => :value2 } expect(Kumogata::Utils.stringify(hash)).to eq( { 'foo' => { 'bar' => ['1', '2', '3'], 'zoo' => 'va...
ruby
MIT
1c4eadd07e9bf2d7bdef6333a993f7096adcec97
2026-01-04T17:51:03.061350Z
false
kumogata/kumogata
https://github.com/kumogata/kumogata/blob/1c4eadd07e9bf2d7bdef6333a993f7096adcec97/spec/kumogata_crypt_spec.rb
spec/kumogata_crypt_spec.rb
describe Kumogata::Crypt do it 'encrypt string' do encrypted = Kumogata::Crypt.encrypt("my_password", "jugem jugem") decrypted = Kumogata::Crypt.decrypt("my_password", encrypted) expect(decrypted).to eq("jugem jugem") end it 'encrypt long string' do len = (RUBY_PLATFORM =~ /darwin/) ? 1 : 10 ...
ruby
MIT
1c4eadd07e9bf2d7bdef6333a993f7096adcec97
2026-01-04T17:51:03.061350Z
false
kumogata/kumogata
https://github.com/kumogata/kumogata/blob/1c4eadd07e9bf2d7bdef6333a993f7096adcec97/spec/Drupal_Single_Instance.template.rb
spec/Drupal_Single_Instance.template.rb
AWSTemplateFormatVersion "2010-09-09" Description (<<-EOS).undent AWS CloudFormation Sample Template Drupal_Single_Instance. Drupal is an open source content management platform powering millions of websites and applications. This template installs a singe instance deployment with a local MySQL database for st...
ruby
MIT
1c4eadd07e9bf2d7bdef6333a993f7096adcec97
2026-01-04T17:51:03.061350Z
false
kumogata/kumogata
https://github.com/kumogata/kumogata/blob/1c4eadd07e9bf2d7bdef6333a993f7096adcec97/spec/spec_helper.rb
spec/spec_helper.rb
require 'kumogata' require 'kumogata/argument_parser' require 'tempfile' require 'time' require 'timecop' require 'uuidtools' Kumogata::ENCRYPTION_PASSWORD.replace('EncryptionPassword') class UUIDTools::UUID def self.timestamp_create; 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'; end end class Kumogata::Utils def self...
ruby
MIT
1c4eadd07e9bf2d7bdef6333a993f7096adcec97
2026-01-04T17:51:03.061350Z
false
kumogata/kumogata
https://github.com/kumogata/kumogata/blob/1c4eadd07e9bf2d7bdef6333a993f7096adcec97/spec/kumogata_show_outputs_spec.rb
spec/kumogata_show_outputs_spec.rb
describe 'Kumogata::Client#show_outputs' do it 'show outputs' do outputs = run_client(:show_outputs, :arguments => ['MyStack']) do |client, cf| output = make_double('output') do |obj| expect(obj).to receive(:key) { 'AZ' } expect(obj).to receive(:value) { 'ap-northeast-1a' } end ...
ruby
MIT
1c4eadd07e9bf2d7bdef6333a993f7096adcec97
2026-01-04T17:51:03.061350Z
false
kumogata/kumogata
https://github.com/kumogata/kumogata/blob/1c4eadd07e9bf2d7bdef6333a993f7096adcec97/spec/kumogata_export_spec.rb
spec/kumogata_export_spec.rb
describe 'Kumogata::Client#export' do it 'export a template' do json = <<-EOS { "Resources": { "myEC2Instance": { "Type": "AWS::EC2::Instance", "Properties": { "ImageId": "ami-XXXXXXXX", "InstanceType": "t1.micro" } } }, "Outputs": { "AZ": { "Value": { ...
ruby
MIT
1c4eadd07e9bf2d7bdef6333a993f7096adcec97
2026-01-04T17:51:03.061350Z
false
kumogata/kumogata
https://github.com/kumogata/kumogata/blob/1c4eadd07e9bf2d7bdef6333a993f7096adcec97/lib/kumogata.rb
lib/kumogata.rb
module Kumogata; end require 'kumogata/version' require 'aws-sdk-v1' require 'base64' require 'coderay' require 'coffee-script' require 'diffy' require 'dslh' require 'hashie' require 'highline/import' require 'json' require 'json5' require 'logger' require 'net/ssh' require 'open-uri' require 'open3' require 'optpars...
ruby
MIT
1c4eadd07e9bf2d7bdef6333a993f7096adcec97
2026-01-04T17:51:03.061350Z
false
kumogata/kumogata
https://github.com/kumogata/kumogata/blob/1c4eadd07e9bf2d7bdef6333a993f7096adcec97/lib/kumogata/v8_object_ext.rb
lib/kumogata/v8_object_ext.rb
class V8::Object def to_hash to_hash0(self) end def to_hash0(obj) case obj when V8::Array obj.map {|v| to_hash0(v) } when V8::Object h = {} obj.each do |k, v| h[to_hash0(k)] = to_hash0(v) end h else obj end end end
ruby
MIT
1c4eadd07e9bf2d7bdef6333a993f7096adcec97
2026-01-04T17:51:03.061350Z
false
kumogata/kumogata
https://github.com/kumogata/kumogata/blob/1c4eadd07e9bf2d7bdef6333a993f7096adcec97/lib/kumogata/version.rb
lib/kumogata/version.rb
module Kumogata VERSION = '0.5.12' end
ruby
MIT
1c4eadd07e9bf2d7bdef6333a993f7096adcec97
2026-01-04T17:51:03.061350Z
false
kumogata/kumogata
https://github.com/kumogata/kumogata/blob/1c4eadd07e9bf2d7bdef6333a993f7096adcec97/lib/kumogata/argument_parser.rb
lib/kumogata/argument_parser.rb
Version = Kumogata::VERSION $kumogata = Hashie::Mash.new class Kumogata::ArgumentParser DEFAULT_OPTIONS = { :delete_stack => true, :result_log => File.join(Dir.pwd, 'result.json'), :command_result_log => File.join(Dir.pwd, 'command_result.json'), :color => $stdout.tty?, :debug => false, :conf...
ruby
MIT
1c4eadd07e9bf2d7bdef6333a993f7096adcec97
2026-01-04T17:51:03.061350Z
false
kumogata/kumogata
https://github.com/kumogata/kumogata/blob/1c4eadd07e9bf2d7bdef6333a993f7096adcec97/lib/kumogata/logger.rb
lib/kumogata/logger.rb
module Kumogata def self.logger Kumogata::Logger.instance end class Logger < ::Logger include Singleton def initialize super($stdout) self.formatter = proc do |severity, datetime, progname, msg| "#{msg}\n" end self.level = Logger::INFO end def set_debug(val...
ruby
MIT
1c4eadd07e9bf2d7bdef6333a993f7096adcec97
2026-01-04T17:51:03.061350Z
false
kumogata/kumogata
https://github.com/kumogata/kumogata/blob/1c4eadd07e9bf2d7bdef6333a993f7096adcec97/lib/kumogata/utils.rb
lib/kumogata/utils.rb
class Kumogata::Utils class << self def camelize(str) str.to_s.split(/[-_]/).map {|i| i[0, 1].upcase + i[1..-1].downcase }.join end def get_user_host user = `whoami`.strip rescue '' host = `hostname`.strip rescue '' user_host = [user, host].select {|i| not i.empty? }...
ruby
MIT
1c4eadd07e9bf2d7bdef6333a993f7096adcec97
2026-01-04T17:51:03.061350Z
false
kumogata/kumogata
https://github.com/kumogata/kumogata/blob/1c4eadd07e9bf2d7bdef6333a993f7096adcec97/lib/kumogata/string_stream.rb
lib/kumogata/string_stream.rb
class Kumogata::StringStream def initialize(&block) @buf = StringScanner.new('') @block = block @fiber = Fiber.new do self.run end # Step to `yield` @fiber.resume end def run loop do chunk = Fiber.yield break unless chunk @buf << chunk.to_s self.each_l...
ruby
MIT
1c4eadd07e9bf2d7bdef6333a993f7096adcec97
2026-01-04T17:51:03.061350Z
false
kumogata/kumogata
https://github.com/kumogata/kumogata/blob/1c4eadd07e9bf2d7bdef6333a993f7096adcec97/lib/kumogata/post_processing.rb
lib/kumogata/post_processing.rb
class Kumogata::PostProcessing TRIGGER_TIMING = [:create, :update] def initialize(options) @options = options @commands = {} @command_options = { :undent => true, :trim_mode => nil, } end def fetch!(template) _post = template.delete(:_post) return unless _post opti...
ruby
MIT
1c4eadd07e9bf2d7bdef6333a993f7096adcec97
2026-01-04T17:51:03.061350Z
false
kumogata/kumogata
https://github.com/kumogata/kumogata/blob/1c4eadd07e9bf2d7bdef6333a993f7096adcec97/lib/kumogata/crypt.rb
lib/kumogata/crypt.rb
class Kumogata::Crypt ALGORITHM = 'aes256' PASSWORD_CHARS = 'abcdefghjkmnpqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ123456789_*;:@{}()[]#$%&=-' class << self def encrypt(pass, str) IO.popen("openssl enc -e -#{ALGORITHM} -pass pass:#{enquote(pass)}", "r+") {|io| io.print str io.close_write ...
ruby
MIT
1c4eadd07e9bf2d7bdef6333a993f7096adcec97
2026-01-04T17:51:03.061350Z
false
kumogata/kumogata
https://github.com/kumogata/kumogata/blob/1c4eadd07e9bf2d7bdef6333a993f7096adcec97/lib/kumogata/pre_processing.rb
lib/kumogata/pre_processing.rb
# TODO:
ruby
MIT
1c4eadd07e9bf2d7bdef6333a993f7096adcec97
2026-01-04T17:51:03.061350Z
false
kumogata/kumogata
https://github.com/kumogata/kumogata/blob/1c4eadd07e9bf2d7bdef6333a993f7096adcec97/lib/kumogata/client.rb
lib/kumogata/client.rb
class Kumogata::Client def initialize(options) @options = options @options = Hashie::Mash.new(@options) unless @options.kind_of?(Hashie::Mash) @cloud_formation = AWS::CloudFormation.new @outputs_filter = Kumogata::OutputsFilter.new(@options) @post_processing = Kumogata::PostProcessing.new(@options...
ruby
MIT
1c4eadd07e9bf2d7bdef6333a993f7096adcec97
2026-01-04T17:51:03.061350Z
false
kumogata/kumogata
https://github.com/kumogata/kumogata/blob/1c4eadd07e9bf2d7bdef6333a993f7096adcec97/lib/kumogata/outputs_filter.rb
lib/kumogata/outputs_filter.rb
class Kumogata::OutputsFilter def initialize(options) @options = options end def fetch!(template) @filter = template.delete(:_outputs_filter) end def filter!(outputs) @filter.call(outputs) if @filter return outputs end end
ruby
MIT
1c4eadd07e9bf2d7bdef6333a993f7096adcec97
2026-01-04T17:51:03.061350Z
false
kumogata/kumogata
https://github.com/kumogata/kumogata/blob/1c4eadd07e9bf2d7bdef6333a993f7096adcec97/lib/kumogata/ext/coderay_ext.rb
lib/kumogata/ext/coderay_ext.rb
CodeRay::Encoders::Terminal::TOKEN_COLORS[:constant] = "\e[1;34m" CodeRay::Encoders::Terminal::TOKEN_COLORS[:float] = "\e[36m" CodeRay::Encoders::Terminal::TOKEN_COLORS[:integer] = "\e[36m" CodeRay::Encoders::Terminal::TOKEN_COLORS[:keyword] = "\e[1;31m" CodeRay::Encoders::Terminal::TOKEN_COLORS[:key] = { :self => "...
ruby
MIT
1c4eadd07e9bf2d7bdef6333a993f7096adcec97
2026-01-04T17:51:03.061350Z
false
kumogata/kumogata
https://github.com/kumogata/kumogata/blob/1c4eadd07e9bf2d7bdef6333a993f7096adcec97/lib/kumogata/ext/string_ext.rb
lib/kumogata/ext/string_ext.rb
class String @@colorize = false class << self def colorize=(value) @@colorize = value end def colorize @@colorize end end # of class methods Term::ANSIColor::Attribute.named_attributes.each do |attribute| class_eval(<<-EOS, __FILE__, __LINE__ + 1) def #{attribute.name} ...
ruby
MIT
1c4eadd07e9bf2d7bdef6333a993f7096adcec97
2026-01-04T17:51:03.061350Z
false
kumogata/kumogata
https://github.com/kumogata/kumogata/blob/1c4eadd07e9bf2d7bdef6333a993f7096adcec97/lib/kumogata/ext/json_ext.rb
lib/kumogata/ext/json_ext.rb
module JSON class << self alias pretty_generate_orig pretty_generate def pretty_generate(object, options = nil) begin pretty_generate_orig(object, options) rescue JSON::NestingError => e e.message << ': Undefined function may have been referenced [e.g. _user_data()/_join()]' ...
ruby
MIT
1c4eadd07e9bf2d7bdef6333a993f7096adcec97
2026-01-04T17:51:03.061350Z
false
nebulab/pulsar
https://github.com/nebulab/pulsar/blob/fd8d081653f70517e0d40e71611aede8814ab1d8/spec/spec_helper.rb
spec/spec_helper.rb
require 'support/coverage_setup' require 'rspec' require 'stringio' require 'fileutils' require 'timecop' require 'tmpdir' require 'pulsar' RSpec.configure do |config| config.mock_with :rspec config.raise_errors_for_deprecations! config.add_setting :pulsar_command config.add_setting :pulsar_conf_path config...
ruby
MIT
fd8d081653f70517e0d40e71611aede8814ab1d8
2026-01-04T17:51:14.324688Z
false
nebulab/pulsar
https://github.com/nebulab/pulsar/blob/fd8d081653f70517e0d40e71611aede8814ab1d8/spec/support/coverage_setup.rb
spec/support/coverage_setup.rb
require 'simplecov' require 'coveralls' SimpleCov.formatters = [ SimpleCov::Formatter::HTMLFormatter, Coveralls::SimpleCov::Formatter ] # Save to CircleCI's artifacts directory if we're on CircleCI if ENV['CIRCLE_ARTIFACTS'] dir = File.join(ENV['CIRCLE_ARTIFACTS'], "coverage") SimpleCov.coverage_dir(dir) end ...
ruby
MIT
fd8d081653f70517e0d40e71611aede8814ab1d8
2026-01-04T17:51:14.324688Z
false
nebulab/pulsar
https://github.com/nebulab/pulsar/blob/fd8d081653f70517e0d40e71611aede8814ab1d8/spec/support/dummies/conf/wrong_cap/apps/deploy.rb
spec/support/dummies/conf/wrong_cap/apps/deploy.rb
# Defaults deployrb
ruby
MIT
fd8d081653f70517e0d40e71611aede8814ab1d8
2026-01-04T17:51:14.324688Z
false
nebulab/pulsar
https://github.com/nebulab/pulsar/blob/fd8d081653f70517e0d40e71611aede8814ab1d8/spec/support/dummies/conf/wrong_cap/apps/blog/production.rb
spec/support/dummies/conf/wrong_cap/apps/blog/production.rb
# Production config server 'blog.com', user: 'deploy', roles: %w{web app db}, primary: true set :stage, :production
ruby
MIT
fd8d081653f70517e0d40e71611aede8814ab1d8
2026-01-04T17:51:14.324688Z
false
nebulab/pulsar
https://github.com/nebulab/pulsar/blob/fd8d081653f70517e0d40e71611aede8814ab1d8/spec/support/dummies/conf/wrong_cap/apps/blog/deploy.rb
spec/support/dummies/conf/wrong_cap/apps/blog/deploy.rb
# App Defaults deployrb set :application, 'blog' set :repo_url, 'git@example.com:me/blog.git'
ruby
MIT
fd8d081653f70517e0d40e71611aede8814ab1d8
2026-01-04T17:51:14.324688Z
false
nebulab/pulsar
https://github.com/nebulab/pulsar/blob/fd8d081653f70517e0d40e71611aede8814ab1d8/spec/support/dummies/conf/wrong_bundle/apps/deploy.rb
spec/support/dummies/conf/wrong_bundle/apps/deploy.rb
# Defaults deployrb
ruby
MIT
fd8d081653f70517e0d40e71611aede8814ab1d8
2026-01-04T17:51:14.324688Z
false
nebulab/pulsar
https://github.com/nebulab/pulsar/blob/fd8d081653f70517e0d40e71611aede8814ab1d8/spec/support/dummies/conf/wrong_bundle/apps/blog/production.rb
spec/support/dummies/conf/wrong_bundle/apps/blog/production.rb
# Production config server 'blog.com', user: 'deploy', roles: %w{web app db}, primary: true set :stage, :production
ruby
MIT
fd8d081653f70517e0d40e71611aede8814ab1d8
2026-01-04T17:51:14.324688Z
false
nebulab/pulsar
https://github.com/nebulab/pulsar/blob/fd8d081653f70517e0d40e71611aede8814ab1d8/spec/support/dummies/conf/wrong_bundle/apps/blog/deploy.rb
spec/support/dummies/conf/wrong_bundle/apps/blog/deploy.rb
# App Defaults deployrb set :application, 'blog' set :repo_url, 'git@example.com:me/blog.git'
ruby
MIT
fd8d081653f70517e0d40e71611aede8814ab1d8
2026-01-04T17:51:14.324688Z
false
nebulab/pulsar
https://github.com/nebulab/pulsar/blob/fd8d081653f70517e0d40e71611aede8814ab1d8/spec/support/dummies/conf/dir/apps/deploy.rb
spec/support/dummies/conf/dir/apps/deploy.rb
# Defaults deployrb
ruby
MIT
fd8d081653f70517e0d40e71611aede8814ab1d8
2026-01-04T17:51:14.324688Z
false
nebulab/pulsar
https://github.com/nebulab/pulsar/blob/fd8d081653f70517e0d40e71611aede8814ab1d8/spec/support/dummies/conf/dir/apps/ecommerce/staging.rb
spec/support/dummies/conf/dir/apps/ecommerce/staging.rb
ruby
MIT
fd8d081653f70517e0d40e71611aede8814ab1d8
2026-01-04T17:51:14.324688Z
false
nebulab/pulsar
https://github.com/nebulab/pulsar/blob/fd8d081653f70517e0d40e71611aede8814ab1d8/spec/support/dummies/conf/dir/apps/blog/staging.rb
spec/support/dummies/conf/dir/apps/blog/staging.rb
# Staging config server 'staging.blog.com', user: 'deploy', roles: %w{web app db}, primary: true set :stage, :staging
ruby
MIT
fd8d081653f70517e0d40e71611aede8814ab1d8
2026-01-04T17:51:14.324688Z
false
nebulab/pulsar
https://github.com/nebulab/pulsar/blob/fd8d081653f70517e0d40e71611aede8814ab1d8/spec/support/dummies/conf/dir/apps/blog/production.rb
spec/support/dummies/conf/dir/apps/blog/production.rb
# Production config server 'blog.com', user: 'deploy', roles: %w{web app db}, primary: true set :stage, :production
ruby
MIT
fd8d081653f70517e0d40e71611aede8814ab1d8
2026-01-04T17:51:14.324688Z
false
nebulab/pulsar
https://github.com/nebulab/pulsar/blob/fd8d081653f70517e0d40e71611aede8814ab1d8/spec/support/dummies/conf/dir/apps/blog/deploy.rb
spec/support/dummies/conf/dir/apps/blog/deploy.rb
# App Defaults deployrb set :application, 'blog' set :repo_url, 'git@example.com:me/blog.git'
ruby
MIT
fd8d081653f70517e0d40e71611aede8814ab1d8
2026-01-04T17:51:14.324688Z
false