source
stringclasses
1 value
repo
stringlengths
5
63
repo_url
stringlengths
24
82
path
stringlengths
5
167
language
stringclasses
1 value
license
stringclasses
5 values
stars
int64
10
51.4k
ref
stringclasses
23 values
size_bytes
int64
200
258k
text
stringlengths
137
258k
github
Gusto/apollo-federation-ruby
https://github.com/Gusto/apollo-federation-ruby
lib/apollo-federation/schema.rb
Ruby
mit
225
main
3,591
# frozen_string_literal: true require 'apollo-federation/entities_field' require 'apollo-federation/service_field' require 'apollo-federation/entity' require 'apollo-federation/federated_document_from_schema_definition.rb' module ApolloFederation module Schema IMPORTED_DIRECTIVES = ['inaccessible', 'tag'].freez...
github
Gusto/apollo-federation-ruby
https://github.com/Gusto/apollo-federation-ruby
lib/apollo-federation/federated_document_from_schema_definition.rb
Ruby
mit
225
main
3,695
# frozen_string_literal: true require 'graphql' require 'apollo-federation/service' module ApolloFederation class FederatedDocumentFromSchemaDefinition < GraphQL::Language::DocumentFromSchemaDefinition FEDERATION_TYPES = [ '_Any', '_Entity', '_Service', ].freeze FEDERATION_QUERY_FIELDS...
github
Gusto/apollo-federation-ruby
https://github.com/Gusto/apollo-federation-ruby
lib/apollo-federation/field.rb
Ruby
mit
225
main
2,172
# frozen_string_literal: true require 'apollo-federation/field_set_serializer' require 'apollo-federation/has_directives' module ApolloFederation module Field include HasDirectives VERSION_1_DIRECTIVES = %i[external requires provides].freeze VERSION_2_DIRECTIVES = %i[shareable inaccessible override tag...
github
Gusto/apollo-federation-ruby
https://github.com/Gusto/apollo-federation-ruby
lib/apollo-federation/field_set_serializer.rb
Ruby
mit
225
main
795
# frozen_string_literal: true require 'graphql' module ApolloFederation module FieldSetSerializer extend self def serialize(fields, camelize: true) case fields when Hash fields.map do |field, nested_selections| "#{camelize(field, camelize)} { #{serialize(nested_selections, cam...
github
Gusto/apollo-federation-ruby
https://github.com/Gusto/apollo-federation-ruby
lib/apollo-federation/scalar.rb
Ruby
mit
225
main
442
# frozen_string_literal: true require 'apollo-federation/has_directives' module ApolloFederation module Scalar def self.included(klass) klass.extend(ClassMethods) end module ClassMethods include HasDirectives def tag(name:) add_directive(name: 'tag', arguments: [name: 'name',...
github
Gusto/apollo-federation-ruby
https://github.com/Gusto/apollo-federation-ruby
lib/apollo-federation/tracing/node_map.rb
Ruby
mit
225
main
2,021
# frozen_string_literal: true require 'apollo-federation/tracing/proto' module ApolloFederation module Tracing # NodeMap stores a flat map of trace nodes by stringified paths # (i.e. "_entities.0.id") for fast lookup when we need to alter # nodes (to add end times or errors.) # # When adding a n...
github
Gusto/apollo-federation-ruby
https://github.com/Gusto/apollo-federation-ruby
lib/apollo-federation/tracing/proto.rb
Ruby
mit
225
main
303
# frozen_string_literal: true require_relative 'proto/apollo_pb' module ApolloFederation module Tracing Trace = ::Mdg::Engine::Proto::Trace Node = ::Mdg::Engine::Proto::Trace::Node Location = ::Mdg::Engine::Proto::Trace::Location Error = ::Mdg::Engine::Proto::Trace::Error end end
github
Gusto/apollo-federation-ruby
https://github.com/Gusto/apollo-federation-ruby
lib/apollo-federation/tracing/tracer.rb
Ruby
mit
225
main
10,037
# frozen_string_literal: true # Trace events are nested and fire in this order # for a simple single-field query like `{ foo }`: # # <execute_multiplex> # <lex></lex> # <parse></parse> # <validate></validate> # <analyze_multiplex> # <analyze_query></analyze_query> # </analyze_multiplex> # # <execute_qu...
github
Gusto/apollo-federation-ruby
https://github.com/Gusto/apollo-federation-ruby
lib/apollo-federation/tracing/proto/apollo_pb.rb
Ruby
mit
225
main
18,988
# frozen_string_literal: true # Generated by the protocol buffer compiler. DO NOT EDIT! # source: lib/apollo-federation/tracing/proto/apollo.proto require 'google/protobuf' require 'google/protobuf/timestamp_pb' descriptor_data = "\n0lib/apollo-federation/tracing/proto/apollo.proto\x12\x10mdg.engine.proto\x1a\x1fg...
github
Gusto/apollo-federation-ruby
https://github.com/Gusto/apollo-federation-ruby
spec/spec_helper.rb
Ruby
mit
225
main
5,237
# frozen_string_literal: true require 'pry-byebug' RSpec::Matchers.define :match_sdl do |expected| match do |actual| actual_without_comments = actual.chomp.gsub(/"""(.|\n)*"""/, '') expected_without_comments = expected.chomp.gsub(/"""(.|\n)*"""/, '') actual_without_comments == expected_without_comments...
github
Gusto/apollo-federation-ruby
https://github.com/Gusto/apollo-federation-ruby
spec/apollo-federation/field_set_serializer_spec.rb
Ruby
mit
225
main
1,978
# frozen_string_literal: true require 'spec_helper' require 'apollo-federation/field_set_serializer' RSpec.describe ApolloFederation::FieldSetSerializer do context 'when camelize is true' do let(:camelize) { true } it 'serializes symbols' do expect( described_class.serialize(:id, camelize: ca...
github
Gusto/apollo-federation-ruby
https://github.com/Gusto/apollo-federation-ruby
spec/apollo-federation/entities_field_spec.rb
Ruby
mit
225
main
22,806
# frozen_string_literal: true require 'spec_helper' require 'graphql' require 'apollo-federation/schema' require 'apollo-federation/field' require 'apollo-federation/object' RSpec.describe ApolloFederation::EntitiesField do shared_examples 'entities field' do let(:base_object) do base_field = Class.new(Gr...
github
Gusto/apollo-federation-ruby
https://github.com/Gusto/apollo-federation-ruby
spec/apollo-federation/service_field_v1_spec.rb
Ruby
mit
225
main
15,014
# frozen_string_literal: true require 'spec_helper' require 'graphql' require 'apollo-federation/schema' require 'apollo-federation/field' require 'apollo-federation/object' require 'apollo-federation/interface' RSpec.describe ApolloFederation::ServiceField do shared_examples 'service field' do let(:base_object...
github
Gusto/apollo-federation-ruby
https://github.com/Gusto/apollo-federation-ruby
spec/apollo-federation/any_spec.rb
Ruby
mit
225
main
633
# frozen_string_literal: true require 'spec_helper' require 'apollo-federation/any' require 'action_controller' RSpec.describe ApolloFederation::Any do it 'converts the keys to symbols' do expect( described_class.coerce_input({ 'one' => 1, 'two' => 2, '__typename' => 'Thing' }, nil), ).to eql(one: 1, ...
github
Gusto/apollo-federation-ruby
https://github.com/Gusto/apollo-federation-ruby
spec/apollo-federation/tracing_spec.rb
Ruby
mit
225
main
22,603
# frozen_string_literal: true require 'spec_helper' require 'apollo-federation' RSpec.describe ApolloFederation::Tracing do RSpec.shared_examples 'a basic tracer' do let(:expected_trace_start_time) { 1_564_920_001 } let(:expected_end_time) do # After our fix to record_trace_end_time in execute_multip...
github
Gusto/apollo-federation-ruby
https://github.com/Gusto/apollo-federation-ruby
spec/apollo-federation/schema_spec.rb
Ruby
mit
225
main
3,208
# frozen_string_literal: true require 'spec_helper' require 'graphql' require 'apollo-federation/schema' require 'apollo-federation/object' RSpec.describe ApolloFederation::Schema do describe '.federation_version' do it 'returns 1.0 by default' do schema = Class.new(GraphQL::Schema) do include Apo...
github
Gusto/apollo-federation-ruby
https://github.com/Gusto/apollo-federation-ruby
spec/apollo-federation/service_field_v2_spec.rb
Ruby
mit
225
main
60,360
# frozen_string_literal: true require 'spec_helper' require 'graphql' require 'apollo-federation/schema' require 'apollo-federation/field' require 'apollo-federation/object' require 'apollo-federation/interface' require 'apollo-federation/union' require 'apollo-federation/enum' require 'apollo-federation/enum_value' r...
github
Gusto/apollo-federation-ruby
https://github.com/Gusto/apollo-federation-ruby
spec/apollo-federation/tracing/node_map_spec.rb
Ruby
mit
225
main
2,002
# frozen_string_literal: true require 'spec_helper' require 'apollo-federation/tracing/node_map' RSpec.describe ApolloFederation::Tracing::NodeMap do it 'creates parents for any deeply nested paths' do map = described_class.new map.add(['_entities', 0, 'reviews', 0, 'author', 'name']) expect(map.nodes.k...
github
Gusto/apollo-federation-ruby
https://github.com/Gusto/apollo-federation-ruby
example/products.rb
Ruby
mit
225
main
1,459
# frozen_string_literal: true require_relative './graphql_server' # extend type Query { # topProducts(first: Int = 5): [Product] # } # type Product @key(fields: "upc") { # upc: String! # name: String # price: Int # weight: Int # } PRODUCTS = [ { upc: '1', name: 'Table', price: 899, weigh...
github
Gusto/apollo-federation-ruby
https://github.com/Gusto/apollo-federation-ruby
example/reviews.rb
Ruby
mit
225
main
2,352
# frozen_string_literal: true require_relative './graphql_server' # type Review @key(fields: "id") { # id: ID! # body: String # author: User @provides(fields: "username") # product: Product # } # extend type User @key(fields: "id") { # id: ID! @external # username: String @external # reviews: [Review] ...
github
Gusto/apollo-federation-ruby
https://github.com/Gusto/apollo-federation-ruby
example/inventory.rb
Ruby
mit
225
main
1,516
# frozen_string_literal: true require_relative './graphql_server' # extend type Product @key(fields: "upc") { # upc: String! @external # weight: Int @external # price: Int @external # inStock: Boolean # shippingEstimate: Int @requires(fields: "price weight") # } INVENTORY = [ { upc: '1', in_stock: true }...
github
Gusto/apollo-federation-ruby
https://github.com/Gusto/apollo-federation-ruby
example/graphql_server.rb
Ruby
mit
225
main
1,718
# frozen_string_literal: true require 'rack' require 'json' require 'graphql' require 'pry-byebug' require 'apollo-federation' require 'optparse' require 'webrick' class BaseField < GraphQL::Schema::Field include ApolloFederation::Field end class BaseObject < GraphQL::Schema::Object include ApolloFederation::Obj...
github
Gusto/apollo-federation-ruby
https://github.com/Gusto/apollo-federation-ruby
example/accounts.rb
Ruby
mit
225
main
1,212
# frozen_string_literal: true require_relative './graphql_server' # extend type Query { # me: User # } # type User @key(fields: "id") { # id: ID! # name: String # username: String # } USERS = [ { id: '1', name: 'Ada Lovelace', birthDate: '1815-12-10', username: '@ada', }, { id: '2'...
github
kenaniah/sidekiq-status
https://github.com/kenaniah/sidekiq-status
Appraisals
Ruby
mit
225
main
286
appraise "sidekiq-7.0" do gem "sidekiq", "~> 7.0.0" end appraise "sidekiq-7.3" do gem "sidekiq", "~> 7.3.0" end appraise "sidekiq-7.x" do gem "sidekiq", "~> 7" end appraise "sidekiq-8.0" do gem "sidekiq", "~> 8.0.0" end appraise "sidekiq-8.x" do gem "sidekiq", "~> 8" end
github
kenaniah/sidekiq-status
https://github.com/kenaniah/sidekiq-status
sidekiq-status.gemspec
Ruby
mit
225
main
1,358
# -*- encoding: utf-8 -*- require File.expand_path('../lib/sidekiq-status/version', __FILE__) Gem::Specification.new do |gem| gem.authors = ['Evgeniy Tsvigun', 'Kenaniah Cerny'] gem.email = ['utgarda@gmail.com', 'kenaniah@gmail.com'] gem.summary = 'An extension to the sidekiq message processi...
github
kenaniah/sidekiq-status
https://github.com/kenaniah/sidekiq-status
Rakefile
Ruby
mit
225
main
4,464
#!/usr/bin/env rake require "bundler/setup" require "bundler/gem_tasks" require 'rspec/core/rake_task' RSpec::Core::RakeTask.new(:spec) task :test => :spec task :default => :spec desc "Launch a minimal server with Sidekiq UI at /sidekiq" task :server do require 'webrick' require 'rack' require 'rack/session'...
github
kenaniah/sidekiq-status
https://github.com/kenaniah/sidekiq-status
lib/sidekiq-status.rb
Ruby
mit
225
main
2,852
require 'sidekiq-status/version' require 'sidekiq-status/sidekiq_extensions' require 'sidekiq-status/storage' require 'sidekiq-status/worker' require 'sidekiq-status/redis_client_adapter' require 'sidekiq-status/redis_adapter' require 'sidekiq-status/client_middleware' require 'sidekiq-status/server_middleware' require...
github
kenaniah/sidekiq-status
https://github.com/kenaniah/sidekiq-status
lib/sidekiq-status/storage.rb
Ruby
mit
225
main
4,658
module Sidekiq::Status::Storage RESERVED_FIELDS=%w(status stop enqueued_at started_at updated_at ended_at).freeze BATCH_LIMIT = 500 protected # Stores multiple values into a job's status hash, # sets last update time # @param [String] id job id # @param [Hash] status_updates updated values # @param [I...
github
kenaniah/sidekiq-status
https://github.com/kenaniah/sidekiq-status
lib/sidekiq-status/worker.rb
Ruby
mit
225
main
1,291
module Sidekiq::Status::Worker include Sidekiq::Status::Storage class Stopped < StandardError end attr_accessor :expiration # Stores multiple values into a job's status hash, # sets last update time # @param [Hash] status_updates updated values # @return [String] Redis operation status code def sto...
github
kenaniah/sidekiq-status
https://github.com/kenaniah/sidekiq-status
lib/sidekiq-status/web.rb
Ruby
mit
225
main
5,367
# adapted from https://github.com/cryo28/sidekiq_status require_relative 'helpers' module Sidekiq::Status # Hook into *Sidekiq::Web* Sinatra app which adds a new "/statuses" page module Web # Location of Sidekiq::Status::Web static assets and templates ROOT = File.expand_path("../../web", File.dirname(__FI...
github
kenaniah/sidekiq-status
https://github.com/kenaniah/sidekiq-status
lib/sidekiq-status/client_middleware.rb
Ruby
mit
225
main
2,704
require 'sidekiq/api' JOB_CLASS = Sidekiq.constants.include?(:JobRecord) ? Sidekiq::JobRecord : Sidekiq::Job module Sidekiq::Status # Should be in the client middleware chain class ClientMiddleware include Storage # Parameterized initialization, use it when adding middleware to client chain # chain.add ...
github
kenaniah/sidekiq-status
https://github.com/kenaniah/sidekiq-status
lib/sidekiq-status/redis_adapter.rb
Ruby
mit
225
main
423
# adapter for redis-rb client class Sidekiq::Status::RedisAdapter def initialize(client) @client = client end def scan(**options, &block) @client.scan_each(**options, &block) end def schedule_batch(key, options) @client.zrangebyscore key, options[:start], options[:end], limit: [options[:offset],...
github
kenaniah/sidekiq-status
https://github.com/kenaniah/sidekiq-status
lib/sidekiq-status/helpers.rb
Ruby
mit
225
main
2,813
module Sidekiq::Status module Web module Helpers COMMON_STATUS_HASH_KEYS = %w(enqueued_at started_at updated_at ended_at jid status worker args label pct_complete total at message elapsed eta) def safe_url_params(key) return url_params(key) if Sidekiq.major_version >= 8 request.params...
github
kenaniah/sidekiq-status
https://github.com/kenaniah/sidekiq-status
lib/sidekiq-status/redis_client_adapter.rb
Ruby
mit
225
main
358
# adapter for redis-client client class Sidekiq::Status::RedisClientAdapter def initialize(client) @client = client end def schedule_batch(key, options) @client.zrange(key, options[:start], options[:end], :byscore, :limit, options[:offset], options[:limit]) end def method_missing(method, *args) ...
github
kenaniah/sidekiq-status
https://github.com/kenaniah/sidekiq-status
lib/sidekiq-status/server_middleware.rb
Ruby
mit
225
main
3,199
require 'sidekiq/job_retry' module Sidekiq::Status # Should be in the server middleware chain class ServerMiddleware include Storage # Parameterized initialization, use it when adding middleware to server chain # chain.add Sidekiq::Status::ServerMiddleware, :expiration => 60 * 5 # @param [Hash] op...
github
kenaniah/sidekiq-status
https://github.com/kenaniah/sidekiq-status
lib/sidekiq-status/testing/inline.rb
Ruby
mit
225
main
339
module Sidekiq module Status class << self def status(jid) :complete end end module Storage def store_status(id, status, expiration = nil, redis_pool=nil) 'ok' end def store_for_id(id, status_updates, expiration = nil, redis_pool=nil) 'ok' end ...
github
kenaniah/sidekiq-status
https://github.com/kenaniah/sidekiq-status
spec/environment.rb
Ruby
mit
225
main
414
# This file is used to load the test environment for Sidekiq::Status when launching Sidekiq workers directly require "sidekiq-status" require_relative "support/test_jobs" Sidekiq.configure_client do |config| Sidekiq::Status.configure_client_middleware config end Sidekiq.configure_server do |config| Sidekiq::Statu...
github
kenaniah/sidekiq-status
https://github.com/kenaniah/sidekiq-status
spec/spec_helper.rb
Ruby
mit
225
main
3,875
require "rspec" require 'colorize' require 'sidekiq' require 'sidekiq/processor' require 'sidekiq/manager' require 'sidekiq-status' # Clears jobs before every test RSpec.configure do |config| config.before(:each) do Sidekiq.redis { |conn| conn.flushall } client_middleware sleep 0.05 end end Dir["#{Fil...
github
kenaniah/sidekiq-status
https://github.com/kenaniah/sidekiq-status
spec/support/test_jobs.rb
Ruby
mit
225
main
2,466
require 'sidekiq-status' class StubJob include Sidekiq::Worker include Sidekiq::Status::Worker sidekiq_options 'retry' => false def perform(*args) end end class StubNoStatusJob include Sidekiq::Worker sidekiq_options 'retry' => false def perform(*args) end end class ExpiryJob < StubJob def e...
github
kenaniah/sidekiq-status
https://github.com/kenaniah/sidekiq-status
spec/lib/sidekiq-status_spec.rb
Ruby
mit
225
main
11,530
require 'spec_helper' describe Sidekiq::Status do let!(:redis) { Sidekiq.redis { |conn| conn } } let!(:job_id) { SecureRandom.hex(12) } let!(:job_id_1) { SecureRandom.hex(12) } let!(:unused_id) { SecureRandom.hex(12) } let!(:plain_sidekiq_job_id) { SecureRandom.hex(12) } let!(:retried_job_id) { SecureRand...
github
kenaniah/sidekiq-status
https://github.com/kenaniah/sidekiq-status
spec/lib/sidekiq-status/web_spec.rb
Ruby
mit
225
main
4,469
require 'spec_helper' require 'sidekiq-status/web' require 'rack/test' require 'base64' describe 'sidekiq status web' do include Rack::Test::Methods let!(:redis) { Sidekiq.redis { |conn| conn } } let!(:job_id) { SecureRandom.hex(12) } def app @app ||= Sidekiq::Web.new end before do allow(SecureR...
github
kenaniah/sidekiq-status
https://github.com/kenaniah/sidekiq-status
spec/lib/sidekiq-status/client_middleware_spec.rb
Ruby
mit
225
main
2,274
require 'spec_helper' describe Sidekiq::Status::ClientMiddleware do let!(:redis) { Sidekiq.redis { |conn| conn } } let!(:job_id) { SecureRandom.hex(12) } before do allow(SecureRandom).to receive(:hex).once.and_return(job_id) end describe "without :expiration parameter" do it "sets queued status" ...
github
kenaniah/sidekiq-status
https://github.com/kenaniah/sidekiq-status
spec/lib/sidekiq-status/testing_spec.rb
Ruby
mit
225
main
323
require 'spec_helper' describe Sidekiq::Status do let!(:job_id) { SecureRandom.hex(12) } describe '.status' do it 'bypasses redis with inlining enabled' do Process.fork { require 'sidekiq-status/testing/inline' expect(Sidekiq::Status.status(job_id)).to eq :complete } end end e...
github
kenaniah/sidekiq-status
https://github.com/kenaniah/sidekiq-status
spec/lib/sidekiq-status/server_middleware_spec.rb
Ruby
mit
225
main
5,746
require 'spec_helper' describe Sidekiq::Status::ServerMiddleware do let!(:redis) { Sidekiq.redis { |conn| conn } } let!(:job_id) { SecureRandom.hex(12) } describe "without :expiration parameter" do it "sets working/complete status" do allow(SecureRandom).to receive(:hex).once.and_return(job_id) ...
github
kenaniah/sidekiq-status
https://github.com/kenaniah/sidekiq-status
spec/lib/sidekiq-status/worker_spec.rb
Ruby
mit
225
main
1,075
require 'spec_helper' describe Sidekiq::Status::Worker do let!(:job_id) { SecureRandom.hex(12) } describe ".perform_async" do it "generates and returns job id" do allow(SecureRandom).to receive(:hex).once.and_return(job_id) expect(StubJob.perform_async()).to eq(job_id) end end describe "...
github
bradurani/pg-eyeballs
https://github.com/bradurani/pg-eyeballs
Appraisals
Ruby
mit
225
master
380
appraise "activerecord-4" do gem "activerecord", ">= 4.0.0", "< 5.0.0" gem "pg", ">= 0.19.0", "< 1.0.0" end appraise "activerecord-5" do gem "activerecord", ">= 5.0.0", "< 6.0.0" gem "pg", ">= 0.19.0", "< 1.0.0" end appraise "activerecord-6" do gem "activerecord", ">= 6.0.0", "< 7.0.0" end appraise "active...
github
bradurani/pg-eyeballs
https://github.com/bradurani/pg-eyeballs
pg-eyeballs.gemspec
Ruby
mit
225
master
1,790
# coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'eyeballs/version' Gem::Specification.new do |spec| spec.name = "pg-eyeballs" spec.version = Eyeballs::VERSION spec.authors = ["Brad Urani"] spec.email = ["bra...
github
bradurani/pg-eyeballs
https://github.com/bradurani/pg-eyeballs
spec/spec_helper.rb
Ruby
mit
225
master
1,987
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) require 'pg-eyeballs' require 'database_cleaner' class Foo < ActiveRecord::Base has_many :bars end class Bar < ActiveRecord::Base belongs_to :foo end class Baz < ActiveRecord::Base end RSpec.configure do |config| config.before(:suite) do connectio...
github
bradurani/pg-eyeballs
https://github.com/bradurani/pg-eyeballs
spec/eyeballs_spec.rb
Ruby
mit
225
master
263
require 'spec_helper' describe Eyeballs do it 'has a version number' do expect(Eyeballs::VERSION).not_to be nil end describe '.eyeballs' do it 'returns an inspector' do expect(Foo.all.eyeballs).to be_a Eyeballs::Inspector end end end
github
bradurani/pg-eyeballs
https://github.com/bradurani/pg-eyeballs
spec/eyeballs/inspector_spec.rb
Ruby
mit
225
master
4,516
require 'spec_helper' describe Eyeballs::Inspector do let(:foo){ Foo.all.eyeballs } let(:foo_bar) do Foo.all.preload(:bars).eyeballs end describe :queries do context :foo do it 'returns array of queries' do expect(foo.queries.length).to eql 1 expect(foo.queries[0]).to include '...
github
bradurani/pg-eyeballs
https://github.com/bradurani/pg-eyeballs
lib/pg-eyeballs.rb
Ruby
mit
225
master
202
require 'active_record' require 'pg' module Eyeballs end Dir[File.join(File.dirname(__FILE__), 'eyeballs', '*.rb')].each {|file| require file } ActiveRecord::Relation.include Eyeballs::RelationMixin
github
bradurani/pg-eyeballs
https://github.com/bradurani/pg-eyeballs
lib/eyeballs/inspector.rb
Ruby
mit
225
master
2,799
require 'tempfile' module Eyeballs class Inspector OPTIONS = [:analyze, :verbose, :costs, :buffers] FORMATS = [:text, :xml, :json, :yaml] def initialize(relation) @relation = relation end def explain(format: :text, options: OPTIONS) @explain ||= explain_queries(format: format, opti...
github
asciidoctor/asciidoctor-epub3
https://github.com/asciidoctor/asciidoctor-epub3
asciidoctor-epub3.gemspec
Ruby
mit
225
main
2,160
# frozen_string_literal: true require_relative 'lib/asciidoctor-epub3/version' require 'open3' unless defined? Open3 Gem::Specification.new do |s| s.name = 'asciidoctor-epub3' s.version = Asciidoctor::Epub3::VERSION s.summary = 'Converts AsciiDoc documents to EPUB3 e-book format' s.description = <<~EOS A...
github
asciidoctor/asciidoctor-epub3
https://github.com/asciidoctor/asciidoctor-epub3
Rakefile
Ruby
mit
225
main
230
# frozen_string_literal: true $default_tasks = [] # rubocop:disable Style/GlobalVars Dir.glob('tasks/*.rake').each { |file| load file } task default: $default_tasks unless $default_tasks.empty? # rubocop:disable Style/GlobalVars
github
asciidoctor/asciidoctor-epub3
https://github.com/asciidoctor/asciidoctor-epub3
tasks/rspec.rake
Ruby
mit
225
main
370
# frozen_string_literal: true require 'English' begin require 'rspec/core/rake_task' RSpec::Core::RakeTask.new :spec do |t| t.verbose = true opts = %w[-f progress] opts.append '-t', '~visual', '-t', '~cli' if ENV['UNIT'] opts.unshift '-w' if $VERBOSE || ENV['COVERAGE'] t.rspec_opts = opts en...
github
asciidoctor/asciidoctor-epub3
https://github.com/asciidoctor/asciidoctor-epub3
tasks/rubocop.rake
Ruby
mit
225
main
389
# frozen_string_literal: true begin require 'rubocop/rake_task' RuboCop::RakeTask.new :lint do |t| t.patterns = Dir['lib/**/*.rb'] + %w[Rakefile Gemfile tasks/*.rake spec/**/*.rb] end rescue LoadError => e task :lint do raise 'Failed to load lint task. Install required gems using: bundle --path=.bundle...
github
asciidoctor/asciidoctor-epub3
https://github.com/asciidoctor/asciidoctor-epub3
lib/asciidoctor-epub3.rb
Ruby
mit
225
main
336
# frozen_string_literal: true require 'asciidoctor' require 'asciidoctor/extensions' require 'gepub' require_relative 'asciidoctor-epub3/ext' require_relative 'asciidoctor-epub3/converter' # We need to be able to write files with unicode names. See https://github.com/asciidoctor/asciidoctor-epub3/issues/217 Zip.unico...
github
asciidoctor/asciidoctor-epub3
https://github.com/asciidoctor/asciidoctor-epub3
lib/asciidoctor-epub3/converter.rb
Ruby
mit
225
main
70,101
# frozen_string_literal: true require 'mime/types' require 'open3' require 'sass' require_relative 'font_icon_map' module Asciidoctor module Epub3 # Public: The main converter for the epub3 backend that handles packaging the EPUB3 publication file. class Converter include ::Asciidoctor::Converter ...
github
asciidoctor/asciidoctor-epub3
https://github.com/asciidoctor/asciidoctor-epub3
lib/asciidoctor-epub3/font_icon_map.rb
Ruby
mit
225
main
741
# frozen_string_literal: true require 'yaml' module Asciidoctor module Epub3 # Map of Font Awesome icon names to unicode characters class FontIconMap class << self FONT_AWESOME_DIR = File.join __dir__, '..', '..', 'data', 'fonts', 'awesome' def icons @icons ||= YAML.load_fil...
github
asciidoctor/asciidoctor-epub3
https://github.com/asciidoctor/asciidoctor-epub3
lib/asciidoctor-epub3/ext/core/file.rb
Ruby
mit
225
main
234
# frozen_string_literal: true class File # TODO: remove once minimum required Ruby version is at least 2.7 unless respond_to? :absolute_path? def self.absolute_path?(path) Pathname.new(path).absolute? end end end
github
asciidoctor/asciidoctor-epub3
https://github.com/asciidoctor/asciidoctor-epub3
lib/asciidoctor-epub3/ext/asciidoctor/abstract_node.rb
Ruby
mit
225
main
472
# frozen_string_literal: true module Asciidoctor class AbstractNode # See https://asciidoctor.org/docs/user-manual/#book-parts-and-chapters # @return [Boolean] def chapter? return is_a?(Asciidoctor::Document) if document.doctype != 'book' return true if context == :preamble && level.zero? ...
github
asciidoctor/asciidoctor-epub3
https://github.com/asciidoctor/asciidoctor-epub3
spec/highlight_spec.rb
Ruby
mit
225
main
1,614
# frozen_string_literal: true require_relative 'spec_helper' describe 'Asciidoctor::Epub3::Converter - Highlight' do it 'highlights code listings with coderay' do book, = to_epub fixture_file('source_highlight.adoc'), attributes: { 'source-highlighter' => 'coderay' } article = book.item_by_href '_article.xh...
github
asciidoctor/asciidoctor-epub3
https://github.com/asciidoctor/asciidoctor-epub3
spec/converter_spec.rb
Ruby
mit
225
main
14,065
# frozen_string_literal: true require_relative 'spec_helper' describe Asciidoctor::Epub3::Converter do describe '#convert' do it 'converts empty file to epub without exceptions' do expect(to_epub(fixture_file('empty.adoc'))).not_to be_nil end it 'converts empty heredoc document to epub without ex...
github
asciidoctor/asciidoctor-epub3
https://github.com/asciidoctor/asciidoctor-epub3
spec/stem_spec.rb
Ruby
mit
225
main
972
# frozen_string_literal: true require_relative 'spec_helper' describe 'Asciidoctor::Epub3::Converter - Stem' do it 'supports mathml stem blocks' do book, = to_epub fixture_file('stem.adoc') chapter = book.item_by_href '_article.xhtml' expect(chapter).not_to be_nil expect(chapter.content).to include ...
github
asciidoctor/asciidoctor-epub3
https://github.com/asciidoctor/asciidoctor-epub3
spec/inline_quoted_spec.rb
Ruby
mit
225
main
4,143
# frozen_string_literal: true require_relative 'spec_helper' describe 'Asciidoctor::Epub3::Converter - Inline Quoted' do subject { Asciidoctor::Epub3::Converter.new('epub3').convert_inline_quoted node } let(:parent) { instance_double('parent').as_null_object } let(:node) { Asciidoctor::Inline.new parent, :bar,...
github
asciidoctor/asciidoctor-epub3
https://github.com/asciidoctor/asciidoctor-epub3
spec/docinfo_spec.rb
Ruby
mit
225
main
837
# frozen_string_literal: true require_relative 'spec_helper' describe 'Asciidoctor::Epub3::Converter - Docinfo' do it 'adds head docinfo' do book, = to_epub fixture_file('docinfo/head.adoc') article = book.item_by_href '_article.xhtml' expect(article).not_to be_nil expect(article.content).to include...
github
asciidoctor/asciidoctor-epub3
https://github.com/asciidoctor/asciidoctor-epub3
spec/xref_spec.rb
Ruby
mit
225
main
3,771
# frozen_string_literal: true require_relative 'spec_helper' describe 'Asciidoctor::Epub3::Converter - Xref' do context 'inter-chapter' do it 'resolves xref to top of document' do book, = to_epub fixture_file('doc-xref/book.adoc') first_chapter = book.item_by_href '_first_chapter.xhtml' expect...
github
asciidoctor/asciidoctor-epub3
https://github.com/asciidoctor/asciidoctor-epub3
spec/image_spec.rb
Ruby
mit
225
main
4,123
# frozen_string_literal: true require_relative 'spec_helper' require 'asciidoctor-diagram' describe 'Asciidoctor::Epub3::Converter - Image' do it 'supports imagesoutdir != imagesdir != "{base_dir}/images"' do book, out_file = to_epub fixture_file('diagram/book.adoc') out_dir = out_file.dirname expect(o...
github
asciidoctor/asciidoctor-epub3
https://github.com/asciidoctor/asciidoctor-epub3
spec/table_spec.rb
Ruby
mit
225
main
1,099
# frozen_string_literal: true require_relative 'spec_helper' describe 'Asciidoctor::Epub3::Converter - Table' do it 'supports halign' do book = to_epub <<~EOS = Article |=== >| Text |=== EOS article = book.item_by_href '_article.xhtml' expect(article).not_to be_nil expec...
github
asciidoctor/asciidoctor-epub3
https://github.com/asciidoctor/asciidoctor-epub3
spec/reproducible_spec.rb
Ruby
mit
225
main
1,407
# frozen_string_literal: true require_relative 'spec_helper' describe Asciidoctor::Epub3::Converter do it 'produces stable output for reproducible books' do out_file1 = temp_file 'book1.epub' out_file2 = temp_file 'book2.epub' to_epub fixture_file('reproducible/book.adoc'), to_file: out_file1.to_s s...
github
asciidoctor/asciidoctor-epub3
https://github.com/asciidoctor/asciidoctor-epub3
spec/cli_spec.rb
Ruby
mit
225
main
1,975
# frozen_string_literal: true require_relative 'spec_helper' describe 'asciidoctor-epub3' do it 'exits with 0 when prints version' do out, _, res = run_command asciidoctor_epub3_bin, '--version' expect(res.exitstatus).to eq(0) expect(out).to include %(Asciidoctor EPUB3 #{Asciidoctor::Epub3::VERSION} usi...
github
asciidoctor/asciidoctor-epub3
https://github.com/asciidoctor/asciidoctor-epub3
spec/templates_spec.rb
Ruby
mit
225
main
775
# frozen_string_literal: true require_relative 'spec_helper' describe 'Asciidoctor::Epub3::Converter - Templates' do it 'supports Slim templates' do book, = to_epub <<~EOS, template_dirs: [fixtures_dir.join('templates/slim').to_s], template_engine: 'slim' = Article Paragraph EOS chapter = ...
github
asciidoctor/asciidoctor-epub3
https://github.com/asciidoctor/asciidoctor-epub3
spec/spec_helper.rb
Ruby
mit
225
main
2,280
# frozen_string_literal: true require 'asciidoctor-epub3' Zip.force_entry_names_encoding = 'UTF-8' RSpec.configure do |config| config.before do FileUtils.rm_r temp_dir, force: true, secure: true end config.after do FileUtils.rm_r temp_dir, force: true, secure: true end def bin_script(name, opts =...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
Dangerfile
Ruby
apache-2.0
225
master
1,446
# frozen_string_literal: true # vi: ft=ruby require 'gitlab-dangerfiles' # Documentation reference: https://gitlab.com/gitlab-org/ruby/gems/gitlab-dangerfiles Gitlab::Dangerfiles.for_project(self, 'omnibus-gitlab') do |gitlab_dangerfiles| gitlab_dangerfiles.import_plugins gitlab_dangerfiles.config.files_to_categ...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
omnibus.rb
Ruby
apache-2.0
225
master
572
use_s3_caching !ENV['USE_S3_CACHE'].nil? && !ENV['USE_S3_CACHE'].casecmp("false").zero? s3_access_key ENV['CACHE_AWS_ACCESS_KEY_ID'] s3_secret_key ENV['CACHE_AWS_SECRET_ACCESS_KEY'] s3_bucket ENV['CACHE_AWS_BUCKET'] s3_region ENV['CACHE_AWS_S3_REGION'] s3_endpoint ENV['CACHE_AWS_S3_ENDPOINT'] s3_accelerate !ENV['CACHE_...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
Gemfile
Ruby
apache-2.0
225
master
2,398
source 'https://rubygems.org' require_relative "lib/gitlab/version" omnibus_gem_version = Gitlab::Version.new('omnibus') # Note that omnibus is from a fork with additional gitlab changes. You can # check what they are with the following comparison link: # https://gitlab.com/gitlab-org/omnibus/compare/v5.6.10...git...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
config/templates/omnibus-gitlab-gems/Gemfile
Ruby
apache-2.0
225
master
2,185
# THis defines the dependencies needed for Chef and its cookbooks to # run. Any dependency needed by `gitlab-ctl reconfigure` should be # included here. # # Note that you must avoid installing a gem from a Git source in this # file because Bundler installs gems from source in a different # directory than prepackaged ge...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
config/software/cacerts.rb
Ruby
apache-2.0
225
master
3,892
# # Copyright 2012-2014 Chef Software, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
config/software/nginx.rb
Ruby
apache-2.0
225
master
2,784
# # Copyright:: Copyright (c) 2012-2014 Chef Software, Inc. # Copyright:: Copyright (c) 2014 GitLab Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License a...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
config/software/gitlab-exporter.rb
Ruby
apache-2.0
225
master
1,064
# # Copyright 2016-2022 GitLab Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
config/software/spam-classifier.rb
Ruby
apache-2.0
225
master
1,284
# ## Copyright:: Copyright (c) 2021 GitLab Inc. ## License:: Apache License, Version 2.0 ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## http://www.apache.org/licenses/LICENSE-2.0 #...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
config/software/prometheus.rb
Ruby
apache-2.0
225
master
1,987
# ## Copyright:: Copyright (c) 2014 GitLab Inc. ## License:: Apache License, Version 2.0 ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## http://www.apache.org/licenses/LICENSE-2.0 #...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
config/software/postgresql_new.rb
Ruby
apache-2.0
225
master
3,126
# # Copyright 2012-2014 Chef Software, Inc. # Copyright:: Copyright (c) 2016 GitLab Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # #...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
config/software/libtensorflow_lite.rb
Ruby
apache-2.0
225
master
2,873
# ## Copyright:: Copyright (c) 2021 GitLab Inc. ## License:: Apache License, Version 2.0 ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## http://www.apache.org/licenses/LICENSE-2.0 #...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
config/software/gitlab-rails.rb
Ruby
apache-2.0
225
master
16,449
# # Copyright:: Copyright (c) 2012 Opscode, Inc. # Copyright:: Copyright (c) 2014-2022 GitLab Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # ...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
config/software/gitlab-redis-cli.rb
Ruby
apache-2.0
225
master
2,520
# # Copyright:: Copyright (c) 2020 GitLab Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # U...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
config/software/exiftool.rb
Ruby
apache-2.0
225
master
1,435
# # Copyright:: Copyright (c) 2019 GitLab Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
config/software/popt.rb
Ruby
apache-2.0
225
master
1,499
# # Copyright 2012-2014 Chef Software, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
config/software/gitlab-cookbooks.rb
Ruby
apache-2.0
225
master
1,909
# # Copyright:: Copyright (c) 2012 Opscode, Inc. # Copyright:: Copyright (c) 2014 GitLab Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # h...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
config/software/gitlab-healthcheck.rb
Ruby
apache-2.0
225
master
1,452
# # Copyright:: Copyright (c) 2016 GitLab Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # U...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
config/software/patroni.rb
Ruby
apache-2.0
225
master
2,057
# # Copyright:: Copyright (c) 2020 GitLab Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # U...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
config/software/gitlab-kas.rb
Ruby
apache-2.0
225
master
1,419
# # Copyright:: Copyright (c) 2020 GitLab Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # U...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
config/software/jemalloc.rb
Ruby
apache-2.0
225
master
2,163
# # Copyright:: Copyright (c) 2016 GitLab Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # U...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
config/software/git.rb
Ruby
apache-2.0
225
master
6,232
# ## Copyright:: Copyright (c) 2014 GitLab Inc. ## License:: Apache License, Version 2.0 ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## http://www.apache.org/licenses/LICENSE-2.0 #...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
config/software/libarchive.rb
Ruby
apache-2.0
225
master
2,490
# # Copyright:: Copyright (c) 2022 GitLab Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
config/software/alertmanager.rb
Ruby
apache-2.0
225
master
2,215
# ## Copyright:: Copyright (c) 2018 GitLab Inc. ## License:: Apache License, Version 2.0 ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## http://www.apache.org/licenses/LICENSE-2.0 #...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
config/software/gitlab-geo-psql.rb
Ruby
apache-2.0
225
master
1,922
# # Copyright:: Copyright (c) 2016 GitLab Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # U...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
config/software/rb-readline.rb
Ruby
apache-2.0
225
master
983
# # Copyright 2012-2022 Chef Software, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
config/software/npth.rb
Ruby
apache-2.0
225
master
1,548
# # Copyright:: Copyright (c) 2017 GitLab Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
config/software/version-manifest.rb
Ruby
apache-2.0
225
master
992
# # Copyright 2012-2014 Chef Software, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...