repo
stringlengths
5
92
file_url
stringlengths
80
287
file_path
stringlengths
5
197
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:37:27
2026-01-04 17:58:21
truncated
bool
2 classes
contentful/contentful.rb
https://github.com/contentful/contentful.rb/blob/7e62f9e1accd70f9b5e01892cc42015015a92ee0/lib/contentful/asset.rb
lib/contentful/asset.rb
require_relative 'fields_resource' require_relative 'file' require_relative 'resource_references' module Contentful # Resource class for Asset. # https://www.contentful.com/developers/documentation/content-delivery-api/#assets class Asset < FieldsResource include Contentful::ResourceReferences # @privat...
ruby
MIT
7e62f9e1accd70f9b5e01892cc42015015a92ee0
2026-01-04T17:44:22.911350Z
false
contentful/contentful.rb
https://github.com/contentful/contentful.rb/blob/7e62f9e1accd70f9b5e01892cc42015015a92ee0/lib/contentful/error.rb
lib/contentful/error.rb
module Contentful # All errors raised by the contentful gem are either instances of Contentful::Error # or inherit from Contentful::Error class Error < StandardError attr_reader :response def initialize(response) @response = response super best_available_message end # Shortcut for cr...
ruby
MIT
7e62f9e1accd70f9b5e01892cc42015015a92ee0
2026-01-04T17:44:22.911350Z
false
contentful/contentful.rb
https://github.com/contentful/contentful.rb/blob/7e62f9e1accd70f9b5e01892cc42015015a92ee0/lib/contentful/sync_page.rb
lib/contentful/sync_page.rb
require_relative 'base_resource' require_relative 'array_like' module Contentful # Wrapper Class for Sync results class SyncPage < BaseResource include Contentful::ArrayLike attr_reader :sync, :items, :next_sync_url, :next_page_url def initialize(item, configuration = { ...
ruby
MIT
7e62f9e1accd70f9b5e01892cc42015015a92ee0
2026-01-04T17:44:22.911350Z
false
contentful/contentful.rb
https://github.com/contentful/contentful.rb/blob/7e62f9e1accd70f9b5e01892cc42015015a92ee0/lib/contentful/support.rb
lib/contentful/support.rb
# frozen_string_literal: true module Contentful # Utility methods used by the contentful gem module Support class << self # Transforms CamelCase into snake_case (taken from zucker) # # @param [String] object camelCaseName # @param [Boolean] skip if true, skips returns original object ...
ruby
MIT
7e62f9e1accd70f9b5e01892cc42015015a92ee0
2026-01-04T17:44:22.911350Z
false
codesnik/calculate-all
https://github.com/codesnik/calculate-all/blob/2e9c79c4d3f75ee6bf890697e624ca2efd0c1229/test/test_helper.rb
test/test_helper.rb
$LOAD_PATH.unshift File.expand_path("../../lib", __FILE__) require "logger" require "active_record" if ActiveSupport.respond_to?(:to_time_preserves_timezone) ActiveSupport.to_time_preserves_timezone = :zone end require "calculate-all" require "minitest/autorun" require "minitest/reporters" Minitest::Reporters.use...
ruby
MIT
2e9c79c4d3f75ee6bf890697e624ca2efd0c1229
2026-01-04T17:44:30.971468Z
false
codesnik/calculate-all
https://github.com/codesnik/calculate-all/blob/2e9c79c4d3f75ee6bf890697e624ca2efd0c1229/test/calculate_all_test.rb
test/calculate_all_test.rb
require "test_helper" require "groupdate" class Department < ActiveRecord::Base has_many :orders end class Order < ActiveRecord::Base belongs_to :department end class CalculateAllTest < Minitest::Test def setup @@connected ||= begin if ENV["VERBOSE"] ActiveRecord::Base.logger = ActiveSupport:...
ruby
MIT
2e9c79c4d3f75ee6bf890697e624ca2efd0c1229
2026-01-04T17:44:30.971468Z
false
codesnik/calculate-all
https://github.com/codesnik/calculate-all/blob/2e9c79c4d3f75ee6bf890697e624ca2efd0c1229/lib/calculate-all.rb
lib/calculate-all.rb
require "active_support" require "calculate-all/version" module CalculateAll # Calculates multiple aggregate values on a scope in one request, similarly to #calculate def calculate_all(*expression_shortcuts, **named_expressions, &block) # If only one aggregate is given as a string or Arel.sql without explicit ...
ruby
MIT
2e9c79c4d3f75ee6bf890697e624ca2efd0c1229
2026-01-04T17:44:30.971468Z
false
codesnik/calculate-all
https://github.com/codesnik/calculate-all/blob/2e9c79c4d3f75ee6bf890697e624ca2efd0c1229/lib/calculate-all/version.rb
lib/calculate-all/version.rb
module CalculateAll VERSION = "0.4.0" end
ruby
MIT
2e9c79c4d3f75ee6bf890697e624ca2efd0c1229
2026-01-04T17:44:30.971468Z
false
sinisterchipmunk/rspec-prof
https://github.com/sinisterchipmunk/rspec-prof/blob/9e01c8f00753047cf9ba28c7d1332549bfbb7469/features/support/reset_env.rb
features/support/reset_env.rb
After do ENV.delete 'RSPEC_PROFILE' end
ruby
MIT
9e01c8f00753047cf9ba28c7d1332549bfbb7469
2026-01-04T17:44:31.182003Z
false
sinisterchipmunk/rspec-prof
https://github.com/sinisterchipmunk/rspec-prof/blob/9e01c8f00753047cf9ba28c7d1332549bfbb7469/features/support/env.rb
features/support/env.rb
require 'aruba/cucumber' Before do @aruba_timeout_seconds = 60 end
ruby
MIT
9e01c8f00753047cf9ba28c7d1332549bfbb7469
2026-01-04T17:44:31.182003Z
false
sinisterchipmunk/rspec-prof
https://github.com/sinisterchipmunk/rspec-prof/blob/9e01c8f00753047cf9ba28c7d1332549bfbb7469/features/support/spec_helper.rb
features/support/spec_helper.rb
Before do |scenario| step 'a file named "spec/spec_helper.rb" with:', <<-end_file require 'simplecov' require 'coveralls' SimpleCov.start do root "#{File.expand_path('../..', File.dirname(__FILE__))}" coverage_dir 'coverage' SimpleCov.command_name #{scenario.name.inspect} filters...
ruby
MIT
9e01c8f00753047cf9ba28c7d1332549bfbb7469
2026-01-04T17:44:31.182003Z
false
sinisterchipmunk/rspec-prof
https://github.com/sinisterchipmunk/rspec-prof/blob/9e01c8f00753047cf9ba28c7d1332549bfbb7469/features/step_definitions/environment_variable_steps.rb
features/step_definitions/environment_variable_steps.rb
Given(/^the environment variable "(.*?)" is set to "(.*?)"$/) do |arg1, arg2| ENV[arg1] = arg2 end
ruby
MIT
9e01c8f00753047cf9ba28c7d1332549bfbb7469
2026-01-04T17:44:31.182003Z
false
sinisterchipmunk/rspec-prof
https://github.com/sinisterchipmunk/rspec-prof/blob/9e01c8f00753047cf9ba28c7d1332549bfbb7469/features/step_definitions/pass_fail_steps.rb
features/step_definitions/pass_fail_steps.rb
Then(/^it should (pass|fail)$/) do |pass_fail| step "it should #{pass_fail} with:", "" end
ruby
MIT
9e01c8f00753047cf9ba28c7d1332549bfbb7469
2026-01-04T17:44:31.182003Z
false
sinisterchipmunk/rspec-prof
https://github.com/sinisterchipmunk/rspec-prof/blob/9e01c8f00753047cf9ba28c7d1332549bfbb7469/lib/rspec-prof.rb
lib/rspec-prof.rb
require 'fileutils' require 'ruby-prof' require 'rspec/core' require 'rspec-prof/filename_helpers' class RSpecProf extend FilenameHelpers @printer_class = RubyProf::GraphHtmlPrinter class << self attr_accessor :printer_class def profile filename profiler = new.start yield ensure ...
ruby
MIT
9e01c8f00753047cf9ba28c7d1332549bfbb7469
2026-01-04T17:44:31.182003Z
false
sinisterchipmunk/rspec-prof
https://github.com/sinisterchipmunk/rspec-prof/blob/9e01c8f00753047cf9ba28c7d1332549bfbb7469/lib/rspec-prof/filename_helpers.rb
lib/rspec-prof/filename_helpers.rb
class RSpecProf module FilenameHelpers @output_dir = "profiles" @file_extension = "html" class << self attr_accessor :output_dir attr_accessor :file_extension end def output_dir RSpecProf::FilenameHelpers.output_dir end def file_extension RSpecProf::FilenameHelpe...
ruby
MIT
9e01c8f00753047cf9ba28c7d1332549bfbb7469
2026-01-04T17:44:31.182003Z
false
sous-chefs/users
https://github.com/sous-chefs/users/blob/d62a03c765febf45464763207965ab7d6ac523ba/metadata.rb
metadata.rb
name 'users' maintainer 'Sous Chefs' maintainer_email 'help@sous-chefs.org' license 'Apache-2.0' description 'Creates users from a databag search' version '8.1.24' source_url 'https://github.com/sous-chefs/users' issues_url 'https://github.com/sous-chefs/user...
ruby
Apache-2.0
d62a03c765febf45464763207965ab7d6ac523ba
2026-01-04T17:44:31.220288Z
false
sous-chefs/users
https://github.com/sous-chefs/users/blob/d62a03c765febf45464763207965ab7d6ac523ba/test/integration/default/default_spec.rb
test/integration/default/default_spec.rb
os_family = os.family # Test if the groups exist describe group('testgroup') do it { should exist } its('gid') { should eq 3000 } end describe group('nfsgroup') do it { should exist } its('gid') { should eq 4000 } end describe group('emptygroup') do it { should exist } its('gid') { should eq 5000 } if ...
ruby
Apache-2.0
d62a03c765febf45464763207965ab7d6ac523ba
2026-01-04T17:44:31.220288Z
false
sous-chefs/users
https://github.com/sous-chefs/users/blob/d62a03c765febf45464763207965ab7d6ac523ba/test/fixtures/cookbooks/users_test/metadata.rb
test/fixtures/cookbooks/users_test/metadata.rb
name 'users_test' maintainer 'Chef Software, Inc.' maintainer_email 'cookbooks@chef.io' license 'Apache-2.0' description 'Tests the users cookbook' version '1.7.1' depends 'users'
ruby
Apache-2.0
d62a03c765febf45464763207965ab7d6ac523ba
2026-01-04T17:44:31.220288Z
false
sous-chefs/users
https://github.com/sous-chefs/users/blob/d62a03c765febf45464763207965ab7d6ac523ba/test/fixtures/cookbooks/users_test/recipes/default.rb
test/fixtures/cookbooks/users_test/recipes/default.rb
user 'databag_mwaddams' do manage_home true action :nothing end # Get the users from the data bag users = search('test_home_dir', '*:*') # Create the users from the data bag. users_manage 'testgroup' do users users group_id 3000 action [:remove, :create] notifies :create, 'user[databag_mwaddams]', :before...
ruby
Apache-2.0
d62a03c765febf45464763207965ab7d6ac523ba
2026-01-04T17:44:31.220288Z
false
sous-chefs/users
https://github.com/sous-chefs/users/blob/d62a03c765febf45464763207965ab7d6ac523ba/test/fixtures/cookbooks/users_test/attributes/default.rb
test/fixtures/cookbooks/users_test/attributes/default.rb
default['users_test']['users'] = [{ 'username': 'usertoremove', 'action': 'remove', 'groups': %w(nfsgroup), 'force': true, 'manage_home': true, }, { 'id': 'databag_mwaddams', 'action': 'remove', ...
ruby
Apache-2.0
d62a03c765febf45464763207965ab7d6ac523ba
2026-01-04T17:44:31.220288Z
false
sous-chefs/users
https://github.com/sous-chefs/users/blob/d62a03c765febf45464763207965ab7d6ac523ba/recipes/default.rb
recipes/default.rb
# # Cookbook:: users # Recipe:: default # # Copyright:: 2009-2019, Chef Software, Inc. # # 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/licenses/LICENSE-2.0 # # U...
ruby
Apache-2.0
d62a03c765febf45464763207965ab7d6ac523ba
2026-01-04T17:44:31.220288Z
false
sous-chefs/users
https://github.com/sous-chefs/users/blob/d62a03c765febf45464763207965ab7d6ac523ba/recipes/sysadmins.rb
recipes/sysadmins.rb
# # Cookbook:: users # Recipe:: sysadmins # # Copyright:: 2011-2017, Eric G. Wolfe # Copyright:: 2009-2019, Chef Software, Inc. # # 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://...
ruby
Apache-2.0
d62a03c765febf45464763207965ab7d6ac523ba
2026-01-04T17:44:31.220288Z
false
sous-chefs/users
https://github.com/sous-chefs/users/blob/d62a03c765febf45464763207965ab7d6ac523ba/spec/manage_spec.rb
spec/manage_spec.rb
require 'chefspec' users = [{ 'id': 'test_user', 'uid': 9001, 'comment': 'Test User', 'password': '$1$5cE1rI/9$4p0fomh9U4kAI23qUlZVv/', # Do not do this in a production environment. 'shell': '/bin/bash', 'ssh_keys': 'ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAklOUpkDHrfHY17SbrmTIpNLTGK9Tjom/BWDSU\nGPl+nafzlHDTYW7...
ruby
Apache-2.0
d62a03c765febf45464763207965ab7d6ac523ba
2026-01-04T17:44:31.220288Z
false
sous-chefs/users
https://github.com/sous-chefs/users/blob/d62a03c765febf45464763207965ab7d6ac523ba/spec/spec_helper.rb
spec/spec_helper.rb
require 'chefspec' require 'chefspec/berkshelf' RSpec.configure do |config| config.color = true # Use color in STDOUT config.formatter = :documentation # Use the specified formatter config.log_level = :error # Avoid deprecation notice SPAM end
ruby
Apache-2.0
d62a03c765febf45464763207965ab7d6ac523ba
2026-01-04T17:44:31.220288Z
false
sous-chefs/users
https://github.com/sous-chefs/users/blob/d62a03c765febf45464763207965ab7d6ac523ba/libraries/osx_helper.rb
libraries/osx_helper.rb
module Users # Helpers for Users module OsxHelper def dscl(*args) host = '.' stdout_result = '' stderr_result = '' cmd = "dscl #{host} -#{args.join(' ')}" status = shell_out(cmd) status.stdout.each_line { |line| stdout_result << line } status.stderr.each_line { |line| s...
ruby
Apache-2.0
d62a03c765febf45464763207965ab7d6ac523ba
2026-01-04T17:44:31.220288Z
false
sous-chefs/users
https://github.com/sous-chefs/users/blob/d62a03c765febf45464763207965ab7d6ac523ba/libraries/helpers.rb
libraries/helpers.rb
module Users # Helpers for Users module Helpers # Checks fs type. # # @return [String] def fs_type(mount) # Doesn't support macosx stat = shell_out("stat -f -L -c %T #{mount} 2>&1") stat.stdout.chomp rescue 'none' end # Determines if provided mount point is remot...
ruby
Apache-2.0
d62a03c765febf45464763207965ab7d6ac523ba
2026-01-04T17:44:31.220288Z
false
sous-chefs/users
https://github.com/sous-chefs/users/blob/d62a03c765febf45464763207965ab7d6ac523ba/resources/manage.rb
resources/manage.rb
# # Cookbook:: users # Resources:: manage # # Copyright:: 2011-2017, Eric G. Wolfe # # 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/licenses/LICENSE-2.0 # # Unles...
ruby
Apache-2.0
d62a03c765febf45464763207965ab7d6ac523ba
2026-01-04T17:44:31.220288Z
false
jollygoodcode/twemoji
https://github.com/jollygoodcode/twemoji/blob/eecb84f7f2318b5239c5cd72c5323ec7056275f1/test/twemoji_test.rb
test/twemoji_test.rb
require "test_helper" class TwemojiTest < Minitest::Test def setup end def test_number_of_emojis assert_equal 1661, Twemoji.codes.size end def test_twemoji_png_and_svg_not_loaded_by_default assert_raises NameError do Twemoji::PNG Twemoji::SVG end end def test_twemoji_png re...
ruby
MIT
eecb84f7f2318b5239c5cd72c5323ec7056275f1
2026-01-04T17:44:35.040581Z
false
jollygoodcode/twemoji
https://github.com/jollygoodcode/twemoji/blob/eecb84f7f2318b5239c5cd72c5323ec7056275f1/test/test_helper.rb
test/test_helper.rb
# frozen_string_literal: true require "bundler/setup" require "twemoji" require "minitest/autorun" module Twemoji module TestExtensions def assert_nothing_raised yield if block_given? end class DiversityEmoji def self.all BASES.map { |base| diversitify(base) } end BASES...
ruby
MIT
eecb84f7f2318b5239c5cd72c5323ec7056275f1
2026-01-04T17:44:35.040581Z
false
jollygoodcode/twemoji
https://github.com/jollygoodcode/twemoji/blob/eecb84f7f2318b5239c5cd72c5323ec7056275f1/test/configuration_test.rb
test/configuration_test.rb
require "test_helper" class TwemojiConfigurationTest < Minitest::Test def teardown Twemoji.configuration = nil Twemoji.configure {} end def test_configuration_defaults assert_equal "https://twemoji.maxcdn.com/2", Twemoji.configuration.asset_root assert_equal "svg", Twemoji.configuration.file_ext...
ruby
MIT
eecb84f7f2318b5239c5cd72c5323ec7056275f1
2026-01-04T17:44:35.040581Z
false
jollygoodcode/twemoji
https://github.com/jollygoodcode/twemoji/blob/eecb84f7f2318b5239c5cd72c5323ec7056275f1/test/utils/unicode_test.rb
test/utils/unicode_test.rb
require "test_helper" module Twemoji module Utils class UnicodeTest < Minitest::Test def test_unpack result = Twemoji::Utils::Unicode.unpack("🇲🇾") assert_equal "1f1f2-1f1fe", result end end end end
ruby
MIT
eecb84f7f2318b5239c5cd72c5323ec7056275f1
2026-01-04T17:44:35.040581Z
false
jollygoodcode/twemoji
https://github.com/jollygoodcode/twemoji/blob/eecb84f7f2318b5239c5cd72c5323ec7056275f1/lib/twemoji.rb
lib/twemoji.rb
# frozen_string_literal: true require "nokogiri" require "json" require "twemoji/version" require "twemoji/map" require "twemoji/configuration" require "twemoji/utils/unicode" # Twemoji is a Ruby implementation, parses your text, replace emoji text # with corresponding emoji image. Default emoji images are from Twiit...
ruby
MIT
eecb84f7f2318b5239c5cd72c5323ec7056275f1
2026-01-04T17:44:35.040581Z
false
jollygoodcode/twemoji
https://github.com/jollygoodcode/twemoji/blob/eecb84f7f2318b5239c5cd72c5323ec7056275f1/lib/twemoji/version.rb
lib/twemoji/version.rb
# frozen_string_literal: true module Twemoji VERSION = "3.1.8" end
ruby
MIT
eecb84f7f2318b5239c5cd72c5323ec7056275f1
2026-01-04T17:44:35.040581Z
false
jollygoodcode/twemoji
https://github.com/jollygoodcode/twemoji/blob/eecb84f7f2318b5239c5cd72c5323ec7056275f1/lib/twemoji/svg.rb
lib/twemoji/svg.rb
# frozen_string_literal: true module Twemoji def self.svg SVG end SVG = Twemoji.load_yaml(Configuration::SVG_MAP_FILE).freeze private_constant :SVG end
ruby
MIT
eecb84f7f2318b5239c5cd72c5323ec7056275f1
2026-01-04T17:44:35.040581Z
false
jollygoodcode/twemoji
https://github.com/jollygoodcode/twemoji/blob/eecb84f7f2318b5239c5cd72c5323ec7056275f1/lib/twemoji/configuration.rb
lib/twemoji/configuration.rb
# frozen_string_literal: true require "yaml" module Twemoji def self.configuration @configuration ||= Configuration.new end def self.configuration=(configuration) @configuration = configuration end def self.configure yield configuration end def self.load_yaml(path) YAML.safe_load(IO.r...
ruby
MIT
eecb84f7f2318b5239c5cd72c5323ec7056275f1
2026-01-04T17:44:35.040581Z
false
jollygoodcode/twemoji
https://github.com/jollygoodcode/twemoji/blob/eecb84f7f2318b5239c5cd72c5323ec7056275f1/lib/twemoji/map.rb
lib/twemoji/map.rb
# frozen_string_literal: true require "twemoji/configuration" module Twemoji # Emoji Text to Codepoint mappings. # # @example Usage # codes[":heart_eyes:"] # => "1f60d" # codes[":notebook_with_decorative_cover:"] # => "1f4d4" # @return [Hash<String => String>] def self.codes CODES end # Emo...
ruby
MIT
eecb84f7f2318b5239c5cd72c5323ec7056275f1
2026-01-04T17:44:35.040581Z
false
jollygoodcode/twemoji
https://github.com/jollygoodcode/twemoji/blob/eecb84f7f2318b5239c5cd72c5323ec7056275f1/lib/twemoji/png.rb
lib/twemoji/png.rb
# frozen_string_literal: true module Twemoji def self.png PNG end PNG = Twemoji.load_yaml(Configuration::PNG_MAP_FILE).freeze private_constant :PNG end
ruby
MIT
eecb84f7f2318b5239c5cd72c5323ec7056275f1
2026-01-04T17:44:35.040581Z
false
jollygoodcode/twemoji
https://github.com/jollygoodcode/twemoji/blob/eecb84f7f2318b5239c5cd72c5323ec7056275f1/lib/twemoji/utils/unicode.rb
lib/twemoji/utils/unicode.rb
# frozen_string_literal: true module Twemoji module Utils module Unicode # Convert raw unicode to string key version. # # e.g. 🇲🇾 converts to "1f1f2-1f1fe" # # @param unicode [String] Unicode codepoint. # @param connector [String] (optional) connector to join codepoints ...
ruby
MIT
eecb84f7f2318b5239c5cd72c5323ec7056275f1
2026-01-04T17:44:35.040581Z
false
RiotGamesCookbooks/rbenv-cookbook
https://github.com/RiotGamesCookbooks/rbenv-cookbook/blob/a7ae0eedbf678a8ac93456c325f9d69a8ac9d6f3/metadata.rb
metadata.rb
name "rbenv" maintainer "Riot Games" maintainer_email "jamie@vialstudios.com" license "Apache 2.0" description "Installs and configures rbenv" version "1.7.1" recipe "rbenv", "Installs and configures rbenv" recipe "rbenv::ruby_build", "Installs and configures ruby_build" recipe...
ruby
Apache-2.0
a7ae0eedbf678a8ac93456c325f9d69a8ac9d6f3
2026-01-04T17:44:35.905244Z
false
RiotGamesCookbooks/rbenv-cookbook
https://github.com/RiotGamesCookbooks/rbenv-cookbook/blob/a7ae0eedbf678a8ac93456c325f9d69a8ac9d6f3/test/fixtures/cookbooks/fake/metadata.rb
test/fixtures/cookbooks/fake/metadata.rb
name 'fake' version '1.0.0' depends 'rbenv'
ruby
Apache-2.0
a7ae0eedbf678a8ac93456c325f9d69a8ac9d6f3
2026-01-04T17:44:35.905244Z
false
RiotGamesCookbooks/rbenv-cookbook
https://github.com/RiotGamesCookbooks/rbenv-cookbook/blob/a7ae0eedbf678a8ac93456c325f9d69a8ac9d6f3/test/fixtures/cookbooks/fake/recipes/gem_install.rb
test/fixtures/cookbooks/fake/recipes/gem_install.rb
include_recipe 'fake::ruby_install' rbenv_gem 'bundler' do ruby_version node['fake']['ruby_version'] version '1.3.5' end
ruby
Apache-2.0
a7ae0eedbf678a8ac93456c325f9d69a8ac9d6f3
2026-01-04T17:44:35.905244Z
false
RiotGamesCookbooks/rbenv-cookbook
https://github.com/RiotGamesCookbooks/rbenv-cookbook/blob/a7ae0eedbf678a8ac93456c325f9d69a8ac9d6f3/test/fixtures/cookbooks/fake/recipes/ruby_install.rb
test/fixtures/cookbooks/fake/recipes/ruby_install.rb
include_recipe 'rbenv::default' include_recipe 'rbenv::ruby_build' rbenv_ruby node['fake']['ruby_version'] do global true end
ruby
Apache-2.0
a7ae0eedbf678a8ac93456c325f9d69a8ac9d6f3
2026-01-04T17:44:35.905244Z
false
RiotGamesCookbooks/rbenv-cookbook
https://github.com/RiotGamesCookbooks/rbenv-cookbook/blob/a7ae0eedbf678a8ac93456c325f9d69a8ac9d6f3/test/fixtures/cookbooks/fake/attributes/default.rb
test/fixtures/cookbooks/fake/attributes/default.rb
default['fake']['ruby_version'] = '1.9.3-p448'
ruby
Apache-2.0
a7ae0eedbf678a8ac93456c325f9d69a8ac9d6f3
2026-01-04T17:44:35.905244Z
false
RiotGamesCookbooks/rbenv-cookbook
https://github.com/RiotGamesCookbooks/rbenv-cookbook/blob/a7ae0eedbf678a8ac93456c325f9d69a8ac9d6f3/recipes/default.rb
recipes/default.rb
# # Cookbook Name:: rbenv # Recipe:: default # # Author:: Jamie Winsor (<jamie@vialstudios.com>) # # Copyright 2011-2012, Riot Games # # 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 # # ht...
ruby
Apache-2.0
a7ae0eedbf678a8ac93456c325f9d69a8ac9d6f3
2026-01-04T17:44:35.905244Z
false
RiotGamesCookbooks/rbenv-cookbook
https://github.com/RiotGamesCookbooks/rbenv-cookbook/blob/a7ae0eedbf678a8ac93456c325f9d69a8ac9d6f3/recipes/ohai_plugin.rb
recipes/ohai_plugin.rb
# # Cookbook Name:: rbenv # Recipe:: ohai_plugin # # Author:: Jamie Winsor (<jamie@vialstudios.com>) # # Copyright 2011-2012, Riot Games # # 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 # # ...
ruby
Apache-2.0
a7ae0eedbf678a8ac93456c325f9d69a8ac9d6f3
2026-01-04T17:44:35.905244Z
false
RiotGamesCookbooks/rbenv-cookbook
https://github.com/RiotGamesCookbooks/rbenv-cookbook/blob/a7ae0eedbf678a8ac93456c325f9d69a8ac9d6f3/recipes/ruby_build.rb
recipes/ruby_build.rb
# # Cookbook Name:: rbenv # Recipe:: ruby_build # # Author:: Jamie Winsor (<jamie@vialstudios.com>) # # Copyright 2011-2012, Riot Games # # 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 # # ...
ruby
Apache-2.0
a7ae0eedbf678a8ac93456c325f9d69a8ac9d6f3
2026-01-04T17:44:35.905244Z
false
RiotGamesCookbooks/rbenv-cookbook
https://github.com/RiotGamesCookbooks/rbenv-cookbook/blob/a7ae0eedbf678a8ac93456c325f9d69a8ac9d6f3/recipes/rbenv_vars.rb
recipes/rbenv_vars.rb
# # Cookbook Name:: rbenv # Recipe:: rbenv_vars # # Author:: Deepak Kannan (<kannan.deepak@gmail.com>) # # Copyright 2011-2012, Riot Games # # 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 # # ...
ruby
Apache-2.0
a7ae0eedbf678a8ac93456c325f9d69a8ac9d6f3
2026-01-04T17:44:35.905244Z
false
RiotGamesCookbooks/rbenv-cookbook
https://github.com/RiotGamesCookbooks/rbenv-cookbook/blob/a7ae0eedbf678a8ac93456c325f9d69a8ac9d6f3/providers/ruby.rb
providers/ruby.rb
# # Cookbook Name:: rbenv # Provider:: ruby # # Author:: Jamie Winsor (<jamie@vialstudios.com>) # # Copyright 2011-2012, Riot Games # # 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 # # htt...
ruby
Apache-2.0
a7ae0eedbf678a8ac93456c325f9d69a8ac9d6f3
2026-01-04T17:44:35.905244Z
false
RiotGamesCookbooks/rbenv-cookbook
https://github.com/RiotGamesCookbooks/rbenv-cookbook/blob/a7ae0eedbf678a8ac93456c325f9d69a8ac9d6f3/providers/execute.rb
providers/execute.rb
# # Cookbook Name:: rbenv # Provider:: execute # # Author:: Jamie Winsor (<jamie@vialstudios.com>) # include Chef::Mixin::Rbenv def load_current_resource @path = [ rbenv_shims_path, rbenv_bin_path ] + new_resource.path + system_path @environment = new_resource.environment ...
ruby
Apache-2.0
a7ae0eedbf678a8ac93456c325f9d69a8ac9d6f3
2026-01-04T17:44:35.905244Z
false
RiotGamesCookbooks/rbenv-cookbook
https://github.com/RiotGamesCookbooks/rbenv-cookbook/blob/a7ae0eedbf678a8ac93456c325f9d69a8ac9d6f3/attributes/default.rb
attributes/default.rb
# # Cookbook Name:: rbenv # Attributes:: default # # Author:: Jamie Winsor (<jamie@vialstudios.com>) # # Copyright 2011-2012, Riot Games # # 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 # # ...
ruby
Apache-2.0
a7ae0eedbf678a8ac93456c325f9d69a8ac9d6f3
2026-01-04T17:44:35.905244Z
false
RiotGamesCookbooks/rbenv-cookbook
https://github.com/RiotGamesCookbooks/rbenv-cookbook/blob/a7ae0eedbf678a8ac93456c325f9d69a8ac9d6f3/libraries/provider_rbenv_rubygems.rb
libraries/provider_rbenv_rubygems.rb
# # Cookbook Name:: rbenv # Library:: provider_rbenv_rubygems # # Author:: Jamie Winsor (<jamie@vialstudios.com>) # # Copyright 2011-2012, Riot Games # # 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 Lice...
ruby
Apache-2.0
a7ae0eedbf678a8ac93456c325f9d69a8ac9d6f3
2026-01-04T17:44:35.905244Z
false
RiotGamesCookbooks/rbenv-cookbook
https://github.com/RiotGamesCookbooks/rbenv-cookbook/blob/a7ae0eedbf678a8ac93456c325f9d69a8ac9d6f3/libraries/chef_mixin_rbenv.rb
libraries/chef_mixin_rbenv.rb
# # Cookbook Name:: rbenv # Library:: mixin_rbenv # # Author:: Jamie Winsor (<jamie@vialstudios.com>) # # Copyright 2011-2012, Riot Games # # 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 # # ...
ruby
Apache-2.0
a7ae0eedbf678a8ac93456c325f9d69a8ac9d6f3
2026-01-04T17:44:35.905244Z
false
RiotGamesCookbooks/rbenv-cookbook
https://github.com/RiotGamesCookbooks/rbenv-cookbook/blob/a7ae0eedbf678a8ac93456c325f9d69a8ac9d6f3/libraries/matchers.rb
libraries/matchers.rb
# # Cookbook Name:: rbenv # Library:: matchers # # Author:: Kai Forsthoevel (<kai.forsthoevel@injixo.com>) # # Copyright 2014, injixo # # 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 # # h...
ruby
Apache-2.0
a7ae0eedbf678a8ac93456c325f9d69a8ac9d6f3
2026-01-04T17:44:35.905244Z
false
RiotGamesCookbooks/rbenv-cookbook
https://github.com/RiotGamesCookbooks/rbenv-cookbook/blob/a7ae0eedbf678a8ac93456c325f9d69a8ac9d6f3/libraries/chef_mixin_ruby_build.rb
libraries/chef_mixin_ruby_build.rb
# # Cookbook Name:: rbenv # Library:: mixin_ruby_build # # Author:: Jamie Winsor (<jamie@vialstudios.com>) # # Copyright 2011-2012, Riot Games # # 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 ...
ruby
Apache-2.0
a7ae0eedbf678a8ac93456c325f9d69a8ac9d6f3
2026-01-04T17:44:35.905244Z
false
RiotGamesCookbooks/rbenv-cookbook
https://github.com/RiotGamesCookbooks/rbenv-cookbook/blob/a7ae0eedbf678a8ac93456c325f9d69a8ac9d6f3/libraries/recipe_ext.rb
libraries/recipe_ext.rb
# # Cookbook Name:: rbenv # Library:: recipe_ext # # Author:: Jamie Winsor (<jamie@vialstudios.com>) # # Copyright 2011-2012, Riot Games # # 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 # # ...
ruby
Apache-2.0
a7ae0eedbf678a8ac93456c325f9d69a8ac9d6f3
2026-01-04T17:44:35.905244Z
false
RiotGamesCookbooks/rbenv-cookbook
https://github.com/RiotGamesCookbooks/rbenv-cookbook/blob/a7ae0eedbf678a8ac93456c325f9d69a8ac9d6f3/libraries/resource_ext.rb
libraries/resource_ext.rb
# # Cookbook Name:: rbenv # Library:: resource_ext # # Author:: Jamie Winsor (<jamie@vialstudios.com>) # # Copyright 2011-2012, Riot Games # # 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 # # ...
ruby
Apache-2.0
a7ae0eedbf678a8ac93456c325f9d69a8ac9d6f3
2026-01-04T17:44:35.905244Z
false
RiotGamesCookbooks/rbenv-cookbook
https://github.com/RiotGamesCookbooks/rbenv-cookbook/blob/a7ae0eedbf678a8ac93456c325f9d69a8ac9d6f3/resources/ruby.rb
resources/ruby.rb
# # Cookbook Name:: rbenv # Resource:: ruby # # Author:: Jamie Winsor (<jamie@vialstudios.com>) # # Copyright 2011-2012, Riot Games # # 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 # # htt...
ruby
Apache-2.0
a7ae0eedbf678a8ac93456c325f9d69a8ac9d6f3
2026-01-04T17:44:35.905244Z
false
RiotGamesCookbooks/rbenv-cookbook
https://github.com/RiotGamesCookbooks/rbenv-cookbook/blob/a7ae0eedbf678a8ac93456c325f9d69a8ac9d6f3/resources/gem.rb
resources/gem.rb
# # Cookbook Name:: rbenv # Resource:: gem # # Author:: Jamie Winsor (<jamie@vialstudios.com>) # # Copyright 2011-2012, Riot Games # # 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...
ruby
Apache-2.0
a7ae0eedbf678a8ac93456c325f9d69a8ac9d6f3
2026-01-04T17:44:35.905244Z
false
RiotGamesCookbooks/rbenv-cookbook
https://github.com/RiotGamesCookbooks/rbenv-cookbook/blob/a7ae0eedbf678a8ac93456c325f9d69a8ac9d6f3/resources/execute.rb
resources/execute.rb
# # Cookbook Name:: rbenv # Resource:: execute # # Author:: Jamie Winsor (<jamie@vialstudios.com>) # actions :run default_action :run attribute :command, kind_of: [String, Array], name_attribute: true attribute :creates, kind_of: String attribute :cwd, kind_of: String attribute :environment, kind_of: Hash, default: H...
ruby
Apache-2.0
a7ae0eedbf678a8ac93456c325f9d69a8ac9d6f3
2026-01-04T17:44:35.905244Z
false
grosser/ruco
https://github.com/grosser/ruco/blob/fb4943b0f554d8f68de6d047591bf882af62bb42/spec/ruco_spec.rb
spec/ruco_spec.rb
require "spec_helper" describe Ruco do it "has a VERSION" do Ruco::OLD_VERSION.should =~ /^\d+\.\d+\.\d+(\.[a-z\d]+)?$/ end end
ruby
MIT
fb4943b0f554d8f68de6d047591bf882af62bb42
2026-01-04T17:44:33.904693Z
false
grosser/ruco
https://github.com/grosser/ruco/blob/fb4943b0f554d8f68de6d047591bf882af62bb42/spec/spec_helper.rb
spec/spec_helper.rb
$LOAD_PATH.unshift 'lib' $ruco_colors = true require 'ruco' require 'timeout' require 'tempfile' silence_warnings do Ruco::Editor::Colors::DEFAULT_THEME = 'spec/fixtures/test.tmTheme' Ruco::OLD_VERSION = Ruco::VERSION Ruco::VERSION = '0.0.0' # so tests dont fail if version gets longer end class Tempfile def ...
ruby
MIT
fb4943b0f554d8f68de6d047591bf882af62bb42
2026-01-04T17:44:33.904693Z
false
grosser/ruco
https://github.com/grosser/ruco/blob/fb4943b0f554d8f68de6d047591bf882af62bb42/spec/ruco/form_spec.rb
spec/ruco/form_spec.rb
require "spec_helper" describe Ruco::Form do let(:form){ Ruco::Form.new('Test', :columns => 30){|value| @result = value } } it "positions cursor in text field" do form.cursor.should == [0, 5] end describe :insert do it "adds label size and input size" do form.insert('abc') form.cursor.sho...
ruby
MIT
fb4943b0f554d8f68de6d047591bf882af62bb42
2026-01-04T17:44:33.904693Z
false
grosser/ruco
https://github.com/grosser/ruco/blob/fb4943b0f554d8f68de6d047591bf882af62bb42/spec/ruco/editor_spec.rb
spec/ruco/editor_spec.rb
require "spec_helper" describe Ruco::Editor do def write(content) File.open(@file,'wb'){|f| f.write(content) } end def read File.binary_read(@file) end def color(c) { :string => ["#718C00", nil], :keyword => ["#8959A8", nil], :instance_variable => ["#C82829", nil], }[c] ...
ruby
MIT
fb4943b0f554d8f68de6d047591bf882af62bb42
2026-01-04T17:44:33.904693Z
false
grosser/ruco
https://github.com/grosser/ruco/blob/fb4943b0f554d8f68de6d047591bf882af62bb42/spec/ruco/status_bar_spec.rb
spec/ruco/status_bar_spec.rb
require "spec_helper" describe Ruco::StatusBar do let(:file){ 'spec/temp.txt' } let(:editor){ Ruco::Editor.new(file, :lines => 5, :columns => 35) } let(:bar){ Ruco::StatusBar.new(editor, :columns => 35) } it "shows name and version" do bar.view.should include("Ruco #{Ruco::VERSION}") end it "shows th...
ruby
MIT
fb4943b0f554d8f68de6d047591bf882af62bb42
2026-01-04T17:44:33.904693Z
false
grosser/ruco
https://github.com/grosser/ruco/blob/fb4943b0f554d8f68de6d047591bf882af62bb42/spec/ruco/history_spec.rb
spec/ruco/history_spec.rb
require "spec_helper" describe Ruco::History do let(:history){ Ruco::History.new(:state => {:x => 1}, :track => [:x], :entries => 3) } it "knows its state" do history.state.should == {:x => 1} end it "can add a state" do history.add :x => 2 history.state.should == {:x => 2} end it "can undo ...
ruby
MIT
fb4943b0f554d8f68de6d047591bf882af62bb42
2026-01-04T17:44:33.904693Z
false
grosser/ruco
https://github.com/grosser/ruco/blob/fb4943b0f554d8f68de6d047591bf882af62bb42/spec/ruco/option_accessor_spec.rb
spec/ruco/option_accessor_spec.rb
require "spec_helper" describe Ruco::OptionAccessor do let(:options){ Ruco::OptionAccessor.new } it "can be accessed like a hash" do options[:xx].should == nil options[:xx] = 1 options[:xx].should == 1 end it "can be written" do options.foo = true options[:foo].should == true end it ...
ruby
MIT
fb4943b0f554d8f68de6d047591bf882af62bb42
2026-01-04T17:44:33.904693Z
false
grosser/ruco
https://github.com/grosser/ruco/blob/fb4943b0f554d8f68de6d047591bf882af62bb42/spec/ruco/tm_theme_spec.rb
spec/ruco/tm_theme_spec.rb
require "spec_helper" describe Ruco::TMTheme do let(:theme){ Ruco::TMTheme.new('spec/fixtures/test.tmTheme') } it "parses foreground/background" do theme.foreground.should == '#4D4D4C' theme.background.should == '#FFFFFF' end it "parses rules" do theme.styles["keyword.operator.class"].should == [...
ruby
MIT
fb4943b0f554d8f68de6d047591bf882af62bb42
2026-01-04T17:44:33.904693Z
false
grosser/ruco
https://github.com/grosser/ruco/blob/fb4943b0f554d8f68de6d047591bf882af62bb42/spec/ruco/file_store_spec.rb
spec/ruco/file_store_spec.rb
require "spec_helper" describe Ruco::FileStore do def mark_all_as_old store.send(:entries).each{|e| File.utime(1,1,e) } end before do @folder = 'spec/sessions' `rm -rf #{@folder}` end after do `rm -rf #{@folder}` end let(:store){ Ruco::FileStore.new(@folder, :keep => 3) } it "can ge...
ruby
MIT
fb4943b0f554d8f68de6d047591bf882af62bb42
2026-01-04T17:44:33.904693Z
false
grosser/ruco
https://github.com/grosser/ruco/blob/fb4943b0f554d8f68de6d047591bf882af62bb42/spec/ruco/application_spec.rb
spec/ruco/application_spec.rb
# encoding: UTF-8 require "spec_helper" describe Ruco::Application do before do `rm -rf ~/.ruco/sessions` `rm #{rucorc} 2>&1` @file = 'spec/temp.txt' write('') end after do `rm #{rucorc} 2>&1` `rm -f #{@file}` end def write(content) File.open(@file,'wb'){|f| f.write(content) } ...
ruby
MIT
fb4943b0f554d8f68de6d047591bf882af62bb42
2026-01-04T17:44:33.904693Z
false
grosser/ruco
https://github.com/grosser/ruco/blob/fb4943b0f554d8f68de6d047591bf882af62bb42/spec/ruco/text_area_spec.rb
spec/ruco/text_area_spec.rb
# encoding: utf-8 require "spec_helper" describe Ruco::TextArea do describe :move do describe 'pages' do it "can move down a page" do text = Ruco::TextArea.new("1\n2\n3\n4\n5\n6\n7\n8\n9\n", :lines => 3, :columns => 3) text.move(:page_down) text.view.should == "3\n4\n5" text...
ruby
MIT
fb4943b0f554d8f68de6d047591bf882af62bb42
2026-01-04T17:44:33.904693Z
false
grosser/ruco
https://github.com/grosser/ruco/blob/fb4943b0f554d8f68de6d047591bf882af62bb42/spec/ruco/command_bar_spec.rb
spec/ruco/command_bar_spec.rb
require "spec_helper" describe Ruco::CommandBar do let(:default_view){ "^W Exit ^S Save ^F Find" } let(:bar){ Ruco::CommandBar.new(:columns => 30) } it "shows shortcuts by default" do bar.view.should == default_view end it "shows less shortcuts when space is low" do bar = Ruco::CommandBar.new...
ruby
MIT
fb4943b0f554d8f68de6d047591bf882af62bb42
2026-01-04T17:44:33.904693Z
false
grosser/ruco
https://github.com/grosser/ruco/blob/fb4943b0f554d8f68de6d047591bf882af62bb42/spec/ruco/array_processor_spec.rb
spec/ruco/array_processor_spec.rb
require "spec_helper" describe Ruco::ArrayProcessor do let(:p){ Ruco::ArrayProcessor.new } before do p.new_line('xxx') end it "is empty by default" do p.lines.should == [[]] end it "parses simple syntax" do p.open_tag('xxx',0) p.close_tag('xxx',3) p.lines.should == [[['xxx',0...3]]] ...
ruby
MIT
fb4943b0f554d8f68de6d047591bf882af62bb42
2026-01-04T17:44:33.904693Z
false
grosser/ruco
https://github.com/grosser/ruco/blob/fb4943b0f554d8f68de6d047591bf882af62bb42/spec/ruco/syntax_parser_spec.rb
spec/ruco/syntax_parser_spec.rb
require "spec_helper" describe Ruco::SyntaxParser do def parse(text, languages=['ruby']) Ruco::SyntaxParser.syntax_for_lines(text, languages) end describe :parse_lines do it "shows positions for simple lines" do parse(["class Foo","end"]).should == [[ ["keyword.control.class.ruby", 0...5],...
ruby
MIT
fb4943b0f554d8f68de6d047591bf882af62bb42
2026-01-04T17:44:33.904693Z
false
grosser/ruco
https://github.com/grosser/ruco/blob/fb4943b0f554d8f68de6d047591bf882af62bb42/spec/ruco/window_spec.rb
spec/ruco/window_spec.rb
require "spec_helper" describe Ruco::Window do let(:window){ Ruco::Window.new(10,10) } describe :crop do let(:window){ Ruco::Window.new(2,4, :line_scroll_threshold => 0, :line_scroll_offset => 1, :column_scroll_threshold => 0, :column_scroll_offset => 1 ) } it "does not mo...
ruby
MIT
fb4943b0f554d8f68de6d047591bf882af62bb42
2026-01-04T17:44:33.904693Z
false
grosser/ruco
https://github.com/grosser/ruco/blob/fb4943b0f554d8f68de6d047591bf882af62bb42/spec/ruco/core_ext/string_spec.rb
spec/ruco/core_ext/string_spec.rb
require "spec_helper" describe String do describe :surrounded_in? do [ ['aba','a',true], ['abcab','ab',true], ['acc','a',false], ['cca','a',false], ['(cca)',['(',')'],true], ['(cca',['(',')'],false], ].each do |text, word, success| it "is #{success} for #{word} in #{...
ruby
MIT
fb4943b0f554d8f68de6d047591bf882af62bb42
2026-01-04T17:44:33.904693Z
false
grosser/ruco
https://github.com/grosser/ruco/blob/fb4943b0f554d8f68de6d047591bf882af62bb42/spec/ruco/core_ext/array_spec.rb
spec/ruco/core_ext/array_spec.rb
require "spec_helper" describe Array do it "is bigger" do [1].should > [0] [1].should_not > [1] end it "is smaller" do [1].should < [2] [1].should_not < [1] end it "is smaller or equal" do [1].should <= [1] [1].should_not <= [0] end it "is bigger or equal" do [1].should >= ...
ruby
MIT
fb4943b0f554d8f68de6d047591bf882af62bb42
2026-01-04T17:44:33.904693Z
false
grosser/ruco
https://github.com/grosser/ruco/blob/fb4943b0f554d8f68de6d047591bf882af62bb42/spec/ruco/core_ext/range_spec.rb
spec/ruco/core_ext/range_spec.rb
require "spec_helper" describe Range do describe :move do it "does not modify the original" do a = 1..3 a.move(3) a.should == (1..3) end it "can move 0" do (1..3).move(0).should == (1..3) end it "can move right" do (1..3).move(1).should == (2..4) end it "c...
ruby
MIT
fb4943b0f554d8f68de6d047591bf882af62bb42
2026-01-04T17:44:33.904693Z
false
grosser/ruco
https://github.com/grosser/ruco/blob/fb4943b0f554d8f68de6d047591bf882af62bb42/lib/ruco.rb
lib/ruco.rb
require 'dispel' require 'language_sniffer' require 'ruco/version' require 'ruco/core_ext/object' require 'ruco/core_ext/string' require 'ruco/core_ext/array' require 'ruco/core_ext/hash' require 'ruco/core_ext/range' require 'ruco/core_ext/file' require 'ruco/position' require 'ruco/history' require 'ruco/option_ac...
ruby
MIT
fb4943b0f554d8f68de6d047591bf882af62bb42
2026-01-04T17:44:33.904693Z
false
grosser/ruco
https://github.com/grosser/ruco/blob/fb4943b0f554d8f68de6d047591bf882af62bb42/lib/ruco/editor_area.rb
lib/ruco/editor_area.rb
module Ruco # everything that does not belong to a text-area # but is needed for Ruco::Editor class EditorArea < TextArea include Ruco::Editor::Colors if defined? Ruco::Editor::Colors # only colorize if all color libs are loaded include Ruco::Editor::LineNumbers include Ruco::Editor::History def ...
ruby
MIT
fb4943b0f554d8f68de6d047591bf882af62bb42
2026-01-04T17:44:33.904693Z
false
grosser/ruco
https://github.com/grosser/ruco/blob/fb4943b0f554d8f68de6d047591bf882af62bb42/lib/ruco/array_processor.rb
lib/ruco/array_processor.rb
module Ruco class ArrayProcessor attr_accessor :lines def initialize @line_number = -1 @lines = [] @open_elements = [] @still_open_elements = [] end def open_tag(name, position) #puts "Open #{name} #{@line_number}:#{position}" @open_elements << [name, position] ...
ruby
MIT
fb4943b0f554d8f68de6d047591bf882af62bb42
2026-01-04T17:44:33.904693Z
false
grosser/ruco
https://github.com/grosser/ruco/blob/fb4943b0f554d8f68de6d047591bf882af62bb42/lib/ruco/status_bar.rb
lib/ruco/status_bar.rb
module Ruco class StatusBar def initialize(editor, options) @editor = editor @options = options end def view columns = @options[:columns] version = "Ruco #{Ruco::VERSION} -- " position = " #{@editor.position.line + 1}:#{@editor.position.column + 1}" indicators = "#{ch...
ruby
MIT
fb4943b0f554d8f68de6d047591bf882af62bb42
2026-01-04T17:44:33.904693Z
false
grosser/ruco
https://github.com/grosser/ruco/blob/fb4943b0f554d8f68de6d047591bf882af62bb42/lib/ruco/version.rb
lib/ruco/version.rb
module Ruco VERSION = Version = "0.5.0" end
ruby
MIT
fb4943b0f554d8f68de6d047591bf882af62bb42
2026-01-04T17:44:33.904693Z
false
grosser/ruco
https://github.com/grosser/ruco/blob/fb4943b0f554d8f68de6d047591bf882af62bb42/lib/ruco/application.rb
lib/ruco/application.rb
module Ruco class Application attr_reader :editor, :status, :command, :options def initialize(file, options) @file, go_to_line = parse_file_and_line(file) @options = OptionAccessor.new(options) change_terminal_title setup_actions setup_keys load_user_config create_c...
ruby
MIT
fb4943b0f554d8f68de6d047591bf882af62bb42
2026-01-04T17:44:33.904693Z
false
grosser/ruco
https://github.com/grosser/ruco/blob/fb4943b0f554d8f68de6d047591bf882af62bb42/lib/ruco/text_field.rb
lib/ruco/text_field.rb
module Ruco class TextField < TextArea def initialize(options) super('', options.merge(:lines => 1)) end def view super.gsub("\n",'') end def value content.gsub("\n",'') end end end
ruby
MIT
fb4943b0f554d8f68de6d047591bf882af62bb42
2026-01-04T17:44:33.904693Z
false
grosser/ruco
https://github.com/grosser/ruco/blob/fb4943b0f554d8f68de6d047591bf882af62bb42/lib/ruco/window.rb
lib/ruco/window.rb
module Ruco class Window OFFSET = 5 attr_accessor :lines, :columns, :left attr_reader :cursor, :top def initialize(lines, columns, options={}) @options = options @options[:line_scroll_threshold] ||= 1 @options[:line_scroll_offset] ||= 1 @options[:column_scroll_threshold] ||=...
ruby
MIT
fb4943b0f554d8f68de6d047591bf882af62bb42
2026-01-04T17:44:33.904693Z
false
grosser/ruco
https://github.com/grosser/ruco/blob/fb4943b0f554d8f68de6d047591bf882af62bb42/lib/ruco/form.rb
lib/ruco/form.rb
module Ruco class Form delegate :move, :delete, :value, :selecting, :selection, :text_in_selection, :to => :text_field def initialize(label, options, &submit) @options = options @label = label.strip + ' ' @submit = submit reset end def view @label + @text_field.view ...
ruby
MIT
fb4943b0f554d8f68de6d047591bf882af62bb42
2026-01-04T17:44:33.904693Z
false
grosser/ruco
https://github.com/grosser/ruco/blob/fb4943b0f554d8f68de6d047591bf882af62bb42/lib/ruco/text_area.rb
lib/ruco/text_area.rb
module Ruco class TextArea SURROUNDING_CHARS = { '<' => '>', '(' => ')', '[' => ']', '{' => '}', '"' => '"', "'" => "'", "`" => "`", '/' => '/' } attr_reader :lines, :selection, :column, :line def initialize(content, options) if content.respond_t...
ruby
MIT
fb4943b0f554d8f68de6d047591bf882af62bb42
2026-01-04T17:44:33.904693Z
false
grosser/ruco
https://github.com/grosser/ruco/blob/fb4943b0f554d8f68de6d047591bf882af62bb42/lib/ruco/command_bar.rb
lib/ruco/command_bar.rb
module Ruco class CommandBar attr_accessor :cursor_line, :form delegate :move, :delete, :insert, :selecting, :selection, :text_in_selection, :to => :form SHORTCUTS = [ '^W Exit', '^S Save', '^F Find', '^R Replace', '^D Delete line', '^G Go to line', '^B Select mo...
ruby
MIT
fb4943b0f554d8f68de6d047591bf882af62bb42
2026-01-04T17:44:33.904693Z
false
grosser/ruco
https://github.com/grosser/ruco/blob/fb4943b0f554d8f68de6d047591bf882af62bb42/lib/ruco/position.rb
lib/ruco/position.rb
module Ruco class Position < Array def initialize(line, column) super([line, column]) end def line=(x) self[0] = x end def column=(x) self[1] = x end alias_method :line, :first alias_method :column, :last end end
ruby
MIT
fb4943b0f554d8f68de6d047591bf882af62bb42
2026-01-04T17:44:33.904693Z
false
grosser/ruco
https://github.com/grosser/ruco/blob/fb4943b0f554d8f68de6d047591bf882af62bb42/lib/ruco/editor.rb
lib/ruco/editor.rb
module Ruco class Editor attr_reader :file attr_reader :text_area attr_reader :history private :text_area delegate :view, :style_map, :cursor, :position, :insert, :indent, :unindent, :delete, :delete_line, :redo, :undo, :save_state, :selecting, :selection, :text_in_selection, :re...
ruby
MIT
fb4943b0f554d8f68de6d047591bf882af62bb42
2026-01-04T17:44:33.904693Z
false
grosser/ruco
https://github.com/grosser/ruco/blob/fb4943b0f554d8f68de6d047591bf882af62bb42/lib/ruco/tm_theme.rb
lib/ruco/tm_theme.rb
require 'plist' module Ruco class TMTheme attr_accessor :background, :foreground, :styles # TODO maybe later... #attr_accessor :name, :uuid, :comment, :line_highlight # not supported in Curses ... #attr_accessor :invisibles, :caret, :selection def initialize(file) raw = Plist.parse_x...
ruby
MIT
fb4943b0f554d8f68de6d047591bf882af62bb42
2026-01-04T17:44:33.904693Z
false
grosser/ruco
https://github.com/grosser/ruco/blob/fb4943b0f554d8f68de6d047591bf882af62bb42/lib/ruco/syntax_parser.rb
lib/ruco/syntax_parser.rb
module Ruco module SyntaxParser # textpow only offers certain syntax TEXTPOW_CONVERT = { 'html+erb' => 'text.html.ruby', 'rhtml' => 'text.html.ruby', } def self.syntax_for_line(line, languages) syntax_for_lines([line], languages).first end cmemoize :syntax_for_line def ...
ruby
MIT
fb4943b0f554d8f68de6d047591bf882af62bb42
2026-01-04T17:44:33.904693Z
false
grosser/ruco
https://github.com/grosser/ruco/blob/fb4943b0f554d8f68de6d047591bf882af62bb42/lib/ruco/history.rb
lib/ruco/history.rb
module Ruco class History attr_accessor :timeout attr_reader :stack, :position def initialize(options) @options = options @options[:entries] ||= 100 @timeout = options.delete(:timeout) || 0 @stack = [{:mutable => false, :created_at => 0, :type => :initial, :state => @options.dele...
ruby
MIT
fb4943b0f554d8f68de6d047591bf882af62bb42
2026-01-04T17:44:33.904693Z
false
grosser/ruco
https://github.com/grosser/ruco/blob/fb4943b0f554d8f68de6d047591bf882af62bb42/lib/ruco/file_store.rb
lib/ruco/file_store.rb
require "digest/md5" require "fileutils" require "ruco/core_ext/file" module Ruco class FileStore def initialize(folder, options={}) @folder = File.expand_path(folder) @options = options end def set(key, value) FileUtils.mkdir_p @folder unless File.exist? @folder File.write(file(...
ruby
MIT
fb4943b0f554d8f68de6d047591bf882af62bb42
2026-01-04T17:44:33.904693Z
false
grosser/ruco
https://github.com/grosser/ruco/blob/fb4943b0f554d8f68de6d047591bf882af62bb42/lib/ruco/option_accessor.rb
lib/ruco/option_accessor.rb
module Ruco # Can be used like a hash, but also allows .key access class OptionAccessor attr_reader :wrapped delegate :[], :[]=, :slice, :to => :wrapped def initialize(wrapped={}) @wrapped = wrapped end def nested(key) Hash[wrapped.map do |k,v| if k.to_s =~ /^#{key}_(.*)$/ ...
ruby
MIT
fb4943b0f554d8f68de6d047591bf882af62bb42
2026-01-04T17:44:33.904693Z
false
grosser/ruco
https://github.com/grosser/ruco/blob/fb4943b0f554d8f68de6d047591bf882af62bb42/lib/ruco/editor/line_numbers.rb
lib/ruco/editor/line_numbers.rb
module Ruco class Editor module LineNumbers LINE_NUMBERS_SPACE = 5 def initialize(content, options) options[:columns] -= LINE_NUMBERS_SPACE if options[:line_numbers] super(content, options) end def view if @options[:line_numbers] number_room = LINE_NUMBE...
ruby
MIT
fb4943b0f554d8f68de6d047591bf882af62bb42
2026-01-04T17:44:33.904693Z
false
grosser/ruco
https://github.com/grosser/ruco/blob/fb4943b0f554d8f68de6d047591bf882af62bb42/lib/ruco/editor/colors.rb
lib/ruco/editor/colors.rb
require 'timeout' module Ruco class Editor module Colors DEFAULT_THEME = File.expand_path('../../../../spec/fixtures/railscasts.tmTheme',__FILE__) STYLING_TIMEOUT = 4 def style_map $ruco_screen && $ruco_screen.options[:foreground] = theme.foreground $ruco_screen && $ruco_screen...
ruby
MIT
fb4943b0f554d8f68de6d047591bf882af62bb42
2026-01-04T17:44:33.904693Z
false
grosser/ruco
https://github.com/grosser/ruco/blob/fb4943b0f554d8f68de6d047591bf882af62bb42/lib/ruco/editor/history.rb
lib/ruco/editor/history.rb
module Ruco class Editor module History attr_reader :history def initialize(content, options) super(content, options) @history = Ruco::History.new((options[:history]||{}).reverse_merge(:state => state, :track => [:content], :entries => options[:undo_stack_size], :timeout => 2)) ...
ruby
MIT
fb4943b0f554d8f68de6d047591bf882af62bb42
2026-01-04T17:44:33.904693Z
false
grosser/ruco
https://github.com/grosser/ruco/blob/fb4943b0f554d8f68de6d047591bf882af62bb42/lib/ruco/core_ext/range.rb
lib/ruco/core_ext/range.rb
class Range # http://stackoverflow.com/questions/699448/ruby-how-do-you-check-whether-a-range-contains-a-subset-of-another-range def overlap?(other) (first <= other.last) and (other.first <= last) end # (1..2).move(2) == (3..4) def move(n) if exclude_end? (first + n)...(last + n) else ...
ruby
MIT
fb4943b0f554d8f68de6d047591bf882af62bb42
2026-01-04T17:44:33.904693Z
false
grosser/ruco
https://github.com/grosser/ruco/blob/fb4943b0f554d8f68de6d047591bf882af62bb42/lib/ruco/core_ext/array.rb
lib/ruco/core_ext/array.rb
# http://snippets.dzone.com/posts/show/5119 class Array def map_with_index! each_with_index do |e, idx| self[idx] = yield(e, idx); end end def map_with_index(&block) dup.map_with_index!(&block) end end # TODO move this to cursor <-> use cursor for calculations class Array def between?(a,b) self....
ruby
MIT
fb4943b0f554d8f68de6d047591bf882af62bb42
2026-01-04T17:44:33.904693Z
false