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
openware/barong
https://github.com/openware/barong/blob/1f488179596f8aa3ac2528f78f0d9f330f45be2b/config/initializers/mgn_api.rb
config/initializers/mgn_api.rb
require 'yaml' require 'erb' require 'openssl' raw_file = File.read('config/management_api.yml') yaml = ERB.new(raw_file).result (::YAML.safe_load(yaml) || {}).deep_symbolize_keys!.tap do |x| x.fetch(:keychain).each do |id, key| begin key = OpenSSL::PKey.read(Base64.urlsafe_decode64(key.fetch(:value))) ...
ruby
Apache-2.0
1f488179596f8aa3ac2528f78f0d9f330f45be2b
2026-01-04T17:41:13.346865Z
false
openware/barong
https://github.com/openware/barong/blob/1f488179596f8aa3ac2528f78f0d9f330f45be2b/config/initializers/event_api.rb
config/initializers/event_api.rb
# frozen_string_literal: true require_dependency 'barong/event_api' ActiveSupport.on_load(:active_record) do ActiveRecord::Base.include ::EventAPI::ActiveRecord::Extension end
ruby
Apache-2.0
1f488179596f8aa3ac2528f78f0d9f330f45be2b
2026-01-04T17:41:13.346865Z
false
openware/barong
https://github.com/openware/barong/blob/1f488179596f8aa3ac2528f78f0d9f330f45be2b/config/initializers/api_pagination.rb
config/initializers/api_pagination.rb
ApiPagination.configure do |config| # If you have more than one gem included, you can choose a paginator. config.paginator = :kaminari # or :will_paginate # By default, this is set to 'Total' # config.total_header = 'X-Total' # By default, this is set to 'Per-Page' # config.per_page_header = 'X-Per-Page' ...
ruby
Apache-2.0
1f488179596f8aa3ac2528f78f0d9f330f45be2b
2026-01-04T17:41:13.346865Z
false
openware/barong
https://github.com/openware/barong/blob/1f488179596f8aa3ac2528f78f0d9f330f45be2b/config/initializers/carrierwave.rb
config/initializers/carrierwave.rb
# frozen_string_literal: true require 'carrierwave/storage/abstract' require 'carrierwave/storage/file' require 'carrierwave/storage/fog' Barong::App.define do |config| # Storage configuration # https://www.openware.com/sdk/docs/barong/configuration.html#storage-configuration config.set(:storage_provider, 'lo...
ruby
Apache-2.0
1f488179596f8aa3ac2528f78f0d9f330f45be2b
2026-01-04T17:41:13.346865Z
false
openware/barong
https://github.com/openware/barong/blob/1f488179596f8aa3ac2528f78f0d9f330f45be2b/config/initializers/versioning.rb
config/initializers/versioning.rb
# encoding: UTF-8 # frozen_string_literal: true # This file is auto-generated from the current state of VCS. # Instead of editing this file, please use bin/gendocs. module Barong class Application GIT_TAG = '2.7.0' GIT_SHA = '3d7fe81' BUILD_DATE = '2020-12-08 15:09:53+02:00' VERSION = GIT_TAG...
ruby
Apache-2.0
1f488179596f8aa3ac2528f78f0d9f330f45be2b
2026-01-04T17:41:13.346865Z
false
openware/barong
https://github.com/openware/barong/blob/1f488179596f8aa3ac2528f78f0d9f330f45be2b/config/initializers/backtrace_silencers.rb
config/initializers/backtrace_silencers.rb
# Be sure to restart your server when you modify this file. # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } # You can also remove all the silencers if you're trying to debug a probl...
ruby
Apache-2.0
1f488179596f8aa3ac2528f78f0d9f330f45be2b
2026-01-04T17:41:13.346865Z
false
openware/barong
https://github.com/openware/barong/blob/1f488179596f8aa3ac2528f78f0d9f330f45be2b/config/initializers/mime_types.rb
config/initializers/mime_types.rb
# Be sure to restart your server when you modify this file. # Add new mime types for use in respond_to blocks: # Mime::Type.register "text/richtext", :rtf
ruby
Apache-2.0
1f488179596f8aa3ac2528f78f0d9f330f45be2b
2026-01-04T17:41:13.346865Z
false
openware/barong
https://github.com/openware/barong/blob/1f488179596f8aa3ac2528f78f0d9f330f45be2b/config/initializers/open_uri.rb
config/initializers/open_uri.rb
# Don't allow downloaded files to be created as StringIO. Create a tempfile instead OpenURI::Buffer.send :remove_const, 'StringMax' if OpenURI::Buffer.const_defined?('StringMax') OpenURI::Buffer.const_set 'StringMax', 0
ruby
Apache-2.0
1f488179596f8aa3ac2528f78f0d9f330f45be2b
2026-01-04T17:41:13.346865Z
false
openware/barong
https://github.com/openware/barong/blob/1f488179596f8aa3ac2528f78f0d9f330f45be2b/config/environments/test.rb
config/environments/test.rb
Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. config.log_level = :fatal # The test environment is used exclusively to run your application's # test suite. You never need to work with it otherwise. Remember that # your test database is "scrat...
ruby
Apache-2.0
1f488179596f8aa3ac2528f78f0d9f330f45be2b
2026-01-04T17:41:13.346865Z
false
openware/barong
https://github.com/openware/barong/blob/1f488179596f8aa3ac2528f78f0d9f330f45be2b/config/environments/development.rb
config/environments/development.rb
Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # In the development environment your application's code is reloaded on # every request. This slows down response time but is perfect for development # since you don't have to restart the web serv...
ruby
Apache-2.0
1f488179596f8aa3ac2528f78f0d9f330f45be2b
2026-01-04T17:41:13.346865Z
false
openware/barong
https://github.com/openware/barong/blob/1f488179596f8aa3ac2528f78f0d9f330f45be2b/config/environments/production.rb
config/environments/production.rb
Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # Code is not reloaded between requests. config.cache_classes = true # Eager load code on boot. This eager loads most of Rails and # your application in memory, allowing both threaded web serve...
ruby
Apache-2.0
1f488179596f8aa3ac2528f78f0d9f330f45be2b
2026-01-04T17:41:13.346865Z
false
saka1/simdjson_ruby
https://github.com/saka1/simdjson_ruby/blob/b5830dccafd66dec93729fa0a948e2214706604b/benchmark/run_benchmark.rb
benchmark/run_benchmark.rb
#!/usr/bin/env ruby # frozen_string_literal: true require 'benchmark/ips' require 'json' require 'simdjson' require 'oj' files = %w[ apache_builds.json github_events.json demo.json ] files = files.map do |x| [x, open(File.join(__dir__, "./#{x}")).read] # rubocop:disable Security/Open (reason: inputs are safe ...
ruby
MIT
b5830dccafd66dec93729fa0a948e2214706604b
2026-01-04T17:41:26.979522Z
false
saka1/simdjson_ruby
https://github.com/saka1/simdjson_ruby/blob/b5830dccafd66dec93729fa0a948e2214706604b/test/simdjson_test.rb
test/simdjson_test.rb
# frozen_string_literal: true require 'test_helper' class SimdjsonTest < Minitest::Test def test_that_it_has_a_version_number refute_nil ::Simdjson::VERSION end def test_object_str x = Simdjson.parse('{"a": "xyz"}') assert x.is_a? Hash assert_equal 'xyz', x['a'] end def test_object_int ...
ruby
MIT
b5830dccafd66dec93729fa0a948e2214706604b
2026-01-04T17:41:26.979522Z
false
saka1/simdjson_ruby
https://github.com/saka1/simdjson_ruby/blob/b5830dccafd66dec93729fa0a948e2214706604b/test/test_helper.rb
test/test_helper.rb
# frozen_string_literal: true $LOAD_PATH.unshift File.expand_path('../lib', __dir__) require 'simdjson' require 'minitest/autorun'
ruby
MIT
b5830dccafd66dec93729fa0a948e2214706604b
2026-01-04T17:41:26.979522Z
false
saka1/simdjson_ruby
https://github.com/saka1/simdjson_ruby/blob/b5830dccafd66dec93729fa0a948e2214706604b/ext/simdjson/extconf.rb
ext/simdjson/extconf.rb
# frozen_string_literal: true require 'mkmf' $CXXFLAGS += ' -std=c++11 -Wno-register ' create_makefile('simdjson/simdjson')
ruby
MIT
b5830dccafd66dec93729fa0a948e2214706604b
2026-01-04T17:41:26.979522Z
false
saka1/simdjson_ruby
https://github.com/saka1/simdjson_ruby/blob/b5830dccafd66dec93729fa0a948e2214706604b/lib/simdjson.rb
lib/simdjson.rb
# frozen_string_literal: true require 'simdjson/version' require 'simdjson/simdjson'
ruby
MIT
b5830dccafd66dec93729fa0a948e2214706604b
2026-01-04T17:41:26.979522Z
false
saka1/simdjson_ruby
https://github.com/saka1/simdjson_ruby/blob/b5830dccafd66dec93729fa0a948e2214706604b/lib/simdjson/version.rb
lib/simdjson/version.rb
# frozen_string_literal: true module Simdjson VERSION = '1.0.1' end
ruby
MIT
b5830dccafd66dec93729fa0a948e2214706604b
2026-01-04T17:41:26.979522Z
false
cfabianski/ltree_hierarchy
https://github.com/cfabianski/ltree_hierarchy/blob/a4a18ccdb701e57945b7181721c4dc36c1c82fcc/init.rb
init.rb
require "ltree_hierarchy"
ruby
MIT
a4a18ccdb701e57945b7181721c4dc36c1c82fcc
2026-01-04T17:41:25.810985Z
false
cfabianski/ltree_hierarchy
https://github.com/cfabianski/ltree_hierarchy/blob/a4a18ccdb701e57945b7181721c4dc36c1c82fcc/test/hierarchy_test.rb
test/hierarchy_test.rb
require "rubygems" require "active_record" require "minitest/autorun" require "ltree_hierarchy" class DefaultTreeNode < ActiveRecord::Base has_ltree_hierarchy end class TreeNode < ActiveRecord::Base has_ltree_hierarchy fragment: :fragment, parent_fragment: :parent_fragment, path: :materialized_path end class Hi...
ruby
MIT
a4a18ccdb701e57945b7181721c4dc36c1c82fcc
2026-01-04T17:41:25.810985Z
false
cfabianski/ltree_hierarchy
https://github.com/cfabianski/ltree_hierarchy/blob/a4a18ccdb701e57945b7181721c4dc36c1c82fcc/lib/ltree_hierarchy.rb
lib/ltree_hierarchy.rb
require "ltree_hierarchy/hierarchy" require "ltree_hierarchy/version" ActiveRecord::Base.extend(Ltree::Hierarchy)
ruby
MIT
a4a18ccdb701e57945b7181721c4dc36c1c82fcc
2026-01-04T17:41:25.810985Z
false
cfabianski/ltree_hierarchy
https://github.com/cfabianski/ltree_hierarchy/blob/a4a18ccdb701e57945b7181721c4dc36c1c82fcc/lib/ltree_hierarchy/version.rb
lib/ltree_hierarchy/version.rb
module Ltree module Hierarchy VERSION = "2.0.0" end end
ruby
MIT
a4a18ccdb701e57945b7181721c4dc36c1c82fcc
2026-01-04T17:41:25.810985Z
false
cfabianski/ltree_hierarchy
https://github.com/cfabianski/ltree_hierarchy/blob/a4a18ccdb701e57945b7181721c4dc36c1c82fcc/lib/ltree_hierarchy/hierarchy.rb
lib/ltree_hierarchy/hierarchy.rb
module Ltree module Hierarchy def has_ltree_hierarchy(options = {}) options = { fragment: :id, parent_fragment: :parent_id, path: :path, optional: true }.merge(options) options.assert_valid_keys(:fragment, :parent_fragment, :path, :optional) cattr_accessor...
ruby
MIT
a4a18ccdb701e57945b7181721c4dc36c1c82fcc
2026-01-04T17:41:25.810985Z
false
vividness/lexeme
https://github.com/vividness/lexeme/blob/8b5bdb2d0ed093b2b2b70b5584f80c3a80622e15/spec/rule_spec.rb
spec/rule_spec.rb
require 'spec_helper' describe Lexeme::Rule do describe '#initialize' do subject { Lexeme::Rule } it 'raises argument error on no params' do expect { subject.new }.to raise_error(ArgumentError) end it 'raises error on one param only' do expect { subject.new('RULE') }.to raise_error(ArgumentError) ...
ruby
MIT
8b5bdb2d0ed093b2b2b70b5584f80c3a80622e15
2026-01-04T17:41:30.060108Z
false
vividness/lexeme
https://github.com/vividness/lexeme/blob/8b5bdb2d0ed093b2b2b70b5584f80c3a80622e15/spec/ruleset_spec.rb
spec/ruleset_spec.rb
require 'spec_helper' describe Lexeme::Ruleset do subject { Lexeme::Ruleset } describe '#initialize' do it 'creates an instance' do instance = subject.new instance.should be_a Lexeme::Ruleset end it 'yields control' do expect { |b| subject.new &b }.to yield_control expec...
ruby
MIT
8b5bdb2d0ed093b2b2b70b5584f80c3a80622e15
2026-01-04T17:41:30.060108Z
false
vividness/lexeme
https://github.com/vividness/lexeme/blob/8b5bdb2d0ed093b2b2b70b5584f80c3a80622e15/spec/string_spec.rb
spec/string_spec.rb
require 'spec_helper' describe String do subject { 'My name is Inigo Montoya!' } describe '#tokenize' do it 'tokenizes a string' do tokens = subject.tokenize tokens[0].value.should be_eql 'My' tokens[2].value.should be_eql 'is' tokens[4].value.should be_eql 'Montoya' tokens[-1...
ruby
MIT
8b5bdb2d0ed093b2b2b70b5584f80c3a80622e15
2026-01-04T17:41:30.060108Z
false
vividness/lexeme
https://github.com/vividness/lexeme/blob/8b5bdb2d0ed093b2b2b70b5584f80c3a80622e15/spec/token_spec.rb
spec/token_spec.rb
require 'spec_helper' describe Lexeme::Token do subject { Lexeme::Token.new('INT', '1234', 1) } describe '#initialize' do it 'properly sets up an object' do subject.should be_a Lexeme::Token end end describe '#to_text' do it 'returns token as string' do subject.to_s.should be_eql '1...
ruby
MIT
8b5bdb2d0ed093b2b2b70b5584f80c3a80622e15
2026-01-04T17:41:30.060108Z
false
vividness/lexeme
https://github.com/vividness/lexeme/blob/8b5bdb2d0ed093b2b2b70b5584f80c3a80622e15/spec/lexeme_spec.rb
spec/lexeme_spec.rb
require 'spec_helper' describe Lexeme do describe '#define' do it 'returns Lexeme object' do Lexeme.define { token :ANY => /^.*$/ }.should be_a Lexeme::Lexeme end end describe '#analyze' do it 'raise an erorr if source file cannot be found' do lexer = Lexeme.define do token :A...
ruby
MIT
8b5bdb2d0ed093b2b2b70b5584f80c3a80622e15
2026-01-04T17:41:30.060108Z
false
vividness/lexeme
https://github.com/vividness/lexeme/blob/8b5bdb2d0ed093b2b2b70b5584f80c3a80622e15/spec/spec_helper.rb
spec/spec_helper.rb
# This file was generated by the `rspec --init` command. Conventionally, all # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`. # Require this file using `require "spec_helper"` to ensure that it is only # loaded once. # # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration RSpec....
ruby
MIT
8b5bdb2d0ed093b2b2b70b5584f80c3a80622e15
2026-01-04T17:41:30.060108Z
false
vividness/lexeme
https://github.com/vividness/lexeme/blob/8b5bdb2d0ed093b2b2b70b5584f80c3a80622e15/examples/math/lexer.rb
examples/math/lexer.rb
#!/usr/bin/env ruby # The only reason this line is here is # so I make loading lexeme lib files easier ($:).unshift(File.join(File.dirname(__FILE__), '../../lib/')) # This is how your code should look like - starting this line require 'lexeme' # Setup the lexeme object by adding language lexical rules. # In this ca...
ruby
MIT
8b5bdb2d0ed093b2b2b70b5584f80c3a80622e15
2026-01-04T17:41:30.060108Z
false
vividness/lexeme
https://github.com/vividness/lexeme/blob/8b5bdb2d0ed093b2b2b70b5584f80c3a80622e15/examples/human-lang/lexer.rb
examples/human-lang/lexer.rb
#!/usr/bin/env ruby # The only reason this line is here is # so I make loading lexeme lib files easier ($:).unshift(File.join(File.dirname(__FILE__), '../../lib/')) # This is how your code should look like - starting this line require 'lexeme' # Setup the lexeme object by adding language lexical rules. lexer = Lexe...
ruby
MIT
8b5bdb2d0ed093b2b2b70b5584f80c3a80622e15
2026-01-04T17:41:30.060108Z
false
vividness/lexeme
https://github.com/vividness/lexeme/blob/8b5bdb2d0ed093b2b2b70b5584f80c3a80622e15/examples/computer-lang/lexer.rb
examples/computer-lang/lexer.rb
#!/usr/bin/env ruby # The only reason this line is here is # so I make loading lexeme lib files easier ($:).unshift(File.join(File.dirname(__FILE__), '../../lib/')) # This is how your code should look like - starting this line require 'lexeme' # Setup the lexeme object by adding language lexical rules. # Note: This...
ruby
MIT
8b5bdb2d0ed093b2b2b70b5584f80c3a80622e15
2026-01-04T17:41:30.060108Z
false
vividness/lexeme
https://github.com/vividness/lexeme/blob/8b5bdb2d0ed093b2b2b70b5584f80c3a80622e15/lib/lexeme.rb
lib/lexeme.rb
require 'lexeme/rule' require 'lexeme/ruleset' require 'lexeme/token' require 'lexeme/lexeme' require 'lexeme/core_extensions' require 'lexeme/version' module Lexeme def self.define(&block) @lexer = Lexeme.new @lexer.instance_eval(&block) @lexer end def self.reset! remove_instance_variable...
ruby
MIT
8b5bdb2d0ed093b2b2b70b5584f80c3a80622e15
2026-01-04T17:41:30.060108Z
false
vividness/lexeme
https://github.com/vividness/lexeme/blob/8b5bdb2d0ed093b2b2b70b5584f80c3a80622e15/lib/lexeme/ruleset.rb
lib/lexeme/ruleset.rb
module Lexeme class Ruleset def initialize(&block) @rules = [] @ignore = [] # this is here to capture any other # symbols that could be identified # as var names, function names ... @unknown = Rule.new(nil, /^\w+$/) # this skips all whitespaces by default ...
ruby
MIT
8b5bdb2d0ed093b2b2b70b5584f80c3a80622e15
2026-01-04T17:41:30.060108Z
false
vividness/lexeme
https://github.com/vividness/lexeme/blob/8b5bdb2d0ed093b2b2b70b5584f80c3a80622e15/lib/lexeme/version.rb
lib/lexeme/version.rb
module Lexeme VERSION = '0.0.6' end
ruby
MIT
8b5bdb2d0ed093b2b2b70b5584f80c3a80622e15
2026-01-04T17:41:30.060108Z
false
vividness/lexeme
https://github.com/vividness/lexeme/blob/8b5bdb2d0ed093b2b2b70b5584f80c3a80622e15/lib/lexeme/core_extensions.rb
lib/lexeme/core_extensions.rb
class ::String def tokenize @lexer ||= Lexeme.define do use_language :natural end string_content = self @lexer.analyze do from_string string_content end @lexer.tokens end def to_tokens warn "String#to_tokens is obsolete, use String#tokenize instead" tokenize ...
ruby
MIT
8b5bdb2d0ed093b2b2b70b5584f80c3a80622e15
2026-01-04T17:41:30.060108Z
false
vividness/lexeme
https://github.com/vividness/lexeme/blob/8b5bdb2d0ed093b2b2b70b5584f80c3a80622e15/lib/lexeme/lexeme.rb
lib/lexeme/lexeme.rb
module Lexeme class Lexeme attr_accessor :ruleset attr_reader :tokens def analyze(&block) instance_eval(&block) end def from_file(filepath = nil) raise ArgumentError, 'Argument 1 must be a String' unless filepath.instance_of? String raise ArgumentError, 'Source n...
ruby
MIT
8b5bdb2d0ed093b2b2b70b5584f80c3a80622e15
2026-01-04T17:41:30.060108Z
false
vividness/lexeme
https://github.com/vividness/lexeme/blob/8b5bdb2d0ed093b2b2b70b5584f80c3a80622e15/lib/lexeme/rule.rb
lib/lexeme/rule.rb
module Lexeme class Rule attr_reader :name, :regex def initialize(name, regex) raise ArgumentError, 'name must be a String or a Symbol' unless name.nil? || name.is_a?(String) || name.is_a?(Symbol) raise ArgumentError, 'regex must be a Regex' unless regex.is_a? Regexp ...
ruby
MIT
8b5bdb2d0ed093b2b2b70b5584f80c3a80622e15
2026-01-04T17:41:30.060108Z
false
vividness/lexeme
https://github.com/vividness/lexeme/blob/8b5bdb2d0ed093b2b2b70b5584f80c3a80622e15/lib/lexeme/token.rb
lib/lexeme/token.rb
module Lexeme class Token attr_reader :name, :value, :line def initialize(name, value, line) @name = name @value = value @line = line end def to_s "#{line} => #{name} : #{value}" end def to_hash {:line => line, :name => name, :value => value} end de...
ruby
MIT
8b5bdb2d0ed093b2b2b70b5584f80c3a80622e15
2026-01-04T17:41:30.060108Z
false
vividness/lexeme
https://github.com/vividness/lexeme/blob/8b5bdb2d0ed093b2b2b70b5584f80c3a80622e15/lib/lexeme/languages/natural.rb
lib/lexeme/languages/natural.rb
module Lexeme module Language def self.natural Proc.new do token :STOP => /^\.$/ token :COMA => /^,$/ token :QUES => /^\?$/ token :EXCL => /^!$/ token :QUOT => /^"$/ token :APOS => /^'$/ token :WORD => /^[\w\-]+$/ end end end end
ruby
MIT
8b5bdb2d0ed093b2b2b70b5584f80c3a80622e15
2026-01-04T17:41:30.060108Z
false
malept/thermite
https://github.com/malept/thermite/blob/9b380eb9e069909ff346fb3079d5be340deccaac/test/test_helper.rb
test/test_helper.rb
# frozen_string_literal: true # # Copyright (c) 2016, 2017 Mark Lee and contributors # # 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 ri...
ruby
MIT
9b380eb9e069909ff346fb3079d5be340deccaac
2026-01-04T17:41:28.932320Z
false
malept/thermite
https://github.com/malept/thermite/blob/9b380eb9e069909ff346fb3079d5be340deccaac/test/lib/thermite/github_release_binary_test.rb
test/lib/thermite/github_release_binary_test.rb
# frozen_string_literal: true # # Copyright (c) 2016, 2017 Mark Lee and contributors # # 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 ri...
ruby
MIT
9b380eb9e069909ff346fb3079d5be340deccaac
2026-01-04T17:41:28.932320Z
false
malept/thermite
https://github.com/malept/thermite/blob/9b380eb9e069909ff346fb3079d5be340deccaac/test/lib/thermite/util_test.rb
test/lib/thermite/util_test.rb
# frozen_string_literal: true # # Copyright (c) 2016, 2017 Mark Lee and contributors # # 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 ri...
ruby
MIT
9b380eb9e069909ff346fb3079d5be340deccaac
2026-01-04T17:41:28.932320Z
false
malept/thermite
https://github.com/malept/thermite/blob/9b380eb9e069909ff346fb3079d5be340deccaac/test/lib/thermite/cargo_test.rb
test/lib/thermite/cargo_test.rb
# frozen_string_literal: true # # Copyright (c) 2016, 2017 Mark Lee and contributors # # 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 ri...
ruby
MIT
9b380eb9e069909ff346fb3079d5be340deccaac
2026-01-04T17:41:28.932320Z
false
malept/thermite
https://github.com/malept/thermite/blob/9b380eb9e069909ff346fb3079d5be340deccaac/test/lib/thermite/custom_binary_test.rb
test/lib/thermite/custom_binary_test.rb
# frozen_string_literal: true # # Copyright (c) 2016, 2017 Mark Lee and contributors # # 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 ri...
ruby
MIT
9b380eb9e069909ff346fb3079d5be340deccaac
2026-01-04T17:41:28.932320Z
false
malept/thermite
https://github.com/malept/thermite/blob/9b380eb9e069909ff346fb3079d5be340deccaac/test/lib/thermite/semver_test.rb
test/lib/thermite/semver_test.rb
# frozen_string_literal: true # # Copyright (c) 2018 Mark Lee and contributors # # 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 t...
ruby
MIT
9b380eb9e069909ff346fb3079d5be340deccaac
2026-01-04T17:41:28.932320Z
false
malept/thermite
https://github.com/malept/thermite/blob/9b380eb9e069909ff346fb3079d5be340deccaac/test/lib/thermite/config_test.rb
test/lib/thermite/config_test.rb
# frozen_string_literal: true # # Copyright (c) 2016, 2017 Mark Lee and contributors # # 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 ri...
ruby
MIT
9b380eb9e069909ff346fb3079d5be340deccaac
2026-01-04T17:41:28.932320Z
false
malept/thermite
https://github.com/malept/thermite/blob/9b380eb9e069909ff346fb3079d5be340deccaac/test/lib/thermite/package_test.rb
test/lib/thermite/package_test.rb
# frozen_string_literal: true # # Copyright (c) 2016, 2017 Mark Lee and contributors # # 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 ri...
ruby
MIT
9b380eb9e069909ff346fb3079d5be340deccaac
2026-01-04T17:41:28.932320Z
false
malept/thermite
https://github.com/malept/thermite/blob/9b380eb9e069909ff346fb3079d5be340deccaac/lib/thermite/cargo.rb
lib/thermite/cargo.rb
# frozen_string_literal: true # # Copyright (c) 2016 Mark Lee and contributors # # 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 t...
ruby
MIT
9b380eb9e069909ff346fb3079d5be340deccaac
2026-01-04T17:41:28.932320Z
false
malept/thermite
https://github.com/malept/thermite/blob/9b380eb9e069909ff346fb3079d5be340deccaac/lib/thermite/package.rb
lib/thermite/package.rb
# frozen_string_literal: true # # Copyright (c) 2016 Mark Lee and contributors # # 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 t...
ruby
MIT
9b380eb9e069909ff346fb3079d5be340deccaac
2026-01-04T17:41:28.932320Z
false
malept/thermite
https://github.com/malept/thermite/blob/9b380eb9e069909ff346fb3079d5be340deccaac/lib/thermite/custom_binary.rb
lib/thermite/custom_binary.rb
# frozen_string_literal: true # # Copyright (c) 2016 Mark Lee and contributors # # 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 t...
ruby
MIT
9b380eb9e069909ff346fb3079d5be340deccaac
2026-01-04T17:41:28.932320Z
false
malept/thermite
https://github.com/malept/thermite/blob/9b380eb9e069909ff346fb3079d5be340deccaac/lib/thermite/github_release_binary.rb
lib/thermite/github_release_binary.rb
# frozen_string_literal: true # # Copyright (c) 2016, 2017 Mark Lee and contributors # # 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 ri...
ruby
MIT
9b380eb9e069909ff346fb3079d5be340deccaac
2026-01-04T17:41:28.932320Z
false
malept/thermite
https://github.com/malept/thermite/blob/9b380eb9e069909ff346fb3079d5be340deccaac/lib/thermite/config.rb
lib/thermite/config.rb
# frozen_string_literal: true # # Copyright (c) 2016 Mark Lee and contributors # # 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 t...
ruby
MIT
9b380eb9e069909ff346fb3079d5be340deccaac
2026-01-04T17:41:28.932320Z
false
malept/thermite
https://github.com/malept/thermite/blob/9b380eb9e069909ff346fb3079d5be340deccaac/lib/thermite/fiddle.rb
lib/thermite/fiddle.rb
# frozen_string_literal: true # # Copyright (c) 2016 Mark Lee and contributors # # 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 t...
ruby
MIT
9b380eb9e069909ff346fb3079d5be340deccaac
2026-01-04T17:41:28.932320Z
false
malept/thermite
https://github.com/malept/thermite/blob/9b380eb9e069909ff346fb3079d5be340deccaac/lib/thermite/tasks.rb
lib/thermite/tasks.rb
# frozen_string_literal: true # # Copyright (c) 2016 Mark Lee and contributors # # 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 t...
ruby
MIT
9b380eb9e069909ff346fb3079d5be340deccaac
2026-01-04T17:41:28.932320Z
false
malept/thermite
https://github.com/malept/thermite/blob/9b380eb9e069909ff346fb3079d5be340deccaac/lib/thermite/semver.rb
lib/thermite/semver.rb
# frozen_string_literal: true # # Copyright (c) 2018 Mark Lee and contributors # # 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 t...
ruby
MIT
9b380eb9e069909ff346fb3079d5be340deccaac
2026-01-04T17:41:28.932320Z
false
malept/thermite
https://github.com/malept/thermite/blob/9b380eb9e069909ff346fb3079d5be340deccaac/lib/thermite/util.rb
lib/thermite/util.rb
# frozen_string_literal: true # # Copyright (c) 2016 Mark Lee and contributors # # 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 t...
ruby
MIT
9b380eb9e069909ff346fb3079d5be340deccaac
2026-01-04T17:41:28.932320Z
false
zendeskarchive/broadcast
https://github.com/zendeskarchive/broadcast/blob/19df83f7bca4167e4afb1e45c72a7d339d5d0118/spec/spec_helper.rb
spec/spec_helper.rb
$:.push File.expand_path("../../lib", __FILE__) require 'broadcast' require 'rspec' $:.push File.expand_path("../..", __FILE__) Dir.glob('spec/support/*').each { |f| require f }
ruby
MIT
19df83f7bca4167e4afb1e45c72a7d339d5d0118
2026-01-04T17:41:35.120065Z
false
zendeskarchive/broadcast
https://github.com/zendeskarchive/broadcast/blob/19df83f7bca4167e4afb1e45c72a7d339d5d0118/spec/support/examples.rb
spec/support/examples.rb
class Broadcast::Message::Spec < Broadcast::Message end class Broadcast::Message::SpecWithContent < Broadcast::Message def body "message" end end class Broadcast::Message::SpecWithContentAndSubject < Broadcast::Message def subject "title" end def body "message" end end class Broadcast::Messag...
ruby
MIT
19df83f7bca4167e4afb1e45c72a7d339d5d0118
2026-01-04T17:41:35.120065Z
false
zendeskarchive/broadcast
https://github.com/zendeskarchive/broadcast/blob/19df83f7bca4167e4afb1e45c72a7d339d5d0118/spec/support/config.rb
spec/support/config.rb
Broadcast.setup { |config| config.spec.option = 1 config.oauth { |oauth| oauth.consumer_key = 'consumerkey' oauth.consumer_secret = 'consumersecret' oauth.access_token = 'accesstoken' oauth.access_secret = 'accesssecret' } config.jabber { |jabber| jabber.username = 'foo@foo.c...
ruby
MIT
19df83f7bca4167e4afb1e45c72a7d339d5d0118
2026-01-04T17:41:35.120065Z
false
zendeskarchive/broadcast
https://github.com/zendeskarchive/broadcast/blob/19df83f7bca4167e4afb1e45c72a7d339d5d0118/spec/lib/broadcast_spec.rb
spec/lib/broadcast_spec.rb
require 'spec_helper' ORIGINAL_CONFIG = Broadcast.configuration describe Broadcast do describe '.publish' do it "should properly load the message class and instantiate the message" do msg = mock(:publish => true) Broadcast::Message::Spec.should_receive(:new).once.and_return(msg) Broadcast.pu...
ruby
MIT
19df83f7bca4167e4afb1e45c72a7d339d5d0118
2026-01-04T17:41:35.120065Z
false
zendeskarchive/broadcast
https://github.com/zendeskarchive/broadcast/blob/19df83f7bca4167e4afb1e45c72a7d339d5d0118/spec/lib/broadcast/simple_spec.rb
spec/lib/broadcast/simple_spec.rb
require 'spec_helper' describe Broadcast::Message::Simple do before do @message = Broadcast::Message::Simple.new(:body => 'my body', :subject => 'OMG!') end describe ".initialize" do it "should accept options" do Broadcast::Message::Simple.new(:body => 'my body', :subject => 'OMG!') end e...
ruby
MIT
19df83f7bca4167e4afb1e45c72a7d339d5d0118
2026-01-04T17:41:35.120065Z
false
zendeskarchive/broadcast
https://github.com/zendeskarchive/broadcast/blob/19df83f7bca4167e4afb1e45c72a7d339d5d0118/spec/lib/broadcast/message_spec.rb
spec/lib/broadcast/message_spec.rb
require 'spec_helper' describe Broadcast::Message do before do Broadcast::Message::Spec.media = [] @log = StringIO.new Broadcast.logger = Logger.new(@log) end describe ".initialize" do it "should accept options" do msg = Broadcast::Message::Spec.new(:foo => 1) msg.options.foo.shoul...
ruby
MIT
19df83f7bca4167e4afb1e45c72a7d339d5d0118
2026-01-04T17:41:35.120065Z
false
zendeskarchive/broadcast
https://github.com/zendeskarchive/broadcast/blob/19df83f7bca4167e4afb1e45c72a7d339d5d0118/spec/lib/broadcast/medium_spec.rb
spec/lib/broadcast/medium_spec.rb
require 'spec_helper' describe Broadcast::Medium do describe '#publish' do before do @medium = Broadcast::Medium::Spec.new @message = Broadcast::Message::Spec.new end it "should properly load options" do @medium.options.option.should == 1 end it "should accept 1 argument" d...
ruby
MIT
19df83f7bca4167e4afb1e45c72a7d339d5d0118
2026-01-04T17:41:35.120065Z
false
zendeskarchive/broadcast
https://github.com/zendeskarchive/broadcast/blob/19df83f7bca4167e4afb1e45c72a7d339d5d0118/spec/lib/broadcast/publishable_spec.rb
spec/lib/broadcast/publishable_spec.rb
require 'spec_helper' class ClassToBecomeMessage include Broadcast::Publishable attr_accessor :something def initialize(somthng = nil) self.something = somthng end end describe Broadcast::Publishable do describe "in class scope" do it "should add the media accessor" do ClassToBecomeMessag...
ruby
MIT
19df83f7bca4167e4afb1e45c72a7d339d5d0118
2026-01-04T17:41:35.120065Z
false
zendeskarchive/broadcast
https://github.com/zendeskarchive/broadcast/blob/19df83f7bca4167e4afb1e45c72a7d339d5d0118/spec/lib/broadcast/media/yammer_spec.rb
spec/lib/broadcast/media/yammer_spec.rb
require 'spec_helper' describe Broadcast::Medium::Yammer do describe '.site' do it "should be set to Yammer OAuth endpoint" do Broadcast::Medium::Yammer.site.should == 'https://www.yammer.com' end end describe '#publish' do it "should send a post to yammer with the message body" do m...
ruby
MIT
19df83f7bca4167e4afb1e45c72a7d339d5d0118
2026-01-04T17:41:35.120065Z
false
zendeskarchive/broadcast
https://github.com/zendeskarchive/broadcast/blob/19df83f7bca4167e4afb1e45c72a7d339d5d0118/spec/lib/broadcast/media/email_spec.rb
spec/lib/broadcast/media/email_spec.rb
require 'spec_helper' describe Broadcast::Medium::Email do describe '#publish' do before { @medium = Broadcast::Medium::Email.new @message = Broadcast::Message::SpecWithContent.new Mail::TestMailer.deliveries = [] } it "should deliver the message to one recipient if options.recipien...
ruby
MIT
19df83f7bca4167e4afb1e45c72a7d339d5d0118
2026-01-04T17:41:35.120065Z
false
zendeskarchive/broadcast
https://github.com/zendeskarchive/broadcast/blob/19df83f7bca4167e4afb1e45c72a7d339d5d0118/spec/lib/broadcast/media/jabber_spec.rb
spec/lib/broadcast/media/jabber_spec.rb
require 'spec_helper' describe Broadcast::Medium::Jabber do # 'nueter' the Jabber::Client class Jabber::Client def connect(*args); end def auth(*args); end def send(*args); end end describe '::Client' do before { @client = Broadcast::Medium::Jabber::Client.new('foo@foo.com', '123') ...
ruby
MIT
19df83f7bca4167e4afb1e45c72a7d339d5d0118
2026-01-04T17:41:35.120065Z
false
zendeskarchive/broadcast
https://github.com/zendeskarchive/broadcast/blob/19df83f7bca4167e4afb1e45c72a7d339d5d0118/spec/lib/broadcast/media/irc_spec.rb
spec/lib/broadcast/media/irc_spec.rb
require 'spec_helper' describe Broadcast::Medium::Irc do describe '.new' do it "should create a new instance with options provided in config" do medium = Broadcast::Medium::Irc.new medium.options.username.should == 'foo' medium.options.server.should == 'irc.freenode.net' medium.options...
ruby
MIT
19df83f7bca4167e4afb1e45c72a7d339d5d0118
2026-01-04T17:41:35.120065Z
false
zendeskarchive/broadcast
https://github.com/zendeskarchive/broadcast/blob/19df83f7bca4167e4afb1e45c72a7d339d5d0118/spec/lib/broadcast/media/facebook_spec.rb
spec/lib/broadcast/media/facebook_spec.rb
require 'spec_helper' describe Broadcast::Medium::Facebook do describe '.new' do it "should create a new instance with options provided in config" do medium = Broadcast::Medium::Facebook.new medium.options.token.should == 'fb_token' medium.options.page.should == 'My Page' end it "sh...
ruby
MIT
19df83f7bca4167e4afb1e45c72a7d339d5d0118
2026-01-04T17:41:35.120065Z
false
zendeskarchive/broadcast
https://github.com/zendeskarchive/broadcast/blob/19df83f7bca4167e4afb1e45c72a7d339d5d0118/spec/lib/broadcast/media/sms_spec.rb
spec/lib/broadcast/media/sms_spec.rb
require 'spec_helper' describe Broadcast::Medium::Sms do describe '.new' do it "should create a new instance with options provided in config" do medium = Broadcast::Medium::Sms.new medium.options.username.should == 'myaccount' medium.options.password.should == 'mypass' medium.options.t...
ruby
MIT
19df83f7bca4167e4afb1e45c72a7d339d5d0118
2026-01-04T17:41:35.120065Z
false
zendeskarchive/broadcast
https://github.com/zendeskarchive/broadcast/blob/19df83f7bca4167e4afb1e45c72a7d339d5d0118/spec/lib/broadcast/media/tumblr_spec.rb
spec/lib/broadcast/media/tumblr_spec.rb
require 'spec_helper' describe Broadcast::Medium::Tumblr do describe '.site' do it "should be set to Tumblr OAuth endpoint" do Broadcast::Medium::Tumblr.site.should == "http://www.tumblr.com" end end describe '#publish' do it "should send a post to twitter with the message body" do m...
ruby
MIT
19df83f7bca4167e4afb1e45c72a7d339d5d0118
2026-01-04T17:41:35.120065Z
false
zendeskarchive/broadcast
https://github.com/zendeskarchive/broadcast/blob/19df83f7bca4167e4afb1e45c72a7d339d5d0118/spec/lib/broadcast/media/campfire_spec.rb
spec/lib/broadcast/media/campfire_spec.rb
require 'spec_helper' describe Broadcast::Medium::Campfire do describe '#publish' do before do @medium = Broadcast::Medium::Campfire.new @message = Broadcast::Message::SpecWithContent.new end it "should send a post request to the campfire API with the message body" do Broach.should_...
ruby
MIT
19df83f7bca4167e4afb1e45c72a7d339d5d0118
2026-01-04T17:41:35.120065Z
false
zendeskarchive/broadcast
https://github.com/zendeskarchive/broadcast/blob/19df83f7bca4167e4afb1e45c72a7d339d5d0118/spec/lib/broadcast/media/oauth_spec.rb
spec/lib/broadcast/media/oauth_spec.rb
require 'spec_helper' describe Broadcast::Medium::Oauth do before do Broadcast::Medium::Oauth.site = nil end describe '.consumer' do before do Broadcast::Medium::Oauth.site = 'http://site.com' end it "should return consumer object with proper keys and site" do ...
ruby
MIT
19df83f7bca4167e4afb1e45c72a7d339d5d0118
2026-01-04T17:41:35.120065Z
false
zendeskarchive/broadcast
https://github.com/zendeskarchive/broadcast/blob/19df83f7bca4167e4afb1e45c72a7d339d5d0118/spec/lib/broadcast/media/twitter_spec.rb
spec/lib/broadcast/media/twitter_spec.rb
require 'spec_helper' describe Broadcast::Medium::Twitter do describe '.site' do it "should be set to TwitterO OAuth endpoint" do Broadcast::Medium::Twitter.site.should == 'http://api.twitter.com' end end describe '#publish' do it "should send a post to twitter with the message body" do ...
ruby
MIT
19df83f7bca4167e4afb1e45c72a7d339d5d0118
2026-01-04T17:41:35.120065Z
false
zendeskarchive/broadcast
https://github.com/zendeskarchive/broadcast/blob/19df83f7bca4167e4afb1e45c72a7d339d5d0118/spec/lib/broadcast/media/log_spec.rb
spec/lib/broadcast/media/log_spec.rb
require 'spec_helper' describe Broadcast::Medium::Log do before do Broadcast.configuration.log.file = nil end describe '#publish' do it "should send message to logfile if it was defined on class level" do log = StringIO.new Broadcast.configuration.log.file = log message = Broadcast::...
ruby
MIT
19df83f7bca4167e4afb1e45c72a7d339d5d0118
2026-01-04T17:41:35.120065Z
false
zendeskarchive/broadcast
https://github.com/zendeskarchive/broadcast/blob/19df83f7bca4167e4afb1e45c72a7d339d5d0118/lib/broadcast.rb
lib/broadcast.rb
require 'logger' require 'hashie' class Broadcast ROOT = File.dirname(__FILE__) class << self attr_accessor :logger attr_accessor :configuration end # Basic configuration object require 'broadcast/config' self.configuration = Broadcast::Config.new # Default self.logger = Logger.new($stdo...
ruby
MIT
19df83f7bca4167e4afb1e45c72a7d339d5d0118
2026-01-04T17:41:35.120065Z
false
zendeskarchive/broadcast
https://github.com/zendeskarchive/broadcast/blob/19df83f7bca4167e4afb1e45c72a7d339d5d0118/lib/broadcast/version.rb
lib/broadcast/version.rb
class Broadcast VERSION = "0.3.0" end
ruby
MIT
19df83f7bca4167e4afb1e45c72a7d339d5d0118
2026-01-04T17:41:35.120065Z
false
zendeskarchive/broadcast
https://github.com/zendeskarchive/broadcast/blob/19df83f7bca4167e4afb1e45c72a7d339d5d0118/lib/broadcast/railtie.rb
lib/broadcast/railtie.rb
require 'rails/railtie' class Broadcast class Railtie < Rails::Railtie rake_tasks do load 'broadcast/tasks/broadcast.rake' end end end
ruby
MIT
19df83f7bca4167e4afb1e45c72a7d339d5d0118
2026-01-04T17:41:35.120065Z
false
zendeskarchive/broadcast
https://github.com/zendeskarchive/broadcast/blob/19df83f7bca4167e4afb1e45c72a7d339d5d0118/lib/broadcast/medium.rb
lib/broadcast/medium.rb
class Broadcast::Medium # Set up autoload for the media Dir.glob(File.join(Broadcast::ROOT, 'broadcast', 'media', '*')).each do |file| name = File.basename(file).split('.').first autoload name.capitalize.to_sym, file end def initialize(options = {}) # load in the configuration from Broadcast setup...
ruby
MIT
19df83f7bca4167e4afb1e45c72a7d339d5d0118
2026-01-04T17:41:35.120065Z
false
zendeskarchive/broadcast
https://github.com/zendeskarchive/broadcast/blob/19df83f7bca4167e4afb1e45c72a7d339d5d0118/lib/broadcast/message.rb
lib/broadcast/message.rb
class Broadcast::Message autoload "Simple", "broadcast/simple" include Broadcast::Publishable # Make the options Hashie::Mash a specific trait of Broadcast::Message attr_accessor :options def initialize(options = {}) @options = Hashie::Mash.new(options) end end
ruby
MIT
19df83f7bca4167e4afb1e45c72a7d339d5d0118
2026-01-04T17:41:35.120065Z
false
zendeskarchive/broadcast
https://github.com/zendeskarchive/broadcast/blob/19df83f7bca4167e4afb1e45c72a7d339d5d0118/lib/broadcast/publishable.rb
lib/broadcast/publishable.rb
# Module which allows any class to be turned into a message module Broadcast::Publishable def self.included(base) base.extend ClassMethods end module ClassMethods attr_accessor :media def medium(name, options = {}) (self.media ||= []).push({ :name => name, :options => options }) end e...
ruby
MIT
19df83f7bca4167e4afb1e45c72a7d339d5d0118
2026-01-04T17:41:35.120065Z
false
zendeskarchive/broadcast
https://github.com/zendeskarchive/broadcast/blob/19df83f7bca4167e4afb1e45c72a7d339d5d0118/lib/broadcast/simple.rb
lib/broadcast/simple.rb
class Broadcast::Message::Simple < Broadcast::Message attr_accessor :body, :subject def body @body || options.body end def subject @subject || options.subject end def publish(medium, medium_arguments = {}) begin Broadcast::Medium.const_get(medium.to_s.downcase.capitalize).new(medium_ar...
ruby
MIT
19df83f7bca4167e4afb1e45c72a7d339d5d0118
2026-01-04T17:41:35.120065Z
false
zendeskarchive/broadcast
https://github.com/zendeskarchive/broadcast/blob/19df83f7bca4167e4afb1e45c72a7d339d5d0118/lib/broadcast/config.rb
lib/broadcast/config.rb
class Broadcast::Config # Allow usage of namespaces in config def method_missing(meth, *args, &block) @namespaces ||= {} stringified = meth.to_s if stringified[-1].chr == '=' and args.first key = stringified[0..-2].to_sym @namespaces[key] = args.first elsif block key = stringified...
ruby
MIT
19df83f7bca4167e4afb1e45c72a7d339d5d0118
2026-01-04T17:41:35.120065Z
false
zendeskarchive/broadcast
https://github.com/zendeskarchive/broadcast/blob/19df83f7bca4167e4afb1e45c72a7d339d5d0118/lib/broadcast/media/sms.rb
lib/broadcast/media/sms.rb
require 'smsified' class Broadcast::Medium::Sms < Broadcast::Medium def publish(message) oneapi = Smsified::OneAPI.new :username => options.username, :password => options.password oneapi.send_sms :address => options.to, :message => message.body, ...
ruby
MIT
19df83f7bca4167e4afb1e45c72a7d339d5d0118
2026-01-04T17:41:35.120065Z
false
zendeskarchive/broadcast
https://github.com/zendeskarchive/broadcast/blob/19df83f7bca4167e4afb1e45c72a7d339d5d0118/lib/broadcast/media/facebook.rb
lib/broadcast/media/facebook.rb
require 'koala' class Broadcast::Medium::Facebook < Broadcast::Medium def publish(message) # We do not rescue any Koala exceptions to make them crash the sendout # This should make debugging easier i.e. when fb has privilege issues # Connect to facebook and get info about current user graph =...
ruby
MIT
19df83f7bca4167e4afb1e45c72a7d339d5d0118
2026-01-04T17:41:35.120065Z
false
zendeskarchive/broadcast
https://github.com/zendeskarchive/broadcast/blob/19df83f7bca4167e4afb1e45c72a7d339d5d0118/lib/broadcast/media/irc.rb
lib/broadcast/media/irc.rb
require 'shout-bot' class Broadcast::Medium::Irc < Broadcast::Medium def publish(message) uri = "irc://#{options.username}" uri += "@#{options.server}:#{options.port ? options.port : '6667'}" uri += "/##{options.channel.to_s.gsub("#","") }" ShoutBot.shout(uri) { |room| room.say message } end end
ruby
MIT
19df83f7bca4167e4afb1e45c72a7d339d5d0118
2026-01-04T17:41:35.120065Z
false
zendeskarchive/broadcast
https://github.com/zendeskarchive/broadcast/blob/19df83f7bca4167e4afb1e45c72a7d339d5d0118/lib/broadcast/media/log.rb
lib/broadcast/media/log.rb
class Broadcast::Medium::Log < Broadcast::Medium def publish(message) Logger.new(options.file).info(message.body) end end
ruby
MIT
19df83f7bca4167e4afb1e45c72a7d339d5d0118
2026-01-04T17:41:35.120065Z
false
zendeskarchive/broadcast
https://github.com/zendeskarchive/broadcast/blob/19df83f7bca4167e4afb1e45c72a7d339d5d0118/lib/broadcast/media/twitter.rb
lib/broadcast/media/twitter.rb
class Broadcast::Medium::Twitter < Broadcast::Medium::Oauth self.site = "https://api.twitter.com" def publish(message) token.post '/1.1/statuses/update.json', { :status => message.body } end end
ruby
MIT
19df83f7bca4167e4afb1e45c72a7d339d5d0118
2026-01-04T17:41:35.120065Z
false
zendeskarchive/broadcast
https://github.com/zendeskarchive/broadcast/blob/19df83f7bca4167e4afb1e45c72a7d339d5d0118/lib/broadcast/media/yammer.rb
lib/broadcast/media/yammer.rb
class Broadcast::Medium::Yammer < Broadcast::Medium::Oauth self.site = "https://www.yammer.com" def publish(message) token.post '/api/v1/messages.json', { :body => message.body } end end
ruby
MIT
19df83f7bca4167e4afb1e45c72a7d339d5d0118
2026-01-04T17:41:35.120065Z
false
zendeskarchive/broadcast
https://github.com/zendeskarchive/broadcast/blob/19df83f7bca4167e4afb1e45c72a7d339d5d0118/lib/broadcast/media/email.rb
lib/broadcast/media/email.rb
require 'mail' class Broadcast::Medium::Email < Broadcast::Medium def publish(message) recipients = options.recipients.is_a?(Array) ? options.recipients : [options.recipients] options = self.options recipients.compact.each do |recipient| mail = Mail.new do from options.sender || messag...
ruby
MIT
19df83f7bca4167e4afb1e45c72a7d339d5d0118
2026-01-04T17:41:35.120065Z
false
zendeskarchive/broadcast
https://github.com/zendeskarchive/broadcast/blob/19df83f7bca4167e4afb1e45c72a7d339d5d0118/lib/broadcast/media/campfire.rb
lib/broadcast/media/campfire.rb
require 'broach' class Broadcast::Medium::Campfire < Broadcast::Medium def publish(message) Broach.settings = { 'account' => options.subdomain, 'token' => options.token, 'use_ssl' => true } Broach.speak(options.room, message.body) end end
ruby
MIT
19df83f7bca4167e4afb1e45c72a7d339d5d0118
2026-01-04T17:41:35.120065Z
false
zendeskarchive/broadcast
https://github.com/zendeskarchive/broadcast/blob/19df83f7bca4167e4afb1e45c72a7d339d5d0118/lib/broadcast/media/tumblr.rb
lib/broadcast/media/tumblr.rb
# This integration was originally prepared by https://github.com/hmaddocks require 'net/http' class Broadcast::Medium::Tumblr < Broadcast::Medium::Oauth self.site = "http://www.tumblr.com" def publish(message) @consumer = OAuth::Consumer.new(options.consumer_key, options.c...
ruby
MIT
19df83f7bca4167e4afb1e45c72a7d339d5d0118
2026-01-04T17:41:35.120065Z
false
zendeskarchive/broadcast
https://github.com/zendeskarchive/broadcast/blob/19df83f7bca4167e4afb1e45c72a7d339d5d0118/lib/broadcast/media/jabber.rb
lib/broadcast/media/jabber.rb
require 'xmpp4r' class Broadcast::Medium::Jabber < Broadcast::Medium class Client attr_accessor :client def initialize(username, password, server = nil, port = 5222) @jid = Jabber::JID::new(username) @client = Jabber::Client::new(@jid) client.connect(server, port) client.auth(pa...
ruby
MIT
19df83f7bca4167e4afb1e45c72a7d339d5d0118
2026-01-04T17:41:35.120065Z
false
zendeskarchive/broadcast
https://github.com/zendeskarchive/broadcast/blob/19df83f7bca4167e4afb1e45c72a7d339d5d0118/lib/broadcast/media/oauth.rb
lib/broadcast/media/oauth.rb
require 'oauth' class Broadcast::Medium::Oauth < Broadcast::Medium class << self attr_accessor :site end def consumer @consumer ||= OAuth::Consumer.new(options.consumer_key, options.consumer_secret, :site => self.class.site) end def token @access_token ||= OAuth::AccessToken.new(consumer, opti...
ruby
MIT
19df83f7bca4167e4afb1e45c72a7d339d5d0118
2026-01-04T17:41:35.120065Z
false
FormulaMonks/contest
https://github.com/FormulaMonks/contest/blob/73ad19d80b387112a3b4e29ba1671bfdc497395f/rails/init.rb
rails/init.rb
# ActiveStupor defines its own idiom for the class-level setup method # (using callback chains). This hack is to ensure that Contest users can # still call the setup method with a block. if RAILS_ENV == 'test' require File.join(File.dirname(__FILE__), '..', 'lib', 'contest') require "active_support/test_case" ...
ruby
MIT
73ad19d80b387112a3b4e29ba1671bfdc497395f
2026-01-04T17:41:36.962859Z
false
FormulaMonks/contest
https://github.com/FormulaMonks/contest/blob/73ad19d80b387112a3b4e29ba1671bfdc497395f/test/all_test.rb
test/all_test.rb
require File.expand_path(File.join("..", "lib", "contest"), File.dirname(__FILE__)) class FooTest < Test::Unit::TestCase setup do @value = 1 end teardown do @value = nil end test "truth" do assert_equal 1, @value end context "context's non-word characters " do ...
ruby
MIT
73ad19d80b387112a3b4e29ba1671bfdc497395f
2026-01-04T17:41:36.962859Z
false
FormulaMonks/contest
https://github.com/FormulaMonks/contest/blob/73ad19d80b387112a3b4e29ba1671bfdc497395f/test/setup_and_teardown_order_test.rb
test/setup_and_teardown_order_test.rb
require File.expand_path(File.join("..", "lib", "contest"), File.dirname(__FILE__)) class BaseTest < Test::Unit::TestCase def setup @order = [] @order << "Grandparent Setup" end def teardown @order << "Grandparent Teardown" assert_equal ["Grandparent Setup", "Parent Set...
ruby
MIT
73ad19d80b387112a3b4e29ba1671bfdc497395f
2026-01-04T17:41:36.962859Z
false
FormulaMonks/contest
https://github.com/FormulaMonks/contest/blob/73ad19d80b387112a3b4e29ba1671bfdc497395f/lib/contest.rb
lib/contest.rb
require "test/unit" # Test::Unit loads a default test if the suite is empty, whose purpose is to # fail. Since having empty contexts is a common practice, we decided to # overwrite TestSuite#empty? in order to allow them. Having a failure when no # tests have been defined seems counter-intuitive. class Test::Unit::Tes...
ruby
MIT
73ad19d80b387112a3b4e29ba1671bfdc497395f
2026-01-04T17:41:36.962859Z
false
le0pard/mongodb_logger
https://github.com/le0pard/mongodb_logger/blob/102ee484f8c93ae52a46b4605a8b9bdfd538bb66/features/support/rails.rb
features/support/rails.rb
BUNDLE_ENV_VARS = %w(RUBYOPT BUNDLE_PATH BUNDLE_BIN_PATH BUNDLE_GEMFILE) ORIGINAL_BUNDLE_VARS = Hash[ENV.select{ |key,value| BUNDLE_ENV_VARS.include?(key) }] ENV['RAILS_ENV'] = 'test' Before do ENV['BUNDLE_GEMFILE'] = File.join(Dir.pwd, ENV['BUNDLE_GEMFILE']) unless ENV['BUNDLE_GEMFILE'].start_with?(Dir.pwd) @fra...
ruby
MIT
102ee484f8c93ae52a46b4605a8b9bdfd538bb66
2026-01-04T17:41:35.043607Z
false
le0pard/mongodb_logger
https://github.com/le0pard/mongodb_logger/blob/102ee484f8c93ae52a46b4605a8b9bdfd538bb66/features/support/env.rb
features/support/env.rb
require 'active_support' require 'rspec' require 'aruba/cucumber' PROJECT_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..', '..')).freeze TEMP_DIR = File.join(PROJECT_ROOT, 'tmp').freeze LOCAL_RAILS_ROOT = File.join(TEMP_DIR, 'rails_root').freeze Before do FileUtils.rm_rf(LOCAL_RAILS_ROOT)...
ruby
MIT
102ee484f8c93ae52a46b4605a8b9bdfd538bb66
2026-01-04T17:41:35.043607Z
false