repo_name stringlengths 6 97 | path stringlengths 3 341 | text stringlengths 8 1.02M |
|---|---|---|
arnab0073/idea | .rvm/src/ruby-2.3.0/ext/-test-/funcall/extconf.rb | <gh_stars>0
# frozen_string_literal: false
require 'mkmf'
create_makefile("-test-/funcall/funcall")
|
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/KNOWNBUGS.rb | #
# This test file concludes tests which point out known bugs.
# So all tests will cause failure.
#
|
arnab0073/idea | .rvm/rubies/ruby-2.3.0/lib/ruby/gems/2.3.0/gems/rvm-1.11.3.9/lib/rvm/environment/info.rb | <filename>.rvm/rubies/ruby-2.3.0/lib/ruby/gems/2.3.0/gems/rvm-1.11.3.9/lib/rvm/environment/info.rb
require 'yaml'
module RVM
class Environment
# Return a Hash with the same output that command:
#
# $ rvm info
#
def info(*ruby_strings)
ruby_string = normalize_ruby_string(ruby_strings)
... |
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/ext/tk/sample/btn_with_frame.rb | <reponame>arnab0073/idea
require 'tk'
class Button_with_Frame < TkButton
def create_self(keys)
@frame = TkFrame.new('widgetname'=>@path, 'background'=>'yellow')
install_win(@path) # create new @path which is a daughter of old @path
super(keys)
TkPack(@path, :padx=>7, :pady=>7)
@epath = @frame.pat... |
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/fog-1.29.0/lib/fog/rackspace/requests/cdn_v2/update_service.rb | <filename>.rvm/gems/ruby-2.3.0/gems/fog-1.29.0/lib/fog/rackspace/requests/cdn_v2/update_service.rb
class Fog::Rackspace::CDNV2::Real
def update_service(service)
request(
:expects => [201, 202],
:method => 'PATCH',
:body => Fog::JSON.encode(service.operations),
:path => "services/#{s... |
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/ext/bigdecimal/extconf.rb | require 'mkmf'
have_func("labs", "stdlib.h")
have_func("llabs", "stdlib.h")
create_makefile('bigdecimal')
|
arnab0073/idea | .rvm/src/ruby-2.3.0/ext/strscan/extconf.rb | # frozen_string_literal: false
require 'mkmf'
$INCFLAGS << " -I$(top_srcdir)"
create_makefile 'strscan'
|
arnab0073/idea | .rvm/src/ruby-2.3.0/sample/ripper/strip-comment.rb | # $Id: strip-comment.rb 25189 2009-10-02 12:04:37Z akr $
require 'ripper/filter'
class CommentStripper < Ripper::Filter
def CommentStripper.strip(src)
new(src).parse(nil)
end
def on_default(event, token, data)
print token
end
def on_comment(token, data)
puts
end
end
CommentStripper.strip(AR... |
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/fog-1.29.0/lib/fog/openstack/models/baremetal/ports.rb | <reponame>arnab0073/idea
require 'fog/core/collection'
require 'fog/openstack/models/baremetal/port'
module Fog
module Baremetal
class OpenStack
class Ports < Fog::Collection
model Fog::Baremetal::OpenStack::Port
def all
load(service.list_ports.body['ports'])
end
... |
arnab0073/idea | .rvm/src/ruby-2.3.0/lib/pstore.rb | # frozen_string_literal: false
# = PStore -- Transactional File Storage for Ruby Objects
#
# pstore.rb -
# originally by matz
# documentation by <NAME> and <NAME>
# improved by <NAME>
#
# See PStore for documentation.
require "digest/md5"
#
# PStore implements a file based persistence mechanism based on a Hash.... |
arnab0073/idea | .rvm/src/ruby-2.3.0/test/ruby/test_variable.rb | <gh_stars>1-10
# frozen_string_literal: false
require 'test/unit'
class TestVariable < Test::Unit::TestCase
class Gods
@@rule = "Uranus"
def ruler0
@@rule
end
def self.ruler1 # <= per method definition style
@@rule
end
class << self # <= multiple method definition style
... |
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/ext/tk/lib/tk/clock.rb | <gh_stars>10-100
#
# tk/clock.rb : methods for clock command
#
require 'tk'
module Tk
module Clock
include Tk
extend TkCore
def self.add(clk, *args)
tk_call_without_enc('clock','add', clk, *args).to_i
end
def self.clicks(ms=nil)
ms = ms.to_s if ms.kind_of?(Symbol)
case ms
... |
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/tool/change_maker.rb | #! ./miniruby
def diff2index(cmd, *argv)
lines = []
path = nil
`#{cmd} #{argv.join(" ")}`.split(/\n/).each do |line|
case line
when /^Index: (\S*)/, /^diff --git [a-z]\/(\S*) [a-z]\/\1/
path = $1
when /^@@\s*-[,\d]+ +\+(\d+)[,\d]*\s*@@(?: +([A-Za-z_][A-Za-z_0-9 ]*[A-Za-z_0-9]))?/
line = $... |
arnab0073/idea | .rvm/src/ruby-2.3.0/ext/rbconfig/sizeof/extconf.rb | <reponame>arnab0073/idea
# frozen_string_literal: false
$srcs = %w[sizes.c]
$distcleanfiles.concat($srcs)
check_sizeof('int_least8_t')
check_sizeof('int_least16_t')
check_sizeof('int_least32_t')
check_sizeof('int_least64_t')
check_sizeof('int_fast8_t')
check_sizeof('int_fast16_t')
check_sizeof('int_fast32_t')
check_si... |
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/logging-2.1.0/test/appenders/test_file.rb | <reponame>arnab0073/idea
# encoding: UTF-8
require File.expand_path('../setup', File.dirname(__FILE__))
module TestLogging
module TestAppenders
class TestFile < Test::Unit::TestCase
include LoggingTestCase
NAME = 'logfile'
def setup
super
Logging.init
FileUtils.mkdir [File.join(TMP... |
arnab0073/idea | .rvm/src/ruby-2.3.0/test/win32ole/test_ole_methods.rb | <reponame>arnab0073/idea
# frozen_string_literal: false
#
# This is test for [ruby-talk:196897]
#
begin
require 'win32ole'
rescue LoadError
end
require "test/unit"
if defined?(WIN32OLE)
class TestWIN32OLE_FOR_PROPERTYPUTREF < Test::Unit::TestCase
def setup
@obj = WIN32OLE.new('Scripting.Dictionary')
... |
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/ext/tk/lib/tkextlib/blt/ted.rb | <filename>.rvm/src/ruby-1.9.3-p551/ext/tk/lib/tkextlib/blt/ted.rb
#
# tkextlib/blt/ted.rb
#
# *** This is alpha version, because there is no document on BLT. ***
#
# by <NAME> (<EMAIL>)
#
require 'tk'
require 'tkextlib/blt.rb'
module Tk::BLT
module Ted
extend TkCore
TkComm... |
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/ohai-6.18.0/lib/ohai/plugins/openstack.rb | <filename>.rvm/gems/ruby-2.3.0/gems/ohai-6.18.0/lib/ohai/plugins/openstack.rb
#
# Author:: <NAME> (<<EMAIL>>)
# Copyright:: Copyright (c) 2012 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 t... |
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/rubyntlm-0.6.0/lib/net/ntlm/exceptions.rb | module Net
module NTLM
class NtlmError < StandardError; end
class InvalidTargetDataError < NtlmError
attr_reader :data
def initialize(msg, data)
@data = data
super(msg)
end
end
end
end
|
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/fog-1.29.0/lib/fog/openstack/requests/identity/create_ec2_credential.rb | module Fog
module Identity
class OpenStack
class Real
##
# Create an EC2 credential for a user in a tenant. Requires
# administrator credentials.
#
# ==== Parameters
# * user_id<~String>: The id of the user to create an EC2 credential
# for
... |
arnab0073/idea | .rvm/src/ruby-2.3.0/test/rdoc/test_rdoc_stats.rb | # frozen_string_literal: false
require 'rdoc/test_case'
class TestRDocStats < RDoc::TestCase
def setup
super
@s = RDoc::Stats.new @store, 0
@tl = @store.add_file 'file.rb'
@tl.parser = RDoc::Parser::Ruby
end
def test_doc_stats
c = RDoc::CodeObject.new
assert_equal [1, 1], @s.doc_stat... |
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/ext/tk/lib/tkextlib/tcllib/ntext.rb | <gh_stars>1-10
#
# tkextlib/tcllib/ntext.rb
# by <NAME> (<EMAIL>)
#
# * Part of tcllib extension
# * Ntext bindtag
#
require 'tk'
require 'tkextlib/tcllib.rb'
# TkPackage.require('ntext', '0.81')
TkPackage.require('ntext')
module Tk::Tcllib
Ntext = TkBindTag.new_by_name('Ntext')
... |
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/lib/shell/filter.rb | <gh_stars>0
#
# shell/filter.rb -
# $Release Version: 0.7 $
# $Revision: 31641 $
# by <NAME>(<EMAIL>)
#
# --
#
#
#
class Shell
#
# Filter
# A method to require
# each()
#
class Filter
include Enumerable
def initialize(sh)
@shell = sh # parent shell
@input... |
arnab0073/idea | .rvm/src/ruby-2.3.0/tool/id2token.rb | <gh_stars>0
#! /usr/bin/ruby -p
# -*- coding: us-ascii -*-
BEGIN {
require 'optparse'
$:.unshift(File.dirname(__FILE__))
require 'vpath'
vpath = VPath.new
header = nil
opt = OptionParser.new do |o|
vpath.def_options(o)
header = o.order!(ARGV).shift
end or abort opt.opt_s
TOKENS = {}
h = vpat... |
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/ext/tk/sample/demos-en/paned2.rb | # paned2.rb --
#
# This demonstration script creates a toplevel window containing
# a paned window that separates two windows vertically.
#
# based on "Id: paned2.tcl,v 1.1 2002/02/22 14:07:01 dkf Exp"
if defined?($paned2_demo) && $paned2_demo
$paned2_demo.destroy
$paned2_demo = nil
end
$paned2_demo = TkToplevel.... |
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/ext/win32ole/extconf.rb | <reponame>arnab0073/idea
#----------------------------------
# extconf.rb
# $Revision: 31121 $
#----------------------------------
require 'mkmf'
case RUBY_PLATFORM
when /cygwin/
inc = nil
lib = '/usr/lib/w32api'
end
dir_config("win32", inc, lib)
def create_win32ole_makefile
if have_library("ole32") and
h... |
arnab0073/idea | .rvm/src/ruby-2.3.0/test/date/test_date_conv.rb | <gh_stars>1-10
# frozen_string_literal: false
require 'test/unit'
require 'date'
class TestDateConv < Test::Unit::TestCase
def test_to_class
[Time.now, Date.today, DateTime.now].each do |o|
assert_instance_of(Time, o.to_time)
assert_instance_of(Date, o.to_date)
assert_instance_of(DateTime, o.t... |
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/ext/tk/sample/demos-en/paned1.rb | # paned1.rb
#
# This demonstration script creates a toplevel window containing
# a paned window that separates two windows horizontally.
#
# based on "Id: paned1.tcl,v 1.1 2002/02/22 14:07:01 dkf Exp"
if defined?($paned1_demo) && $paned1_demo
$paned1_demo.destroy
$paned1_demo = nil
end
$paned1_demo = TkToplevel.n... |
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/ext/tk/lib/tkextlib/tile/tframe.rb | #
# tframe widget
# by <NAME> (<EMAIL>)
#
require 'tk'
require 'tkextlib/tile.rb'
module Tk
module Tile
class TFrame < Tk::Frame
end
Frame = TFrame
end
end
class Tk::Tile::TFrame < Tk::Frame
include Tk::Tile::TileWidget
if Tk::Tile::USE_TTK_NAMESPACE
TkCommandNa... |
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/ext/-test-/funcall/extconf.rb | require 'mkmf'
create_makefile("-test-/funcall/funcall")
|
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/ext/tk/lib/tk/busy.rb | #
# tk/busy.rb: support 'tk busy' command (Tcl/Tk8.6 or later)
#
require 'tk'
module Tk::Busy
include TkCore
extend TkCore
extend TkItemConfigMethod
end
class << Tk::Busy
def __item_cget_cmd(win)
# maybe need to override
['tk', 'busy', 'cget', win.path]
end
private :__item_cget_cmd
def __item_c... |
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/fog-1.29.0/tests/google/models/compute/backend_service_tests.rb | require 'securerandom'
Shindo.tests("Fog::Compute[:google] | backend service model", ['google']) do
random_string = SecureRandom.hex
model_tests(Fog::Compute[:google].backend_services, {:name => "fog-test-backend-service-#{random_string}",
:health_checks => [@health_check]})
end
|
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/fog-1.29.0/lib/fog/version.rb | <gh_stars>0
module Fog
VERSION = '1.29.0'
end
|
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/ext/tk/lib/tkextlib/tile/treeview.rb | #
# treeview widget
# by <NAME> (<EMAIL>)
#
require 'tk'
require 'tkextlib/tile.rb'
module Tk
module Tile
class Treeview < TkWindow
end
end
end
module Tk::Tile::TreeviewConfig
include TkItemConfigMethod
def __item_configinfo_struct(id)
# maybe need to override
{... |
arnab0073/idea | .rvm/rubies/ruby-2.3.0/lib/ruby/gems/2.3.0/gems/gem-wrappers-1.2.7/test/gem-wrappers/command_test.rb | <reponame>arnab0073/idea<filename>.rvm/rubies/ruby-2.3.0/lib/ruby/gems/2.3.0/gems/gem-wrappers-1.2.7/test/gem-wrappers/command_test.rb
require 'test_helper'
require 'tempfile'
require 'gem-wrappers/command'
require 'gem-wrappers/fakes'
describe WrappersCommand do
subject do
WrappersCommand.new
end
before do... |
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/net-ssh-3.1.1/test/integration/test_id_rsa_keys.rb | require 'common'
require 'fileutils'
require 'tmpdir'
require 'net/ssh'
# see Vagrantfile,playbook for env.
# we're running as net_ssh_1 user password <PASSWORD>
# and usually connecting to net_ssh_2 user password <PASSWORD>
class TestIDRSAPKeys < Test::Unit::TestCase
include IntegrationTestHelpers
def test_in_f... |
arnab0073/idea | .rvm/rubies/ruby-2.3.0/lib/ruby/gems/2.3.0/gems/rvm-1.11.3.9/lib/rvm/shell/abstract_wrapper.rb | require 'yaml'
module RVM
module Shell
# Provides the most common functionality expected of a shell wrapper.
# Namely, implements general utility methods and tools to extract output
# from a given command but doesn't actually run any commands itself,
# leaving that up to concrete implementations.
... |
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/benchmark/bm_app_strconcat.rb | i=0
while i<2_000_000
"#{1+1} #{1+1} #{1+1}"
i+=1
end
|
arnab0073/idea | .rvm/src/ruby-2.3.0/test/test_unicode_normalize.rb | # coding: utf-8
# frozen_string_literal: false
# Copyright <NAME> (野島 歩) and <NAME> (<EMAIL>)
require 'test/unit'
require 'unicode_normalize/normalize'
class TestUnicodeNormalize < Test::Unit::TestCase
UNICODE_VERSION = UnicodeNormalize::UNICODE_VERSION
NormTest = Struct.new :source, :NFC, :NFD, :NFKC, :NFKD, ... |
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/knife-windows-1.4.1/spec/unit/knife/windows_listener_create_spec.rb | #
# Author:: <NAME> <<EMAIL>>
# Copyright:: Copyright (c) 2014-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 License at
#
# http://... |
arnab0073/idea | .rvm/src/ruby-2.3.0/test/rdoc/test_rdoc_class_module.rb | # frozen_string_literal: false
require File.expand_path '../xref_test_case', __FILE__
class TestRDocClassModule < XrefTestCase
def test_add_comment
tl1 = @store.add_file 'one.rb'
tl2 = @store.add_file 'two.rb'
tl3 = @store.add_file 'three.rb'
cm = RDoc::ClassModule.new 'Klass'
cm.add_comment '#... |
arnab0073/idea | .rvm/rubies/ruby-2.3.0/lib/ruby/gems/2.3.0/gems/rvm-1.11.3.9/lib/rvm/shell/result.rb | module RVM
module Shell
# Represents the output of a shell command.
# This includes the exit status (and the helpful #successful? method)
# as well accessors for the command and stdout / stderr.
class Result
attr_reader :command, :stdout, :stderr, :raw_status
# Creates a new result objec... |
arnab0073/idea | .rvm/src/ruby-2.3.0/test/psych/test_merge_keys.rb | <reponame>arnab0073/idea<filename>.rvm/src/ruby-2.3.0/test/psych/test_merge_keys.rb<gh_stars>10-100
# frozen_string_literal: false
require_relative 'helper'
module Psych
class TestMergeKeys < TestCase
class Product
attr_reader :bar
end
def test_merge_key_with_bare_hash
doc = Psych.load <<-eo... |
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/ext/-test-/bug-3662/extconf.rb | create_makefile("-test-/bug-3662/bug")
|
arnab0073/idea | .rvm/src/ruby-2.3.0/test/rdoc/test_rdoc_markup_attributes.rb | # frozen_string_literal: false
require 'rdoc/test_case'
class TestRDocMarkupAttributes < RDoc::TestCase
def setup
super
@as = RDoc::Markup::Attributes.new
end
def test_bitmap_for
assert_equal 2, @as.bitmap_for('two')
assert_equal 2, @as.bitmap_for('two')
assert_equal 4, @as.bitmap_for('thr... |
arnab0073/idea | .rvm/src/ruby-2.3.0/lib/rdoc/parser/text.rb | <filename>.rvm/src/ruby-2.3.0/lib/rdoc/parser/text.rb<gh_stars>10-100
# frozen_string_literal: false
##
# Indicates this parser is text and doesn't contain code constructs.
#
# Include this module in a RDoc::Parser subclass to make it show up as a file,
# not as part of a class or module.
#--
# This is not named File t... |
arnab0073/idea | .rvm/rubies/ruby-2.3.0/lib/ruby/gems/2.3.0/gems/rvm-1.11.3.9/lib/rvm/environment/sets.rb | <reponame>arnab0073/idea
module RVM
class Environment
# Passed either something containing ruby code or
# a path to a ruby file, will attempt to exectute
# it in the current environment.
def ruby(runnable, options = {})
if runnable.respond_to?(:path)
# Call the path
ruby_run run... |
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/ext/date/lib/date/format.rb | <gh_stars>100-1000
# format.rb: Written by <NAME> 1999-2011
|
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/net-ssh-multi-1.2.0/lib/net/ssh/multi/subsession.rb | require 'net/ssh/multi/session_actions'
module Net; module SSH; module Multi
# A trivial class for representing a subset of servers. It is used
# internally for restricting operations to a subset of all defined
# servers.
#
# subsession = session.with(:app)
# subsession.exec("hostname")
class Subses... |
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/yajl-ruby-1.2.1/lib/yajl/http_stream.rb | puts "DEPRECATION WARNING: Yajl::HttpStream is going to be removed in 2.0"
require 'socket'
require 'yajl'
require 'yajl/version' unless defined? Yajl::VERSION
require 'uri'
module Yajl
# This module is for making HTTP requests to which the response bodies (and possibly requests in the near future)
# are streamed... |
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/net-ssh-2.6.8/test/authentication/methods/test_password.rb | <filename>.rvm/gems/ruby-2.3.0/gems/net-ssh-2.6.8/test/authentication/methods/test_password.rb
require 'common'
require 'net/ssh/authentication/methods/password'
require 'authentication/methods/common'
module Authentication; module Methods
class TestPassword < Test::Unit::TestCase
include Common
def test_a... |
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/logging-2.1.0/test/setup.rb | <reponame>arnab0073/idea<gh_stars>1-10
# Equivalent to a header guard in C/C++
# Used to prevent the class/module from being loaded more than once
unless defined? LOGGING_TEST_SETUP
LOGGING_TEST_SETUP = true
require "rubygems"
require "test/unit"
if Test::Unit::TestCase.respond_to? :test_order=
Test::Unit::TestCase... |
arnab0073/idea | .rvm/src/ruby-2.3.0/test/rinda/test_rinda.rb | <reponame>arnab0073/idea
# frozen_string_literal: false
require 'test/unit'
require 'drb/drb'
require 'drb/eq'
require 'rinda/ring'
require 'rinda/tuplespace'
require 'timeout'
require 'singleton'
module Rinda
class MockClock
include Singleton
class MyTS < Rinda::TupleSpace
def keeper_thread
nil
e... |
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/ext/tk/lib/tkextlib/iwidgets/promptdialog.rb | <reponame>arnab0073/idea<filename>.rvm/src/ruby-1.9.3-p551/ext/tk/lib/tkextlib/iwidgets/promptdialog.rb
#
# tkextlib/iwidgets/promptdialog.rb
# by <NAME> (<EMAIL>)
#
require 'tk'
require 'tkextlib/iwidgets.rb'
module Tk
module Iwidgets
class Promptdialog < Tk::Iwidgets::Dialog
... |
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/coderay-1.1.1/lib/coderay/encoders/encoder.rb | module CodeRay
module Encoders
# = Encoder
#
# The Encoder base class. Together with Scanner and
# Tokens, it forms the highlighting triad.
#
# Encoder instances take a Tokens object and do something with it.
#
# The most common Encoder is surely the HTML encoder
# (CodeRay::E... |
arnab0073/idea | .rvm/src/ruby-2.3.0/gems/did_you_mean-1.0.0/test/spell_checker_test.rb | require 'test_helper'
class SpellCheckerTest < Minitest::Test
SpellChecker = Struct.new(:input, :words) do
include DidYouMean::SpellCheckable
def candidates
{ input => words }
end
end
def test_spell_checker_corrects_mistypes
assert_spell 'foo', input: 'doo', dictionary: ['foo', 'fork'... |
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/ext/tk/lib/tkextlib/tkimg/pixmap.rb | #
# TkImg - format 'pixmap'
# by <NAME> (<EMAIL>)
#
require 'tk'
# call setup script for general 'tkextlib' libraries
require 'tkextlib/setup.rb'
# call setup script
require 'tkextlib/tkimg/setup.rb'
# TkPackage.require('img::pixmap', '1.3')
TkPackage.require('img::pixmap')
module Tk
... |
arnab0073/idea | .rvm/src/ruby-2.3.0/ext/psych/lib/psych/json/yaml_events.rb | <filename>.rvm/src/ruby-2.3.0/ext/psych/lib/psych/json/yaml_events.rb
# frozen_string_literal: false
module Psych
module JSON
module YAMLEvents # :nodoc:
def start_document version, tag_directives, implicit
super(version, tag_directives, !streaming?)
end
def end_document implicit_end = ... |
arnab0073/idea | .rvm/src/ruby-2.3.0/lib/rdoc/ri/formatter.rb | # frozen_string_literal: false
##
# For RubyGems backwards compatibility
module RDoc::RI::Formatter # :nodoc:
end
|
arnab0073/idea | .rvm/src/ruby-2.3.0/ext/tk/sample/demos-en/puzzle.rb | <gh_stars>0
# frozen_string_literal: false
# puzzle.rb
#
# This demonstration script creates a 15-puzzle game using a collection
# of buttons.
#
# widet demo 'puzzle' (called by 'widget')
#
# toplevel widget
if defined?($puzzle_demo) && $puzzle_demo
$puzzle_demo.destroy
$puzzle_demo = nil
end
# demo toplevel widg... |
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/ext/tk/sample/demos-en/entry1.rb | #
# entry (no scrollbars) widget demo (called by 'widget')
#
# toplevel widget
if defined?($entry1_demo) && $entry1_demo
$entry1_demo.destroy
$entry1_demo = nil
end
# demo toplevel widget
$entry1_demo = TkToplevel.new {|w|
title("Entry Demonstration (no scrollbars)")
iconname("entry1")
positionWindow(w)
}
... |
arnab0073/idea | .rvm/src/ruby-2.3.0/ext/thread/extconf.rb | <reponame>arnab0073/idea
# frozen_string_literal: false
require 'mkmf'
create_makefile('thread')
|
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/winrm-1.8.1/lib/winrm/exceptions/exceptions.rb | <filename>.rvm/gems/ruby-2.3.0/gems/winrm-1.8.1/lib/winrm/exceptions/exceptions.rb
# encoding: UTF-8
#
# Copyright 2010 <NAME> <<EMAIL>>
#
# 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
#
# ... |
arnab0073/idea | .rvm/src/ruby-2.3.0/test/cgi/test_cgi_util.rb | # frozen_string_literal: false
require 'test/unit'
require 'cgi'
require 'stringio'
require_relative 'update_env'
class CGIUtilTest < Test::Unit::TestCase
include CGI::Util
include UpdateEnv
def setup
@environ = {}
update_env(
'REQUEST_METHOD' => 'GET',
'SCRIPT_NAME' => nil,
)
@str1... |
arnab0073/idea | .rvm/src/ruby-2.3.0/test/psych/test_json_tree.rb | # frozen_string_literal: false
require_relative 'helper'
module Psych
class TestJSONTree < TestCase
def test_string
assert_match(/"foo"/, Psych.to_json("foo"))
end
def test_symbol
assert_match(/"foo"/, Psych.to_json(:foo))
end
def test_nil
assert_match(/^null/, Psych.to_json(n... |
arnab0073/idea | .rvm/src/ruby-2.3.0/test/rdoc/test_rdoc_markup_to_table_of_contents.rb | # frozen_string_literal: false
require 'rdoc/test_case'
class TestRDocMarkupToTableOfContents < RDoc::Markup::FormatterTestCase
add_visitor_tests
def setup
super
@to = RDoc::Markup::ToTableOfContents.new
end
def end_accepting
assert_equal %w[hi], @to.res
end
def empty
assert_empty @to.... |
arnab0073/idea | .rvm/src/ruby-2.3.0/test/rubygems/test_gem_commands_which_command.rb | # frozen_string_literal: false
require 'rubygems/test_case'
require 'rubygems/commands/which_command'
class TestGemCommandsWhichCommand < Gem::TestCase
def setup
super
Gem::Specification.reset
@cmd = Gem::Commands::WhichCommand.new
end
def test_execute
util_foo_bar
@cmd.handle_options %w[f... |
arnab0073/idea | .rvm/src/ruby-2.3.0/test/coverage/test_coverage.rb | # frozen_string_literal: false
require "test/unit"
require "coverage"
require "tmpdir"
class TestCoverage < Test::Unit::TestCase
def test_result_without_start
assert_raise(RuntimeError) {Coverage.result}
end
def test_peek_result_without_start
assert_raise(RuntimeError) {Coverage.peek_result}
end
de... |
arnab0073/idea | .rvm/rubies/ruby-2.3.0/lib/ruby/gems/2.3.0/gems/gem-wrappers-1.2.7/test/gem-wrappers_test.rb | <filename>.rvm/rubies/ruby-2.3.0/lib/ruby/gems/2.3.0/gems/gem-wrappers-1.2.7/test/gem-wrappers_test.rb
require 'test_helper'
require 'tempfile'
require 'gem-wrappers'
require 'gem-wrappers/fakes'
describe GemWrappers do
subject do
GemWrappers
end
describe "fake" do
before do
@fake_installer = G... |
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/test/json/test_json_generate.rb | #!/usr/bin/env ruby
# -*- coding: utf-8 -*-
require 'test/unit'
require File.join(File.dirname(__FILE__), 'setup_variant')
class TC_JSONGenerate < Test::Unit::TestCase
include JSON
def setup
@hash = {
'a' => 2,
'b' => 3.141,
'c' => 'c',
'd' => [ 1, "b", 3.14 ],
'e' => { 'foo' =>... |
arnab0073/idea | .rvm/src/ruby-2.3.0/ext/psych/lib/psych/versions.rb | # frozen_string_literal: false
module Psych
DEFAULT_SNAKEYAML_VERSION = '1.14'.freeze
end
|
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/ext/tk/sample/tkextlib/blt/plot1.rb | <gh_stars>10-100
#!/usr/bin/env ruby
require 'tk'
require 'tkextlib/blt'
graph = Tk::BLT::Graph.new.pack
plot = Tk::BLT::PlotComponent::Element.new(graph, :linewidth=>0, :label=>'foo')
plot.data([[1.0, 3.4], [1.1, 2.8], [1.2, 3.1], [1.4, 2.9]].flatten)
Tk.mainloop
|
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/ext/tk/sample/tkextlib/treectrl/outlook-newgroup.rb | #
# Demo: Outlook Express newsgroup messages
#
def demoOutlookNewsgroup(t)
init_pics('outlook-*')
height = t.font.metrics(:linespace)
height = 18 if height < 18
t.configure(:itemheight=>height, :selectmode=>:browse, :showlines=>false,
:showroot=>false, :showrootbutton=>false, :showbuttons=>true)
... |
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/fog-1.29.0/lib/fog/cloudstack/requests/compute/associate_ip_address.rb | <gh_stars>1-10
module Fog
module Compute
class Cloudstack
class Real
# Acquires and associates a public IP to an account.
#
# {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/associateIpAddress.html]
def associate_ip_address(*args)
... |
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/test/scanf/test_scanfio.rb | <reponame>arnab0073/idea
# $Id: test_scanfio.rb 25426 2009-10-21 03:44:56Z nobu $
#
# scanf for Ruby
#
# Ad hoc tests of IO#scanf (needs to be expanded)
require "scanf"
class TestScanfIO < Test::Unit::TestCase
def test_io
fh = File.new(File.join(File.dirname(__FILE__), "data.txt"), "r")
assert_equal(0, fh.... |
arnab0073/idea | .rvm/src/ruby-2.3.0/tool/parse.rb | $file = ARGV[0]
$str = ARGF.read.sub(/^__END__.*\z/m, '')
puts '# ' + '-' * 70
puts "# target program: "
puts '# ' + '-' * 70
puts $str
puts '# ' + '-' * 70
$parsed = RubyVM::InstructionSequence.compile_file($file)
puts "# disasm result: "
puts '# ' + '-' * 70
puts $parsed.disasm
puts '# ' + '-' * 70
|
arnab0073/idea | .rvm/src/ruby-2.3.0/ext/fiddle/lib/fiddle/function.rb | <filename>.rvm/src/ruby-2.3.0/ext/fiddle/lib/fiddle/function.rb
# frozen_string_literal: false
module Fiddle
class Function
# The ABI of the Function.
attr_reader :abi
# The address of this function
attr_reader :ptr
# The name of this function
attr_reader :name
# The integer memory loca... |
arnab0073/idea | .rvm/src/ruby-2.3.0/ext/tk/lib/tkextlib/itk/incr_tk.rb | <reponame>arnab0073/idea
# frozen_string_literal: false
#
# tkextlib/itk/incr_tk.rb
# by <NAME> (<EMAIL>)
#
require 'tk'
require 'tk/menuspec'
require 'tkextlib/itcl.rb'
# call setup script
require 'tkextlib/itk.rb'
#TkPackage.require('Itk', '3.2')
TkPackage.require('Itk')
module Tk
... |
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/ext/io/nonblock/extconf.rb | <gh_stars>10-100
require 'mkmf'
target = "io/nonblock"
hdr = %w"fcntl.h"
if have_macro("O_NONBLOCK", hdr) and
(have_macro("F_GETFL", hdr) or have_macro("F_SETFL", hdr))
create_makefile(target)
end
|
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/knife-ec2-0.12.0/spec/unit/ec2_server_create_spec.rb | <filename>.rvm/gems/ruby-2.3.0/gems/knife-ec2-0.12.0/spec/unit/ec2_server_create_spec.rb
#
# Author:: <NAME> (<<EMAIL>>)
# Copyright:: Copyright (c) 2010 <NAME>
# 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 wi... |
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/fog-1.29.0/lib/fog/openstack/models/orchestration/resource.rb | require 'fog/core/model'
module Fog
module Orchestration
class OpenStack
class Resource < Fog::Model
include Reflectable
identity :id
%w{resource_name description links logical_resource_id resource_status
updated_time required_by resource_status_reason resource_type}.... |
arnab0073/idea | .rvm/rubies/ruby-2.3.0/lib/ruby/gems/2.3.0/gems/rvm-1.11.3.9/lib/rvm/environment/cleanup.rb | <filename>.rvm/rubies/ruby-2.3.0/lib/ruby/gems/2.3.0/gems/rvm-1.11.3.9/lib/rvm/environment/cleanup.rb
module RVM
class Environment
# Batch define common operations.
%w(all archives repos sources logs).each do |cleanup_type|
define_method(:"cleanup_#{cleanup_type}") do
rvm(:cleanup, cleanup_type... |
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/ext/tk/sample/tkextlib/tktable/spreadsheet.rb | #!/usr/bin/env ruby
##
## spreadsheet.rb
##
## This demos shows how you can simulate a 3D table
## and has other basic features to begin a basic spreadsheet
##
## ( based on 'spreadsheet.tcl' included source archive of tktable extension )
##
require 'tk'
require 'tkextlib/tktable'
rows = 10
cols = 10
cur_var = TkVaria... |
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/mixlib-log-1.6.0/mixlib-log.gemspec | <filename>.rvm/gems/ruby-2.3.0/gems/mixlib-log-1.6.0/mixlib-log.gemspec
$:.unshift File.expand_path('../lib', __FILE__)
require 'mixlib/log/version'
Gem::Specification.new do |gem|
gem.name = "mixlib-log"
gem.version = Mixlib::Log::VERSION
gem.platform = Gem::Platform::RUBY
gem.summary = "A gem that provides a... |
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/ext/tk/lib/remote-tk.rb | #
# remote-tk.rb - supports to control remote Tk interpreters
# by <NAME> <<EMAIL>>
if defined? MultiTkIp
fail RuntimeError, "'remote-tk' library must be required before requiring 'multi-tk'"
end
class MultiTkIp; end
class RemoteTkIp < MultiTkIp; end
class MultiTkIp
@@IP_TABLE... |
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/fog-1.29.0/lib/fog/openstack/models/orchestration/templates.rb | require 'fog/openstack/models/orchestration/template'
module Fog
module Orchestration
class OpenStack
class Templates < Fog::Collection
model Fog::Orchestration::OpenStack::Template
def get(obj)
data = if obj.is_a?(Stack)
service.get_stack_template(obj).body
... |
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/ext/tk/lib/tkextlib/bwidget/entry.rb | #
# tkextlib/bwidget/entry.rb
# by <NAME> (<EMAIL>)
#
require 'tk'
require 'tk/entry'
require 'tkextlib/bwidget.rb'
module Tk
module BWidget
class Entry < Tk::Entry
end
end
end
class Tk::BWidget::Entry
include Scrollable
TkCommandNames = ['Entry'.freeze].freeze
Widge... |
arnab0073/idea | .rvm/src/ruby-2.3.0/lib/xmlrpc/utils.rb | <gh_stars>0
# frozen_string_literal: false
#
# Copyright (C) 2001, 2002, 2003 by <NAME> (<EMAIL>)
#
# $Id: utils.rb 53141 2015-12-16 05:07:31Z naruse $
#
module XMLRPC # :nodoc:
# This module enables a user-class to be marshalled
# by XML-RPC for Ruby into a Hash, with one additional
# key/value pair <code>___c... |
arnab0073/idea | .rvm/src/ruby-2.3.0/test/rdoc/test_rdoc_parser_rd.rb | <gh_stars>10-100
# frozen_string_literal: false
require 'rdoc/test_case'
class TestRDocParserRd < RDoc::TestCase
def setup
super
@RP = RDoc::Parser
@tempfile = Tempfile.new self.class.name
filename = @tempfile.path
@top_level = @store.add_file filename
@fn = filename
@options = RDoc::... |
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/ext/tk/lib/tkextlib/iwidgets/toolbar.rb | <filename>.rvm/src/ruby-1.9.3-p551/ext/tk/lib/tkextlib/iwidgets/toolbar.rb
#
# tkextlib/iwidgets/toolbar.rb
# by <NAME> (<EMAIL>)
#
require 'tk'
require 'tkextlib/iwidgets.rb'
module Tk
module Iwidgets
class Toolbar < Tk::Itk::Widget
end
end
end
class Tk::Iwidgets::Toolbar
... |
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/ohai-6.18.0/lib/ohai/plugins/java.rb | <filename>.rvm/gems/ruby-2.3.0/gems/ohai-6.18.0/lib/ohai/plugins/java.rb
#
# Author:: <NAME> (<<EMAIL>>)
# Copyright:: Copyright (c) 2009 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 Li... |
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/ext/tk/lib/tkextlib/blt/cutbuffer.rb | <filename>.rvm/src/ruby-1.9.3-p551/ext/tk/lib/tkextlib/blt/cutbuffer.rb
#
# tkextlib/blt/cutbuffer.rb
# by <NAME> (<EMAIL>)
#
require 'tk'
require 'tkextlib/blt.rb'
module Tk::BLT
module CutBuffer
TkCommandNames = ['::blt::cutbuffer'.freeze].freeze
def self.get(num = 0)
... |
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/ohai-6.18.0/lib/ohai/plugins/openbsd/memory.rb | #
# Author:: <NAME> <<EMAIL>>
# Copyright:: Copyright (c) 2009 <NAME>
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lic... |
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/ext/tk/sample/demos-en/arrow.rb | <gh_stars>1-10
# arrow.rb
#
# This demonstration script creates a canvas widget that displays a
# large line with an arrowhead whose shape can be edited interactively.
#
# arrowhead widget demo (called by 'widget')
#
# arrowSetup --
# This method regenerates all the text and graphics in the canvas
# window. It's call... |
arnab0073/idea | .rvm/src/ruby-2.3.0/test/optparse/test_placearg.rb | <reponame>arnab0073/idea
# frozen_string_literal: false
require_relative 'test_optparse'
class TestOptionParser::PlaceArg < TestOptionParser
def setup
super
@opt.def_option("-x [VAL]") {|x| @flag = x}
@opt.def_option("--option [VAL]") {|x| @flag = x}
@opt.def_option("-T [level]", /^[0-4]$/, Integer) ... |
arnab0073/idea | .rvm/src/ruby-2.3.0/test/psych/test_hash.rb | <filename>.rvm/src/ruby-2.3.0/test/psych/test_hash.rb
# frozen_string_literal: false
require_relative 'helper'
module Psych
class TestHash < TestCase
class X < Hash
end
class HashWithCustomInit < Hash
attr_reader :obj
def initialize(obj)
@obj = obj
end
end
class HashWi... |
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/rest-client-1.6.9/spec/base.rb | <reponame>arnab0073/idea
def is_ruby_19?
RUBY_VERSION > '1.9'
end
require 'rubygems'
begin
require "ruby-debug"
rescue LoadError
# NOP, ignore
end
require File.dirname(__FILE__) + '/../lib/restclient'
|
arnab0073/idea | .rvm/gems/ruby-2.3.0/gems/ohai-6.18.0/lib/ohai/plugins/solaris2/cpu.rb | <filename>.rvm/gems/ruby-2.3.0/gems/ohai-6.18.0/lib/ohai/plugins/solaris2/cpu.rb
#$ psrinfo -v
#Status of virtual processor 0 as of: 01/11/2009 23:31:55
# on-line since 05/29/2008 15:05:28.
# The i386 processor operates at 2660 MHz,
# and has an i387 compatible floating point processor.
#Status of virtual proc... |
arnab0073/idea | .rvm/rubies/ruby-2.3.0/lib/ruby/gems/2.3.0/gems/rvm-1.11.3.9/lib/rvm/environment.rb | require 'forwardable'
module RVM
# Implements the actual wrapper around the api. For more information
# about this design, see the RVM module.
class Environment
extend Forwardable
%w(configuration utility alias list gemset rubies cleanup sets env tools info wrapper).each do |key|
require File.join... |
arnab0073/idea | .rvm/src/ruby-1.9.3-p551/ext/tk/lib/tk/grid.rb | #
# tk/grid.rb : control grid geometry manager
#
require 'tk'
module TkGrid
include Tk
extend Tk
TkCommandNames = ['grid'.freeze].freeze
def anchor(master, anchor=None)
# master = master.epath if master.kind_of?(TkObject)
master = _epath(master)
tk_call_without_enc('grid', 'anchor', master, ancho... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.