-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding sinatra + angularjs + bootstrap
- Loading branch information
1 parent
6f10d4c
commit db0836e
Showing
11 changed files
with
330 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,12 @@ | ||
source 'https://rubygems.org' | ||
|
||
gem 'thin' | ||
gem 'sinatra' | ||
gem 'foreman' | ||
gem 'sass' | ||
gem 'compass' | ||
|
||
group :development do | ||
gem 'pry' | ||
gem 'shotgun' | ||
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,50 @@ | ||
GEM | ||
remote: https://rubygems.org/ | ||
specs: | ||
chunky_png (1.2.8) | ||
coderay (1.0.9) | ||
compass (0.12.2) | ||
chunky_png (~> 1.2) | ||
fssm (>= 0.2.7) | ||
sass (~> 3.1) | ||
daemons (1.1.9) | ||
dotenv (0.8.0) | ||
eventmachine (1.0.3) | ||
foreman (0.63.0) | ||
dotenv (>= 0.7) | ||
thor (>= 0.13.6) | ||
fssm (0.2.10) | ||
method_source (0.8.1) | ||
pry (0.9.12.2) | ||
coderay (~> 1.0.5) | ||
method_source (~> 0.8) | ||
slop (~> 3.4) | ||
rack (1.5.2) | ||
rack-protection (1.5.0) | ||
rack | ||
sass (3.2.9) | ||
shotgun (0.9) | ||
rack (>= 1.0) | ||
sinatra (1.4.3) | ||
rack (~> 1.4) | ||
rack-protection (~> 1.4) | ||
tilt (~> 1.3, >= 1.3.4) | ||
slop (3.4.5) | ||
thin (1.5.1) | ||
daemons (>= 1.0.9) | ||
eventmachine (>= 0.12.6) | ||
rack (>= 1.0.0) | ||
thor (0.18.1) | ||
tilt (1.4.1) | ||
|
||
PLATFORMS | ||
ruby | ||
|
||
DEPENDENCIES | ||
compass | ||
foreman | ||
pry | ||
sass | ||
shotgun | ||
sinatra | ||
thin |
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 @@ | ||
import 'lib/tasks/download_csv.rake' | ||
import 'lib/tasks/import_csv.rake' | ||
import 'lib/tasks/generate_data.rake' |
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,9 @@ | ||
require 'rubygems' | ||
require 'bundler' | ||
|
||
Bundler.require | ||
Dir["./app/model/*.rb"].each {|file| require file } | ||
|
||
require './orcamento_app' | ||
|
||
run OrcamentoApp |
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 @@ | ||
class OrcamentoApp < Sinatra::Base | ||
configure do | ||
set :views, Proc.new { File.join(root, "public/views") } | ||
end | ||
|
||
get '/' do | ||
erb :index | ||
end | ||
|
||
end |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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 @@ | ||
'use strict'; | ||
|
||
var app = angular.module('orcamentoapp', ['$strap.directives']). | ||
config(['$routeProvider', function($routeProvider) { | ||
$routeProvider. | ||
when('/', {templateUrl: 'views/home.html', controller: HomeController}). | ||
otherwise({redirectTo: '/'}); | ||
}]); | ||
|
||
}); |
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,58 @@ | ||
<!DOCTYPE html> | ||
<html lang="en" ng-app="orcamento"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Teste</title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta name="description" content=""> | ||
<meta name="author" content=""> | ||
|
||
<link href="/css/bootstrap.min.css" rel="stylesheet"> | ||
<link href="/css/bootstrap-responsive.min.css" rel="stylesheet"> | ||
|
||
|
||
<script src="/js/lib/angular.min.js"></script> | ||
<script src="/js/lib/underscore-min.js"></script> | ||
<script src="/js/app.js"></script> | ||
|
||
<!-- HTML5 shim, for IE6-8 support of HTML5 elements --> | ||
<!--[if lt IE 9]> | ||
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> | ||
<![endif]--> | ||
</head> | ||
|
||
<body> | ||
<div class="navbar navbar-inverse navbar-fixed-top"> | ||
<div class="navbar-inner"> | ||
<div class="container"> | ||
<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> | ||
</button> | ||
<a class="brand" href="/#/">OrcamentoPOA<span>BR</span></a> | ||
<div class="nav-collapse collapse"> | ||
<ul class="nav"> | ||
<li class="home selected"><a href="/#/"><i class="icon-home"></i>Página Inicial</a></li> | ||
</ul> | ||
|
||
<ul class="navbar-search pull-right" ng-controller="EmpresaSearchController"> | ||
<li> | ||
<i class="icon-search"></i> | ||
<input type="text" ng-model="typeaheadValue" bs-typeahead="typeahead" type-ahead-selected="loadGroup()" class="search-query input-xxlarge" id="typeaheadValue" placeholder="Buscar Algo"> | ||
</li> | ||
</ul> | ||
</div><!--/.nav-collapse --> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div id="main-container" class="container"> | ||
<div> | ||
<div ng-view></div> | ||
</div> | ||
</div> <!-- /container --> | ||
<footer> | ||
<p>Dados obtidos em <a href="www.seila.com.br" target="_blank">dados.gov.br</a>. | ||
<a href="https://github.com/cachiconato/orcamento-poa" target="_blank">Código no GitHub</a> | ||
</p> | ||
</footer> | ||
</body> | ||
</html> |