Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

working on polishing the homepage

  • Loading branch information...
commit 3e1fecf4d84193ae85d4498dcf640c25fe94e130 1 parent 9bd33f1
@rauhryan authored
View
2  Gemfile
@@ -2,11 +2,11 @@ source 'http://rubygems.org'
gem 'encryptor'
gem 'httparty'
gem 'rack-no-www'
+gem 'rdiscount'
gem 'sinatra'
gem 'sinatra_auth_github'
gem 'sinatra-content-for'
gem 'stint', :path => "./stint/stint"
-gem 'warden-github'
group :development do
gem 'watchr'
View
7 Gemfile.lock
@@ -17,7 +17,7 @@ GEM
multi_xml
json (1.6.3)
mime-types (1.17.2)
- multi_json (1.0.3)
+ multi_json (1.0.4)
multi_xml (0.4.1)
multipart-post (1.1.4)
oauth2 (0.4.1)
@@ -27,6 +27,7 @@ GEM
rack-no-www (0.0.2)
rack-protection (1.1.4)
rack
+ rdiscount (1.6.8)
rest-client (1.6.7)
mime-types (>= 1.16)
sinatra (1.3.1)
@@ -42,7 +43,7 @@ GEM
tilt (1.3.3)
warden (1.0.6)
rack (>= 1.0)
- warden-github (0.1.1)
+ warden-github (0.1.2)
json (~> 1.5)
oauth2 (~> 0.4.1)
warden (~> 1.0.4)
@@ -55,9 +56,9 @@ DEPENDENCIES
encryptor
httparty
rack-no-www
+ rdiscount
sinatra
sinatra-content-for
sinatra_auth_github
stint!
- warden-github
watchr
View
66 README.md
@@ -1,4 +1,58 @@
-# Inch Pebbles
+# Welcome to Huboard
+
+How to set up YOUR repo
+--------------------------
+* * *
+
+Add labels to your repository with the following pattern
+
+> # - Title
+
+> # == index of column
+> Title == column header
+
+Example:
+
+> 1 - Backlog
+
+> 2 - Ready
+
+> 3 - Working
+
+> 4 - Done
+
+The number represents the index of the column and the will be the column header
+
+To move a card with a commit message add "push GH-#" anywhere in your commit message
+
+Other supported key words
+
+> push GH-#
+
+> pushed GH-#
+
+> move GH-#
+
+> moves GH-#
+
+* ~~Make sure you create a hook for the Repository on the home page. Only click the button once (known defect)~~
+* Currently you can only move one card per commit message (will fix soon)
+
+
+Bugs
+--------------------------
+* * *
+
+* ~~creates multiple post-receive hooks, only click once. You can manually delete the hook from the admin panel on github~~
+* Milestones reordering takes a few seconds and I don't have a loading screen on there yet so give it a few seconds
+
+
+Notes
+--------------------------
+* * *
+
+* Milestones reordering will change the due date of your milestone. (currently the only way to order then)
+* commit message that "push GH-#" past the last column close the issue
## To run locally
@@ -7,11 +61,11 @@
Configure your app for pow:
cd ~/.pow
- ln -s /path/to/inch-pebbles
+ ln -s /path/to/huboard
Sinatra doesn't automatically reload changes to your app, so tell Pow to restart on every request:
- cd /path/to/inch-pebbles
+ cd /path/to/huboard
mkdir tmp
touch tmp/always_restart.txt
@@ -33,8 +87,8 @@ Recommend MRI 1.9.2, to match the [bamboo stack on heroku](http://devcenter.hero
Go to https://github.com/account/applications and register your
application to get the application keys needed for OAuth.
-- URL: `http://inch-pebbles.dev`
-- Callback: `http://inch-pebbles.dev/auth/github/callback`
+- URL: `http://huboard.dev`
+- Callback: `http://huboard.dev/auth/github/callback`
### Configure your app
@@ -45,4 +99,4 @@ Github when you registered the application.
### Try the app
-Open your browser to http://inch-pebbles.dev/board
+Open your browser to http://huboard.dev/board
View
1  config.ru
@@ -16,6 +16,5 @@ map "/api" do
end
map "/" do
-
run Huboard::App
end
View
35 lib/app.rb
@@ -1,3 +1,4 @@
+require 'rdiscount'
require 'sinatra'
require 'sinatra/content_for'
require 'stint'
@@ -30,11 +31,39 @@ class App < Sinatra::Base
set :session_secret, ENV["SESSION_SECRET"]
end
+ PUBLIC_URLS = ['/', '/logout']
+ before do
+ protected! unless PUBLIC_URLS.include? request.path_info
+ end
+
+ helpers do
+ def protected!
+ authenticate!
+ #HAX! TODO remove
+ Stint::Github.new(:basic_auth => {:username => settings.user_name, :password => settings.password}).add_to_team(settings.team_id, current_user) unless github_team_access? settings.team_id
+ current_user
+ github_team_authenticate! team_id
+ end
+ end
+
get '/' do
+ return erb :home unless authenticated?
+ protected!
@repos = pebble.all_repos
erb :index
end
+ get '/login' do
+ protected!
+ redirect '/'
+ end
+
+
+ get '/logout' do
+ logout!
+ redirect '/'
+ end
+
get '/:user/:repo/milestones' do
@parameters = params
erb :milestones
@@ -65,12 +94,6 @@ class App < Sinatra::Base
json response
end
- before do
- authenticate!
- Stint::Github.new(:basic_auth => {:username => settings.user_name, :password => settings.password}).add_to_team(settings.team_id, current_user) unless github_team_access? settings.team_id
- current_user
- github_team_authenticate! team_id
- end
helpers Sinatra::ContentFor
View
1  stint/stint/stint.gemspec
@@ -18,7 +18,6 @@ Gem::Specification.new do |s|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
s.require_paths = ["lib"]
- s.add_dependency "httparty"
# specify any dependencies here; for example:
s.add_development_dependency "rake"
s.add_development_dependency "rspec"
View
11 views/home.erb
@@ -0,0 +1,11 @@
+<div class="drop-shadow lifted">
+ <%= markdown(:home) %>
+</div>
+
+<% content_for :sub_navigation do %>
+
+ <li>
+ <a href="/login">Login</a>
+ </li>
+
+<% end %>
View
56 views/home.md
@@ -0,0 +1,56 @@
+# Welcome to Huboard
+
+How to set up YOUR repo
+--------------------------
+* * *
+
+Add labels to your repository with the following pattern
+
+> # - Title
+
+> # == index of column
+> Title == column header
+
+Example:
+
+> 1 - Backlog
+
+> 2 - Ready
+
+> 3 - Working
+
+> 4 - Done
+
+The number represents the index of the column and the will be the column header
+
+To move a card with a commit message add "push GH-#" anywhere in your commit message
+
+Other supported key words
+
+> push GH-#
+
+> pushed GH-#
+
+> move GH-#
+
+> moves GH-#
+
+* ~~Make sure you create a hook for the Repository on the home page. Only click the button once (known defect)~~
+* Currently you can only move one card per commit message (will fix soon)
+
+
+Bugs
+--------------------------
+* * *
+
+* ~~creates multiple post-receive hooks, only click once. You can manually delete the hook from the admin panel on github~~
+* Milestones reordering takes a few seconds and I don't have a loading screen on there yet so give it a few seconds
+
+
+Notes
+--------------------------
+* * *
+
+* Milestones reordering will change the due date of your milestone. (currently the only way to order then)
+* commit message that "push GH-#" past the last column close the issue
+
View
2  views/layout.erb
@@ -29,12 +29,14 @@
</ul>
<ul class="nav secondary-nav">
<% yield_content :sub_navigation %>
+ <% if !@user.nil? %>
<li class="dropdown">
<a href="#" class="dropdown-toggle"><%= @user.login %></a>
<ul class="dropdown-menu">
<li><a href="/logout">Logout</a></li>
</ul>
</li>
+ <% end %>
</ul>
</div>
</div><!-- /topbar-inner -->
Please sign in to comment.
Something went wrong with that request. Please try again.