Skip to content

Instantly share code, notes, and snippets.

View guipdutra's full-sized avatar

Guilherme Dutra guipdutra

View GitHub Profile
require 'spec_helper'
describe YearlyPaymentIssuer do
let(:issuer) { YearlyPaymentIssuer.new }
it { should validate_presence_of(:city_hall_id) }
it { should validate_presence_of(:incidence) }
it { should validate_presence_of(:payment_type) }
it { should validate_presence_of(:installments) }
it { should validate_presence_of(:first_installment) }
require 'spec_helper'
describe YearlyPaymentIssuer do
let(:issuer) { YearlyPaymentIssuer.new }
it { should validate_presence_of(:city_hall_id) }
it { should validate_presence_of(:incidence) }
it { should validate_presence_of(:payment_type) }
it { should validate_presence_of(:installments) }
it { should validate_presence_of(:first_installment) }
# encoding: utf-8
class Stub < ActiveRecord::Base
extend EnumerateIt
has_paper_trail
PAYMENT_METHODS = {
:manual => 1,
:bank_return => 2,
:national_simple => 3,
:internal => 4,
commit 3501c0d5b6937ade2adc43e2c3997ccc9c280743
Author: Guilherme Dutra <guipereira07@gmail.com>
Date: Wed Jul 2 09:51:19 2014 -0300
22568 - Add iss_value to underwriting alerts
diff --git a/lib/to_mongo/updaters/underwriting_divergence_updater.rb b/lib/to_mongo/updaters/underwriting_divergence_updater.rb
index 9acb948..1ee77fb 100755
--- a/lib/to_mongo/updaters/underwriting_divergence_updater.rb
+++ b/lib/to_mongo/updaters/underwriting_divergence_updater.rb
def generate_fields(f, rand, data_type, column, operator)
out = ''
if ["Date", "DateTime"].include?(data_type)
out << f.select(:operator, hash_to_options(FilterConstants::DATE_OPERATOR), { :selected => operator }, { :class => "text mini o_#{rand}" })
out << f.text_field(:condition, :value => (f.object.condition.to_date.to_s_br rescue nil), :class => "text mini js c_#{rand} format[date]")
elsif data_type == "Month"
out << f.select(:operator, hash_to_options(FilterConstants::DATE_OPERATOR), { :selected => operator }, { :class => "text mini o_#{rand}" })
out << f.text_field(:condition, :value => (I18n.l(f.object.condition.to_date, :format => :small_month_and_year) rescue nil), :class => "text mini js c_#{rand} format[competence]")
elsif data_type == "Match"
text = if column.include?("cpf") || column.include?('cnpj')
diff --git a/Gemfile b/Gemfile
index aaa4ce3..4ab92a5 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,7 +1,8 @@
source 'https://rubygems.org'
-ruby "1.9.3"
-gem 'rails', '4.0.2'
-gem 'pg', '0.14.1'
+#ruby "2.1.2"
diff --git a/Gemfile b/Gemfile
index aaa4ce3..af8d414 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,7 +1,8 @@
source 'https://rubygems.org'
-ruby "1.9.3"
-gem 'rails', '4.0.2'
-gem 'pg', '0.14.1'
+ruby "2.1.2"
# SCREENSHOT EXAMPLE: http://grab.by/bzg3
##############################
# _
# | |_ _ __ ___ _ ___ __
# | __| '_ ` _ \| | | \ \/ /
# | |_| | | | | | |_| |> <
# \__|_| |_| |_|\__,_/_/\_\
#
#############################
"avoiding annoying CSApprox warning message
let g:CSApprox_verbose_level = 0
" Required Vundle setup
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Bundle 'gmarik/Vundle.vim'
"avoiding annoying CSApprox warning message
let g:CSApprox_verbose_level = 0
" Required Vundle setup
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Bundle 'gmarik/Vundle.vim'