Skip to content

Instantly share code, notes, and snippets.

class SomeWrapperClass
attr_accessor :importer, :start_time
def initialize(file)
@importer = DataWarehouseImporter.new(file)
@start_time = Time.zone.now
@importer.do_shit
handle_updated_records
end
require 'spec_helper'
describe ::FileTransferMixin::Interfaces::SFTP do
before(:each) do
Object.send(:remove_const, :TestFileTransferMixin) if defined?(TestFileTransferMixin)
ENV['FILE_TRANSFER_MIXIN_CONFIG_PATH'] = '/tmp/file_transfer_mixin_enviro_config.yml'
ENV['ENVY_ENV'] = 'development'
@config = {
:development => {
require 'spec_helper'
describe ProgramManagerBatchInterface::AccountInformation, :real_transfer => true do
before(:each) do
write_enviro_config do
{
:development => {
:local_base_dir => '/tmp'
}
}
module ProgramManagerBatchInterface
module Models
# Used to build the CSV files that are sent to the Program Manager to request
# Account Information on a given subset of their account base.
#
# Files look like the following:
# pseudo_dda, updated_at, status
# 12345, 2011-01-01 00:00:00, applicant
#
# To use:
require 'spec_helper'
describe ProgramManagerBatchInterface::Models::AccountInformationFile do
it "should start out pending" do
subject.state.should == 'pending'
end
it "should require a request_file in order to create"
it "should transition to uploaded once a file has been uploaded to the remote server"
it "should transition to downloaded once the corresponding response file has been downloaded and stored"
checking pkg-config is at least version 0.16... yes
checking for GLIB - version >= 2.26.0...
*** 'pkg-config --modversion glib-2.0' returned 2.29.2, but GLIB (2.28.4)
*** was found! If pkg-config was correct, then it is best
*** to remove the old version of GLib. You may also be able to fix the error
*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing
*** /etc/ld.so.conf. Make sure you have run ldconfig if that is
*** required on your system.
*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH
*** to point to the correct configuration files
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
get_rvm_prompt() {
~/.rvm/bin/rvm-prompt 2> /dev/null
}
function elite
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
get_rvm_prompt() {
~/.rvm/bin/rvm-prompt 2> /dev/null
}
function elite
ruby-1.9.2-p0 > p=Page.last
Page Load (0.3ms) SELECT "pages".* FROM "pages" ORDER BY pages.id DESC LIMIT 1
=> #<Page id: 3, parent_id: nil, position: 1, path: nil, created_at: "2011-05-11 02:44:43", updated_at: "2011-05-11 02:44:43", show_in_menu: true, link_url: nil, menu_match: nil, deletable: true, custom_title_type: "none", draft: false, skip_to_first_child: false, lft: 5, rgt: 6, depth: nil>
ruby-1.9.2-p0 > p.read_attribute(:path)
=> nil
ruby-1.9.2-p0 > p.read_attribute(:position)
=> 1
ruby-1.9.2-p0 > p.attribute_names
=> ["title", "custom_title", "meta_keywords", "meta_description", "browser_title", "id", "parent_id", "position", "path", "created_at", "updated_at", "show_in_menu", "link_url", "menu_match", "deletable", "custom_title_type", "draft", "skip_to_first_child", "lft", "rgt", "depth"]
ruby-1.9.2-p0 > p.attributes
[Desktop Entry]
Encoding=UTF-8
Name=Isotope11 Campfire
Comment=Chat with other devs at Isotope11
Exec=google-chrome --app=http://isotope11.campfirenow.com
Icon=campfire
Terminal=false
Type=Application
StartupNotify=true
Categories=GNOME;GTK;Network;Isotope11 Campfire