Commit e93f1603 authored by Valera Sizov's avatar Valera Sizov

transition to gem git

parent b19a04f5
......@@ -14,12 +14,11 @@ gem 'six'
gem 'therubyracer'
gem 'faker'
gem 'seed-fu', :branch => 'rails-3-1', :git => 'git://github.com/mbleigh/seed-fu.git'
gem "lockfile"
gem "inifile"
gem "net-ssh"
gem "albino", :git => "git://github.com/randx/albino.git"
gem "kaminari"
gem "thin"
gem "git"
group :assets do
gem 'sass-rails', " ~> 3.1.0"
......
......@@ -97,6 +97,7 @@ GEM
faker (0.9.5)
i18n (~> 0.4)
ffi (1.0.9)
git (1.2.5)
grit (2.4.1)
diff-lcs (~> 1.1)
mime-types (~> 1.15)
......@@ -121,14 +122,12 @@ GEM
libv8 (3.3.10.2)
linecache19 (0.5.12)
ruby_core_source (>= 0.1.4)
lockfile (1.4.3)
mail (2.3.0)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.16)
multi_json (1.0.3)
net-ssh (2.2.1)
nokogiri (1.5.0)
orm_adapter (0.0.5)
polyglot (0.3.2)
......@@ -247,14 +246,13 @@ DEPENDENCIES
database_cleaner
devise (= 1.4.7)
faker
git
grit
haml-rails
inifile
jquery-rails
kaminari
launchy
lockfile
net-ssh
rails (= 3.1.0)
rails-footnotes (>= 3.7.5.rc4)
rspec-rails
......
require 'lockfile'
require 'inifile'
require 'net/ssh'
class Gitosis
......@@ -11,14 +9,13 @@ class Gitosis
Dir.mkdir @local_dir
# clone repo
`git clone #{GITOSIS['admin_uri']} #{@local_dir}/gitosis`
@repo = Git.clone(GITOSIS['admin_uri'], "#{@local_dir}/gitosis")
end
def push
# add, commit, push, and remove local tmp dir
`cd #{File.join(@local_dir,'gitosis')} ; git add keydir/* gitosis.conf`
`cd #{File.join(@local_dir,'gitosis')} ; git commit -a -m 'updated by Gitlab Gitosis'`
`cd #{File.join(@local_dir,'gitosis')} ; git push`
@repo.add('.')
@repo.commit_all "Gitlab"
@repo.push
# remove local copy
`rm -Rf #{@local_dir}`
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment