easyoperate 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Manifest +1 -0
- data/easyoperate.gemspec +4 -4
- data/lib/eo/repository.rb +1 -1
- data/lib/eo/scm/git-svn.rb +26 -0
- data/lib/version.rb +1 -1
- metadata +4 -2
data/Manifest
CHANGED
data/easyoperate.gemspec
CHANGED
@@ -2,17 +2,17 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{easyoperate}
|
5
|
-
s.version = "0.6.
|
5
|
+
s.version = "0.6.1"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Jinzhu Zhang"]
|
9
|
-
s.date = %q{2009-05-
|
9
|
+
s.date = %q{2009-05-27}
|
10
10
|
s.default_executable = %q{eo}
|
11
11
|
s.description = %q{Eo_oE}
|
12
12
|
s.email = %q{wosmvp@gmail.com}
|
13
13
|
s.executables = ["eo"]
|
14
|
-
s.extra_rdoc_files = ["bin/eo", "lib/version.rb", "lib/eo.rb", "lib/eo/scm/git.rb", "lib/eo/scm/svn.rb", "lib/eo/eo.rb", "lib/eo/repository.rb", "lib/eo/gem.rb", "README.rdoc"]
|
15
|
-
s.files = ["Manifest", "test/test_helper.rb", "test/test_eo_cli.rb", "test/test_easyoperate.rb", "bin/eo", "Rakefile", "History.txt", "lib/version.rb", "lib/eo.rb", "lib/eo/scm/git.rb", "lib/eo/scm/svn.rb", "lib/eo/eo.rb", "lib/eo/repository.rb", "lib/eo/gem.rb", "README.rdoc", "easyoperate.gemspec"]
|
14
|
+
s.extra_rdoc_files = ["bin/eo", "lib/version.rb", "lib/eo.rb", "lib/eo/scm/git-svn.rb", "lib/eo/scm/git.rb", "lib/eo/scm/svn.rb", "lib/eo/eo.rb", "lib/eo/repository.rb", "lib/eo/gem.rb", "README.rdoc"]
|
15
|
+
s.files = ["Manifest", "test/test_helper.rb", "test/test_eo_cli.rb", "test/test_easyoperate.rb", "bin/eo", "Rakefile", "History.txt", "lib/version.rb", "lib/eo.rb", "lib/eo/scm/git-svn.rb", "lib/eo/scm/git.rb", "lib/eo/scm/svn.rb", "lib/eo/eo.rb", "lib/eo/repository.rb", "lib/eo/gem.rb", "README.rdoc", "easyoperate.gemspec"]
|
16
16
|
s.has_rdoc = true
|
17
17
|
s.homepage = %q{http://www.zhangjinzhu.com}
|
18
18
|
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Easyoperate", "--main", "README.rdoc"]
|
data/lib/eo/repository.rb
CHANGED
@@ -14,7 +14,7 @@ class Repository
|
|
14
14
|
begin
|
15
15
|
scm = opt['scm'] || 'git'
|
16
16
|
require "scm/#{scm.downcase}"
|
17
|
-
extend eval "Scm::#{scm.capitalize.gsub(/-(\w)
|
17
|
+
extend eval "Scm::#{scm.capitalize.gsub(/-(\w)/) { $1.to_s.upcase}}"
|
18
18
|
rescue LoadError
|
19
19
|
puts <<-DOC.gsub(/^(\s*\|)/,'')
|
20
20
|
|\e[33m#{self._name_}\e[0m
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module Scm
|
2
|
+
module GitSvn
|
3
|
+
def init
|
4
|
+
system("git svn clone #{self.repo} #{self.path}")
|
5
|
+
end
|
6
|
+
|
7
|
+
def update
|
8
|
+
old_commit = now_commit
|
9
|
+
system("git svn rebase")
|
10
|
+
new_commit = now_commit
|
11
|
+
if new_commit != old_commit && self.autorun
|
12
|
+
self.autorun.split(';').each do |x|
|
13
|
+
eval x
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def push
|
19
|
+
system("git svn dcommit")
|
20
|
+
end
|
21
|
+
|
22
|
+
def now_commit
|
23
|
+
return `git log --pretty=format:%H -1`
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: easyoperate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jinzhu Zhang
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-05-
|
12
|
+
date: 2009-05-27 00:00:00 +08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -23,6 +23,7 @@ extra_rdoc_files:
|
|
23
23
|
- bin/eo
|
24
24
|
- lib/version.rb
|
25
25
|
- lib/eo.rb
|
26
|
+
- lib/eo/scm/git-svn.rb
|
26
27
|
- lib/eo/scm/git.rb
|
27
28
|
- lib/eo/scm/svn.rb
|
28
29
|
- lib/eo/eo.rb
|
@@ -39,6 +40,7 @@ files:
|
|
39
40
|
- History.txt
|
40
41
|
- lib/version.rb
|
41
42
|
- lib/eo.rb
|
43
|
+
- lib/eo/scm/git-svn.rb
|
42
44
|
- lib/eo/scm/git.rb
|
43
45
|
- lib/eo/scm/svn.rb
|
44
46
|
- lib/eo/eo.rb
|