code
stringlengths
1
1.73M
language
stringclasses
1 value
# 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
# 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.4' unless defined? RAILS_GEM_VERSION # Bootstrap the Rails environment, frameworks, and default configuration require File.join(File.dirname(__FILE__), 'boot') ...
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
# 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
class RubyLibraryExample def get_server_language 'ruby' end # Basic communication def passing end def failing(message) raise message end def logging(message, level='INFO') puts "*#{level}* #{message}" end def returning 'returned string' end # Logging def one_message_w...
Ruby
# Copyright 2008-2009 Nokia Siemens Networks Oyj # # 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...
Ruby
#!/usr/bin/env ruby class ExampleRemoteLibrary def count_items_in_directory(path) Dir.entries(path).find_all{|i| not i.match('^\.')}.length end def strings_should_be_equal(str1, str2) puts "Comparing '#{str1}' to '#{str2}'" if str1 != str2 raise RuntimeError, "Given strings are not equal" ...
Ruby
#!/usr/bin/env ruby require 'cgi' require 'date' class Sajax def initialize(debug_mode=false) @debug_mode = debug_mode @export_list = Hash.new @js_has_been_shown = false @cgi = CGI.new end def handle_client_request func_name = @cgi.params['rs'].to_s if func_name == "" return ...
Ruby
#!/usr/bin/env ruby require 'cgi' require 'date' class Sajax def initialize(debug_mode=false) @debug_mode = debug_mode @export_list = Hash.new @js_has_been_shown = false @cgi = CGI.new end def handle_client_request func_name = @cgi.params['rs'].to_s if func_name == "" return ...
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
#if you want it to load as a REAL rails plugin then we need this require. #But you don't really want that ;) #require 'capistrano_mailer'
Ruby
class CapMailer < ActionMailer::Base @@sender_address = %("Capistrano Deployment" <capistrano@default.com>) cattr_accessor :sender_address @@recipient_addresses = [] cattr_accessor :recipient_addresses @@email_prefix = "[DEPLOYMENT]-[#{ENV['RAILS_ENV']}]" cattr_accessor :email_prefix @@site_name = "...
Ruby
require 'rubygems' unless defined?(Rubygems) require 'capistrano' unless defined?(Capistrano) require 'action_mailer' unless defined?(ActionMailer) require 'config/cap_mailer_settings' module CapistranoMailer def send(cap_vars, extra = {}, data = {}) CapMailer.deliver_notification_email(cap_vars, extra, data) ...
Ruby
require 'capistrano_mailer'
Ruby
class CapMailer < ActionMailer::Base @@sender_address = %("Capistrano Deployment" <capistrano@default.com>) cattr_accessor :sender_address @@recipient_addresses = [] cattr_accessor :recipient_addresses @@email_prefix = "[DEPLOYMENT]-[#{ENV['RAILS_ENV']}]" cattr_accessor :email_prefix @@site_name = "...
Ruby
require 'rubygems' require 'capistrano' require 'action_mailer' unless defined?(ActionMailer) require 'config/cap_mailer_settings' module CapistranoMailer def send(rails_env, repository, command, deploy_to, host = nil, ip_address = nil, output = nil) CapMailer.deliver_notification_email(rails_env, repository, co...
Ruby
require 'capistrano_mailer'
Ruby
class CapMailer < ActionMailer::Base @@sender_address = %("Capistrano Deployment" <capistrano@default.com>) cattr_accessor :sender_address @@recipient_addresses = [] cattr_accessor :recipient_addresses @@email_prefix = "[DEPLOYMENT]-[#{ENV['RAILS_ENV']}]" cattr_accessor :email_prefix @@site_name = "...
Ruby
require 'rubygems' require 'capistrano' require 'action_mailer' unless defined?(ActionMailer) require 'config/cap_mailer_settings' module CapistranoMailer def send(cap_vars, extra = {}, data = {}) CapMailer.deliver_notification_email(cap_vars, extra, data) end end Capistrano.plugin :mailer, CapistranoMailer
Ruby
require 'echoe' Echoe.new('capistrano-sdb') do |p| p.author = "Hemant Bhanoo" p.summary = "Allows you to use Amazon Simple DB as a repository for any capistrano config keys." p.url = "http://code.google.com/p/capistrano-sdb/" p.runtime_dependencies = ["right_aws >= 1.8.1", "json"] p.install_message = <<-MSG M...
Ruby
require 'rubygems' require 'right_aws' require 'json' module SDB # :nodoc:all class Logger < ::Logger LEVEL_MAPPING = { :debug => :trace, :info => :debug, :warn =>:info, :error =>:important, :fatal => :important } LEVEL_MAPPING.each do |k,v| define_method( k ) do...
Ruby
# Install hook code here
Ruby
require 'open-uri' require 'json' class ActionView::Base def captcha_on_iknow_js_tag <<-eos <script>IKNOW_CAPTCHA_PARAM_KEY = '#{IKnowCaptcha.param_key}'</script> #{javascript_include_tag 'captcha_on_iknow'} eos end def iknow_captcha_field captcha = (controller.session[IKnowCaptcha.session_key] ||= ...
Ruby
# desc "Explaining what the task does" # task :captcha_on_iknow do # # Task goes here # end
Ruby
class IKnowCaptcha class InvaidModeError < StandardError; end class FixedModeError < StandardError; end DEFAULT_USER = '<%= account %>' USER_PATTERN = '[USER]' API_KEY = '' # set your API key, if you want API_URI_TEMPLATE = "http://api.iknow.co.jp/users/#{USER_PATTERN}/items.json?api_key=#{API_KEY}" @ses...
Ruby
class CaptchaOnIknowController < ApplicationController before_filter :set_captcha def text @captcha.text_mode! render :partial => 'text' end def sound @captcha.sound_mode! render :partial => 'sound' end def reset @captcha.reset! render :partial => @captcha.spelling_mode? ? 'text' ...
Ruby
class CaptchaOnIknowGenerator < Rails::Generator::NamedBase def initizlize(runtime_args, runtime_options={}) super end def manifest record do |m| m.class_collisions 'CaptchaOnIknowController', 'IKnowCaptcha' m.directory 'app/controllers' m.directory 'app/models' m.directory 'app/...
Ruby
# Uninstall hook code here
Ruby
require 'rake' require 'rake/testtask' require 'rake/rdoctask' desc 'Default: run unit tests.' task :default => :test desc 'Test the captcha_on_iknow plugin.' Rake::TestTask.new(:test) do |t| t.libs << 'lib' t.pattern = 'test/**/*_test.rb' t.verbose = true end desc 'Generate documentation for the captcha_on_ik...
Ruby
# CaptchaOnIknow
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
# Copyright 2008-2009 Nokia Siemens Networks Oyj # # 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...
Ruby
#!/usr/bin/env ruby class ExampleRemoteLibrary def count_items_in_directory(path) Dir.entries(path).find_all{|i| not i.match('^\.')}.length end def strings_should_be_equal(str1, str2) puts "Comparing '#{str1}' to '#{str2}'" if str1 != str2 raise RuntimeError, "Given strings are not equal" ...
Ruby
class RubyLibraryExample def get_server_language 'ruby' end # Basic communication def passing end def failing(message) raise message end def logging(message, level='INFO') puts "*#{level}* #{message}" end def returning 'returned string' end # Logging def one_message_w...
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
# 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| # ==> Mailer Configuration # Configure the e-mail address which will be shown in Devise::Mailer, # note that it will be overwritten if you use yo...
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 the integrity of signed cookies. # If you change this key, all old signed cookies will become invalid! # Make sure the secret is at least 30 characters and all random, # no regular words or you'll be exposed to dictionary attac...
Ruby
# Be sure to restart your server when you modify this file. # # This file contains settings for ActionController::ParamsWrapper which # is enabled by default. # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. ActiveSupport.on_load(:action_controller) do wrap_parameters ...
Ruby
# Be sure to restart your server when you modify this file. Integration::Application.config.session_store :cookie_store, :key => '_integration_session' # Use the database for sessions instead of the cookie-based default, # which shouldn't be used to store highly confidential information # (create the session table wi...
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 to debug a probl...
Ruby
Integration::Application.configure do # Settings specified here will take precedence over those in config/application.rb # Code is not reloaded between requests config.cache_classes = true # Full error reports are disabled and caching is turned on config.consider_all_requests_local = false config.ac...
Ruby
Integration::Application.configure do # Settings specified here will take precedence over those in config/application.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 we...
Ruby
Integration::Application.configure do # Settings specified here will take precedence over those in config/application.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 tes...
Ruby
# Load the rails application require File.expand_path('../application', __FILE__) # Initialize the rails application Integration::Application.initialize!
Ruby
require 'rubygems' # Set up gems listed in the Gemfile. ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
Ruby
require File.expand_path('../boot', __FILE__) require 'rails/all' if defined?(Bundler) # If you precompile assets before deploying to production, use this line Bundler.require(*Rails.groups(:assets => %w(development test))) # If you want your assets lazily compiled in production, use this line # Bundler.requi...
Ruby
Integration::Application.routes.draw do resources :tasks devise_for :users # The priority is based upon order of creation: # first created -> highest priority. # Sample of regular route: # match 'products/:id' => 'catalog#view' # Keep in mind you can assign values other than :controller and :action ...
Ruby
module ApplicationHelper end
Ruby
module TasksHelper end
Ruby
class Task < ActiveRecord::Base attr_accessible :name validates_presence_of :name end
Ruby
class User < ActiveRecord::Base # Include default devise modules. Others available are: # :token_authenticatable, :confirmable, # :lockable, :timeoutable and :omniauthable devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable # Setup accessible (or pr...
Ruby
class TasksController < ApplicationController # GET /tasks # GET /tasks.json def index @tasks = Task.all @task = Task.new respond_to do |format| format.html # index.html.erb format.json { render json: @tasks } end end # GET /tasks/1 # GET /tasks/1.json def show @task = T...
Ruby
class ApplicationController < ActionController::Base protect_from_forgery end
Ruby
#!/usr/bin/env rake # 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.expand_path('../config/application', __FILE__) Integration::Application.load_tasks
Ruby
#!/usr/bin/env ruby # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. APP_PATH = File.expand_path('../../config/application', __FILE__) require File.expand_path('../../config/boot', __FILE__) require 'rails/commands'
Ruby
source 'https://rubygems.org' gem 'rails', '3.2.5' # Bundle edge Rails instead: # gem 'rails', :git => 'git://github.com/rails/rails.git' gem 'sqlite3' gem 'json' # Gems used only for assets and not required # in production environments by default. group :assets do gem 'sass-rails', '~> 3.2.3' gem 'coffee-ra...
Ruby
class DeviseCreateUsers < ActiveRecord::Migration def change create_table(:users) do |t| ## Database authenticatable t.string :email, :null => false, :default => "" t.string :encrypted_password, :null => false, :default => "" ## Recoverable t.string :reset_password_to...
Ruby
class CreateTasks < ActiveRecord::Migration def change create_table :tasks do |t| t.string :name t.timestamps end end end
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' }]) # Mayor.create(:name =>...
Ruby
# This file is copied to spec/ when you run 'rails generate rspec:install' ENV["RAILS_ENV"] ||= 'test' require File.expand_path("../../config/environment", __FILE__) require 'rspec/rails' require 'rspec/autorun' require 'capybara/rspec' # Requires supporting ruby files with custom matchers and macros, etc, # in spec/s...
Ruby
# This file is used by Rack-based servers to start the application. require ::File.expand_path('../config/environment', __FILE__) run Integration::Application
Ruby
ENV["RAILS_ENV"] = "test" require File.expand_path('../../config/environment', __FILE__) require 'rails/test_help' class ActiveSupport::TestCase # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order. # # Note: You'll currently still have to declare fixtures explicitly in integrati...
Ruby
class <%= controller_class_name %>Controller < ApplicationController # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html) verify :method => :post, :only => :create<%= suffix %>, :redirect_to => { :action => :index<%= suffix %> } verify :method => :put, :only => :update<%= suffix %...
Ruby
module <%= controller_class_name %>Helper end
Ruby
class ScaffoldingSandbox include ActionView::Helpers::ActiveRecordHelper attr_accessor :form_action, :singular_name, :suffix, :model_instance def sandbox_binding binding end def default_input_block Proc.new { |record, column| "<p><label for=\"#{record}_#{column.name}\">#{column.human_name}</label...
Ruby
begin require 'simply_helpful' rescue MissingSourceFile puts "==================================================================" puts "This plugin depends upon simply_helpful" puts "" puts "please install with script/plugin install simply_helpful" puts "it also depends on either the simply_restful plugin, ...
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
# $ext_path: This should be the path of where the ExtJS SDK is installed # Generally this will be in a lib/extjs folder in your applications root # <root>/lib/extjs $ext_path = "../../" # sass_path: the directory your Sass files are in. THIS file should also be in the Sass folder # Generally this will be in a resource...
Ruby
# include the utils rb file which has extra functionality for the ext theme dir = File.dirname(__FILE__) require File.join(dir, 'lib', 'utils.rb') # register ext4 as a compass framework Compass::Frameworks.register 'ext4', dir
Ruby
# $ext_path: This should be the path of the Ext JS SDK relative to this file $ext_path = "../../extjs" # sass_path: the directory your Sass files are in. THIS file should also be in the Sass folder # Generally this will be in a resources/sass folder # <root>/resources/sass sass_path = File.dirname(__FILE__) # css_pat...
Ruby
# Compass configurations sass_path = File.dirname(__FILE__) css_path = File.join(sass_path, "..", "css") # Require any additional compass plugins here. images_dir = File.join(sass_path, "..", "img") output_style = :expanded environment = :production
Ruby
module ExtJS4 module SassExtensions module Functions module Utils def parsebox(list, n) assert_type n, :Number if !n.int? raise ArgumentError.new("List index #{n} must be an integer") elsif n.to_i < 1 raise ArgumentError.new("List index #{n} must...
Ruby
require 'RMagick' class NumberImageGenerator @@IMAGE_DIR = 'numbers-hdpi/' def generate(text, fs=18) #filename = "b" + sprintf("%03d", text) + ".png"; filename = "" + sprintf("%03d", text) + ".png"; font_size = fs; height = 35; width = 35; image = Magick::Image.new(width, height) {self.ba...
Ruby
#!/usr/bin/env ruby require 'nokogiri' string_to_remove = ['pref_cat_themes', 'theme_settings', 'theme_settings_summary', 'theme_settings_help'] string_files = [] Dir.glob('res/values*').each do |d| file = d << "/strings.xml" string_files << file if Fil...
Ruby
#!/usr/bin/env ruby # encoding: utf-8 require 'nokogiri' # read in convert.xml to see which how to convert the string-arrays # for each strings.xml in res/values res/values-?? res/values-??-* # find the string-arrays that match the ones in convert.xml and for each # remove opening and closing string-array tag #...
Ruby
#!/usr/bin/env ruby require 'net/http' require 'uri' LANGS_URI = 'http://ath.darshancomputing.com/bi/langs/' langs = Net::HTTP.get(URI.parse(LANGS_URI)).split() langs.each do |lang| if lang.length == 2 dir = 'res/values-' << lang else dir = 'res/values-' << lang[0,2] << '-r' << lang[2,2] end if ! D...
Ruby
#!/usr/bin/env ruby # encoding: utf-8 project = 'battery-indicator' user = `cat ~/.netrc | awk '{print $4;}'`.strip pass = `cat ~/.netrc | awk '{print $6;}'`.strip version = `grep "android:versionName=" AndroidManifest.xml`.split('"')[1] apk_location = "BatteryIndicatorPro-#{version}.apk" system("cp bin/*-release.ap...
Ruby
# street_gen.rb #--------------------------------------------------------------------------------------------------- # Version: 0.5.1a # Compatible: SketchUp 7 (PC) # (other versions untested) #--------------------------------------------------------------------------------------------------- # # CHA...
Ruby
require 'offset' module City_Gen module Bldg_Gen # Convenience Menus for debugging menu = City_Gen.menu.add_submenu("Buildings") menu.add_item("clf_highrise") { model = Sketchup.active_model sel = model.selection building_faces = [] sel.each { |e| building_faces <<...
Ruby
# city_gen.rb #--------------------------------------------------------------------------------------------------- # Version: 0.1.2a # Compatible: SketchUp 7 (PC) # (other versions untested) #--------------------------------------------------------------------------------------------------- # # CHANG...
Ruby
=begin rdoc = CityGen CityGen is the Open Source City Generator for Sketchup. Please visit the blog at: citygen.blogger.com and our project website at: code.google.com/p/citygen/ == Disclaimer THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE ...
Ruby
require 'sketchup.rb' UI.menu("PlugIns").add_item("Rotate and Capture") { capt } $eye = nil $target = nil $up = nil def capt $target = Geom::Point3d.new(0,0,0); $up = Geom::Vector3d.new(0, 0, 1) pan = 0; tilt = 0; distance = 500; first = 1; while pan < 360 tilt = 0 while ...
Ruby
require 'sketchup.rb' UI.menu("PlugIns").add_item("System Experiments") { exp_sys } $eye = nil $target = nil $up = nil def exp_sys $target = Geom::Point3d.new(0,0,0); $up = Geom::Vector3d.new(0, 0, 1) # Change respect distance vec = Geom::Vector3d.new(-45, 0 , 0) tr = Geom::Transformation.trans...
Ruby
# include the utils rb file which has extra functionality for the ext theme dir = File.dirname(__FILE__) require File.join(dir, 'lib', 'utils.rb') # register ext4 as a compass framework Compass::Frameworks.register 'ext4', dir
Ruby
# $ext_path: This should be the path of the Ext JS SDK relative to this file $ext_path = "../../extjs" # sass_path: the directory your Sass files are in. THIS file should also be in the Sass folder # Generally this will be in a resources/sass folder # <root>/resources/sass sass_path = File.dirname(__FILE__) # css_pat...
Ruby
# Compass configurations sass_path = File.dirname(__FILE__) css_path = File.join(sass_path, "..", "css") # Require any additional compass plugins here. images_dir = File.join(sass_path, "..", "img") output_style = :expanded environment = :production
Ruby
module ExtJS4 module SassExtensions module Functions module Utils def parsebox(list, n) assert_type n, :Number if !n.int? raise ArgumentError.new("List index #{n} must be an integer") elsif n.to_i < 1 raise ArgumentError.new("List index #{n} must...
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
#!/usr/bin/env ruby # Rubyripper - A secure ripper for Linux/BSD/OSX # Copyright (C) 2007 - 2010 Bouke Woudstra (boukewoudstra@gmail.com) # # This file is part of Rubyripper. Rubyripper is free software: you can # redistribute it and/or modify it under the terms of the GNU General # Public License as pu...
Ruby