git-background 0.0.1 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +25 -2
- data/lib/git/background/cli.rb +1 -3
- data/lib/git/background/notifier_ext.rb +0 -0
- data/lib/git/background/runner.rb +7 -4
- data/lib/git/background/version.rb +1 -1
- metadata +13 -15
- data/lib/git/background.rb +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d180c18323e956ea775083911267f8141910404b
|
4
|
+
data.tar.gz: 14a197d3942328158dfcc465d11f4a24b365cc9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21962d90128365d10a5341a6b4769e043d3ae13f3721a6c9b6649797018a14f725a4ce716a5dfaade010c624995b642dd96f9fc628ed158316905eb05f486c58
|
7
|
+
data.tar.gz: d739da80d24d71e5e687e3b5f8f0b48371d39cfebbd15a9422985306b033e7add7391e064575954cf9edd6cf103f8f1406f640eac7c753966402d3d7cd94df70
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Git::Background
|
2
2
|
|
3
|
-
|
3
|
+
Execute git commands in background and notify the result. Executing in background is convenient in commands which take a while, like `git pull`, `git push` and so on. `git background` command is provided for the purpose.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -18,7 +18,26 @@ Or install it yourself as:
|
|
18
18
|
|
19
19
|
## Usage
|
20
20
|
|
21
|
-
|
21
|
+
Use `git background` command.
|
22
|
+
|
23
|
+
For example, `git push` in background:
|
24
|
+
|
25
|
+
git background push
|
26
|
+
|
27
|
+
You can specify the notification with option `--notifier=`.
|
28
|
+
For example, to notify with tmux:
|
29
|
+
|
30
|
+
git background --notifier=tmux push
|
31
|
+
|
32
|
+
Available notifiers are listed in [notifier gem](https://github.com/fnando/notifier) or `tmux` or `osx_notification`.
|
33
|
+
|
34
|
+
If you don't want to notify, use option `--no-notifier`.
|
35
|
+
|
36
|
+
git background --no-notifier push
|
37
|
+
|
38
|
+
Alias like `bg` is very useful.
|
39
|
+
|
40
|
+
git config --global alias.bg background
|
22
41
|
|
23
42
|
## Contributing
|
24
43
|
|
@@ -27,3 +46,7 @@ TODO: Write usage instructions here
|
|
27
46
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
28
47
|
4. Push to the branch (`git push origin my-new-feature`)
|
29
48
|
5. Create new Pull Request
|
49
|
+
|
50
|
+
## License
|
51
|
+
|
52
|
+
This gem is distributed under MIT license.
|
data/lib/git/background/cli.rb
CHANGED
File without changes
|
@@ -9,10 +9,13 @@ module Git
|
|
9
9
|
class Runner
|
10
10
|
|
11
11
|
def initialize notifier_name
|
12
|
-
|
12
|
+
case notifier_name
|
13
|
+
when String
|
13
14
|
notifier = Notifier::supported_notifier_from_name notifier_name
|
14
15
|
raise "#{notifier} is not supported" unless notifier
|
15
16
|
Notifier::default_notifier = notifier
|
17
|
+
when false
|
18
|
+
@no_notifier = true
|
16
19
|
end
|
17
20
|
end
|
18
21
|
|
@@ -21,10 +24,10 @@ module Git
|
|
21
24
|
result = `git #{ARGV.join ' '}`
|
22
25
|
Notifier::notify(
|
23
26
|
title: "git-background: #{$?.success? ? 'success' : 'failed'}",
|
24
|
-
message: result
|
25
|
-
|
27
|
+
message: result,
|
28
|
+
image: '' # why cannot be nilable???
|
29
|
+
) unless @no_notifier
|
26
30
|
end
|
27
31
|
end
|
28
32
|
end
|
29
33
|
end
|
30
|
-
|
metadata
CHANGED
@@ -1,69 +1,69 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git-background
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- rhysd
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.3'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.3'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: terminal-notifier
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - '>='
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: notifier
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - '>='
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
description: execute git command in background
|
@@ -74,14 +74,13 @@ executables:
|
|
74
74
|
extensions: []
|
75
75
|
extra_rdoc_files: []
|
76
76
|
files:
|
77
|
-
-
|
77
|
+
- .gitignore
|
78
78
|
- Gemfile
|
79
79
|
- LICENSE.txt
|
80
80
|
- README.md
|
81
81
|
- Rakefile
|
82
82
|
- bin/git-background
|
83
83
|
- git-background.gemspec
|
84
|
-
- lib/git/background.rb
|
85
84
|
- lib/git/background/cli.rb
|
86
85
|
- lib/git/background/notifier_ext.rb
|
87
86
|
- lib/git/background/notifier_ext/osx_notification.rb
|
@@ -98,12 +97,12 @@ require_paths:
|
|
98
97
|
- lib
|
99
98
|
required_ruby_version: !ruby/object:Gem::Requirement
|
100
99
|
requirements:
|
101
|
-
- -
|
100
|
+
- - '>='
|
102
101
|
- !ruby/object:Gem::Version
|
103
102
|
version: '0'
|
104
103
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
105
104
|
requirements:
|
106
|
-
- -
|
105
|
+
- - '>='
|
107
106
|
- !ruby/object:Gem::Version
|
108
107
|
version: '0'
|
109
108
|
requirements: []
|
@@ -114,4 +113,3 @@ specification_version: 4
|
|
114
113
|
summary: This gem provides `git background` command. git-background executes following
|
115
114
|
command with background and notify them using notification system.
|
116
115
|
test_files: []
|
117
|
-
has_rdoc:
|