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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d1bcd658d1e6069a9e308e0486cc29b96fab346c
4
- data.tar.gz: 4e1a9d8a07feca793154908d786a9b27493f89e2
3
+ metadata.gz: a2d46032c538c91dd9fb017480dd1a1c8f0472cb
4
+ data.tar.gz: 19405f9a6fb6ebb453412e7accec24c7a7cbb442
5
5
  SHA512:
6
- metadata.gz: 3b48df9f793b9e5f6ebf61e055d74c02b4a70e15ead8d22cdfc806a1920c42d343db40939c0d7828932d7dae80f7f8ed783a97f3e8e7f74fd2ae6d86f05dc06e
7
- data.tar.gz: 19c3c9cd6a3121a3e22f8cb8a5299706885f84fcc1b7cc9de8e238680935659aad3a6f15b1d503723ca79ec9f2e95a4ab457c402171ef05886b46ee98f9d0846
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 -s foo@gmail.com -p 123123 -r bar@gmail.com -h https://github.com/ungsophy/git_agent
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
 
@@ -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 = File.expand_path('../../data', __FILE__)
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,
@@ -1,3 +1,3 @@
1
1
  class GitAgent
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git_agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sophy Eung