space 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +52 -2
- data/TODO +1 -0
- data/lib/core_ext/enumerable/map_slice.rb +0 -1
- data/lib/core_ext/string/deansi.rb +1 -1
- data/lib/core_ext/string/wrap.rb +1 -2
- data/lib/space/action/handler.rb +3 -1
- data/lib/space/model/repo/git.rb +12 -12
- data/lib/space/version.rb +1 -1
- metadata +3 -2
data/README.md
CHANGED
@@ -1,5 +1,55 @@
|
|
1
1
|
# Space [![Build Status](https://secure.travis-ci.org/svenfuchs/space.png?branch=master)](http://travis-ci.org/svenfuchs/space)
|
2
2
|
|
3
|
-
|
3
|
+
Here's a screenshot of my setup (iterm, tmux, vim, space) for working on
|
4
|
+
[travis](http://github.com/travis-ci).
|
5
|
+
|
6
|
+
![tmux based travis workspace](http://img.skitch.com/20120410-d4qk8ce75h6x7i7g7i2cbtjnn8.png)
|
7
|
+
|
8
|
+
The thing on the right side is an iterm split pane running space. The main
|
9
|
+
screen is take by a tmux session that has a vim and a zsh pane. (I use an iterm
|
10
|
+
pane for space so that I can switch between tmux windows but keep the space
|
11
|
+
view.)
|
12
|
+
|
13
|
+
The space view gives an overview of:
|
14
|
+
|
15
|
+
* current branch
|
16
|
+
* current commit
|
17
|
+
* bundler local flag
|
18
|
+
* git status (clean, dirty, ahead)
|
19
|
+
* bundle status (`bundle check`)
|
20
|
+
* dependencies
|
21
|
+
|
22
|
+
One can easily see that:
|
23
|
+
|
24
|
+
* repos 1-5 are using the bundler local flag, while 6-7 are using remote
|
25
|
+
references
|
26
|
+
* repos 4, 6, 7 have dirty working directories
|
27
|
+
* repo 6 is 1 commit ahead of origin
|
28
|
+
* the bundle in repo 7 is not installed
|
29
|
+
|
30
|
+
Space checks for each dependency listed in a repo's Gemfile if the bundle is
|
31
|
+
locked to the hash that is currently checked out locally and display that
|
32
|
+
status information.
|
33
|
+
|
34
|
+
Also note that the repo numbers are referring to the tmux windows where
|
35
|
+
possible.
|
36
|
+
|
37
|
+
This screencast is from a very early version but still mostly valid. It also
|
38
|
+
demonstrates how screen can be used to run commands on multiple repositories at
|
39
|
+
once:
|
40
|
+
|
41
|
+
[![screencast](http://img.skitch.com/20120410-gyiprdiy8jyhwwp3pd4gafk3tu.png)](www.youtube.com/watch?v=NfYZysobsYo)
|
42
|
+
|
43
|
+
This is what the `~/.space/travis.yml` file for this setup looks like:
|
44
|
+
|
45
|
+
base_dir: ~/Development/projects/travis
|
46
|
+
repositories:
|
47
|
+
- travis-ci
|
48
|
+
- travis-hub
|
49
|
+
- travis-listener
|
50
|
+
- travis-core
|
51
|
+
- travis-support
|
52
|
+
- travis-worker
|
53
|
+
- travis-build
|
54
|
+
|
4
55
|
|
5
|
-
* warn if some but not all repos are set to local
|
data/lib/core_ext/string/wrap.rb
CHANGED
data/lib/space/action/handler.rb
CHANGED
data/lib/space/model/repo/git.rb
CHANGED
@@ -17,6 +17,14 @@ module Space
|
|
17
17
|
super(repo.path)
|
18
18
|
end
|
19
19
|
|
20
|
+
def branch
|
21
|
+
result(:branch) =~ /^\* (.+)/ && $1.strip
|
22
|
+
end
|
23
|
+
|
24
|
+
def commit
|
25
|
+
result(:commit) =~ /^commit (\S{7})/ && $1
|
26
|
+
end
|
27
|
+
|
20
28
|
def status
|
21
29
|
dirty? ? :dirty : (ahead? ? :ahead : :clean)
|
22
30
|
end
|
@@ -25,25 +33,17 @@ module Space
|
|
25
33
|
!clean?
|
26
34
|
end
|
27
35
|
|
28
|
-
def
|
29
|
-
|
36
|
+
def clean?
|
37
|
+
result(:status) =~ /working directory clean/m
|
30
38
|
end
|
31
39
|
|
32
|
-
def
|
33
|
-
|
40
|
+
def ahead?
|
41
|
+
ahead > 0
|
34
42
|
end
|
35
43
|
|
36
44
|
def ahead
|
37
45
|
result(:status) =~ /Your branch is ahead of .* by (\d+) commits?\./ ? $1.to_i : 0
|
38
46
|
end
|
39
|
-
|
40
|
-
def branch
|
41
|
-
result(:branch) =~ /^\* (.+)/ && $1.strip
|
42
|
-
end
|
43
|
-
|
44
|
-
def commit
|
45
|
-
result(:commit) =~ /^commit (\S{7})/ && $1
|
46
|
-
end
|
47
47
|
end
|
48
48
|
end
|
49
49
|
end
|
data/lib/space/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: space
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-04-
|
12
|
+
date: 2012-04-10 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: space.
|
15
15
|
email:
|
@@ -64,6 +64,7 @@ files:
|
|
64
64
|
- LICENSE
|
65
65
|
- Rakefile
|
66
66
|
- README.md
|
67
|
+
- TODO
|
67
68
|
- !binary |-
|
68
69
|
YmluL3NwYWNl
|
69
70
|
homepage: https://github.com/svenfuchs/space
|