code
stringlengths
1
1.73M
language
stringclasses
1 value
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
Xuproject::Application.routes.draw do resources :projects # 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 # Sample of named ...
Ruby
module ApplicationHelper end
Ruby
module ProjectsHelper end
Ruby
class Project < ActiveRecord::Base end
Ruby
class ProjectsController < ApplicationController # GET /projects # GET /projects.json def index @projects = Project.all respond_to do |format| format.html # index.html.erb format.json { render json: @projects } end end # GET /projects/1 # GET /projects/1.json def show @projec...
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__) Xuproject::Application.load_tasks
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__) Xuproject::Application.load_tasks
Ruby
source 'https://rubygems.org' gem 'rails', '3.2.2' # Bundle edge Rails instead: # gem 'rails', :git => 'git://github.com/rails/rails.git' gem 'sqlite3' # Gems used only for assets and not required # in production environments by default. group :assets do gem 'sass-rails', '~> 3.2.3' gem 'coffee-rails', '~> 3...
Ruby
class CreateProjects < ActiveRecord::Migration def change create_table :projects do |t| t.string "serial number" #"序号" t.string "Project Number" #"计划编号" t.string "Project Name" #"项目名称" t.string "construction of nature" #"建设性质" t.string "construction scale and main construction...
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: 'Emanuel...
Ruby
# This file is used by Rack-based servers to start the application. require ::File.expand_path('../config/environment', __FILE__) run Xuproject::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
# Is sheet 01 (after the TOC) a left sheet or a right sheet? sheet1: right # "left" and "right" specify which page of a two-page spread a file # must start on. "left" means that a file must start on the first of # the two pages. "right" means it must start on the second of the two # pages. The file may start in eit...
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
# Is sheet 01 (after the TOC) a left sheet or a right sheet? sheet1: right # "left" and "right" specify which page of a two-page spread a file # must start on. "left" means that a file must start on the first of # the two pages. "right" means it must start on the second of the two # pages. The file may start in eit...
Ruby
(* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * * Softw...
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
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
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 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
# Is sheet 01 (after the TOC) a left sheet or a right sheet? sheet1: right # "left" and "right" specify which page of a two-page spread a file # must start on. "left" means that a file must start on the first of # the two pages. "right" means it must start on the second of the two # pages. The file may start in eit...
Ruby
# Is sheet 01 (after the TOC) a left sheet or a right sheet? sheet1: right # "left" and "right" specify which page of a two-page spread a file # must start on. "left" means that a file must start on the first of # the two pages. "right" means it must start on the second of the two # pages. The file may start in eit...
Ruby
# Simple Jobs # =========== require 'java' java_import Java::MyscheduleQuartzExtraJob::LoggerJob java_import Java::MyscheduleQuartzExtraJob::ScriptingJob java_import Java::MyscheduleQuartzExtra::SchedulerTemplate java_import Java::JavaUtil::Date java_import Java::JavaLang::System # Schedule hourly job scheduler.schedu...
Ruby
# # << Haru Free PDF Library 2.0.2 >> -- line_demo.rb # # http://libharu.org/ # # Copyright (c) 1999-2006 Takeshi Kanno # # Permission to use, copy, modify, distribute and sell this software # and its documentation for any purpose is hereby granted without fee, # provided that the above copyright notice appear...
Ruby
# # << Haru Free PDF Library 2.0.6 >> -- ext_gstate_demo.rb # # http://libharu.org/ # # Copyright (c) 1999-2006 Takeshi Kanno # # Permission to use, copy, modify, distribute and sell this software # and its documentation for any purpose is hereby granted without fee, # provided that the above copyright notice ...
Ruby
# # << Haru Free PDF Library 2.0.0 >> -- text_demo2.rb # # Copyright (c) 1999-2006 Takeshi Kanno <takeshi_kanno@est.hi-ho.ne.jp> # # Permission to use, copy, modify, distribute and sell this software # and its documentation for any purpose is hereby granted without fee, # provided that the above copyright notice...
Ruby
# # << Haru Free PDF Library 2.0.2 >> -- ttfont_demo.rb # # http://libharu.org/ # # Copyright (c) 1999-2006 Takeshi Kanno # # Permission to use, copy, modify, distribute and sell this software # and its documentation for any purpose is hereby granted without fee, # provided that the above copyright notice appe...
Ruby
# # << Haru Free PDF Library 2.0.0 >> -- font_example.rb # # Copyright (c) 1999-2006 Takeshi Kanno <takeshi_kanno@est.hi-ho.ne.jp> # # Permission to use, copy, modify, distribute and sell this software # and its documentation for any purpose is hereby granted without fee, # provided that the above copyright noti...
Ruby
# # << Haru Free PDF Library 2.0.0 >> -- encryption.rb # # Copyright (c) 1999-2006 Takeshi Kanno <takeshi_kanno@est.hi-ho.ne.jp> # # Permission to use, copy, modify, distribute and sell this software # and its documentation for any purpose is hereby granted without fee, # provided that the above copyright notice...
Ruby
# # << Haru Free PDF Library 2.0.0 >> -- demo.rb # # Copyright (c) 1999-2006 Takeshi Kanno <takeshi_kanno@est.hi-ho.ne.jp> # # Permission to use, copy, modify, distribute and sell this software # and its documentation for any purpose is hereby granted without fee, # provided that the above copyright notice appea...
Ruby
# # << Haru Free PDF Library 2.0.6 >> -- slideshow_demo.rb # # http://libharu.org/ # # Copyright (c) 1999-2006 Takeshi Kanno # # Permission to use, copy, modify, distribute and sell this software # and its documentation for any purpose is hereby granted without fee, # provided that the above copyright notice a...
Ruby
# # << Haru Free PDF Library 2.0.2 >> -- arc_demo.rb # # http://libharu.org/ # # Copyright (c) 1999-2006 Takeshi Kanno # # Permission to use, copy, modify, distribute and sell this software # and its documentation for any purpose is hereby granted without fee, # provided that the above copyright notice appear ...
Ruby
require 'mkmf' $CPPFLAGS = $CPPFLAGS + " -I../../include" $LDFLAGS = $LDFLAGS + " -L../../" $LIBS = $LIBS + " -lhpdf -lpng -lz" create_makefile 'hpdf'
Ruby
#!/usr/bin/env ruby require 'socket' require 'ipaddr' MCAST_GROUP = '224.0.0.3' PORT = 47002 MESSAGE = 'From %s, xy says: %s' IP = '127.0.0.1' optval = IPAddr.new(MCAST_GROUP).hton + IPAddr.new(IP).hton sock = UDPSocket.new sock.setsockopt(Socket::SOL_SOCKET, Socket::SO_REUSEADDR, true) sock.setsockopt(Socket::IPPRO...
Ruby
#!/usr/bin/env ruby require 'socket' require 'ipaddr' MCAST_GROUP = '224.0.0.3' PORT = 47002 MESSAGE = 'From %s, xy says: %s' IP = '127.0.0.1' optval = IPAddr.new(MCAST_GROUP).hton + IPAddr.new(IP).hton sock = UDPSocket.new sock.setsockopt(Socket::SOL_SOCKET, Socket::SO_REUSEADDR, true) sock.setsockopt(Socket::IPPRO...
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
#!/usr/bin/env ruby ######################################## # Main Rakefile for XhochY PHP Session # ######################################## ## Includes ## require 'xysession-contrib/test.rb' require 'xysession-contrib/src_doc.rb' ## Tasks ## task :test => :xysession_test task :default => [:test, :src_doc]
Ruby
#!/usr/bin/env ruby ####################################################### # Tasks for creating the PHP-sourcecode documentation # ####################################################### ## Includes ## require 'rake/clean'; ## Tasks ## task :src_doc => 'xysession-docs/elementindex.html' ## File Tasks ## file 'x...
Ruby
#!/usr/bin/env ruby ####################################################### # Tasks for creating the PHP-sourcecode documentation # ####################################################### ## Includes ## require 'rake/clean'; ## Tasks ## task :src_doc => 'xysession-docs/elementindex.html' ## File Tasks ## file 'x...
Ruby
#!/usr/bin/env ruby ######################################## # Tasks for testing XhochY PHP Session # ######################################## ## Tasks ## task :xysession_test do |t| sh '/usr/bin/env phpunit --log-graphviz xysession-tests-graph/main.dot --report ./xysession-tests-report XYSession_AllTests xysession...
Ruby
#!/usr/bin/env ruby ######################################## # Tasks for testing XhochY PHP Session # ######################################## ## Tasks ## task :xysession_test do |t| sh '/usr/bin/env phpunit --log-graphviz xysession-tests-graph/main.dot --report ./xysession-tests-report XYSession_AllTests xysession...
Ruby
#!/usr/bin/env ruby ######################################## # Main Rakefile for XhochY PHP Session # ######################################## ## Includes ## require 'xysession-contrib/test.rb' require 'xysession-contrib/src_doc.rb' ## Tasks ## task :test => :xysession_test task :default => [:test, :src_doc]
Ruby
# Author: Michael Burns (mburns@cs.princeton.edu) # Copyright (c) 2009 Michael Burns # # This program is distributed under the terms of the # GNU General Public License. See the COPYING file # for details.i module Collada class Triangles attr_accessor :vertex_indices, :normal_indices, :count ...
Ruby
# Author: Michael Burns (mburns@cs.princeton.edu) # Copyright (c) 2009 Michael Burns # # This program is distributed under the terms of the # GNU General Public License. See the COPYING file # for details. module Collada class Contours attr_accessor :vertex_indices, :normal_indices, :count ...
Ruby
# Author: Michael Burns (mburns@cs.princeton.edu) # Copyright (c) 2009 Michael Burns # # This program is distributed under the terms of the # GNU General Public License. See the COPYING file # for details. module Collada class LineStrips attr_accessor :vertex_indices def initial...
Ruby
# Author: Michael Burns (mburns@cs.princeton.edu) # Copyright (c) 2009 Michael Burns # # This program is distributed under the terms of the # GNU General Public License. See the COPYING file # for details. module Collada def Collada.ccw(a, b, c) a[0] * (b[1] - c[1]) - b[0] * (a[1] - c[1]) + c[0] *...
Ruby
# Author: Michael Burns (mburns@cs.princeton.edu) # Copyright (c) 2009 Michael Burns # # This program is distributed under the terms of the # GNU General Public License. See the COPYING file # for details. require 'rexml/formatters/default' module REXML module Formatters # Pretty-prints an XML document. T...
Ruby
# Author: Michael Burns (mburns@cs.princeton.edu) # Copyright (c) 2009 Michael Burns # # This program is distributed under the terms of the # GNU General Public License. See the COPYING file # for details. require 'sketchup.rb' require 'rubystdlib.rb' require 'rexml/Document' load 'collada/id_manager.rb' load 'co...
Ruby
# Author: Michael Burns (mburns@cs.princeton.edu) # Copyright (c) 2009 Michael Burns # # This program is distributed under the terms of the # GNU General Public License. See the COPYING file # for details. require 'rubystdlib.rb' require 'rexml/Document' module Collada class Mesh attr_accessor :id ...
Ruby
# Author: Michael Burns (mburns@cs.princeton.edu) # Copyright (c) 2009 Michael Burns # # This program is distributed under the terms of the # GNU General Public License. See the COPYING file # for details. module Collada class Node attr_accessor :name, :id, :geometries, :components, :nodes, :anima...
Ruby
# Author: Michael Burns (mburns@cs.princeton.edu) # Copyright (c) 2009 Michael Burns # # This program is distributed under the terms of the # GNU General Public License. See the COPYING file # for details. module Collada class Lines attr_accessor :vertex_indices, :count def init...
Ruby
# Author: Michael Burns (mburns@cs.princeton.edu) # Copyright (c) 2009 Michael Burns # # This program is distributed under the terms of the # GNU General Public License. See the COPYING file # for details. module Collada class Material attr_reader :id def initialize(id, color) ...
Ruby
# Author: Michael Burns (mburns@cs.princeton.edu) # Copyright (c) 2009 Michael Burns # # This program is distributed under the terms of the # GNU General Public License. See the COPYING file # for details. module Collada class Component attr_accessor :node def initialize(node) ...
Ruby
# Author: Michael Burns (mburns@cs.princeton.edu) # Copyright (c) 2009 Michael Burns # # This program is distributed under the terms of the # GNU General Public License. See the COPYING file # for details. module Collada def Collada.p_to_s(p) p = p.collect { |n| if n.abs < 1e-10 then 0.0 else n end } ...
Ruby
# Author: Michael Burns (mburns@cs.princeton.edu) # Copyright (c) 2009 Michael Burns # # This program is distributed under the terms of the # GNU General Public License. See the COPYING file # for details. module Collada class AnimationPath def AnimationPath.set_path(object) object.se...
Ruby
# Author: Michael Burns (mburns@cs.princeton.edu) # Copyright (c) 2009 Michael Burns # # This program is distributed under the terms of the # GNU General Public License. See the COPYING file # for details. module Collada class IdManager def initialize(initial_entries = []) @id_hash = {} ...
Ruby
# Author: Michael Burns (mburns@cs.princeton.edu) # Copyright (c) 2009 Michael Burns # # This program is distributed under the terms of the # GNU General Public License. See the COPYING file # for details. require 'collada/exporter.rb'
Ruby
# Author: Michael Burns (mburns@cs.princeton.edu) # Copyright (c) 2009 Michael Burns # # This program is distributed under the terms of the # GNU General Public License. See the COPYING file # for details. if not file_loaded?("rubystdlib.rb") processor, platform, *rest = RUBY_PLATFORM.split("-") cas...
Ruby
# Author: Michael Burns (mburns@cs.princeton.edu) # Copyright (c) 2009 Michael Burns # # This program is distributed under the terms of the # GNU General Public License. See the COPYING file # for details. require 'sketchup.rb' module SelectionFilter def SelectionFilter.filter(type) new_selection = Sketch...
Ruby
source 'http://rubygems.org' gem 'albacore' gem 'mime-types' gem 'xml-simple'
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
#!/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
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
module Blueprint # parses a hash of key/value pairs, key being output CSS selectors, value # being a list of CSS selectors to draw from class SemanticClassNames attr_accessor :class_assignments attr_reader :namespace, :source_file # ==== Options # * <tt>options</tt> # * <tt>:namespace</tt...
Ruby
class String # see if string has any content def blank?; self.length.zero?; end # strip space after :, remove newlines, replace multiple spaces with only one space, remove comments def strip_space! replace self.gsub(/:\s*/, ":").gsub(/\n/, "").gsub(/\s+/, " ").gsub(/(\/\*).*?(\*\/)/, "") end # remove ...
Ruby
require "yaml" require "optparse" module Blueprint class Compressor TEST_FILES = ["index.html", "parts/elements.html", "parts/forms.html", "parts/grid.html", "parts/sample.html"] attr_accessor :namespace, :custom_css, :custom_layout, :se...
Ruby
begin require "rubygems" gem "rmagick" require "rvg/rvg" rescue Exception => e puts " #{"*" * 100}" puts " **" puts " ** Warning:" puts " ** Could not load the Rmagick gem. Please check your installation." puts " ** grid.png will not be generated." puts " **" puts " #{"*" * 100}\n" end...
Ruby
module Blueprint # Strips out most whitespace and can return a hash or string of parsed data class CSSParser attr_accessor :namespace attr_reader :css_output, :raw_data # ==== Options # * <tt>css_string</tt> String of CSS data # * <tt>options</tt> # * <tt>:namespace</tt> -- Namespace to...
Ruby
module Blueprint class Namespace # Read html to string, remove namespace if any, # set the new namespace, and update the test file. def initialize(path, namespace) html = File.path_to_string(path) remove_current_namespace(html) add_namespace(html, namespace) File.string_to_file(ht...
Ruby
require 'fileutils' module Blueprint # path to the root Blueprint directory ROOT_PATH = File.join(File.expand_path(File.dirname(__FILE__)), "../../") # path to where the Blueprint CSS files are stored BLUEPRINT_ROOT_PATH = File.join(Blueprint::ROOT_PATH, "blueprint") # path to where the Blueprin...
Ruby
module Blueprint # Validates generated CSS against the W3 using Java class Validator attr_reader :error_count def initialize @error_count = 0 end # Validates all three CSS files def validate java_path = `which java`.rstrip raise "You do not have a Java installed, but it is re...
Ruby
require 'erb' module Blueprint # Generates a custom grid file, using ERB to evaluate custom settings class CustomLayout # path to ERB file used for CSS template CSS_ERB_FILE = File.join(Blueprint::LIB_PATH, 'grid.css.erb') attr_writer :column_count, :column_width, :gutter_width, :input_padding, ...
Ruby
#!/usr/bin/env ruby require "blueprint/blueprint" require "blueprint/validator" # This script will validate the core Blueprint files. # # The files are not completely valid. This has to do # with a small number of CSS hacks needed to ensure # consistent rendering across browsers. # # To add your own CSS files for val...
Ruby
#!/usr/bin/env ruby require File.join(File.dirname(__FILE__), "blueprint", "blueprint") # **Basic # # Calling this file by itself will pull files from blueprint/src and # concatenate them into three files; ie.css, print.css, and screen.css. # # ruby compress.rb # # However, argument variables can be set to c...
Ruby
#!/usr/bin/env ruby ########################################## # Main Rakefile for XhochY PHP Exception # ########################################## ## Includes ## require 'xyexception-contrib/test.rb' require 'xyexception-contrib/src_doc.rb' ## Tasks ## task :test => :xyexception_test task :default => [:test, :src...
Ruby
#!/usr/bin/env ruby ####################################################### # Tasks for creating the PHP-sourcecode documentation # ####################################################### ## Includes ## require 'rake/clean'; ## Tasks ## task :src_doc => 'xyexception-docs/elementindex.html' ## File Tasks ## file ...
Ruby
#!/usr/bin/env ruby ####################################################### # Tasks for creating the PHP-sourcecode documentation # ####################################################### ## Includes ## require 'rake/clean'; ## Tasks ## task :src_doc => 'xyexception-docs/elementindex.html' ## File Tasks ## file ...
Ruby
#!/usr/bin/env ruby ########################################## # Tasks for testing XhochY PHP Exception # ########################################## ## Tasks ## task :xyexception_test do |t| sh 'phpunit AllTests xyexception-tests/all.tests.php' end
Ruby
#!/usr/bin/env ruby ########################################## # Tasks for testing XhochY PHP Exception # ########################################## ## Tasks ## task :xyexception_test do |t| sh 'phpunit AllTests xyexception-tests/all.tests.php' end
Ruby
#!/usr/bin/env ruby ########################################## # Main Rakefile for XhochY PHP Exception # ########################################## ## Includes ## require 'xyexception-contrib/test.rb' require 'xyexception-contrib/src_doc.rb' ## Tasks ## task :test => :xyexception_test task :default => [:test, :src...
Ruby
require "test/unit" require 'cgi' require 'net/http' require 'rexml/document' require '../lib/yaaft/yaaft' require "../lib/yaaft/scrobbleCache" # tests the LastFM module to determine if LastFM has unexpectidly changed # functionality on us. class TestArtistfix < Test::Unit::TestCase def test_artistfix # Loo...
Ruby
require "test/unit" require 'cgi' require 'net/http' require 'rexml/document' require '../lib/yaaft/yaaft' require "../lib/yaaft/scrobbleCache" # tests the LastFM module to determine if LastFM has unexpectidly changed # functionality on us. class TestUTF8 < Test::Unit::TestCase def test_utf8 bad = "tag� Bud...
Ruby
# -*- encoding: utf-8 -*- Gem::Specification.new do |s| s.name = %q{yaaft} s.version = "0.0.1" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.authors = ["Richard Gould"] s.autorequire = %q{yaaft} s.date = %q{2009-05-24} s.description = %q{A coll...
Ruby
#!/usr/bin/env ruby APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..')) begin require 'rubigen' rescue LoadError require 'rubygems' require 'rubigen' end require 'rubigen/scripts/destroy' ARGV.shift if ['--help', '-h'].include?(ARGV[0]) RubiGen::Base.use_component_sources! [:newgem_simple, :tes...
Ruby
#!/usr/bin/env ruby APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..')) begin require 'rubigen' rescue LoadError require 'rubygems' require 'rubigen' end require 'rubigen/scripts/generate' ARGV.shift if ['--help', '-h'].include?(ARGV[0]) RubiGen::Base.use_component_sources! [:newgem_simple, :te...
Ruby
#!/usr/bin/env ruby APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..')) begin require 'rubigen' rescue LoadError require 'rubygems' require 'rubigen' end require 'rubigen/scripts/destroy' ARGV.shift if ['--help', '-h'].include?(ARGV[0]) RubiGen::Base.use_component_sources! [:newgem_simple, :tes...
Ruby
#!/usr/bin/env ruby APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..')) begin require 'rubigen' rescue LoadError require 'rubygems' require 'rubigen' end require 'rubigen/scripts/generate' ARGV.shift if ['--help', '-h'].include?(ARGV[0]) RubiGen::Base.use_component_sources! [:newgem_simple, :te...
Ruby