jirawatch 0.5.0 → 0.5.1

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: c965bdb26440e6266fca7588c845a7d503c521c13be94b08ffab620a38b2e688
4
- data.tar.gz: c89a41b612756935fe8e8c949a90ef6d7b0892f8ac3025464d8080a231663a86
3
+ metadata.gz: 14f6e70c7686c5e54624e3664ddca77542dceff8e01a975fcab59ce1ca08da1c
4
+ data.tar.gz: 88324f31b5f67c26ad73ecc5bd3c339647f30699cd2982af8d4e8415ed8f6849
5
5
  SHA512:
6
- metadata.gz: 6fa70276fb54471d08f71a243c5307add438b37a4d936a6cad3aaa05c640ba01d9802e295603496d765241f1981f28e36d0bb1570f99815fc679ee4b4e25f2fc
7
- data.tar.gz: 55813d7664bb6fb4305de4ab2b9593f913f59006786b1f5baeac7b298e573d47412663a2c20cea13f425b01700e13d0482bc98eab57853f687aafa0d00c09b81
6
+ metadata.gz: f8845da3a3e0b5b51dc06e4327d0628dfd4a717be460e4327c3147483c736111e541f313a7386318bf122f4550610e9d0490ff38aaf52ef9d6c146e9f407483e
7
+ data.tar.gz: 98a54d526ec3a741a78cc64122bd2e5c38d04676091ae42aec88e6a2ce5bb2da3de51441e1c53c522d455b81f188cf6be668c7cd085278f0003388bc68f998ae
data/README.md CHANGED
@@ -8,14 +8,21 @@ After that, jirawatch will start tracking your time and, once you're done, you c
8
8
  If you need to stop tracking time, just press `Ctrl-p` and then press it again to resume.
9
9
 
10
10
  ## Installation
11
+ There's no install script right now unfortunately (it will be coming though!).
12
+ For the time being, you need to install Ruby (2.7.0 was used do develop this gem but it should work from 2.1.0 onwards) using [rbenv](https://github.com/rbenv/rbenv).
11
13
 
12
- ### Gem
14
+ As a side note, I highly discourage installing Ruby without rbenv and installing rbenv from a package manager (reason is that rbenv packages are severely outdated most of the time), unless you know what you're doing of course!
13
15
 
14
- Simply run
16
+ After that, clone this repository and build this gem using:
17
+ ```
18
+ gem build jirawatch.gemspec
19
+ ```
20
+ and install it with:
15
21
  ```
16
- gem install jirawatch
22
+ gem install jirawatch-<gem-version>.gem
17
23
  ```
18
- And you're good to go!
24
+
25
+ You should now be good to go!
19
26
 
20
27
  ### With Docker/Podman
21
28
 
@@ -38,24 +45,6 @@ alias jirawatch="docker run --rm -it -v${HOME}/.jirawatch:/root/.jirawatch -v/et
38
45
  ```
39
46
  This will ensure persistence and will not modify your machine with additional packages ;)
40
47
 
41
- ### Manually
42
-
43
- There's no install script right now unfortunately (it will be coming though!).
44
- For the time being, you need to install Ruby (2.7.0 was used do develop this gem but it should work from 2.1.0 onwards) using [rbenv](https://github.com/rbenv/rbenv).
45
-
46
- As a side note, I highly discourage installing Ruby without rbenv and installing rbenv from a package manager (reason is that rbenv packages are severely outdated most of the time), unless you know what you're doing of course!
47
-
48
- After that, clone this repository and build this gem using:
49
- ```
50
- gem build jirawatch.gemspec
51
- ```
52
- and install it with:
53
- ```
54
- gem install jirawatch-<gem-version>.gem
55
- ```
56
-
57
- You should now be good to go!
58
-
59
48
  ## How to use
60
49
  As I stated before, this is not a complex tool! There are a few commands implemented as of right now:
61
50
  ```
@@ -27,10 +27,10 @@ module Jirawatch
27
27
  tracking_restarted_at = tracking_started_at.to_i
28
28
  partial_time_spent = 0
29
29
 
30
- worked_hours = (issue.attrs["fields"]["timetracking"]["timeSpentSeconds"]/60)/60
31
- worked_minutes = (issue.attrs["fields"]["timetracking"]["timeSpentSeconds"]/60)%60
32
- estimate_hours = (issue.attrs["fields"]["timetracking"]["originalEstimateSeconds"]/60)/60
33
- estimate_minutes = (issue.attrs["fields"]["timetracking"]["originalEstimateSeconds"]/60)%60
30
+ worked_hours = ((issue.attrs["fields"]["timetracking"]["timeSpentSeconds"].presence || 0)/60)/60
31
+ worked_minutes = ((issue.attrs["fields"]["timetracking"]["timeSpentSeconds"].presence || 0)/60)%60
32
+ estimate_hours = ((issue.attrs["fields"]["timetracking"]["originalEstimateSeconds"].presence || 0)/60)/60
33
+ estimate_minutes = ((issue.attrs["fields"]["timetracking"]["originalEstimateSeconds"].presence || 0)/60)%60
34
34
  puts Jirawatch.strings.tracking_cli_name % [issue_key, issue.attrs["fields"]["summary"]]
35
35
  puts Jirawatch.strings.tracking_cli_time % [tracking_started_at.strftime("%Y-%m-%d %H:%M:%S"), worked_hours, worked_minutes, estimate_hours, estimate_minutes]
36
36
  puts Jirawatch.strings.tracking_cli_inputs
@@ -1,5 +1,5 @@
1
1
  module Jirawatch
2
2
  module Info
3
- VERSION='0.5.0'.freeze
3
+ VERSION='0.5.1'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jirawatch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - apontini
@@ -60,7 +60,6 @@ extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
62
  - ".github/workflows/gem-push-gpr.yml"
63
- - ".github/workflows/gem-push-rubygems.yml"
64
63
  - ".gitignore"
65
64
  - Dockerfile
66
65
  - Gemfile
@@ -1,22 +0,0 @@
1
- name: Ruby Gem on Rubygems
2
-
3
- on:
4
- push:
5
- tags:
6
- - 'v*'
7
-
8
- jobs:
9
- build:
10
- name: Build + Publish
11
- runs-on: ubuntu-latest
12
-
13
- steps:
14
- - uses: actions/checkout@v1
15
-
16
- - name: Release Gem
17
- if: contains(github.ref, 'refs/tags/v')
18
- uses: cadwallion/publish-rubygems-action@master
19
- env:
20
- GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
21
- RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_API_KEY}}
22
- RELEASE_COMMAND: rake release