code
stringlengths
1
1.73M
language
stringclasses
1 value
class WishListsSuggestionsController < ApplicationController before_filter :authenticate_user!, :except => :global def popular render :json => Product.joins(:product_tag).select("products.id, text") .where("user_id = #{current_user.id}").order("count desc").limit(params["count"] || 20) end def sugge...
Ruby
class ApplicationController < ActionController::Base protect_from_forgery rescue_from(ActionController::InvalidAuthenticityToken) do |e| render :json => {:error => "InvalidAuthenticityToken"}.as_json end @@ERRORS = { # Currency Exchange Rates 5101 => "input params incorrect", 5102 => "probably...
Ruby
class WelcomeController < ApplicationController def index end def welcome end def suggest render :json => [ ['Pavilion','1','null'], ['Pavilion laptops','2','null'], ['Pavilion dv5t','3','null'], ['Pavilion desktops','4','null'], ['Pavilion dv6t','5','null'], ['Pav...
Ruby
class AuthenticationsController < ApplicationController def index @authentications = current_user.authentications if current_user end def create omniauth = request.env["omniauth.auth"] authentication = Authentication.find_by_provider_and_uid(omniauth['provider'], omniauth['uid']) if authen...
Ruby
class WishListsController < ApplicationController before_filter :authenticate_user! def show @wish_list = wish_list render :json => @wish_list end def update @wish_list = wish_list if @wish_list.update_attributes(params[:wish_list]) head :ok else render :json => @wish_list.er...
Ruby
class ScheduledRecordsController < ApplicationController before_filter :authenticate_user! # GET /scheduled_records def index render :json => current_user.scheduled_records.as_json end # POST /scheduled_records def create @scheduled_record = ScheduledRecord.new(getScheduledRecord()) if @sched...
Ruby
require 'json' require "tweetGrammar" class TweeController < ApplicationController before_filter :authenticate_user! # GET /operations/index # GET /operations/index.xml def index @operations = current_user.operations.all.map { |o| o.external_format } respond_to do |format| format.html { rende...
Ruby
class SessionController < Devise::SessionsController prepend_before_filter :require_no_authentication, :only => :new protect_from_forgery :except => [:create, :new] def create resource = warden.authenticate(:scope => resource_name, :recall => :failure) if resource return sign_in_and_redirect(resour...
Ruby
class TokenAuthenticationsController < ApplicationController def create @user = User.criteria.id(params[:user_id]).first @user.reset_authentication_token! redirect_to edit_user_registration_path(@user) end def destroy @user = User.criteria.id(params[:id]).first @user.authentication_token = n...
Ruby
class OauthController < ApplicationController def start redirect_to client.web_server.authorize_url( :redirect_uri => oauth_callback_url, :scope => 'email' ) end def callback access_token = client.web_server.get_access_token( params[:code], :redirect_uri => oauth_callback...
Ruby
class UsersController < ApplicationController def authentication_token token = {Rack::Utils.escape_html(request_forgery_protection_token) => form_authenticity_token} logger.info(token.as_json) respond_to do |format| format.html { render :text => token } format.xml { render :xml => token} ...
Ruby
class WalletsController < ApplicationController before_filter :authenticate_user! # GET /wallets # GET /wallets.xml def index @wallets = current_user.wallets respond_to do |format| format.html # index.html.erb format.xml { render :xml => @wallets } format.json { render :json => @wa...
Ruby
class SuggestionController < ApplicationController def suggest render :text => User.find(params[:text]).email end end
Ruby
class OperationsController < ApplicationController before_filter :authenticate_user! # GET /operations # GET /operations.xml # GET /operations.json def index @operations = Operation.all respond_to do |format| format.html # index.html.erb format.xml { render :xml => @operations } fo...
Ruby
class RegistrationsController < Devise::RegistrationsController prepend_before_filter :require_no_authentication, :only => [ :new, :create, :cancel ] prepend_before_filter :authenticate_scope!, :only => [:edit, :update, :destroy] include Devise::Controllers::InternalHelpers def create build_resource c...
Ruby
class TagsController < ApplicationController before_filter :authenticate_user! def index @tags = current_user.tags render :json => @tags.as_json end end
Ruby
class UserInput attr_reader :text #String attr_reader :text_new? attr_reader :tag #ProductTag attr_reader :suggestions #Array[String] def initialize text = nil, tag = [] @text, @tag = text, tag end def continuation? text @text && text.start_with?(@text) end def suggestions...
Ruby
syntaxer do lang :javascript do folders "javascripts/*", "javascripts/**/*" extensions "js" exec_rule Syntaxer::Runner.javascript end languages :ruby do folders "app/*" end end
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. # 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
ActiveRecord::Base.include_root_in_json = false # TODO override TimeZone Serialization format
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. # 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. #KfinanceRails2::Application.config.session_store :cookie_store, :key => '_kfinance-rails2_session' #Rails.application.config.session_store :active_record_store # Use the database for sessions instead of the cookie-based default, # which shouldn't be used to...
Ruby
# Use this hook to configure devise mailer, warden hooks and so forth. The first # four configuration values can also be set straight in your models. Devise.setup do |config| # ==> Mailer Configuration # Configure the e-mail address which will be shown in DeviseMailer. config.mailer_sender = "Alex.Kolonitsky@gmai...
Ruby
require 'net/http' scheduler = Rufus::Scheduler.start_new scheduler.every("2h") do url = URI.parse('http://openexchangerates.org/latest.json') req = Net::HTTP::Get.new(url.path) res = Net::HTTP.start(url.host, url.port) do |http| http.request(req) end latestRates = ActiveSupport::JSON.decode...
Ruby
KfinanceRails2::Application.routes.draw do root :to => "welcome#index" match '/authentication_token' => 'users#authentication_token' match '/suggest/:text' => 'welcome#suggest' match '/suggestion/:text' => 'suggestion#suggest' match '/wish_list_suggestion/:text' => 'suggestion#wish_list_suggestion' resou...
Ruby
require 'rubygems' # Set up gems listed in the Gemfile. gemfile = File.expand_path('../../Gemfile', __FILE__) begin ENV['BUNDLE_GEMFILE'] = gemfile require 'bundler' Bundler.setup rescue Bundler::GemNotFound => e STDERR.puts e.message STDERR.puts "Try running `bundle install`." exit! end if File.exist?(gem...
Ruby
require File.expand_path('../boot', __FILE__) require 'rails/all' # If you have a Gemfile, require the gems listed there, including any gems # you've limited to :test, :development, or :production. Bundler.require(:default, Rails.env) if defined?(Bundler) module KfinanceRails2 class Application < Rails::Applicatio...
Ruby
#App Name: kfinance-dev #App URL: www.kfinance-dev.org/ #App ID: 156571524388701 #App Secret: 314f9d3f51eec3bcb2e3fb1ed729a1ea # # Consumer key # H84NdBflyJOyV9hq9nYDtw # Consumer secret # 5GRB3aaZcQELzhLP1fYFMcf1Yc2FaEDgdtqq4DUz04 # Request token URL # https://api.twitter.com/oauth/request_token # Access token ...
Ruby
KfinanceRails2::Application.configure do # Settings specified here will take precedence over those in config/application.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 tu...
Ruby
KfinanceRails2::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" f...
Ruby
KfinanceRails2::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 th...
Ruby
KfinanceRails2::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 th...
Ruby
require 'openid/store/filesystem' Rails.application.config.middleware.use OmniAuth::Builder do provider :twitter, 'H84NdBflyJOyV9hq9nYDtw', '5GRB3aaZcQELzhLP1fYFMcf1Yc2FaEDgdtqq4DUz04' provider :facebook, '156571524388701', '314f9d3f51eec3bcb2e3fb1ed729a1ea' provider :open_id, OpenID::Store::Filesystem.new(...
Ruby
# This file is used by Rack-based servers to start the application. require ::File.expand_path('../config/environment', __FILE__) run KfinanceRails2::Application
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.expand_path('../config/application', __FILE__) require 'rake' #require 'metric_fu' KfinanceRails2::Application.load_tasks #MetricFu::Configuration...
Ruby
desc 'Create YAML test fixtures from data in an existing database. Defaults to development database. Set RAILS_ENV to override.' task :extract_fixtures => :environment do sql = "SELECT * FROM %s" skip_tables = ["schema_info"] ActiveRecord::Base.establish_connection (ActiveRecord::Base.connection.table...
Ruby
# encoding: UTF-8 require 'citrus' require 'date' CURRENCIES = { 'ALL' => 'Lek' , 'USD' => '$' , 'AFN' => '؋' , 'ARS' => '$' , 'AWG' => 'ƒ' , 'AUD' => '$' , 'AZN' => 'ман' , 'BSD' => '$' , 'BBD' => '$' , 'BYR' => 'p.' , 'EUR' => '€' , 'BZ...
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
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
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
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
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
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
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 #require 'rubygems' require 'hpricot' require 'json' def read_json name return JSON.parse( File.open( name, 'r' ).read ) end STATES = read_json 'states.json' class Quit < Exception end def make_hash( root, fields ) result = {} fields.each { |field| add_hash( result, field, root, field ) } r...
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 require 'socket' require 'ipaddr' port = 5350 print "Listening for NAT-PMP public IP changes:\n" socket = UDPSocket.new socket.setsockopt(Socket::SOL_SOCKET, Socket::SO_REUSEADDR, true) socket.setsockopt(Socket::SOL_SOCKET, Socket::SO_REUSEPORT, true) socket.bind("224.0.0.1",port) addr = '0.0.0...
Ruby
#!/usr/bin/env ruby require 'socket' require 'ipaddr' port = 5350 # A compatible NAT gateway MUST generate a response with the following # format: # # 0 1 2 3 # 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 # +-+-+-+-+-+-+-+-+-+-+-+-+...
Ruby
#!/usr/bin/env ruby require 'socket' require 'ipaddr' port = 5350 print "Listening for NAT-PMP public IP changes:\n" socket = UDPSocket.new while true do begin # socket.setsockopt(Socket::SOL_SOCKET, Socket::SO_REUSEADDR, true) # socket.setsockopt(Socket::SOL_SOCKET, Socket::SO_REUSEPORT, true) socket...
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
header_path = '*.h' appledoc_options = [ '--output Documentation', '--project-name SSKeychain', '--project-company \'Sam Soffes\'', '--company-id com.samsoffes', "--project-version #{`cat VERSION`.strip}", '--keep-intermediate-files', '--create-html', '--templates ~/Library/Application\ Support/appledo...
Ruby
Pod::Spec.new do |s| s.name = "GooglePlus-iOS-SDK" s.version = "1.1.0" s.summary = "Google+ Plateform for iOS." s.homepage = "https://developers.google.com/+/mobile/ios/" s.license = { :type => 'Copyright', :text => 'Copyright 2009 - 2012 Google, Inc. All rights reserved.' } s.author ...
Ruby
header_path = '*.h' appledoc_options = [ '--output Documentation', '--project-name SSKeychain', '--project-company \'Sam Soffes\'', '--company-id com.samsoffes', "--project-version #{`cat VERSION`.strip}", '--keep-intermediate-files', '--create-html', '--templates ~/Library/Application\ Support/appledo...
Ruby
Pod::Spec.new do |s| s.name = "GooglePlus-iOS-SDK" s.version = "1.1.0" s.summary = "Google+ Plateform for iOS." s.homepage = "https://developers.google.com/+/mobile/ios/" s.license = { :type => 'Copyright', :text => 'Copyright 2009 - 2012 Google, Inc. All rights reserved.' } s.author ...
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