jirify 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5528c8d48b61117388daf001e8035ea61d6e3ed7f91efb1083d1e2d04d94db7b
4
- data.tar.gz: fbe37f94e037385cc423df5bf27c9696ae807d0cb6263b070272fecc093e3ede
3
+ metadata.gz: bb864ea4f21727b0d27d658ea4d1d7a3f467c77fd111ba7bdb51881031f556f4
4
+ data.tar.gz: 72d83c118646336a85c1d51179ae9fb73f7d87589616d2782d74579353eff6b2
5
5
  SHA512:
6
- metadata.gz: 5c145893008fe97f50f744d010463ec9fd64cbd48d5f861160674789797de01eb3052beb8ef5f18b410d8df352e587f9031dbe71ee0e8f2d0611b8ee7662556d
7
- data.tar.gz: fbfdfb7d636c451a7e25d6f9fe52c19412bfc4e855c788a3dd744437522b2d66722df50cc1bc0563c82822fa4ebdeb5d15c4eb12c97a7fcf28b282f41b4b0f2a
6
+ metadata.gz: 928bc334c65df58a96a1be21ff1270f350c179036b197563e8079fdfd65a33024a475089d3c792e20d638c4f8cf11fdec00948ed94190f69941a8f1670c527df
7
+ data.tar.gz: e608dcca8d72e0827b815d6df53ccbdc33012f92906c55d8b05c73e960f5a90b73343c5bb0c21d5d1d0213d8173dec509f52a840f32a45df61de5f45e9412459
data/README.md CHANGED
@@ -5,3 +5,6 @@ A simple ruby gem that helps me work with jira
5
5
  1. Run `gem install jirify`.
6
6
  1. Execute `jira setup` and go through the setup process OR if you had the previous `config.yml` file you can just do `mv config.yml ~/.jirify`
7
7
  1. Execute `jira` and `jira <command> help` to learn about available commands.
8
+
9
+ # To Do
10
+ - Add ability to define mapping between custom statuses and custom transitions in config.
@@ -1,18 +1,3 @@
1
- module JIRA
2
- module Resource
3
- class Issue
4
- def transition!(transition)
5
- attrs = { transition: transition.id }.to_json
6
- client.send(:post, "#{url}/transitions", attrs)
7
- end
8
-
9
- def assign_to!(username)
10
- client.send(:put, "#{url}/assignee", { name: username }.to_json)
11
- end
12
- end
13
- end
14
- end
15
-
16
1
  module Jirify
17
2
  class Issue < Base
18
3
  class InvalidTransitionError < StandardError; end
@@ -0,0 +1,15 @@
1
+ module JIRA
2
+ module Resource
3
+ class Issue
4
+ def transition!(transition)
5
+ attrs = { transition: transition.id }.to_json
6
+ client.send(:post, "#{url}/transitions", attrs)
7
+ end
8
+
9
+ def assign_to!(username)
10
+ attrs = { name: username }.to_json
11
+ client.send(:put, "#{url}/assignee", attrs)
12
+ end
13
+ end
14
+ end
15
+ end
@@ -1,3 +1,3 @@
1
1
  module Jirify
2
- VERSION = '0.1.2'.freeze
2
+ VERSION = '0.1.3'.freeze
3
3
  end
data/lib/jirify.rb CHANGED
@@ -2,13 +2,17 @@ require 'thor'
2
2
  require 'jira-ruby'
3
3
  require 'colorize'
4
4
 
5
+ require 'jirify/version'
5
6
  require 'jirify/config'
7
+ require 'jirify/monkey_patches/jira_issue'
8
+
6
9
  require 'jirify/models/base'
7
10
  require 'jirify/models/status'
8
11
  require 'jirify/models/transition_list'
9
12
  require 'jirify/models/issue'
10
13
  require 'jirify/models/sprint'
11
14
  require 'jirify/models/project'
15
+
12
16
  require 'jirify/cli/setup'
13
17
  require 'jirify/cli/sprint'
14
18
  require 'jirify/cli/issue'
@@ -18,6 +22,11 @@ module Jirify
18
22
  class CLI < Thor
19
23
  class_option :verbose, type: :boolean, aliases: '-v', desc: 'Show more verbose information'
20
24
 
25
+ desc 'version', 'Prints Jirify version'
26
+ def version
27
+ puts "Current Jirify version: #{VERSION}"
28
+ end
29
+
21
30
  desc 'setup SUBCOMMAND', 'Jirify setup tools'
22
31
  subcommand 'setup', Subcommands::Setup
23
32
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jirify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Georgi Gardev
@@ -87,6 +87,7 @@ files:
87
87
  - lib/jirify/models/sprint.rb
88
88
  - lib/jirify/models/status.rb
89
89
  - lib/jirify/models/transition_list.rb
90
+ - lib/jirify/monkey_patches/jira_issue.rb
90
91
  - lib/jirify/version.rb
91
92
  homepage: https://github.com/GeorgeSG/jirify
92
93
  licenses: