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
# lib/ldap_auth/engine.rb | |
module LdapAuth | |
class Engine < Rails::Engine | |
# initialize "agmen_ldap_auth.load_app_instance_data" do |app| | |
# AmgenLdapAuth.setup do |config| | |
# config.app_root = app.root | |
# end | |
# end | |
# initialize "agmen_ldap_auth.load_static_assets" do |app| |
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
~/development/supplier_app $ bundle exec rspec spec/models/supplier_spec.rb | |
. | |
Finished in 0.11917 seconds | |
1 example, 0 failures | |
~/development/supplier_app $ bundle exec rspec spec | |
F | |
Failures: | |
1) Supplier Validations: Country needs to be in list of Currencies | |
Failure/Error: good_country_supplier.should be_valid | |
expected valid? to return true, got false |
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
~/development/supplier_app $ rails c test | |
Loading test environment (Rails 3.2.1) | |
irb(main):001:0> Currency.pluck :country | |
(0.3ms) SELECT country FROM "currencies" | |
=> ["US"] | |
irb(main):002:0> s = Supplier.new(:country => "US") | |
=> #<Supplier id: nil, company: nil, purchasing_org: "A001", account_group: "0001", name: nil, search_term_1: nil, count | |
ry: "US", language: "E", tax_number_1: "SSN for US OR GST for CA", tax_number_2: "EIN for US OR HST for CA", tax_type: n | |
il, vat: nil, tax_number: "QST for CA", bank_country: nil, bank_key: nil, bank_account: nil, bank_account_holder: nil, b | |
ank_type: "BNK1", recon_account: "200010", payment_terms: nil, check_double_inv: "X", payment_methods: nil, wh_tax_count |
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
NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01. | |
Gem.source_index called from /Users/noel/apps/kete/config/../vendor/rails/railties/lib/rails/gem_dependency.rb:21. | |
NOTE: Gem::SourceIndex#refresh! is deprecated with no replacement. It will be removed on or after 2011-11-01. | |
Gem::SourceIndex#refresh! called from /Users/noel/apps/kete/config/../vendor/rails/railties/lib/rails/vendor_gem_source_index.rb:34. | |
NOTE: Gem::SourceIndex#load_gems_in is deprecated with no replacement. It will be removed on or after 2011-11-01. | |
Gem::SourceIndex#load_gems_in called from /Users/noel/.rvm/rubies/ruby-1.8.7-p357/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:322. | |
NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01. | |
Gem::SourceIndex#add_spec called from /Users/noel/.rvm/rubies/ruby-1.8.7-p357/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:127. | |
NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add |
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
<table id="roles"> | |
<thead> | |
<tr> | |
<% @columns.each do |column| %> | |
<th class="center"><%= column %></th> | |
<% end %> | |
</tr> | |
</thead> | |
<tbody> | |
<% @Roles.each_with_index do |role, index| %> |
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
Failures: | |
1) User should not allow for multiple users with the same username | |
Failure/Error: Factory(:user, :username=>"gomezn") | |
ActiveRecord::RecordInvalid: | |
Validation failed: Name has already been taken | |
# ./spec/models/user_spec.rb:6 | |
# ./spec/models/user_spec.rb:35 | |
2) User should have ldap |
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 'spec_helper' | |
describe User do | |
let(:user) do | |
Factory(:user, :username=>"gomezn") | |
end | |
let(:role) do | |
Factory(:role) |
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 'factory_girl' | |
Factory.define :role do |r| | |
r.name 'SuperAdmin' | |
end | |
Factory.define :user do |u| | |
u.username "gomezn" | |
u.association :roles, :factory => :role | |
end |
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
$('#user_button').toggle(function () { | |
$("#user_button").css({borderBottomLeftRadius: "0px"}); | |
}, function () { | |
$("#user_button").css({borderBottomLeftRadius: "5px"}); | |
}); |
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
*** LOCAL GEMS *** | |
abstract (1.0.0) | |
actionmailer (3.1.0.rc1, 3.0.7, 3.0.7.rc2) | |
actionpack (3.1.0.rc1, 3.0.7, 3.0.7.rc2) | |
activemodel (3.1.0.rc1, 3.0.7, 3.0.7.rc2) | |
activerecord (3.1.0.rc1, 3.0.7, 3.0.7.rc2) | |
activeresource (3.1.0.rc1, 3.0.7, 3.0.7.rc2) | |
activesupport (3.1.0.rc1, 3.0.7, 3.0.7.rc2) | |
ansi (1.2.5) |