-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 17e1be0
Showing
762 changed files
with
45,905 additions
and
0 deletions.
There are no files selected for viewing
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
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 |
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
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' |
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
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. |
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
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. |
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
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 |
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
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 | ||
|
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
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' |
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
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 |
Oops, something went wrong.