Skip to content

Commit

Permalink
comecando traveis
Browse files Browse the repository at this point in the history
  • Loading branch information
nofxx committed Apr 4, 2009
0 parents commit 17e1be0
Show file tree
Hide file tree
Showing 762 changed files with 45,905 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
.DS_Store
thumbs.db
log/*.log
config/database.yml
tmp/**/*
db/development_structure.sql
doc/api
doc/app
doc/plugins
db/schema.rb
public/icons
public/uploads
public/uploads/**/*
public/files/**/*
*.tmproj
*.swp
coverage/*
files/**/*
*~
*flymake.rb
public/javascripts/cache
public/stylesheets/cache
tags
rubyrun/*
public/rubyrun_rss/*
*#*#
*.#*
config/deploy.rb
3 changes: 3 additions & 0 deletions Capfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
load 'deploy' if respond_to?(:namespace) # cap2 differentiator
Dir['vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) }
load 'config/deploy'
51 changes: 51 additions & 0 deletions INSTALAR.rdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
== PostgreSQL

UTF Database:

export PGROOT="/var/lib/postgres"
mkdir -p $PGROOT/data && chown postgres.postgres $PGROOT/data
su - postgres -c "/usr/bin/initdb -E utf8 --locale=en_US.UTF-8 $PGROOT/data"

== PostGIS

Instalando PostGIS no PostgreSQL:

su postgres
psql template1

create database template_postgis with template = template1;
UPDATE pg_database SET datistemplate = TRUE where datname = 'template_postgis';
\c template_postgis
CREATE LANGUAGE plpgsql;

Algumas distros:

# archlinux
\i /usr/share/lwpostgis.sql;
\i /usr/share/spatial_ref_sys.sql;

# centos x86_64
\i /usr/share/pgsql/contrib/lwpostgis-64.sql
\i /usr/share/pgsql/contrib/spatial_ref_sys.sql

# debian
\i /usr/share/postgresql-8.3-postgis/lwpostgis.sql;
\i /usr/share/postgresql-8.3-postgis/spatial_ref_sys.sql;

# osx
\i /opt/local/postgis/lwpostgis.sql;
\i /opt/local/postgis/spatial_ref_sys.sql;

Finalize:

GRANT ALL ON geometry_columns TO PUBLIC;
GRANT ALL ON spatial_ref_sys TO PUBLIC;

VACUUM FREEZE;


== DATABASE

$ createdb -O <owner> -T template_postgis siga_development

Repetir para test e production.
52 changes: 52 additions & 0 deletions INSTALL.rdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@

== PostgreSQL

UTF Database:

export PGROOT="/var/lib/postgres"
mkdir -p $PGROOT/data && chown postgres.postgres $PGROOT/data
su - postgres -c "/usr/bin/initdb -E utf8 --locale=en_US.UTF-8 $PGROOT/data"

== PostGIS

Installing PostGIS extensions on PostgreSQL:

su postgres
psql template1

create database template_postgis with template = template1;
UPDATE pg_database SET datistemplate = TRUE where datname = 'template_postgis';
\c template_postgis
CREATE LANGUAGE plpgsql;

Distro specific:

# archlinux
\i /usr/share/lwpostgis.sql;
\i /usr/share/spatial_ref_sys.sql;

# centos x86_64
\i /usr/share/pgsql/contrib/lwpostgis-64.sql
\i /usr/share/pgsql/contrib/spatial_ref_sys.sql

# debian
\i /usr/share/postgresql-8.3-postgis/lwpostgis.sql;
\i /usr/share/postgresql-8.3-postgis/spatial_ref_sys.sql;

# osx
\i /opt/local/postgis/lwpostgis.sql;
\i /opt/local/postgis/spatial_ref_sys.sql;

Finalize:

GRANT ALL ON geometry_columns TO PUBLIC;
GRANT ALL ON spatial_ref_sys TO PUBLIC;

VACUUM FREEZE;


== DATABASE

$ createdb -O <owner> -T template_postgis siga_development

Repeat for test and production.
36 changes: 36 additions & 0 deletions README-en.rdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
= SIG@

Ruby >= 1.8.7
Rails >= 2.3.2
PostgreSQL >= 8.3.5
PostGIS >= 1.3.5

= Install

== Requirements

* Linux
* Thin/Ngnix or Passenger
* ImageMagick
* GIT


== Gems

* postgres
* authlogic
* bcrypt-ruby
* paperclip
* GeoRuby
* postgis_adapter
* will_paginate


= Devel

== Test

* RSpec
* RSpec-Rails
* Object Daddy
* Faker
61 changes: 61 additions & 0 deletions README.rdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
= SIG@
= Sistema Gestao Administrativa

Sistema para gerenciamento administrativo.

= Instalando

== Requerimentos

=== SO Suportados

* Linux
* BSD
* OSX

=== Software

* Ruby >= 1.8.7/1.9.x
* PostgreSQL >= 8.3.x
* PostGIS >= 1.3.x

Extra:

* Thin/Ngnix or Passenger
* ImageMagick
* GIT


=== Gems

* rails >= 2.3.x
* postgres
* postgis_adapter
* haml
* authlogic
* bcrypt-ruby
* paperclip
* GeoRuby
* rghost
* postgis_adapter
* will_paginate


= Desenvolvedores

== Test

* RSpec
* RSpec-Rails
* Object Daddy
* Faker

= Sobre


Repo Oficial:
http://github.com/stclara/siga

TODO/BUG Tracker:
http://www.pivotaltracker.com/projects/10997

10 changes: 10 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.

require(File.join(File.dirname(__FILE__), 'config', 'boot'))

require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'

require 'tasks/rails'
85 changes: 85 additions & 0 deletions app/controllers/addresses_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
class AddressesController < ApplicationController
# GET /addresses
# GET /addresses.xml
def index
@addresses = Address.all

respond_to do |format|
format.html # index.html.erb
format.xml { render :xml => @addresses }
end
end

# GET /addresses/1
# GET /addresses/1.xml
def show
@address = Address.find(params[:id])

respond_to do |format|
format.html # show.html.erb
format.xml { render :xml => @address }
end
end

# GET /addresses/new
# GET /addresses/new.xml
def new
@address = Address.new

respond_to do |format|
format.html # new.html.erb
format.xml { render :xml => @address }
end
end

# GET /addresses/1/edit
def edit
@address = Address.find(params[:id])
end

# POST /addresses
# POST /addresses.xml
def create
@address = Address.new(params[:address])

respond_to do |format|
if @address.save
flash[:notice] = 'Address was successfully created.'
format.html { redirect_to(@address) }
format.xml { render :xml => @address, :status => :created, :location => @address }
else
format.html { render :action => "new" }
format.xml { render :xml => @address.errors, :status => :unprocessable_entity }
end
end
end

# PUT /addresses/1
# PUT /addresses/1.xml
def update
@address = Address.find(params[:id])

respond_to do |format|
if @address.update_attributes(params[:address])
flash[:notice] = 'Address was successfully updated.'
format.html { redirect_to(@address) }
format.xml { head :ok }
else
format.html { render :action => "edit" }
format.xml { render :xml => @address.errors, :status => :unprocessable_entity }
end
end
end

# DELETE /addresses/1
# DELETE /addresses/1.xml
def destroy
@address = Address.find(params[:id])
@address.destroy

respond_to do |format|
format.html { redirect_to(addresses_url) }
format.xml { head :ok }
end
end
end
Loading

0 comments on commit 17e1be0

Please sign in to comment.