code stringlengths 1 1.73M | language stringclasses 1
value |
|---|---|
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../../config/boot'
require 'commands/performance/profiler'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../../config/boot'
require 'commands/performance/request'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/plugin'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/destroy'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/about'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/dbconsole'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/runner'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/server'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/generate'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/console'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../../config/boot'
require 'commands/process/reaper'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../../config/boot'
require 'commands/process/inspector'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../../config/boot'
require 'commands/process/inspector'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../../config/boot'
require 'commands/process/spawner'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../../config/boot'
require 'commands/process/reaper'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../../config/boot'
require 'commands/process/spawner'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/destroy'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/generate'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/server'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/about'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/plugin'
| Ruby |
#!/usr/bin/ruby1.8
require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT)
# If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like:
# "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impaired... | Ruby |
#!/usr/bin/ruby1.8
#
# You may specify the path to the FastCGI crash log (a log of unhandled
# exceptions which forced the FastCGI instance to exit, great for debugging)
# and the number of requests to process before running garbage collection.
#
# By default, the FastCGI crash log is RAILS_ROOT/log/fastcgi.crash.log
#... | Ruby |
ENV["RAILS_ENV"] = "test"
require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
require 'test_help'
class Test::Unit::TestCase
# Transactional fixtures accelerate your tests by wrapping each test method
# in a transaction that's rolled back on completion. This ensures that the
# test datab... | Ruby |
task :upload => :appcast
desc "uploads the artifacts to google code"
task :upload do
require 'yaml'
yaml = YAML.load_file('ChangeLog.yml')
version = yaml.first['version']
file = "build/Release/Time Tracker-#{version}.zip"
html_file = "appcast/timetracker-#{version}.html"
sh "python tasks/googlecode_upload.... | Ruby |
require 'yaml'
require 'text/format'
require 'builder'
#task :build_release => [:spec, :features, :changelog] do
desc "Builds the release package which can be uploaded"
task :build_release => [:changelog] do
sh "xcodebuild -configuration Release -target 'Release Package' -arch 'i386 x86_64 ppc' -project 'Time Tracke... | Ruby |
require "rubygems"
require "rake"
Dir['tasks/**/*.rake'].each { |rake| load rake }
task :clean => "objc:clean"
| Ruby |
require 'albacore'
PROJECT_NAME = "FinAnSu"
REPO_NAME = "brymck/finansu"
task :default => :build
task :release => [:build, :upload]
desc "Builds the application."
msbuild :build do |msb|
msb.properties :configuration => :Release
msb.targets :Clean, :Build
msb.solution = "FinAnSu.sln"
end
# This requires ... | Ruby |
source 'http://rubygems.org'
gem 'albacore'
gem 'mime-types'
gem 'xml-simple'
| Ruby |
#!/usr/bin/env ruby -Ku
require "fileutils"
require "zip/zip"
PROJECT_NAME = "FinAnSu"
SOLUTION_DIR = File.dirname(File.expand_path(__FILE__))
# Writes a blank row then a header row
def write_header(text)
puts
puts "---- %s ----" % text
end
# Writes a status row, by necessity indenting at least once
def write_st... | Ruby |
#!/usr/bin/env ruby -Ku
puts "This upload script doesn't work at the moment."
puts "Upload everything via https://github.com/brymck/finansu/downloads"
exit 0
PROJECT_NAME = "FinAnSu"
REPO_NAME = "brymck/finansu"
this_path = File.expand_path(File.dirname(__FILE__))
upload_script = File.join(this_path, "Lib", ... | Ruby |
#
# To change this template, choose Tools | Templates
# and open the template in the editor.
require 'rubygems'
require 'rake'
require 'rake/clean'
require 'rake/gempackagetask'
require 'rake/rdoctask'
require 'rake/testtask'
spec = Gem::Specification.new do |s|
s.name = 'Campus-Cloud'
s.version = '0.0.1'
s.... | Ruby |
#!/usr/bin/env ruby
#------------------------------------------------------------------------------#
# #
# @Authors #
# ... | Ruby |
#!/usr/bin/env ruby
#------------------------------------------------------------------------------#
# #
# @Authors #
# ... | Ruby |
require 'singleton'
require 'rubygems'
require 'sinatra'
#
# This class is a VERY simple list of Tasks
# is just a Hash where each Task can be false (not done)
# or true (done)
#
class Tasks < Hash
include Singleton
def initialize
super
end
end
#
# This me... | Ruby |
#!/usr/bin/env ruby
#------------------------------------------------------------------------------#
# #
# @Authors #
# ... | Ruby |
#!/usr/bin/env ruby
##############################################################################
# Required libraries
##############################################################################
require 'rubygems'
require 'sinatra'
require 'dataBase.rb'
##########################################################... | Ruby |
#!/usr/bin/env ruby
#------------------------------------------------------------------------------#
# #
# @Authors #
# ... | Ruby |
#!/usr/bin/env ruby
#------------------------------------------------------------------#
# #
# @Authors #
# #
# - Almaraz Hernánd... | Ruby |
#!/usr/bin/env ruby
$: << File.dirname(__FILE__)
require 'campus-cloud-server.rb'
#require 'dataBase.rb'
run Sinatra::Application
| Ruby |
#!/usr/bin/env ruby
##############################################################################
# Required libraries
##############################################################################
require 'rubygems'
require 'sinatra'
require 'dataBase.rb'
##########################################################... | Ruby |
#!/usr/bin/env ruby
#------------------------------------------------------------------#
# #
# @Authors #
# #
# - Almaraz Hernánd... | Ruby |
#!/usr/bin/env ruby
$: << File.dirname(__FILE__)
require 'campus-cloud-server.rb'
#require 'dataBase.rb'
run Sinatra::Application
| Ruby |
# Require any additional compass plugins here.
# Set this to the root of your project when deployed:
http_path = "/"
css_dir = "theme/css"
sass_dir = "theme/scss"
images_dir = "images"
javascripts_dir = "js"
# You can select your preferred output style here (can be overridden via the command line):
output_style = :co... | Ruby |
require 'can_has_chat'
ActiveRecord::Base.send(:include, CanHasChat::Base)
| Ruby |
require 'rubygems'
require 'json'
require 'drb'
require 'erb'
require 'yaml'
# basic form of this file
# taken from:
# http://adam.blogs.bitscribe.net/
class PushHandler < Mongrel::HttpHandler
def initialize
config_file = File.read("config/chat_server.yml")
evaluated = YAML.load(ERB.new(config_file).res... | Ruby |
class <%= controller_class_name %>Controller < ApplicationController
def index
@<%=file_name%> = <%=class_name%>.new(params[:<%=file_name%>])
if params[:<%=file_name%>]
if @<%=file_name%>.save
redirect_to(:action => :start,
:id => @<%=file_name%>.id)
end
end
... | Ruby |
module <%= controller_class_name %>Helper
include CanHasChat::Util::PageHelper
def render_chatbox_for(chat_id,
from,
to=nil,
update_frequency=2, #ignored if using push connection
messages_html_options=... | Ruby |
class <%= class_name %> < ActiveRecord::Base
can_has_chat :user_attribute => :jabber_name,
:log_chats => false,
:namespace => "my_new_chat_application",
:transports => {
:aim => [:aim_name, :aim_password],
:icq => [:icq_name, :icq_pa... | Ruby |
class <%= migration_name %> < ActiveRecord::Migration
def self.up
create_table "<%= table_name %>", :force => true do |t|
# this file just puts together the basics for communicating
# to jabber and other IM networks. best efforts in security
# would dictate encrypting IM passwords and nicks in ... | Ruby |
class ChatSystemGenerator < Rails::Generator::NamedBase
# most of this is taken from acts_as_authenticated's generator
# since the need is about equivalent here
attr_reader :controller_name,
:controller_class_path,
:controller_file_path,
:controller_class_nesting,... | Ruby |
#!/usr/bin/env ruby
require File.join(File.dirname(__FILE__), '../vendor/plugins/canhaschat/lib/can_has_chat/remote/boot_server')
| Ruby |
#!/usr/bin/env ruby
require File.join(File.dirname(__FILE__), '../vendor/plugins/canhaschat/lib/can_has_chat/remote/boot_server')
| Ruby |
require 'fileutils'
def install(file)
puts "Installing: #{file}"
target = File.join(File.dirname(__FILE__), '..', '..', '..', file)
if File.exists?(target)
puts "target #{target} already exists, skipping"
else
FileUtils.cp File.join(File.dirname(__FILE__), file), target
end
end
install File.join( 's... | Ruby |
# This plugin adds Jabber server communication to your Rails app. It
# relies on the XMPP4R (http://home.gna.org/xmpp4r/) gem. Install this
# plugin into your vendor/plugins folder and configure config/chat_server.yml
# to reflect your particular Jabber server configuration.
#
# More information is available in th... | Ruby |
# This module contains all the instance methods that will be added to the
# object that has can_has_chat invoked upon it.
module CanHasChat
#:nodoc:
module Base
#:nodoc:
module InstanceMethods
#
# Starts chat session with the dRuby server, or refreshes a chat
# if one already exists
... | Ruby |
#:nodoc:all
module CanHasChat
module Base
module ClassMethods
end
end
end | Ruby |
require 'xmpp4r'
require 'xmpp4r/jid'
require 'xmpp4r/presence'
require 'xmpp4r/roster'
module CanHasChat
module Remote
class ChatConnection < Jabber::Client
include CanHasChat::Remote::Lockable
def initialize(*opts)
self.refresh_age
@q_messages = []
@q_messages.extend C... | Ruby |
require 'digest'
require 'drb'
require 'logger'
require 'thread'
require 'xmpp4r'
require 'xmpp4r/jid'
require 'xmpp4r/roster'
module CanHasChat
module Remote
class NoValidRecipient < StandardError; end
class NoNamespace < StandardError; end
class NoValidSender < StandardError; end
class NoValidUsern... | Ruby |
require 'drb'
require 'erb'
require 'optparse'
require 'yaml'
# some of the basic form of this file is taken
# from the acts_as_ferret drb server startup script
config_file = "config/chat_server.yml"
environment = ENV["RAILS_ENV"] || "development"
action = "start"
OptionParser.new do |opts|
opts.banner = "Usage: c... | Ruby |
# FROM: ActsAsFerret
################################################################################
module CanHasChat
module Remote
################################################################################
# methods for becoming a daemon on Unix-like operating systems
module ChatDaemon
###... | Ruby |
#
# TODO
# In retrospect ( after going over some other code that used it ) this code
# is a useless reproduction of Mutex. This should be replaced with usage
# of Mutex immediately.
#
module CanHasChat
module Remote
module Lockable
class ThreadAlreadyLocked < RuntimeError; end
class ThreadNotLocked... | Ruby |
module CanHasChat
module Util
class ChattyObject
include CanHasChat::Base
end
end
end | Ruby |
module CanHasChat
module Util
module JavascriptHelper
def self.parseOutput(html)
html.gsub!(/#{JavascriptMessage::MESSAGE_TOKEN}/, "\"+message+\"")
html.gsub!(/#{JavascriptMessage::FROM_TOKEN}/, "\"+from+\"")
html.gsub!(/#{JavascriptMessage::TIMESTAMP_TOKEN}/,"\"+timestamp+\""... | Ruby |
module CanHasChat
module Util
module PageHelper
def wait_for_messages(options={})
url = escape_javascript((options[:url]) ? url_for(options[:url]) : "")
polling = (options[:polling] || false)
frequency = (options[:frequency] || 5)
# TOOD
# not doing anything with this... | Ruby |
module CanHasChat
module Util
class JavascriptMessage
MESSAGE_TOKEN = "<canhaschatmessage>"
FROM_TOKEN = "<canhaschatfrom>"
TIMESTAMP_TOKEN = "<canhaschattimestamp>"
NETWORK_TOKEN = "<canhaschatnetwork>"
def message
return MESSAGE_TOKEN
end
def from
... | Ruby |
require 'test/unit'
require File.dirname(__FILE__) + '/../lib/picnic'
| Ruby |
require 'rubygems'
require 'rake'
require 'rake/clean'
require 'rake/testtask'
require 'rake/packagetask'
require 'rake/gempackagetask'
require 'rake/rdoctask'
require 'rake/contrib/rubyforgepublisher'
require 'fileutils'
require 'hoe'
include FileUtils
require File.join(File.dirname(__FILE__), 'lib', 'picnic', 'versio... | Ruby |
#
# setup.rb
#
# Copyright (c) 2000-2005 Minero Aoki
#
# This program is free software.
# You can distribute/modify this program under the terms of
# the GNU LGPL, Lesser General Public License version 2.1.
#
unless Enumerable.method_defined?(:map) # Ruby 1.4.6
module Enumerable
alias map collect
end
end
un... | Ruby |
require 'logger'
module Picnic
module Logger
# Makes available a Logger instance under the global $LOG variable.
def init_global_logger!
logdev = ($CONF && $CONF.log[:file]) || STDOUT
$LOG = Picnic::Logger::Base.new(logdev)
$LOG.level = Picnic::Logger::Base.const_get(($CONF && $CONF.lo... | Ruby |
module Picnic #:nodoc:
# These modules (currently only one module, but more in the future) provide authentication
# for your Camping app.
#
module Authentication
# Picnic::Authentication::Basic provides Basic HTTP Authentication for your Camping app.
# The module defines a <tt>service</tt> method that... | Ruby |
require 'optparse'
require 'picnic'
require 'picnic/conf'
require 'picnic/server'
module Picnic
# Provides a command-line interface for your app.
# This is useful for creating a 'bin' file for launching your application.
#
# Usage example (put this in a file called 'foo'):
#
# #!/usr/bin/env ruby
#
... | Ruby |
module Picnic
module Controllers
end
end | Ruby |
require 'camping/server'
module Picnic::Server
class Base < Camping::Server::Base
def start
handler, conf = case @conf.server
when "console"
ARGV.clear
IRB.start
exit
when "mongrel"
prep_mongrel
when "webrick"
prep_webrick
end
rap... | Ruby |
module Picnic #:nodoc:
module VERSION #:nodoc:
MAJOR = 0
MINOR = 7
TINY = 999
STRING = [MAJOR, MINOR, TINY].join('.')
end
end
| Ruby |
require 'optparse'
module Picnic
# Provides functionality for controlling a Picnic-based server as
# an init.d service.
#
# Based on code from rubycas-server by jzylks and matt.zukowski.
#
# Usage Example:
#
# #!/usr/bin/env ruby
#
# require 'rubygems'
# require 'picnic/service_cont... | Ruby |
require 'active_support'
module Picnic
# Provides an interface for accessing your Picnic app's configuration file.
#
# Usage example:
#
# # Load the configuration from /etc/foo/config.yml
# Conf.load('foo')
#
# # The contents of config.yml is now available as follows:
# puts Conf[:server]
#... | Ruby |
require 'rubygems'
require 'activesupport'
$: << File.dirname(__FILE__)
$: << File.dirname(__FILE__) + "/../vendor/camping-2.0.20090212/lib"
require "camping"
module Picnic
def self.included(base)
base.mod_eval do
# Enable authentication for your app.
#
# For example:
#
# Ca... | Ruby |
require 'test/unit'
require File.dirname(__FILE__) + '/../lib/picnic'
| Ruby |
require 'rubygems'
require 'rake'
require 'rake/clean'
require 'rake/testtask'
require 'rake/packagetask'
require 'rake/gempackagetask'
require 'rake/rdoctask'
require 'rake/contrib/rubyforgepublisher'
require 'fileutils'
require 'hoe'
include FileUtils
require File.join(File.dirname(__FILE__), 'lib', 'picnic', 'versio... | Ruby |
#
# setup.rb
#
# Copyright (c) 2000-2005 Minero Aoki
#
# This program is free software.
# You can distribute/modify this program under the terms of
# the GNU LGPL, Lesser General Public License version 2.1.
#
unless Enumerable.method_defined?(:map) # Ruby 1.4.6
module Enumerable
alias map collect
end
end
un... | Ruby |
module Picnic
# Supporting utility functions used throughout Picnic
module Utils
# Generates a random string, at most 32 characters in length.
def random_string
"#{Time.now.to_i}r%X" % rand(10**32)
end
module_function :random_string
# The customized Logger used for logging in Picnic.
... | Ruby |
module Picnic #:nodoc:
# These modules (currently only one module, but more in the future) provide authentication
# for your Camping app.
#
module Authentication
# Picnic::Authentication::Basic provides Basic HTTP Authentication for your Camping app.
# The module defines a <tt>service</tt> method that... | Ruby |
require 'optparse'
module Picnic
# Provides a command-line interface for your app.
# This is useful for creating a 'bin' file for launching your application.
#
# Usage example (put this in a file called 'foo'):
#
# #!/usr/bin/env ruby
#
# require 'rubygems'
# require 'picnic'
#
# require... | Ruby |
module Picnic
module Controllers
end
end | Ruby |
module Picnic
# In Camping, "postambles" are wrappers used to make your application run under
# some given web server. They are called "postambles" because traditionally this
# was a piece of code included at the bottom of your Camping script. Picnic
# provides postambles for two popular Ruby-based web servers:... | Ruby |
module Picnic #:nodoc:
module VERSION #:nodoc:
MAJOR = 0
MINOR = 6
TINY = 0
STRING = [MAJOR, MINOR, TINY].join('.')
end
end
| Ruby |
require 'optparse'
module Picnic
# Provides functionality for controlling a Picnic-based server as
# an init.d service.
#
# Based on code from rubycas-server by jzylks and matt.zukowski.
#
# Usage Example:
#
# #!/usr/bin/env ruby
#
# require 'rubygems'
# require 'picnic/service_cont... | Ruby |
module Picnic
# Provides an interface for accessing your Picnic app's configuration file.
#
# Usage example:
#
# # Load the configuration from /etc/foo/config.yml
# Conf.load('foo')
#
# # The contents of config.yml is now available as follows:
# puts Conf[:server]
# puts Conf[:authenticati... | Ruby |
$: << File.dirname(File.expand_path(__FILE__))
$: << File.dirname(File.expand_path(__FILE__))+"/../vendor/camping-1.5.180/lib"
unless Object.const_defined?(:ActiveSupport)
begin
require 'active_support'
rescue LoadError
require 'rubygems'
require 'active_support'
end
end
require 'camping'
require ... | Ruby |
require 'test/unit'
require File.dirname(__FILE__) + '/../lib/picnic'
| Ruby |
require 'rubygems'
require 'rake'
require 'rake/clean'
require 'rake/testtask'
require 'rake/packagetask'
require 'rake/gempackagetask'
require 'rake/rdoctask'
require 'rake/contrib/rubyforgepublisher'
require 'fileutils'
require 'hoe'
include FileUtils
require File.join(File.dirname(__FILE__), 'lib', 'picnic', 'versio... | Ruby |
#
# setup.rb
#
# Copyright (c) 2000-2005 Minero Aoki
#
# This program is free software.
# You can distribute/modify this program under the terms of
# the GNU LGPL, Lesser General Public License version 2.1.
#
unless Enumerable.method_defined?(:map) # Ruby 1.4.6
module Enumerable
alias map collect
end
end
un... | Ruby |
module Picnic
# Supporting utility functions used throughout Picnic
module Utils
# Generates a random string, at most 32 characters in length.
def random_string
"#{Time.now.to_i}r%X" % rand(10**32)
end
module_function :random_string
# The customized Logger used for logging in Picnic.
... | Ruby |
module Picnic #:nodoc:
# These modules (currently only one module, but more in the future) provide authentication
# for your Camping app.
#
module Authentication
# Picnic::Authentication::Basic provides Basic HTTP Authentication for your Camping app.
# The module defines a <tt>service</tt> method that... | Ruby |
require 'optparse'
module Picnic
# Provides a command-line interface for your app.
# This is useful for creating a 'bin' file for launching your application.
#
# Usage example (put this in a file called 'foo'):
#
# #!/usr/bin/env ruby
#
# require 'rubygems'
# require 'picnic'
#
# require... | Ruby |
module Picnic
module Controllers
end
end | Ruby |
module Picnic
# In Camping, "postambles" are wrappers used to make your application run under
# some given web server. They are called "postambles" because traditionally this
# was a piece of code included at the bottom of your Camping script. Picnic
# provides postambles for two popular Ruby-based web servers:... | Ruby |
module Picnic #:nodoc:
module VERSION #:nodoc:
MAJOR = 0
MINOR = 6
TINY = 3
STRING = [MAJOR, MINOR, TINY].join('.')
end
end
| Ruby |
require 'optparse'
module Picnic
# Provides functionality for controlling a Picnic-based server as
# an init.d service.
#
# Based on code from rubycas-server by jzylks and matt.zukowski.
#
# Usage Example:
#
# #!/usr/bin/env ruby
#
# require 'rubygems'
# require 'picnic/service_cont... | Ruby |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.