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
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/lib/gzr/modules/folder.rb
lib/gzr/modules/folder.rb
# The MIT License (MIT) # Copyright (c) 2023 Mike DeAngelo Google, Inc. # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including without limitation the rights to # use...
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/lib/gzr/modules/role.rb
lib/gzr/modules/role.rb
# The MIT License (MIT) # Copyright (c) 2023 Mike DeAngelo Google, Inc. # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including without limitation the rights to # use...
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/lib/gzr/modules/look.rb
lib/gzr/modules/look.rb
# The MIT License (MIT) # Copyright (c) 2023 Mike DeAngelo Google, Inc. # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including without limitation the rights to # use...
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/lib/gzr/modules/model.rb
lib/gzr/modules/model.rb
# The MIT License (MIT) # Copyright (c) 2023 Mike DeAngelo Google, Inc. # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including without limitation the rights to # use...
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/lib/gzr/modules/alert.rb
lib/gzr/modules/alert.rb
# The MIT License (MIT) # Copyright (c) 2023 Mike DeAngelo Google, Inc. # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including without limitation the rights to # use...
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/lib/gzr/modules/user.rb
lib/gzr/modules/user.rb
# The MIT License (MIT) # Copyright (c) 2023 Mike DeAngelo Google, Inc. # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including without limitation the rights to # use...
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/lib/gzr/modules/model/set.rb
lib/gzr/modules/model/set.rb
# The MIT License (MIT) # Copyright (c) 2023 Mike DeAngelo Google, Inc. # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including without limitation the rights to # use...
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
looker-open-source/gzr
https://github.com/looker-open-source/gzr/blob/329fd27a33941ecabc87192a5460efdf34352806/lib/gzr/modules/permission/set.rb
lib/gzr/modules/permission/set.rb
# The MIT License (MIT) # Copyright (c) 2023 Mike DeAngelo Google, Inc. # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including without limitation the rights to # use...
ruby
MIT
329fd27a33941ecabc87192a5460efdf34352806
2026-01-04T17:49:18.520281Z
false
pillowfactory/csv-mapper
https://github.com/pillowfactory/csv-mapper/blob/4eb58109cd9f70e29312d150e39a5d18fe1813e6/spec/csv-mapper_spec.rb
spec/csv-mapper_spec.rb
require File.dirname(__FILE__) + '/spec_helper.rb' describe CsvMapper do describe "included" do before(:each) do @mapped_klass = Class.new do include CsvMapper def upcase_name(row, index) row[index].upcase end end @mapped = @mapped_klass.new end ...
ruby
MIT
4eb58109cd9f70e29312d150e39a5d18fe1813e6
2026-01-04T17:49:23.915869Z
false
pillowfactory/csv-mapper
https://github.com/pillowfactory/csv-mapper/blob/4eb58109cd9f70e29312d150e39a5d18fe1813e6/spec/spec_helper.rb
spec/spec_helper.rb
$LOAD_PATH.unshift(File.dirname(__FILE__)) $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) require 'csv-mapper' require 'spec' require 'spec/autorun' Spec::Runner.configure do |config| end
ruby
MIT
4eb58109cd9f70e29312d150e39a5d18fe1813e6
2026-01-04T17:49:23.915869Z
false
pillowfactory/csv-mapper
https://github.com/pillowfactory/csv-mapper/blob/4eb58109cd9f70e29312d150e39a5d18fe1813e6/spec/csv-mapper/attribute_map_spec.rb
spec/csv-mapper/attribute_map_spec.rb
require File.dirname(__FILE__) + '/../spec_helper.rb' describe CsvMapper::AttributeMap do class TestContext def transform_it(row, index) :transform_it_success end end before(:each) do @row_attr = CsvMapper::AttributeMap.new('foo', 1, TestContext.new) @csv_row = ['first_name', 'last_...
ruby
MIT
4eb58109cd9f70e29312d150e39a5d18fe1813e6
2026-01-04T17:49:23.915869Z
false
pillowfactory/csv-mapper
https://github.com/pillowfactory/csv-mapper/blob/4eb58109cd9f70e29312d150e39a5d18fe1813e6/spec/csv-mapper/row_map_spec.rb
spec/csv-mapper/row_map_spec.rb
require File.dirname(__FILE__) + '/../spec_helper.rb' describe CsvMapper::RowMap do class TestMapToClass attr_accessor :foo, :bar, :baz end class TestMapContext def transform(row, index) :transform_success end def change_name(row, target) row[0] = :changed_name end en...
ruby
MIT
4eb58109cd9f70e29312d150e39a5d18fe1813e6
2026-01-04T17:49:23.915869Z
false
pillowfactory/csv-mapper
https://github.com/pillowfactory/csv-mapper/blob/4eb58109cd9f70e29312d150e39a5d18fe1813e6/lib/csv-mapper.rb
lib/csv-mapper.rb
dir = File.dirname(__FILE__) $LOAD_PATH.unshift dir unless $LOAD_PATH.include?(dir) require 'rubygems' # the following is slightly modified from Gregory Brown's # solution on the Ruport Blaag: # http://ruport.blogspot.com/2008/03/fastercsv-api-shim-for-19.html if RUBY_VERSION > "1.9" require "csv" unless defined? F...
ruby
MIT
4eb58109cd9f70e29312d150e39a5d18fe1813e6
2026-01-04T17:49:23.915869Z
false
pillowfactory/csv-mapper
https://github.com/pillowfactory/csv-mapper/blob/4eb58109cd9f70e29312d150e39a5d18fe1813e6/lib/csv-mapper/row_map.rb
lib/csv-mapper/row_map.rb
require 'csv-mapper/attribute_map' module CsvMapper # CsvMapper::RowMap provides a simple, DSL-like interface for constructing mappings. # A CsvMapper::RowMap provides the main functionality of the library. It will mostly be used indirectly through the CsvMapper API, # but may be useful to use directly for the ...
ruby
MIT
4eb58109cd9f70e29312d150e39a5d18fe1813e6
2026-01-04T17:49:23.915869Z
false
pillowfactory/csv-mapper
https://github.com/pillowfactory/csv-mapper/blob/4eb58109cd9f70e29312d150e39a5d18fe1813e6/lib/csv-mapper/attribute_map.rb
lib/csv-mapper/attribute_map.rb
module CsvMapper # A CsvMapper::AttributeMap contains the instructions to parse a value from a CSV row and to know the # name of the attribute it is targeting. class AttributeMap attr_reader :name, :index # Creates a new instance using the provided attribute +name+, CSV row +index+, and evaluation +map...
ruby
MIT
4eb58109cd9f70e29312d150e39a5d18fe1813e6
2026-01-04T17:49:23.915869Z
false
github/dat-analysis
https://github.com/github/dat-analysis/blob/d931a35bc1688cc5d8cfdcc5ce08e92af8603ea8/test/dat_analysis_subclassing_test.rb
test/dat_analysis_subclassing_test.rb
require "minitest/autorun" require "mocha/setup" require "dat/analysis" # helper class to provide mismatch results class TestCookedAnalyzer < Dat::Analysis attr_accessor :mismatches def initialize(experiment_name) super @mismatches = [] # use a simple array for a mismatch store end # load data files...
ruby
MIT
d931a35bc1688cc5d8cfdcc5ce08e92af8603ea8
2026-01-04T17:49:25.973580Z
false
github/dat-analysis
https://github.com/github/dat-analysis/blob/d931a35bc1688cc5d8cfdcc5ce08e92af8603ea8/test/dat_analysis_test.rb
test/dat_analysis_test.rb
require "minitest/autorun" require "mocha/setup" require "dat/analysis" require "time" # helper class to provide mismatch results class TestMismatchAnalysis < Dat::Analysis attr_accessor :mismatches def initialize(experiment_name) super @mismatches = [] # use a simple array for a mismatch store end ...
ruby
MIT
d931a35bc1688cc5d8cfdcc5ce08e92af8603ea8
2026-01-04T17:49:25.973580Z
false
github/dat-analysis
https://github.com/github/dat-analysis/blob/d931a35bc1688cc5d8cfdcc5ce08e92af8603ea8/test/fixtures/invalid-matcher/matcher.rb
test/fixtures/invalid-matcher/matcher.rb
raise Errno::EACCES
ruby
MIT
d931a35bc1688cc5d8cfdcc5ce08e92af8603ea8
2026-01-04T17:49:25.973580Z
false
github/dat-analysis
https://github.com/github/dat-analysis/blob/d931a35bc1688cc5d8cfdcc5ce08e92af8603ea8/test/fixtures/experiment-with-good-and-extraneous-classes/wrapper_y.rb
test/fixtures/experiment-with-good-and-extraneous-classes/wrapper_y.rb
class WrapperX < Dat::Analysis::Result def user 'wrapper-x-user' end end class WrapperY < Dat::Analysis::Result def user 'wrapper-y-user' end end
ruby
MIT
d931a35bc1688cc5d8cfdcc5ce08e92af8603ea8
2026-01-04T17:49:25.973580Z
false
github/dat-analysis
https://github.com/github/dat-analysis/blob/d931a35bc1688cc5d8cfdcc5ce08e92af8603ea8/test/fixtures/experiment-with-good-and-extraneous-classes/wrapper_w.rb
test/fixtures/experiment-with-good-and-extraneous-classes/wrapper_w.rb
class WrapperW def match? true end end
ruby
MIT
d931a35bc1688cc5d8cfdcc5ce08e92af8603ea8
2026-01-04T17:49:25.973580Z
false
github/dat-analysis
https://github.com/github/dat-analysis/blob/d931a35bc1688cc5d8cfdcc5ce08e92af8603ea8/test/fixtures/experiment-with-good-and-extraneous-classes/wrapper_z.rb
test/fixtures/experiment-with-good-and-extraneous-classes/wrapper_z.rb
class WrapperZ < Dat::Analysis::Result def user 'wrapper-z-user' end end class WrapperV def user 'wrapper-v-user' end end
ruby
MIT
d931a35bc1688cc5d8cfdcc5ce08e92af8603ea8
2026-01-04T17:49:25.973580Z
false
github/dat-analysis
https://github.com/github/dat-analysis/blob/d931a35bc1688cc5d8cfdcc5ce08e92af8603ea8/test/fixtures/experiment-with-good-and-extraneous-classes/matcher_w.rb
test/fixtures/experiment-with-good-and-extraneous-classes/matcher_w.rb
class MatcherW def match? true end end
ruby
MIT
d931a35bc1688cc5d8cfdcc5ce08e92af8603ea8
2026-01-04T17:49:25.973580Z
false
github/dat-analysis
https://github.com/github/dat-analysis/blob/d931a35bc1688cc5d8cfdcc5ce08e92af8603ea8/test/fixtures/experiment-with-good-and-extraneous-classes/matcher_y.rb
test/fixtures/experiment-with-good-and-extraneous-classes/matcher_y.rb
class MatcherX < Dat::Analysis::Matcher def match? result =~ /b/ end end class MatcherY < Dat::Analysis::Matcher def match? result =~ /c/ end end
ruby
MIT
d931a35bc1688cc5d8cfdcc5ce08e92af8603ea8
2026-01-04T17:49:25.973580Z
false
github/dat-analysis
https://github.com/github/dat-analysis/blob/d931a35bc1688cc5d8cfdcc5ce08e92af8603ea8/test/fixtures/experiment-with-good-and-extraneous-classes/matcher_z.rb
test/fixtures/experiment-with-good-and-extraneous-classes/matcher_z.rb
class MatcherZ < Dat::Analysis::Matcher def match? result =~ /^known/ end end class MatcherV def match? true end end
ruby
MIT
d931a35bc1688cc5d8cfdcc5ce08e92af8603ea8
2026-01-04T17:49:25.973580Z
false
github/dat-analysis
https://github.com/github/dat-analysis/blob/d931a35bc1688cc5d8cfdcc5ce08e92af8603ea8/test/fixtures/analysis/test-suite-experiment/matcher.rb
test/fixtures/analysis/test-suite-experiment/matcher.rb
class MatcherA < Dat::Analysis::Matcher end class MatcherB < Dat::Analysis::Matcher end
ruby
MIT
d931a35bc1688cc5d8cfdcc5ce08e92af8603ea8
2026-01-04T17:49:25.973580Z
false
github/dat-analysis
https://github.com/github/dat-analysis/blob/d931a35bc1688cc5d8cfdcc5ce08e92af8603ea8/test/fixtures/experiment-with-classes/matcher_b.rb
test/fixtures/experiment-with-classes/matcher_b.rb
class MatcherB < Dat::Analysis::Matcher def match? result =~ /b/ end end class MatcherC < Dat::Analysis::Matcher def match? result =~ /c/ end end
ruby
MIT
d931a35bc1688cc5d8cfdcc5ce08e92af8603ea8
2026-01-04T17:49:25.973580Z
false
github/dat-analysis
https://github.com/github/dat-analysis/blob/d931a35bc1688cc5d8cfdcc5ce08e92af8603ea8/test/fixtures/experiment-with-classes/matcher_a.rb
test/fixtures/experiment-with-classes/matcher_a.rb
class MatcherA < Dat::Analysis::Matcher def match? result =~ /^known/ end end
ruby
MIT
d931a35bc1688cc5d8cfdcc5ce08e92af8603ea8
2026-01-04T17:49:25.973580Z
false
github/dat-analysis
https://github.com/github/dat-analysis/blob/d931a35bc1688cc5d8cfdcc5ce08e92af8603ea8/test/fixtures/experiment-with-classes/wrapper_b.rb
test/fixtures/experiment-with-classes/wrapper_b.rb
class WrapperB < Dat::Analysis::Result def repository 'wrapper-b-repository' end end class WrapperC < Dat::Analysis::Result def repository 'wrapper-c-repository' end end
ruby
MIT
d931a35bc1688cc5d8cfdcc5ce08e92af8603ea8
2026-01-04T17:49:25.973580Z
false
github/dat-analysis
https://github.com/github/dat-analysis/blob/d931a35bc1688cc5d8cfdcc5ce08e92af8603ea8/test/fixtures/experiment-with-classes/wrapper_a.rb
test/fixtures/experiment-with-classes/wrapper_a.rb
class WrapperA < Dat::Analysis::Result def repository 'wrapper-a-repository' end end
ruby
MIT
d931a35bc1688cc5d8cfdcc5ce08e92af8603ea8
2026-01-04T17:49:25.973580Z
false
github/dat-analysis
https://github.com/github/dat-analysis/blob/d931a35bc1688cc5d8cfdcc5ce08e92af8603ea8/test/fixtures/initialize-classes/matcher_m.rb
test/fixtures/initialize-classes/matcher_m.rb
class MatcherM < Dat::Analysis::Matcher def match? result =~ /^known/ end end
ruby
MIT
d931a35bc1688cc5d8cfdcc5ce08e92af8603ea8
2026-01-04T17:49:25.973580Z
false
github/dat-analysis
https://github.com/github/dat-analysis/blob/d931a35bc1688cc5d8cfdcc5ce08e92af8603ea8/test/fixtures/initialize-classes/wrapper_m.rb
test/fixtures/initialize-classes/wrapper_m.rb
class WrapperM < Dat::Analysis::Result def repository 'wrapper-m-repository' end end
ruby
MIT
d931a35bc1688cc5d8cfdcc5ce08e92af8603ea8
2026-01-04T17:49:25.973580Z
false
github/dat-analysis
https://github.com/github/dat-analysis/blob/d931a35bc1688cc5d8cfdcc5ce08e92af8603ea8/test/fixtures/initialize-classes/matcher_n.rb
test/fixtures/initialize-classes/matcher_n.rb
class MatcherN < Dat::Analysis::Matcher def match? result =~ /n/ end end class MatcherO def match? true end end
ruby
MIT
d931a35bc1688cc5d8cfdcc5ce08e92af8603ea8
2026-01-04T17:49:25.973580Z
false
github/dat-analysis
https://github.com/github/dat-analysis/blob/d931a35bc1688cc5d8cfdcc5ce08e92af8603ea8/test/fixtures/initialize-classes/wrapper_n.rb
test/fixtures/initialize-classes/wrapper_n.rb
class WrapperN < Dat::Analysis::Result def repository 'wrapper-n-repository' end end class WrapperO def repository 'wrapper-o-repository' end end
ruby
MIT
d931a35bc1688cc5d8cfdcc5ce08e92af8603ea8
2026-01-04T17:49:25.973580Z
false
github/dat-analysis
https://github.com/github/dat-analysis/blob/d931a35bc1688cc5d8cfdcc5ce08e92af8603ea8/lib/dat/analysis.rb
lib/dat/analysis.rb
module Dat # Public: Analyze the findings of an Experiment # # Typically implementors will wish to subclass this to provide their own # implementations of the following methods suited to the environment where # `dat-science` is being used: `#read`, `#count`, `#cook`. # # Example: # ...
ruby
MIT
d931a35bc1688cc5d8cfdcc5ce08e92af8603ea8
2026-01-04T17:49:25.973580Z
false
github/dat-analysis
https://github.com/github/dat-analysis/blob/d931a35bc1688cc5d8cfdcc5ce08e92af8603ea8/lib/dat/analysis/library.rb
lib/dat/analysis/library.rb
module Dat # Internal: Keep a registry of Dat::Analysis::Matcher and # Dat::Analysis::Result subclasses for use by an Dat::Analysis::Analysis # instance. class Analysis::Library @@known_classes = [] # Public: Collect matcher and results classes created by the # provided block. # # ...
ruby
MIT
d931a35bc1688cc5d8cfdcc5ce08e92af8603ea8
2026-01-04T17:49:25.973580Z
false
github/dat-analysis
https://github.com/github/dat-analysis/blob/d931a35bc1688cc5d8cfdcc5ce08e92af8603ea8/lib/dat/analysis/registry.rb
lib/dat/analysis/registry.rb
module Dat # Internal: Registry of Dat::Analysis::Matcher and Dat::Analysis::Result # classes. This is used to maintain the mapping of matchers and # results wrappers for a particular Dat::Analysis instance. class Analysis::Registry # Public: Create a new Registry instance. def ini...
ruby
MIT
d931a35bc1688cc5d8cfdcc5ce08e92af8603ea8
2026-01-04T17:49:25.973580Z
false
github/dat-analysis
https://github.com/github/dat-analysis/blob/d931a35bc1688cc5d8cfdcc5ce08e92af8603ea8/lib/dat/analysis/result.rb
lib/dat/analysis/result.rb
require "time" module Dat # Public: Base class for wrappers around science mismatch results. # # Instance methods defined on subclasses will be added as instance methods # on science mismatch results handled by Dat::Analysis instances which # add the wrapper subclass via Dat::Analysis#add or Dat::Analysis#lo...
ruby
MIT
d931a35bc1688cc5d8cfdcc5ce08e92af8603ea8
2026-01-04T17:49:25.973580Z
false
github/dat-analysis
https://github.com/github/dat-analysis/blob/d931a35bc1688cc5d8cfdcc5ce08e92af8603ea8/lib/dat/analysis/matcher.rb
lib/dat/analysis/matcher.rb
module Dat # Public: Base class for science mismatch results matchers. Subclasses # implement the `#match?` instance method, which returns true when # a provided science mismatch result is recognized by the matcher. # # Subclasses are expected to define `#match?`. # # Subclasses may optio...
ruby
MIT
d931a35bc1688cc5d8cfdcc5ce08e92af8603ea8
2026-01-04T17:49:25.973580Z
false
github/dat-analysis
https://github.com/github/dat-analysis/blob/d931a35bc1688cc5d8cfdcc5ce08e92af8603ea8/lib/dat/analysis/tally.rb
lib/dat/analysis/tally.rb
module Dat # Internal: Track and summarize counts of occurrences of mismatch objects. # # Examples # # tally = Dat::Analysis::Tally.new # tally.count('foo') # => 1 # tally.count('bar') # => 1 # tally.count('foo') # => 2 # puts tally.summary # Summary of known mismatches found...
ruby
MIT
d931a35bc1688cc5d8cfdcc5ce08e92af8603ea8
2026-01-04T17:49:25.973580Z
false
fractaledmind/prompts
https://github.com/fractaledmind/prompts/blob/fe252adedfac5fa19b5cdc82d073a2212834b254/test/test_prompts.rb
test/test_prompts.rb
# frozen_string_literal: true require "test_helper" class TestPrompts < Minitest::Test def test_that_it_has_a_version_number refute_nil ::Prompts::VERSION end def test_it_does_something_useful assert true end end
ruby
MIT
fe252adedfac5fa19b5cdc82d073a2212834b254
2026-01-04T17:49:30.304472Z
false
fractaledmind/prompts
https://github.com/fractaledmind/prompts/blob/fe252adedfac5fa19b5cdc82d073a2212834b254/test/test_helper.rb
test/test_helper.rb
# frozen_string_literal: true $LOAD_PATH.unshift File.expand_path("../lib", __dir__) require "prompts" require "minitest/autorun"
ruby
MIT
fe252adedfac5fa19b5cdc82d073a2212834b254
2026-01-04T17:49:30.304472Z
false
fractaledmind/prompts
https://github.com/fractaledmind/prompts/blob/fe252adedfac5fa19b5cdc82d073a2212834b254/lib/prompts.rb
lib/prompts.rb
# frozen_string_literal: true require "io/console" require "reline" require "rainbow" # this needs to come before require "fmt" require "fmt" require_relative "prompts/version" require_relative "prompts/prompt" require_relative "prompts/text_utils" require_relative "prompts/content" require_relative "prompts/paragrap...
ruby
MIT
fe252adedfac5fa19b5cdc82d073a2212834b254
2026-01-04T17:49:30.304472Z
false
fractaledmind/prompts
https://github.com/fractaledmind/prompts/blob/fe252adedfac5fa19b5cdc82d073a2212834b254/lib/prompts/content.rb
lib/prompts/content.rb
# frozen_string_literal: false module Prompts class Content attr_reader :slots def initialize(width: MAX_WIDTH) @slots = [] @frame_stack = [] @width = width end def paragraph(text) paragraph = Paragraph.new(text, width: @width) @slots.concat paragraph.lines self ...
ruby
MIT
fe252adedfac5fa19b5cdc82d073a2212834b254
2026-01-04T17:49:30.304472Z
false
fractaledmind/prompts
https://github.com/fractaledmind/prompts/blob/fe252adedfac5fa19b5cdc82d073a2212834b254/lib/prompts/select_prompt.rb
lib/prompts/select_prompt.rb
# frozen_string_literal: true module Prompts class SelectPrompt < Prompt def self.ask(options: nil, **kwargs) instance = new(options: options, **kwargs) yield instance if block_given? instance.ask end def initialize(options: nil, **kwargs) super(**kwargs) @options = option...
ruby
MIT
fe252adedfac5fa19b5cdc82d073a2212834b254
2026-01-04T17:49:30.304472Z
false
fractaledmind/prompts
https://github.com/fractaledmind/prompts/blob/fe252adedfac5fa19b5cdc82d073a2212834b254/lib/prompts/version.rb
lib/prompts/version.rb
# frozen_string_literal: true module Prompts VERSION = "0.3.1" end
ruby
MIT
fe252adedfac5fa19b5cdc82d073a2212834b254
2026-01-04T17:49:30.304472Z
false
fractaledmind/prompts
https://github.com/fractaledmind/prompts/blob/fe252adedfac5fa19b5cdc82d073a2212834b254/lib/prompts/text_utils.rb
lib/prompts/text_utils.rb
# frozen_string_literal: true require "unicode/display_width" require "unicode/emoji" module Prompts module TextUtils ANSI_REGEX = /\e\[[0-9;]*[a-zA-Z]/ def wrap_text(text, width:, line_prefix: EMPTY, line_suffix: EMPTY, alignment: :left) words = text.scan(Regexp.union(/\S+/, ANSI_REGEX)) lines...
ruby
MIT
fe252adedfac5fa19b5cdc82d073a2212834b254
2026-01-04T17:49:30.304472Z
false
fractaledmind/prompts
https://github.com/fractaledmind/prompts/blob/fe252adedfac5fa19b5cdc82d073a2212834b254/lib/prompts/pause_prompt.rb
lib/prompts/pause_prompt.rb
# frozen_string_literal: true module Prompts class PausePrompt < Prompt def initialize(...) super @prompt = "Press Enter ⏎ to continue..." end def resolve_choice_from(response) true end end end
ruby
MIT
fe252adedfac5fa19b5cdc82d073a2212834b254
2026-01-04T17:49:30.304472Z
false
fractaledmind/prompts
https://github.com/fractaledmind/prompts/blob/fe252adedfac5fa19b5cdc82d073a2212834b254/lib/prompts/confirm_prompt.rb
lib/prompts/confirm_prompt.rb
# frozen_string_literal: true module Prompts class ConfirmPrompt < Prompt def initialize(...) super @prompt = if @default == false "Choose [y/N]:" elsif @default == true "Choose [Y/n]:" else "Choose [y/n]:" end @default_boolean = @default @defaul...
ruby
MIT
fe252adedfac5fa19b5cdc82d073a2212834b254
2026-01-04T17:49:30.304472Z
false
fractaledmind/prompts
https://github.com/fractaledmind/prompts/blob/fe252adedfac5fa19b5cdc82d073a2212834b254/lib/prompts/form.rb
lib/prompts/form.rb
# frozen_string_literal: true module Prompts class Form def self.submit(&block) instance = new yield instance if block instance.submit end def initialize @content = Prompts::Content.new @index = 0 @prompts = {} @results = {} end def content(&block) ...
ruby
MIT
fe252adedfac5fa19b5cdc82d073a2212834b254
2026-01-04T17:49:30.304472Z
false
fractaledmind/prompts
https://github.com/fractaledmind/prompts/blob/fe252adedfac5fa19b5cdc82d073a2212834b254/lib/prompts/text_prompt.rb
lib/prompts/text_prompt.rb
# frozen_string_literal: true module Prompts class TextPrompt < Prompt def initialize(...) super @instructions = "Press Enter to submit" @hint ||= "Type your response and press Enter ⏎" end end end
ruby
MIT
fe252adedfac5fa19b5cdc82d073a2212834b254
2026-01-04T17:49:30.304472Z
false
fractaledmind/prompts
https://github.com/fractaledmind/prompts/blob/fe252adedfac5fa19b5cdc82d073a2212834b254/lib/prompts/box.rb
lib/prompts/box.rb
# frozen_string_literal: true module Prompts class Box include TextUtils SOLID_BORDER = {top_left: "┌", top_right: "┐", bottom_left: "└", bottom_right: "┘", horizontal: "─", vertical: "│"}.freeze DOUBLE_BORDER = {top_left: "╔", top_right: "╗", bottom_left: "╚", bottom_right: "╝", horizontal: "═", vertic...
ruby
MIT
fe252adedfac5fa19b5cdc82d073a2212834b254
2026-01-04T17:49:30.304472Z
false
fractaledmind/prompts
https://github.com/fractaledmind/prompts/blob/fe252adedfac5fa19b5cdc82d073a2212834b254/lib/prompts/prompt.rb
lib/prompts/prompt.rb
# frozen_string_literal: true require "reline" module Prompts class Prompt def self.ask(label: nil, prompt: "> ", hint: nil, default: nil, required: false, validate: nil) instance = new(label: label, prompt: prompt, hint: hint, default: default, required: required, validate: validate) yield instance...
ruby
MIT
fe252adedfac5fa19b5cdc82d073a2212834b254
2026-01-04T17:49:30.304472Z
false
fractaledmind/prompts
https://github.com/fractaledmind/prompts/blob/fe252adedfac5fa19b5cdc82d073a2212834b254/lib/prompts/paragraph.rb
lib/prompts/paragraph.rb
# frozen_string_literal: true module Prompts class Paragraph include TextUtils LINE_PADDING = 3 def initialize(text, width: 60) @text = text @width = width - (LINE_PADDING + 1) @line_padding = SPACE * LINE_PADDING end def lines wrap_text(@text, width: @width, line_prefi...
ruby
MIT
fe252adedfac5fa19b5cdc82d073a2212834b254
2026-01-04T17:49:30.304472Z
false
ARMmbed/homebrew-formulae
https://github.com/ARMmbed/homebrew-formulae/blob/d333d7f6e81df43e592c55f3fdd531bb6205ba44/arm-none-eabi-gcc.rb
arm-none-eabi-gcc.rb
require 'formula' class ArmNoneEabiGcc < Formula homepage 'https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads' version '10.3-2021.10' url 'https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.10/gcc-arm-none-eabi-10.3-2021.10-mac.tar.bz2' sha256 'fb613dacb25149f140f73fe9ff6c38...
ruby
Apache-2.0
d333d7f6e81df43e592c55f3fdd531bb6205ba44
2026-01-04T17:49:37.580746Z
false
mleung/feather
https://github.com/mleung/feather/blob/8039b8a99883597deeb3d03f67216755f101f667/tasks/merb.thor/common.rb
tasks/merb.thor/common.rb
# This was added via Merb's bundler require "rubygems" require "rubygems/source_index" module Gem BUNDLED_SPECS = File.join(Dir.pwd, "gems", "specifications") MAIN_INDEX = Gem::SourceIndex.from_gems_in(BUNDLED_SPECS) FALLBACK_INDEX = Gem::SourceIndex.from_installed_gems def self.source_index MultiSourc...
ruby
MIT
8039b8a99883597deeb3d03f67216755f101f667
2026-01-04T17:49:41.524706Z
false
mleung/feather
https://github.com/mleung/feather/blob/8039b8a99883597deeb3d03f67216755f101f667/tasks/merb.thor/ops.rb
tasks/merb.thor/ops.rb
module Thor::Tasks module Merb class Collector attr_reader :dependencies def self.collect(str) collector = new collector.instance_eval(str) collector.dependencies end def initialize @dependencies = [] end def dependency(name, *versions) ...
ruby
MIT
8039b8a99883597deeb3d03f67216755f101f667
2026-01-04T17:49:41.524706Z
false
mleung/feather
https://github.com/mleung/feather/blob/8039b8a99883597deeb3d03f67216755f101f667/tasks/merb.thor/utils.rb
tasks/merb.thor/utils.rb
class String def /(other) (Pathname.new(self) + other).to_s end end module ColorfulMessages # red def error(*messages) puts messages.map { |msg| "\033[1;31m#{msg}\033[0m" } end # yellow def warning(*messages) puts messages.map { |msg| "\033[1;33m#{msg}\033[0m" } end # green def...
ruby
MIT
8039b8a99883597deeb3d03f67216755f101f667
2026-01-04T17:49:41.524706Z
false
mleung/feather
https://github.com/mleung/feather/blob/8039b8a99883597deeb3d03f67216755f101f667/tasks/merb.thor/app_script.rb
tasks/merb.thor/app_script.rb
#!/usr/bin/env ruby # This was added by Merb's bundler require "rubygems" require File.join(File.dirname(__FILE__), "common") gems_dir = File.join(File.dirname(__FILE__), '..', 'gems') if File.directory?(gems_dir) $BUNDLE = true Gem.clear_paths Gem.path.replace([File.expand_path(gems_dir)]) ENV["PATH"] = "#...
ruby
MIT
8039b8a99883597deeb3d03f67216755f101f667
2026-01-04T17:49:41.524706Z
false
mleung/feather
https://github.com/mleung/feather/blob/8039b8a99883597deeb3d03f67216755f101f667/tasks/merb.thor/gem_ext.rb
tasks/merb.thor/gem_ext.rb
require "erb" Gem.pre_install_hooks.push(proc do |installer| unless File.file?(installer.bin_dir / "common.rb") FileUtils.mkdir_p(installer.bin_dir) FileUtils.cp(File.dirname(__FILE__) / "common.rb", installer.bin_dir / "common.rb") end include ColorfulMessages name = installer.spec.name if $GEMS ...
ruby
MIT
8039b8a99883597deeb3d03f67216755f101f667
2026-01-04T17:49:41.524706Z
false
mleung/feather
https://github.com/mleung/feather/blob/8039b8a99883597deeb3d03f67216755f101f667/app/helpers/articles_helper.rb
app/helpers/articles_helper.rb
module Merb module Feather module ArticlesHelper end end end
ruby
MIT
8039b8a99883597deeb3d03f67216755f101f667
2026-01-04T17:49:41.524706Z
false
mleung/feather
https://github.com/mleung/feather/blob/8039b8a99883597deeb3d03f67216755f101f667/app/helpers/global_helpers.rb
app/helpers/global_helpers.rb
module Merb module GlobalHelpers # Returns true if the app is running as a slice, false otherwise def is_slice? ::Feather.respond_to?(:public_path_for) end # This wraps whether the app is a slice or not, and then will create the appropriate stylesheet include def css_include(*args) ...
ruby
MIT
8039b8a99883597deeb3d03f67216755f101f667
2026-01-04T17:49:41.524706Z
false
mleung/feather
https://github.com/mleung/feather/blob/8039b8a99883597deeb3d03f67216755f101f667/app/helpers/admin/dashboard_helper.rb
app/helpers/admin/dashboard_helper.rb
module Merb module Feather module Admin module DashboardHelper end end end end
ruby
MIT
8039b8a99883597deeb3d03f67216755f101f667
2026-01-04T17:49:41.524706Z
false
mleung/feather
https://github.com/mleung/feather/blob/8039b8a99883597deeb3d03f67216755f101f667/app/helpers/admin/configurations_helper.rb
app/helpers/admin/configurations_helper.rb
module Merb module Feather module Admin module ConfigurationsHelper end end end end
ruby
MIT
8039b8a99883597deeb3d03f67216755f101f667
2026-01-04T17:49:41.524706Z
false
mleung/feather
https://github.com/mleung/feather/blob/8039b8a99883597deeb3d03f67216755f101f667/app/controllers/articles.rb
app/controllers/articles.rb
module Feather class Articles < Application # This handles the index (recent articles), or the year/month/day views def index if params[:day] Merb::Cache[:feather].fetch "#{Feather::Articles.name}/#{params[:year]}/#{params[:month]}/#{params[:day]}" do @archives = Feather::Article.get_a...
ruby
MIT
8039b8a99883597deeb3d03f67216755f101f667
2026-01-04T17:49:41.524706Z
false
mleung/feather
https://github.com/mleung/feather/blob/8039b8a99883597deeb3d03f67216755f101f667/app/controllers/application.rb
app/controllers/application.rb
module Feather class Application < Merb::Controller include Merb::AssetsMixin # include CacheHelper before :get_settings before :load_plugins before :fire_before_event # before :fix_cache_issue_with_merb_093 ## # This just makes sure that params[:format] isn't null, to get around the...
ruby
MIT
8039b8a99883597deeb3d03f67216755f101f667
2026-01-04T17:49:41.524706Z
false
mleung/feather
https://github.com/mleung/feather/blob/8039b8a99883597deeb3d03f67216755f101f667/app/controllers/exceptions.rb
app/controllers/exceptions.rb
class Exceptions < Merb::Controller self._template_roots << [Feather.slice_path_for(:view), :_template_location] if Feather.respond_to?(:slice_path_for) # handle NotFound exceptions (404) def not_found render :format => :html end # handle NotAcceptable exceptions (406) def not_acceptable render :f...
ruby
MIT
8039b8a99883597deeb3d03f67216755f101f667
2026-01-04T17:49:41.524706Z
false
mleung/feather
https://github.com/mleung/feather/blob/8039b8a99883597deeb3d03f67216755f101f667/app/controllers/admin/plugins.rb
app/controllers/admin/plugins.rb
require File.join(File.dirname(__FILE__), "base") module Feather module Admin class Plugins < Base before :find_plugin, :only => %w(update delete show) def index @plugins = Feather::Plugin.all display @plugins end def show(id) display @plugin end def...
ruby
MIT
8039b8a99883597deeb3d03f67216755f101f667
2026-01-04T17:49:41.524706Z
false
mleung/feather
https://github.com/mleung/feather/blob/8039b8a99883597deeb3d03f67216755f101f667/app/controllers/admin/users.rb
app/controllers/admin/users.rb
require File.join(File.dirname(__FILE__), "base") module Feather module Admin class Users < Base before :find_user, :only => %w(edit update delete show) def index @users = Feather::User.all display @users end def show display @user end ...
ruby
MIT
8039b8a99883597deeb3d03f67216755f101f667
2026-01-04T17:49:41.524706Z
false
mleung/feather
https://github.com/mleung/feather/blob/8039b8a99883597deeb3d03f67216755f101f667/app/controllers/admin/configurations.rb
app/controllers/admin/configurations.rb
require File.join(File.dirname(__FILE__), "base") module Feather module Admin class Configurations < Base before :find_configuration def show display @configuration end def update @configuration = Feather::Configuration.first @configuration.title = params...
ruby
MIT
8039b8a99883597deeb3d03f67216755f101f667
2026-01-04T17:49:41.524706Z
false
mleung/feather
https://github.com/mleung/feather/blob/8039b8a99883597deeb3d03f67216755f101f667/app/controllers/admin/articles.rb
app/controllers/admin/articles.rb
require File.join(File.dirname(__FILE__), "base") module Feather module Admin class Articles < Base before :find_article, :only => %w(edit update delete show) def index @page_count, @articles = Feather::Article.paginated(:page => (params[:page] || 1).to_i, :per_page => 10, :order => [:created...
ruby
MIT
8039b8a99883597deeb3d03f67216755f101f667
2026-01-04T17:49:41.524706Z
false
mleung/feather
https://github.com/mleung/feather/blob/8039b8a99883597deeb3d03f67216755f101f667/app/controllers/admin/dashboards.rb
app/controllers/admin/dashboards.rb
require File.join(File.dirname(__FILE__), "base") module Feather module Admin class Dashboards < Base before :check_for_user skip_before :ensure_authenticated def show @activity = Feather::Activity.all(:order => [:created_at.desc], :limit => 5) display @activity end ...
ruby
MIT
8039b8a99883597deeb3d03f67216755f101f667
2026-01-04T17:49:41.524706Z
false
mleung/feather
https://github.com/mleung/feather/blob/8039b8a99883597deeb3d03f67216755f101f667/app/controllers/admin/base.rb
app/controllers/admin/base.rb
module Feather module Admin class Base < Feather::Application layout :admin before :ensure_authenticated end end end
ruby
MIT
8039b8a99883597deeb3d03f67216755f101f667
2026-01-04T17:49:41.524706Z
false
mleung/feather
https://github.com/mleung/feather/blob/8039b8a99883597deeb3d03f67216755f101f667/app/models/feather/plugin.rb
app/models/feather/plugin.rb
require "fileutils" module Feather class Plugin attr_accessor :url, :name, :version, :author, :author_name, :author_email, :author_homepage, :homepage, :about attr_reader :path def initialize(plugin = nil) if plugin @path = Merb.root / "app" / "plugins" / plugin manifest =...
ruby
MIT
8039b8a99883597deeb3d03f67216755f101f667
2026-01-04T17:49:41.524706Z
false
mleung/feather
https://github.com/mleung/feather/blob/8039b8a99883597deeb3d03f67216755f101f667/app/models/feather/article.rb
app/models/feather/article.rb
module Feather class Article include DataMapper::Resource include DataMapper::Validate is_paginated property :id, Integer, :key => true, :serial => true property :title, String, :nullable => false, :length => 255 property :content, Text, :nullable => false property :created_at, D...
ruby
MIT
8039b8a99883597deeb3d03f67216755f101f667
2026-01-04T17:49:41.524706Z
false
mleung/feather
https://github.com/mleung/feather/blob/8039b8a99883597deeb3d03f67216755f101f667/app/models/feather/configuration.rb
app/models/feather/configuration.rb
module Feather class Configuration include DataMapper::Resource property :id, Integer, :key => true, :serial => true property :title, String property :tag_line, String, :length => 255 # TODO: was TEXT, is VARCHAR now, should be TEXT again property :about, String property :about_formatter,...
ruby
MIT
8039b8a99883597deeb3d03f67216755f101f667
2026-01-04T17:49:41.524706Z
false
mleung/feather
https://github.com/mleung/feather/blob/8039b8a99883597deeb3d03f67216755f101f667/app/models/feather/plugin_setting.rb
app/models/feather/plugin_setting.rb
module Feather class PluginSetting include DataMapper::Resource property :id, Integer, :key => true, :serial => true property :handle, String property :value, String property :plugin_id, String # This handles cache expirations for settings being created/updated/deleted after(:save,...
ruby
MIT
8039b8a99883597deeb3d03f67216755f101f667
2026-01-04T17:49:41.524706Z
false
mleung/feather
https://github.com/mleung/feather/blob/8039b8a99883597deeb3d03f67216755f101f667/app/models/feather/activity.rb
app/models/feather/activity.rb
module Feather class Activity include DataMapper::Validate include DataMapper::Resource property :id, Integer, :key => true, :serial => true property :message, String, :length => 255 property :created_at, DateTime validates_present :message, :key => "uniq_msg" end end
ruby
MIT
8039b8a99883597deeb3d03f67216755f101f667
2026-01-04T17:49:41.524706Z
false
mleung/feather
https://github.com/mleung/feather/blob/8039b8a99883597deeb3d03f67216755f101f667/app/models/feather/user.rb
app/models/feather/user.rb
# This is a default user class used to activate merb-auth. Feel free to change from a User to # Some other class, or to remove it altogether. If removed, merb-auth may not work by default. # # Don't forget that by default the salted_user mixin is used from merb-more # You'll need to setup your db as per the salted_u...
ruby
MIT
8039b8a99883597deeb3d03f67216755f101f667
2026-01-04T17:49:41.524706Z
false
mleung/feather
https://github.com/mleung/feather/blob/8039b8a99883597deeb3d03f67216755f101f667/gems/gems/abstract-1.0.0/setup.rb
gems/gems/abstract-1.0.0/setup.rb
# # setup.rb # # Copyright (c) 2000-2004 Minero Aoki # # This program is free software. # You can distribute/modify this program under the terms of # the GNU Lesser General Public License version 2.1. # # # For backward compatibility # unless Enumerable.method_defined?(:map) module Enumerable alias map collect ...
ruby
MIT
8039b8a99883597deeb3d03f67216755f101f667
2026-01-04T17:49:41.524706Z
false
mleung/feather
https://github.com/mleung/feather/blob/8039b8a99883597deeb3d03f67216755f101f667/gems/gems/abstract-1.0.0/test/test.rb
gems/gems/abstract-1.0.0/test/test.rb
## ## $Rev: 1 $ ## $Release: 1.0.0 $ ## copyright(c) 2006 kuwata-lab.com all rights reserved. ## testdir = File.dirname(File.expand_path(__FILE__)) libdir = File.dirname(testdir) + "/lib" $: << libdir require 'test/unit' require 'abstract' class Foo abstract_method "arg1, arg2=''", :m1, :m2, :m3 end class Bar...
ruby
MIT
8039b8a99883597deeb3d03f67216755f101f667
2026-01-04T17:49:41.524706Z
false
mleung/feather
https://github.com/mleung/feather/blob/8039b8a99883597deeb3d03f67216755f101f667/gems/gems/abstract-1.0.0/lib/abstract.rb
gems/gems/abstract-1.0.0/lib/abstract.rb
## ## $Rev: 1 $ ## $Release: 1.0.0 $ ## copyright(c) 2006 kuwata-lab.com all rights reserved. ## ## ## helper to define abstract method in Ruby. ## ## ## example1. (shorter notation) ## ## require 'abstract' ## class Foo ## abstract_method 'arg1, arg2=""', :method1, :method2, :method3 ## end ## ## ## example2...
ruby
MIT
8039b8a99883597deeb3d03f67216755f101f667
2026-01-04T17:49:41.524706Z
false
mleung/feather
https://github.com/mleung/feather/blob/8039b8a99883597deeb3d03f67216755f101f667/gems/gems/erubis-2.6.0/setup.rb
gems/gems/erubis-2.6.0/setup.rb
# # setup.rb # # Copyright (c) 2000-2004 Minero Aoki # # This program is free software. # You can distribute/modify this program under the terms of # the GNU Lesser General Public License version 2.1. # # # For backward compatibility # unless Enumerable.method_defined?(:map) module Enumerable alias map collect ...
ruby
MIT
8039b8a99883597deeb3d03f67216755f101f667
2026-01-04T17:49:41.524706Z
false
mleung/feather
https://github.com/mleung/feather/blob/8039b8a99883597deeb3d03f67216755f101f667/gems/gems/erubis-2.6.0/contrib/erubis-run.rb
gems/gems/erubis-2.6.0/contrib/erubis-run.rb
=begin = apache/erubis-run.rb Copyright (C) 2007 Andrew R Jackson <arjackson at acm dot org> Built from original by Shugo Maeda: Copyright (C) 2001 Shugo Maeda <shugo@modruby.net> All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the f...
ruby
MIT
8039b8a99883597deeb3d03f67216755f101f667
2026-01-04T17:49:41.524706Z
false
mleung/feather
https://github.com/mleung/feather/blob/8039b8a99883597deeb3d03f67216755f101f667/gems/gems/erubis-2.6.0/benchmark/bench.rb
gems/gems/erubis-2.6.0/benchmark/bench.rb
#!/usr/bin/env ruby ### ### $Rev: 101 $ ### $Release: 2.6.0 $ ### copyright(c) 2006-2008 kuwata-lab.com all rights reserved. ### require 'erb' require 'erubis' require 'erubis/tiny' require 'erubis/engine/enhanced' require 'yaml' require 'cgi' include ERB::Util begin require 'eruby' rescue LoadError ERuby = nil ...
ruby
MIT
8039b8a99883597deeb3d03f67216755f101f667
2026-01-04T17:49:41.524706Z
false
mleung/feather
https://github.com/mleung/feather/blob/8039b8a99883597deeb3d03f67216755f101f667/gems/gems/erubis-2.6.0/test/test.rb
gems/gems/erubis-2.6.0/test/test.rb
## ## $Rev: 77 $ ## $Release: 2.6.0 $ ## copyright(c) 2006-2008 kuwata-lab.com all rights reserved. ## unless defined?(TESTDIR) TESTDIR = File.dirname(__FILE__) LIBDIR = TESTDIR == '.' ? '../lib' : File.dirname(TESTDIR) + '/lib' $: << TESTDIR $: << LIBDIR end require 'test/unit' #require 'test/unit/ui/cons...
ruby
MIT
8039b8a99883597deeb3d03f67216755f101f667
2026-01-04T17:49:41.524706Z
false
mleung/feather
https://github.com/mleung/feather/blob/8039b8a99883597deeb3d03f67216755f101f667/gems/gems/erubis-2.6.0/test/test-enhancers.rb
gems/gems/erubis-2.6.0/test/test-enhancers.rb
## ## $Rev: 93 $ ## $Release: 2.6.0 $ ## copyright(c) 2006-2008 kuwata-lab.com all rights reserved. ## require "#{File.dirname(__FILE__)}/test.rb" require 'stringio' require 'erubis' require 'erubis/engine/enhanced' require 'erubis/engine/optimized' class EnhancersTest < Test::Unit::TestCase testdata_list = loa...
ruby
MIT
8039b8a99883597deeb3d03f67216755f101f667
2026-01-04T17:49:41.524706Z
false
mleung/feather
https://github.com/mleung/feather/blob/8039b8a99883597deeb3d03f67216755f101f667/gems/gems/erubis-2.6.0/test/test-users-guide.rb
gems/gems/erubis-2.6.0/test/test-users-guide.rb
### ### $Rev: 77 $ ### $Release: 2.6.0 $ ### copyright(c) 2006-2008 kuwata-lab.com all rights reserved. ### require "#{File.dirname(__FILE__)}/test.rb" class KwarkUsersGuideTest < Test::Unit::TestCase DIR = File.expand_path(File.dirname(__FILE__) + '/data/users-guide') CWD = Dir.pwd() def setup Dir.chd...
ruby
MIT
8039b8a99883597deeb3d03f67216755f101f667
2026-01-04T17:49:41.524706Z
false
mleung/feather
https://github.com/mleung/feather/blob/8039b8a99883597deeb3d03f67216755f101f667/gems/gems/erubis-2.6.0/test/assert-text-equal.rb
gems/gems/erubis-2.6.0/test/assert-text-equal.rb
### ### $Rev: 77 $ ### $Release: 2.6.0 $ ### copyright(c) 2006-2008 kuwata-lab.com all rights reserved. ### require 'test/unit' require 'tempfile' module Test module Unit class TestCase def assert_text_equal(expected, actual, message=nil, diffopt='-u', flag_cut=true) if expected == actual ...
ruby
MIT
8039b8a99883597deeb3d03f67216755f101f667
2026-01-04T17:49:41.524706Z
false
mleung/feather
https://github.com/mleung/feather/blob/8039b8a99883597deeb3d03f67216755f101f667/gems/gems/erubis-2.6.0/test/testutil.rb
gems/gems/erubis-2.6.0/test/testutil.rb
### ### $Rev: 77 $ ### $Release: 2.6.0 $ ### copyright(c) 2006-2008 kuwata-lab.com all rights reserved. ### require 'yaml' require 'test/unit/testcase' class Test::Unit::TestCase def self.load_yaml_datafile(filename, options={}, &block) # :nodoc: # read datafile s = File.read(filename) if filename ...
ruby
MIT
8039b8a99883597deeb3d03f67216755f101f667
2026-01-04T17:49:41.524706Z
false
mleung/feather
https://github.com/mleung/feather/blob/8039b8a99883597deeb3d03f67216755f101f667/gems/gems/erubis-2.6.0/test/test-main.rb
gems/gems/erubis-2.6.0/test/test-main.rb
## ## $Rev: 87 $ ## $Release: 2.6.0 $ ## $Date: 2007-07-12 05:01:24 +0900 (Thu, 12 Jul 2007) $ ## require "#{File.dirname(__FILE__)}/test.rb" require 'tempfile' require 'erubis/main' $script = File.dirname(TESTDIR) + '/bin/erubis' #if test(?f, 'bin/erubis') # $script = 'bin/erubis' #elsif test(?f, '../bin/erubis'...
ruby
MIT
8039b8a99883597deeb3d03f67216755f101f667
2026-01-04T17:49:41.524706Z
false
mleung/feather
https://github.com/mleung/feather/blob/8039b8a99883597deeb3d03f67216755f101f667/gems/gems/erubis-2.6.0/test/test-engines.rb
gems/gems/erubis-2.6.0/test/test-engines.rb
## ## $Rev: 95 $ ## $Release: 2.6.0 $ ## copyright(c) 2006-2008 kuwata-lab.com all rights reserved. ## require "#{File.dirname(__FILE__)}/test.rb" require 'erubis' require 'erubis/engine/eruby' require 'erubis/engine/ephp' require 'erubis/engine/ec' require 'erubis/engine/ejava' require 'erubis/engine/escheme' requir...
ruby
MIT
8039b8a99883597deeb3d03f67216755f101f667
2026-01-04T17:49:41.524706Z
false
mleung/feather
https://github.com/mleung/feather/blob/8039b8a99883597deeb3d03f67216755f101f667/gems/gems/erubis-2.6.0/test/test-erubis.rb
gems/gems/erubis-2.6.0/test/test-erubis.rb
## ## $Rev: 104 $ ## $Release: 2.6.0 $ ## copyright(c) 2006-2008 kuwata-lab.com all rights reserved. ## require "#{File.dirname(__FILE__)}/test.rb" require 'stringio' require 'erubis' require 'erubis/engine/enhanced' require 'erubis/engine/optimized' require 'erubis/tiny' class ErubisTest < Test::Unit::TestCase ...
ruby
MIT
8039b8a99883597deeb3d03f67216755f101f667
2026-01-04T17:49:41.524706Z
false
mleung/feather
https://github.com/mleung/feather/blob/8039b8a99883597deeb3d03f67216755f101f667/gems/gems/erubis-2.6.0/test/data/users-guide/example3.rb
gems/gems/erubis-2.6.0/test/data/users-guide/example3.rb
require 'erubis' input = File.read('example3.eruby') eruby = Erubis::EscapedEruby.new(input) # or Erubis::XmlEruby puts "----- script source ---" puts eruby.src # print script source puts "----- result ----------" list = ['<aaa>', 'b&b', '"ccc"'] puts eruby.result(binding()) ...
ruby
MIT
8039b8a99883597deeb3d03f67216755f101f667
2026-01-04T17:49:41.524706Z
false
mleung/feather
https://github.com/mleung/feather/blob/8039b8a99883597deeb3d03f67216755f101f667/gems/gems/erubis-2.6.0/test/data/users-guide/example10.rb
gems/gems/erubis-2.6.0/test/data/users-guide/example10.rb
require 'erubis' input = File.read('example10.xhtml') eruby = Erubis::PI::Eruby.new(input) print eruby.src
ruby
MIT
8039b8a99883597deeb3d03f67216755f101f667
2026-01-04T17:49:41.524706Z
false
mleung/feather
https://github.com/mleung/feather/blob/8039b8a99883597deeb3d03f67216755f101f667/gems/gems/erubis-2.6.0/test/data/users-guide/example9.rb
gems/gems/erubis-2.6.0/test/data/users-guide/example9.rb
require 'erubis' input = File.read('example9.eruby') eruby1 = Erubis::Eruby.new(input) eruby2 = Erubis::Eruby.new(input, :preamble=>false, :postamble=>false) puts eruby1.src # print preamble and postamble puts "--------------" puts eruby2.src # don't print preamble and postamble
ruby
MIT
8039b8a99883597deeb3d03f67216755f101f667
2026-01-04T17:49:41.524706Z
false
mleung/feather
https://github.com/mleung/feather/blob/8039b8a99883597deeb3d03f67216755f101f667/gems/gems/erubis-2.6.0/test/data/users-guide/fasteruby.rb
gems/gems/erubis-2.6.0/test/data/users-guide/fasteruby.rb
require 'erubis' input = File.read('fasteruby.rhtml') eruby = Erubis::FastEruby.new(input) # create Eruby object puts "---------- script source ---" puts eruby.src puts "---------- result ----------" context = { :title=>'Example', :list=>['aaa', 'bbb', 'ccc'] } output = eruby.evaluate(context) print output
ruby
MIT
8039b8a99883597deeb3d03f67216755f101f667
2026-01-04T17:49:41.524706Z
false
mleung/feather
https://github.com/mleung/feather/blob/8039b8a99883597deeb3d03f67216755f101f667/gems/gems/erubis-2.6.0/test/data/users-guide/example1.rb
gems/gems/erubis-2.6.0/test/data/users-guide/example1.rb
require 'erubis' input = File.read('example1.eruby') eruby = Erubis::Eruby.new(input) # create Eruby object puts "---------- script source ---" puts eruby.src # print script source puts "---------- result ----------" list = ['aaa', 'bbb', 'ccc'] puts eruby.result(binding()) # get result...
ruby
MIT
8039b8a99883597deeb3d03f67216755f101f667
2026-01-04T17:49:41.524706Z
false
mleung/feather
https://github.com/mleung/feather/blob/8039b8a99883597deeb3d03f67216755f101f667/gems/gems/erubis-2.6.0/test/data/users-guide/example5.rb
gems/gems/erubis-2.6.0/test/data/users-guide/example5.rb
require 'erubis' input = File.read('example5.eruby') eruby = Erubis::Eruby.new(input) # create Eruby object ## create context object ## (key means var name, which may be string or symbol.) context = { :val => 'Erubis Example', 'list' => ['aaa', 'bbb', 'ccc'], } ## or # context = Erubis::Context.new() # cont...
ruby
MIT
8039b8a99883597deeb3d03f67216755f101f667
2026-01-04T17:49:41.524706Z
false
mleung/feather
https://github.com/mleung/feather/blob/8039b8a99883597deeb3d03f67216755f101f667/gems/gems/erubis-2.6.0/test/data/users-guide/example4.rb
gems/gems/erubis-2.6.0/test/data/users-guide/example4.rb
require 'erubis' input = File.read('example4.eruby') eruby = Erubis::Eruby.new(input, :pattern=>'<!--% %-->') # or '<(?:!--)?% %(?:--)?>' puts "---------- script source ---" puts eruby.src # print script source puts "---------- result ----------" list =...
ruby
MIT
8039b8a99883597deeb3d03f67216755f101f667
2026-01-04T17:49:41.524706Z
false
mleung/feather
https://github.com/mleung/feather/blob/8039b8a99883597deeb3d03f67216755f101f667/gems/gems/erubis-2.6.0/test/data/users-guide/headerfooter-example2.rb
gems/gems/erubis-2.6.0/test/data/users-guide/headerfooter-example2.rb
require 'erubis' class HeaderFooterEruby < Erubis::Eruby include Erubis::HeaderFooterEnhancer end input = File.read('headerfooter-example2.rhtml') eruby = HeaderFooterEruby.new(input) print eruby.src
ruby
MIT
8039b8a99883597deeb3d03f67216755f101f667
2026-01-04T17:49:41.524706Z
false