repo
stringlengths
5
92
file_url
stringlengths
80
287
file_path
stringlengths
5
197
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:37:27
2026-01-04 17:58:21
truncated
bool
2 classes
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/spec/views/stores/edit.html.erb_spec.rb
spec/views/stores/edit.html.erb_spec.rb
require 'spec_helper' describe "stores/edit.html.erb" do before(:each) do assign(:store, @store = stub_model(Store, :new_record? => false, :name => "MyString", :address => "MyString", :phone => "MyString", :active => false, :description => "MyString" )) end it "render...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/spec/views/stores/index.html.erb_spec.rb
spec/views/stores/index.html.erb_spec.rb
require 'spec_helper' describe "stores/index.html.erb" do before(:each) do assign(:stores, [ stub_model(Store, :name => "MyString", :address => "MyString", :phone => "MyString", :active => false, :description => "MyString" ), stub_model(Store, :na...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/spec/views/stocks/create.html.haml_spec.rb
spec/views/stocks/create.html.haml_spec.rb
require 'spec_helper' describe "stocks/create.html.haml" do pending "add some examples to (or delete) #{__FILE__}" end
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/spec/views/stocks/new.html.haml_spec.rb
spec/views/stocks/new.html.haml_spec.rb
require 'spec_helper' describe "stocks/new.html.haml" do pending "add some examples to (or delete) #{__FILE__}" end
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/spec/views/account_balances/new.html.haml_spec.rb
spec/views/account_balances/new.html.haml_spec.rb
require 'spec_helper' describe "account_balances/new" do before(:each) do assign(:account_balance, stub_model(AccountBalance, :amount => "9.99", :user_id => 1, :old_amount => "9.99" ).as_new_record) end it "renders new account_balance form" do render # Run the generator again ...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/spec/views/account_balances/edit.html.haml_spec.rb
spec/views/account_balances/edit.html.haml_spec.rb
require 'spec_helper' describe "account_balances/edit" do before(:each) do @account_balance = assign(:account_balance, stub_model(AccountBalance, :amount => "9.99", :user_id => 1, :old_amount => "9.99" )) end it "renders the edit account_balance form" do render # Run the gener...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/spec/views/account_balances/index.html.haml_spec.rb
spec/views/account_balances/index.html.haml_spec.rb
require 'spec_helper' describe "account_balances/index" do before(:each) do assign(:account_balances, [ stub_model(AccountBalance, :amount => "9.99", :user_id => 1, :old_amount => "9.99" ), stub_model(AccountBalance, :amount => "9.99", :user_id => 1, ...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/spec/views/account_balances/show.html.haml_spec.rb
spec/views/account_balances/show.html.haml_spec.rb
require 'spec_helper' describe "account_balances/show" do before(:each) do @account_balance = assign(:account_balance, stub_model(AccountBalance, :amount => "9.99", :user_id => 1, :old_amount => "9.99" )) end it "renders attributes in <p>" do render # Run the generator again wi...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/spec/views/countries/show.html.erb_spec.rb
spec/views/countries/show.html.erb_spec.rb
require 'spec_helper' describe "countries/show.html.erb" do before(:each) do assign(:country, @country = stub_model(Country, :name => "MyString", :abreviation => "MyString" )) end it "renders attributes in <p>" do render response.should contain("MyString") response.should contain...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/spec/views/countries/new.html.erb_spec.rb
spec/views/countries/new.html.erb_spec.rb
require 'spec_helper' describe "countries/new.html.erb" do before(:each) do assign(:country, stub_model(Country, :new_record? => true, :name => "MyString", :abreviation => "MyString" )) end it "renders new country form" do render response.should have_selector("form", :action =...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/spec/views/countries/edit.html.erb_spec.rb
spec/views/countries/edit.html.erb_spec.rb
require 'spec_helper' describe "countries/edit.html.erb" do before(:each) do assign(:country, @country = stub_model(Country, :new_record? => false, :name => "MyString", :abreviation => "MyString" )) end it "renders the edit country form" do render response.should have_selector...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/spec/views/countries/index.html.erb_spec.rb
spec/views/countries/index.html.erb_spec.rb
require 'spec_helper' describe "countries/index.html.erb" do before(:each) do assign(:countries, [ stub_model(Country, :name => "MyString", :abreviation => "MyString" ), stub_model(Country, :name => "MyString", :abreviation => "MyString" ) ]) end i...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/spec/views/taxes/show.html.erb_spec.rb
spec/views/taxes/show.html.erb_spec.rb
require 'spec_helper' describe "taxes/show.html.erb" do before(:each) do assign(:tax, @tax = stub_model(Tax, :name => "MyString", :abbreviation => "MyString", :rate => "9.99", :organisation => nil )) end it "renders attributes in <p>" do render response.should contain("My...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/spec/views/taxes/new.html.erb_spec.rb
spec/views/taxes/new.html.erb_spec.rb
require 'spec_helper' describe "taxes/new.html.erb" do before(:each) do assign(:tax, stub_model(Tax, :new_record? => true, :name => "MyString", :abbreviation => "MyString", :rate => "9.99", :organisation => nil )) end it "renders new tax form" do render response.sh...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/spec/views/taxes/edit.html.erb_spec.rb
spec/views/taxes/edit.html.erb_spec.rb
require 'spec_helper' describe "taxes/edit.html.erb" do before(:each) do assign(:tax, @tax = stub_model(Tax, :new_record? => false, :name => "MyString", :abbreviation => "MyString", :rate => "9.99", :organisation => nil )) end it "renders the edit tax form" do render ...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/spec/views/taxes/index.html.erb_spec.rb
spec/views/taxes/index.html.erb_spec.rb
require 'spec_helper' describe "taxes/index.html.erb" do before(:each) do assign(:taxes, [ stub_model(Tax, :name => "MyString", :abbreviation => "MyString", :rate => "9.99", :organisation => nil ), stub_model(Tax, :name => "MyString", :abbreviatio...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/spec/views/company_users/create.html.haml_spec.rb
spec/views/company_users/create.html.haml_spec.rb
require 'spec_helper' describe "company_users/create.html.haml" do pending "add some examples to (or delete) #{__FILE__}" end
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/spec/views/company_users/new.html.haml_spec.rb
spec/views/company_users/new.html.haml_spec.rb
require 'spec_helper' describe "company_users/new.html.haml" do pending "add some examples to (or delete) #{__FILE__}" end
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/spec/views/company_users/edit.html.haml_spec.rb
spec/views/company_users/edit.html.haml_spec.rb
require 'spec_helper' describe "company_users/edit.html.haml" do pending "add some examples to (or delete) #{__FILE__}" end
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/spec/views/company_users/update.html.haml_spec.rb
spec/views/company_users/update.html.haml_spec.rb
require 'spec_helper' describe "company_users/update.html.haml" do pending "add some examples to (or delete) #{__FILE__}" end
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/spec/views/accounts/new.html.haml_spec.rb
spec/views/accounts/new.html.haml_spec.rb
require 'spec_helper' describe "accounts/new.html.haml" do before(:each) do assign(:account, stub_model(Account, :name => "MyString", :address => "MyString", :email => "MyString", :website => "MyString", :number => "MyString" ).as_new_record) end it "renders new account for...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/spec/views/accounts/edit.html.haml_spec.rb
spec/views/accounts/edit.html.haml_spec.rb
require 'spec_helper' describe "accounts/edit.html.haml" do before(:each) do @account = assign(:account, stub_model(Account, :name => "MyString", :address => "MyString", :email => "MyString", :website => "MyString", :number => "MyString" )) end it "renders the edit account ...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/spec/views/accounts/index.html.haml_spec.rb
spec/views/accounts/index.html.haml_spec.rb
require 'spec_helper' describe "accounts/index.html.haml" do before(:each) do assign(:accounts, [ stub_model(Account, :name => "Name", :address => "Address", :email => "Email", :website => "Website", :number => "Number" ), stub_model(Account, :nam...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/spec/views/accounts/show.html.haml_spec.rb
spec/views/accounts/show.html.haml_spec.rb
require 'spec_helper' describe "accounts/show.html.haml" do before(:each) do @account = assign(:account, stub_model(Account, :name => "Name", :address => "Address", :email => "Email", :website => "Website", :number => "Number" )) end it "renders attributes in <p>" do re...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/spec/views/contacts/show.html.erb_spec.rb
spec/views/contacts/show.html.erb_spec.rb
require 'spec_helper' describe "contacts/show.html.erb" do before(:each) do assign(:contact, @contact = stub_model(Contact, :name => "MyString", :address => "MyString", :adress_alt => "MyString", :phone => "MyString", :mobile => "MyString", :type => "MyString", :email =>...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/spec/views/contacts/new.html.erb_spec.rb
spec/views/contacts/new.html.erb_spec.rb
require 'spec_helper' describe "contacts/new.html.erb" do before(:each) do assign(:contact, stub_model(Contact, :new_record? => true, :name => "MyString", :address => "MyString", :adress_alt => "MyString", :phone => "MyString", :mobile => "MyString", :type => "MyString",...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/spec/views/contacts/edit.html.erb_spec.rb
spec/views/contacts/edit.html.erb_spec.rb
require 'spec_helper' describe "contacts/edit.html.erb" do before(:each) do assign(:contact, @contact = stub_model(Contact, :new_record? => false, :name => "MyString", :address => "MyString", :adress_alt => "MyString", :phone => "MyString", :mobile => "MyString", :type =...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/spec/views/contacts/index.html.erb_spec.rb
spec/views/contacts/index.html.erb_spec.rb
require 'spec_helper' describe "contacts/index.html.erb" do before(:each) do assign(:contacts, [ stub_model(Contact, :name => "MyString", :address => "MyString", :adress_alt => "MyString", :phone => "MyString", :mobile => "MyString", :type => "MyString", ...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/spec/views/transactions/new.html.haml_spec.rb
spec/views/transactions/new.html.haml_spec.rb
require 'spec_helper' describe "transactions/new.html.haml" do before(:each) do assign(:transaction, stub_model(Transaction, :new_record? => true, :contact_id => 1, :type => "MyString", :total => "9.99", :active => false, :description => "MyString", :state => "MyString",...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/spec/views/transactions/edit.html.haml_spec.rb
spec/views/transactions/edit.html.haml_spec.rb
require 'spec_helper' describe "transactions/edit.html.haml" do before(:each) do @transaction = assign(:transaction, stub_model(Transaction, :new_record? => false, :contact_id => 1, :type => "MyString", :total => "9.99", :active => false, :description => "MyString", :sta...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/spec/views/transactions/index.html.haml_spec.rb
spec/views/transactions/index.html.haml_spec.rb
require 'spec_helper' describe "transactions/index.html.haml" do before(:each) do assign(:transactions, [ stub_model(Transaction, :contact_id => 1, :type => "Type", :total => "9.99", :active => false, :description => "Description", :state => "State", ...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/spec/views/transactions/show.html.haml_spec.rb
spec/views/transactions/show.html.haml_spec.rb
require 'spec_helper' describe "transactions/show.html.haml" do before(:each) do @transaction = assign(:transaction, stub_model(Transaction, :contact_id => 1, :type => "Type", :total => "9.99", :active => false, :description => "Description", :state => "State", :ref_numb...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/spec/views/items/show.html.erb_spec.rb
spec/views/items/show.html.erb_spec.rb
require 'spec_helper' describe "items/show.html.erb" do before(:each) do assign(:item, @item = stub_model(Item, :unit => nil, :itemable_id => 1, :itemable_type => "MyString", :name => "MyString", :description => "MyString", :type => "MyString", :integer => 1, :prod...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/spec/views/items/new.html.erb_spec.rb
spec/views/items/new.html.erb_spec.rb
require 'spec_helper' describe "items/new.html.erb" do before(:each) do assign(:item, stub_model(Item, :new_record? => true, :unit => nil, :itemable_id => 1, :itemable_type => "MyString", :name => "MyString", :description => "MyString", :type => "MyString", :intege...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/spec/views/items/edit.html.erb_spec.rb
spec/views/items/edit.html.erb_spec.rb
require 'spec_helper' describe "items/edit.html.erb" do before(:each) do assign(:item, @item = stub_model(Item, :new_record? => false, :unit => nil, :itemable_id => 1, :itemable_type => "MyString", :name => "MyString", :description => "MyString", :type => "MyString", ...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/spec/views/items/index.html.erb_spec.rb
spec/views/items/index.html.erb_spec.rb
require 'spec_helper' describe "items/index.html.erb" do before(:each) do assign(:items, [ stub_model(Item, :unit => nil, :itemable_id => 1, :itemable_type => "MyString", :name => "MyString", :description => "MyString", :type => "MyString", :integer =...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/spec/views/export_incomes/index.html.haml_spec.rb
spec/views/export_incomes/index.html.haml_spec.rb
require 'spec_helper' describe "export_incomes/index.html.haml" do pending "add some examples to (or delete) #{__FILE__}" end
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/spec/views/export_incomes/show.html.haml_spec.rb
spec/views/export_incomes/show.html.haml_spec.rb
require 'spec_helper' describe "export_incomes/show.html.haml" do pending "add some examples to (or delete) #{__FILE__}" end
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/spec/views/projects/new.html.haml_spec.rb
spec/views/projects/new.html.haml_spec.rb
require 'spec_helper' describe "projects/new.html.haml" do before(:each) do assign(:project, stub_model(Project, :name => "MyString", :active => false ).as_new_record) end it "renders new project form" do render # Run the generator again with the --webrat flag if you want to use web...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/spec/views/projects/edit.html.haml_spec.rb
spec/views/projects/edit.html.haml_spec.rb
require 'spec_helper' describe "projects/edit.html.haml" do before(:each) do @project = assign(:project, stub_model(Project, :name => "MyString", :active => false )) end it "renders the edit project form" do render # Run the generator again with the --webrat flag if you want to use ...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/spec/views/projects/index.html.haml_spec.rb
spec/views/projects/index.html.haml_spec.rb
require 'spec_helper' describe "projects/index.html.haml" do before(:each) do assign(:projects, [ stub_model(Project, :name => "Name", :active => false ), stub_model(Project, :name => "Name", :active => false ) ]) end it "renders a list of projects...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/spec/views/projects/show.html.haml_spec.rb
spec/views/projects/show.html.haml_spec.rb
require 'spec_helper' describe "projects/show.html.haml" do before(:each) do @project = assign(:project, stub_model(Project, :name => "Name", :active => false )) end it "renders attributes in <p>" do render # Run the generator again with the --webrat flag if you want to use webrat ma...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/spec/views/organisation_updates/edit.html.haml_spec.rb
spec/views/organisation_updates/edit.html.haml_spec.rb
require 'spec_helper' describe "organisation_updates/edit.html.haml" do pending "add some examples to (or delete) #{__FILE__}" end
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/spec/views/organisation_updates/update.html.haml_spec.rb
spec/views/organisation_updates/update.html.haml_spec.rb
require 'spec_helper' describe "organisation_updates/update.html.haml" do pending "add some examples to (or delete) #{__FILE__}" end
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/spec/features/login_spec.rb
spec/features/login_spec.rb
require 'spec_helper' feature 'Login' do before do #create :database end scenario 'login' do visit root_path end end
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/spec/lib/pg_tools_spec.rb
spec/lib/pg_tools_spec.rb
require 'spec_helper' describe PgTools do def execute(sql) ActiveRecord::Base.connection.execute(sql) end def create_schema(schema) execute("CREATE SCHEMA #{schema}") end context '::with_schemas' do it ':except' do create_schema "bonsai" create_schema "club_vegetariano" arr =...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/spec/lib/setters_getters_spec.rb
spec/lib/setters_getters_spec.rb
require 'spec_helper' describe SettersGetters do subject { class Uno extend SettersGetters end } it "creates setters" do subject.create_setters("uno", "a").should eq([:uno=, :a=]) end it "creates accessors" do subject.create_accessors("uno", "a").should eq([:uno, :a, :uno=, :a=]) en...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/spec/lib/string_encoder_spec.rb
spec/lib/string_encoder_spec.rb
# encoding: utf-8 require 'spec_helper' describe StringEncoder do let(:string) { "\r\nMaschine: Keg-Anlage ; bestehend aus Au\xC3\x9Fenwascher und Reiniger / F\xC3\xBCller \r\nHersteller: M&F Keg-Technik\r\nTyp: Au\xC3\x9Fenwascher AW1200B\xC3\xBC; Reiniger & F\xC3\xBCller Minomat 5/4\r\nBauj...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/spec/instances/hash_spec.rb
spec/instances/hash_spec.rb
# encoding: utf-8 require 'spec_helper' Hash.send(:include, HashExt) describe Hash do before(:each) do @h = {"date(1i)" => "2011", "date(2i)" => "12", "date(3i)" => "10"} end it 'should return correct values for a hash' do @h.transform_date_parameters!("date") @h.should == {"date" => "2011-12-10"}...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/spec/mailers/invoice_mailer_spec.rb
spec/mailers/invoice_mailer_spec.rb
require "spec_helper" describe InvoiceMailer do pending "add some examples to (or delete) #{__FILE__}" end
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/spec/mailers/reset_password_mailer_spec.rb
spec/mailers/reset_password_mailer_spec.rb
# encoding: utf-8 require "spec_helper" describe ResetPasswordMailer do let(:user) { User.new(:email => "demo@example.com") {|u| u.reset_password_token = SecureRandom.urlsafe_base64(12) u.id = 1 } } it 'should send the password' do ResetPasswordMailer.send_reset_password(user).deliver_no...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/spec/mailers/registration_mailer_spec.rb
spec/mailers/registration_mailer_spec.rb
require "spec_helper" describe RegistrationMailer do let(:user) { build :user, email: 'demo@example.com', confirmation_token: SecureRandom.urlsafe_base64(12) } let(:registration) do OpenStruct.new(user: user, tenant: 'bonsai', email: user.email, organisation: double(tenant: 'bonsai', name: 'bonsaiLabs')...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/lib/class_extensions.rb
lib/class_extensions.rb
Hash.class_eval do def keep_merge(hash) target = dup hash.keys.each do |key| if hash[key].is_a? Hash and self[key].is_a? Hash target[key] = target[key].keep_merge(hash[key]) next end #target[key] = hash[key] target.update(hash) { |key, *values| ...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/lib/org_model_validator.rb
lib/org_model_validator.rb
# encoding: utf-8 # author: Boris Barroso # email: boriscyber@gmail.com class OrgModelValidator < ActiveModel::EachValidator def validate_each(object, attribute, value) klass = options[:class_name] || attribute.to_s.gsub("id", "").classify klass = klass.constantize object.errors[attribute] << I18n.t("err...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/lib/setters_getters.rb
lib/setters_getters.rb
module SettersGetters def create_setters(*attrs) attrs.map { |k| :"#{k}=" } end def create_accessors(*attrs) attrs.map(&:to_sym) + create_setters(*attrs) end end
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/lib/contact_account_validator.rb
lib/contact_account_validator.rb
# encoding: utf-8 # author: Boris Barroso # email: boriscyber@gmail.com class ContactAccountValidator < ActiveModel::EachValidator def validate_each(object, attribute, value) clases = options[:clases] || ['Client', 'Supplier', 'Staff'] object.errors[attribute] << I18n.t("errors.messages.inclusion") unless Ac...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/lib/hash_ext.rb
lib/hash_ext.rb
# encoding: utf-8 # author: Boris Barroso # email: boriscyber@gmail.com module HashExt # Transforns for date parameters def transform_date_parameters!(*keys) keys.each do |key| t = get_date_val(key) unless t.blank? time = get_time_val(key) t << " #{time}" unless time.blank? els...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/lib/pg_tools.rb
lib/pg_tools.rb
# encoding: utf-8 module PgTools [:username, :database, :host, :password].each do |meth| class_eval <<-CODE, __FILE__, __LINE__ + 1 def #{meth} connection_config[:#{meth}] end CODE end module_function :username, :database, :host, :password # extend self module_function def pub...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/lib/organisation_relation_validator.rb
lib/organisation_relation_validator.rb
# encoding: utf-8 # author: Boris Barroso # email: boriscyber@gmail.com class OrganisationRelationValidator < ActiveModel::EachValidator def validate_each(object, attribute, value) attribute = attribute.to_s[0...-3] _klass = object.class.reflections[attribute.to_sym] _klass = _klass.options[:class_name] |...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/lib/string_encoder.rb
lib/string_encoder.rb
# encoding: utf-8 class StringEncoder attr_accessor :str attr_reader :from, :to, :new_str def initialize(from, to) @from, @to = from, to @new_str = "".encode(to) end def encode(string) string = string.gsub("’", "'").gsub("‘", "'").gsub("–", "-").gsub("€", "&#8364;") encode_chunck(string) ...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/lib/controllers/authentication.rb
lib/controllers/authentication.rb
# encoding: utf-8 # author: Boris Barroso # email: boriscyber@gmail.com module Controllers::Authentication def self.included(base) base.instance_eval do helper_method :current_user, :user_signed_in? end end def current_user @current_user ||= User.find(session[:user_id]) rescue false en...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/lib/controllers/money.rb
lib/controllers/money.rb
module Controllers::Money def show(account) ledgers = account.get_ledgers case params[:option] when "nulled" ledgers.nulled when "uncon" ledgers.pendent when "con" ledgers.con else params[:option] = "all" ledgers end end end
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/lib/controllers/print.rb
lib/controllers/print.rb
module Controllers::Print private def print_pdf(template, name) html = render_to_string template, layout: 'application.print' save_and_generate_pdf html # send_file #send_file File.read("#{full_path_name}.pdf"), filename: "#{name}.pdf" send_file "#{full_path_name}.pdf", filename: ...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/lib/controllers/date_range.rb
lib/controllers/date_range.rb
# Module to add date_range in search module Controllers::DateRange private def set_date_range @date_range = begin if dates_present? ::DateRange.parse(params[:date_start], params[:date_end]) else ::DateRange.default end end end def dates_present? params[:date_start].p...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/lib/controllers/login_verification.rb
lib/controllers/login_verification.rb
# encoding: utf-8 module Controllers class LoginVerification attr_reader :controller def initialize(cont) raise 'Incorrect param controller' unless cont.is_a?(ActionController::Base) @controller = cont end def login(user, pass) case when user.confirmed_and_valid_password?(pas...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/lib/controllers/tag_search.rb
lib/controllers/tag_search.rb
# encoding: utf-8 # author: Boris Barroso # email: boriscyber@gmail.com module Controllers::TagSearch def self.included(base) base.helper_method :tag_ids end private def tag_ids @tag_ids ||= begin return false if params[:tag_ids].blank? Array(params[:ta...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/lib/controllers/authorization.rb
lib/controllers/authorization.rb
# author: Boris Barroso # email: boriscyber@gmail.com # module to handle all authorization task module Controllers::Authorization private # general method to check authorization def check_authorization! #check_current_user! #authorized = current_user.present? && valid_organisation_date? #...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/lib/controllers/contact.rb
lib/controllers/contact.rb
module Controllers::Contact def show(contact) case params[:tab] when "incomes" set_incomes contact when "buys" set_buys contact when "inventory" set_inventory contact else params[:tab] = "transactions" params[:option] = "all" unless ["all", "con", "pendent", "nulled"]...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/lib/controllers/organisation_helpers.rb
lib/controllers/organisation_helpers.rb
module Controllers::OrganisationHelpers def self.included(base) base.instance_eval do helper_method :currency, :organisation_name, :organisation_id end end def currency current_organisation.currency end def organisation_name current_organisation.name end def organisation_id cu...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/lib/controllers/transactions.rb
lib/controllers/transactions.rb
module Controllers::Transactions protected def update_all_deliver if Transaction.for_deliver.any? Transaction.for_deliver.each do |trans| trans.deliver = true trans.save(:validate => false) end end end end
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/lib/controllers/rescue_from.rb
lib/controllers/rescue_from.rb
module Controllers::RescueFrom def self.included(base) base.instance_eval do rescue_from ActiveRecord::RecordNotFound, with: :render_record_not_found rescue_from ActionController::RoutingError, with: :render_not_found end end private def render_record_not_found render template: '...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/lib/models/tag.rb
lib/models/tag.rb
# encoding: utf-8 # author: Boris Barroso # email: boriscyber@gmail.com module Models::Tag def self.included(base) base.instance_eval do before_save :set_valid_tags, if: :allowed_tag_ids? # Scopes for tags should be added scope :any_tags, -> (*t_ids) { where('tag_ids && ARRAY[?]', t_ids) } ...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/lib/models/updater.rb
lib/models/updater.rb
# encoding: utf-8 module Models::Updater def self.included(base) base.instance_eval do before_create :set_creator before_save :set_updater belongs_to :updater, class_name: 'User' end end private def set_updater self.updater_id = UserSession.id end def set_creator ...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/lib/models/money.rb
lib/models/money.rb
module Models::Money def ledgers AccountLedgers::Query.new.money(id) end def pendent_ledgers ledgers.pendent end end
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/lib/models/hstore_map.rb
lib/models/hstore_map.rb
module Models::HstoreMap def convert_hstore_to(to_type, *methods) methods.each do |meth| alias_method :"old_#{meth}", meth define_method meth do send(:"old_#{meth}").try(to_type) end end end def convert_hstore_to_decimal(*methods) hstore_attributes[:decimal] = methods c...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/lib/models/history.rb
lib/models/history.rb
module Models::History def self.included(base) base.send(:extend, InstanceMethods) base.instance_eval do before_save :create_history has_many :histories, -> { order('histories.created_at desc, id desc') }, as: :historiable, dependent: :destroy delegate :history_instance, :history_cols, to: ...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/lib/models/account_code.rb
lib/models/account_code.rb
module Models::AccountCode attr_accessor :code_name def get_code_number year, num = current_year, '0001' if (cod = get_current_code).present? _, y, num = cod.split('-') num = '0000' unless year == y num = num.next end "#{code_name}-#{year}-#{num}" end alias_method :get_ref_...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/lib/models/user/authentication.rb
lib/models/user/authentication.rb
module Models::User::Authentication attr_accessor :password, :password_confirmation def self.included(base) base.before_create :set_confirmation_token end def confirm_registration return true if confirmed_at? update_attribute(:confirmed_at, Time.zone.now) end def valid_password?(unencrypted...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/lib/generators/haml/base.rb
lib/generators/haml/base.rb
require 'rails/generators/named_base' module Haml module Generators class Base < Rails::Generators::NamedBase # Automatically sets the source root based on the class name. # def self.source_root @_haml_source_root ||= begin File.expand_path(File.join(File.dirname(__FILE__), ge...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/lib/generators/haml/controller/controller_generator.rb
lib/generators/haml/controller/controller_generator.rb
require 'generators/haml/base.rb' module Haml module Generators class ControllerGenerator < Haml::Generators::Base argument :actions, :type => :array, :default => [], :banner => "action action" def create_view_files base_path = File.join("app/views", class_path, file_name) empty_dire...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/lib/generators/haml/scaffold/scaffold_generator.rb
lib/generators/haml/scaffold/scaffold_generator.rb
require 'generators/haml/base.rb' require 'rails/generators/resource_helpers' module Haml module Generators class ScaffoldGenerator < Haml::Generators::Base include Rails::Generators::ResourceHelpers argument :attributes, :type => :array, :default => [], :banner => "field:type field:type" cla...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/lib/generators/haml/mailer/mailer_generator.rb
lib/generators/haml/mailer/mailer_generator.rb
require 'generators/haml/base.rb' module Haml module Generators class MailerGenerator < Haml::Generators::Base argument :actions, :type => :array, :default => [], :banner => "method method" def create_view_folder empty_directory File.join("app/views", file_path) end def create_v...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/config/application.rb
config/application.rb
require File.expand_path('../boot', __FILE__) # Pick the frameworks you want: require 'rails/all' # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. #Bundler.require(:default, Rails.env) Bundler.require(*Rails.groups) module Bonsaierp class Applicatio...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/config/environment.rb
config/environment.rb
# Load the rails application require File.expand_path('../application', __FILE__) # Initialize the rails application Bonsaierp::Application.initialize!
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/config/routes.rb
config/routes.rb
class ActionDispatch::Routing::Mapper def draw(routes_name) instance_eval(File.read(Rails.root.join("config/routes/#{routes_name}.rb"))) end end Bonsaierp::Application.routes.draw do draw :api draw :app root to: 'sessions#new' end
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/config/deploy.rb
config/deploy.rb
# config valid only for Capistrano 3.1 lock '>= 3.5.0' set :application, 'bonsaierp' set :repo_url, 'git@github.com:bonsaiERP/bonsaiERP.git' # Default branch is :master # ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }.call # Default deploy_to directory is /var/www/my_app set :deploy_to, '/var/www/bons...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/config/boot.rb
config/boot.rb
# Set up gems listed in the Gemfile. ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/config/initializers/active_model_serializers.rb
config/initializers/active_model_serializers.rb
#ActiveSupport.on_load(:action_controller) do # wrap_parameters format: [:json] #end # ## Disable root element in JSON by default. #ActiveSupport.on_load(:active_record) do # self.include_root_in_json = false #end # #BSA ActiveModel::Serializer.root false #BSA ActiveModel::ArraySerializer.root = false # Without root,...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/config/initializers/session_store.rb
config/initializers/session_store.rb
# Be sure to restart your server when you modify this file. Bonsaierp::Application.config.session_store :cookie_store, key: '_bonsai_session', domain: :all
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/config/initializers/currency.rb
config/initializers/currency.rb
CURRENCIES = Hash[ YAML.load_file(Rails.root.join('db', 'defaults', 'currencies.yml')).map {|v| [v[:code], v] } ]
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/config/initializers/constants.rb
config/initializers/constants.rb
PASSWORD_LENGTH = 8 DOMAIN = Rails.application.secrets.domain ENV["DOMAIN"] = DOMAIN USE_SUBDOMAIN = false HTTP_PROTOCOL = Rails.application.secrets.http_protocol #ENV['MANDRILL_API_KEY'] = Rails.application.secrets.mandrill_api_key DEV_DOMAIN = 'localhost.bom' APP_NAME = 'bonsaiERP' ALLOW_REGISTRATIONS = Rails.applica...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/config/initializers/wrap_parameters.rb
config/initializers/wrap_parameters.rb
# Be sure to restart your server when you modify this file. # This file contains settings for ActionController::ParamsWrapper which # is enabled by default. # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. ActiveSupport.on_load(:action_controller) do wrap_parameters f...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/config/initializers/countries.rb
config/initializers/countries.rb
COUNTRIES = Hash[ YAML.load_file(Rails.root.join('db', 'defaults', 'countries.yml')).map {|v| [v[:code], v] } ]
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/config/initializers/schema_migration_table.rb
config/initializers/schema_migration_table.rb
# To correctly run migrations, because the use of HSTORE ActiveRecord::SchemaMigration.instance_eval do def table_name 'public.schema_migrations' end end
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/config/initializers/inflections.rb
config/initializers/inflections.rb
# Be sure to restart your server when you modify this file. # Add new inflection rules using the following format # (all these examples are active by default): ActiveSupport::Inflector.inflections do |inflect| # inflect.plural /^(ox)$/i, '\1en' # inflect.singular /^(ox)en/i, '\1' #inflect.irregular 'dolar', 'dol...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/config/initializers/bugsnag.rb
config/initializers/bugsnag.rb
if Rails.env.production? && Rails.application.secrets[:use_bugsnag] Bugsnag.configure do |config| config.api_key = Rails.application.secrets[:bugsnag_api_key] end end
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/config/initializers/simple_form.rb
config/initializers/simple_form.rb
# Use this setup block to configure all options available in SimpleForm. SimpleForm.setup do |config| # Components used by the form builder to generate a complete input. You can remove # any of them, change the order, or even add your own components to the stack. # config.components = [ :placeholder, :label_input...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/config/initializers/ext_clases.rb
config/initializers/ext_clases.rb
Hash.send(:include, HashExt)
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/config/initializers/filter_parameters_logging.rb
config/initializers/filter_parameters_logging.rb
# Be sure to restart your server when you modify this file. # Configure sensitive parameters which will be filtered from the log file. Rails.application.config.filter_parameters += [:password]
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false
bonsaiERP/bonsaiERP
https://github.com/bonsaiERP/bonsaiERP/blob/0edb91af594f81e7534dbc90525a406c645ad164/config/initializers/cookie_verification_secret.rb
config/initializers/cookie_verification_secret.rb
# Be sure to restart your server when you modify this file. # Your secret key for verifying the integrity of signed cookies. # If you change this key, all old signed cookies will become invalid! # Make sure the secret is at least 30 characters and all random, # no regular words or you'll be exposed to dictionary attac...
ruby
MIT
0edb91af594f81e7534dbc90525a406c645ad164
2026-01-04T17:40:51.865869Z
false