repo_name
stringlengths
6
97
path
stringlengths
3
341
text
stringlengths
8
1.02M
klimkin/fig
spec/parser_spec.rb
# coding: utf-8 require File.expand_path(File.dirname(__FILE__) + '/spec_helper') require 'fig/application_configuration' require 'fig/not_yet_parsed_package' require 'fig/package_descriptor' require 'fig/package_parse_error' require 'fig/parser' describe 'Parser' do def new_configuration application_configurat...
klimkin/fig
lib/fig.rb
# coding: utf-8 module Fig VERSION = '1.25.0' end
klimkin/fig
lib/fig/command/action/role/has_sub_action.rb
<gh_stars>10-100 # coding: utf-8 module Fig; end class Fig::Command; end module Fig::Command::Action; end module Fig::Command::Action::Role; end module Fig::Command::Action::Role::HasSubAction attr_accessor :sub_action def sub_action?() true end def check_sub_action_presence() return if sub_act...
klimkin/fig
lib/fig/protocol/file.rb
<reponame>klimkin/fig # coding: utf-8 require 'cgi' require 'fileutils' require 'find' require 'fig/file_not_found_error' require 'fig/logging' require 'fig/protocol' module Fig; end module Fig::Protocol; end # File transfers for the local filesystem. class Fig::Protocol::File include Fig::Protocol def downloa...
klimkin/fig
lib/fig/command/action/list_variables/json_all_configs.rb
# coding: utf-8 require 'fig/command/action' require 'fig/command/action/role/list_all_configs' require 'fig/command/action/role/list_as_json' require 'fig/command/action/role/list_from_data_structure' require 'fig/command/action/role/list_variables_from_data_structure' require 'fig/command/action/role/list_walking_de...
klimkin/fig
spec/figrc_spec.rb
# coding: utf-8 require File.expand_path(File.dirname(__FILE__) + '/spec_helper') require 'stringio' require 'tempfile' require 'fig/figrc' require 'fig/operating_system' require 'fig/repository' require 'fig/working_directory_maintainer' describe 'FigRC' do def create_override_file(foo, bar = nil) tempfile =...
klimkin/fig
lib/fig/non_repository_packages.rb
# coding: utf-8 require 'fig/not_yet_parsed_package' require 'fig/package_descriptor' module Fig; end class Fig::NonRepositoryPackages def initialize(parser) @parser = parser reset_cached_data return end def reset_cached_data @packages_by_path = {} return end def [](fil...
klimkin/fig
lib/fig/string_tokenizer.rb
# coding: utf-8 require 'fig/tokenized_string' require 'fig/tokenized_string/plain_segment' module Fig; end class Fig::StringTokenizer # subexpression_matchers is an array of hashes. Each hash is expected to # contain two keys: :pattern and :action. # # The :pattern value needs to be a regular expression fo...
klimkin/fig
lib/fig/package_descriptor_parse_error.rb
<reponame>klimkin/fig<gh_stars>10-100 # coding: utf-8 require 'fig/user_input_error' module Fig # Could not turn a string into a PackageDescriptor. class PackageDescriptorParseError < UserInputError attr_reader :original_string def initialize(message, original_string) super(message) @file = ...
klimkin/fig
lib/fig/environment_variables.rb
# coding: utf-8 module Fig; end; # Abstract manager of a set of environment variables. module Fig::EnvironmentVariables def initialize(variables_override = nil) @variables = variables_override || get_system_environment_variables end def empty? return @variables.empty? end def keys return @vari...
klimkin/fig
lib/fig/command/action/publish.rb
# coding: utf-8 require 'fig/command/action' require 'fig/command/action/role/has_no_sub_action' require 'fig/command/action/role/publish' require 'fig/logging' require 'fig/user_input_error' module Fig; end class Fig::Command; end module Fig::Command::Action; end class Fig::Command::Action::Publish include Fi...
klimkin/fig
lib/fig/parser_package_build_state.rb
<filename>lib/fig/parser_package_build_state.rb # coding: utf-8 require 'fig/package' require 'fig/package_parse_error' require 'fig/statement' require 'fig/statement/archive' require 'fig/statement/command' require 'fig/statement/configuration' require 'fig/statement/grammar_version' require 'fig/statement/include' r...
klimkin/fig
lib/fig/tokenized_string/token.rb
<filename>lib/fig/tokenized_string/token.rb # coding: utf-8 module Fig; end class Fig::TokenizedString; end class Fig::TokenizedString::Token attr_reader :type attr_reader :raw_value def initialize(type, raw_value) @type = type @raw_value = raw_value return end def to_expanded_string(&b...
klimkin/fig
lib/fig/statement/archive.rb
# coding: utf-8 require 'fig/statement' require 'fig/statement/asset' module Fig; end class Fig::Statement; end # Specifies an archive file (possibly via a URL) that is part of a package. # # Differs from a Resource in that the contents will be extracted. class Fig::Statement::Archive < Fig::Statement include Fig...
klimkin/fig
lib/fig/command/action/role/list_dependencies_from_data_structure.rb
<filename>lib/fig/command/action/role/list_dependencies_from_data_structure.rb # coding: utf-8 module Fig; end class Fig::Command; end module Fig::Command::Action; end module Fig::Command::Action::Role; end module Fig::Command::Action::Role::ListDependenciesFromDataStructure private def node_content(package...
klimkin/fig
lib/fig/command/action/dump_package_definition_parsed.rb
<filename>lib/fig/command/action/dump_package_definition_parsed.rb # coding: utf-8 require 'fig/command/action' require 'fig/command/action/role/has_no_sub_action' require 'fig/package_definition_text_assembler' module Fig; end class Fig::Command; end module Fig::Command::Action; end class Fig::Command::Action::...
klimkin/fig
lib/fig/network_error.rb
<filename>lib/fig/network_error.rb # coding: utf-8 require 'fig/user_input_error' module Fig # A problem with file transfer over the network. class NetworkError < UserInputError end end
klimkin/fig
lib/fig/protocol/sftp.rb
# coding: utf-8 require 'net/sftp' require 'fig/logging' require 'fig/network_error' require 'fig/package_descriptor' require 'fig/protocol' require 'fig/protocol/netrc_enabled' module Fig; end module Fig::Protocol; end # File transfers via SFTP class Fig::Protocol::SFTP include Fig::Protocol include Fig::Proto...
klimkin/fig
lib/fig/command/package_applier.rb
# coding: utf-8 require 'fig/package' require 'fig/package_descriptor' module Fig; end class Fig::Command; end class Fig::Command::PackageApplier attr_reader :synthetic_package_for_command_line def initialize( base_package, environment, options, descriptor, base_config, package_source_de...
klimkin/fig
spec/command/environment_variables_spec.rb
<reponame>klimkin/fig # coding: utf-8 require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe 'Fig' do describe 'environment variables' do before(:each) do clean_up_test_environment set_up_test_environment # These shouldn't matter because the commands shouldn't look at t...
klimkin/fig
spec/command/dump_package_definition_spec.rb
# coding: utf-8 require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe 'Fig' do describe 'package definition dumping' do before(:each) do clean_up_test_environment set_up_test_environment end describe '--dump-package-definition-text' do it %q<dumps the contents ...
klimkin/fig
lib/fig/command/action/get.rb
<filename>lib/fig/command/action/get.rb<gh_stars>10-100 # coding: utf-8 require 'fig/command/action' require 'fig/command/action/role/has_no_sub_action' module Fig; end class Fig::Command; end module Fig::Command::Action; end class Fig::Command::Action::Get include Fig::Command::Action include Fig::Command::...
klimkin/fig
lib/fig/log4r_config_error.rb
# coding: utf-8 require 'fig/user_input_error' module Fig # A problem with configuring Log4r. class Log4rConfigError < UserInputError attr_reader :config_file, :original_exception def initialize(config_file, original_exception) super( %Q<Problem with #{config_file}: #{original_exception.mes...
klimkin/fig
lib/fig/command/action/dump_package_definition_text.rb
# coding: utf-8 require 'fig/command/action' require 'fig/command/action/role/has_no_sub_action' module Fig; end class Fig::Command; end module Fig::Command::Action; end class Fig::Command::Action::DumpPackageDefinitionText include Fig::Command::Action include Fig::Command::Action::Role::HasNoSubAction de...
klimkin/fig
lib/fig/repository_error.rb
# coding: utf-8 require 'fig/user_input_error' module Fig # A problem within/related to a repository. class RepositoryError < UserInputError end end
klimkin/fig
spec/deparser/v1_spec.rb
<reponame>klimkin/fig # coding: utf-8 require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') require 'fig/deparser/v1' require 'fig/statement/archive' require 'fig/statement/resource' describe Fig::Deparser::V1 do let(:deparser) { Fig::Deparser::V1.new :emit_as_input, '<indent>', 1 } describ...
klimkin/fig
spec/command/listing_spec.rb
# coding: utf-8 require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') require 'English' require 'fig/command/package_loader' def set_up_local_and_remote_repository cleanup_home_and_remote input = <<-END_INPUT config default set FOO=BAR end config nondefault set FOO=BAZ ...
klimkin/fig
lib/fig/logging/colorizable.rb
# coding: utf-8 module Fig; end module Fig::Logging; end # A String that has colors associated with it. class Fig::Logging::Colorizable < String attr_reader :foreground, :background def initialize(string = '', foreground = nil, background = nil) super(string) @foreground = foreground @background = b...
klimkin/fig
lib/fig/command/action/run_command_line.rb
# coding: utf-8 require 'fig/command/action' require 'fig/command/action/role/has_no_sub_action' module Fig; end class Fig::Command; end module Fig::Command::Action; end class Fig::Command::Action::RunCommandLine include Fig::Command::Action include Fig::Command::Action::Role::HasNoSubAction def options()...
klimkin/fig
lib/fig/command/action/list_dependencies/default.rb
# coding: utf-8 require 'fig/command/action' require 'fig/command/action/role/list_base_config' require 'fig/command/action/role/list_dependencies_flat' require 'fig/command/action/role/list_walking_dependency_tree' module Fig; end class Fig::Command; end module Fig::Command::Action; end class Fig::Command::Act...
klimkin/fig
spec/support/formatters/seed_spitter.rb
<gh_stars>10-100 # coding: utf-8 require 'rspec/core/formatters/documentation_formatter' class SeedSpitter < RSpec::Core::Formatters::DocumentationFormatter def start(*) super output.puts "\nSeed: #{RSpec.configuration.seed}" end end
klimkin/fig
spec/command/grammar_command_spec.rb
# coding: utf-8 require File.expand_path(File.dirname(__FILE__) + '/grammar_spec_helper') describe 'Fig' do describe %q<uses the correct grammar version in the package definition created for publishing> do before(:each) do clean_up_test_environment set_up_test_environment end it 'from unvers...
klimkin/fig
lib/fig/command/action/list_variables/tree.rb
# coding: utf-8 require 'fig/command/action' require 'fig/command/action/role/list_base_config' require 'fig/command/action/role/list_variables_in_a_tree' require 'fig/command/action/role/list_walking_dependency_tree' module Fig; end class Fig::Command; end module Fig::Command::Action; end class Fig::Command::A...
klimkin/fig
lib/fig/log4r/outputter.rb
# coding: utf-8 require 'colorize' require 'log4r/logger' require 'log4r/outputter/iooutputter' require 'fig/logging/colorizable' require 'fig/operating_system' module Fig; end module Fig::Log4r; end class Fig::Log4r::Outputter < Log4r::IOOutputter def initialize(name, file_handle, hash = {}) @colors = hash.d...
klimkin/fig
lib/fig/working_directory_metadata.rb
<gh_stars>10-100 # coding: utf-8 require 'set' module Fig; end # Data about a package within the current working directory. class Fig::WorkingDirectoryMetadata attr_reader :package_name, :current_version def initialize(package_name, current_version = nil) @package_name = package_name @retrieved ...
klimkin/fig
spec/environment_variables_spec.rb
# coding: utf-8 require File.expand_path(File.dirname(__FILE__) + '/spec_helper') require 'fig/environment_variables/case_insensitive' require 'fig/environment_variables/case_sensitive' def find_diffs(primary_hash, secondary_hash, diff_hash) primary_hash.each do |key, value| if ! secondary_hash.has_key?(key) ...
klimkin/fig
lib/fig/protocol.rb
# coding: utf-8 require 'fig/logging' require 'fig/network_error' module Fig; end # File transfers. module Fig::Protocol def download_list(uri) Fig::Logging.fatal "Protocol not supported: #{uri}" raise Fig::NetworkError.new "Protocol not supported: #{uri}" end # Determine whether we need to update som...
klimkin/fig
lib/fig/command/action/role/list_variables_in_a_tree.rb
# coding: utf-8 require 'fig/command/action' require 'fig/statement/path' require 'fig/statement/set' module Fig; end class Fig::Command; end module Fig::Command::Action; end module Fig::Command::Action::Role; end module Fig::Command::Action::Role::ListVariablesInATree def descriptor_requirement() return ...
klimkin/fig
lib/fig/command/action/update.rb
# coding: utf-8 require 'fig/command/action' require 'fig/command/action/role/has_no_sub_action' require 'fig/command/action/role/update' module Fig; end class Fig::Command; end module Fig::Command::Action; end class Fig::Command::Action::Update include Fig::Command::Action include Fig::Command::Action::Role...
klimkin/fig
lib/fig/command/action/list_variables/graphviz.rb
<gh_stars>10-100 # coding: utf-8 require 'fig/command/action' require 'fig/command/action/role/list_as_graphviz' require 'fig/command/action/role/list_base_config' require 'fig/command/action/role/list_variables_as_graphviz' require 'fig/command/action/role/list_walking_dependency_tree' module Fig; end class Fig::...
klimkin/fig
lib/fig/statement/resource.rb
# coding: utf-8 require 'fig/statement' require 'fig/statement/asset' require 'fig/url' module Fig; end class Fig::Statement; end # Specifies a file (possibly via a URL) that is part of the current package. # # Differs from an Archive in that the contents will not be extracted. class Fig::Statement::Resource < Fig:...
klimkin/fig
lib/fig/external_program.rb
<reponame>klimkin/fig # coding: utf-8 require 'stringio' require 'fig/user_input_error' module Fig; end class Fig::ExternalProgram def self.popen(*cmd) exit_code = nil options = {} stdin_read, stdin_write = IO.pipe Encoding::UTF_8, Encoding::UTF_8 options[:in] = stdin_read stdin_write.sync = ...
klimkin/fig
spec/command/usage_errors_spec.rb
<filename>spec/command/usage_errors_spec.rb # coding: utf-8 require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') require 'English' require 'fig/command/package_loader' describe 'Fig' do describe 'usage errors: fig' do before(:each) do clean_up_test_environment set_up_test_environme...
klimkin/fig
lib/fig/statement/command.rb
<reponame>klimkin/fig # coding: utf-8 require 'fig/statement' module Fig; end # Specifies a default command that will be executed for a given Configuration # if no command is specified on the command-line. class Fig::Statement::Command < Fig::Statement attr_reader :command def self.validate_and_process_escapes_...
klimkin/fig
lib/fig/command/action/role/list_variables_from_data_structure.rb
<reponame>klimkin/fig # coding: utf-8 require 'cgi' module Fig; end class Fig::Command; end module Fig::Command::Action; end module Fig::Command::Action::Role; end module Fig::Command::Action::Role::ListVariablesFromDataStructure def descriptor_requirement() return nil end def load_base_package?() ...
klimkin/fig
lib/fig/statement/synthetic_raw_text.rb
<gh_stars>10-100 # coding: utf-8 require 'fig/statement' module Fig; end # Some raw text that we want emitted as part of unparsing. class Fig::Statement::SyntheticRawText < Fig::Statement attr_reader :text def initialize(line_column, source_description, text) super(line_column, source_description) @tex...
klimkin/fig
lib/fig/command/action/help_long.rb
<reponame>klimkin/fig # coding: utf-8 require 'fig/command/action' require 'fig/command/action/role/has_no_sub_action' module Fig; end class Fig::Command; end module Fig::Command::Action; end class Fig::Command::Action::HelpLong include Fig::Command::Action include Fig::Command::Action::Role::HasNoSubAction ...
klimkin/fig
spec/command/grammar_asset_spec.rb
<gh_stars>10-100 # coding: utf-8 require File.expand_path(File.dirname(__FILE__) + '/grammar_spec_helper') require 'cgi' require 'fig/operating_system' # I do not understand the scoping rules for RSpec at all. # Block is supposed to publish the package given a URL. def test_published_asset_with_url_with_symbol( a...
klimkin/fig
lib/fig/command/action/role/update.rb
# coding: utf-8 require 'fig/command/action' module Fig; end class Fig::Command; end module Fig::Command::Action; end module Fig::Command::Action::Role; end module Fig::Command::Action::Role::Update def descriptor_requirement() return nil end def allow_both_descriptor_and_file?() # We don't care,...
klimkin/fig
lib/fig/command/package_loader.rb
# coding: utf-8 require 'fig/not_yet_parsed_package' require 'fig/package_descriptor' require 'fig/parser' module Fig; end class Fig::Command; end # Loads the base package. class Fig::Command::PackageLoader attr_reader :package_load_path_description DEFAULT_PACKAGE_FILE = 'package.fig' DEFAULT_APPLICATION_FIL...
klimkin/fig
lib/fig/command/action/role/list_from_data_structure.rb
<reponame>klimkin/fig # coding: utf-8 require 'set' module Fig; end class Fig::Command; end module Fig::Command::Action; end module Fig::Command::Action::Role; end # Requires #node_content(package, config_name) and #walk_dependency_tree() # methods. module Fig::Command::Action::Role::ListFromDataStructure pri...
klimkin/fig
lib/fig/command/action/role/has_no_sub_action.rb
<reponame>klimkin/fig # coding: utf-8 module Fig; end class Fig::Command; end module Fig::Command::Action; end module Fig::Command::Action::Role; end module Fig::Command::Action::Role::HasNoSubAction def sub_action? false end end
klimkin/fig
lib/fig/tokenized_string/plain_segment.rb
# coding: utf-8 module Fig; end class Fig::TokenizedString; end class Fig::TokenizedString::PlainSegment attr_reader :raw_value def initialize(raw_value) @raw_value = raw_value return end def type return nil end def to_expanded_string(&block) return @raw_value.gsub(%r< \\ (.) >xm,...
klimkin/fig
lib/fig/command/coverage_support.rb
<gh_stars>10-100 # coding: utf-8 # This is not a normal module/class. It contains code to be run by bin/fig and # bin/fig-debug when doing coverage. # Depends upon setup done by spec/spec_helper.rb. if ! ENV['FIG_COVERAGE_RUN_COUNT'] || ! ENV['FIG_COVERAGE_ROOT_DIRECTORY'] $stderr.puts \ 'FIG_COVERAGE_RUN_COUN...
klimkin/fig
spec/command/suppress_includes_spec.rb
# coding: utf-8 require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') require 'fig/operating_system' describe 'Fig' do describe 'include processing' do let(:publish_from_directory) { "#{FIG_SPEC_BASE_DIRECTORY}/publish-home" } before(:each) do clean_up_test_environment FileUtil...
klimkin/fig
lib/fig/command/options.rb
<reponame>klimkin/fig # coding: utf-8 require 'fig/command/action/clean' require 'fig/command/action/dump_package_definition_for_command_line' require 'fig/command/action/dump_package_definition_parsed' require 'fig/command/action/dump_package_definition_text' require 'fig/command/action/get' require 'fig/command/acti...
klimkin/fig
lib/fig/command/action/publish_local.rb
<reponame>klimkin/fig # coding: utf-8 require 'fig/command/action' require 'fig/command/action/role/has_no_sub_action' require 'fig/command/action/role/publish' require 'fig/logging' module Fig; end class Fig::Command; end module Fig::Command::Action; end class Fig::Command::Action::PublishLocal include Fig::C...
klimkin/fig
lib/fig/url_access_disallowed_error.rb
<reponame>klimkin/fig # coding: utf-8 require 'fig/user_input_error' module Fig # Package definition attempted to specify a URL outside of the whitelist. class URLAccessDisallowedError < UserInputError attr_reader :urls, :descriptor def initialize(urls, descriptor) @urls = urls @descrip...
klimkin/fig
lib/fig/statement/include_file.rb
<filename>lib/fig/statement/include_file.rb # coding: utf-8 require 'fig/package_descriptor' require 'fig/statement' require 'fig/user_input_error' module Fig; end # Like an include, but of an unpublished file. class Fig::Statement::IncludeFile < Fig::Statement def self.parse_path_with_config(path_with_config, &bl...
xsoulsyndicate/yp-api
lib/yp_api/review.rb
require "json" class YpApi::Review attr_accessor :rating, :review_body, :review_date, :review_subject, :reviewer @@path = "/search-api/search/devapi/reviews" def self.path @@path end def self.find(id) res = YpApi::Connection.get(path,:format => :json,:listingid => id.to_s) data = JSON.parse(res)['...
xsoulsyndicate/yp-api
spec/yp_api_spec.rb
require File.expand_path(File.dirname(__FILE__) + '/spec_helper') describe YpApi do subject{described_class} it {should respond_to :key} it {should respond_to 'key='} it {should respond_to :base_url} it {should respond_to 'base_url='} end
xsoulsyndicate/yp-api
lib/yp-api.rb
# bootstrap file require 'yp_api' require 'yp_api/version' require 'yp_api/connection' require 'yp_api/listing' require 'yp_api/review'
xsoulsyndicate/yp-api
spec/spec_helper.rb
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) $LOAD_PATH.unshift(File.dirname(__FILE__)) require 'rspec' require 'yaml' require 'ruby-debug' require 'webmock/rspec' require 'rack' require 'yp-api' # Requires supporting files with custom matchers and macros, etc, # in ./support/ and its subdirecto...
xsoulsyndicate/yp-api
lib/yp_api/listing.rb
<filename>lib/yp_api/listing.rb require "json" class YpApi::Listing attr_accessor :accreditations, :ad_image, :ad_image_click, :additional_texts, :after_hours_phone, :akas, :amenities, :associations, :attribution, :attribution_logo, :audio_url, :average_rating, :base_click_url, :busi...
xsoulsyndicate/yp-api
spec/connection_spec.rb
require File.expand_path(File.dirname(__FILE__) + '/spec_helper') describe YpApi::Connection do subject{described_class} it{should respond_to :get} context "calling .get with a valid api path and url params" do before do @valid_path = "/listings/v1/search" @valid_params = {:searchloc => 83854,...
xsoulsyndicate/yp-api
lib/yp_api/connection.rb
<reponame>xsoulsyndicate/yp-api<filename>lib/yp_api/connection.rb require 'rest_client' class YpApi::Connection def self.get(path,opts = {}) RestClient.get(YpApi.base_url + path,:params => opts.merge(:key => YpApi.key)) end end
xsoulsyndicate/yp-api
spec/support/testing.rb
<reponame>xsoulsyndicate/yp-api module YpApi module Testing def stub_api_response(verb,url,opts = {}) api = FakeApi.new(opts) stub_request(verb,url).to_rack(api) api # return instance end def file_fixture(filename) open(File.join(File.dirname(__FILE__), 'fixtures', "#{filename.to_s...
xsoulsyndicate/yp-api
spec/listing_spec.rb
require File.expand_path(File.dirname(__FILE__) + '/spec_helper') describe YpApi::Listing do subject{described_class} it {should respond_to :path} describe ".find" do context "Given a valid listing_id(81344) as the first parameter" do before do @listing_id = 81344 full_url = YpApi.base_...
xsoulsyndicate/yp-api
lib/yp_api.rb
<gh_stars>0 module YpApi @@base_url = "http://pubapi.yp.com" @@key = "CHANGEME" def self.key @@key end def self.key=(k) @@key = k end def self.base_url @@base_url end def self.base_url=(u) @@base_url = u end end
xsoulsyndicate/yp-api
spec/review_spec.rb
require File.expand_path(File.dirname(__FILE__) + '/spec_helper') describe YpApi::Review do subject{described_class} it {should respond_to :path} describe ".find" do context "Given a valid listing_id(81344) as the first parameter" do before do @listing_id = 81344 full_url = YpApi.base_u...
Dremora/homebrew-cask
Casks/psequel.rb
cask :v1 => 'psequel' do version '1.3.3' sha256 'b73e2eb0f7eb03704b284009182caf202617d7410328dff48d6634f45e3fb098' url "http://www.psequel.com/download?version=#{version}" name 'PSequel' homepage 'http://www.psequel.com' license :closed app 'PSequel.app' end
Dremora/homebrew-cask
Casks/black-ink.rb
<reponame>Dremora/homebrew-cask cask :v1 => 'black-ink' do version '1.6.2' sha256 '4bce28eaa25f980c0e13147594c503b97276f4be1738a823a3eb909ea4fec002' url "https://red-sweater.com/blackink/BlackInk#{version}.zip" appcast 'https://red-sweater.com/blackink/appcast1.php', :sha256 => '2c18470c2510e32cf8eac...
Dremora/homebrew-cask
Casks/nomad.rb
<gh_stars>0 cask :v1 => 'nomad' do version '0.1.2' sha256 '8fcff1029c6cc9bf24ee441d749ef1039a6132e62ef486561a8a8d9e6e519fbf' # hashicorp.com is the official download host per the vendor homepage url "https://releases.hashicorp.com/nomad/#{version}/nomad_#{version}_darwin_amd64.zip" name 'Nomad' homepage 'h...
Dremora/homebrew-cask
Casks/todoist.rb
<gh_stars>0 cask :v1 => 'todoist' do version '6.0.3' sha256 '5457917cbc22092e12f736dfd7b1d22a2cb62ad0cda82d7b1c053fe287d9112e' # cloudfront.net is the official download host per the appcast feed url 'https://d2dq6e731uoz0t.cloudfront.net/f34bc666b8a2458496a5c00a115f7cbd/as/Todoist.zip' appcast 'https://todoi...
Dremora/homebrew-cask
Casks/codekit.rb
cask :v1 => 'codekit' do version '2.5.1-19076' sha256 '7e41f7a0e3b36607fb33a758d21f1f51ea3902888448facd26ddf009b4c79f70' url "https://incident57.com/codekit/files/codekit-#{version.sub(%r{.*-},'')}.zip" appcast 'https://incident57.com/codekit/appcast/ck2appcast.xml', :sha256 => '72fc08fe815cb3faf6a6f...
Dremora/homebrew-cask
Casks/extrabuildphase.rb
cask :v1 => 'extrabuildphase' do version '0.3' sha256 'd4023faf158677b455458cb4ce4267e27907bf790fed29fc8d046099dc477277' url "https://github.com/norio-nomura/ExtraBuildPhase/releases/download/#{version}/ExtraBuildPhase-#{version}.pkg" appcast 'https://github.com/norio-nomura/ExtraBuildPhase/releases.atom' na...
Dremora/homebrew-cask
Casks/qtpass.rb
cask :v1 => 'qtpass' do version '1.0.4' sha256 'cb5eb74ba37ded2a36d3362cc85e4a3c45aad095be7fe77252eab885f7d32c86' url "https://github.com/IJHack/qtpass/releases/download/v#{version}/qtpass-#{version}.dmg" appcast 'https://github.com/IJHack/qtpass/releases.atom' name 'QtPass' homepage 'https://qtpass.org/' ...
alexruperez/SafeBrowsing
SafeBrowsing.podspec
Pod::Spec.new do |s| s.name = 'SafeBrowsing' s.version = '0.1.2' s.summary = 'Protect your users against malware and phishing threats using Google Safe Browsing' s.homepage = 'https://github.com/alexruperez/SafeBrowsing' s.license = { :type => 'MIT', :file => 'L...
rubenandrebarreiro/blockchain-on-rails-demo
blockchain-on-rails-demo.rb
# BLOCKCHAIN ON RAILS DEMO # Description: # - A simple Demo for a Blockchain, in Ruby on Rails; # Author: # - <NAME> # - Computer Science/Engineering #!/usr/bin/ruby -w puts "\n\n\n-- WELCOME TO THE BLOCKCHAIN ON RAILS DEMO --\n\n"; class Client @@no_of_clients = 0 def initialize(id, first_name, las...
chrisjgilbert/thermostat-app
app.rb
<reponame>chrisjgilbert/thermostat-app<gh_stars>0 require 'sinatra/base' require 'json' class ThermostatApp < Sinatra::Base enable :sessions before do headers 'Access-Control-Allow-Methods' => '*' end get '/' do erb :index end get '/temperature' do temperature = session[:temperature] || 20.t...
MiniDOM/MiniDOM
MiniDOM.podspec
Pod::Spec.new do |s| s.name = "MiniDOM" s.version = "1.0.3" s.summary = "A minimal XML DOM parser for Swift." s.homepage = "https://minidom.github.io/" s.license = { :type => "MIT", :file => "LICENSE" } s.author = "<NAME>" s.ios.deployment_target = "8.4" s.osx.deplo...
sandfox-im/journald-logger
lib/journald/classes/trace_logger.rb
module Journald class TraceLogger def initialize(progname = nil, min_priority = nil, **tags) @wrapped_logger = ::Journald::Logger.new(progname, min_priority, **tags) end PASSTHROUGH_METHODS = [ :tag, :tag_value, :untag, :progname, :progname=, :level, :level...
sandfox-im/journald-logger
lib/journald/modules/version.rb
<filename>lib/journald/modules/version.rb module Journald class Logger VERSION = "3.1.0" end end
MrSayyod/Ruby-Capstone-Project-Scraper
lib/loop.rb
require_relative '../lib/scraper.rb' class Loop < Scraper attr_reader :total, :page def initialize(total, page) @total = total @page = page end def start iteration_url = "https://www.simplyhired.com/search?q=junior+web+developer&pn=#{page}" iteration_doc = ::OpenURI.open_uri(iteration_url) ...
uriji/uriji-emoji-picker
lib/helper/emoji_helper.rb
<filename>lib/helper/emoji_helper.rb<gh_stars>0 require_relative './emoji_regex' # UrijiEmojiPicker module UrijiEmojiPicker def emojify(text) find_emoji(text) end private def find_emoji(text) string = replace_unicode_moji_with_images(text) || text emoji = string.scan(regex) unicodes = [] ...
uriji/uriji-emoji-picker
lib/uriji_emoji_picker.rb
<filename>lib/uriji_emoji_picker.rb require 'uriji_emoji_picker/version' require 'uriji_emoji_picker/engine' if defined?(Rails) require 'emoji' require 'helper/emoji_map' require 'helper/emoji_exceptions' require 'helper/emoji_helper' # UrijiEmojiPicker module UrijiEmojiPicker; end
uriji/uriji-emoji-picker
lib/generators/uriji_emoji_picker/install_generator.rb
module UrijiEmojiPicker module Generators class InstallGenerator < Rails::Generators::Base source_root File.dirname(__FILE__) def copy_images directory 'emoji_img', 'app/assets/images/emoji_picker' directory 'emoji', 'app/assets/images/emoji' end def info puts...
uriji/uriji-emoji-picker
lib/uriji_emoji_picker/engine.rb
<reponame>uriji/uriji-emoji-picker<filename>lib/uriji_emoji_picker/engine.rb<gh_stars>0 module UrijiEmojiPicker class Engine < Rails::Engine config.autoload_paths += Dir["#{config.root}/lib/**/"] initializer 'initialize uriji_emoji_picker helper' do |_app| ActiveSupport.on_load(:action_view) do ...
bolasblack/programr
lib/programr/facade.rb
<reponame>bolasblack/programr<gh_stars>1-10 module ProgramR class Facade attr_reader :environment, :history # Create a new robot # # @param custom_environment the custom {Environment} class # @param custom_history the custom {History} class def initialize custom_environment = Environment, cus...
bolasblack/programr
lib/programr/environment.rb
<gh_stars>1-10 module ProgramR class Environment # @group Custom Environment required methods # @param history the {History} instance which passed in {Facade#initialize} def initialize history @readonly_tags_file = "#{File.dirname(__FILE__)}/../../conf/readOnlyTags.yaml" @readonly_tags = YAML::load(File....
bolasblack/programr
spec/utils/fake_graphmaster.rb
class FakeGraphmaster attr_reader :learned def initialize @learned = [] end def learn category @learned << category end end
bolasblack/programr
lib/programr/history.rb
module ProgramR class History attr_accessor :topic def initialize @topic = 'undef' @inputs = [] @responses = [] @star_greedy = [] @that_greedy = [] @topic_greedy = [] end # @param index [Numeric] get stimula, 0 is the nearest one # @return [Str...
bolasblack/programr
lib/programr/graphmaster.rb
module ProgramR class Graphmaster attr_reader :graph def initialize @segmenter_map = {} reset end def learn category segmenter = @segmenter_map[category.language] if category.language.nil? or segmenter.nil? path = category.patterns else path = segmenter....
bolasblack/programr
spec/utils/fake_environment.rb
<filename>spec/utils/fake_environment.rb class FakeEnvironment def initialize history = nil @stage = {} @history = history end def get key @stage[key] end def set key, value @stage[key] = value end end
bolasblack/programr
lib/programr/aiml_parser.rb
<filename>lib/programr/aiml_parser.rb # Listen block arguments document: # http://ruby-doc.org/stdlib-2.0.0/libdoc/rexml/rdoc/REXML/SAX2Listener.html # gli accenti nel file di input vengono trasformati in &apos; !!! # module ProgramR class AimlParser def initialize learner, environment, history @learner = lear...
bolasblack/programr
spec/facade_spec.rb
# coding: utf-8 require 'securerandom' require File.join(File.dirname(__FILE__), './utils/fake_environment') describe ProgramR::Facade do let(:robot) do robot = ProgramR::Facade.new robot.environment.readonly_tags_file = 'spec/data/readOnlyTags.yaml' robot end after { robot.reset } it 'can custon...
bolasblack/programr
spec/environment_spec.rb
describe ProgramR::Environment do before do @env = ProgramR::Environment.new ProgramR::History.new end it "can set readonly tags file" do @env.readonly_tags_file = 'spec/data/readOnlyTags.yaml' expect(@env.get 'bot_name').to eq 'test bot name' end end
bolasblack/programr
programr.gemspec
# -*- encoding: utf-8 -*- require File.expand_path('../lib/programr/version', __FILE__) Gem::Specification.new do |gem| gem.authors = ["<NAME>, <NAME>, <NAME>, <NAME>, c4605"] gem.email = ["<EMAIL>"] gem.description = %q{Ruby interpreter for the AIML} gem.summary = %q{ProgramR is a Ruby i...
bolasblack/programr
lib/programr/graph_node.rb
# coding: utf-8 module ProgramR class GraphNode attr_reader :children, :template MATCHERS = %w{_ *} def initialize @template = nil @children = {} end # @param category [Category] # @param path [Array<String>] def learn category, path branch = path.first # Only t...
bolasblack/programr
lib/programr/aiml_elements.rb
module ProgramR class AimlTag def inspect inspect_str = respond_to?(:to_inspect, true) ? to_inspect : execute "<#{self.class.name.demodulize.tableize.singularize} -> #{inspect_str}>" end def to_s respond_to?(:execute) ? execute : super end private def to_response inputs = nil, need_puts = fa...