repo_name stringlengths 6 97 | path stringlengths 3 341 | text stringlengths 8 1.02M |
|---|---|---|
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/ext/tk/sample/tkextlib/iwidgets/sample/shell.rb | <filename>.rvm/src/ruby-1.9.3-p551/ext/tk/sample/tkextlib/iwidgets/sample/shell.rb
#!/usr/bin/env ruby
require 'tk'
require 'tkextlib/iwidgets'
sh = Tk::Iwidgets::Shell.new(:modality=>:application,
:padx=>20, :pady=>20, :title=>'Shell')
TkButton.new(:text=>'ACTIVATE', :padx=>7, :pady=>7,
... |
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/mixlib-cli-1.6.0/lib/mixlib/cli/version.rb | <gh_stars>0
module Mixlib
module CLI
VERSION = "1.6.0"
end
end
|
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/winrm-1.8.1/spec/matchers.rb | # encoding: UTF-8
require 'rspec/expectations'
# rspec matchers
module WinRMSpecs
def self.stdout(output)
output[:data].collect do |i|
i[:stdout]
end.join('\r\n').gsub(/(\\r\\n)+$/, '')
end
def self.stderr(output)
output[:data].collect do |i|
i[:stderr]
end.join('\r\n').gsub(/(\\r\\n... |
arnab0073/idea | .rvm/src/ruby-2.3.0/sample/pty/shl.rb | #
# old-fashioned 'shl' like program
# by <NAME>
#
# commands:
# c creates new shell
# C-z suspends shell
# p lists all shell
# 0,1,... choose shell
# q quit
require 'pty'
$shells = []
$n_shells = 0
$r_pty = nil
$w_pty = nil
def writer
system "stty -echo raw"
be... |
arnab0073/idea | .rvm/src/ruby-2.3.0/test/rubygems/test_gem_remote_fetcher.rb | # frozen_string_literal: false
require 'rubygems/test_case'
require 'webrick'
begin
require 'webrick/https'
rescue LoadError => e
raise unless (e.respond_to?(:path) && e.path == 'openssl') ||
e.message =~ / -- openssl$/
end
require 'rubygems/remote_fetcher'
require 'rubygems/package'
require 'minit... |
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/logging-2.1.0/test/test_filter.rb | <reponame>arnab0073/idea<filename>.rvm/gems/ruby-2.3.0/gems/logging-2.1.0/test/test_filter.rb
require File.expand_path('setup', File.dirname(__FILE__))
module TestLogging
class TestFilter < Test::Unit::TestCase
include LoggingTestCase
def setup
super
::Logging::init
@lf = ::Logging::Filt... |
arnab0073/idea | .rvm/src/ruby-2.3.0/test/optparse/test_reqarg.rb | <reponame>arnab0073/idea<filename>.rvm/src/ruby-2.3.0/test/optparse/test_reqarg.rb
# frozen_string_literal: false
require_relative 'test_optparse'
module TestOptionParser::ReqArg
class Def1 < TestOptionParser
include ReqArg
def setup
super
@opt.def_option("-xVAL") {|x| @flag = x}
@opt.def_o... |
arnab0073/idea | .rvm/src/ruby-2.3.0/test/test_forwardable.rb | <gh_stars>0
# frozen_string_literal: false
require 'test/unit'
require 'forwardable'
class TestForwardable < Test::Unit::TestCase
RECEIVER = BasicObject.new
RETURNED1 = BasicObject.new
RETURNED2 = BasicObject.new
class << RECEIVER
def delegated1
RETURNED1
end
def delegated2
RETURNED2
... |
arnab0073/idea | .rvm/src/ruby-2.3.0/test/-ext-/string/test_enc_associate.rb | <filename>.rvm/src/ruby-2.3.0/test/-ext-/string/test_enc_associate.rb
# frozen_string_literal: false
require 'test/unit'
require "-test-/string"
class Test_StrEncAssociate < Test::Unit::TestCase
def test_frozen
s = Bug::String.new("abc")
s.force_encoding(Encoding::US_ASCII)
s.freeze
assert_raise(Runt... |
arnab0073/idea | .rvm/src/ruby-2.3.0/lib/rubygems/commands/which_command.rb | <reponame>arnab0073/idea
# frozen_string_literal: false
require 'rubygems/command'
class Gem::Commands::WhichCommand < Gem::Command
def initialize
super 'which', 'Find the location of a library file you can require',
:search_gems_first => false, :show_all => false
add_option '-a', '--[no-]all', 's... |
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/ext/tk/lib/tkextlib/blt/tabnotebook.rb | #
# tkextlib/blt/tabnotebook.rb
# by <NAME> (<EMAIL>)
#
require 'tk'
require 'tkextlib/blt.rb'
require 'tkextlib/blt/tabset.rb'
module Tk::BLT
class Tabnotebook < Tabset
TkCommandNames = ['::blt::tabnotebook'.freeze].freeze
WidgetClassName = 'Tabnotebook'.freeze
WidgetClas... |
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/nori-2.6.0/spec/spec_helper.rb | <reponame>arnab0073/idea<filename>.rvm/gems/ruby-2.3.0/gems/nori-2.6.0/spec/spec_helper.rb<gh_stars>100-1000
require "bundler"
Bundler.require :default, :development
|
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/winrm-1.8.1/spec/winrm_primitives_spec.rb | <reponame>arnab0073/idea
# encoding: UTF-8
describe 'winrm client primitives' do
before(:all) do
@winrm = winrm_connection
end
describe 'open and close shell', integration: true do
it 'should #open_shell and #close_shell' do
sid = @winrm.open_shell
expect(sid).to be_a_uid
expect(@winrm.... |
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/fog-1.29.0/tests/helper.rb | ENV['FOG_RC'] = ENV['FOG_RC'] || File.expand_path('../.fog', __FILE__)
ENV['FOG_CREDENTIAL'] = ENV['FOG_CREDENTIAL'] || 'default'
require 'fog'
require 'fog/bin' # for available_providers and registered_providers
Excon.defaults.merge!(:debug_request => true, :debug_response => true)
require File.expand_path(... |
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/ext/tk/lib/tkextlib/iwidgets/selectiondialog.rb | <reponame>arnab0073/idea<filename>.rvm/src/ruby-1.9.3-p551/ext/tk/lib/tkextlib/iwidgets/selectiondialog.rb
#
# tkextlib/iwidgets/selectiondialog.rb
# by <NAME> (<EMAIL>)
#
require 'tk'
require 'tkextlib/iwidgets.rb'
module Tk
module Iwidgets
class Selectiondialog < Tk::Iwidgets::D... |
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/lib/weakref.rb | <filename>.rvm/src/ruby-1.9.3-p551/lib/weakref.rb
require "delegate"
require 'thread'
# Weak Reference class that allows a referenced object to be
# garbage-collected. A WeakRef may be used exactly like the object it
# references.
#
# Usage:
#
# foo = Object.new
# foo = Object.new
# p foo.to_s ... |
arnab0073/idea | .rvm/src/ruby-2.3.0/ext/digest/digest_conf.rb | # frozen_string_literal: false
def digest_conf(name, hdr = name, funcs = nil, types = nil)
unless with_config("bundled-#{name}")
cc = with_config("common-digest")
if cc == true or /\b#{name}\b/ =~ cc
if File.exist?("#$srcdir/#{name}cc.h") and
have_header("CommonCrypto/CommonDigest.h")
$d... |
arnab0073/idea | .rvm/src/ruby-2.3.0/test/resolv/test_resource.rb | # frozen_string_literal: false
require 'test/unit'
require 'resolv'
class TestResolvResource < Test::Unit::TestCase
def setup
address = "192.168.0.1"
@name1 = Resolv::DNS::Resource::IN::A.new(address)
@name1.instance_variable_set(:@ttl, 100)
@name2 = Resolv::DNS::Resource::IN::A.new(address)
end
... |
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/ext/tk/lib/tk/scrollbox.rb | <reponame>arnab0073/idea
#
# tk/scrollbox.rb - Tk Listbox with Scrollbar
# as an example of Composite Widget
# by <NAME> <<EMAIL>>
#
require 'tk'
require 'tk/listbox'
class TkScrollbox<Tk::Listbox
include TkComposite
def initialize_composite(keys=... |
arnab0073/idea | .rvm/src/ruby-2.3.0/ext/-test-/bug-3571/extconf.rb | # frozen_string_literal: false
create_makefile("-test-/bug-3571/bug")
|
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/mini_portile2-2.1.0/test/test_cook.rb | <reponame>arnab0073/idea
require File.expand_path('../helper', __FILE__)
class TestCook < TestCase
attr_accessor :assets_path, :tar_path, :recipe
def with_custom_git_dir(dir)
old = ENV['GIT_DIR']
ENV['GIT_DIR'] = dir
yield
ensure
ENV['GIT_DIR'] = old
end
def before_all
super
@assets... |
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/puma-1.6.3/lib/puma/app/status.rb | <filename>.rvm/gems/ruby-2.3.0/gems/puma-1.6.3/lib/puma/app/status.rb
module Puma
module App
class Status
def initialize(server, cli)
@server = server
@cli = cli
@auth_token = nil
end
OK_STATUS = '{ "status": "ok" }'.freeze
attr_accessor :auth_token
def auth... |
arnab0073/idea | .rvm/gems/ruby-2.3.0/specifications/little-plugger-1.1.4.gemspec | <gh_stars>0
# -*- encoding: utf-8 -*-
# stub: little-plugger 1.1.4 ruby lib
Gem::Specification.new do |s|
s.name = "little-plugger"
s.version = "1.1.4"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.require_paths = ["lib"]
s.authors = ["<NAME>"]
s... |
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/fog-1.29.0/tests/google/models/compute/region_tests.rb | <reponame>arnab0073/idea<gh_stars>1-10
Shindo.tests("Fog::Compute[:google] | region model", ['google']) do
@regions = Fog::Compute[:google].regions
tests('success') do
tests('#up').succeeds do
region = @regions.get @regions.all.first.name
region.up?
end
end
end
|
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/multi_json-1.12.1/lib/multi_json/adapter.rb | <filename>.rvm/gems/ruby-2.3.0/gems/multi_json-1.12.1/lib/multi_json/adapter.rb<gh_stars>1-10
require 'singleton'
require 'multi_json/options'
module MultiJson
class Adapter
extend Options
include Singleton
class << self
def defaults(action, value)
metaclass = class << self; self; end
... |
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/net-ssh-2.6.8/test/authentication/test_session.rb | <reponame>arnab0073/idea
require 'common'
require 'net/ssh/authentication/session'
module Authentication
class TestSession < Test::Unit::TestCase
include Net::SSH::Transport::Constants
include Net::SSH::Authentication::Constants
def test_constructor_should_set_defaults
assert_equal %w(none public... |
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/puma-1.6.3/lib/puma/rack_patch.rb | require 'rack/commonlogger'
module Rack
# Patch CommonLogger to use after_reply.
#
# Simply request this file and CommonLogger will be a bit more
# efficient.
class CommonLogger
remove_method :call
def call(env)
began_at = Time.now
status, header, body = @app.call(env)
header = Ut... |
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/systemu-2.6.5/samples/d.rb | #
# the cwd can be supplied
#
require 'systemu'
require 'tmpdir'
pwd = %q( ruby -e" STDERR.puts Dir.pwd " )
status = systemu pwd, 2=>(stderr=''), :cwd=>Dir.tmpdir
puts stderr
|
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/knife-windows-1.4.1/spec/spec_helper.rb | <reponame>arnab0073/idea
# Author:: <NAME> (<<EMAIL>>)
# Copyright:: Copyright (c) 2012-2016 Chef Software, Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the ... |
arnab0073/idea | .rvm/src/ruby-2.3.0/ext/fcntl/extconf.rb | <reponame>arnab0073/idea
# frozen_string_literal: false
require 'mkmf'
create_makefile('fcntl')
|
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/test/net/imap/test_imap_response_parser.rb | require "net/imap"
require "test/unit"
class IMAPResponseParserTest < Test::Unit::TestCase
def setup
@do_not_reverse_lookup = Socket.do_not_reverse_lookup
Socket.do_not_reverse_lookup = true
if Net::IMAP.respond_to?(:max_flag_count)
@max_flag_count = Net::IMAP.max_flag_count
Net::IMAP.max_fla... |
arnab0073/idea | .rvm/rubies/ruby-2.3.0/lib/ruby/gems/2.3.0/gems/rubygems-bundler-1.4.4/rubygems-bundler.gemspec | <reponame>arnab0073/idea
#!/usr/bin/env ruby
# -*- encoding: utf-8 -*-
Kernel.load File.expand_path("../lib/rubygems-bundler/version.rb", __FILE__)
Gem::Specification.new do |s|
s.name = "rubygems-bundler"
s.version = RubygemsBundler::VERSION
s.authors = ["<NAME>", "<NAME>"]
s.email = ["<... |
arnab0073/idea | .rvm/src/ruby-2.3.0/test/ruby/test_continuation.rb | <filename>.rvm/src/ruby-2.3.0/test/ruby/test_continuation.rb
# frozen_string_literal: false
require 'test/unit'
EnvUtil.suppress_warning {require 'continuation'}
require 'fiber'
class TestContinuation < Test::Unit::TestCase
def test_create
assert_equal(:ok, callcc{:ok})
assert_equal(:ok, callcc{|c| c.call :o... |
arnab0073/idea | .rvm/src/ruby-2.3.0/lib/rdoc/i18n.rb | <gh_stars>10-100
# frozen_string_literal: false
##
# This module provides i18n realated features.
module RDoc::I18n
autoload :Locale, 'rdoc/i18n/locale'
autoload :Text, 'rdoc/i18n/text'
end
|
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/ext/tk/lib/tkextlib/tcllib/canvas_zoom.rb | <reponame>arnab0073/idea<gh_stars>1-10
#
# tkextlib/tcllib/canvas.rb
# by <NAME> (<EMAIL>)
#
# * Part of tcllib extension
# *
#
require 'tk'
require 'tkextlib/tcllib.rb'
# TkPackage.require('widget::canvas_zoom', '0.1')
TkPackage.require('widget::canvas_zoom')
module Tk::Tcllib
m... |
arnab0073/idea | .rvm/src/ruby-2.3.0/tool/gem-unpack.rb | <reponame>arnab0073/idea<filename>.rvm/src/ruby-2.3.0/tool/gem-unpack.rb
require 'rubygems'
require 'rubygems/package'
def Gem.unpack(file, dir = nil)
policy = Gem::Security::LowSecurity
(policy = policy.dup).ui = Gem::SilentUI.new
pkg = Gem::Package.new(file)
pkg.security_policy = policy
spec = pkg.spec
t... |
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/ext/tk/sample/tkextlib/iwidgets/sample/dateentry.rb | #!/usr/bin/env ruby
require 'tk'
require 'tkextlib/iwidgets'
Tk::Iwidgets::Dateentry.new.pack
Tk.mainloop
|
arnab0073/idea | .rvm/src/ruby-2.3.0/test/fileutils/test_verbose.rb | <reponame>arnab0073/idea
# frozen_string_literal: false
# $Id: test_verbose.rb 53141 2015-12-16 05:07:31Z naruse $
require 'test/unit'
require 'fileutils'
require_relative 'visibility_tests'
class TestFileUtilsVerbose < Test::Unit::TestCase
include FileUtils::Verbose
include TestFileUtils::Visibility
def setu... |
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/rest-client-1.6.9/lib/restclient/version.rb | module RestClient
VERSION = '1.6.9' unless defined?(self::VERSION)
def self.version
VERSION
end
end
|
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/ext/tk/lib/tkextlib/version.rb | #
# release date of tkextlib
#
module Tk
Tkextlib_RELEASE_DATE = '2010-02-01'.freeze
end
|
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/rubyntlm-0.6.0/spec/support/shared/examples/net/ntlm/int_shared.rb | shared_examples_for 'an integer field' do |values|
subject do
described_class.new({
:value => values[:default],
:active => true
})
end
context '#serialize' do
it 'should serialize properly with an integer value' do
expect(subject.serialize).to eq(values[:default_hex])
... |
arnab0073/idea | .rvm/src/ruby-2.3.0/tool/instruction.rb | <filename>.rvm/src/ruby-2.3.0/tool/instruction.rb
#!./miniruby
# -*- coding: us-ascii -*-
#
#
require 'erb'
$:.unshift(File.dirname(__FILE__))
require 'vpath'
class RubyVM
class Instruction
def initialize name, opes, pops, rets, comm, body, tvars, sp_inc,
orig = self, defopes = [], type = nil... |
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/ext/tk/lib/tkextlib/iwidgets/hierarchy.rb | #
# tkextlib/iwidgets/hierarchy.rb
# by <NAME> (<EMAIL>)
#
require 'tk'
require 'tk/text'
require 'tkextlib/iwidgets.rb'
module Tk
module Iwidgets
class Hierarchy < Tk::Iwidgets::Scrolledwidget
end
end
end
class Tk::Iwidgets::Hierarchy
ItemConfCMD = ['tag'.freeze, 'config... |
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/rubyntlm-0.6.0/spec/support/shared/examples/net/ntlm/fieldset_shared.rb | shared_examples_for 'a fieldset' do |fields|
subject(:fieldset_class) do
Class.new(described_class)
end
context 'the class' do
it { should respond_to :string }
it { should respond_to :int16LE }
it { should respond_to :int32LE }
it { should respond_to :int64LE }
it { should res... |
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/ext/tk/sample/cmd_res_test.rb | require 'tk'
TkOptionDB.readfile(File.expand_path('cmd_resource',
File.dirname(__FILE__)))
f = TkFrame.new(:class=>'BtnFrame').pack
b = TkButton.new(:parent=>f, :widgetname=>'hello').pack
cmd1 = TkOptionDB.new_proc_class(b, [:show_msg, :bye_msg], 3)
cmd2 = TkOptionDB.new_proc_class(... |
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/benchmark/bm_io_select3.rb | # IO.select performance. a lot of fd
ios = []
nr = 100
max = Process.getrlimit(Process::RLIMIT_NOFILE)[0]
puts "max fd: #{max} (results not apparent with <= 1024 max fd)"
(max - 10).times do
r, w = IO.pipe
r.close
ios.push w
end
nr.times do
IO.select nil, ios
end
|
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/logging-2.1.0/lib/logging/layouts.rb |
module Logging
module Layouts; end
require libpath('logging/layouts/basic')
require libpath('logging/layouts/parseable')
require libpath('logging/layouts/pattern')
end # Logging
|
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/ext/tk/lib/tkextlib/iwidgets/labeledwidget.rb | <filename>.rvm/src/ruby-1.9.3-p551/ext/tk/lib/tkextlib/iwidgets/labeledwidget.rb
#
# tkextlib/iwidgets/labeledwidget.rb
# by <NAME> (<EMAIL>)
#
require 'tk'
require 'tkextlib/iwidgets.rb'
module Tk
module Iwidgets
class Labeledwidget < Tk::Itk::Widget
end
end
end
class Tk::... |
arnab0073/idea | .rvm/src/ruby-2.3.0/test/test_observer.rb | # frozen_string_literal: false
require 'test/unit'
require 'observer'
class TestObserver < Test::Unit::TestCase
class TestObservable
include Observable
def notify(*args)
changed
notify_observers(*args)
end
end
class TestWatcher
def initialize(observable)
@notifications = []
... |
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/gyoku-1.3.1/spec/gyoku/hash_spec.rb | require "spec_helper"
describe Gyoku::Hash do
describe ".to_xml" do
describe "returns SOAP request compatible XML" do
it "for a simple Hash" do
expect(to_xml(:some => "user")).to eq("<some>user</some>")
end
it "for a nested Hash" do
expect(to_xml(:some => { :new => "user" })).... |
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/ext/curses/mouse.rb | #!/usr/local/bin/ruby
require "curses"
include Curses
def show_message(*msgs)
message = msgs.join
width = message.length + 6
win = Window.new(5, width,
(lines - 5) / 2, (cols - width) / 2)
win.keypad = true
win.attron(color_pair(COLOR_RED)){
win.box(?|, ?-, ?+)
}
win.setpos(2, 3)
win.addstr(m... |
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/winrm-1.8.1/spec/issue_59_spec.rb | <gh_stars>0
# encoding: UTF-8
describe 'issue 59', integration: true do
before(:all) do
@winrm = winrm_connection
end
describe 'long running script without output' do
let(:logged_output) { StringIO.new }
let(:logger) { Logging.logger(logged_output) }
it 'should not error' do
@winrm.... |
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/net-ssh-2.6.8/test/transport/kex/test_diffie_hellman_group_exchange_sha256.rb | <filename>.rvm/gems/ruby-2.3.0/gems/net-ssh-2.6.8/test/transport/kex/test_diffie_hellman_group_exchange_sha256.rb
require 'common'
require 'net/ssh/transport/kex/diffie_hellman_group_exchange_sha1'
module Transport; module Kex
class TestDiffieHellmanGroupExchangeSHA256 < TestDiffieHellmanGroupExchangeSHA1
priva... |
arnab0073/idea | .rvm/src/ruby-2.3.0/ext/-test-/file/extconf.rb | <gh_stars>0
# frozen_string_literal: false
$INCFLAGS << " -I$(topdir) -I$(top_srcdir)"
headers = %w[sys/param.h sys/mount.h sys/vfs.h].select {|h| have_header(h)}
if have_type("struct statfs", headers)
have_struct_member("struct statfs", "f_fstypename", headers)
have_struct_member("struct statfs", "f_type", header... |
arnab0073/idea | .rvm/src/ruby-2.3.0/lib/rdoc/comment.rb | <gh_stars>0
# frozen_string_literal: false
##
# A comment holds the text comment for a RDoc::CodeObject and provides a
# unified way of cleaning it up and parsing it into an RDoc::Markup::Document.
#
# Each comment may have a different markup format set by #format=. By default
# 'rdoc' is used. The :markup: directive... |
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/net-ssh-multi-1.2.0/test/multi_test.rb | <reponame>arnab0073/idea
require 'common'
require 'net/ssh/multi'
class MultiTest < Test::Unit::TestCase
def test_start_with_block_should_yield_session_and_then_close
Net::SSH::Multi::Session.any_instance.expects(:loop)
Net::SSH::Multi::Session.any_instance.expects(:close)
yielded = false
Net::SSH::M... |
arnab0073/idea | .rvm/src/ruby-2.3.0/test/optparse/test_bash_completion.rb | <filename>.rvm/src/ruby-2.3.0/test/optparse/test_bash_completion.rb
# frozen_string_literal: false
require 'test/unit'
require 'optparse'
class TestOptionParser < Test::Unit::TestCase
end
class TestOptionParser::BashCompletion < Test::Unit::TestCase
def setup
@opt = OptionParser.new
@opt.define("-z", "zzz") ... |
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/ext/mathn/rational/extconf.rb | require "mkmf"
create_makefile "mathn/rational"
|
arnab0073/idea | .rvm/src/ruby-2.3.0/tool/rbinstall.rb | #!./miniruby
begin
load "./rbconfig.rb"
rescue LoadError
CONFIG = Hash.new {""}
else
include RbConfig
$".unshift File.expand_path("./rbconfig.rb")
end
srcdir = File.expand_path('../..', __FILE__)
unless defined?(CROSS_COMPILING) and CROSS_COMPILING
$:.replace([srcdir+"/lib", Dir.pwd])
end
require 'fileutils... |
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/ohai-6.18.0/lib/ohai/plugins/groovy.rb | #
# Author:: <NAME> <<EMAIL>>
# Copyright:: Copyright (c) 2009 VMware, Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.o... |
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/ext/tk/sample/tkextlib/treectrl/outlook-folders.rb | <reponame>arnab0073/idea
#
# Demo: Outlook Express folder list
#
def demoOutlookFolders(t)
init_pics('outlook-*')
height = t.font.metrics(:linespace) + 2
height = 18 if height < 18
t.configure(:itemheight=>height, :selectmode=>:browse, :showlines=>true,
:showroot=>true, :showrootbutton=>false, :... |
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/gssapi-1.2.0/examples/gss_iov_server.rb | #!/usr/bin/env ruby
$: << '../lib'
$: << '.'
#require 'gssapi/heimdal'
require 'gssapi'
require 'gss_iov_helpers'
require 'base64'
require 'socket'
class GssIovServer
include GssIOVHelpers
def initialize
@host = 'example.org'
@service = "host"
@keytab = "#{ENV['HOME']}/.gssapi/krb5.keytab" # this is... |
arnab0073/idea | .rvm/src/ruby-2.3.0/test/psych/test_document.rb | <reponame>arnab0073/idea
# frozen_string_literal: false
require_relative 'helper'
module Psych
class TestDocument < TestCase
def setup
super
@stream = Psych.parse_stream(<<-eoyml)
%YAML 1.1
%TAG ! tag:tenderlovemaking.com,2009:
--- !fun
eoyml
@doc = @stream.children.first
end
def... |
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/ext/tk/lib/tkextlib/tkimg.rb | #
# TkImg extension support
# by <NAME> (<EMAIL>)
#
require 'tk'
# call setup script for general 'tkextlib' libraries
require 'tkextlib/setup.rb'
# call setup script
require 'tkextlib/tkimg/setup.rb'
# load all image format handlers
#TkPackage.require('Img', '1.3')
TkPackage.require('... |
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/ext/dl/callback/extconf.rb | require 'mkmf'
if compiled?("dl")
callbacks = (0..8).map{|i| "callback-#{i}"}.unshift("callback")
callback_srcs = callbacks.map{|basename| "#{basename}.c"}
callback_objs = callbacks.map{|basename| "#{basename}.o"}
$distcleanfiles << '$(SRCS)'
$srcs = callback_srcs
$objs = callback_objs
$INCFLAGS << " -I... |
arnab0073/idea | .rvm/src/ruby-2.3.0/gems/did_you_mean-1.0.0/test/test_helper.rb | <reponame>arnab0073/idea
require 'minitest/autorun'
require 'minitest/unit'
require 'did_you_mean'
module DidYouMean::TestHelper
def assert_correction(expected, array)
assert_equal [expected], array, "Expected #{array.inspect} to only include #{expected.inspect}"
end
end
MiniTest::Test.include(DidYouMean::Tes... |
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/ext/continuation/extconf.rb | require 'mkmf'
create_makefile('continuation')
|
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/logging-2.1.0/examples/hierarchies.rb | # :stopdoc:
#
# Loggers exist in a hierarchical relationship defined by their names. Each
# logger has a parent (except for the root logger). A logger can zero or
# more children. This parent/child relationship is determined by the Ruby
# namespace separator '::'.
#
# root
# |-- Foo
# | |-- Foo::Bar
# | `--... |
arnab0073/idea | .rvm/src/ruby-2.3.0/test/socket/test_udp.rb | <filename>.rvm/src/ruby-2.3.0/test/socket/test_udp.rb<gh_stars>10-100
# frozen_string_literal: true
begin
require "socket"
require "test/unit"
rescue LoadError
end
class TestSocket_UDPSocket < Test::Unit::TestCase
def test_open
assert_nothing_raised { UDPSocket.open {} }
assert_nothing_raised { UDPSock... |
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/logging-2.1.0/examples/rails4.rb | <gh_stars>100-1000
# :stopdoc:
#
# Rails 4 allows you to hook up multiple loggers (even those external to this gem)
# so you can use a single Rails.logger statement. For Rails developers, this is
# easier because if you ever change logging frameworks, you don't have to change
# all of your app code.
#
# See http://rail... |
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/lib/xmlrpc/httpserver.rb | #
# Implements a simple HTTP-server by using <NAME> (<EMAIL>)
# ruby-generic-server.
#
# Copyright (C) 2001, 2002, 2003 by <NAME> (<EMAIL>)
#
# $Id: httpserver.rb 29726 2010-11-08 20:59:01Z marcandre $
#
require "gserver"
class HttpServer < GServer
##
# handle_obj specifies the object, that receives calls to re... |
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/ext/psych/lib/psych/handler.rb | module Psych
###
# Psych::Handler is an abstract base class that defines the events used
# when dealing with Psych::Parser. Clients who want to use Psych::Parser
# should implement a class that inherits from Psych::Handler and define
# events that they can handle.
#
# Psych::Handler defines all events th... |
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/ext/tk/lib/tk/entry.rb | #
# tk/entry.rb - Tk entry classes
# by <NAME> <<EMAIL>>
require 'tk'
require 'tk/label'
require 'tk/scrollable'
require 'tk/validation'
class Tk::Entry<Tk::Label
include X_Scrollable
include TkValidation
TkCommandNames = ['entry'.freeze].freeze
WidgetClassName = 'Entry'.f... |
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/ext/tk/lib/tk/root.rb | #
# tk/root.rb : treat root widget
#
require 'tk'
require 'tk/wm'
require 'tk/menuspec'
class Tk::Root<TkWindow
include Wm
include TkMenuSpec
def __methodcall_optkeys # { key=>method, ... }
TOPLEVEL_METHODCALL_OPTKEYS
end
private :__methodcall_optkeys
def Root.new(keys=nil, &b)
unless TkCore::IN... |
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/little-plugger-1.1.4/spec/little-plugger_spec.rb | require File.join(File.dirname(__FILE__), %w[spec_helper])
describe LittlePlugger do
it "converts a string from camel-case to underscore" do
expect(LittlePlugger.underscore('FooBarBaz')).to eq('foo_bar_baz')
expect(LittlePlugger.underscore('CouchDB')).to eq('couch_db')
expect(LittlePlugger.underscore('F... |
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/net-ssh-multi-1.2.0/lib/net/ssh/multi/session_actions.rb | module Net; module SSH; module Multi
# This module represents the actions that are available on session
# collections. Any class that includes this module needs only provide a
# +servers+ method that returns a list of Net::SSH::Multi::Server
# instances, and the rest just works. See Net::SSH::Multi::Session an... |
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/logging-2.1.0/examples/loggers.rb | # :stopdoc:
#
# Multiple loggers can be created and each can be configured with it's own
# log level and appenders. So one logger can be configured to output debug
# messages, and all the others can be left at the info or warn level. This
# makes it easier to debug specific portions of your code.
#
require 'logging'... |
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/rubyntlm-0.6.0/lib/net/ntlm/message/type0.rb | <filename>.rvm/gems/ruby-2.3.0/gems/rubyntlm-0.6.0/lib/net/ntlm/message/type0.rb
module Net
module NTLM
class Message
# sub class definitions
class Type0 < Message
string :sign, {:size => 8, :value => SSP_SIGN}
int32LE :type, {:value => 0}
end
... |
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/logging-2.1.0/lib/logging/utils.rb | <reponame>arnab0073/idea
require 'thread'
require 'rbconfig'
# --------------------------------------------------------------------------
class String
# call-seq:
# shrink( width, ellipses = '...' ) #=> string
#
# Shrink the size of the current string to the given _width_ by removing
# characters fro... |
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/ext/tk/lib/tkextlib/blt.rb | #
# BLT support
# by <NAME> (<EMAIL>)
#
require 'tk'
require 'tk/variable'
# call setup script for general 'tkextlib' libraries
require 'tkextlib/setup.rb'
# call setup script
require 'tkextlib/blt/setup.rb'
# load all image format handlers
#TkPackage.require('BLT', '2.4')
TkPackage.r... |
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/lib/xmlrpc/server.rb | <gh_stars>0
=begin
= xmlrpc/server.rb
Copyright (C) 2001, 2002, 2003, 2005 by <NAME> (<EMAIL>)
Released under the same term of license as Ruby.
= Classes
* ((<XMLRPC::BasicServer>))
* ((<XMLRPC::CGIServer>))
* ((<XMLRPC::ModRubyServer>))
* ((<XMLRPC::Server>))
* ((<XMLRPC::WEBrickServlet>))
= XMLRPC::BasicServer
== ... |
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/mixlib-shellout-1.6.1/lib/mixlib/shellout.rb | #--
# Author:: <NAME> (<<EMAIL>>)
# Copyright:: Copyright (c) 2010, 2011 Opscode, Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://w... |
arnab0073/idea | .rvm/src/ruby-2.3.0/gem_prelude.rb | if defined?(Gem)
require 'rubygems.rb'
begin
require 'did_you_mean'
rescue LoadError
end if defined?(DidYouMean)
end
|
arnab0073/idea | .rvm/src/ruby-2.3.0/gems/did_you_mean-1.0.0/test/correctable/class_name_test.rb | require 'test_helper'
module ACRONYM
end
class Project
def self.bo0k
Bo0k
end
end
class Book
class TableOfContents; end
def tableof_contents
TableofContents
end
class Page
def tableof_contents
TableofContents
end
def self.tableof_contents
TableofContents
end
end
e... |
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/ohai-6.18.0/lib/ohai/plugins/azure.rb |
provides "azure"
azure_metadata_from_hints = hint?('azure')
if azure_metadata_from_hints
Ohai::Log.debug("azure_metadata_from_hints is present.")
azure Mash.new
azure_metadata_from_hints.each {|k, v| azure[k] = v }
else
Ohai::Log.debug("No hints present for azure.")
false
end |
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/net-ssh-3.1.1/lib/net/ssh/known_hosts.rb | <gh_stars>1-10
require 'strscan'
require 'openssl'
require 'base64'
require 'net/ssh/buffer'
module Net; module SSH
# Represents the result of a search in known hosts
# see search_for
class HostKeys < Array
attr_reader :host
def initialize(host_keys, host, known_hosts, options = {})
super(host_k... |
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/ext/tk/lib/tkextlib/tile/tentry.rb | <filename>.rvm/src/ruby-1.9.3-p551/ext/tk/lib/tkextlib/tile/tentry.rb
#
# tentry widget
# by <NAME> (<EMAIL>)
#
require 'tk'
require 'tkextlib/tile.rb'
module Tk
module Tile
class TEntry < Tk::Entry
end
Entry = TEntry
end
end
class Tk::Tile::TEntry < Tk::Entry
include ... |
arnab0073/idea | .rvm/src/ruby-2.3.0/test/ruby/test_integer.rb | # frozen_string_literal: false
require 'test/unit'
class TestInteger < Test::Unit::TestCase
BDSIZE = 0x4000000000000000.coerce(0)[0].size
def self.bdsize(x)
((x + 1) / 8 + BDSIZE) / BDSIZE * BDSIZE
end
def bdsize(x)
self.class.bdsize(x)
end
def test_aref
# assert_equal(1, (1 << 0x40000000)[0x4... |
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/rubyntlm-0.6.0/spec/lib/net/ntlm/int64_le_spec.rb | require 'spec_helper'
describe Net::NTLM::Int64LE do
int_values = {
:default => 5294967295,
:default_hex => [5294967295 & 0x00000000ffffffff, 5294967295 >> 32].pack("V2"),
:alt => 5294967294,
:alt_hex => [5294967294 & 0x00000000ffffffff, 5294967294 >> 32].pack("V2"),
... |
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/nori-2.6.0/lib/nori/core_ext.rb | <gh_stars>100-1000
require "nori/core_ext/object"
require "nori/core_ext/string"
require "nori/core_ext/hash"
|
arnab0073/idea | .rvm/src/ruby-2.3.0/lib/rdoc/markup/hard_break.rb | <gh_stars>10-100
# frozen_string_literal: false
##
# A hard-break in the middle of a paragraph.
class RDoc::Markup::HardBreak
@instance = new
##
# RDoc::Markup::HardBreak is a singleton
def self.new
@instance
end
##
# Calls #accept_hard_break on +visitor+
def accept visitor
visitor.accept_... |
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/ext/tk/lib/tkextlib/bwidget/selectcolor.rb | #
# tkextlib/bwidget/selectcolor.rb
# by <NAME> (<EMAIL>)
#
require 'tk'
require 'tkextlib/bwidget.rb'
require 'tkextlib/bwidget/messagedlg'
module Tk
module BWidget
class SelectColor < Tk::BWidget::MessageDlg
class Dialog < Tk::BWidget::SelectColor
end
class Men... |
arnab0073/idea | .rvm/src/ruby-2.3.0/test/socket/test_sockopt.rb | # frozen_string_literal: true
require 'test/unit'
require 'socket'
class TestSocketOption < Test::Unit::TestCase
def test_new
data = [1].pack("i")
sockopt = Socket::Option.new(:INET, :SOCKET, :KEEPALIVE, data)
assert_equal(Socket::AF_INET, sockopt.family)
assert_equal(Socket::SOL_SOCKET, sockopt.lev... |
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/fog-1.29.0/lib/fog/google/core.rb | <filename>.rvm/gems/ruby-2.3.0/gems/fog-1.29.0/lib/fog/google/core.rb
require 'fog/core'
require 'fog/xml'
module Fog
module Google
extend Fog::Provider
service(:compute, 'Compute')
service(:dns, 'DNS')
service(:monitoring, 'Monitoring')
service(:storage, 'Storage')
service(:sql... |
arnab0073/idea | .rvm/src/ruby-2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/verbose_formatter.rb | # -*- frozen-string-literal: true -*-
require 'did_you_mean/formatter'
module DidYouMean
module VerboseFormatter
prepend_features DidYouMean::Formatter
def to_s
return "" if @corrections.empty?
output = "\n\n Did you mean? ".dup
output << @corrections.join("\n ")
... |
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/lib/rexml/light/node.rb | require 'rexml/xmltokens'
# [ :element, parent, name, attributes, children* ]
# a = Node.new
# a << "B" # => <a>B</a>
# a.b # => <a>B<b/></a>
# a.b[1] # => <a>B<b/><b/><a>
# a.b[1]["x"] = "y" # => <a>B<b/><b x="y"/></a>
# a.b[0].c # => <a>B<b><c/... |
arnab0073/idea | .rvm/src/ruby-2.3.0/lib/rexml/functions.rb | # frozen_string_literal: false
module REXML
# If you add a method, keep in mind two things:
# (1) the first argument will always be a list of nodes from which to
# filter. In the case of context methods (such as position), the function
# should return an array with a value for each child in the array.
# (2) ... |
arnab0073/idea | .rvm/src/ruby-2.3.0/test/fileutils/visibility_tests.rb | # frozen_string_literal: false
require 'test/unit'
require 'fileutils'
class TestFileUtils < Test::Unit::TestCase
end
##
# These tests are reused in the FileUtils::Verbose, FileUtils::NoWrite and
# FileUtils::DryRun tests
module TestFileUtils::Visibility
FileUtils::METHODS.each do |m|
define_method "test_sing... |
arnab0073/idea | .rvm/rubies/ruby-2.3.0/lib/ruby/gems/2.3.0/gems/rvm-1.11.3.9/lib/rvm/errors.rb | module RVM
# Generic error in RVM
class Error < StandardError; end
# Generic error with the shell command output attached.
# The RVM::Shell::Result instance is available via +#result+.
class ErrorWithResult < Error
attr_reader :result
def initialize(result, message = nil)
@result = result
... |
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/ext/tk/lib/tk/textimage.rb | <filename>.rvm/src/ruby-1.9.3-p551/ext/tk/lib/tk/textimage.rb<gh_stars>1-10
#
# tk/textimage.rb - treat Tk text image object
#
require 'tk'
require 'tk/text'
class TkTextImage<TkObject
include Tk::Text::IndexModMethods
def initialize(parent, index, keys)
#unless parent.kind_of?(Tk::Text)
# fail ArgumentE... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.