git-harvest 0.1.3 → 0.1.4

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
  SHA256:
3
- metadata.gz: bbcc14654ced48d65ac8c82e73ae895927fd047eab3373ff6a905829c1c4f66e
4
- data.tar.gz: d86ed6bd2c6753b235502805594b9bb8b73adcebe1f360427354977cb89c8f39
3
+ metadata.gz: 3764242c2178c6b5eb728fb47bec8d4611072d50f97df8e9dfc083829d4cd2d7
4
+ data.tar.gz: 4fabb211aa28171823b6795730c6e9cbf4c609815adc5474afb0cc1dbbf926a1
5
5
  SHA512:
6
- metadata.gz: 8b35e692bdb24ca49613ffd1b8f5873b3e8bc0cdef1498e71a5495cba07051f9b7dbaf48896c32219112c0e1a64e7f50af302aee8a5679960fbf381e8d0f57c3
7
- data.tar.gz: 8658f385dc74b050b2e067db77101a1baba6f0db193eab4cbbc8da0ff02f84f0bf76f1163876aa705dd98ea305bc38c47285b123bc08b89a87c731649cf310d3
6
+ metadata.gz: 8e0bb74d158477a7e43fa6be085b6da4718c963c0d7c74fc96e06fe89c443f9868d2dfbef4e5b4307ef9bc79fca6a367ace17cdaa058e3c26b699f292b7fdb3a
7
+ data.tar.gz: bdc951ca3b0c22cad54bc2a7e84658bb65cc65328cba6da23637d024c9560783c8b7b3a90e48591779eb612182405927358f62a2e7bf29a20abb4d3b497334f4
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- git-harvest (0.1.2)
4
+ git-harvest (0.1.3)
5
5
  rest-client
6
6
  thor
7
7
 
data/README.md CHANGED
@@ -1,28 +1,24 @@
1
1
  # Harvest
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/harvest`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ Auto log GIT activity on Harvest.
6
4
 
7
5
  ## Installation
8
6
 
9
- Add this line to your application's Gemfile:
10
-
11
- ```ruby
12
- gem 'harvest'
13
- ```
7
+ $ gem install harvest
14
8
 
15
- And then execute:
9
+ ## Usage
16
10
 
17
- $ bundle
11
+ 1. Navigate to the project directory.
18
12
 
19
- Or install it yourself as:
13
+ 2. Initialize the harvest configuration by
20
14
 
21
- $ gem install harvest
15
+ ```bash
16
+ harvest init
17
+ ```
22
18
 
23
- ## Usage
19
+ 3. Enter all the prompts with correct credentials. Credential file is stored in `$ROOT/.harvest/config.json` file.
24
20
 
25
- TODO: Write usage instructions here
21
+ 4. Now the gem can start tracking on Harvest. When you want to start tracking, simply run `harvest start`
26
22
 
27
23
  ## Development
28
24
 
@@ -32,7 +28,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
32
28
 
33
29
  ## Contributing
34
30
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/harvest. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
31
+ Bug reports and pull requests are welcome on GitHub at https://github.com/abhinavmsra/harvest. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
36
32
 
37
33
  ## License
38
34
 
data/lib/harvest.rb CHANGED
@@ -27,6 +27,8 @@ module Harvest
27
27
 
28
28
  vcs_instance = Harvest::Vcs.new(config['jira']['project_code'])
29
29
 
30
+ return if vcs_instance.ticket_id.nil?
31
+
30
32
  issue_tracker = Harvest::IssueTracker.new(
31
33
  config: config['jira'],
32
34
  task_identifier: vcs_instance.ticket_id
data/lib/harvest/vcs.rb CHANGED
@@ -15,6 +15,8 @@ module Harvest
15
15
 
16
16
  def ticket_id
17
17
  branch_names = current_branch.gsub(/[^0-9a-z]/i, ' ').split
18
+
19
+ return nil if branch_names.index(project_code).nil?
18
20
 
19
21
  branch_names[branch_names.index(project_code)+1]
20
22
  end
@@ -1,3 +1,3 @@
1
1
  module Harvest
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-harvest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Abhinav Mishra