source
stringclasses
1 value
repo
stringlengths
5
63
repo_url
stringlengths
24
82
path
stringlengths
5
167
language
stringclasses
1 value
license
stringclasses
5 values
stars
int64
10
51.4k
ref
stringclasses
23 values
size_bytes
int64
200
258k
text
stringlengths
137
258k
github
devxoul/Carte
https://github.com/devxoul/Carte
Sources/Carte/ruby/2.6.0/gems/colored2-3.1.2/spec/colored2/object_spec.rb
Ruby
mit
186
master
565
require File.expand_path('spec/spec_helper') require 'colored2/object' subject1 = red('hello') subject2 = red('blue').on.blue subject3 = on.yellow('on yellow') RSpec.describe Object do describe 'with foreground and background colors' do it 'should work with one color' do expect(subject1).to eql('hello'.r...
github
devxoul/Carte
https://github.com/devxoul/Carte
Sources/Carte/ruby/2.6.0/gems/colored2-3.1.2/spec/colored2/strings_spec.rb
Ruby
mit
186
master
2,617
require File.expand_path('spec/spec_helper') require 'colored2/strings' RSpec.describe String do before do Colored2.decorate(String) end describe 'with foreground and background colors' do it 'should work with one color' do expect('red'.red).to eql("\e[31mred\e[0m") end it 'should add two...
github
devxoul/Carte
https://github.com/devxoul/Carte
Sources/Carte/ruby/2.6.0/gems/colored2-3.1.2/spec/colored2/numbers_spec.rb
Ruby
mit
186
master
702
require File.expand_path('spec/spec_helper') require 'colored2/numbers' require 'colored2/strings' RSpec.describe Colored2.integer_class do describe 'with foreground and background colors' do it 'should work with one color' do expect(32.red).to eql('32'.red) end it 'should insert escape sequences' ...
github
devxoul/Carte
https://github.com/devxoul/Carte
Sources/Carte/ruby/2.6.0/gems/colored2-3.1.2/lib/colored2.rb
Ruby
mit
186
master
2,536
require 'colored2/codes' require 'colored2/ascii_decorator' module Colored2 def self.decorate(a_class) a_class.send(:include, Colored2) end def self.included(from_class) from_class.class_eval do def surround_with_color(color: nil, effect: nil, color_self: nil, string: nil, &block) color_t...
github
devxoul/Carte
https://github.com/devxoul/Carte
Sources/Carte/ruby/2.6.0/gems/colored2-3.1.2/lib/colored2/codes.rb
Ruby
mit
186
master
1,057
module Colored2 COLORS = { black: 30, red: 31, green: 32, yellow: 33, blue: 34, magenta: 35, cyan: 36, white: 37 } EFFECTS = { no_color: 0, bold: 1, dark: 2, italic: 3, underlined: 4, reversed: 7, p...
github
devxoul/Carte
https://github.com/devxoul/Carte
Sources/Carte/ruby/2.6.0/gems/colored2-3.1.2/lib/colored2/numbers.rb
Ruby
mit
186
master
323
require 'colored2' unless defined?(Colored2) && Colored2.respond_to?(:decorate) module Colored2 def self.integer_class major, minor = RUBY_VERSION.split(/\./).map(&:to_i) major >= 2 && minor >= 4 ? Integer : Kernel.const_get(:Fixnum) end end Colored2.decorate(Colored2.integer_class) Colored2.decorate(Floa...
github
devxoul/Carte
https://github.com/devxoul/Carte
Sources/Carte/ruby/2.6.0/gems/colored2-3.1.2/lib/colored2/ascii_decorator.rb
Ruby
mit
186
master
2,136
require 'colored2/codes' require 'forwardable' module Colored2 def self.enable! Colored2::AsciiDecorator.enable! end def self.disable! Colored2::AsciiDecorator.disable! end def self.background_next! Colored2::AsciiDecorator.background_next! end def self.foreground_next! Colored2::AsciiDec...
github
devxoul/Carte
https://github.com/devxoul/Carte
Sources/Carte/ruby/2.3.0/specifications/CFPropertyList-3.0.0.gemspec
Ruby
mit
186
master
1,284
# -*- encoding: utf-8 -*- # stub: CFPropertyList 3.0.0 ruby lib Gem::Specification.new do |s| s.name = "CFPropertyList".freeze s.version = "3.0.0" s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version= s.require_paths = ["lib".freeze] s.authors = ["Chr...
github
devxoul/Carte
https://github.com/devxoul/Carte
Sources/Carte/ruby/2.3.0/specifications/atomos-0.1.3.gemspec
Ruby
mit
186
master
1,624
# -*- encoding: utf-8 -*- # stub: atomos 0.1.3 ruby lib Gem::Specification.new do |s| s.name = "atomos".freeze s.version = "0.1.3" s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version= s.require_paths = ["lib".freeze] s.authors = ["Samuel Giddins".fre...
github
devxoul/Carte
https://github.com/devxoul/Carte
Sources/Carte/ruby/2.3.0/specifications/claide-1.0.2.gemspec
Ruby
mit
186
master
644
# -*- encoding: utf-8 -*- # stub: claide 1.0.2 ruby lib Gem::Specification.new do |s| s.name = "claide" s.version = "1.0.2" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.require_paths = ["lib"] s.authors = ["Eloy Duran", "Fabio Pelosin"] s.date =...
github
devxoul/Carte
https://github.com/devxoul/Carte
Sources/Carte/ruby/2.3.0/specifications/CFPropertyList-2.3.5.gemspec
Ruby
mit
186
master
1,169
# -*- encoding: utf-8 -*- # stub: CFPropertyList 2.3.5 ruby lib Gem::Specification.new do |s| s.name = "CFPropertyList" s.version = "2.3.5" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.require_paths = ["lib"] s.authors = ["Christian Kruse"] s.da...
github
devxoul/Carte
https://github.com/devxoul/Carte
Sources/Carte/ruby/2.3.0/specifications/colored2-3.1.2.gemspec
Ruby
mit
186
master
2,236
# -*- encoding: utf-8 -*- # stub: colored2 3.1.2 ruby lib Gem::Specification.new do |s| s.name = "colored2" s.version = "3.1.2" s.required_rubygems_version = Gem::Requirement.new(">= 1.3.6") if s.respond_to? :required_rubygems_version= s.require_paths = ["lib"] s.authors = ["Chris Wanstrath", "Konstantin Gr...
github
devxoul/Carte
https://github.com/devxoul/Carte
Sources/Carte/ruby/2.3.0/specifications/nanaimo-0.2.6.gemspec
Ruby
mit
186
master
1,458
# -*- encoding: utf-8 -*- # stub: nanaimo 0.2.6 ruby lib Gem::Specification.new do |s| s.name = "nanaimo".freeze s.version = "0.2.6" s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version= s.require_paths = ["lib".freeze] s.authors = ["Danielle Tomlinso...
github
devxoul/Carte
https://github.com/devxoul/Carte
Sources/Carte/ruby/2.3.0/specifications/xcodeproj-1.5.2.gemspec
Ruby
mit
186
master
1,826
# -*- encoding: utf-8 -*- # stub: xcodeproj 1.5.2 ruby lib Gem::Specification.new do |s| s.name = "xcodeproj" s.version = "1.5.2" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.require_paths = ["lib"] s.authors = ["Eloy Duran"] s.date = "2017-09-2...
github
devxoul/Carte
https://github.com/devxoul/Carte
Sources/Carte/ruby/2.3.0/specifications/nanaimo-0.2.3.gemspec
Ruby
mit
186
master
1,311
# -*- encoding: utf-8 -*- # stub: nanaimo 0.2.3 ruby lib Gem::Specification.new do |s| s.name = "nanaimo" s.version = "0.2.3" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.require_paths = ["lib"] s.authors = ["Danielle Tomlinson", "Samuel Giddins"]...
github
devxoul/Carte
https://github.com/devxoul/Carte
Sources/Carte/ruby/2.3.0/specifications/xcodeproj-1.8.2.gemspec
Ruby
mit
186
master
2,202
# -*- encoding: utf-8 -*- # stub: xcodeproj 1.8.2 ruby lib Gem::Specification.new do |s| s.name = "xcodeproj".freeze s.version = "1.8.2" s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version= s.require_paths = ["lib".freeze] s.authors = ["Eloy Duran".f...
github
devxoul/Carte
https://github.com/devxoul/Carte
Sources/Carte/ruby/2.3.0/gems/CFPropertyList-2.3.5/lib/cfpropertylist/rbBinaryCFPropertyList.rb
Ruby
mit
186
master
18,770
# -*- coding: utf-8 -*- require 'stringio' module CFPropertyList # Binary PList parser class class Binary # Read a binary plist file def load(opts) @unique_table = {} @count_objects = 0 @object_refs = 0 @written_object_count = 0 @object_table = [] @object_ref_size = 0 ...
github
devxoul/Carte
https://github.com/devxoul/Carte
Sources/Carte/ruby/2.3.0/gems/CFPropertyList-2.3.5/lib/cfpropertylist/rbCFPropertyList.rb
Ruby
mit
186
master
13,942
# -*- coding: utf-8 -*- require 'kconv' require 'date' require 'time' # # CFPropertyList implementation # # class to read, manipulate and write both XML and binary property list # files (plist(5)) as defined by Apple. Have a look at CFPropertyList::List # for more documentation. # # == Example # require 'cfproperty...
github
devxoul/Carte
https://github.com/devxoul/Carte
Sources/Carte/ruby/2.3.0/gems/nanaimo-0.2.3/nanaimo.gemspec
Ruby
mit
186
master
953
# coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'nanaimo/version' Gem::Specification.new do |spec| spec.name = 'nanaimo' spec.version = Nanaimo::VERSION spec.authors = ['Danielle Tomlinson', 'Samuel Giddins'] spec.e...
github
devxoul/Carte
https://github.com/devxoul/Carte
Sources/Carte/ruby/2.3.0/gems/nanaimo-0.2.3/Rakefile
Ruby
mit
186
master
1,811
require 'bundler/gem_tasks' require 'rspec/core/rake_task' require 'rubocop/rake_task' RSpec::Core::RakeTask.new(:spec) RuboCop::RakeTask.new task default: [:spec, :rubocop] task :generate_nextstep_mappings do require 'net/http' url = 'http://ftp.unicode.org/Public/MAPPINGS/VENDORS/NEXT/NEXTSTEP.TXT' mappings ...
github
devxoul/Carte
https://github.com/devxoul/Carte
Sources/Carte/ruby/2.3.0/gems/nanaimo-0.2.3/lib/nanaimo.rb
Ruby
mit
186
master
418
require 'nanaimo/version' # A native Ruby implementation of ASCII plist parsing and serialization. # module Nanaimo class Error < StandardError; end DEBUG = !ENV['NANAIMO_DEBUG'].nil? private_constant :DEBUG def self.debug return unless DEBUG warn yield end require 'nanaimo/object' require 'nan...
github
devxoul/Carte
https://github.com/devxoul/Carte
Sources/Carte/ruby/2.3.0/gems/nanaimo-0.2.3/lib/nanaimo/plist.rb
Ruby
mit
186
master
685
module Nanaimo # A Plist. # class Plist # @return [Nanaimo::Object] The root level object in the plist. # attr_accessor :root_object # @return [String] The encoding of the plist. # attr_accessor :file_type def initialize(root_object = nil, file_type = nil) @root_object = root_o...
github
devxoul/Carte
https://github.com/devxoul/Carte
Sources/Carte/ruby/2.3.0/gems/nanaimo-0.2.3/lib/nanaimo/writer.rb
Ruby
mit
186
master
4,826
module Nanaimo # Transforms native ruby objects or Plist objects into their ASCII Plist # string representation. # class Writer autoload :PBXProjWriter, 'nanaimo/writer/pbxproj' autoload :XMLWriter, 'nanaimo/writer/xml' # Raised when attempting to write a plist containing an object of an # unsu...
github
devxoul/Carte
https://github.com/devxoul/Carte
Sources/Carte/ruby/2.3.0/gems/nanaimo-0.2.3/lib/nanaimo/object.rb
Ruby
mit
186
master
1,919
module Nanaimo # An object that belongs to a plist. # class Object # @return The underlying native Ruby value # attr_accessor :value # @return [String] The annotation comment # attr_accessor :annotation def initialize(value, annotation) self.value = value self.annotation ...
github
devxoul/Carte
https://github.com/devxoul/Carte
Sources/Carte/ruby/2.3.0/gems/nanaimo-0.2.3/lib/nanaimo/unicode.rb
Ruby
mit
186
master
3,287
# frozen-string-literal: true require 'nanaimo/unicode/next_step_mapping' require 'nanaimo/unicode/quote_maps' module Nanaimo # @!visibility private # module Unicode class UnsupportedEscapeSequenceError < Error; end class InvalidEscapeSequenceError < Error; end module_function def quotify_string...
github
devxoul/Carte
https://github.com/devxoul/Carte
Sources/Carte/ruby/2.3.0/gems/nanaimo-0.2.3/lib/nanaimo/reader.rb
Ruby
mit
186
master
7,708
# frozen-string-literal: true module Nanaimo # Transforms plist strings into Plist objects. # class Reader autoload :StringScanner, 'strscan' # Raised when attempting to read a plist with an unsupported file format. # class UnsupportedPlistFormatError < Error # @return [Symbol] The unsuppor...
github
devxoul/Carte
https://github.com/devxoul/Carte
Sources/Carte/ruby/2.3.0/gems/nanaimo-0.2.3/lib/nanaimo/writer/xml.rb
Ruby
mit
186
master
3,157
module Nanaimo class Writer # Transforms native ruby objects or Plist objects into their XML Plist # string representation. # class XMLWriter < Writer autoload :Base64, 'base64' autoload :Date, 'date' autoload :DateTime, 'date' def write write_xml_header write_...
github
devxoul/Carte
https://github.com/devxoul/Carte
Sources/Carte/ruby/2.3.0/gems/nanaimo-0.2.3/lib/nanaimo/writer/pbxproj.rb
Ruby
mit
186
master
2,161
module Nanaimo class Writer # Transforms native ruby objects or Plist objects into their ASCII Plist # string representation, formatted as Xcode writes Xcode projects. # class PBXProjWriter < Writer ISA = String.new('isa', '') private_constant :ISA def initialize(*) super ...
github
devxoul/Carte
https://github.com/devxoul/Carte
Sources/Carte/ruby/2.3.0/gems/xcodeproj-1.5.2/lib/xcodeproj/command.rb
Ruby
mit
186
master
1,828
module Xcodeproj require 'colored2' require 'claide' class Command < CLAide::Command require 'xcodeproj/command/config_dump' require 'xcodeproj/command/target_diff' require 'xcodeproj/command/project_diff' require 'xcodeproj/command/show' require 'xcodeproj/command/sort' self.abstract_co...
github
devxoul/Carte
https://github.com/devxoul/Carte
Sources/Carte/ruby/2.3.0/gems/xcodeproj-1.5.2/lib/xcodeproj/constants.rb
Ruby
mit
186
master
16,217
module Xcodeproj # This modules groups all the constants known to Xcodeproj. # module Constants # @return [String] The last known iOS SDK (stable). # LAST_KNOWN_IOS_SDK = '10.3' # @return [String] The last known OS X SDK (stable). # LAST_KNOWN_OSX_SDK = '10.12' # @return [String] The...
github
devxoul/Carte
https://github.com/devxoul/Carte
Sources/Carte/ruby/2.3.0/gems/xcodeproj-1.5.2/lib/xcodeproj/workspace.rb
Ruby
mit
186
master
8,184
require 'fileutils' require 'rexml/document' require 'xcodeproj/workspace/file_reference' require 'xcodeproj/workspace/group_reference' module Xcodeproj # Provides support for generating, reading and serializing Xcode Workspace # documents. # class Workspace # @return [REXML::Document] the parsed XML model...
github
devxoul/Carte
https://github.com/devxoul/Carte
Sources/Carte/ruby/2.3.0/gems/xcodeproj-1.5.2/lib/xcodeproj/scheme.rb
Ruby
mit
186
master
12,113
require 'rexml/document' require 'xcodeproj/scheme/build_action' require 'xcodeproj/scheme/test_action' require 'xcodeproj/scheme/launch_action' require 'xcodeproj/scheme/profile_action' require 'xcodeproj/scheme/analyze_action' require 'xcodeproj/scheme/archive_action' require 'xcodeproj/scheme/buildable_product_run...
github
devxoul/Carte
https://github.com/devxoul/Carte
Sources/Carte/ruby/2.3.0/gems/xcodeproj-1.5.2/lib/xcodeproj/config.rb
Ruby
mit
186
master
10,576
require 'shellwords' require 'xcodeproj/config/other_linker_flags_parser' module Xcodeproj # This class holds the data for a Xcode build settings file (xcconfig) and # provides support for serialization. # class Config require 'set' KEY_VALUE_PATTERN = / ( [^=]+ # Any char, but not...
github
devxoul/Carte
https://github.com/devxoul/Carte
Sources/Carte/ruby/2.3.0/gems/xcodeproj-1.5.2/lib/xcodeproj/project.rb
Ruby
mit
186
master
28,478
require 'fileutils' require 'securerandom' require 'xcodeproj/project/object' require 'xcodeproj/project/project_helper' require 'xcodeproj/project/uuid_generator' require 'xcodeproj/plist' module Xcodeproj # This class represents a Xcode project document. # # It can be used to manipulate existing documents or ...
github
devxoul/Carte
https://github.com/devxoul/Carte
Sources/Carte/ruby/2.3.0/gems/xcodeproj-1.5.2/lib/xcodeproj/project/object.rb
Ruby
mit
186
master
18,046
module Xcodeproj class Project # This is the namespace in which all the classes that wrap the objects in # a Xcode project reside. # # The base class from which all classes inherit is AbstractObject. # # If you need to deal with these classes directly, it's possible to include # this names...
github
devxoul/Carte
https://github.com/devxoul/Carte
Sources/Carte/ruby/2.3.0/gems/xcodeproj-1.5.2/lib/xcodeproj/project/project_helper.rb
Ruby
mit
186
master
11,881
module Xcodeproj class Project module ProjectHelper include Object # @!group Targets #-----------------------------------------------------------------------# # Creates a new target and adds it to the project. # # The target is configured for the given platform and its file ...
github
devxoul/Carte
https://github.com/devxoul/Carte
Sources/Carte/ruby/2.3.0/gems/xcodeproj-1.5.2/lib/xcodeproj/project/object_attributes.rb
Ruby
mit
186
master
18,351
module Xcodeproj class Project module Object # This class represents an attribute of {AbstractObject} subclasses. # Attributes are created by the {AbstractObject} DSL methods and allow to # mirror the underlying attributes of the xcodeproj document model. # # Attributes provide suppo...
github
devxoul/Carte
https://github.com/devxoul/Carte
Sources/Carte/ruby/2.3.0/gems/xcodeproj-1.5.2/lib/xcodeproj/project/uuid_generator.rb
Ruby
mit
186
master
3,571
module Xcodeproj class Project class UUIDGenerator def initialize(project) @project = project @new_objects_by_uuid = {} @paths_by_object = {} end def generate! all_objects = @project.objects generate_paths(@project.root_object) switch_uuids(all_ob...
github
devxoul/Carte
https://github.com/devxoul/Carte
Sources/Carte/ruby/2.3.0/gems/xcodeproj-1.5.2/lib/xcodeproj/project/object/native_target.rb
Ruby
mit
186
master
23,705
module Xcodeproj class Project module Object class AbstractTarget < AbstractObject # @!group Attributes # @return [String] The name of the Target. # attribute :name, String # @return [String] the name of the build product. # attribute :product_name, ...
github
devxoul/Carte
https://github.com/devxoul/Carte
Sources/Carte/ruby/2.3.0/gems/xcodeproj-1.5.2/lib/xcodeproj/project/object/build_phase.rb
Ruby
mit
186
master
9,470
module Xcodeproj class Project module Object # @abstract # # This class is abstract and it doesn't appear in the project document. # class AbstractBuildPhase < AbstractObject # @!group Attributes # @return [ObjectList<PBXBuildFile>] the files processed by this build ...
github
devxoul/Carte
https://github.com/devxoul/Carte
Sources/Carte/ruby/2.3.0/gems/xcodeproj-1.5.2/lib/xcodeproj/project/object/file_reference.rb
Ruby
mit
186
master
10,544
require 'xcodeproj/project/object/helpers/groupable_helper' module Xcodeproj class Project module Object # This class represents a reference to a file in the file system. # class PBXFileReference < AbstractObject # @!group Attributes # @return [String] the name of the reference...
github
devxoul/Carte
https://github.com/devxoul/Carte
Sources/Carte/ruby/2.3.0/gems/xcodeproj-1.5.2/lib/xcodeproj/project/object/build_configuration.rb
Ruby
mit
186
master
7,506
module Xcodeproj class Project module Object # Encapsulates the information a specific build configuration referenced # by a {XCConfigurationList} which in turn might be referenced by a # {PBXProject} or a {PBXNativeTarget}. # class XCBuildConfiguration < AbstractObject # @!g...
github
devxoul/Carte
https://github.com/devxoul/Carte
Sources/Carte/ruby/2.3.0/gems/xcodeproj-1.5.2/lib/xcodeproj/project/object/configuration_list.rb
Ruby
mit
186
master
3,999
module Xcodeproj class Project module Object # The primary purpose of this class is to maintain a collection of # related build configurations of a {PBXProject} or a {PBXNativeTarget}. # class XCConfigurationList < AbstractObject # @!group Attributes # @return [String] whe...
github
devxoul/Carte
https://github.com/devxoul/Carte
Sources/Carte/ruby/2.3.0/gems/xcodeproj-1.5.2/lib/xcodeproj/project/object/helpers/file_references_factory.rb
Ruby
mit
186
master
9,425
require 'xcodeproj/project/object/helpers/groupable_helper' module Xcodeproj class Project module Object class FileReferencesFactory class << self # Creates a new reference with the given path and adds it to the # given group. The reference is configured according to the extensi...
github
devxoul/Carte
https://github.com/devxoul/Carte
Sources/Carte/ruby/2.3.0/gems/xcodeproj-1.5.2/lib/xcodeproj/project/object/helpers/groupable_helper.rb
Ruby
mit
186
master
8,052
module Xcodeproj class Project module Object class GroupableHelper class << self # @param [PBXGroup, PBXFileReference] object # The object to analyze. # # @return [PBXGroup, PBXProject] The parent of the object. # def parent(object...
github
devxoul/Carte
https://github.com/devxoul/Carte
Sources/Carte/ruby/2.3.0/gems/xcodeproj-1.5.2/lib/xcodeproj/scheme/launch_action.rb
Ruby
mit
186
master
4,079
require 'xcodeproj/scheme/abstract_scheme_action' module Xcodeproj class XCScheme # This class wraps the LaunchAction node of a .xcscheme XML file # class LaunchAction < AbstractSchemeAction # @param [REXML::Element] node # The 'LaunchAction' XML node that this object will wrap. ...
github
devxoul/Carte
https://github.com/devxoul/Carte
Sources/Carte/ruby/2.3.0/gems/xcodeproj-1.5.2/lib/xcodeproj/scheme/buildable_reference.rb
Ruby
mit
186
master
4,288
module Xcodeproj class XCScheme # This class wraps the BuildableReference node of a .xcscheme XML file # # A BuildableReference is a reference to a buildable product (which is # typically is synonymous for an Xcode target) # class BuildableReference < XMLElementWrapper # @param [Xcodepro...
github
devxoul/Carte
https://github.com/devxoul/Carte
Sources/Carte/ruby/2.3.0/gems/xcodeproj-1.5.2/lib/xcodeproj/scheme/test_action.rb
Ruby
mit
186
master
8,427
require 'xcodeproj/scheme/abstract_scheme_action' module Xcodeproj class XCScheme # This class wraps the TestAction node of a .xcscheme XML file # class TestAction < AbstractSchemeAction # @param [REXML::Element] node # The 'TestAction' XML node that this object will wrap. # ...
github
devxoul/Carte
https://github.com/devxoul/Carte
Sources/Carte/ruby/2.3.0/gems/xcodeproj-1.5.2/lib/xcodeproj/workspace/group_reference.rb
Ruby
mit
186
master
1,675
module Xcodeproj class Workspace # Describes a group reference of a Workspace. # class GroupReference # @return [String] the name of the group # attr_reader :name # @return [String] the type of reference to the project # # This can be of the following values: # -...
github
devxoul/Carte
https://github.com/devxoul/Carte
Sources/Carte/ruby/2.3.0/gems/xcodeproj-1.5.2/lib/xcodeproj/workspace/file_reference.rb
Ruby
mit
186
master
2,442
module Xcodeproj class Workspace # Describes a file reference of a Workspace. # class FileReference # @return [String] the path to the project # attr_reader :path # @return [String] the type of reference to the project # # This can be of the following values: # -...
github
devxoul/Carte
https://github.com/devxoul/Carte
Tests/CarteTests/test_carte.rb
Ruby
mit
186
master
6,988
require "base64" require "minitest/autorun" require_relative "../../Sources/Carte/carte" include Xcodeproj::Project::Object class Test < Minitest::Test def setup @original_directory = Dir.pwd @fixture_directory = "#{Dir.pwd}/Tests/CarteTests/Fixtures" cleanup_fixtures() prepare_fixture("CarteFixtur...
github
porterhau5/BloodHound-Owned
https://github.com/porterhau5/BloodHound-Owned
bh-owned.rb
Ruby
mit
186
master
22,992
#!/usr/bin/ruby env #Encoding: UTF-8 # Written by: @porterhau5 - 10/22/17 require 'net/http' require 'uri' require 'json' require 'optparse' require 'set' # Recommended to create the following indexes: # CREATE INDEX ON :Group(wave) # CREATE INDEX ON :User(wave) # CREATE INDEX ON :Computer(wave) # CREATE IND...
github
swistak35/orbacle
https://github.com/swistak35/orbacle
orbacle.gemspec
Ruby
mit
186
master
1,431
# coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) Gem::Specification.new do |spec| spec.name = 'orbacle' spec.version = '0.2.1' spec.licenses = ['MIT'] spec.authors = ['Rafał Łasocha'] spec.email = 'orbacle@swi...
github
swistak35/orbacle
https://github.com/swistak35/orbacle
script/collect_results.rb
Ruby
mit
186
master
2,097
# frozen_string_literal: true require 'pathname' require 'json' results_raw_path = ARGV[0] results_path = Pathname.new(results_raw_path) all_stats_files = Dir.glob("#{results_path}/*.stats.json") all_stats = all_stats_files.map {|f| JSON.parse(File.read(f)) } gems_count = all_stats.size gems_which_finished_parsing ...
github
swistak35/orbacle
https://github.com/swistak35/orbacle
script/fetch_most_popular_rubygems_list.rb
Ruby
mit
186
master
901
# frozen_string_literal: true require 'net/http' require 'uri' require 'openssl' require 'nokogiri' require 'json' stats = [] (0...100).each do |page| uri = URI.parse("https://rubygems.org/stats?page=#{page}") http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIF...
github
swistak35/orbacle
https://github.com/swistak35/orbacle
spec/engine_spec.rb
Ruby
mit
186
master
10,315
# frozen_string_literal: true require 'support/test_project' require 'logger' module Orbacle RSpec.describe Engine do let(:logger) { Logger.new(nil) } describe "#get_type_information" do specify do file1 = <<-END foo = x("bar") something(foo) END file2 = <<-END...
github
swistak35/orbacle
https://github.com/swistak35/orbacle
spec/data_flow_graph_methods_spec.rb
Ruby
mit
186
master
20,597
# frozen_string_literal: true require 'spec_helper' require 'ostruct' module Orbacle RSpec.describe "Builder" do describe "visibility" do specify "public by default" do file = <<-END class Foo def bar end end END result = compute_graph(file) ...
github
swistak35/orbacle
https://github.com/swistak35/orbacle
spec/find_definition_under_position_spec.rb
Ruby
mit
186
master
11,003
# frozen_string_literal: true require 'spec_helper' module Orbacle RSpec.describe FindDefinitionUnderPosition do specify "simple case inside class" do file = <<-END class Foo def bar Baz end end END expected_nesting = Nesting .empty .incre...
github
swistak35/orbacle
https://github.com/swistak35/orbacle
spec/define_builtins_spec.rb
Ruby
mit
186
master
11,341
# frozen_string_literal: true require 'spec_helper' require 'logger' module Orbacle RSpec.describe DefineBuiltins do describe "Object" do specify "==" do snippet = <<-END Object.new == Object.new END result = type_snippet(snippet) expect(result).to eq(nominal("Boo...
github
swistak35/orbacle
https://github.com/swistak35/orbacle
spec/spec_helper.rb
Ruby
mit
186
master
449
# frozen_string_literal: true $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) require 'orbacle' require 'pp' require 'timeout' RSpec.configure do |config| config.around(:each) do |example| if ENV["MUTANT_TESTING"] default_timeout = example.metadata[:performance] ? 180 : 1 timeout = exam...
github
swistak35/orbacle
https://github.com/swistak35/orbacle
spec/global_tree_spec.rb
Ruby
mit
186
master
22,967
require 'spec_helper' module Orbacle RSpec.describe GlobalTree do let(:id_generator) { IntegerIdGenerator.new } describe "#add_lambda" do specify "returns result" do state = GlobalTree.new(id_generator) args = GlobalTree::ArgumentsTree.new([], [], nil) result = state.add_lambd...
github
swistak35/orbacle
https://github.com/swistak35/orbacle
spec/constants_tree_spec.rb
Ruby
mit
186
master
4,808
# frozen_string_literal: true require 'spec_helper' module Orbacle RSpec.describe ConstantsTree do let(:const1) { Object.new } let(:const2) { Object.new } describe "#select_by_const_ref" do specify "no result" do tree = ConstantsTree.new const_ref = ConstRef.from_full_name("Foo",...
github
swistak35/orbacle
https://github.com/swistak35/orbacle
spec/typing_service_spec.rb
Ruby
mit
186
master
44,581
# frozen_string_literal: true require 'spec_helper' require 'logger' module Orbacle RSpec.describe TypingService do describe "primitives" do specify "primitive int" do snippet = <<-END 42 END result = type_snippet(snippet) expect(result).to eq(nominal("Integer")) ...
github
swistak35/orbacle
https://github.com/swistak35/orbacle
spec/ruby_parser_spec.rb
Ruby
mit
186
master
867
# frozen_string_literal: true require 'spec_helper' module Orbacle RSpec.describe RubyParser do specify "parse ruby code" do snippet = "42" expect(parse(snippet)).to eq(Parser::AST::Node.new(:int, [42])) end specify "raise syntax error" do snippet = "do" expect do pars...
github
swistak35/orbacle
https://github.com/swistak35/orbacle
spec/global_tree_performance_spec.rb
Ruby
mit
186
master
959
# frozen_string_literal: true require 'spec_helper' require 'benchmark' module Orbacle RSpec.describe ConstantsTree, performance: true do describe "performance" do specify "#find_by_const_ref 1" do tree = ConstantsTree.new const = nil 1000.times do |i| 1000.times do |j| ...
github
swistak35/orbacle
https://github.com/swistak35/orbacle
spec/data_flow_graph_spec.rb
Ruby
mit
186
master
74,684
# frozen_string_literal: true require 'spec_helper' require 'ostruct' require 'support/graph_matchers' require 'logger' module Orbacle RSpec.describe "DataFlowGraph" do specify "nothing" do snippet = "" expect do generate_cfg(snippet) end.not_to raise_error end describe "arra...
github
swistak35/orbacle
https://github.com/swistak35/orbacle
spec/lang_server_spec.rb
Ruby
mit
186
master
7,457
# frozen_string_literal: true require 'spec_helper' module Orbacle RSpec.describe LangServer do let(:logger) { Logger.new(nil) } describe "#handle_initialize" do specify do engine = instance_double(Engine) server = LangServer.new(logger, engine) expect(logger).to receive(:inf...
github
swistak35/orbacle
https://github.com/swistak35/orbacle
spec/data_flow_graph_location_spec.rb
Ruby
mit
186
master
3,184
# frozen_string_literal: true require 'spec_helper' require 'ostruct' require 'support/graph_matchers' module Orbacle RSpec.describe "DataFlowGraph location" do describe "primitives" do specify "primitive int" do snippet = <<-END -42 END result = generate_cfg(snippet) ...
github
swistak35/orbacle
https://github.com/swistak35/orbacle
spec/support/builder_helper.rb
Ruby
mit
186
master
632
# frozen_string_literal: true module BuilderHelper def build_graph(file) worklist = Orbacle::Worklist.new graph = Orbacle::Graph.new id_generator = Orbacle::UuidIdGenerator.new tree = Orbacle::GlobalTree.new(id_generator) service = Orbacle::Builder.new(graph, worklist, tree, id_generator) res...
github
swistak35/orbacle
https://github.com/swistak35/orbacle
spec/support/test_project.rb
Ruby
mit
186
master
311
# frozen_string_literal: true require 'tmpdir' class TestProject def initialize @root = Dir.mktmpdir end attr_reader :root def add_file(path, content) File.open(path_of(path), "w") do |f| f.write(content) end self end def path_of(path) File.join(root, path) end end
github
swistak35/orbacle
https://github.com/swistak35/orbacle
spec/support/graph_matchers.rb
Ruby
mit
186
master
3,345
# frozen_string_literal: true require 'hash_diff' RSpec::Matchers.define :include_edge do |expected_source, expected_target| match do |graph| graph.edges.any? do |edge| edge.source == expected_source && edge.target == expected_target end end failure_message do |graph| if graph.edges.empty? ...
github
swistak35/orbacle
https://github.com/swistak35/orbacle
spec/data_flow_graph/builder_primitives_spec.rb
Ruby
mit
186
master
5,847
# frozen_string_literal: true require 'spec_helper' require 'support/graph_matchers' require 'support/builder_helper' require 'ostruct' module Orbacle RSpec.describe Builder do include BuilderHelper describe "#handle_int" do specify "int" do snippet = <<-END 42 END re...
github
swistak35/orbacle
https://github.com/swistak35/orbacle
lib/orbacle.rb
Ruby
mit
186
master
2,541
# frozen_string_literal: true module Orbacle Position = Struct.new(:line, :character) PositionRange = Struct.new(:start, :end) do def include_position?(position) if (start_line+1..end_line-1).include?(position.line) true elsif start_line == position.line && end_line == position.line ...
github
swistak35/orbacle
https://github.com/swistak35/orbacle
lib/orbacle/node.rb
Ruby
mit
186
master
463
# frozen_string_literal: true module Orbacle class Node def initialize(type, params, location = nil) @type = type raise if !params.is_a?(Hash) @params = params @location = location end attr_reader :type, :params attr_accessor :location def ==(other) @type == other....
github
swistak35/orbacle
https://github.com/swistak35/orbacle
lib/orbacle/main_type.rb
Ruby
mit
186
master
297
# frozen_string_literal: true module Orbacle class MainType def each_possible_type end def ==(other) self.class == other.class end def hash [ self.class, ].hash ^ BIG_VALUE end alias eql? == def bottom? false end end end
github
swistak35/orbacle
https://github.com/swistak35/orbacle
lib/orbacle/const_ref.rb
Ruby
mit
186
master
967
# frozen_string_literal: true module Orbacle class ConstRef def self.from_ast(ast, nesting) full_name = AstUtils.const_to_string(ast) from_full_name(full_name, nesting) end def self.from_full_name(full_name, nesting) if full_name.start_with?("::") name = full_name[2..-1] ...
github
swistak35/orbacle
https://github.com/swistak35/orbacle
lib/orbacle/ast_utils.rb
Ruby
mit
186
master
961
# frozen_string_literal: true module Orbacle module AstUtils def self.const_to_string(const_ast) get_nesting(const_ast).flatten.join("::") end def self.const_prename_and_name_to_string(prename_ast, name_ast) (prename(prename_ast) + [name_ast.to_s]).compact.join("::") end def self.ge...
github
swistak35/orbacle
https://github.com/swistak35/orbacle
lib/orbacle/generic_type.rb
Ruby
mit
186
master
575
# frozen_string_literal: true module Orbacle class GenericType def initialize(name, parameters) @name = name @parameters = parameters end attr_reader :name, :parameters def ==(other) self.class == other.class && self.name == other.name && self.parameters == other.p...
github
swistak35/orbacle
https://github.com/swistak35/orbacle
lib/orbacle/lambda_type.rb
Ruby
mit
186
master
515
# frozen_string_literal: true module Orbacle class ProcType def initialize(lambda_id) @lambda_id = lambda_id end attr_reader :lambda_id def ==(other) self.class == other.class && self.lambda_id == other.lambda_id end def hash [ self.class, self.lam...
github
swistak35/orbacle
https://github.com/swistak35/orbacle
lib/orbacle/worklist.rb
Ruby
mit
186
master
1,527
# frozen_string_literal: true require 'fc' module Orbacle class Worklist BlockNode = Struct.new(:node) BlockLambda = Struct.new(:lambda_id) MessageSend = Struct.new(:message_send, :send_obj, :send_args, :send_result, :block, :location) SuperSend = Struct.new(:send_args, :send_result, :block, :method...
github
swistak35/orbacle
https://github.com/swistak35/orbacle
lib/orbacle/global_tree.rb
Ruby
mit
186
master
9,054
# frozen_string_literal: true module Orbacle class GlobalTree class ArgumentsTree < Struct.new(:args, :kwargs, :blockarg) Regular = Struct.new(:name) Optional = Struct.new(:name) Splat = Struct.new(:name) Nested = Struct.new(:args) end class Method def initialize(id, place_...
github
swistak35/orbacle
https://github.com/swistak35/orbacle
lib/orbacle/nominal_type.rb
Ruby
mit
186
master
447
# frozen_string_literal: true module Orbacle class NominalType def initialize(name) @name = name end attr_reader :name def ==(other) self.class == other.class && self.name == other.name end def hash [ self.class, self.name, ].hash ^ BIG_VALUE...
github
swistak35/orbacle
https://github.com/swistak35/orbacle
lib/orbacle/type_pretty_printer.rb
Ruby
mit
186
master
581
# frozen_string_literal: true module Orbacle class TypePrettyPrinter def call(type) case type when BottomType "unknown" when ClassType "class(#{type.name})" when NominalType type.name when GenericType pretty_parameters = type.parameters.map(&method(:c...
github
swistak35/orbacle
https://github.com/swistak35/orbacle
lib/orbacle/constants_tree.rb
Ruby
mit
186
master
2,031
# frozen_string_literal: true module Orbacle class ConstantsTree ScopeLevel = Struct.new(:elements, :children) do def self.empty new([], build_empty_hash) end def self.build_empty_hash Hash.new {|h, k| h[k] = ScopeLevel.empty } end end def initialize @tree ...
github
swistak35/orbacle
https://github.com/swistak35/orbacle
lib/orbacle/selfie.rb
Ruby
mit
186
master
657
# frozen_string_literal: true module Orbacle class Selfie def self.klass_from_scope(scope) new(:klass, scope) end def self.instance_from_scope(scope) new(:instance, scope) end def self.main new(:main, nil) end def initialize(kind, scope) @kind = kind @scop...
github
swistak35/orbacle
https://github.com/swistak35/orbacle
lib/orbacle/indexer.rb
Ruby
mit
186
master
4,106
# frozen_string_literal: true require 'pathname' require 'thread' require 'benchmark' module Orbacle class Indexer QueueElement = Struct.new(:ast, :file_path) class StatsRecorder def initialize @timers = Hash.new(0.0) @counters = Hash.new(0) @values = Hash.new end ...
github
swistak35/orbacle
https://github.com/swistak35/orbacle
lib/orbacle/bottom_type.rb
Ruby
mit
186
master
298
# frozen_string_literal: true module Orbacle class BottomType def ==(other) other.class == self.class end def hash [ self.class, ].hash ^ BIG_VALUE end alias eql? == def each_possible_type end def bottom? true end end end
github
swistak35/orbacle
https://github.com/swistak35/orbacle
lib/orbacle/ruby_parser.rb
Ruby
mit
186
master
608
# frozen_string_literal: true require 'parser/ruby25' module Orbacle class RubyParser Error = Class.new(StandardError) SyntaxError = Class.new(Error) EncodingError = Class.new(Error) def initialize @my_parser = Class.new(Parser::Ruby25) do def self.default_parser my_parser =...
github
swistak35/orbacle
https://github.com/swistak35/orbacle
lib/orbacle/find_definition_under_position.rb
Ruby
mit
186
master
3,274
# frozen_string_literal: true require 'parser' module Orbacle class FindDefinitionUnderPosition < Parser::AST::Processor include AstUtils ConstantResult = Struct.new(:const_ref) MessageResult = Struct.new(:name, :position_range) SuperResult = Struct.new(:keyword_position_range) def initialize(...
github
swistak35/orbacle
https://github.com/swistak35/orbacle
lib/orbacle/find_call_under_position.rb
Ruby
mit
186
master
1,999
# frozen_string_literal: true require 'parser' module Orbacle class FindCallUnderPosition < Parser::AST::Processor include AstUtils SelfResult = Struct.new(:message_name, :nesting) IvarResult = Struct.new(:message_name, :ivar_name, :nesting) def initialize(parser) @parser = parser end ...
github
swistak35/orbacle
https://github.com/swistak35/orbacle
lib/orbacle/typing_service.rb
Ruby
mit
186
master
23,151
# frozen_string_literal: true module Orbacle class TypingService TypingError = Class.new(StandardError) class UnknownNodeKindError < TypingError def initialize(node) @node = node end attr_reader :node end def initialize(logger, stats) @logger = logger @stats = s...
github
swistak35/orbacle
https://github.com/swistak35/orbacle
lib/orbacle/scope.rb
Ruby
mit
186
master
1,074
# frozen_string_literal: true module Orbacle class Scope def self.empty new([], false) end def initialize(elems, is_eigenclass) @elems = elems @is_eigenclass = is_eigenclass end attr_reader :elems def increase_by_ref(const_ref) if const_ref.absolute? Scope.n...
github
swistak35/orbacle
https://github.com/swistak35/orbacle
lib/orbacle/const_name.rb
Ruby
mit
186
master
515
# frozen_string_literal: true module Orbacle class ConstName def self.from_string(str) raise ArgumentError if str.start_with?("::") new(str.split("::")) end def initialize(elems) @elems = elems raise ArgumentError if elems.empty? end attr_reader :elems def ==(other)...
github
swistak35/orbacle
https://github.com/swistak35/orbacle
lib/orbacle/engine.rb
Ruby
mit
186
master
4,173
# frozen_string_literal: true module Orbacle class Engine def initialize(logger) @logger = logger end attr_reader :stats_recorder def index(project_root) @stats_recorder = Indexer::StatsRecorder.new service = Indexer.new(logger, stats_recorder) @state, @graph, @worklist = se...
github
swistak35/orbacle
https://github.com/swistak35/orbacle
lib/orbacle/class_type.rb
Ruby
mit
186
master
445
# frozen_string_literal: true module Orbacle class ClassType def initialize(name) @name = name end attr_reader :name def ==(other) self.class == other.class && self.name == other.name end def hash [ self.class, self.name, ].hash ^ BIG_VALUE ...
github
swistak35/orbacle
https://github.com/swistak35/orbacle
lib/orbacle/graph.rb
Ruby
mit
186
master
4,494
# frozen_string_literal: true require 'rgl/adjacency' module Orbacle class Graph ZSuper = Struct.new(:send_result, :block) Yield = Struct.new(:send_args, :send_result) Metod = Struct.new(:args, :result, :yields, :zsupers, :caller_node) MetodGraph = Struct.new(:args, :result, :yields, :caller_node, :...
github
swistak35/orbacle
https://github.com/swistak35/orbacle
lib/orbacle/command_line_interface.rb
Ruby
mit
186
master
3,405
# frozen_string_literal: true require 'optparse' require 'pathname' require 'logger' require 'fileutils' require 'orbacle' require 'lsp' require 'json' module Orbacle class CommandLineInterface class Options def initialize @dir = Dir.pwd @stats_file = Pathname.new(Dir.pwd).join("stats.json...
github
swistak35/orbacle
https://github.com/swistak35/orbacle
lib/orbacle/builder.rb
Ruby
mit
186
master
49,226
# frozen_string_literal: true module Orbacle class Builder include AstUtils BuilderError = Class.new(StandardError) class Result def initialize(node, context, data = {}) @node = node @context = context.freeze @data = data.freeze end attr_reader :node, :context, :...
github
swistak35/orbacle
https://github.com/swistak35/orbacle
lib/orbacle/lang_server.rb
Ruby
mit
186
master
2,657
# frozen_string_literal: true require 'lsp' require 'uri' module Orbacle class LangServer include Lsp::LanguageServer module Errors NoDefinitionFound = Lsp::ResponseError::Base.new(1101, "No definition found under cursor position", nil) end def initialize(logger, engine) @logger = logg...
github
swistak35/orbacle
https://github.com/swistak35/orbacle
lib/orbacle/union_type.rb
Ruby
mit
186
master
610
# frozen_string_literal: true module Orbacle class UnionType def initialize(types) @types_set = Set.new(types) end attr_reader :types_set def types @types_set end def ==(other) self.class == other.class && self.types_set == other.types_set end def hash ...