code stringlengths 1 1.73M | language stringclasses 1
value |
|---|---|
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../../config/boot'
require 'commands/process/spawner'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../../config/boot'
require 'commands/process/spinner'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../../config/boot'
require 'commands/process/reaper'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../../config/boot'
require 'commands/process/spinner'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../../config/boot'
require 'commands/process/spawner'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/destroy' | Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/generate' | Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/server' | Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/about' | Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/plugin' | Ruby |
class CreateArticleSourcesPictures < ActiveRecord::Migration
def self.up
create_table :article_sources_pictures do |t|
t.column :article_source_id, :int
t.column :picture_id, :int
end
end
def self.down
drop_table :article_sources_pictures
end
end
| Ruby |
class AddSection < ActiveRecord::Migration
def self.up
create_table :sections do |t|
t.column :name, :string, :null => false
t.column :issue_number, :integer, :null => false
t.column :section_description, :string
end
end
def self.down
end
end
| Ruby |
class CreateUsers < ActiveRecord::Migration
def self.up
create_table "users", :force => true do |t|
t.column "login", :string, :limit => 80, :default => "", :null => false
t.column "salted_password", :string, :limit => 40, :default => "", :null => false
t.column "email", :string, :limit => 60, :... | Ruby |
class AddStatusToVolume < ActiveRecord::Migration
def self.up
add_column :volumes, :status, :string, :null => false
end
def self.down
remove_column :volume, :status
end
end
| Ruby |
class AddIssue < ActiveRecord::Migration
def self.up
create_table :issues do |t|
t.column :issue_number, :integer, :null=>false
t.column :volume_number, :integer, :null=>false
t.column :issue_date, :date, :null=>false
end
end
def self.down
drop_table :issues
end
end
| Ruby |
class IssueStatusToInt < ActiveRecord::Migration
def self.up
remove_column :issues, :status
end
def self.down
end
end
| Ruby |
class CreateTableImages < ActiveRecord::Migration
def self.up
create_table :images do |t|
t.column :name, :string, :null => false
t.column :comment, :string, :null => false
t.column :author, :string, :null=> false
end
end
def self.down
drop_table :images
end
end
| Ruby |
class DropArticleSources < ActiveRecord::Migration
def self.up
drop_table :article_sources
end
def self.down
raise IrreversibleMigration
end
end
| Ruby |
class AddArticlesPicturesTable < ActiveRecord::Migration
def self.up
create_table :articles_pictures do |t|
t.column :article_id, :int
t.column :picture_id, :int
end
end
def self.down
drop_table :articles_pictures
end
end
| Ruby |
class AddAuthorFieldToPictures < ActiveRecord::Migration
def self.up
add_column :pictures, :author, :string, :null => false
end
def self.down
remove_column :pictures, :author
end
end
| Ruby |
class AllowNullForArticleSectionId < ActiveRecord::Migration
# Remove the not null constraint from articles.section_id,
# in order to allow the existence of orphan articles
def self.up
# if undefined :default, rake migrate will complain
# Mysql::Error: Invalid default value for 'section_id': ALTER TAB... | Ruby |
class IssueStatusAddingInt < ActiveRecord::Migration
def self.up
add_column :issues, :status, :integer
end
def self.down
end
end
| Ruby |
class AddSectionIdToArticle < ActiveRecord::Migration
def self.up
add_column :articles, :section_id, :integer, :null => false
end
def self.down
remove_column :articles, :section_id
end
end
| Ruby |
class ArticleBlurbToTextType < ActiveRecord::Migration
def self.up
remove_column :articles, :blurb
add_column :articles, :blurb, :text, :null => false
end
def self.down
end
end
| Ruby |
class AddFiledLayoutToIssue < ActiveRecord::Migration
def self.up
add_column :issues, :layout, :text, :null => true
end
def self.down
remove_column :issues, :layout
end
end
| Ruby |
class DropArticlesPictures < ActiveRecord::Migration
def self.up
drop_table :articles_pictures
end
def self.down
raise IrreversibleMigration
end
end
| Ruby |
class CreateArticlesSections < ActiveRecord::Migration
def self.up
create_table "articles_sections", :force => true do |t|
t.column "article_id", :integer
t.column "section_id", :integer
end
end
def self.down
drop_table :articles_sections
end
end
| Ruby |
class RemoveUnneccesaryFields < ActiveRecord::Migration
def self.up
remove_column :articles, :section_id
remove_column :sections, :issue_number
remove_column :issues, :volume_number
end
def self.down
raise IrreversibleMigration
end
end
| Ruby |
class MoveStatusFromVolume < ActiveRecord::Migration
def self.up
remove_column :volumes, :status
add_column :issues, :status, :string, :null => false
end
def self.down
remove_column :issues, :status
add_column :volumes, :status, :string, :null => false
end
end
| Ruby |
class RemoveIdFromArticlesSections < ActiveRecord::Migration
def self.up
remove_column :articles_sections, :id
end
def self.down
raise IrreversibleMigration
end
end
| Ruby |
class DropArticles < ActiveRecord::Migration
def self.up
drop_table :articles
end
def self.down
raise IrreversibleMigration
end
end
| Ruby |
class AddForeignKeys < ActiveRecord::Migration
def self.up
add_column :articles, :section_id, :integer, :null => false
add_column :sections, :issue_id, :integer, :null => false
add_column :issues, :volume_id, :integer, :null => false
end
def self.down
remove_column :articles, :section_id
remo... | Ruby |
class RemoveIssueDate < ActiveRecord::Migration
def self.up
remove_column :issues, :issue_date
end
def self.down
add_column :issues, :issue_date, :date, :null => false
end
end
| Ruby |
class DropCreateArticles < ActiveRecord::Migration
def self.up
drop_table :articles
create_table :articles do |t|
t.column :title, :string, :null => false
t.column :blurb, :string, :null => false
# Text stored in textilize (redcloth) format
t.column :body, :text, :null => false
# ... | Ruby |
class AddPictureTable < ActiveRecord::Migration
def self.up
# create_table :pictures do |t|
# t.column :comment, :string, :null => false
## A string to be used as MIME/TYPE for the http request
## TODO: write a method to extrac this for the extension in the model
# t.column :content_type, :st... | Ruby |
class AddArticle < ActiveRecord::Migration
def self.up
create_table :articles do |t|
t.column :title, :string,:null=>false
t.column :blurb, :string, :null=>false
t.column :body, :text, :null=>false
#date.. but maybe we just use the date from the edition!
t.column :article_date, :dat... | Ruby |
class SetDefaultColumnSectionIdToNull < ActiveRecord::Migration
def self.up
# Setting the default value of section_id to
# null instead of 0, it makes a lot more sense for
# orphan articles
change_column :articles, :section_id, :integer, :default=>nil, :null=>true
end
def self.down
change_col... | Ruby |
class AddDatePublishedToIssue < ActiveRecord::Migration
def self.up
add_column :issues, :date_published, :datetime
end
def self.down
remove_column :issues, :date_published
end
end
| Ruby |
class AddDatetimeStampsToClasses < ActiveRecord::Migration
def self.up
# By using "created_at" or "created_on", ActiveRecord stamps these automatically
# during ActiveRecord#before_create and ActiveRecord#before_update callbacks
add_column :volumes, :created_at, :datetime, :null => false
add_column :v... | Ruby |
class ChangeArticeSourcesTitleAndBlurb < ActiveRecord::Migration
def self.up
remove_column :article_sources, :title
remove_column :article_sources, :blurb
add_column :article_sources, :title, :text, :null => false
add_column :article_sources, :blurb, :text, :null => false
end
def self.down
re... | Ruby |
class AddVolume < ActiveRecord::Migration
def self.up
create_table :volumes do |t|
t.column :volume_number, :integer, :null => false
#Just to have two columns
t.column :description, :string
end
end
def self.down
drop_table :volumes
end
end
| Ruby |
class AddArticleSources < ActiveRecord::Migration
def self.up
create_table :article_sources do |t|
t.column :title, :string, :null => false
t.column :blurb, :string, :null => false
# Text stored in textilize (redcloth) format
t.column :body, :text, :null => false
# Author is an user... | Ruby |
class AddArticleNewVersion < ActiveRecord::Migration
def self.up
create_table :articles do |t|
t.column :article_source_id, :int, :null=> false
t.column :section_id, :int, :null => false
# The priority of the article in the scope of a section
t.column :priority, :int, :null => false
en... | Ruby |
#!/usr/bin/ruby
require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT)
# If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like:
# "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impaired
re... | Ruby |
#!/usr/bin/ruby
require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT)
# If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like:
# "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impaired
re... | Ruby |
#!/usr/bin/ruby
#
# You may specify the path to the FastCGI crash log (a log of unhandled
# exceptions which forced the FastCGI instance to exit, great for debugging)
# and the number of requests to process before running garbage collection.
#
# By default, the FastCGI crash log is RAILS_ROOT/log/fastcgi.crash.log
# an... | Ruby |
#!/usr/bin/ruby
require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT)
# If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like:
# "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impaired
re... | Ruby |
#!/usr/bin/ruby
require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT)
# If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like:
# "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impaired
re... | Ruby |
#!/usr/bin/ruby
#
# You may specify the path to the FastCGI crash log (a log of unhandled
# exceptions which forced the FastCGI instance to exit, great for debugging)
# and the number of requests to process before running garbage collection.
#
# By default, the FastCGI crash log is RAILS_ROOT/log/fastcgi.crash.log
# an... | Ruby |
#!/bin/env ruby
require File.dirname(__FILE__) + '/../test_helper'
class LocalizationTest < Test::Unit::TestCase
include Localization
# TODO: shouldn't use production data for tests
# require File.dirname(__FILE__) + '/../test_helper'
TRANSLATION_TABLE = LOCALIZED_STRINGS['localizations']
CONFIG[:defa... | Ruby |
require 'models/user_notify.rb'
ActionMailer::Base.class_eval {
@@inject_one_error = false
cattr_accessor :inject_one_error
private
def perform_delivery_test(mail)
if inject_one_error
ActionMailer::Base::inject_one_error = false
raise "Failed to send email" if raise_delivery_errors
else
... | Ruby |
require 'time'
Time.class_eval {
@@advance_by_days = 0
cattr_accessor :advance_by_days
class << Time
alias now_old now
def now
if Time.advance_by_days != 0
return Time.at(now_old.to_i + Time.advance_by_days * 60 * 60 * 24 + 1)
else
now_old
end
end
end
}
| Ruby |
ENV["RAILS_ENV"] = "test"
require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
require 'test_help'
class Test::Unit::TestCase
# Transactional fixtures accelerate your tests by wrapping each test method
# in a transaction that's rolled back on completion. This ensures that the
# test datab... | Ruby |
# -*- mode: ruby -*-
# vi: set ft=ruby :
# ------------------------------------------------------------
# Subversion info - Branch
# $Update Date: 2014-05-14 17:45:05 +0100 (Wed, 14 May 2014) $
# $Author: Librarian $
# $Revision: 51 $
# ------------------------------------------------------------
# Vagrantf... | Ruby |
# -*- mode: ruby -*-
# vi: set ft=ruby :
$script = <<SCRIPT
echo I am provisioning...
date > /etc/vagrant_provisioned_at
SCRIPT
Vagrant.configure("2") do |config|
config.vm.provision "shell", inline: $script
end
Vagrant::Config.run do |config|
config.vm.box = "precise64"
config.vm.box_url = "http... | Ruby |
#
# To change this template, choose Tools | Templates
# and open the template in the editor.
$:.unshift File.join(File.dirname(__FILE__),'..','lib')
require 'test/unit'
require 'carro_compra'
require 'producto'
class TestCarroCompra < Test::Unit::TestCase
def test_add
p1 = Producto.new("leche", 10)
p2 =... | Ruby |
#
# To change this template, choose Tools | Templates
# and open the template in the editor.
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
| Ruby |
#
# To change this template, choose Tools | Templates
# and open the template in the editor.
puts "Hello World"
| Ruby |
#
# To change this template, choose Tools | Templates
# and open the template in the editor.
class CarroCompra
def initialize
@productos = Array.new
end
def add(producto)
@productos.push(producto)
end
def clear
@productos.clear
end
def [](index)
@productos[index]
end
... | Ruby |
class Producto
attr_accessor :nombre, :precio
def initialize(nombre, precio)
@nombre=nombre;
@precio=precio;
end
end
| 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 'custom_field_error' | Ruby |
class << ActiveRecord::Base
@field_error_procs = Hash.new
class << self; attr_accessor :field_error_procs; end;
def custom_field_error(html, name = self.name.downcase)
self.class.field_error_procs.include?(name) ? nil : self.class.field_error_procs[name] = html
ActionView::Base.field_error_proc ... | Ruby |
#################
# Configuration #
#################
NAME = 'PrBoom-Plus'
APPVERSION = /^#define VERSION "([^"]*)"$/.match(IO.read('MAC/config.h'))[1]
require 'MAC/macsupport'
DOOMWADDIR = File::expand_path('~/Library/Application Support/PrBoom-Plus')
@deutex = 'deutex'
@systemFrameworks += %w(Cocoa Carbon QuickTim... | Ruby |
require 'rake/loaders/makefile'
@cc = 'cc'
@linker = 'cc'
@makedepend = 'makedepend'
@frameworkPaths = %w(~/Library/Frameworks /Library/Frameworks /System/Library/Frameworks)
@commonflags = ''
@cflags = ''
@cxxflags = ''
@objcflags = ''
@includes = ''
@defines = ''
@ldflags = ''
@frameworkFlags = ''
@libs = ''
@syst... | Ruby |
require "FileUtils"
require "timeout"
module Cpg
class App
attr_accessor :bundleIdentifier, :category, :contact, :date, :description,
:location, :maintainer, :name, :scripts, :size, :source, :version
def fetch
if Dir.glob("source").empty?
Dir.mkdir("sou... | Ruby |
#! /usr/bin/ruby
require 'rexml/document'
require 'open-uri'
require 'ostruct'
module Cpg
PAYLOAD_PATH = "payload"
PAYLOAD_CUSTOM_PATH = "payload/custom_packages"
CUSTOM_PACK_PATH = "custom_packages"
class Plist
def self.correct?(plist_source)
xmlsource = plist_source =~ /^http.+... | Ruby |
#! /usr/bin/ruby
require 'rexml/document'
require 'open-uri'
require 'ostruct'
module Cpg
PAYLOAD_PATH = "payload"
PAYLOAD_CUSTOM_PATH = "payload/custom_packages"
CUSTOM_PACK_PATH = "custom_packages"
class Plist
def self.correct?(plist_source)
xmlsource = plist_source =~ /^http.+... | Ruby |
#!/usr/bin/ruby
require "cpg.rb"
unless ARGV[0]
puts "Please enter packages sources list"
puts "example:"
puts " ./generate http://repo.sc/mask/xml"
puts " ./generate mask.xml"
exit(1)
end
unless File.exist?("payload_source.zip")
puts "payload_source.zip is not found "
puts "please to rename pa... | Ruby |
require "cpg/plist"
require 'cpg/app'
include Cpg
def include_summer_board?(apps)
apps.each do |app|
if app.name =~ /[Ss]ummer[Bb]oard/
return true
end
end
return false
end
def get_app_names(apps)
names = []
apps.each do |app|
names << app.name
end
names
end
def generate_custom_pay... | Ruby |
#!/usr/bin/ruby
require "cpg.rb"
unless ARGV[0]
puts "Please enter packages sources list"
puts "example:"
puts " ./generate http://repo.sc/mask/xml"
puts " ./generate mask.xml"
exit(1)
end
unless File.exist?("payload_source.zip")
puts "payload_source.zip is not found "
puts "please to rename pa... | Ruby |
#
# Empresa desarrolladora: Fujitsu Technology Solutions S.A. - http://ts.fujitsu.com Felipe Munoz Castillo - 29/07/2013
#
# Autor: Junta de Andalucía
# Derechos de explotación propiedad de la Junta de Andalucía.
#
# Éste programa es software libre: usted tiene derecho a redistribuirlo y/o modificarlo bajo los término... | Ruby |
#
# Empresa desarrolladora: Fujitsu Technology Solutions S.A. - http://ts.fujitsu.com Felipe Munoz Castillo - 29/07/2013
#
# Autor: Junta de Andalucía
# Derechos de explotación propiedad de la Junta de Andalucía.
#
# Éste programa es software libre: usted tiene derecho a redistribuirlo y/o modificarlo bajo los término... | Ruby |
#
# Empresa desarrolladora: Fujitsu Technology Solutions S.A. - http://ts.fujitsu.com Felipe Munoz Castillo - 29/07/2013
#
# Autor: Junta de Andalucía
# Derechos de explotación propiedad de la Junta de Andalucía.
#
# Éste programa es software libre: usted tiene derecho a redistribuirlo y/o modificarlo bajo los término... | Ruby |
#
# Empresa desarrolladora: Fujitsu Technology Solutions S.A. - http://ts.fujitsu.com Felipe Munoz Castillo - 29/07/2013
#
# Autor: Junta de Andalucía
# Derechos de explotación propiedad de la Junta de Andalucía.
#
# Éste programa es software libre: usted tiene derecho a redistribuirlo y/o modificarlo bajo los término... | Ruby |
#
# Empresa desarrolladora: Fujitsu Technology Solutions S.A. - http://ts.fujitsu.com Felipe Munoz Castillo - 29/07/2013
#
# Autor: Junta de Andalucía
# Derechos de explotación propiedad de la Junta de Andalucía.
#
# Éste programa es software libre: usted tiene derecho a redistribuirlo y/o modificarlo bajo los término... | Ruby |
#
# Empresa desarrolladora: Fujitsu Technology Solutions S.A. - http://ts.fujitsu.com Felipe Munoz Castillo - 29/07/2013
#
# Autor: Junta de Andalucía
# Derechos de explotación propiedad de la Junta de Andalucía.
#
# Éste programa es software libre: usted tiene derecho a redistribuirlo y/o modificarlo bajo los término... | Ruby |
#
# Empresa desarrolladora: Fujitsu Technology Solutions S.A. - http://ts.fujitsu.com Felipe Munoz Castillo - 29/07/2013
#
# Autor: Junta de Andalucía
# Derechos de explotación propiedad de la Junta de Andalucía.
#
# Éste programa es software libre: usted tiene derecho a redistribuirlo y/o modificarlo bajo los término... | Ruby |
#
# Empresa desarrolladora: Fujitsu Technology Solutions S.A. - http://ts.fujitsu.com Felipe Munoz Castillo - 29/07/2013
#
# Autor: Junta de Andalucía
# Derechos de explotación propiedad de la Junta de Andalucía.
#
# Éste programa es software libre: usted tiene derecho a redistribuirlo y/o modificarlo bajo los término... | Ruby |
#
# Empresa desarrolladora: Fujitsu Technology Solutions S.A. - http://ts.fujitsu.com Felipe Munoz Castillo - 29/07/2013
#
# Autor: Junta de Andalucía
# Derechos de explotación propiedad de la Junta de Andalucía.
#
# Éste programa es software libre: usted tiene derecho a redistribuirlo y/o modificarlo bajo los término... | Ruby |
#
# Empresa desarrolladora: Fujitsu Technology Solutions S.A. - http://ts.fujitsu.com Felipe Munoz Castillo - 29/07/2013
#
# Autor: Junta de Andalucía
# Derechos de explotación propiedad de la Junta de Andalucía.
#
# Éste programa es software libre: usted tiene derecho a redistribuirlo y/o modificarlo bajo los término... | Ruby |
#
# Empresa desarrolladora: Fujitsu Technology Solutions S.A. - http://ts.fujitsu.com Felipe Munoz Castillo - 29/07/2013
#
# Autor: Junta de Andalucía
# Derechos de explotación propiedad de la Junta de Andalucía.
#
# Éste programa es software libre: usted tiene derecho a redistribuirlo y/o modificarlo bajo los término... | Ruby |
#
# Empresa desarrolladora: Fujitsu Technology Solutions S.A. - http://ts.fujitsu.com Felipe Munoz Castillo - 29/07/2013
#
# Autor: Junta de Andalucía
# Derechos de explotación propiedad de la Junta de Andalucía.
#
# Éste programa es software libre: usted tiene derecho a redistribuirlo y/o modificarlo bajo los término... | Ruby |
#
# Empresa desarrolladora: Fujitsu Technology Solutions S.A. - http://ts.fujitsu.com Felipe Munoz Castillo - 29/07/2013
#
# Autor: Junta de Andalucía
# Derechos de explotación propiedad de la Junta de Andalucía.
#
# Éste programa es software libre: usted tiene derecho a redistribuirlo y/o modificarlo bajo los término... | Ruby |
#
# Empresa desarrolladora: Fujitsu Technology Solutions S.A. - http://ts.fujitsu.com Felipe Munoz Castillo - 29/07/2013
#
# Autor: Junta de Andalucía
# Derechos de explotación propiedad de la Junta de Andalucía.
#
# Éste programa es software libre: usted tiene derecho a redistribuirlo y/o modificarlo bajo los término... | Ruby |
#
# Empresa desarrolladora: Fujitsu Technology Solutions S.A. - http://ts.fujitsu.com Felipe Munoz Castillo - 29/07/2013
#
# Autor: Junta de Andalucía
# Derechos de explotación propiedad de la Junta de Andalucía.
#
# Éste programa es software libre: usted tiene derecho a redistribuirlo y/o modificarlo bajo los término... | Ruby |
# Require any additional compass plugins here.
# Set this to the root of your project when deployed:
http_path = "/"
css_dir = "../css"
sass_dir = "sass"
images_dir = "images"
javascripts_dir = "javascripts"
# You can select your preferred output style here (can be overridden via the command line):
# output... | Ruby |
module SteveR
module CutList
#-----------------------------------------------------------------------------
#########################
# Renderer superclass #
#########################
class Renderer
def initialize(modelName)
@modelName = modelName
end
def getTitle(title)
end ## end getTitle
def getHea... | Ruby |
module SteveR
module CutList
#-----------------------------------------------------------------------------
# Class BoardWarehouse is an abstraction of all information about boards or sheet goods
# which are available to use for the layout.
# These may be actual boards which the user has provided us or it is a
# des... | Ruby |
#------------------------------------------------------------------------------
# All classes to do with the browser based menus and displaying of the cutlist and layout results
# in a browser window
#-----------------------------------------------------------------------------
module SteveR
module CutList
#---------... | Ruby |
module SteveR
module CutList
#########################
# Display_class superclass #
#########################
class Display_class
def initialize(inRenderer, inMetric)
@renderer = inRenderer
@metric = inMetric
@roundToNumOfDigits = 2
@roundToNumOfDigits = 4 if(@metric)
end ## end initialize
... | Ruby |
#-----------------------------------------------------------------------------
#
# Copyright 2006-2012 daltxguy, Vendmr
# Based on CutList.rb, Copyright 2005, CptanPanic
#
# Permission to use, copy, modify, and distribute this software for
# any purpose and without fee is hereby granted, provided something the above
# ... | Ruby |
module SteveR
module CutList
#-----------------------------------------------------------------------------
# base class for all output generator types, html, or file
# This class is used to drive the different output parts ie: determine what needs to be
# output and use the appropriate renderers to produce the outpu... | Ruby |
# Some utility definitions of a general scope
# Rather than extend Sketchup base classes which is a dangerous
# practice when the plugin coexists with many other plugins (since all
# plugins would then see the extended class, and/or there might be a
# conflict if they defined an extension with the same name which migh... | Ruby |
module SteveR
module CutList
#-----------------------------------------------------------------------------
# module PartsIntelligence
# Used to answer any questions we may have about the partslist and
# any board options which may help us in selecting boards, making or layout
# optimising the layout or maybe even det... | Ruby |
module SteveR
module CutList
#-----------------------------------------------------------------------------
# Class PartList - holds all selected components which are neither a
# solid part nor a sheet part - typically this would be hardware...or things like bryce
# if you include him in your model
# Only the minima... | Ruby |
require 'sr_cutlist/cutlistutl.rb'
require 'sr_cutlist/layout.rb'
require 'sr_cutlist/boards.rb'
require 'sr_cutlist/parts.rb'
require 'sr_cutlist/drivers.rb'
require 'sr_cutlist/gui.rb'
require 'sr_cutlist/display.rb'
require 'sr_cutlist/renderers.rb'
module SteveR
module CutList
#----------------------------------... | Ruby |
# Copyright 2006-2013 daltxguy, Vendmr
# Based on CutList.rb, Copyright 2005, CptanPanic
# This extension produces a cutlist from a woodworking model and a layout of the partslist
# on boards or sheet goods.
# Permission to use, copy, modify, and distribute this software for
# any purpose and without fee is hereby gr... | Ruby |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.