Commit e93f1603 authored by Valera Sizov's avatar Valera Sizov

transition to gem git

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