This repository has been archived by the owner on Aug 1, 2022. It is now read-only.
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
Showing
26 changed files
with
260 additions
and
31 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
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
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
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 |
---|---|---|
@@ -1,13 +1,16 @@ | ||
$ -> | ||
$("a[rel=twipsy]").twipsy live: true | ||
|
||
$ -> | ||
$("a[rel=popover]").popover offset: 10 | ||
|
||
$ -> | ||
domModal = $(".modal").modal( | ||
backdrop: true | ||
closeOnEscape: true | ||
) | ||
$(".open-modal").click -> | ||
domModal.toggle() | ||
domModal.toggle() | ||
|
||
$ -> | ||
$(".btn").button "complete" |
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
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 ProjectsController < InheritedResources::Base | ||
|
||
|
||
protected | ||
|
||
def begin_of_association_chain | ||
current_user | ||
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,14 @@ | ||
class Project < ActiveRecord::Base | ||
|
||
belongs_to :user | ||
|
||
after_create :clone_repo | ||
|
||
|
||
private | ||
|
||
def clone_repo | ||
CLONE_QUEUE << url | ||
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
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,18 @@ | ||
<%- if @projects.empty? -%> | ||
|
||
<h4 align="center">You haven't created any projects yet! Choose a repository to get started...</h4> | ||
|
||
<% else %> | ||
|
||
<table class="zebra-striped"> | ||
<thead> | ||
<tr> | ||
<th>Name</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<%= render @projects %> | ||
</tbody> | ||
</table> | ||
|
||
<%- 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 |
---|---|---|
@@ -1,4 +1,6 @@ | ||
<%- return if Project.exists?(:url => repo.ssh_url) -%> | ||
|
||
<tr> | ||
<td><%= link_to 'Setup', '#', :class => "btn primary" %></td> | ||
<td><%= link_to 'Setup', projects_path('project[url]' => repo.ssh_url), :class => "btn primary", :method => :post %></td> | ||
<td><h5><%= link_to repo.name, repo.html_url %></h5></td> | ||
</tr> | ||
</tr> |
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,19 @@ | ||
<%- if @repos.empty? -%> | ||
|
||
<h4 align="center">No repositories found in your Github account! Strano currently only supports the deployment of Github repositories.</h4> | ||
|
||
<% else %> | ||
|
||
<table class="zebra-striped"> | ||
<thead> | ||
<tr> | ||
<th width="40"></th> | ||
<th>Name</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<%= render :partial => 'repo', :collection => @repos %> | ||
</tbody> | ||
</table> | ||
|
||
<%- 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 |
---|---|---|
@@ -1,21 +1,11 @@ | ||
<%- title 'Dashboard' -%> | ||
|
||
<%- if @repos.empty? -%> | ||
|
||
<h4 align="center">No repositories found in your Github account!</h4> | ||
|
||
<% else %> | ||
<ul class="tabs" data-tabs="tabs"> | ||
<li class="active"><a href="#projects">Projects</a></li> | ||
<li><a href="#repos">Repositories</a></li> | ||
</ul> | ||
|
||
<table class="zebra-striped"> | ||
<thead> | ||
<tr> | ||
<th width="40"></th> | ||
<th>Name</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<%= render :partial => 'repo', :collection => @repos %> | ||
</tbody> | ||
</table> | ||
|
||
<%- end -%> | ||
<div class="tab-content"> | ||
<div class="tab-pane active" id="projects"><%= render 'projects' %></div> | ||
<div class="tab-pane" id="repos"><%= render 'repos' %></div> | ||
</div> |
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 @@ | ||
<tr> | ||
<td><%= link_to project.url %></td> | ||
</tr> |
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 @@ | ||
<%- title "Project: ##{resource.id}" -%> | ||
|
||
|
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
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 @@ | ||
class MyErrorHandler | ||
def handle(ex) | ||
puts ex.message | ||
end | ||
end | ||
|
||
CLONE_QUEUE = GirlFriday::WorkQueue.new(:git_clone, :error_handler => MyErrorHandler) do |msg| | ||
Strano::Repo.clone(msg) | ||
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
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 CreateProjects < ActiveRecord::Migration | ||
def change | ||
create_table :projects do |t| | ||
t.string :url | ||
t.references :user | ||
|
||
t.timestamps | ||
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
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 @@ | ||
module Strano | ||
|
||
|
||
end |
Oops, something went wrong.