- Primeiro, crie um branch de desenvolvimento no seu repositório local:
$ git checkout --track origin/development
- Trabalhe em sua tarefa normalmente. Lembre-se de fazer commits frequentes para manter o rastro do seu progresso.
FROM ubuntu:trusty | |
# Update the repository | |
RUN apt-get update | |
# Install necessary tools | |
RUN apt-get install -y wget net-tools build-essential git | |
# Setup Install Nginx | |
RUN wget -q -O - http://nginx.org/keys/nginx_signing.key | apt-key add - |
# dchud's 20 minute guide to installing DSpace 4.0 from the binary release | |
# on a clean ubuntu 12.04 server running on aws ec2 or where-have-you | |
# | |
# this guide assumes you are already comfortable with *nix system administration | |
# | |
# this guide leaves out anything to do with the many details of configuring | |
# DSpace itself; it just gets you to the "it's up and running" step | |
# | |
# to start: get your clean ubuntu-12.04 system up to date | |
$ sudo apt-get update && sudo apt-get upgrade |
In the project I'm working on we wanted to have a Category model which we wanted to be nestable. But we also liked the user to have a draggable interface to manage and rearrange the order of his categories. So we chose awesome_nested_set for the model and jQuery.nestedSortable for the UI.
It took me some time to arrange things to work properly so I wanted to share my work in case it helps anybody.
you might want to take a look at a demo app
require 'resque/tasks' | |
require 'active_record' | |
env = ENV["RAILS_ENV"] || 'development' | |
database_config = YAML::load(File.open('config/database.yml')) | |
connection = ActiveRecord::Base.establish_connection(database_config[env]) | |
files = ['lib/foo', 'lib/bar', 'app/models/foo', 'app/workers/foo'] | |
files.each { |file| require file } |
class Customer < ActiveRecord::Base | |
has_many :projects | |
validates :name, :presence => true | |
validates :cnpj, :presence => true, :format => { :with => /^\d{2}.?(\d{3}.?){2}\/\d{4}-?\d{2}$/ } | |
end |
describe "GET current" do | |
before do | |
@request.cookies['hidden_notices'] = "1,#{notices(:permanent).id}" | |
get :current, :format => 'js' | |
end | |
it { should respond_with(:success) } | |
it { should set_cookie(:hidden_notices).to("#{notices(:permanent).id}") } | |
it { should render_template('notices/current') } | |
end |
# RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com | |
# defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below) | |
module Player | |
describe MovieList, "with optional description" do | |
it "is pending example, so that you can write ones quickly" | |
it "is already working example that we want to suspend from failing temporarily" do | |
pending("working on another feature that temporarily breaks this one") |