This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
around do |example| | |
old_base = ActionView::Base | |
ActionView::Base = old_base.dup | |
ActionView::Base.send :include, Rails.application.routes.url_helpers | |
ActionView::Base.send :include, ApplicationHelper | |
example.run | |
ActionView::Base = old_base |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# vim: set ft=puppet: | |
input { | |
file { | |
path => [ "/var/log/rails.log" ] | |
type => rails | |
format => plain | |
start_position => beginning | |
} | |
} | |
filter { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
multiline { | |
type => simulator | |
patterns_dir => "/home/jumski/work/logstash-shell/patterns" | |
pattern => "%{SIMULATOR_PASSENGER_LOG}" | |
negate => true | |
what => next | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require './application.rb' | |
class CustomExceptionLogger | |
def initialize(app) | |
@app = app | |
end | |
def call(env) | |
@app.call(env) | |
rescue Exception => e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/home/jumski/.rvm/gems/ruby-1.9.3-p327-falcon/gems/virtus-0.5.4/lib/virtus/class_methods.rb:67:in `const_missing': uninitialized constant BillHistory::BillDetail (NameError) | |
from /home/jumski/work/mywind_simulatore/models/bill_history.rb:10:in `<class:BillHistory>' | |
from /home/jumski/work/mywind_simulatore/models/bill_history.rb:3:in `<top (required)>' | |
from /home/jumski/.rvm/gems/ruby-1.9.3-p327-falcon/gems/backports-2.6.7/lib/backports/tools.rb:314:in `require' | |
from /home/jumski/.rvm/gems/ruby-1.9.3-p327-falcon/gems/backports-2.6.7/lib/backports/tools.rb:314:in `require_with_backports' | |
from /home/jumski/work/mywind_simulatore/application.rb:77:in `block in <top (required)>' | |
from /home/jumski/work/mywind_simulatore/application.rb:77:in `each' | |
from /home/jumski/work/mywind_simulatore/application.rb:77:in `<top (required)>' | |
from /home/jumski/work/mywind_simulatore/config.ru:1:in `require' | |
from /home/jumski/work/mywind_simulatore/config.ru:1: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.box = "centos-56-32-3" | |
config.vm.box_url = 'http://dl.dropbox.com/u/9227672/centos-5.6-x86_64-netinstall-4.1.6.box' | |
# config.vm.box_url = "https://s3.amazonaws.com/itmat-public/centos-6.3-chef-10.14.2.box" | |
config.vbguest.auto_update = true | |
config.vm.provider :virtualbox do |vb| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:typens="urn:AllegroWebApi" xmlns:ins0="urn:AllegroWebApi"> | |
<env:Body> | |
<typens:doNewAuctionExt> | |
<session-handle>94072a84bebc737c198f00bd8e015032c71277bd155a173301_1</session-handle> | |
<fields> | |
<fields> | |
<fid>5</fid> | |
<fvalue-string /> | |
<fvalue-int>1</fvalue-int> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"vendor/alle_api/lib/alle_api/job/*.rb": { | |
"command": "job", | |
"template": "module AlleApi\n module Job\n class %S < Base\n def perform\n end\n end\n end\nend", | |
"test": "spec/alle_api/job/%s_spec.rb" | |
}, | |
"vendor/alle_api/lib/alle_api/wrapper/*.rb": { | |
"command": "wrapper", | |
"template": "module AlleApi\n module Wrapper\n class %S < Base\n def wrap_multiple\n end\n end\n end\nend", | |
"test": "spec/alle_api/wrapper/%s_spec.rb" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module TireHelpers | |
extend ActiveSupport::Concern | |
module ClassMethods | |
def drop_index | |
tire.index.delete | |
end | |
def create_index | |
tire.index.create mappings: tire.mapping_to_hash, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Author < ActiveRecord::Base | |
include Tire::Model::Search | |
include Tire::Model::Callbacks | |
include TireHelpers | |
has_many :books | |
validates :name, presence: true | |
normalize_attributes :name |