sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade && sudo apt-get autoremove
sudo reboot
| config.generators do |g| | |
| g.fixture_replacement :factory_girl, :dir => "spec/factories" | |
| g.test_framework :rspec, | |
| :fixtures => true, | |
| :view_specs => false, | |
| :helper_specs => false, | |
| :routing_specs => false, | |
| :controller_specs => true, | |
| :request_specs => false | |
| end |
| RSPEC | |
| gem 'rspec-rails', group: [:development, :test] | |
| gem 'capybara', group: [:test] | |
| gem 'factory_girl_rails', group: [:test] | |
| gem 'faker', group: [:test] | |
| #Expectations for RSpec | |
| https://github.com/rspec/rspec-expectations |
| E, [2014-05-26T23:46:33.128739 #8365] ERROR -- : [196.210.247.97] PG::SyntaxError: ERROR: syntax error at or near ")" | |
| LINE 1: ...T "products".* FROM "products" WHERE (category_id LIKE (?)) | |
| ^ | |
| : SELECT "products".* FROM "products" WHERE (category_id LIKE (?)) | |
| I, [2014-05-26T23:46:33.130426 #8365] INFO -- : [196.210.247.97] Rendered products/_products.html.erb (3.6ms) | |
| I, [2014-05-26T23:46:33.130701 #8365] INFO -- : [196.210.247.97] Rendered categories/show.html.erb within layouts/application (5.1ms) | |
| I, [2014-05-26T23:46:33.131085 #8365] INFO -- : [196.210.247.97] Completed 500 Internal Server Error in 19ms | |
| F, [2014-05-26T23:46:33.135574 #8365] FATAL -- : [196.210.247.97] | |
| ActionView::Template::Error (PG::SyntaxError: ERROR: syntax error at or near ")" | |
| LINE 1: ...T "products".* FROM "products" WHERE (category_id LIKE (?)) |
| ActionView::Template::Error (undefined method `cost' for nil:NilClass): | |
| 1: <%= payment_service_for( | |
| 2: Time.now.strftime('%Y%m%d%H%M-') + current_user.id.to_s + '-' + @product.id.to_s, | |
| 3: Rails.configuration.payfast_merchant_id, | |
| 4: :amount => @product.selling_price.to_f + @product.ship_methods.last.cost.to_f, | |
| 5: :service => :pay_fast, | |
| 6: :credential2 => Rails.configuration.payfast_merchant_key, | |
| 7: :html => { :id => 'payment_form' } ) do |service| %> |
| Pry.config.editor = ENV.fetch("EDITOR", "subl -w") | |
| Pry.config.prompt = proc do |obj, level, _| | |
| prompt = "" | |
| prompt << "#{Rails.version}@" if defined?(Rails) | |
| prompt << "#{RUBY_VERSION}" | |
| "#{prompt} (#{obj})> " | |
| end | |
| Pry.config.exception_handler = proc do |output, exception, _| |
| { | |
| "color_scheme": "Packages/Dracula Color Scheme/Dracula.tmTheme", | |
| "font_size": 18.0, | |
| "ignored_packages": | |
| [ | |
| ], | |
| "line_padding_bottom": 1, | |
| "line_padding_top": 1, | |
| "margin": 2, | |
| "soda_classic_tabs": true, |
| class ReportResumoPorFuncionarioMatriz < Prawn::Document | |
| include ActionView::Helpers::NumberHelper | |
| include ActionView::Helpers::TextHelper | |
| def initialize(params = {}) | |
| super(:page_size => "A4", :page_layout => :landscape) | |
| @pedidos = params.fetch(:pedidos) | |
| body | |
| end |
| #Elixir | |
| #Basic |
| require "minitest/autorun" | |
| require "minitest/pride" | |
| class NamaTomTest < Minitest::Test | |
| def test_check | |
| assert_equal text, NamaTom::check((1..100).to_a) | |
| end | |
| private |