code stringlengths 1 1.73M | language stringclasses 1
value |
|---|---|
#
# 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 ... | Ruby |
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | Ruby |
#
# 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 ... | Ruby |
# encoding: ascii-8bit
#
# 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
# "... | Ruby |
# encoding: ascii-8bit
#
# 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
# "... | Ruby |
# encoding: ascii-8bit
#
# 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
# "... | Ruby |
# encoding: ascii-8bit
#
# 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
# "... | Ruby |
# encoding: ascii-8bit
#
# 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
# "... | Ruby |
# encoding: ascii-8bit
#
# 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
# "... | Ruby |
# encoding: ascii-8bit
#
# 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
# "... | Ruby |
# encoding: ascii-8bit
#
# 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
# "... | Ruby |
# encoding: ascii-8bit
#
# 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
# "... | Ruby |
# encoding: ascii-8bit
#
# 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
# "... | Ruby |
# encoding: ascii-8bit
#
# 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
# "... | Ruby |
#
# 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 ... | Ruby |
#
# 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 ... | Ruby |
source :gemcutter
gem 'sinatra', :require => 'sinatra/base'
gem 'thin', '~> 1.3'
gem 'pg'
gem 'data_mapper', '~> 1.2'
gem 'dm-postgres-adapter'
gem 'google-api-client', '>= 0.4.3'
group :development do
gem 'dm-sqlite-adapter', '~> 1.2'
gem 'do_sqlite3', '~> 0.10'
end
| Ruby |
# Copyright (C) 2012 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | Ruby |
require 'sinatra/activerecord/rake'
require './main' | Ruby |
source :gemcutter
gem 'sinatra', :require => 'sinatra/base'
gem 'thin', '~> 1.3'
gem 'pg'
gem 'sinatra-activerecord'
gem 'google-api-client', '>= 0.4.4', :require => 'google/api_client'
group :development do
gem 'rake'
gem 'sqlite3-ruby'
end
| Ruby |
class CreateUsers < ActiveRecord::Migration
def up
create_table :users do |t|
t.string :profile_id
t.string :email
t.string :refresh_token
end
add_index :users, :profile_id
end
def down
drop_table :users
end
end
| Ruby |
# Copyright (C) 2012 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | Ruby |
require 'sinatra.rb'
# Sinatra defines #set at the top level as a way to set application configuration
set :run, false
set :env, (ENV['RACK_ENV'] ? ENV['RACK_ENV'].to_sym : :development)
require './main'
run Sinatra::Application | Ruby |
# Be sure to restart your server when you modify this file.
# Add new inflection rules using the following format
# (all these examples are active by default):
# ActiveSupport::Inflector.inflections do |inflect|
# inflect.plural /^(ox)$/i, '\1en'
# inflect.singular /^(ox)en/i, '\1'
# inflect.irregular 'person',... | Ruby |
# Be sure to restart your server when you modify this file.
# These settings change the behavior of Rails 2 apps and will be defaults
# for Rails 3. You can remove this initializer when Rails 3 is released.
if defined?(ActiveRecord)
# Include Active Record class name as root for JSON serialized output.
ActiveReco... | Ruby |
# Be sure to restart your server when you modify this file.
# Add new mime types for use in respond_to blocks:
# Mime::Type.register "text/richtext", :rtf
# Mime::Type.register_alias "text/html", :iphone
| Ruby |
# Be sure to restart your server when you modify this file.
# Your secret key for verifying cookie session data integrity.
# If you change this key, all old sessions will become invalid!
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
Act... | Ruby |
# Be sure to restart your server when you modify this file.
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
# You can also remove all the silencers if you're trying do debug a probl... | Ruby |
# Settings specified here will take precedence over those in config/environment.rb
# The production environment is meant for finished, "live" apps.
# Code is not reloaded between requests
config.cache_classes = true
# Full error reports are disabled and caching is turned on
config.action_controller.consider_all_reque... | Ruby |
# Settings specified here will take precedence over those in config/environment.rb
# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
# since you don't have to restart the webserver when you make code changes.
config.ca... | Ruby |
# Settings specified here will take precedence over those in config/environment.rb
# The test environment is used exclusively to run your application's
# test suite. You never need to work with it otherwise. Remember that
# your test database is "scratch space" for the test suite and is wiped
# and recreated between... | Ruby |
# Be sure to restart your server when you modify this file
# Specifies gem version of Rails to use when vendor/rails is not present
RAILS_GEM_VERSION = '2.3.5' unless defined? RAILS_GEM_VERSION
# Bootstrap the Rails environment, frameworks, and default configuration
require File.join(File.dirname(__FILE__), 'boot')
... | Ruby |
# Don't change this file!
# Configure your app in config/environment.rb and config/environments/*.rb
RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT)
module Rails
class << self
def boot!
unless booted?
preinitialize
pick_boot.run
end
end
def booted?
... | Ruby |
ActionController::Routing::Routes.draw do |map|
# The priority is based upon order of creation: first created -> highest priority.
# Sample of regular route:
# map.connect 'products/:id', :controller => 'catalog', :action => 'view'
# Keep in mind you can assign values other than :controller and :action
# ... | Ruby |
# Methods added to this helper will be available to all templates in the application.
module ApplicationHelper
end
| Ruby |
# Filters added to this controller apply to all controllers in the application.
# Likewise, all the methods added will be available for all controllers.
class ApplicationController < ActionController::Base
helper :all # include all helpers, all the time
protect_from_forgery # See ActionController::RequestForgeryPr... | Ruby |
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require(File.join(File.dirname(__FILE__), 'config', 'boot'))
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
require 'tasks/rails'
| Ruby |
#!/usr/bin/env ruby
require File.expand_path('../../config/boot', __FILE__)
require 'commands/dbconsole'
| Ruby |
#!/usr/bin/env ruby
require File.expand_path('../../config/boot', __FILE__)
require 'commands/console'
| Ruby |
#!/usr/bin/env ruby
require File.expand_path('../../config/boot', __FILE__)
require 'commands/runner'
| Ruby |
#!/usr/bin/env ruby
require File.expand_path('../../../config/boot', __FILE__)
require 'commands/performance/benchmarker'
| Ruby |
#!/usr/bin/env ruby
require File.expand_path('../../../config/boot', __FILE__)
require 'commands/performance/benchmarker'
| Ruby |
#!/usr/bin/env ruby
require File.expand_path('../../../config/boot', __FILE__)
require 'commands/performance/profiler'
| Ruby |
#!/usr/bin/env ruby
require File.expand_path('../../../config/boot', __FILE__)
require 'commands/performance/profiler'
| Ruby |
#!/usr/bin/env ruby
require File.expand_path('../../config/boot', __FILE__)
require 'commands/plugin'
| Ruby |
#!/usr/bin/env ruby
require File.expand_path('../../config/boot', __FILE__)
require 'commands/destroy'
| Ruby |
#!/usr/bin/env ruby
require File.expand_path('../../config/boot', __FILE__)
$LOAD_PATH.unshift "#{RAILTIES_PATH}/builtin/rails_info"
require 'commands/about'
| Ruby |
#!/usr/bin/env ruby
require File.expand_path('../../config/boot', __FILE__)
require 'commands/dbconsole'
| Ruby |
#!/usr/bin/env ruby
require File.expand_path('../../config/boot', __FILE__)
require 'commands/runner'
| Ruby |
#!/usr/bin/env ruby
require File.expand_path('../../config/boot', __FILE__)
require 'commands/server'
| Ruby |
#!/usr/bin/env ruby
require File.expand_path('../../config/boot', __FILE__)
require 'commands/generate'
| Ruby |
#!/usr/bin/env ruby
require File.expand_path('../../config/boot', __FILE__)
require 'commands/console'
| Ruby |
#!/usr/bin/env ruby
require File.expand_path('../../config/boot', __FILE__)
require 'commands/destroy'
| Ruby |
#!/usr/bin/env ruby
require File.expand_path('../../config/boot', __FILE__)
require 'commands/generate'
| Ruby |
#!/usr/bin/env ruby
require File.expand_path('../../config/boot', __FILE__)
require 'commands/server'
| Ruby |
#!/usr/bin/env ruby
require File.expand_path('../../config/boot', __FILE__)
$LOAD_PATH.unshift "#{RAILTIES_PATH}/builtin/rails_info"
require 'commands/about'
| Ruby |
#!/usr/bin/env ruby
require File.expand_path('../../config/boot', __FILE__)
require 'commands/plugin'
| Ruby |
# This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
#
# Examples:
#
# cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }])
# Major.create(:name... | Ruby |
ENV["RAILS_ENV"] = "test"
require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
require 'test_help'
class ActiveSupport::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 da... | 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 |
class CreateUsers < ActiveRecord::Migration
def up
create_table :users do |t|
t.string :profile_id
t.string :email
t.string :refresh_token
end
add_index :users, :profile_id
end
def down
drop_table :users
end
end
| Ruby |
# Copyright (C) 2012 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | Ruby |
source :gemcutter
gem 'sinatra', :require => 'sinatra/base'
gem 'thin', '~> 1.3'
gem 'pg'
gem 'sinatra-activerecord'
gem 'google-api-client', '>= 0.4.4', :require => 'google/api_client'
group :development do
gem 'rake'
gem 'sqlite3-ruby'
end
| Ruby |
require 'sinatra.rb'
# Sinatra defines #set at the top level as a way to set application configuration
set :run, false
set :env, (ENV['RACK_ENV'] ? ENV['RACK_ENV'].to_sym : :development)
require './main'
run Sinatra::Application | Ruby |
require 'sinatra/activerecord/rake'
require './main' | Ruby |
require 'sinatra/activerecord/rake'
require './main' | Ruby |
source :gemcutter
gem 'sinatra', :require => 'sinatra/base'
gem 'thin', '~> 1.3'
gem 'pg'
gem 'sinatra-activerecord'
gem 'google-api-client', '>= 0.4.4', :require => 'google/api_client'
group :development do
gem 'rake'
gem 'sqlite3-ruby'
end
| Ruby |
class CreateUsers < ActiveRecord::Migration
def up
create_table :users do |t|
t.string :profile_id
t.string :email
t.string :refresh_token
end
add_index :users, :profile_id
end
def down
drop_table :users
end
end
| Ruby |
# Copyright (C) 2012 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | Ruby |
require 'sinatra.rb'
# Sinatra defines #set at the top level as a way to set application configuration
set :run, false
set :env, (ENV['RACK_ENV'] ? ENV['RACK_ENV'].to_sym : :development)
require './main'
run Sinatra::Application | Ruby |
#!/usr/bin/env ruby
# clonus3: a simple backup tool for Amazon's S3 service
# usage: clonus3.rb --help
# Requires: right_aws -- http://rightaws.rubyforge.org/
# bdb bindings for caching -- http://moulon.inra.fr/ruby/bdb.html
# TODO
# - funky characters in names don't work: "?", "+". Should we URI-encode t... | Ruby |
#!/usr/bin/env ruby
# clonus3: a simple backup tool for Amazon's S3 service
# usage: clonus3.rb --help
# Requires: right_aws -- http://rightaws.rubyforge.org/
# bdb bindings for caching -- http://moulon.inra.fr/ruby/bdb.html
# TODO
# - funky characters in names don't work: "?", "+". Should we URI-encode t... | Ruby |
#!/usr/bin/env ruby
# clonus3: a simple backup tool for Amazon's S3 service
# usage: clonus3.rb --help
# Requires: right_aws -- http://rightaws.rubyforge.org/
# bdb bindings for caching -- http://moulon.inra.fr/ruby/bdb.html
# TODO
# - funky characters in names don't work: "?", "+". Should we URI-encode t... | Ruby |
#!/usr/bin/env ruby
# clonus3: a simple backup tool for Amazon's S3 service
# usage: clonus3.rb --help
# Requires: right_aws -- http://rightaws.rubyforge.org/
# bdb bindings for caching -- http://moulon.inra.fr/ruby/bdb.html
# TODO
# - funky characters in names don't work: "?", "+". Should we URI-encode t... | Ruby |
#!/usr/bin/env ruby
require 'SQS'
require 'thread'
module SQSsim
# Classes will go here
class Receiver
attr_accessor :halt_flag
attr_reader :name
def initialize(queue_url, name, fail_rate=0.0, refuse_rate=0.0)
@queue_url = queue_url
@name = name
@fail_rate = fail_rate
@refuse_rate = re... | Ruby |
require 'AWS'
class SQS
include AWS # Include the AWS module as a mixin
ENDPOINT_URI = URI.parse("https://queue.amazonaws.com/")
API_VERSION = '2007-05-01'
SIGNATURE_VERSION = '1'
HTTP_METHOD = 'POST' # 'GET'
def create_queue(queue_name, visibility_timeout_secs=nil)
parameters = build_query_params(API_... | Ruby |
require 'AWS'
class EC2
include AWS # Include the AWS module as a mixin
ENDPOINT_URI = URI.parse("https://ec2.amazonaws.com/")
API_VERSION = '2007-08-29'
SIGNATURE_VERSION = '1'
HTTP_METHOD = 'POST' # 'GET'
def describe_keypairs(*keypair_names)
parameters = build_query_params(API_VERSION, SIGNATURE... | Ruby |
# Sample Ruby code for the O'Reilly book "Using AWS Infrastructure
# Services" by James Murty.
#
# This code was written for Ruby version 1.8.6 or greater.
#
# The AWS module includes HTTP messaging and utility methods that handle
# communication with Amazon Web Services' REST or Query APIs. Service
# client implementa... | Ruby |
#!/usr/bin/env ruby
require 'SQS'
require 'thread'
module SQSsim
# Classes will go here
class Receiver
attr_accessor :halt_flag
attr_reader :name
def initialize(queue_url, name, fail_rate=0.0, refuse_rate=0.0)
@queue_url = queue_url
@name = name
@fail_rate = fail_rate
@refuse_rate = re... | Ruby |
require 'AWS'
require 'digest/md5'
class S3
include AWS # Include the AWS module as a mixin
S3_ENDPOINT = "s3.amazonaws.com"
XMLNS = 'http://s3.amazonaws.com/doc/2006-03-01/'
def valid_dns_name(bucket_name)
if bucket_name.size > 63 or bucket_name.size < 3
return false
end
return false unless buck... | Ruby |
require 'mytest_ext'
module Mytest
def hello
puts MytestInt::hello()
end
module_function :hello
end
| Ruby |
puts 'hello world'
#require 'hello2'
| Ruby |
require "test/unit"
require "cloud_cache"
class TestCloudCache < Test::Unit::TestCase
def test_sanity
flunk "write tests or I will kneecap you"
end
end
| Ruby |
require 'mini/test'
require '../lib/cloudcache'
#
# You'll need make a cloudcache.yml file in this directory that contains:
# amazon:
# access_key: ACCESS_KEY
# secret_key: SECRET
#
class CacheTests < Test::Unit::TestCase
def test_for_truth
assert true
end
def setup
puts("Setting up cache...")
... | Ruby |
# -*- ruby -*-
require 'rubygems'
require 'hoe'
require './lib/cloud_cache.rb'
#Hoe.new('cloud_cache', ActiveSupport::Cache::CloudCache::VERSION) do |p|
# p.rubyforge_name = 'spacegems' # if different than lowercase project name
# p.developer('Travis Reeder', 'travis@appoxy.com')
#end
begin
require 'jeweler'
... | Ruby |
# -*- ruby -*-
require 'rubygems'
require 'hoe'
require './lib/cloud_cache.rb'
#Hoe.new('cloud_cache', ActiveSupport::Cache::CloudCache::VERSION) do |p|
# p.rubyforge_name = 'spacegems' # if different than lowercase project name
# p.developer('Travis Reeder', 'travis@appoxy.com')
#end
begin
require 'jeweler'
... | Ruby |
require 'rubygems'
require 'active_support'
require 'net/http'
require 'base64'
$:.unshift(File.dirname(__FILE__))
begin
require 'digest/hmac'
USE_EMBEDDED_HMAC = false
rescue
puts "HMAC, not found in standard lib." + $!.message
require 'hmac-sha1'
USE_EMBEDDED_HMAC = true
end
... | Ruby |
require 'hmac'
require 'digest/sha1'
module HMAC
class SHA1 < Base
def initialize(key = nil)
super(Digest::SHA1, 64, 20, key)
end
public_class_method :new, :digest, :hexdigest
end
end
| Ruby |
# Copyright (C) 2001 Daiki Ueno <ueno@unixuser.org>
# This library is distributed under the terms of the Ruby license.
# This module provides common interface to HMAC engines.
# HMAC standard is documented in RFC 2104:
#
# H. Krawczyk et al., "HMAC: Keyed-Hashing for Message Authentication",
# RFC 2104, February ... | Ruby |
source :gemcutter
gem 'sinatra', :require => 'sinatra/base'
gem 'thin', '~> 1.3'
gem 'pg'
gem 'data_mapper', '~> 1.2'
gem 'dm-postgres-adapter'
gem 'google-api-client', '>= 0.4.3'
group :development do
gem 'dm-sqlite-adapter', '~> 1.2'
gem 'do_sqlite3', '~> 0.10'
end
| Ruby |
# Copyright (C) 2012 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | Ruby |
# -*- mode:ruby -*-
require 'rake/clean'
$KCODE = 'U'
CLOSURE_LIB_DIR = "../../closure-library/closure"
CLOSURE_DRAW_DIR = ".."
PYTHON = "python"
CALCDEPS = File.join(CLOSURE_LIB_DIR, "bin/calcdeps.py")
CLOSURE_COMPILER = File.join(CLOSURE_DRAW_DIR, "bin/compiler.jar")
DEMOS_DIR = "demos... | Ruby |
# -*- mode:ruby -*-
require 'rake/clean'
$KCODE = 'U'
CLOSURE_LIB_DIR = "../../closure-library/closure"
CLOSURE_DRAW_DIR = ".."
PYTHON = "python"
CALCDEPS = File.join(CLOSURE_LIB_DIR, "bin/calcdeps.py")
CLOSURE_COMPILER = File.join(CLOSURE_DRAW_DIR, "bin/compiler.jar")
DEMOS_DIR = "demos... | Ruby |
# -*- mode:ruby -*-
require 'rake/clean'
$KCODE = 'U'
CLOSURE_LIB_DIR = "../../closure-library"
CLOSURE_DRAW_DIR = ".."
PYTHON = "python"
DEPSWRITER = File.join(CLOSURE_LIB_DIR, "closure/bin/build/depswriter.py")
CLOSUREBUILDER = File.join(CLOSURE_LIB_DIR, "closure/bin/build/closurebuilder.py")... | Ruby |
# -*- mode:ruby -*-
require 'rake/clean'
$KCODE = 'U'
CLOSURE_LIB_DIR = "../../closure-library"
CLOSURE_DRAW_DIR = ".."
PYTHON = "python"
DEPSWRITER = File.join(CLOSURE_LIB_DIR, "closure/bin/build/depswriter.py")
CLOSUREBUILDER = File.join(CLOSURE_LIB_DIR, "closure/bin/build/closurebuilder.py")... | Ruby |
# Copyright (C) 2012 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | Ruby |
source :gemcutter
gem 'sinatra', :require => 'sinatra/base'
gem 'thin', '~> 1.3'
gem 'pg'
gem 'data_mapper', '~> 1.2'
gem 'dm-postgres-adapter'
gem 'google-api-client', '>= 0.4.3'
group :development do
gem 'dm-sqlite-adapter', '~> 1.2'
gem 'do_sqlite3', '~> 0.10'
end
| Ruby |
#!/usr/bin/env ruby
require 'puppet'
result = Puppet::Node::Facts.new(Puppet[:certname].to_s, Facter.to_hash)
result.add_local_facts
result.stringify
result.downcase_if_necessary
puts result.to_yaml
| Ruby |
#!/usr/bin/env ruby
require 'puppet'
result = Puppet::Node::Facts.new(Puppet[:certname].to_s, Facter.to_hash)
result.add_local_facts
result.stringify
result.downcase_if_necessary
puts result.to_yaml
| Ruby |
# a config.ru, for use with every rack-compatible webserver.
# SSL needs to be handled outside this, though.
# if puppet is not in your RUBYLIB:
# $:.unshift('/opt/puppet/lib')
$0 = "puppetmasterd"
require 'puppet'
# if you want debugging:
ARGV << "--debug"
ARGV << "--rack"
require 'puppet/application/puppetmasterd... | Ruby |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.