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
jch/em-irc
https://github.com/jch/em-irc
spec/lib/em-irc/commands_spec.rb
Ruby
mit
19
master
4,795
require 'spec_helper' describe EventMachine::IRC::Commands do subject {EventMachine::IRC::Client.new} context "nick" do it 'should set nick' do subject.should_receive(:send_data).with("NICK jch") subject.nick('jch') end it 'should get nick' do subject.instance_eval {@nick = 'jch'} ...
github
jch/em-irc
https://github.com/jch/em-irc
spec/lib/em-irc/responses_spec.rb
Ruby
mit
19
master
1,259
require 'spec_helper' describe EventMachine::IRC::Responses do subject {EventMachine::IRC::Client.new} def handle(raw_response) parsed = subject.parse_message(raw_response) subject.handle_parsed_message(parsed) end context 'ping' do it 'should respond with pong' do subject.should_receive(:p...
github
jch/em-irc
https://github.com/jch/em-irc
spec/lib/em-irc/client_spec.rb
Ruby
mit
19
master
5,696
require 'spec_helper' describe EventMachine::IRC::Client do context 'configuration' do it 'defaults host to 127.0.0.1' do subject.host.should == '127.0.0.1' end it 'defaults realname to random generated name' do subject.realname.should_not be_blank end it 'defaults port to 6667' do ...
github
jch/em-irc
https://github.com/jch/em-irc
spec/lib/em-irc/dispatcher_spec.rb
Ruby
mit
19
master
1,136
require 'spec_helper' shared_examples_for 'dispatcher' do it 'should delegate connection methods to parent' do module TestServer def post_init send_data "message" end end parent = Class.new do attr_accessor :conn def receive_data(data) EventMachine::stop_event_loo...
github
jch/em-irc
https://github.com/jch/em-irc
lib/em-irc.rb
Ruby
mit
19
master
618
require 'bundler' Bundler.setup :default require 'active_support/core_ext/hash/keys' require 'active_support/core_ext/object/blank' require 'active_support/callbacks' require 'active_support/deprecation' require 'active_support/concern' require 'active_support/core_ext/array/extract_options' require 'eventmachine' req...
github
jch/em-irc
https://github.com/jch/em-irc
lib/em-irc/commands.rb
Ruby
mit
19
master
12,969
module EventMachine module IRC # Client commands # @see http://tools.ietf.org/html/rfc2812 RFC 2812 module Commands # Set connection password # @see http://tools.ietf.org/html/rfc2812#section-3.1.1 3.1.1 Password message def pass(password) send_data("PASS #{password}") end ...
github
jch/em-irc
https://github.com/jch/em-irc
lib/em-irc/dispatcher.rb
Ruby
mit
19
master
852
module EventMachine module IRC # EventMachine connection handler class that dispatches connections back to another object. class Dispatcher < EventMachine::Connection extend Forwardable def_delegators :@parent, :receive_data, :unbind def initialize(options) raise ArgumentError.new("...
github
jch/em-irc
https://github.com/jch/em-irc
lib/em-irc/responses.rb
Ruby
mit
19
master
2,543
module EventMachine module IRC # This module defines callbacks for IRC server responses module Responses extend ActiveSupport::Concern included do class_attribute :server_callbacks server_reply 'PRIVMSG' do |m| who = sender_nick(m[:prefix]) channel = m[:pa...
github
jch/em-irc
https://github.com/jch/em-irc
lib/em-irc/client.rb
Ruby
mit
19
master
4,784
require 'support/dsl_accessor' module EventMachine module IRC class Client include DslAccessor include IRC::Commands include IRC::Responses # EventMachine::Connection object to IRC server # @private attr_accessor :conn # @macro dsl_accessor # Accessor for `$1` ...
github
jch/em-irc
https://github.com/jch/em-irc
lib/support/dsl_accessor.rb
Ruby
mit
19
master
395
module DslAccessor def self.included(base) base.extend Macros end module Macros def dsl_accessor(*keys) keys.map(&:to_s).each do |k| class_eval <<-ACCESSORS attr_writer :#{k} def #{k}(v = nil) if v @#{k} = v else @#{k} ...
github
deees/thrift-rack-middleware
https://github.com/deees/thrift-rack-middleware
Rakefile
Ruby
apache-2.0
19
master
282
require "bundler/gem_tasks" require "rspec/core/rake_task" desc 'Default: run specs.' task :default => :spec desc "Run specs" RSpec::Core::RakeTask.new do |t| t.pattern = "./spec/**/*_spec.rb" # don't need this, it's default. # Put spec opts in a file named .rspec in root end
github
deees/thrift-rack-middleware
https://github.com/deees/thrift-rack-middleware
thrift-rack-middleware.gemspec
Ruby
apache-2.0
19
master
997
# -*- encoding: utf-8 -*- $:.push File.expand_path("../lib", __FILE__) require "thrift/rack_middleware/version" Gem::Specification.new do |s| s.name = "thrift-rack-middleware" s.version = Thrift::Rack::Middleware::VERSION s.authors = ["deees"] s.email = ["tomas.brazys@gmail.com"] s.homep...
github
deees/thrift-rack-middleware
https://github.com/deees/thrift-rack-middleware
spec/rack_middleware_spec.rb
Ruby
apache-2.0
19
master
4,273
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
github
deees/thrift-rack-middleware
https://github.com/deees/thrift-rack-middleware
lib/thrift/rack_middleware.rb
Ruby
apache-2.0
19
master
3,788
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
github
deees/thrift-rack-middleware
https://github.com/deees/thrift-rack-middleware
lib/thrift/rack_middleware/logger.rb
Ruby
apache-2.0
19
master
1,495
require "logger" require "benchmark" module Thrift module Rack module Middleware class Logger def initialize(env) @env = env end def or(logger) @logger = logger if logger self end def create! return self if @logger ...
github
jubianchi/hhvm-cookbook
https://github.com/jubianchi/hhvm-cookbook
metadata.rb
Ruby
mit
19
master
618
name 'hhvm' maintainer 'jubianchi' maintainer_email 'contact@jubianchi.fr' license 'MIT' description 'Installs/Configures hhvm' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) version '0.6.0' depends ...
github
jubianchi/hhvm-cookbook
https://github.com/jubianchi/hhvm-cookbook
Vagrantfile
Ruby
mit
19
master
2,897
# -*- mode: ruby -*- # vi: set ft=ruby : ui = Vagrant::UI::Colored.new hhvm_installation_type = ENV['HHVM_INSTALLATION_TYPE'] || 'package' hhvm_vm_cpus = ENV['HHVM_VM_CPUS'] || 1 hhvm_vm_memory = ENV['HHVM_VM_MEMORY'] || 1024 Vagrant.configure('2') do |config| if hhvm_installation_type == 'source' && hhvm_vm_memory...
github
jubianchi/hhvm-cookbook
https://github.com/jubianchi/hhvm-cookbook
Rakefile
Ruby
mit
19
master
270
require 'rspec/core/rake_task' RSpec::Core::RakeTask.new(:unit) do |task| task.rspec_opts = [].tap do |a| a.push('--color') a.push('--format documentation') end.join(' ') end desc 'Run all tests' task :test => [:unit] task :default => [:test]
github
jubianchi/hhvm-cookbook
https://github.com/jubianchi/hhvm-cookbook
attributes/default.rb
Ruby
mit
19
master
4,852
default['hhvm']['installation_type'] = 'package' # Package installation default['hhvm']['package']['type'] = :default default['hhvm']['package']['debian_release'] = nil # If true, this cookbook will deploy a new repository (hop5.in) to install the 'hhvm' package. # Set to false if you already have 'hhvm' and all depe...
github
jubianchi/hhvm-cookbook
https://github.com/jubianchi/hhvm-cookbook
recipes/_package_rhel.rb
Ruby
mit
19
master
1,190
include_recipe 'yum' if node['hhvm']['setup_centos_epel_repo'] case node['platform_version'].to_f when 6.4, 6.5, 6.6, 6.7 remote_file '/tmp/epel.rpm' do source 'http://ftp.riken.jp/Linux/fedora/epel/6/i386/epel-release-6-8.noarch.rpm' action :create_if_missing end package 'epe...
github
jubianchi/hhvm-cookbook
https://github.com/jubianchi/hhvm-cookbook
recipes/package.rb
Ruby
mit
19
master
279
case node[:platform_family] when 'debian' include_recipe 'hhvm::_package_debian' when 'rhel' include_recipe 'hhvm::_package_rhel' else raise %W(Platform not supported: #{node['platform_family']} (#{node[:platform]}) #{node['platform_version']}).join(' ') end
github
jubianchi/hhvm-cookbook
https://github.com/jubianchi/hhvm-cookbook
recipes/_source_common_hhvm.rb
Ruby
mit
19
master
1,067
hhvm_src = File.join(node['hhvm']['source']['layout']['working_dir'], 'hhvm') env = { 'CMAKE_PREFIX_PATH' => node['hhvm']['source']['layout']['prefix'], 'HPHP_HOME' => hhvm_src } git 'hhvm' do repository node['hhvm']['source']['hhvm_repository'] reference node['hhvm']['source']['hhvm_revision'] destinati...
github
jubianchi/hhvm-cookbook
https://github.com/jubianchi/hhvm-cookbook
recipes/_package_debian.rb
Ruby
mit
19
master
976
include_recipe 'apt' release = node['hhvm']['package']['debian_release'] || case node['platform_version'].to_f when 7...8 'wheezy' when 12.04 'precise' when 13.1 'saucy' when 14.04 'trusty' else raise %W(Platform not supported: #{node['platform_family']} (#{node[:platform]}) #{node['platform_ve...
github
jubianchi/hhvm-cookbook
https://github.com/jubianchi/hhvm-cookbook
recipes/_source_common_glog.rb
Ruby
mit
19
master
621
glog_src = File.join(node['hhvm']['source']['layout']['working_dir'], 'google-glog') subversion 'google-glog' do repository 'http://google-glog.googlecode.com/svn/trunk/' revision 'HEAD' destination glog_src action :sync end execute 'google-glog-configure' do command './configure --prefix='.concat(node['hhv...
github
jubianchi/hhvm-cookbook
https://github.com/jubianchi/hhvm-cookbook
recipes/_source_ubuntu.rb
Ruby
mit
19
master
825
if node[:platform_version] == '12.04' apt_repository 'gcc47' do uri 'http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu' distribution node['lsb']['codename'] components ['main'] end package 'gcc-4.7' package 'g++-4.7' execute 'update-alternatives-g47' do command 'upd...
github
jubianchi/hhvm-cookbook
https://github.com/jubianchi/hhvm-cookbook
recipes/_source_common_libevent.rb
Ruby
mit
19
master
1,865
libevent_src = File.join(node['hhvm']['source']['layout']['working_dir'], 'libevent') git 'libevent' do repository node['hhvm']['source']['libevent_repository'] reference node['hhvm']['source']['libevent_revision'] destination libevent_src action :sync notifies :run, 'execute[libevent-clean]', :immediately e...
github
jubianchi/hhvm-cookbook
https://github.com/jubianchi/hhvm-cookbook
recipes/source.rb
Ruby
mit
19
master
621
case node['platform'] when 'debian', 'ubuntu' unless defined? node['hhvm']['source']['dependencies'][node['platform']][node['platform_version'].to_f] raise %W(Platform not supported: #{node['platform_family']} (#{node['platform']}) #{node['platform_version']}).join(' ') end node['hhvm']['source']['...
github
jubianchi/hhvm-cookbook
https://github.com/jubianchi/hhvm-cookbook
recipes/default.rb
Ruby
mit
19
master
236
case node['hhvm']['installation_type'] when 'source' include_recipe 'hhvm::source' when 'package' include_recipe 'hhvm::package' else raise 'Invalid installation type: '.concat(node['hhvm']['installation_type']) end
github
jubianchi/hhvm-cookbook
https://github.com/jubianchi/hhvm-cookbook
spec/unit/source_spec.rb
Ruby
mit
19
master
2,875
require 'spec_helper' describe 'hhvm::source' do let(:chef_run) { ChefSpec::SoloRunner.new.converge(described_recipe) } it 'Throws an error on unsupported platform' do expect { chef_run }.to raise_error(RuntimeError) end before do stub_command('cat /usr/src/hhvm/hphp/third_party/libev...
github
jubianchi/hhvm-cookbook
https://github.com/jubianchi/hhvm-cookbook
spec/unit/package_spec.rb
Ruby
mit
19
master
3,798
require 'spec_helper' describe 'hhvm::package' do let(:chef_run) { ChefSpec::SoloRunner.new.converge(described_recipe) } it 'Throws an error on unsupported platform' do expect { chef_run }.to raise_error(RuntimeError) end describe 'Debian' do %w(7.0 7.1 7.2 7.4).each do |version| ...
github
jubianchi/hhvm-cookbook
https://github.com/jubianchi/hhvm-cookbook
spec/unit/default_spec.rb
Ruby
mit
19
master
2,104
require 'spec_helper' describe 'hhvm::default' do let(:chef_run) { ChefSpec::SoloRunner.new.converge(described_recipe) } it 'Throws an error on unsupported platform' do expect { chef_run }.to raise_error(RuntimeError) end describe 'Package installation' do let(:chef_run) { ...
github
tripleCC/cocoapods-tdfire-binary
https://github.com/tripleCC/cocoapods-tdfire-binary
Gemfile
Ruby
mit
19
master
234
source 'https://rubygems.org' # Specify your gem's dependencies in cocoapods-tdfire-binary.gemspec gemspec group :development do gem 'cocoapods', '1.2.1' gem 'mocha' gem 'bacon' gem 'mocha-on-bacon' gem 'prettybacon' end
github
tripleCC/cocoapods-tdfire-binary
https://github.com/tripleCC/cocoapods-tdfire-binary
cocoapods-tdfire-binary.gemspec
Ruby
mit
19
master
1,090
# coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'cocoapods-tdfire-binary/gem_version.rb' Gem::Specification.new do |spec| spec.name = 'cocoapods-tdfire-binary' spec.version = CocoapodsTdfireBinary::VERSION spec.authors ...
github
tripleCC/cocoapods-tdfire-binary
https://github.com/tripleCC/cocoapods-tdfire-binary
Rakefile
Ruby
mit
19
master
281
require 'bundler/gem_tasks' def specs(dir) FileList["spec/#{dir}/*_spec.rb"].shuffle.join(' ') end desc 'Runs all the specs' task :spec do sh "bundle exec bacon #{specs('**')}" end task :default => :spec task :console do sh "irb -r cocoapods-tdfire-binary -I ./lib" end
github
tripleCC/cocoapods-tdfire-binary
https://github.com/tripleCC/cocoapods-tdfire-binary
example/test/Example/Podfile
Ruby
mit
19
master
409
source 'git@git.2dfire-inc.com:ios/cocoapods-spec.git' platform :ios, '8.0' #use_frameworks! plugin 'cocoapods-tdfire-binary' tdfire_use_binary! tdfire_use_source_pods ['TDFCelebiFunctions'] target 'test_Example' do pod 'test', :path => '../' pod 'TDFCelebiFunctions' pod 'TDFComponents' pod 'TDFBaseUI' p...
github
tripleCC/cocoapods-tdfire-binary
https://github.com/tripleCC/cocoapods-tdfire-binary
spec/command/binary_spec.rb
Ruby
mit
19
master
258
require File.expand_path('../../spec_helper', __FILE__) module Pod describe Command::Binary do describe 'CLAide' do it 'registers it self' do Command.parse(%w{ binary }).should.be.instance_of Command::Binary end end end end
github
tripleCC/cocoapods-tdfire-binary
https://github.com/tripleCC/cocoapods-tdfire-binary
spec/command/specification_spec.rb
Ruby
mit
19
master
3,684
require File.expand_path('../../spec_helper', __FILE__) module Pod describe Specification do it 'get recursive value' do spec = Specification.new do |s| s.framework = 'UIKit' s.ios.framework = 'CoreGraphics' s.subspec 'boy' do |ss| ss.framework = 'Accounts' ss.i...
github
tripleCC/cocoapods-tdfire-binary
https://github.com/tripleCC/cocoapods-tdfire-binary
lib/cocoapods_plugin.rb
Ruby
mit
19
master
242
require 'cocoapods-tdfire-binary/podfile_dsl' require 'cocoapods-tdfire-binary/specification_dsl' require 'cocoapods-tdfire-binary/binary_cache_cleaner' require 'cocoapods-tdfire-binary/podfile_hook' require 'cocoapods-tdfire-binary/command'
github
tripleCC/cocoapods-tdfire-binary
https://github.com/tripleCC/cocoapods-tdfire-binary
lib/cocoapods-tdfire-binary/binary_cache_cleaner.rb
Ruby
mit
19
master
4,652
require 'fileutils' require 'colored2' require 'cocoapods-tdfire-binary/specification_dsl' require 'cocoapods-tdfire-binary/binary_url_manager' module Pod class Installer old_resolve_dependencies = instance_method(:resolve_dependencies) define_method(:resolve_dependencies) do old_resolve_dependencies.bind(sel...
github
tripleCC/cocoapods-tdfire-binary
https://github.com/tripleCC/cocoapods-tdfire-binary
lib/cocoapods-tdfire-binary/binary_specification_refactor.rb
Ruby
mit
19
master
10,661
require 'cocoapods-tdfire-binary/binary_url_manager' require 'cocoapods-tdfire-binary/binary_state_store' module Pod class Specification #--------------------------------------------------------------------# # => 获取自身以及子组件的属性合并值 #--------------------------------------------------------------------# # d...
github
tripleCC/cocoapods-tdfire-binary
https://github.com/tripleCC/cocoapods-tdfire-binary
lib/cocoapods-tdfire-binary/init_asker.rb
Ruby
mit
19
master
1,563
require 'cocoapods-tdfire-binary/binary_config' module Pod module Tdfire class InitAsker QUESTIONS = { BinaryConfig::SERVER_ROOT_KEY => '输入二进制服务器地址 (比如 http://xxxxx:8080)', BinaryConfig::REPO_URL_KEY => '输入私有源 Git 地址 (比如 https://github.com/tripleCC/PrivateSpecRepo.git)', Binar...
github
tripleCC/cocoapods-tdfire-binary
https://github.com/tripleCC/cocoapods-tdfire-binary
lib/cocoapods-tdfire-binary/binary_url_manager.rb
Ruby
mit
19
master
1,919
require 'cocoapods-tdfire-binary/binary_config' module Pod module Tdfire class BinaryUrlManager def self.pull_url_for_pod_version(pod, version) host + "/frameworks/#{pod}/#{version}/zip" end def self.get_pull_url_for_pod_version(pod, version) c...
github
tripleCC/cocoapods-tdfire-binary
https://github.com/tripleCC/cocoapods-tdfire-binary
lib/cocoapods-tdfire-binary/podfile_hook.rb
Ruby
mit
19
master
3,826
require 'cocoapods-tdfire-binary/binary_state_store' module CocoapodsTdfireBinary Pod::HooksManager.register('cocoapods-tdfire-binary', :pre_install) do |context, _| # 使用 cocoapods package 打包,不使用 carthage 了,不用设置 share schemes # 如果使用 carhtage ,一定要让需要二进制化的 target shared,此 target 不能是 static framework / library ,必须是 ...
github
tripleCC/cocoapods-tdfire-binary
https://github.com/tripleCC/cocoapods-tdfire-binary
lib/cocoapods-tdfire-binary/podfile_dsl.rb
Ruby
mit
19
master
2,816
require 'cocoapods-tdfire-binary/binary_state_store' module Pod class Podfile module DSL # 使用源码依赖的pod def tdfire_use_source_pods(pods) Pod::UI.puts "Tdfire: set use source pods: #{Array(pods).join(', ')}" Pod::Tdfire::BinaryStateStore.use_source_pods = Array(pods) end #...
github
tripleCC/cocoapods-tdfire-binary
https://github.com/tripleCC/cocoapods-tdfire-binary
lib/cocoapods-tdfire-binary/binary_config.rb
Ruby
mit
19
master
2,624
require 'yaml' require 'fileutils' module Pod module Tdfire class BinaryConfig public REPO_URL_KEY = 'repo_url'.freeze SERVER_ROOT_KEY = 'server_host'.freeze TEMPLATE_URL_KEY = 'template_url'.freeze THREE_PARTY_GROUP_KEY = 'third_party_group'.freeze def self.instance ...
github
tripleCC/cocoapods-tdfire-binary
https://github.com/tripleCC/cocoapods-tdfire-binary
lib/cocoapods-tdfire-binary/specification_dsl.rb
Ruby
mit
19
master
4,180
require 'cocoapods-tdfire-binary/binary_state_store' require 'cocoapods-tdfire-binary/binary_specification_refactor' require 'cocoapods-tdfire-binary/binary_config' require 'colored2' module Pod class Specification def tdfire_refactor @refactor ||= Pod::Tdfire::BinarySpecificationRefactor.new(self) end...
github
tripleCC/cocoapods-tdfire-binary
https://github.com/tripleCC/cocoapods-tdfire-binary
lib/cocoapods-tdfire-binary/binary_state_store.rb
Ruby
mit
19
master
1,917
module Pod module Tdfire class BinaryStateStore public class << self # attr_accessor :unpublished_pods attr_accessor :use_source_pods attr_reader :printed_pods attr_accessor :use_frameworks attr_accessor :use_source attr_accessor :limit_platform e...
github
tripleCC/cocoapods-tdfire-binary
https://github.com/tripleCC/cocoapods-tdfire-binary
lib/cocoapods-tdfire-binary/source_chain_analyzer.rb
Ruby
mit
19
master
2,127
module Tdfire class SourceChainAnalyzer def initialize(podfile) @lockfile = generate_lockfile(podfile) @pods_data = @lockfile.internal_data['PODS'] @parent_pods = [] end public def analyze(pods) pods.each do |pod| find_parent_pods(pod, @pods_data) unless @parent_pods.include?(pod) end unl...
github
tripleCC/cocoapods-tdfire-binary
https://github.com/tripleCC/cocoapods-tdfire-binary
lib/cocoapods-tdfire-binary/command/search.rb
Ruby
mit
19
master
1,093
require 'json' require 'cocoapods-tdfire-binary/binary_url_manager' module Pod class Command class Binary < Command class Search < Binary self.abstract_command = false self.summary = '查找二进制版本信息' self.description = <<-DESC 查找二进制版本信息 DESC self.arguments = [ ...
github
tripleCC/cocoapods-tdfire-binary
https://github.com/tripleCC/cocoapods-tdfire-binary
lib/cocoapods-tdfire-binary/command/init.rb
Ruby
mit
19
master
802
require 'cocoapods-tdfire-binary/binary_url_manager' require 'cocoapods-tdfire-binary/init_asker' module Pod class Command class Binary < Command class Init < Binary self.abstract_command = false self.summary = '初始化二进制插件' self.description = <<-DESC 初始化二进制插件 DESC ...
github
tripleCC/cocoapods-tdfire-binary
https://github.com/tripleCC/cocoapods-tdfire-binary
lib/cocoapods-tdfire-binary/command/package.rb
Ruby
mit
19
master
6,195
require 'colored2' require 'fileutils' require 'cocoapods_packager' require 'cocoapods-tdfire-binary/binary_url_manager' require 'cocoapods-tdfire-binary/binary_state_store' require 'cocoapods-tdfire-binary/binary_specification_refactor' module Pod class Command class Binary < Command class Package < Binary ...
github
tripleCC/cocoapods-tdfire-binary
https://github.com/tripleCC/cocoapods-tdfire-binary
lib/cocoapods-tdfire-binary/command/lint.rb
Ruby
mit
19
master
2,027
require 'cocoapods-tdfire-binary/binary_state_store' module Pod class Command class Binary < Command class Lint < Binary self.abstract_command = false self.summary = '对本地组件进行 Lint' self.description = <<-DESC 对本地组件进行 Lint DESC def self.options [ ['--sources', '私有源地址'], ...
github
tripleCC/cocoapods-tdfire-binary
https://github.com/tripleCC/cocoapods-tdfire-binary
lib/cocoapods-tdfire-binary/command/delete.rb
Ruby
mit
19
master
992
require 'cocoapods-tdfire-binary/binary_url_manager' module Pod class Command class Binary < Command class Delete < Binary self.abstract_command = false self.summary = '删除二进制版本' self.description = <<-DESC 将二进制从服务器中删除 DESC self.arguments = [ CLAide:...
github
tripleCC/cocoapods-tdfire-binary
https://github.com/tripleCC/cocoapods-tdfire-binary
lib/cocoapods-tdfire-binary/command/list.rb
Ruby
mit
19
master
810
require 'json' require 'cocoapods-tdfire-binary/binary_url_manager' module Pod class Command class Binary < Command class List < Binary self.abstract_command = false self.summary = '查看所有二进制版本信息' self.description = <<-DESC 查看所有二进制版本信息 DESC def initialize(argv) ...
github
tripleCC/cocoapods-tdfire-binary
https://github.com/tripleCC/cocoapods-tdfire-binary
lib/cocoapods-tdfire-binary/command/push.rb
Ruby
mit
19
master
2,303
require 'cocoapods-tdfire-binary/binary_url_manager' module Pod class Command class Binary < Command class Push < Binary ZIP_SUBFFIX = '.framework.zip' self.abstract_command = false self.summary = '推送二进制 zip 包' self.description = <<-DESC 将二进制 zip 包推送至二进制服务器 DESC self.argument...
github
tripleCC/cocoapods-tdfire-binary
https://github.com/tripleCC/cocoapods-tdfire-binary
lib/cocoapods-tdfire-binary/command/binary.rb
Ruby
mit
19
master
1,057
require 'cocoapods-tdfire-binary/command/lint' require 'cocoapods-tdfire-binary/command/package' require 'cocoapods-tdfire-binary/command/publish' require 'cocoapods-tdfire-binary/command/pull' require 'cocoapods-tdfire-binary/command/push' require 'cocoapods-tdfire-binary/command/assemble' require 'cocoapods-tdfire-bi...
github
tripleCC/cocoapods-tdfire-binary
https://github.com/tripleCC/cocoapods-tdfire-binary
lib/cocoapods-tdfire-binary/command/publish.rb
Ruby
mit
19
master
2,552
require 'cocoapods-tdfire-binary/binary_state_store' module Pod class Command class Binary < Command class Publish < Binary self.abstract_command = false self.summary = '正式发布二进制组件' self.description = <<-DESC 正式发布二进制组件版本 DESC self.arguments = [ CLAid...
github
tripleCC/cocoapods-tdfire-binary
https://github.com/tripleCC/cocoapods-tdfire-binary
lib/cocoapods-tdfire-binary/command/assemble.rb
Ruby
mit
19
master
1,957
require 'cocoapods-tdfire-binary/command/package' require 'cocoapods-tdfire-binary/command/lint' require 'cocoapods-tdfire-binary/command/publish' require 'cocoapods-tdfire-binary/command/push' require 'cocoapods-tdfire-binary/binary_state_store' module Pod class Command class Binary < Command class Assemb...
github
tripleCC/cocoapods-tdfire-binary
https://github.com/tripleCC/cocoapods-tdfire-binary
lib/cocoapods-tdfire-binary/command/lib.rb
Ruby
mit
19
master
433
require 'cocoapods-tdfire-binary/command/lib/create' require 'cocoapods-tdfire-binary/command/lib/import' require 'cocoapods-tdfire-binary/command/lib/upgrade' module Pod class Command class Binary < Command class Lib < Binary self.abstract_command = true self.default_subcommand = 'create' self.summary ...
github
tripleCC/cocoapods-tdfire-binary
https://github.com/tripleCC/cocoapods-tdfire-binary
lib/cocoapods-tdfire-binary/command/pull.rb
Ruby
mit
19
master
1,029
require 'cocoapods-tdfire-binary/binary_url_manager' module Pod class Command class Binary < Command class Pull < Binary self.abstract_command = false self.summary = '下载二进制 zip 包' self.description = <<-DESC 通过 NAME 和 VERSION ,下载二进制 zip 包 DESC self.arguments = [ CLAide::A...
github
tripleCC/cocoapods-tdfire-binary
https://github.com/tripleCC/cocoapods-tdfire-binary
lib/cocoapods-tdfire-binary/command/lib/import.rb
Ruby
mit
19
master
1,810
require 'cocoapods' require 'cocoapods-tdfire-binary/binary_url_manager' module Pod class Command class Binary < Command class Lib < Binary class Import < Lib self.abstract_command = false self.summary = '根据 podspec 生成伞头文件' self.description = <<-DESC 根据 podspec 生成伞头文件...
github
tripleCC/cocoapods-tdfire-binary
https://github.com/tripleCC/cocoapods-tdfire-binary
lib/cocoapods-tdfire-binary/command/lib/upgrade.rb
Ruby
mit
19
master
2,663
require 'cocoapods' require 'cocoapods-tdfire-binary/binary_url_manager' module Pod class Command class Binary < Command class Lib < Binary class Upgrade < Lib self.abstract_command = false self.summary = '更新 podspec 版本' self.description = <<-DESC 更新 podspec 版本 ...
github
tripleCC/cocoapods-tdfire-binary
https://github.com/tripleCC/cocoapods-tdfire-binary
lib/cocoapods-tdfire-binary/command/lib/create.rb
Ruby
mit
19
master
927
require 'cocoapods-tdfire-binary/binary_url_manager' module Pod class Command class Binary < Command class Lib < Binary class Create < Lib self.abstract_command = false self.summary = '创建二进制模版库' self.description = <<-DESC 创建二进制模版库 DESC self.arguments = [ CLAi...
github
cmckni3/ruby-jasperserver
https://github.com/cmckni3/ruby-jasperserver
Gemfile
Ruby
mit
19
master
507
source 'https://rubygems.org' gem 'bundler', '>= 1.8.4' # Declare your gem's dependencies in jasperserver-rails.gemspec. # Bundler will treat runtime dependencies like base dependencies, and # development dependencies will be added by default to the :development group. gemspec # jquery-rails is used by the dummy app...
github
cmckni3/ruby-jasperserver
https://github.com/cmckni3/ruby-jasperserver
jasperserver-rails.gemspec
Ruby
mit
19
master
661
$:.push File.expand_path("../lib", __FILE__) require "jasperserver-rails/version" Gem::Specification.new do |s| s.name = "jasperserver-rails" s.version = JasperserverRails::VERSION s.authors = ["Chris McKnight"] s.email = ["cmckni3@gmail.com"] s.homepage = "http://github.com/cmckni3/...
github
cmckni3/ruby-jasperserver
https://github.com/cmckni3/ruby-jasperserver
Rakefile
Ruby
mit
19
master
811
#!/usr/bin/env rake begin require 'bundler/setup' rescue LoadError puts 'You must `gem install bundler` and `bundle install` to run rake tasks' end begin require 'rdoc/task' rescue LoadError require 'rdoc/rdoc' require 'rake/rdoctask' RDoc::Task = Rake::RDocTask end RDoc::Task.new(:rdoc) do |rdoc| rdoc.r...
github
cmckni3/ruby-jasperserver
https://github.com/cmckni3/ruby-jasperserver
test/jasperserver-rails_test.rb
Ruby
mit
19
master
3,083
require 'test_helper' require 'vcr' VCR.configure do |c| jasper_config = Rails.configuration.jasperserver[Rails.env.to_sym] c.cassette_library_dir = 'test/fixtures/vcr_cassettes' c.hook_into :webmock c.default_cassette_options = { record: :none, erb: true } c.filter_sensitive_data('<USERNAME>') { jasper_con...
github
cmckni3/ruby-jasperserver
https://github.com/cmckni3/ruby-jasperserver
test/dummy/config/application.rb
Ruby
mit
19
master
2,567
require File.expand_path('../boot', __FILE__) require 'rails/all' Bundler.require require "jasperserver-rails" module Dummy class Application < Rails::Application # Settings in config/environments/* take precedence over those specified here. # Application configuration should go into files in config/initia...
github
cmckni3/ruby-jasperserver
https://github.com/cmckni3/ruby-jasperserver
test/dummy/config/initializers/secret_token.rb
Ruby
mit
19
master
496
# Be sure to restart your server when you modify this file. # Your secret key for verifying the integrity of signed cookies. # If you change this key, all old signed cookies will become invalid! # Make sure the secret is at least 30 characters and all random, # no regular words or you'll be exposed to dictionary attac...
github
cmckni3/ruby-jasperserver
https://github.com/cmckni3/ruby-jasperserver
lib/generators/jasperserver_rails/install/install_generator.rb
Ruby
mit
19
master
354
module JasperserverRails module Generators class InstallGenerator < ::Rails::Generators::Base source_root File.expand_path('../templates', __FILE__) def copy_initializer copy_file 'initializer.rb', 'config/initializers/jasperserver.rb' copy_file 'jasperserver.yml', 'config/jasperserve...
github
cmckni3/ruby-jasperserver
https://github.com/cmckni3/ruby-jasperserver
lib/jasperserver-rails/jasperserver-dsl.rb
Ruby
mit
19
master
1,702
require 'fileutils' require 'uri' require 'rest-client' module JasperserverRails class Jasperserver class_eval do [:report, :format, :params].each do |method| define_method method do |arg| arg = arg.collect { |key, value| [key, value] } if method == :params instance_variable_set ...
github
achiurizo/mplayer-ruby
https://github.com/achiurizo/mplayer-ruby
mplayer-ruby.gemspec
Ruby
mit
19
master
755
Gem::Specification.new do |s| s.name = %q{mplayer-ruby} s.version = "0.1.0" s.required_rubygems_version = '1.3.6' s.authors = ["Arthur Chiu"] s.date = %q{2010-02-01} s.description = %q{A Ruby wrapper for MPlayer} s.email = %q{mr.arthur.chiu@gmail.com} s.extra_rdoc_files = Dir["*.rdoc"] s.files = ["LIC...
github
achiurizo/mplayer-ruby
https://github.com/achiurizo/mplayer-ruby
Rakefile
Ruby
mit
19
master
1,071
require 'rubygems' require 'rake' require 'rake/testtask' Rake::TestTask.new(:test) do |test| test.libs << 'lib' << 'test' test.pattern = 'test/**/*_test.rb' test.verbose = true end begin require 'rcov/rcovtask' Rcov::RcovTask.new do |test| test.libs << 'test' test.pattern = 'test/**/*_test.rb' ...
github
achiurizo/mplayer-ruby
https://github.com/achiurizo/mplayer-ruby
test/teststrap.rb
Ruby
mit
19
master
936
require 'rubygems' require 'riot' require 'riot/rr' $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) require 'mplayer-ruby' Riot.reporter = Riot::DotMatrixReporter class Riot::Situation # mocks stdin def mock_stdin(player,input,output="") mock(player.stdin).puts(input) { output } end ...
github
achiurizo/mplayer-ruby
https://github.com/achiurizo/mplayer-ruby
test/slave_sub_commands_test.rb
Ruby
mit
19
master
6,692
require File.expand_path("teststrap", File.dirname(__FILE__)) context "MPlayer::SlaveSubCommands" do setup_player context "sub_delay" do context "absolute" do setup { mock_stdin @player, "sub_delay 5 1" } asserts("sub_delay 5") { @player.sub_delay 5 } end context "explicit absolute" d...
github
achiurizo/mplayer-ruby
https://github.com/achiurizo/mplayer-ruby
test/slave_test.rb
Ruby
mit
19
master
865
require File.expand_path("teststrap", File.dirname(__FILE__)) context "MPlayer::Player" do setup do mock(Open4).popen4("/usr/bin/mplayer -slave -quiet test/test.mp3") { [true,true,true,true] } stub(true).gets { "playback" } @player = MPlayer::Slave.new('test/test.mp3') end asserts("invalid file") { M...
github
achiurizo/mplayer-ruby
https://github.com/achiurizo/mplayer-ruby
test/slave_video_commands_test.rb
Ruby
mit
19
master
12,294
require File.expand_path("teststrap", File.dirname(__FILE__)) context "MPlayer::SlaveVideoCommands" do setup_player context "audio_delay" do context "by relative" do setup { mock_stdin @player, "audio_delay 5 0" } asserts("audio_delay 5") { @player.audio_delay 5 } end context "explicitly...
github
achiurizo/mplayer-ruby
https://github.com/achiurizo/mplayer-ruby
test/slave_tv_commands_test.rb
Ruby
mit
19
master
3,357
require File.expand_path("teststrap", File.dirname(__FILE__)) context "MPlayer::SlaveTvCommands" do setup_player context "tv_start_scan" do setup { mock_stdin @player, "tv_start_scan" ; @player} asserts("tv_start_scan") { @player.tv_start_scan } end context "tv_step_channel" do context "next"...
github
achiurizo/mplayer-ruby
https://github.com/achiurizo/mplayer-ruby
test/slave_commands_test.rb
Ruby
mit
19
master
8,263
require File.expand_path("teststrap", File.dirname(__FILE__)) context "MPlayer::SlaveCommands" do setup_player context "pause" do setup { mock_command @player, "pause" } asserts("returns true") { @player.pause } end context "quit" do setup do mock_command @player, "quit" mock(@player....
github
achiurizo/mplayer-ruby
https://github.com/achiurizo/mplayer-ruby
examples/general_playback.rb
Ruby
mit
19
master
1,434
require File.join(File.dirname(__FILE__),'..','lib','mplayer-ruby') @player = MPlayer::Slave.new '/Volumes/Storage/Music/segundo.ogg', :path => '/usr/bin/mplayer' #defauults to /usr/bin/mplayer puts @player.volume :up sleep 5 puts @player.volume :down sleep 5 puts @player.volume :set, 60 sleep 5 # load file and play ...
github
achiurizo/mplayer-ruby
https://github.com/achiurizo/mplayer-ruby
lib/mplayer-ruby.rb
Ruby
mit
19
master
397
require 'rubygems' require 'open4' require 'active_support/core_ext/hash' require File.dirname(__FILE__) + '/mplayer-ruby/slave_commands' require File.dirname(__FILE__) + '/mplayer-ruby/slave_video_commands' require File.dirname(__FILE__) + '/mplayer-ruby/slave_tv_commands' require File.dirname(__FILE__) + '/mplayer-ru...
github
achiurizo/mplayer-ruby
https://github.com/achiurizo/mplayer-ruby
lib/mplayer-ruby/slave_commands.rb
Ruby
mit
19
master
6,238
module MPlayer module SlaveCommands # Increase/decrease volume # :up increase volume # :down decreases volume # :set sets the volume at <value> def volume(action,value=30) cmd = case action when :up then "volume 1" when :down then "volume 0" when :set then "volume #{v...
github
achiurizo/mplayer-ruby
https://github.com/achiurizo/mplayer-ruby
lib/mplayer-ruby/slave_video_commands.rb
Ruby
mit
19
master
7,647
module MPlayer module SlaveVideoCommands # Set/adjust the audio delay. # If type is :relative adjust the delay by <value> seconds. # If type is :absolute, set the delay to <value> seconds. def audio_delay(value,type = :relative) adjust_set :audio_delay, value, type end # Toggle...
github
achiurizo/mplayer-ruby
https://github.com/achiurizo/mplayer-ruby
lib/mplayer-ruby/slave_sub_commands.rb
Ruby
mit
19
master
3,774
module MPlayer module SlaveSubCommands # Adjust the subtitle delay # :relative is adjust by +/- <value> seconds. # :absolute is set it to <value>. (default) def sub_delay(value,type = :absolute) adjust_set :sub_delay, value, type end # Step forward in the subtitle list by <value> s...
github
achiurizo/mplayer-ruby
https://github.com/achiurizo/mplayer-ruby
lib/mplayer-ruby/slave.rb
Ruby
mit
19
master
2,016
module MPlayer class Slave attr_accessor :stdin attr_reader :pid,:stdout,:stderr,:file include MPlayer::SlaveCommands include MPlayer::SlaveVideoCommands include MPlayer::SlaveTvCommands include MPlayer::SlaveSubCommands # Initializes a new instance of MPlayer. # set :path to point t...
github
achiurizo/mplayer-ruby
https://github.com/achiurizo/mplayer-ruby
lib/mplayer-ruby/slave_tv_commands.rb
Ruby
mit
19
master
2,596
module MPlayer module SlaveTvCommands # Start automatic TV channel scanning def tv_start_scan command("tv_start_scan") end # Select the next/previous TV Channel # :next selects next channel # :prev select previous channel def tv_step_channel(action) value = action == ...
github
t3hk0d3/ruby_faceapp
https://github.com/t3hk0d3/ruby_faceapp
faceapp.gemspec
Ruby
mit
19
master
1,054
# 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 = 'faceapp' spec.version = '0.1.1' spec.authors = ['Igor Yamolov'] spec.email = ['clouster@yandex.ru'] spec.summary ...
github
t3hk0d3/ruby_faceapp
https://github.com/t3hk0d3/ruby_faceapp
lib/faceapp/cli.rb
Ruby
mit
19
master
3,158
require 'logger' require 'faceapp' module Faceapp class CLI attr_reader :params, :options, :debug, :silent OPTION_REGEXP = /\A--(?<name>[^=]+)(?:=(?<value>.+))?\Z/ PARAMS = [:filter, :input, :output].freeze def initialize(args) @params, @options = parse_arguments(args) end def run! ...
github
t3hk0d3/ruby_faceapp
https://github.com/t3hk0d3/ruby_faceapp
lib/faceapp/client.rb
Ruby
mit
19
master
3,394
require 'uri' require 'json' require 'openssl' require 'net/http' require 'net/http/post/multipart' module Faceapp class Client DEFAULT_API_HOST = 'https://node-01.faceapp.io'.freeze DEFAULT_USER_AGENT = 'FaceApp/1.0.229 (Linux; Android 4.4)'.freeze DEVICE_ID_LENGTH = 8 DEVICE_ID_LETTERS = ('a'..'z'...
github
t3hk0d3/ruby_faceapp
https://github.com/t3hk0d3/ruby_faceapp
spec/spec_helper.rb
Ruby
mit
19
master
270
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) require 'faceapp' require 'webmock/rspec' require 'vcr' VCR.configure do |config| config.cassette_library_dir = 'spec/support/vcr_cassettes' config.hook_into :webmock config.configure_rspec_metadata! end
github
t3hk0d3/ruby_faceapp
https://github.com/t3hk0d3/ruby_faceapp
spec/faceapp/client_spec.rb
Ruby
mit
19
master
2,840
require 'spec_helper' describe Faceapp::Client do subject { described_class.new(options) } let(:options) do { device_id: 'latifwch' } end describe '#upload_photo' do let(:test_photo_path) { File.expand_path('../../support/hitler.jpg', __FILE__) } context 'success', vcr: { cassette_name: 'upload_...
github
akdarrah/dropkiq-gem
https://github.com/akdarrah/dropkiq-gem
dropkiq.gemspec
Ruby
mit
19
master
2,312
lib = File.expand_path("../lib", __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require "dropkiq/version" Gem::Specification.new do |spec| spec.name = "dropkiq" spec.version = Dropkiq::VERSION spec.authors = ["Adam Darrah"] spec.email = ["adam@dropkiq.com"] sp...
github
akdarrah/dropkiq-gem
https://github.com/akdarrah/dropkiq-gem
test/test_records.rb
Ruby
mit
19
master
880
module TestRecords def setup_records person = Person.create!({ name: "John Doe", active: true, notes: "A banana is an edible fruit – botanically a berry – produced by several kinds of large herbaceous flowering plants in the genus Musa. In some countries, bananas used for cooking may be called \...
github
akdarrah/dropkiq-gem
https://github.com/akdarrah/dropkiq-gem
test/test_database.rb
Ruby
mit
19
master
1,636
db_config = YAML.load_file(File.expand_path("../database.yml", __FILE__)).fetch(ENV["DB"] || "sqlite") ActiveRecord::Base.establish_connection(db_config) ActiveRecord::Schema.verbose = false module TestDatabase def setup_db # sqlite cannot drop/rename/alter columns and add constraints after table creation sq...
github
akdarrah/dropkiq-gem
https://github.com/akdarrah/dropkiq-gem
test/test_helper.rb
Ruby
mit
19
master
403
$LOAD_PATH.unshift File.expand_path("../../lib", __FILE__) require "dropkiq" require "test_database" require "test_concerns" require "test_models" require "test_drops" require "test_records" require "minitest/autorun" require 'minitest/unit' require 'mocha/minitest' require "minitest/focus" def setup_test_scaffoldi...
github
akdarrah/dropkiq-gem
https://github.com/akdarrah/dropkiq-gem
test/test_concerns.rb
Ruby
mit
19
master
575
# https://github.com/Shopify/liquid/pull/568 module LiquidMethods extend ActiveSupport::Concern module ClassMethods def liquid_methods(*allowed_methods) drop_class = eval "class #{self}::LiquidDropClass < Liquid::Drop; self; end" define_method :to_liquid do drop_class.new(self) end ...
github
akdarrah/dropkiq-gem
https://github.com/akdarrah/dropkiq-gem
test/test_models.rb
Ruby
mit
19
master
687
class Person < ActiveRecord::Base include LiquidMethods has_and_belongs_to_many :tags liquid_methods :name # Case when an association is defined by mistake belongs_to :unknown belongs_to :group has_one :group_owner, through: :group, source: :owner end class Tag < ActiveRecord::Base has_and_b...
github
akdarrah/dropkiq-gem
https://github.com/akdarrah/dropkiq-gem
test/test_drops.rb
Ruby
mit
19
master
1,172
class GroupDrop < Liquid::Drop def initialize(group) @group = group end def name @group["name"] end def owner PersonDrop.new(@group.owner) end def people @group.people.map{|p| PersonDrop.new(p)} end end class TagDrop < Liquid::Drop def initialize(tag) @tag = tag end def na...
github
akdarrah/dropkiq-gem
https://github.com/akdarrah/dropkiq-gem
test/dropkiq/drop_method_instance_simulator_test.rb
Ruby
mit
19
master
2,826
require "test_helper" class DropMethodInstanceSimulatorTest < Minitest::Test include TestDatabase include TestRecords def setup setup_test_scaffolding @sample_drop = PersonDrop.new(Person.first) end def teardown teardown_test_scaffolding end def test_when_no_drop_sample assert_nil Drop...
github
akdarrah/dropkiq-gem
https://github.com/akdarrah/dropkiq-gem
test/dropkiq/drop_method_name_classifier_test.rb
Ruby
mit
19
master
3,679
require "test_helper" class DropMethodNameClassifierTest < Minitest::Test def setup end # No Match def test_ends_with_underscore_id assert_nil Dropkiq::DropMethodNameClassifier.new("something_crazy").classify end # Numeric def test_ends_with_underscore_id assert_equal Dropkiq::NUMERIC_TYPE, D...