This repository has been archived by the owner on Dec 9, 2017. It is now read-only.
-
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.
- Loading branch information
0 parents
commit a9f94da
Showing
82 changed files
with
1,575 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,31 @@ | ||
source 'http://rubygems.org' | ||
|
||
gem 'rails', '3.1.3' | ||
|
||
gem 'pg' | ||
|
||
gem 'ns-options' | ||
|
||
gem 'inherited_resources' | ||
|
||
gem 'draper' | ||
|
||
group :assets do | ||
gem 'sass-rails', '~> 3.1.5' | ||
gem 'coffee-rails', '~> 3.1.1' | ||
gem 'uglifier', '>= 1.0.3' | ||
end | ||
|
||
gem 'jquery-rails' | ||
gem "zurb-foundation" | ||
|
||
# Deploy with Capistrano | ||
# gem 'capistrano' | ||
|
||
# To use debugger | ||
# gem 'ruby-debug19', :require => 'ruby-debug' | ||
|
||
group :test do | ||
# Pretty printed test output | ||
gem 'turn', '~> 0.8.3', :require => false | ||
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,133 @@ | ||
GEM | ||
remote: http://rubygems.org/ | ||
specs: | ||
actionmailer (3.1.3) | ||
actionpack (= 3.1.3) | ||
mail (~> 2.3.0) | ||
actionpack (3.1.3) | ||
activemodel (= 3.1.3) | ||
activesupport (= 3.1.3) | ||
builder (~> 3.0.0) | ||
erubis (~> 2.7.0) | ||
i18n (~> 0.6) | ||
rack (~> 1.3.5) | ||
rack-cache (~> 1.1) | ||
rack-mount (~> 0.8.2) | ||
rack-test (~> 0.6.1) | ||
sprockets (~> 2.0.3) | ||
activemodel (3.1.3) | ||
activesupport (= 3.1.3) | ||
builder (~> 3.0.0) | ||
i18n (~> 0.6) | ||
activerecord (3.1.3) | ||
activemodel (= 3.1.3) | ||
activesupport (= 3.1.3) | ||
arel (~> 2.2.1) | ||
tzinfo (~> 0.3.29) | ||
activeresource (3.1.3) | ||
activemodel (= 3.1.3) | ||
activesupport (= 3.1.3) | ||
activesupport (3.1.3) | ||
multi_json (~> 1.0) | ||
ansi (1.4.1) | ||
arel (2.2.1) | ||
builder (3.0.0) | ||
coffee-rails (3.1.1) | ||
coffee-script (>= 2.2.0) | ||
railties (~> 3.1.0) | ||
coffee-script (2.2.0) | ||
coffee-script-source | ||
execjs | ||
coffee-script-source (1.1.3) | ||
draper (0.9.5) | ||
activesupport (>= 2.3.10) | ||
erubis (2.7.0) | ||
execjs (1.2.11) | ||
multi_json (~> 1.0) | ||
has_scope (0.5.1) | ||
hike (1.2.1) | ||
i18n (0.6.0) | ||
inherited_resources (1.3.0) | ||
has_scope (~> 0.5.0) | ||
responders (~> 0.6.0) | ||
jquery-rails (1.0.19) | ||
railties (~> 3.0) | ||
thor (~> 0.14) | ||
json (1.6.3) | ||
mail (2.3.0) | ||
i18n (>= 0.4.0) | ||
mime-types (~> 1.16) | ||
treetop (~> 1.4.8) | ||
mime-types (1.17.2) | ||
multi_json (1.0.4) | ||
ns-options (0.3.0) | ||
pg (0.11.0) | ||
polyglot (0.3.3) | ||
rack (1.3.5) | ||
rack-cache (1.1) | ||
rack (>= 0.4) | ||
rack-mount (0.8.3) | ||
rack (>= 1.0.0) | ||
rack-ssl (1.3.2) | ||
rack | ||
rack-test (0.6.1) | ||
rack (>= 1.0) | ||
rails (3.1.3) | ||
actionmailer (= 3.1.3) | ||
actionpack (= 3.1.3) | ||
activerecord (= 3.1.3) | ||
activeresource (= 3.1.3) | ||
activesupport (= 3.1.3) | ||
bundler (~> 1.0) | ||
railties (= 3.1.3) | ||
railties (3.1.3) | ||
actionpack (= 3.1.3) | ||
activesupport (= 3.1.3) | ||
rack-ssl (~> 1.3.2) | ||
rake (>= 0.8.7) | ||
rdoc (~> 3.4) | ||
thor (~> 0.14.6) | ||
rake (0.9.2.2) | ||
rdoc (3.11) | ||
json (~> 1.4) | ||
responders (0.6.4) | ||
sass (3.1.11) | ||
sass-rails (3.1.5) | ||
actionpack (~> 3.1.0) | ||
railties (~> 3.1.0) | ||
sass (~> 3.1.10) | ||
tilt (~> 1.3.2) | ||
sprockets (2.0.3) | ||
hike (~> 1.2) | ||
rack (~> 1.0) | ||
tilt (~> 1.1, != 1.3.0) | ||
thor (0.14.6) | ||
tilt (1.3.3) | ||
treetop (1.4.10) | ||
polyglot | ||
polyglot (>= 0.3.1) | ||
turn (0.8.3) | ||
ansi | ||
tzinfo (0.3.31) | ||
uglifier (1.1.0) | ||
execjs (>= 0.3.0) | ||
multi_json (>= 1.0.2) | ||
zurb-foundation (2.1.0) | ||
jquery-rails (~> 1.0) | ||
rails (~> 3.1.0) | ||
|
||
PLATFORMS | ||
ruby | ||
|
||
DEPENDENCIES | ||
coffee-rails (~> 3.1.1) | ||
draper | ||
inherited_resources | ||
jquery-rails | ||
ns-options | ||
pg | ||
rails (= 3.1.3) | ||
sass-rails (~> 3.1.5) | ||
turn (~> 0.8.3) | ||
uglifier (>= 1.0.3) | ||
zurb-foundation |
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 @@ | ||
# Gems Server | ||
|
||
A private gems server that provides the same API as rubygems.org. |
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,7 @@ | ||
#!/usr/bin/env rake | ||
# 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.expand_path('../config/application', __FILE__) | ||
|
||
GemsServer::Application.load_tasks |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 @@ | ||
# Place all the behaviors and hooks related to the matching controller here. | ||
# All this logic will automatically be available in application.js. | ||
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/ |
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 @@ | ||
// This is a manifest file that'll be compiled into including all the files listed below. | ||
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically | ||
// be included in the compiled file accessible from http://example.com/assets/application.js | ||
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the | ||
// the compiled file. | ||
// | ||
//= require jquery | ||
//= require jquery_ujs | ||
//= require foundation | ||
//= require_tree . |
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 @@ | ||
# Place all the behaviors and hooks related to the matching controller here. | ||
# All this logic will automatically be available in application.js. | ||
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/ |
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 @@ | ||
// Place all the styles related to the api/v0/specs controller here. | ||
// They will automatically be included in application.css. | ||
// You can use Sass (SCSS) here: http://sass-lang.com/ |
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,8 @@ | ||
/* | ||
* This is a manifest file that'll automatically include all the stylesheets available in this directory | ||
* and any sub-directories. You're free to add application-wide styles to this file and they'll appear at | ||
* the top of the compiled file, but it's generally better to create a new file per style scope. | ||
*= require_self | ||
*= require foundation | ||
*= require_tree . | ||
*/ |
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,30 @@ | ||
BODY { | ||
> DIV.container.top-bar { | ||
padding: 15px 20px 13px; | ||
background-color: #000; | ||
border-bottom: solid 4px #00A5FF; | ||
|
||
> DIV.row { | ||
> DIV.header { | ||
> H1 { | ||
font-size: 1.6rem; | ||
margin: 0; | ||
|
||
> A { | ||
color: #FFF; | ||
} | ||
} | ||
} | ||
> DIV.links { | ||
> STRONG.right { | ||
> A { | ||
color: #FFF; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
> DIV.container.main { | ||
|
||
} | ||
} |
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,65 @@ | ||
// Place all the styles related to the rubygems controller here. | ||
// They will automatically be included in application.css. | ||
// You can use Sass (SCSS) here: http://sass-lang.com/ | ||
BODY { | ||
> DIV.container.main { | ||
> SECTION.rubygems { | ||
> DIV.gems-list-container { | ||
margin: 25px 0; | ||
padding: 10px 0 15px; | ||
background-color: #EFEFEF; | ||
border: 5px solid #CCC; | ||
border-radius: 10px; | ||
-moz-border-radius: 10px; | ||
-webkit-border-radius: 10px; | ||
|
||
> DIV.title { | ||
> DIV.content.columns { | ||
> H1 { | ||
font-size: 4rem; | ||
margin: 0; | ||
} | ||
} | ||
} | ||
> DIV.entries { | ||
> DIV.content.columns { | ||
font-size: 1.5rem; | ||
} | ||
} | ||
> DIV.gems { | ||
margin: 10px 0; | ||
|
||
> DIV.content.columns { | ||
border: 1px solid #888; | ||
background-color: #FFF; | ||
|
||
> OL { | ||
list-style-type: none; | ||
padding: 10px 30px; | ||
margin: 0; | ||
|
||
> LI.rubygem { | ||
padding: 10px 0; | ||
border-bottom: 1px solid #CCC; | ||
|
||
> DIV.name-and-details { | ||
> DIV.name { | ||
|
||
} | ||
> DIV.details { | ||
SPAN.downloads { | ||
font-size: 1rem; | ||
} | ||
} | ||
} | ||
} | ||
> LI.rubygem:last-child { | ||
border: none; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
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,53 @@ | ||
class Api::V0::GemCuttersController < ApplicationController | ||
|
||
def create | ||
respond_to do |format| | ||
if self.build_resource.save | ||
format.any { redirect_to "/" } | ||
else | ||
format.any { render :action => "new" } | ||
end | ||
end | ||
end | ||
|
||
protected | ||
|
||
def build_resource | ||
@gem_cutter ||= end_of_association_chain.new | ||
end | ||
|
||
end | ||
|
||
=begin | ||
return "Please ensure #{File.expand_path(Geminabox.data)} is writable by the geminabox web server." unless File.writable? Geminabox.data | ||
unless params[:file] && (tmpfile = params[:file][:tempfile]) && (name = params[:file][:filename]) | ||
@error = "No file selected" | ||
return erb(:upload) | ||
end | ||
tmpfile.binmode | ||
Dir.mkdir(File.join(options.data, "gems")) unless File.directory? File.join(options.data, "gems") | ||
dest_filename = File.join(options.data, "gems", File.basename(name)) | ||
if Geminabox.disallow_replace? and File.exist?(dest_filename) | ||
existing_file_digest = Digest::SHA1.file(dest_filename).hexdigest | ||
tmpfile_digest = Digest::SHA1.file(tmpfile.path).hexdigest | ||
if existing_file_digest != tmpfile_digest | ||
return error_response(409, "Gem already exists, you must delete the existing version first.") | ||
else | ||
return [200, "Ignoring upload, you uploaded the same thing previously."] | ||
end | ||
end | ||
File.open(dest_filename, "wb") do |f| | ||
while blk = tmpfile.read(65536) | ||
f << blk | ||
end | ||
end | ||
reindex | ||
redirect "/" | ||
=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,11 @@ | ||
class Api::V0::SpecsController < ApplicationController | ||
|
||
def index | ||
send_file "/Users/jcr/Downloads/gems/specs.4.8.gz" | ||
end | ||
|
||
def prerelease | ||
send_file "/Users/jcr/Downloads/gems/prerelease_specs.4.8.gz" | ||
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,12 @@ | ||
class ApplicationController < ActionController::Base | ||
protect_from_forgery | ||
|
||
helper_method :view | ||
|
||
protected | ||
|
||
def view | ||
@view | ||
end | ||
|
||
end |
Oops, something went wrong.