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
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/executors/sidekiq/internal_job_base.rb
lib/dynflow/executors/sidekiq/internal_job_base.rb
# frozen_string_literal: true module Dynflow module Executors module Sidekiq class InternalJobBase include ::Sidekiq::Worker extend ::Dynflow::Executors::Sidekiq::Serialization::WorkerExtension::ClassMethods sidekiq_options retry: false, backtrace: true def self.inherited(k...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/actors/execution_plan_cleaner.rb
lib/dynflow/actors/execution_plan_cleaner.rb
# frozen_string_literal: true module Dynflow module Actors class ExecutionPlanCleaner attr_reader :core def initialize(world, options = {}) @world = world @options = options end def core_class Core end def spawn Concurrent::Promises.resolvabl...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/world/invalidation.rb
lib/dynflow/world/invalidation.rb
# frozen_string_literal: true module Dynflow class World module Invalidation # Invalidate another world, that left some data in the runtime, # but it's not really running # # @param world [Coordinator::ClientWorld, Coordinator::ExecutorWorld] coordinator record # left behind by th...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/utils/priority_queue.rb
lib/dynflow/utils/priority_queue.rb
# frozen_string_literal: true module Dynflow module Utils # Heavily inspired by rubyworks/pqueue class PriorityQueue def initialize(&block) # :yields: a, b @backing_store = [] @comparator = block || :<=>.to_proc end def size @backing_store.size end def ...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/utils/indifferent_hash.rb
lib/dynflow/utils/indifferent_hash.rb
# frozen_string_literal: true module Dynflow module Utils # Heavily inpired by ActiveSupport::HashWithIndifferentAccess, # reasons we don't want to use the original implementation: # 1. we don't want any core_ext extensions # 2. some users are not happy about seeing the ActiveSupport as # o...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/connectors/direct.rb
lib/dynflow/connectors/direct.rb
# frozen_string_literal: true module Dynflow module Connectors class Direct < Abstract class Core < Actor def initialize(connector) @connector = connector @worlds = {} @executor_round_robin = RoundRobin.new end def start_listening(world) @wor...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/connectors/abstract.rb
lib/dynflow/connectors/abstract.rb
# frozen_string_literal: true module Dynflow module Connectors class Abstract include Algebrick::TypeCheck include Algebrick::Matching def start_listening(world) raise NotImplementedError end def stop_receiving_new_work(_, timeout = nil) raise NotImplementedError ...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/connectors/database.rb
lib/dynflow/connectors/database.rb
# frozen_string_literal: true module Dynflow module Connectors class Database < Abstract class PostgresListerner def initialize(core, world_id, db) @core = core @db = db @world_id = world_id @started = Concurrent::AtomicReference.new end ...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/semaphores/dummy.rb
lib/dynflow/semaphores/dummy.rb
# frozen_string_literal: true module Dynflow module Semaphores class Dummy < Abstract def wait(thing) true end def get_waiting nil end def has_waiting? false end def release(*args) end def save end def get(n) n...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/semaphores/aggregating.rb
lib/dynflow/semaphores/aggregating.rb
# frozen_string_literal: true module Dynflow module Semaphores class Aggregating < Abstract attr_reader :children, :waiting def initialize(children) @children = children @waiting = [] end def wait(thing) if get > 0 true else @waiting ...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/semaphores/abstract.rb
lib/dynflow/semaphores/abstract.rb
# frozen_string_literal: true module Dynflow module Semaphores class Abstract # Tries to get ticket from the semaphore # Returns true if thing got a ticket # Rturns false otherwise and puts the thing into the semaphore's queue def wait(thing) raise NotImplementedError end ...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/semaphores/stateful.rb
lib/dynflow/semaphores/stateful.rb
# frozen_string_literal: true module Dynflow module Semaphores class Stateful < Abstract attr_reader :free, :tickets, :waiting, :meta def initialize(tickets, free = tickets, meta = {}) @tickets = tickets @free = free @waiting = [] @meta = meta end def wai...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/delayed_executors/polling.rb
lib/dynflow/delayed_executors/polling.rb
# frozen_string_literal: true module Dynflow module DelayedExecutors class Polling < Abstract def core_class Dynflow::DelayedExecutors::PollingCore end end class PollingCore < AbstractCore attr_reader :poll_interval def configure(options) super(options) @...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/delayed_executors/abstract_core.rb
lib/dynflow/delayed_executors/abstract_core.rb
# frozen_string_literal: true module Dynflow module DelayedExecutors class AbstractCore < Actor include Algebrick::TypeCheck attr_reader :world, :logger def initialize(world, options = {}) @world = Type! world, World @logger = world.logger configure(options) end ...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/delayed_executors/abstract.rb
lib/dynflow/delayed_executors/abstract.rb
# frozen_string_literal: true module Dynflow module DelayedExecutors class Abstract attr_reader :core def initialize(world, options = {}) @world = world @options = options @started = false spawn end def started? @started end def start...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/testing/in_thread_world.rb
lib/dynflow/testing/in_thread_world.rb
# frozen_string_literal: true module Dynflow module Testing class InThreadWorld < Dynflow::World def self.test_world_config config = Dynflow::Config.new config.persistence_adapter = persistence_adapter config.logger_adapter = logger_adapter config.co...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/testing/assertions.rb
lib/dynflow/testing/assertions.rb
# frozen_string_literal: true module Dynflow module Testing module Assertions # assert that +assert_actioned_plan+ was planned by +action+ with arguments +plan_input+ # alternatively plan-input can be asserted with +block+ def assert_action_planned_with(action, planned_action_class, *plan_input...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/testing/dummy_planned_action.rb
lib/dynflow/testing/dummy_planned_action.rb
# frozen_string_literal: true module Dynflow module Testing class DummyPlannedAction attr_accessor :output, :plan_input include Mimic def initialize(klass) mimic! klass @output = ExecutionPlan::OutputReference.new( Testing.get_id.to_s, Testing.get_id, Testing.get_id ...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/testing/dummy_executor.rb
lib/dynflow/testing/dummy_executor.rb
# frozen_string_literal: true module Dynflow module Testing class DummyExecutor attr_reader :world, :events_to_process def initialize(world) @world = world @events_to_process = [] end def event(execution_plan_id, step_id, event, future = Concurrent::Promises....
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/testing/in_thread_executor.rb
lib/dynflow/testing/in_thread_executor.rb
# frozen_string_literal: true module Dynflow module Testing class InThreadExecutor def initialize(world) @world = world @director = Director.new(@world) @work_items = Queue.new end def execute(execution_plan_id, finished = Concurrent::Promises.resolvable_future, _wait_f...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/testing/factories.rb
lib/dynflow/testing/factories.rb
# frozen_string_literal: true module Dynflow module Testing module Factories include Algebrick::TypeCheck # @return [Action::PlanPhase] def create_action(action_class, trigger = nil) execution_plan = DummyExecutionPlan.new step = DummyStep.new action_class.new...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/testing/managed_clock.rb
lib/dynflow/testing/managed_clock.rb
# frozen_string_literal: true module Dynflow module Testing class ManagedClock attr_reader :pending_pings include Algebrick::Types def initialize @pending_pings = [] end def ping(who, time, with_what = nil, where = :<<) time = current_time + time if time.is_a? Num...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/testing/dummy_world.rb
lib/dynflow/testing/dummy_world.rb
# frozen_string_literal: true module Dynflow module Testing class DummyWorld extend Mimic mimic! World attr_reader :clock, :executor, :middleware, :coordinator, :delayed_executor attr_accessor :action def initialize(_config = nil) @logger_adapter = Testing.logger_adapter ...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/testing/dummy_coordinator.rb
lib/dynflow/testing/dummy_coordinator.rb
# frozen_string_literal: true module Dynflow module Testing class DummyCoordinator def find_records(*args) [] end end end end
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/testing/dummy_execution_plan.rb
lib/dynflow/testing/dummy_execution_plan.rb
# frozen_string_literal: true module Dynflow module Testing class DummyExecutionPlan extend Mimic mimic! ExecutionPlan attr_reader :id, :planned_plan_steps, :planned_run_steps, :planned_finalize_steps def initialize @id = Testing.get_id.to_s @planne...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/testing/dummy_step.rb
lib/dynflow/testing/dummy_step.rb
# frozen_string_literal: true module Dynflow module Testing class DummyStep extend Mimic mimic! ExecutionPlan::Steps::Abstract attr_accessor :state, :error attr_reader :id def initialize @state = :pending @id = Testing.get_id end def save(_options =...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/testing/mimic.rb
lib/dynflow/testing/mimic.rb
# frozen_string_literal: true module Dynflow module Testing # when extended into Class or an_object it makes all instances of the class or the object # mimic the supplied types. It does so by hooking into kind_of? method. # @example # m = mock('product') # m.is_a? ::Product # => false # ...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/execution_plan/dependency_graph.rb
lib/dynflow/execution_plan/dependency_graph.rb
# frozen_string_literal: true module Dynflow class ExecutionPlan::DependencyGraph def initialize @graph = Hash.new { |h, k| h[k] = Set.new } end # adds dependencies to graph that +step+ has based # on the steps referenced in its +input+ def add_dependencies(step, action) action.requi...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/execution_plan/steps.rb
lib/dynflow/execution_plan/steps.rb
# frozen_string_literal: true module Dynflow module ExecutionPlan::Steps require 'dynflow/execution_plan/steps/error' require 'dynflow/execution_plan/steps/abstract' require 'dynflow/execution_plan/steps/abstract_flow_step' require 'dynflow/execution_plan/steps/plan_step' require 'dynflow/executi...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/execution_plan/hooks.rb
lib/dynflow/execution_plan/hooks.rb
# frozen_string_literal: true module Dynflow class ExecutionPlan module Hooks HOOK_KINDS = (ExecutionPlan.states + [:success, :failure]).freeze # A register holding information about hook classes and events # which should trigger the hooks. # # @attr_reader hooks [Hash<Class, Set<S...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/execution_plan/output_reference.rb
lib/dynflow/execution_plan/output_reference.rb
# frozen_string_literal: true module Dynflow class ExecutionPlan::OutputReference < Serializable include Algebrick::TypeCheck # dereferences all OutputReferences in Hash-Array structure def self.dereference(object, persistence) case object when Hash object.reduce(Utils.indifferent_ha...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/execution_plan/steps/plan_step.rb
lib/dynflow/execution_plan/steps/plan_step.rb
# frozen_string_literal: true module Dynflow module ExecutionPlan::Steps class PlanStep < Abstract attr_reader :children # @param [Array] children is a private API parameter def initialize(execution_plan_id, id, state, action_class...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/execution_plan/steps/finalize_step.rb
lib/dynflow/execution_plan/steps/finalize_step.rb
# frozen_string_literal: true module Dynflow module ExecutionPlan::Steps class FinalizeStep < AbstractFlowStep def self.state_transitions @state_transitions ||= { pending: [:running, :skipped], # :skipped when its run_step is skipped running: [:success, :error], ...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/execution_plan/steps/run_step.rb
lib/dynflow/execution_plan/steps/run_step.rb
# frozen_string_literal: true module Dynflow module ExecutionPlan::Steps class RunStep < AbstractFlowStep def self.state_transitions @state_transitions ||= { pending: [:running, :skipped, :error], # :skipped when it cannot be run because it depends on skipping step running...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/execution_plan/steps/abstract.rb
lib/dynflow/execution_plan/steps/abstract.rb
# frozen_string_literal: true module Dynflow module ExecutionPlan::Steps class Abstract < Serializable include Algebrick::TypeCheck include Stateful attr_reader :execution_plan_id, :id, :state, :action_class, :action_id, :world, :started_at, :ended_at, :execution_time, :real_time, :que...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/execution_plan/steps/abstract_flow_step.rb
lib/dynflow/execution_plan/steps/abstract_flow_step.rb
# frozen_string_literal: true module Dynflow module ExecutionPlan::Steps class AbstractFlowStep < Abstract # Method called when initializing the step to customize the behavior based on the # action definition during the planning phase def update_from_action(action) @queue = action.queue...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/execution_plan/steps/error.rb
lib/dynflow/execution_plan/steps/error.rb
# frozen_string_literal: true module Dynflow module ExecutionPlan::Steps class Error < Serializable extend Algebrick::Matching include Algebrick::TypeCheck attr_reader :exception_class, :message, :backtrace def self.new(*args) case args.size when 1 match obj = ...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/transaction_adapters/active_record.rb
lib/dynflow/transaction_adapters/active_record.rb
# frozen_string_literal: true module Dynflow module TransactionAdapters class ActiveRecord < Abstract def transaction(&block) ::ActiveRecord::Base.transaction(&block) end def rollback raise ::ActiveRecord::Rollback end end end end
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/transaction_adapters/none.rb
lib/dynflow/transaction_adapters/none.rb
# frozen_string_literal: true module Dynflow module TransactionAdapters class None < Abstract def transaction(&block) block.call end def rollback end end end end
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/transaction_adapters/abstract.rb
lib/dynflow/transaction_adapters/abstract.rb
# frozen_string_literal: true module Dynflow module TransactionAdapters class Abstract # start transaction around +block+ def transaction(&block) raise NotImplementedError end # rollback the transaction def rollback raise NotImplementedError end end end ...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/director/sequence_cursor.rb
lib/dynflow/director/sequence_cursor.rb
# frozen_string_literal: true module Dynflow class Director class SequenceCursor def initialize(flow_manager, sequence, parent_cursor = nil) @flow_manager = flow_manager @sequence = sequence @parent_cursor = parent_cursor @todo = [] @index ...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/director/sequential_manager.rb
lib/dynflow/director/sequential_manager.rb
# frozen_string_literal: true module Dynflow class Director class SequentialManager attr_reader :execution_plan, :world def initialize(world, execution_plan) @world = world @execution_plan = execution_plan @done = false end def run with...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/director/execution_plan_manager.rb
lib/dynflow/director/execution_plan_manager.rb
# frozen_string_literal: true module Dynflow class Director class ExecutionPlanManager include Algebrick::TypeCheck include Algebrick::Matching attr_reader :execution_plan, :future def initialize(world, execution_plan, future) @world = Type! world, World ...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/director/flow_manager.rb
lib/dynflow/director/flow_manager.rb
# frozen_string_literal: true module Dynflow class Director class FlowManager include Algebrick::TypeCheck attr_reader :execution_plan, :cursor_index def initialize(execution_plan, flow) @execution_plan = Type! execution_plan, ExecutionPlan @flow = flow @curs...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/director/queue_hash.rb
lib/dynflow/director/queue_hash.rb
# frozen_string_literal: true module Dynflow class Director class QueueHash include Algebrick::TypeCheck def initialize(key_type = Object, value_type = Object) @key_type = key_type @value_type = value_type @stash = Hash.new { |hash, key| hash[key] = [] } end def ...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/director/running_steps_manager.rb
lib/dynflow/director/running_steps_manager.rb
# frozen_string_literal: true module Dynflow class Director # Handles the events generated while running actions, makes sure # the events are sent to the action only when in suspended state class RunningStepsManager include Algebrick::TypeCheck def initialize(world) @world = ...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/telemetry_adapters/statsd.rb
lib/dynflow/telemetry_adapters/statsd.rb
# frozen_string_literal: true module Dynflow module TelemetryAdapters class StatsD < Abstract def initialize(host = '127.0.0.1:8125') require 'statsd-instrument' @instances = {} @host = host ::StatsD.backend = ::StatsD::Instrument::Backends::UDPBackend.new(host, :statsd) ...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/telemetry_adapters/dummy.rb
lib/dynflow/telemetry_adapters/dummy.rb
# frozen_string_literal: true module Dynflow module TelemetryAdapters # Telemetry adapter which does not evaluate blocks passed to {#with_instance}. class Dummy < Abstract # Does nothing with the block passed to it # # @return void def with_instance # Do nothing end ...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/telemetry_adapters/abstract.rb
lib/dynflow/telemetry_adapters/abstract.rb
# frozen_string_literal: true module Dynflow module TelemetryAdapters class Abstract # Default buckets to use when defining a histogram DEFAULT_BUCKETS = [0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10, 20, 30, 60, 120, 300, 600, 1200].freeze # Configures a counter to be collected ...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/active_job/queue_adapter.rb
lib/dynflow/active_job/queue_adapter.rb
# frozen_string_literal: true module Dynflow module ActiveJob module QueueAdapters module QueueMethods def enqueue(job) ::Rails.application.dynflow.world.trigger do |world| job.provider_job_id = job.job_id world.plan_with_options(id: job.provider_job_id, action_cla...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/debug/telemetry/persistence.rb
lib/dynflow/debug/telemetry/persistence.rb
# frozen_string_literal: true module Dynflow module Debug module Telemetry module Persistence methods = [ :load_action, :load_actions, :load_action_for_presentation, :load_action, :load_actions, :load_action_for_presentation, :lo...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/logger_adapters/delegator.rb
lib/dynflow/logger_adapters/delegator.rb
# frozen_string_literal: true module Dynflow module LoggerAdapters class Delegator < Abstract attr_reader :action_logger, :dynflow_logger def initialize(action_logger, dynflow_logger, formatters = [Formatters::Exception]) @action_logger = apply_formatters action_logger, formatters @...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/logger_adapters/formatters.rb
lib/dynflow/logger_adapters/formatters.rb
# frozen_string_literal: true module Dynflow module LoggerAdapters module Formatters require 'dynflow/logger_adapters/formatters/abstract' require 'dynflow/logger_adapters/formatters/exception' end end end
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/logger_adapters/simple.rb
lib/dynflow/logger_adapters/simple.rb
# frozen_string_literal: true require 'English' module Dynflow module LoggerAdapters class Simple < Abstract require 'logger' attr_reader :logger, :action_logger, :dynflow_logger def initialize(output = $stdout, level = Logger::DEBUG, formatters = [Formatters::Exception]) @logger ...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/logger_adapters/abstract.rb
lib/dynflow/logger_adapters/abstract.rb
# frozen_string_literal: true module Dynflow module LoggerAdapters class Abstract # @returns [#fatal, #error, #warn, #info, #debug] logger object for logging errors from action execution def action_logger raise NotImplementedError end # @returns [#fatal, #error, #warn, #info, #de...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/logger_adapters/formatters/exception.rb
lib/dynflow/logger_adapters/formatters/exception.rb
# frozen_string_literal: true module Dynflow module LoggerAdapters module Formatters class Exception < Abstract def format(message) if ::Exception === message backtrace = Actor::BacktraceCollector.full_backtrace(message.backtrace) "#{message.message} (#{message.cla...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/logger_adapters/formatters/abstract.rb
lib/dynflow/logger_adapters/formatters/abstract.rb
# frozen_string_literal: true module Dynflow module LoggerAdapters module Formatters class Abstract def initialize(base) @base = base end [:fatal, :error, :warn, :info, :debug].each do |method| define_method method do |message = nil, &block| if block...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/web/filtering_helpers.rb
lib/dynflow/web/filtering_helpers.rb
# frozen_string_literal: true module Dynflow module Web module FilteringHelpers def supported_filter?(filter_attr) world.persistence.adapter.filtering_by.any? do |attr| attr.to_s == filter_attr.to_s end end def filtering_options(show_all = false) return @filte...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/web/console.rb
lib/dynflow/web/console.rb
# frozen_string_literal: true module Dynflow module Web class Console < Sinatra::Base set :public_folder, Web.web_dir('assets') set :views, Web.web_dir('views') set :per_page, 10 helpers ERB::Util helpers Web::FilteringHelpers helpers Web::WorldHelpers helpers Web::Cons...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/web/console_helpers.rb
lib/dynflow/web/console_helpers.rb
# frozen_string_literal: true module Dynflow module Web module ConsoleHelpers def validation_result_css_class(result) if result == :valid "success" else "danger" end end def value_field(key, value) strip_heredoc(<<-HTML) <p> ...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/web/world_helpers.rb
lib/dynflow/web/world_helpers.rb
# frozen_string_literal: true module Dynflow module Web module WorldHelpers def world settings.world end end end end
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/doc/pages/plugins/div_tag.rb
doc/pages/plugins/div_tag.rb
# frozen_string_literal: true module Jekyll class DivTag < Liquid::Block def render(context) content = super <<-HTML.gsub(/^ +\|/, '') |<#{tag} class="#{@markup}"> | #{render_content context, content} |</#{tag}> HTML end def tag @tag_name.split('_').firs...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/doc/pages/plugins/graphviz.rb
doc/pages/plugins/graphviz.rb
# frozen_string_literal: true # taken from https://raw.githubusercontent.com/kui/octopress-graphviz/master/graphviz_block.rb require 'open3' module Jekyll class GraphvizBlock < Liquid::Block DIV_CLASS_ATTR = 'graphviz-wrapper' DEFAULT_GRAPH_NAME = 'Graphviz' DOT_OPTS = '-Tsvg' DOT_EXE...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/doc/pages/plugins/play.rb
doc/pages/plugins/play.rb
# frozen_string_literal: true require 'pp' require 'pry' module Jekyll class Play < Generator def generate(site) # pp site # binding.pry end end end
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/doc/pages/plugins/toc.rb
doc/pages/plugins/toc.rb
# frozen_string_literal: true module Jekyll module FancyToCFilter def fancytoc(input) converter = @context.registers[:site].converters.find { |c| c.is_a? Jekyll::Converters::Markdown } extensions = converter.instance_variable_get(:@parser).instance_variable_get(:@redcarpet_extensions) to...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/doc/pages/plugins/alert_block.rb
doc/pages/plugins/alert_block.rb
# frozen_string_literal: true require_relative 'div_tag' module Jekyll class AlertBlock < DivTag def initialize(tag_name, markup, tokens) @alert_type = tag_name.split('_').first super tag_name, markup + ' alert alert-' + @alert_type, tokens end def tag 'div' end HEADER = { 'i...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/doc/pages/plugins/plantuml.rb
doc/pages/plugins/plantuml.rb
# frozen_string_literal: true # Title: PlantUML Code Blocks for Jekyll # Author: YJ Park (yjpark@gmail.com) # https://github.com/yjpark/jekyll-plantuml # Description: Integrate PlantUML into Jekyll and Octopress. # # Syntax: # {% plantuml %} # plantuml code # {% endplantuml %} # require 'open3' require 'fileutils' mo...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/doc/pages/plugins/tags.rb
doc/pages/plugins/tags.rb
# frozen_string_literal: true require 'nuggets/range/quantile' require 'erb' module Jekyll class Tagger < Generator safe true attr_accessor :site @types = [:page, :feed] class << self; attr_accessor :types, :site; end def generate(site) self.class.site = self.site = site generat...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
aidewoode/wahwah
https://github.com/aidewoode/wahwah/blob/c451fbe9a49d04e1dd8743e904215f1a7cdb9918/test/wahwah_test.rb
test/wahwah_test.rb
# frozen_string_literal: true require "test_helper" require "fileutils" class WahWahTest < Minitest::Test def test_not_exist_file assert_raises(WahWah::WahWahArgumentError) do WahWah.open("fake.mp3") end end def test_not_supported_formate assert_raises(WahWah::WahWahArgumentError) do Wa...
ruby
MIT
c451fbe9a49d04e1dd8743e904215f1a7cdb9918
2026-01-04T17:50:26.827863Z
false
aidewoode/wahwah
https://github.com/aidewoode/wahwah/blob/c451fbe9a49d04e1dd8743e904215f1a7cdb9918/test/test_helper.rb
test/test_helper.rb
# frozen_string_literal: true require "simplecov" SimpleCov.start do add_filter "/test/" if ENV["CI"] require "simplecov-lcov" SimpleCov::Formatter::LcovFormatter.config do |c| c.report_with_single_file = true c.single_report_path = "coverage/lcov.info" end formatter SimpleCov::Form...
ruby
MIT
c451fbe9a49d04e1dd8743e904215f1a7cdb9918
2026-01-04T17:50:26.827863Z
false
aidewoode/wahwah
https://github.com/aidewoode/wahwah/blob/c451fbe9a49d04e1dd8743e904215f1a7cdb9918/test/wahwah/tag_test.rb
test/wahwah/tag_test.rb
# frozen_string_literal: true require "test_helper" class WahWah::TagTest < Minitest::Test class SubTag < WahWah::Tag; end class SubTagWithParse < WahWah::Tag def parse end end def test_sub_class_not_implemented_parse_method assert_raises(WahWah::WahWahNotImplementedError) do File.open "te...
ruby
MIT
c451fbe9a49d04e1dd8743e904215f1a7cdb9918
2026-01-04T17:50:26.827863Z
false
aidewoode/wahwah
https://github.com/aidewoode/wahwah/blob/c451fbe9a49d04e1dd8743e904215f1a7cdb9918/test/wahwah/mp4_tag_test.rb
test/wahwah/mp4_tag_test.rb
# frozen_string_literal: true require "test_helper" class WahWah::Mp4TagTest < Minitest::Test def test_parse_meta_on_udta_atom File.open "test/files/udta_meta.m4a" do |file| tag = WahWah::Mp4Tag.new(file) meta_atom = WahWah::Mp4::Atom.find(File.open(file.path), "moov", "udta", "meta") image = ...
ruby
MIT
c451fbe9a49d04e1dd8743e904215f1a7cdb9918
2026-01-04T17:50:26.827863Z
false
aidewoode/wahwah
https://github.com/aidewoode/wahwah/blob/c451fbe9a49d04e1dd8743e904215f1a7cdb9918/test/wahwah/riff_tag_test.rb
test/wahwah/riff_tag_test.rb
# frozen_string_literal: true require "test_helper" class WahWah::RiffTagTest < Minitest::Test def test_id3_tag_file File.open "test/files/id3v2.wav" do |file| tag = WahWah::RiffTag.new(file) image = tag.images.first assert_equal "China Girl", tag.title assert_equal "Iggy Pop", tag.arti...
ruby
MIT
c451fbe9a49d04e1dd8743e904215f1a7cdb9918
2026-01-04T17:50:26.827863Z
false
aidewoode/wahwah
https://github.com/aidewoode/wahwah/blob/c451fbe9a49d04e1dd8743e904215f1a7cdb9918/test/wahwah/tag_delegate_test.rb
test/wahwah/tag_delegate_test.rb
# frozen_string_literal: true require "test_helper" class WahWah::TagDelegateTest < Minitest::Test class BaseTag attr_reader :title def initialize @title = "title" end end class Tag < BaseTag extend WahWah::TagDelegate tag_delegate :@tag, :title end def setup @tag = Object.n...
ruby
MIT
c451fbe9a49d04e1dd8743e904215f1a7cdb9918
2026-01-04T17:50:26.827863Z
false
aidewoode/wahwah
https://github.com/aidewoode/wahwah/blob/c451fbe9a49d04e1dd8743e904215f1a7cdb9918/test/wahwah/flac_tag_test.rb
test/wahwah/flac_tag_test.rb
# frozen_string_literal: true require "test_helper" class WahWah::FlacTagTest < Minitest::Test def test_vorbis_comment_tag_file File.open "test/files/vorbis_comment.flac" do |file| tag = WahWah::FlacTag.new(file) image = tag.images.first assert_equal "China Girl", tag.title assert_equal...
ruby
MIT
c451fbe9a49d04e1dd8743e904215f1a7cdb9918
2026-01-04T17:50:26.827863Z
false
aidewoode/wahwah
https://github.com/aidewoode/wahwah/blob/c451fbe9a49d04e1dd8743e904215f1a7cdb9918/test/wahwah/lazy_read_test.rb
test/wahwah/lazy_read_test.rb
# frozen_string_literal: true require "test_helper" class WahWah::LazyReadTest < Minitest::Test class Tag prepend WahWah::LazyRead def initialize @file_io.read(4) @size = 34 end end def setup content = StringIO.new("\x00\x00\x00\"\x10\x00\x10\x00\x00\x00\x0E\x00\x00\x10\n\xC4B\xF0\...
ruby
MIT
c451fbe9a49d04e1dd8743e904215f1a7cdb9918
2026-01-04T17:50:26.827863Z
false
aidewoode/wahwah
https://github.com/aidewoode/wahwah/blob/c451fbe9a49d04e1dd8743e904215f1a7cdb9918/test/wahwah/helper_test.rb
test/wahwah/helper_test.rb
# frozen_string_literal: true require "test_helper" class WahWah::HelperTest < Minitest::Test def test_encode_to_utf8 test_string = "àáâãäåæçèéêëìíîï" iso_8859_1_string = test_string.encode("ISO-8859-1").b utf_16_string = test_string.encode("UTF-16").b utf_16_be_string = test_string.encode("UTF-16BE...
ruby
MIT
c451fbe9a49d04e1dd8743e904215f1a7cdb9918
2026-01-04T17:50:26.827863Z
false
aidewoode/wahwah
https://github.com/aidewoode/wahwah/blob/c451fbe9a49d04e1dd8743e904215f1a7cdb9918/test/wahwah/asf_tag_test.rb
test/wahwah/asf_tag_test.rb
# frozen_string_literal: true require "test_helper" class WahWah::AsfTagTest < Minitest::Test def test_parse File.open "test/files/test.wma" do |file| tag = WahWah::AsfTag.new(file) assert_equal "China Girl", tag.title assert_equal "Iggy Pop", tag.artist assert_equal "Iggy Pop", tag.alb...
ruby
MIT
c451fbe9a49d04e1dd8743e904215f1a7cdb9918
2026-01-04T17:50:26.827863Z
false
aidewoode/wahwah
https://github.com/aidewoode/wahwah/blob/c451fbe9a49d04e1dd8743e904215f1a7cdb9918/test/wahwah/ogg_tag_test.rb
test/wahwah/ogg_tag_test.rb
# frozen_string_literal: true require "test_helper" class WahWah::OggTagTest < Minitest::Test def test_vorbis_tag_file File.open "test/files/vorbis_tag.ogg" do |file| tag = WahWah::OggTag.new(file) assert_instance_of WahWah::Ogg::VorbisTag, tag.instance_variable_get(:@tag) assert_equal "China...
ruby
MIT
c451fbe9a49d04e1dd8743e904215f1a7cdb9918
2026-01-04T17:50:26.827863Z
false
aidewoode/wahwah
https://github.com/aidewoode/wahwah/blob/c451fbe9a49d04e1dd8743e904215f1a7cdb9918/test/wahwah/mp3_tag_test.rb
test/wahwah/mp3_tag_test.rb
# frozen_string_literal: true require "test_helper" class WahWah::Mp3TagTest < Minitest::Test def test_id3v1_tag_file File.open "test/files/id3v1.mp3" do |file| tag = WahWah::Mp3Tag.new(file) assert !tag.id3v2? assert tag.is_vbr? assert_equal "v1", tag.id3_version assert_equal "Ch...
ruby
MIT
c451fbe9a49d04e1dd8743e904215f1a7cdb9918
2026-01-04T17:50:26.827863Z
false
aidewoode/wahwah
https://github.com/aidewoode/wahwah/blob/c451fbe9a49d04e1dd8743e904215f1a7cdb9918/test/wahwah/ogg/page_test.rb
test/wahwah/ogg/page_test.rb
# frozen_string_literal: true require "test_helper" class WahWah::Ogg::PageTest < Minitest::Test def test_parse content = StringIO.new("OggS\u0000\u0002\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000'\xBD\xAA\xC7\u0000\u0000\u0000\u0000\u0018\u0012\xA8\n\u0001\u001E\u0001vorbis\u0000\u0000\u0000\u0000\u0002D\x...
ruby
MIT
c451fbe9a49d04e1dd8743e904215f1a7cdb9918
2026-01-04T17:50:26.827863Z
false
aidewoode/wahwah
https://github.com/aidewoode/wahwah/blob/c451fbe9a49d04e1dd8743e904215f1a7cdb9918/test/wahwah/ogg/vorbis_tag_test.rb
test/wahwah/ogg/vorbis_tag_test.rb
# frozen_string_literal: true require "test_helper" class WahWah::Ogg::VorbisTagTest < Minitest::Test def test_parse identification_packet = "\x01vorbis\x00\x00\x00\x00\x02D\xAC\x00\x00\x00\x00\x00\x00\x00\xEE\x02\x00\x00\x00\x00\x00\xB8\x01".b comment_packet = "\u0003vorbis0\u0000\u0000\u0000BS; LancerMod(...
ruby
MIT
c451fbe9a49d04e1dd8743e904215f1a7cdb9918
2026-01-04T17:50:26.827863Z
false
aidewoode/wahwah
https://github.com/aidewoode/wahwah/blob/c451fbe9a49d04e1dd8743e904215f1a7cdb9918/test/wahwah/ogg/flac_tag_test.rb
test/wahwah/ogg/flac_tag_test.rb
# frozen_string_literal: true require "test_helper" class WahWah::Ogg::FlacTagTest < Minitest::Test def test_parse identification_packet = "\x7FFLAC\x01\x00\x00\x02fLaC\x00\x00\x00\"\x10\x00\x10\x00\x00\x00\x0E\x00\x00\x10\n\xC4B\xF0\x00\x05b d\xA9\xFD\x7Fl\xB0\xE1\xC9Z\xFE\xCD\xF3\xA3iqO".b comment_packet ...
ruby
MIT
c451fbe9a49d04e1dd8743e904215f1a7cdb9918
2026-01-04T17:50:26.827863Z
false
aidewoode/wahwah
https://github.com/aidewoode/wahwah/blob/c451fbe9a49d04e1dd8743e904215f1a7cdb9918/test/wahwah/ogg/packets_test.rb
test/wahwah/ogg/packets_test.rb
# frozen_string_literal: true require "test_helper" class WahWah::Ogg::PacketsTest < Minitest::Test def setup @packets = WahWah::Ogg::Packets.new(File.open("test/files/vorbis_tag.ogg")) end def test_packets_enumerable assert_kind_of Enumerable, @packets end def test_packets_content first_packe...
ruby
MIT
c451fbe9a49d04e1dd8743e904215f1a7cdb9918
2026-01-04T17:50:26.827863Z
false
aidewoode/wahwah
https://github.com/aidewoode/wahwah/blob/c451fbe9a49d04e1dd8743e904215f1a7cdb9918/test/wahwah/ogg/opus_tag_test.rb
test/wahwah/ogg/opus_tag_test.rb
# frozen_string_literal: true require "test_helper" class WahWah::Ogg::OpusTagTest < Minitest::Test def test_parse identification_packet = "OpusHead\x01\x028\x01\x80\xBB\x00\x00\x00\x00\x00".b comment_packet = "OpusTags\r\u0000\u0000\u0000libopus 1.3.1\t\u0000\u0000\u0000\u000F\u0000\u0000\u0000ALBUM=The Id...
ruby
MIT
c451fbe9a49d04e1dd8743e904215f1a7cdb9918
2026-01-04T17:50:26.827863Z
false
aidewoode/wahwah
https://github.com/aidewoode/wahwah/blob/c451fbe9a49d04e1dd8743e904215f1a7cdb9918/test/wahwah/ogg/vorbis_comment_test.rb
test/wahwah/ogg/vorbis_comment_test.rb
# frozen_string_literal: true require "test_helper" class WahWah::Ogg::VorbisCommentTest < Minitest::Test class Tag include WahWah::Ogg::VorbisComment def initialize(comment_content) parse_vorbis_comment(comment_content) end end def test_parse tag = Tag.new("\r\u0000\u0000\u0000libopus 1...
ruby
MIT
c451fbe9a49d04e1dd8743e904215f1a7cdb9918
2026-01-04T17:50:26.827863Z
false
aidewoode/wahwah
https://github.com/aidewoode/wahwah/blob/c451fbe9a49d04e1dd8743e904215f1a7cdb9918/test/wahwah/ogg/pages_test.rb
test/wahwah/ogg/pages_test.rb
# frozen_string_literal: true require "test_helper" class WahWah::Ogg::PagesTest < Minitest::Test def setup @pages = WahWah::Ogg::Pages.new(File.open("test/files/vorbis_tag.ogg")) end def test_pages_enumerable assert_kind_of Enumerable, @pages end def test_each_page @pages.each do |page| ...
ruby
MIT
c451fbe9a49d04e1dd8743e904215f1a7cdb9918
2026-01-04T17:50:26.827863Z
false
aidewoode/wahwah
https://github.com/aidewoode/wahwah/blob/c451fbe9a49d04e1dd8743e904215f1a7cdb9918/test/wahwah/riff/chunk_test.rb
test/wahwah/riff/chunk_test.rb
# frozen_string_literal: true require "test_helper" class WahWah::Riff::ChunkTest < Minitest::Test def test_normal_chunk content = StringIO.new("fmt \x10\x00\x00\x00\x01\x00\x02\x00D\xAC\x00\x00\x10\xB1\x02\x00\x04\x00\x10\x00".b) chunk = WahWah::Riff::Chunk.new(content) assert_equal "fmt", chunk.id ...
ruby
MIT
c451fbe9a49d04e1dd8743e904215f1a7cdb9918
2026-01-04T17:50:26.827863Z
false
aidewoode/wahwah
https://github.com/aidewoode/wahwah/blob/c451fbe9a49d04e1dd8743e904215f1a7cdb9918/test/wahwah/mp3/vbri_header_test.rb
test/wahwah/mp3/vbri_header_test.rb
# frozen_string_literal: true require "test_helper" class WahWah::Mp3::VbriHeaderTest < Minitest::Test def test_prase content = StringIO.new("VBRI\x00\x01\r\xB1\x00d\x00b\xDB\x91\x00\x00!:\x00\x84\x00\x01\x00\x02\x00@\x98\xB1\xBD\xA8\xBB6".b) header = WahWah::Mp3::VbriHeader.new(content) assert_equal 8...
ruby
MIT
c451fbe9a49d04e1dd8743e904215f1a7cdb9918
2026-01-04T17:50:26.827863Z
false
aidewoode/wahwah
https://github.com/aidewoode/wahwah/blob/c451fbe9a49d04e1dd8743e904215f1a7cdb9918/test/wahwah/mp3/mpeg_frame_header_test.rb
test/wahwah/mp3/mpeg_frame_header_test.rb
# frozen_string_literal: true require "test_helper" class WahWah::Mp3::MpegFrameHeaderTest < Minitest::Test def test_prase content = StringIO.new("\x00\x00\x00\x00\xFF\xFB\x90d\x00\x00".b) header = WahWah::Mp3::MpegFrameHeader.new(content) assert_equal "MPEG1", header.version assert_equal "layer3",...
ruby
MIT
c451fbe9a49d04e1dd8743e904215f1a7cdb9918
2026-01-04T17:50:26.827863Z
false
aidewoode/wahwah
https://github.com/aidewoode/wahwah/blob/c451fbe9a49d04e1dd8743e904215f1a7cdb9918/test/wahwah/mp3/xing_header_test.rb
test/wahwah/mp3/xing_header_test.rb
# frozen_string_literal: true require "test_helper" class WahWah::Mp3::XingHeaderTest < Minitest::Test def test_prase content = StringIO.new("Xing\x00\x00\x00\x0F\x00\x00\x014\x00\x00~\xC1\x00\x03\x05\b\n\r\x0F\x12\x14\x17\x19\x1C\x1E".b) header = WahWah::Mp3::XingHeader.new(content) assert_equal 308, ...
ruby
MIT
c451fbe9a49d04e1dd8743e904215f1a7cdb9918
2026-01-04T17:50:26.827863Z
false
aidewoode/wahwah
https://github.com/aidewoode/wahwah/blob/c451fbe9a49d04e1dd8743e904215f1a7cdb9918/test/wahwah/flac/streaminfo_block_test.rb
test/wahwah/flac/streaminfo_block_test.rb
# frozen_string_literal: true require "test_helper" class WahWah::Flac::StreaminfoBlockTest < Minitest::Test class Block include WahWah::Flac::StreaminfoBlock def initialize(block_data) parse_streaminfo_block(block_data) end end def test_parse block = Block.new("\x10\x00\x10\x00\x00\x00\...
ruby
MIT
c451fbe9a49d04e1dd8743e904215f1a7cdb9918
2026-01-04T17:50:26.827863Z
false
aidewoode/wahwah
https://github.com/aidewoode/wahwah/blob/c451fbe9a49d04e1dd8743e904215f1a7cdb9918/test/wahwah/flac/block_test.rb
test/wahwah/flac/block_test.rb
# frozen_string_literal: true require "test_helper" class WahWah::Flac::BlockTest < Minitest::Test def test_parse content = StringIO.new("\x00\x00\x00\"\x10\x00\x10\x00\x00\x00\x0E\x00\x00\x10\n\xC4B\xF0\x00\x05b d\xA9\xFD\x7Fl\xB0\xE1\xC9Z\xFE\xCD\xF3\xA3iqO".b) block = WahWah::Flac::Block.new(content) ...
ruby
MIT
c451fbe9a49d04e1dd8743e904215f1a7cdb9918
2026-01-04T17:50:26.827863Z
false
aidewoode/wahwah
https://github.com/aidewoode/wahwah/blob/c451fbe9a49d04e1dd8743e904215f1a7cdb9918/test/wahwah/mp4/atom_test.rb
test/wahwah/mp4/atom_test.rb
# frozen_string_literal: true require "test_helper" class WahWah::Mp4::AtomTest < Minitest::Test def test_find_atom io = File.open("test/files/udta_meta.m4a") atom = WahWah::Mp4::Atom.find(io, "moov", "udta") assert_equal "udta", atom.type assert_equal 5174, atom.size end def test_return_inval...
ruby
MIT
c451fbe9a49d04e1dd8743e904215f1a7cdb9918
2026-01-04T17:50:26.827863Z
false
aidewoode/wahwah
https://github.com/aidewoode/wahwah/blob/c451fbe9a49d04e1dd8743e904215f1a7cdb9918/test/wahwah/id3/frame_test.rb
test/wahwah/id3/frame_test.rb
# frozen_string_literal: true require "test_helper" class WahWah::ID3::FrameTest < Minitest::Test def test_v2_2_frame content = StringIO.new("TT2\x00\x00\x11\x00China Girl\x00".b) frame = WahWah::ID3::Frame.new(content, 2) assert frame.valid? assert !frame.compressed? assert !frame.data_length_...
ruby
MIT
c451fbe9a49d04e1dd8743e904215f1a7cdb9918
2026-01-04T17:50:26.827863Z
false
aidewoode/wahwah
https://github.com/aidewoode/wahwah/blob/c451fbe9a49d04e1dd8743e904215f1a7cdb9918/test/wahwah/id3/lyrics_frame_body_test.rb
test/wahwah/id3/lyrics_frame_body_test.rb
# frozen_string_literal: true require "test_helper" class WahWah::ID3::LyricsFrameBodyTest < Minitest::Test def test_iso_8859_1_encode_comment value = WahWah::ID3::LyricsFrameBody.new("\x00eng\x00Iggy Pop Rocks".b, 4).value assert_equal "Iggy Pop Rocks", value assert_equal "UTF-8", value.encoding.name ...
ruby
MIT
c451fbe9a49d04e1dd8743e904215f1a7cdb9918
2026-01-04T17:50:26.827863Z
false
aidewoode/wahwah
https://github.com/aidewoode/wahwah/blob/c451fbe9a49d04e1dd8743e904215f1a7cdb9918/test/wahwah/id3/genre_frame_body_test.rb
test/wahwah/id3/genre_frame_body_test.rb
# frozen_string_literal: true require "test_helper" class WahWah::ID3::GenreFrameBodyTest < Minitest::Test def test_text_value_genre value = WahWah::ID3::GenreFrameBody.new("\x00Rock".b, 4).value assert_equal "Rock", value end def test_numeric_value_genre value = WahWah::ID3::GenreFrameBody.new("\x...
ruby
MIT
c451fbe9a49d04e1dd8743e904215f1a7cdb9918
2026-01-04T17:50:26.827863Z
false
aidewoode/wahwah
https://github.com/aidewoode/wahwah/blob/c451fbe9a49d04e1dd8743e904215f1a7cdb9918/test/wahwah/id3/v2_test.rb
test/wahwah/id3/v2_test.rb
# frozen_string_literal: true require "test_helper" class WahWah::ID3::V2Test < Minitest::Test def test_parse content = StringIO.new("ID3\x04\x00\x00\x00\x00\x00-TIT2\x00\x00\x00\v\x00\x00\x03China GirlTRCK\x00\x00\x00\x02\x00\x00\x035TPOS\x00\x00\x00\x02\x00\x00\x031".b) tag = WahWah::ID3::V2.new(content) ...
ruby
MIT
c451fbe9a49d04e1dd8743e904215f1a7cdb9918
2026-01-04T17:50:26.827863Z
false
aidewoode/wahwah
https://github.com/aidewoode/wahwah/blob/c451fbe9a49d04e1dd8743e904215f1a7cdb9918/test/wahwah/id3/text_frame_body_test.rb
test/wahwah/id3/text_frame_body_test.rb
# frozen_string_literal: true require "test_helper" class WahWah::ID3::TextFrameBodyTest < Minitest::Test def test_iso_8859_1_encode_text value = WahWah::ID3::TextFrameBody.new("\x00China Girl".b, 4).value assert_equal "China Girl", value assert_equal "UTF-8", value.encoding.name end def test_utf_...
ruby
MIT
c451fbe9a49d04e1dd8743e904215f1a7cdb9918
2026-01-04T17:50:26.827863Z
false
aidewoode/wahwah
https://github.com/aidewoode/wahwah/blob/c451fbe9a49d04e1dd8743e904215f1a7cdb9918/test/wahwah/id3/frame_body_test.rb
test/wahwah/id3/frame_body_test.rb
# frozen_string_literal: true require "test_helper" class WahWah::ID3::FrameBodyTest < Minitest::Test class SubFrameBody < WahWah::ID3::FrameBody; end class SubFrameBodyWithParse < WahWah::ID3::FrameBody def parse end end def test_sub_class_not_implemented_parse_method assert_raises(WahWah::WahW...
ruby
MIT
c451fbe9a49d04e1dd8743e904215f1a7cdb9918
2026-01-04T17:50:26.827863Z
false