git_agent 0.0.2 → 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 +20 -12
- data/bin/check_repo +5 -1
- data/lib/git_agent/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a2d46032c538c91dd9fb017480dd1a1c8f0472cb
|
4
|
+
data.tar.gz: 19405f9a6fb6ebb453412e7accec24c7a7cbb442
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a01186f092dd34f5fa44fed131f55ab740da6a805f360f37bb11880b70b244e600f41408cd2ea60cc13946dfd65e4a391e6ac4aebf63bf5db092d12a4f8fb265
|
7
|
+
data.tar.gz: 0ec228aac7ec1eb33a836dec12caab5d506508f7f9d955d8e9867cf6c63872725f7946d7e966a58be40063c2171b7ebc9f9b5c47115ffb197eb569500eb66fd6
|
data/README.md
CHANGED
@@ -1,24 +1,32 @@
|
|
1
1
|
# GitAgent
|
2
2
|
|
3
|
-
Command line utility tool to minitor git repository. If it finds new commits, it will send you an email to notify the changes.
|
3
|
+
Command line utility tool to minitor git repository. If it finds new commits, it will send you an email to notify the changes. GitAgent uses Gmail to send you the notification email, therefore the sender email must be Gmail.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
7
|
-
Add this line to your application's Gemfile:
|
8
|
-
|
9
|
-
gem 'git_agent'
|
10
|
-
|
11
|
-
And then execute:
|
12
|
-
|
13
|
-
$ bundle
|
14
|
-
|
15
|
-
Or install it yourself as:
|
16
|
-
|
17
7
|
$ gem install git_agent
|
18
8
|
|
19
9
|
## Usage
|
20
10
|
|
21
|
-
check_repo -t git@github.com:ungsophy/git_agent.git
|
11
|
+
check_repo -t git@github.com:ungsophy/git_agent.git \
|
12
|
+
-s foo@gmail.com \
|
13
|
+
-p 123123 \
|
14
|
+
-r bar@gmail.com \
|
15
|
+
-h https://github.com/ungsophy/git_agent
|
16
|
+
|
17
|
+
* ``-t`` The target repository that you want to monitor.
|
18
|
+
* ``-s`` Sender email address (must be Gmail).
|
19
|
+
* ``-p`` Sender password.
|
20
|
+
* ``-r`` Recipient email address (can be any email).
|
21
|
+
* ``-h`` The project home page. This parameter is optional.
|
22
|
+
|
23
|
+
Combine GitAgent with Cronjob
|
24
|
+
|
25
|
+
```
|
26
|
+
0 0 * * * /bin/bash -l -c 'check_repo -t git@github.com:ungsophy/git_agent.git -s foo@gmail.com -p 123123 -r bar@gmail.com -h https://github.com/ungsophy/git_agent'
|
27
|
+
```
|
28
|
+
|
29
|
+
The above example is checking ``ungsophy/git_agent`` repo every day.
|
22
30
|
|
23
31
|
## Contributing
|
24
32
|
|
data/bin/check_repo
CHANGED
@@ -25,12 +25,16 @@ OptionParser.new do |opts|
|
|
25
25
|
options.recipient_email = recipient_email
|
26
26
|
end
|
27
27
|
|
28
|
+
opts.on('-d', '--data-directory DATA_DIRECTORY', 'Directory where data is stored') do |data_dir|
|
29
|
+
options.data_dir = data_dir
|
30
|
+
end
|
31
|
+
|
28
32
|
opts.on('-h', '--homepage [HOMEPAGE]', 'Project home page') do |homepage|
|
29
33
|
options.homepage = homepage
|
30
34
|
end
|
31
35
|
end.parse!
|
32
36
|
|
33
|
-
GitAgent.data_directory =
|
37
|
+
GitAgent.data_directory = options.data_dir
|
34
38
|
GitAgent::Notification.config = {
|
35
39
|
sender_username: options.sender_email,
|
36
40
|
sender_password: options.sender_password,
|
data/lib/git_agent/version.rb
CHANGED