Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i created this patch so the db defaults to mysql when not set #103

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ db/*.sqlite

builds/*
test/files/*

.rvmrc
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ gem "notifo"
gem "tinder"

case ENV["DB"]
when "mysql" then gem "mysql2", "~>0.2.0"
when "postgres" then gem "pg"
else gem "mysql2", "~>0.2.0"
end

group :development, :test do
Expand Down
2 changes: 2 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ GEM
mime-types (1.17.2)
mocha (0.9.12)
multipart-post (1.1.0)
mysql2 (0.2.18)
nokogiri (1.4.4)
notifo (0.1.0)
httparty (~> 0.4.5)
Expand Down Expand Up @@ -186,6 +187,7 @@ DEPENDENCIES
launchy
machinist
mocha
mysql2 (~> 0.2.0)
nokogiri
notifo
open4
Expand Down
1 change: 1 addition & 0 deletions app/views/layouts/application.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
%meta{:"http-equiv" => "Content-Type", :content => "text/html;charset=UTF-8"}
%meta{:name => "keywords", :content => "keywords"}
%meta{:name => "description", :content => "description"}
%link{:rel => 'shortcut icon', :href => image_path('favicon.ico'), :type => 'image/x-icon'}
%body{ :style => 'padding-top: 60px;' }
.navbar.navbar-fixed-top
.navbar-inner
Expand Down
22 changes: 12 additions & 10 deletions lib/big_tuna/vcs/subversion.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,31 @@ def self.supported?

def head_info
info = {}
command = "svn log -l 1"
command = "svn log -l 1 --xml"
begin
output = BigTuna::Runner.execute(source, command)
rescue BigTuna::Runner::Error => e
raise BigTuna::VCS::Error.new("Couldn't access repository log")
end
log = output.stdout[1].match(/(\S+) \| (\S+) \| (.+) \|/)
info[:commit] = log[1]
log = output.stdout.join.match(/revision="(\d+)"><author>(\S+)<\/author><date>(\S+)<\/date><msg>(.*)<\/msg>/)
info[:commit] = "r#{log[1]}"
info[:author] = log[2]
email = begin
YAML.load(File.read('config/email_addresses.yml'))[log[2]]
rescue
nil
end
info[:email] = email
info[:email] = log[2] # svn does not have email addresses associated
info[:committed_at] = Time.parse(log[3])
info[:commit_message] = output.stdout[3..-2]
info[:commit_message] = log[4]
[info, command]
end

def clone(where_to)
command = "svn checkout #{source} #{where_to}"
BigTuna::Runner.execute(Dir.pwd, command)
end

def update(where_to)
BigTuna::Runner.execute(where_to, 'svn st --no-ignore').stdout.each do |file|
FileUtils.rm_rf(File.join(where_to, file[1..-1].strip)) if %w(? I).include?(file[0..0])
end
BigTuna::Runner.execute(where_to, 'svn update')
end
end
end
Empty file removed public/favicon.ico
Empty file.
Binary file added public/images/favicon.ico
Binary file not shown.