toolmantim-bananajour 2.1.4 → 2.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Readme.md +3 -3
- data/bin/bananajour +4 -4
- data/lib/bananajour/commands.rb +4 -12
- data/lib/bananajour/version.rb +1 -1
- metadata +2 -2
data/Readme.md
CHANGED
@@ -24,10 +24,10 @@ Start it up:
|
|
24
24
|
|
25
25
|
bananajour
|
26
26
|
|
27
|
-
|
27
|
+
Go into an existing project and add it to bananajour:
|
28
28
|
|
29
29
|
cd ~/code/myproj
|
30
|
-
bananajour
|
30
|
+
bananajour add
|
31
31
|
|
32
32
|
Publish your codez:
|
33
33
|
|
@@ -36,7 +36,7 @@ Publish your codez:
|
|
36
36
|
Fire up [http://localhost:9331/](http://localhost:9331/) to check it out.
|
37
37
|
|
38
38
|
If somebody starts sharing a Bananajour repository with the same name on the
|
39
|
-
network
|
39
|
+
network it'll automatically show up in the network thanks to the wonder that is Bonjour.
|
40
40
|
|
41
41
|
For a list of all the commands:
|
42
42
|
|
data/bin/bananajour
CHANGED
@@ -17,8 +17,8 @@ when nil
|
|
17
17
|
Bananajour.advertise!
|
18
18
|
Process.wait
|
19
19
|
|
20
|
-
when "
|
21
|
-
repo = Bananajour.
|
20
|
+
when "add", "init"
|
21
|
+
repo = Bananajour.add!(ARGV[1] || File.expand_path("."))
|
22
22
|
|
23
23
|
when "remove", "rm"
|
24
24
|
name = ARGV[1]
|
@@ -43,9 +43,9 @@ Usage: #{File.basename($0)} [<command>]
|
|
43
43
|
|
44
44
|
Commands:
|
45
45
|
none - Start the web, git and bonjour serving
|
46
|
-
|
46
|
+
add [path] - Add an existing git repo to bananajour
|
47
47
|
remove <name> - Remove a repo
|
48
|
-
clone <url> [path] - Clone a remote repo and
|
48
|
+
clone <url> [path] - Clone a remote repo and add it to bananajour
|
49
49
|
help
|
50
50
|
version
|
51
51
|
HELP
|
data/lib/bananajour/commands.rb
CHANGED
@@ -26,7 +26,7 @@ module Bananajour::Commands
|
|
26
26
|
fork { Bananajour::Bonjour::Advertiser.new.go! }
|
27
27
|
end
|
28
28
|
|
29
|
-
def
|
29
|
+
def add!(dir, name = nil)
|
30
30
|
dir = Fancypath(dir)
|
31
31
|
|
32
32
|
unless dir.join(".git").directory?
|
@@ -70,19 +70,11 @@ module Bananajour::Commands
|
|
70
70
|
|
71
71
|
`git clone #{url} #{dir}`
|
72
72
|
if $? != 0
|
73
|
-
abort
|
73
|
+
abort "Failed to clone bananajour repository #{url} to #{dir}."
|
74
74
|
else
|
75
|
-
puts
|
76
|
-
|
75
|
+
puts "Bananajour repository #{url} cloned to #{dir}."
|
76
|
+
add!(dir, dir)
|
77
77
|
end
|
78
78
|
end
|
79
|
-
|
80
|
-
def clone_success_message(source_repo_url, repo_dirname)
|
81
|
-
"Bananajour repository #{source_repo_url} cloned to #{repo_dirname}."
|
82
|
-
end
|
83
|
-
|
84
|
-
def clone_failure_message(source_repo_url, repo_dirname)
|
85
|
-
"Failed to clone Bananajour repository #{source_repo_url} to #{repo_dirname}."
|
86
|
-
end
|
87
79
|
|
88
80
|
end
|
data/lib/bananajour/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: toolmantim-bananajour
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Lucas
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-06-
|
12
|
+
date: 2009-06-13 00:00:00 -07:00
|
13
13
|
default_executable: bananajour
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|