forked from danielvlopes/railsmg
-
Notifications
You must be signed in to change notification settings - Fork 2
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 557852e
Showing
384 changed files
with
52,321 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,17 @@ | ||
config/database.yml | ||
db/schema.rb | ||
db/schema.sql | ||
coverage/* | ||
doc/* | ||
log/*.log | ||
log/*.out | ||
log/*.pid | ||
tmp/**/* | ||
tmp/.* | ||
tmp/profile* | ||
uploads/* | ||
vendor/**/**/doc/* | ||
.DS_Store | ||
.project | ||
ssl/* | ||
Icon? |
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,4 @@ | ||
load 'deploy' if respond_to?(:namespace) # cap2 differentiator | ||
Dir['vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) } | ||
|
||
load 'config/deploy' # remove this line to skip loading any of the default tasks |
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,10 @@ | ||
# Filters added to this controller apply to all controllers in the application. | ||
# Likewise, all the methods added will be available for all controllers. | ||
|
||
class ApplicationController < ActionController::Base | ||
helper :all # include all helpers, all the time | ||
protect_from_forgery # See ActionController::RequestForgeryProtection for details | ||
|
||
# Scrub sensitive parameters from your log | ||
# filter_parameter_logging :password | ||
end |
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,22 @@ | ||
# Methods added to this helper will be available to all templates in the application. | ||
module ApplicationHelper | ||
# print javascript for each item in array of files in head section | ||
def javascript(*files) | ||
content_for(:javascripts) { javascript_include_tag(*files) } | ||
end | ||
|
||
# print stylesheet for each item in array of files in head section | ||
def stylesheet(*files) | ||
content_for(:stylesheets) { stylesheet_link_tag(*files) } | ||
end | ||
|
||
def favicon | ||
"<link rel=\"shortcut icon\" href=\"/images/favicon.png\" />" | ||
end | ||
|
||
def flash_notices | ||
[:notice, :error, :warning].collect do |type| | ||
content_tag('div', flash[type], :class=>"message #{type}", :id => "flash_messages") if flash[type] | ||
end | ||
end | ||
end |
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,37 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | ||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<html> | ||
<head> | ||
<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> | ||
<title>Title <%= yield(:title) %></title> | ||
<%= favicon %> | ||
|
||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script> | ||
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js" type="text/javascript"></script> | ||
|
||
<%= javascript_include_merged :base %> | ||
<%= yield(:javascripts) %> | ||
|
||
<%= stylesheet_link_tag "application" %> | ||
<%= yield(:stylesheets) %> | ||
</head> | ||
<body> | ||
<!--[if lte IE 7]> | ||
<div class="notSupportedBrowser important"> | ||
<p> | ||
<strong>Seu navegador está desatualizado. Baixe a nova versão <%= link_to image_tag("ua_ie.jpg", :class=>"middle"), "http://www.microsoft.com/windows/internet-explorer", :target=>"_blank" %> | ||
ou escolha outro suportado:</strong> | ||
<%= link_to image_tag("ua_ff.jpg", :class=>"middle"), "http://www.mozilla.com/", :target=>"_blank" %> | ||
<%= link_to image_tag("ua_sf.jpg", :class=>"middle"), "http://www.apple.com/safari/", :target=>"_blank" %> | ||
<%= link_to image_tag("ua_ch.jpg", :class=>"middle"), "http://www.google.com/chrome", :target=>"_blank" %> | ||
<%= link_to image_tag("ua_op.jpg", :class=>"middle"), "http://www.opera.com/", :target=>"_blank" %> | ||
</p> | ||
</div> | ||
<![endif]--> | ||
<%= flash_notices %> | ||
|
||
<%= yield :layout %> | ||
|
||
<%= yield(:bottom) %> | ||
</body> | ||
</html> |
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,63 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | ||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
|
||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | ||
|
||
<head> | ||
<meta http-equiv="content-type" content="text/html;charset=UTF-8" /> | ||
<title>Manutenção</title> | ||
<link href="/stylesheets/application.css" media="screen" rel="stylesheet" type="text/css" /> | ||
<style type="text/css" media="screen"> | ||
html, body { | ||
color: black; | ||
font-family: verdana, helvetica, arial, sans-serif; | ||
font-size:12px; | ||
margin: 0; | ||
padding: 0; | ||
width:100%; | ||
height:100%; | ||
background:#E0E1E3; } | ||
|
||
h1 { | ||
color:#487dac; | ||
font-weight:bold; | ||
font-family:Verdana; | ||
font-size:20px; | ||
margin:0px; | ||
padding:0px; } | ||
|
||
div.notification { | ||
position:absolute; | ||
margin: 30px auto; | ||
left: 50%; | ||
top: 50%; | ||
width: 520px; | ||
background: #fff; | ||
margin-top: -300px; | ||
margin-left: -260px; | ||
} | ||
|
||
div.notification div.inner { padding: 20px; text-align:center; } | ||
|
||
div.notification h1 { font-size: 18px; margin: 0 0 18px 0; padding: 10px; } | ||
|
||
div.notification p { | ||
margin: 0 0 14px 0; | ||
font-size: 14px; | ||
line-height: 140%; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
|
||
<div class="notification"> | ||
<div class="inner"> | ||
<h1>Estamos em manutenção</h1> | ||
<p>Nosso serviço está fora do ar <%= reason ? reason : "para manutenção" %> a partir de <%= Time.now.strftime("%H:%M %Z") %>. <p> | ||
<p>Nós voltaremos <%= deadline ? deadline : "o quanto antes possível" %>.</p> | ||
</div> | ||
</div> | ||
|
||
</body> | ||
</html> |
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,11 @@ | ||
--- | ||
javascripts: | ||
- base: | ||
- prototype | ||
- effects | ||
- dragdrop | ||
- controls | ||
- application | ||
stylesheets: | ||
- base: [] | ||
|
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,110 @@ | ||
# Don't change this file! | ||
# Configure your app in config/environment.rb and config/environments/*.rb | ||
|
||
RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT) | ||
|
||
module Rails | ||
class << self | ||
def boot! | ||
unless booted? | ||
preinitialize | ||
pick_boot.run | ||
end | ||
end | ||
|
||
def booted? | ||
defined? Rails::Initializer | ||
end | ||
|
||
def pick_boot | ||
(vendor_rails? ? VendorBoot : GemBoot).new | ||
end | ||
|
||
def vendor_rails? | ||
File.exist?("#{RAILS_ROOT}/vendor/rails") | ||
end | ||
|
||
def preinitialize | ||
load(preinitializer_path) if File.exist?(preinitializer_path) | ||
end | ||
|
||
def preinitializer_path | ||
"#{RAILS_ROOT}/config/preinitializer.rb" | ||
end | ||
end | ||
|
||
class Boot | ||
def run | ||
load_initializer | ||
Rails::Initializer.run(:set_load_path) | ||
end | ||
end | ||
|
||
class VendorBoot < Boot | ||
def load_initializer | ||
require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer" | ||
Rails::Initializer.run(:install_gem_spec_stubs) | ||
Rails::GemDependency.add_frozen_gem_path | ||
end | ||
end | ||
|
||
class GemBoot < Boot | ||
def load_initializer | ||
self.class.load_rubygems | ||
load_rails_gem | ||
require 'initializer' | ||
end | ||
|
||
def load_rails_gem | ||
if version = self.class.gem_version | ||
gem 'rails', version | ||
else | ||
gem 'rails' | ||
end | ||
rescue Gem::LoadError => load_error | ||
$stderr.puts %(Missing the Rails #{version} gem. Please `gem install -v=#{version} rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.) | ||
exit 1 | ||
end | ||
|
||
class << self | ||
def rubygems_version | ||
Gem::RubyGemsVersion rescue nil | ||
end | ||
|
||
def gem_version | ||
if defined? RAILS_GEM_VERSION | ||
RAILS_GEM_VERSION | ||
elsif ENV.include?('RAILS_GEM_VERSION') | ||
ENV['RAILS_GEM_VERSION'] | ||
else | ||
parse_gem_version(read_environment_rb) | ||
end | ||
end | ||
|
||
def load_rubygems | ||
min_version = '1.3.2' | ||
require 'rubygems' | ||
unless rubygems_version >= min_version | ||
$stderr.puts %Q(Rails requires RubyGems >= #{min_version} (you have #{rubygems_version}). Please `gem update --system` and try again.) | ||
exit 1 | ||
end | ||
|
||
rescue LoadError | ||
$stderr.puts %Q(Rails requires RubyGems >= #{min_version}. Please install RubyGems and try again: http://rubygems.rubyforge.org) | ||
exit 1 | ||
end | ||
|
||
def parse_gem_version(text) | ||
$1 if text =~ /^[^#]*RAILS_GEM_VERSION\s*=\s*["']([!~<>=]*\s*[\d.]+)["']/ | ||
end | ||
|
||
private | ||
def read_environment_rb | ||
File.read("#{RAILS_ROOT}/config/environment.rb") | ||
end | ||
end | ||
end | ||
end | ||
|
||
# All that for this: | ||
Rails.boot! |
Oops, something went wrong.