multipush 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -8,7 +8,15 @@ This is multipush, a nifty tool to safely back up your source code from multiple
8
8
 
9
9
  == FEATURES/PROBLEMS:
10
10
 
11
- Push multiple Git repos to one or more remotes.
11
+ You probably know the command:
12
+
13
+ $ git push origin master
14
+
15
+ You can use this just fine for one, maybe a couple of repos.
16
+
17
+ If you have more than a couple of repos, this becomes unmanageable.
18
+
19
+ This is where multipush comes in.
12
20
 
13
21
  == SYNOPSIS:
14
22
 
@@ -20,13 +28,14 @@ Push multiple Git repos to one or more remotes.
20
28
 
21
29
  == INSTALL:
22
30
 
23
- Create a config file multipush.yml in the directory above the directories that contain your source code.
24
- E.g. if you like to keep all your Ruby/Rails stuff in a folder called "ruby", place the multipush.yml in that folder.
31
+ Create a config file multipush.yml two directories above where your repos are.
32
+ You could make a different directory for each category, e.g. 'ruby', 'rails' or just put everything in one big directory.
25
33
 
26
- - ruby <--- put multipush.yml here
27
- \-- my_rails_project
28
- \-- my_ruby_project
29
- \-- another_git_project
34
+ - home <--- put multipush.yml here
35
+ - ruby
36
+ \-- my_rails_project
37
+ \-- my_ruby_project
38
+ \-- another_git_project
30
39
 
31
40
  For an example on how to set up the config file, check out the example file multipush.yml in the examples directory.
32
41
 
@@ -67,4 +76,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
67
76
  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
68
77
  CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
69
78
  TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
70
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
79
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -7,11 +7,13 @@ require 'yaml'
7
7
  # will not run on Windows. sorry.
8
8
  module Multipush
9
9
  class Base
10
+ attr_accessor :logfile
11
+
10
12
  def log(str)
11
13
  str = " [#{Time.now}] #{str}"
12
14
 
13
15
  puts str
14
- system("echo '#{str}' >> multipush.log")
16
+ system("echo '#{str}' >> #{@logfile}")
15
17
  end
16
18
 
17
19
  def my_system(cmd)
@@ -23,8 +25,9 @@ module Multipush
23
25
  end
24
26
 
25
27
  def go!(params = {})
28
+ @logfile = "#{Dir.pwd}/multipush.log"
26
29
  # clear log file
27
- system("cat /dev/null > multipush.log")
30
+ system("cat /dev/null > #{@logfile}")
28
31
 
29
32
  git_cmd = "git"
30
33
  remote_prefix = "multipush_"
data/lib/multipush.rb CHANGED
@@ -4,7 +4,7 @@ $:.unshift(File.dirname(__FILE__)) unless
4
4
  require 'multipush/base'
5
5
 
6
6
  module Multipush
7
- VERSION = '0.0.1'
7
+ VERSION = '0.0.2'
8
8
  end
9
9
 
10
10
  # gogogogogogogogogogogo
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: multipush
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: