terjira 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.codeclimate.yml +13 -0
- data/.gitignore +52 -0
- data/.rspec +2 -0
- data/.rubocop.yml +26 -0
- data/.travis.yml +20 -0
- data/CODE_OF_CONDUCT.md +49 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +104 -0
- data/LICENSE.txt +21 -0
- data/README.md +47 -0
- data/Rakefile +10 -0
- data/Vagrantfile +26 -0
- data/bin/console +14 -0
- data/bin/jira +13 -0
- data/bin/setup +8 -0
- data/lib/terjira.rb +38 -0
- data/lib/terjira/base_cli.rb +36 -0
- data/lib/terjira/board_cli.rb +12 -0
- data/lib/terjira/client/agile.rb +41 -0
- data/lib/terjira/client/auth_option_builder.rb +42 -0
- data/lib/terjira/client/base.rb +72 -0
- data/lib/terjira/client/board.rb +20 -0
- data/lib/terjira/client/field.rb +17 -0
- data/lib/terjira/client/issue.rb +110 -0
- data/lib/terjira/client/jql_query_builer.rb +25 -0
- data/lib/terjira/client/priority.rb +14 -0
- data/lib/terjira/client/project.rb +25 -0
- data/lib/terjira/client/rapid_view.rb +8 -0
- data/lib/terjira/client/resolution.rb +14 -0
- data/lib/terjira/client/sprint.rb +28 -0
- data/lib/terjira/client/status.rb +15 -0
- data/lib/terjira/client/user.rb +44 -0
- data/lib/terjira/ext/jira_ruby.rb +70 -0
- data/lib/terjira/ext/tty_prompt.rb +34 -0
- data/lib/terjira/issue_cli.rb +110 -0
- data/lib/terjira/option_support/option_selector.rb +167 -0
- data/lib/terjira/option_support/resource_store.rb +45 -0
- data/lib/terjira/option_support/shared_options.rb +70 -0
- data/lib/terjira/option_supportable.rb +80 -0
- data/lib/terjira/presenters/board_presenter.rb +20 -0
- data/lib/terjira/presenters/common_presenter.rb +53 -0
- data/lib/terjira/presenters/issue_presenter.rb +175 -0
- data/lib/terjira/presenters/project_presenter.rb +69 -0
- data/lib/terjira/presenters/sprint_presenter.rb +68 -0
- data/lib/terjira/project_cli.rb +25 -0
- data/lib/terjira/rapidview_cli.rb +6 -0
- data/lib/terjira/sprint_cli.rb +58 -0
- data/lib/terjira/utils/file_cache.rb +110 -0
- data/lib/terjira/version.rb +3 -0
- data/terjira.gemspec +38 -0
- metadata +282 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 3fcee09f74c90df7c1d7a143e64b02b8e7adcd0e
|
4
|
+
data.tar.gz: 9c715287c157198d0c2cff1b13113a1c6b20e597
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 0e5dab32cd87bdc4e0af210719616f1b11ad26d8f81e29c52581b99a861a8710a12c382b23c8ad23d289ec01f19932fa28fa28cda57481fa119181bf8c95b0dd
|
7
|
+
data.tar.gz: 1471167d13dbc2c63668c39389976c7bfc80ad5ca69f104f1bf71f7256b62b39568c2bc2a9adb8f05c9acf18f1449697e488e535355bd1dc0cd18415e0ebe14a
|
data/.codeclimate.yml
ADDED
data/.gitignore
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
.vagrant
|
2
|
+
|
3
|
+
*.gem
|
4
|
+
*.rbc
|
5
|
+
/.config
|
6
|
+
/coverage/
|
7
|
+
/InstalledFiles
|
8
|
+
/pkg/
|
9
|
+
/spec/reports/
|
10
|
+
/spec/examples.txt
|
11
|
+
/test/tmp/
|
12
|
+
/test/version_tmp/
|
13
|
+
/tmp/
|
14
|
+
|
15
|
+
# Used by dotenv library to load environment variables.
|
16
|
+
# .env
|
17
|
+
|
18
|
+
## Specific to RubyMotion:
|
19
|
+
.dat*
|
20
|
+
.repl_history
|
21
|
+
build/
|
22
|
+
*.bridgesupport
|
23
|
+
build-iPhoneOS/
|
24
|
+
build-iPhoneSimulator/
|
25
|
+
|
26
|
+
## Specific to RubyMotion (use of CocoaPods):
|
27
|
+
#
|
28
|
+
# We recommend against adding the Pods directory to your .gitignore. However
|
29
|
+
# you should judge for yourself, the pros and cons are mentioned at:
|
30
|
+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
|
31
|
+
#
|
32
|
+
# vendor/Pods/
|
33
|
+
|
34
|
+
## Documentation cache and generated files:
|
35
|
+
/.yardoc/
|
36
|
+
/_yardoc/
|
37
|
+
/doc/
|
38
|
+
/rdoc/
|
39
|
+
|
40
|
+
## Environment normalization:
|
41
|
+
/.bundle/
|
42
|
+
/vendor/bundle
|
43
|
+
/lib/bundler/man/
|
44
|
+
|
45
|
+
# for a library or gem, you might want to ignore these files since the code is
|
46
|
+
# intended to run in multiple environments; otherwise, check them in:
|
47
|
+
# Gemfile.lock
|
48
|
+
# .ruby-version
|
49
|
+
# .ruby-gemset
|
50
|
+
|
51
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
52
|
+
.rvmrc
|
data/.rspec
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
AllCops:
|
2
|
+
Exclude:
|
3
|
+
- '*.gemspec'
|
4
|
+
|
5
|
+
Style/Documentation:
|
6
|
+
Enabled: false
|
7
|
+
Style/EachWithObject:
|
8
|
+
Enabled: false
|
9
|
+
|
10
|
+
Lint/AssignmentInCondition:
|
11
|
+
Enabled: false
|
12
|
+
|
13
|
+
Metrics/BlockLength:
|
14
|
+
Enabled: false
|
15
|
+
|
16
|
+
Metrics/ModuleLength:
|
17
|
+
Enabled: false
|
18
|
+
|
19
|
+
Metrics/AbcSize:
|
20
|
+
Max: 20
|
21
|
+
|
22
|
+
Metrics/MethodLength:
|
23
|
+
Max: 20
|
24
|
+
|
25
|
+
Metrics/LineLength:
|
26
|
+
Max: 100
|
data/.travis.yml
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
language: ruby
|
2
|
+
|
3
|
+
addons:
|
4
|
+
code_climate:
|
5
|
+
repo_token: 98123461fbec752591c40e3e7af46bcdc6576723bfac2d89c084bfae989e4db3
|
6
|
+
|
7
|
+
rvm:
|
8
|
+
- 1.9.3
|
9
|
+
- 2.0.0
|
10
|
+
- 2.1.0
|
11
|
+
- 2.2.0
|
12
|
+
- 2.3.0
|
13
|
+
|
14
|
+
before_install:
|
15
|
+
- gem install i18n --no-rdoc --no-ri --no-document
|
16
|
+
|
17
|
+
script: bundle exec rspec spec/
|
18
|
+
|
19
|
+
after_success:
|
20
|
+
- bundle exec codeclimate-test-reporter
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
# Contributor Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, and in the interest of
|
4
|
+
fostering an open and welcoming community, we pledge to respect all people who
|
5
|
+
contribute through reporting issues, posting feature requests, updating
|
6
|
+
documentation, submitting pull requests or patches, and other activities.
|
7
|
+
|
8
|
+
We are committed to making participation in this project a harassment-free
|
9
|
+
experience for everyone, regardless of level of experience, gender, gender
|
10
|
+
identity and expression, sexual orientation, disability, personal appearance,
|
11
|
+
body size, race, ethnicity, age, religion, or nationality.
|
12
|
+
|
13
|
+
Examples of unacceptable behavior by participants include:
|
14
|
+
|
15
|
+
* The use of sexualized language or imagery
|
16
|
+
* Personal attacks
|
17
|
+
* Trolling or insulting/derogatory comments
|
18
|
+
* Public or private harassment
|
19
|
+
* Publishing other's private information, such as physical or electronic
|
20
|
+
addresses, without explicit permission
|
21
|
+
* Other unethical or unprofessional conduct
|
22
|
+
|
23
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
24
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
25
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
26
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
27
|
+
threatening, offensive, or harmful.
|
28
|
+
|
29
|
+
By adopting this Code of Conduct, project maintainers commit themselves to
|
30
|
+
fairly and consistently applying these principles to every aspect of managing
|
31
|
+
this project. Project maintainers who do not follow or enforce the Code of
|
32
|
+
Conduct may be permanently removed from the project team.
|
33
|
+
|
34
|
+
This code of conduct applies both within project spaces and in public spaces
|
35
|
+
when an individual is representing the project or its community.
|
36
|
+
|
37
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
38
|
+
reported by contacting a project maintainer at keepcosmos@gmail.com. All
|
39
|
+
complaints will be reviewed and investigated and will result in a response that
|
40
|
+
is deemed necessary and appropriate to the circumstances. Maintainers are
|
41
|
+
obligated to maintain confidentiality with regard to the reporter of an
|
42
|
+
incident.
|
43
|
+
|
44
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
45
|
+
version 1.3.0, available at
|
46
|
+
[http://contributor-covenant.org/version/1/3/0/][version]
|
47
|
+
|
48
|
+
[homepage]: http://contributor-covenant.org
|
49
|
+
[version]: http://contributor-covenant.org/version/1/3/0/
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,104 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
terjira (0.1.0)
|
5
|
+
activesupport (~> 4.0)
|
6
|
+
jira-ruby (~> 1.1)
|
7
|
+
pastel (~> 0.6.1)
|
8
|
+
thor (~> 0.19)
|
9
|
+
tty-prompt (~> 0.8.0)
|
10
|
+
tty-spinner (~> 0.4.1)
|
11
|
+
tty-table (~> 0.6.0)
|
12
|
+
|
13
|
+
GEM
|
14
|
+
remote: https://rubygems.org/
|
15
|
+
specs:
|
16
|
+
activesupport (4.2.7.1)
|
17
|
+
i18n (~> 0.7)
|
18
|
+
json (~> 1.7, >= 1.7.7)
|
19
|
+
minitest (~> 5.1)
|
20
|
+
thread_safe (~> 0.3, >= 0.3.4)
|
21
|
+
tzinfo (~> 1.1)
|
22
|
+
codeclimate-test-reporter (1.0.3)
|
23
|
+
simplecov
|
24
|
+
coderay (1.1.1)
|
25
|
+
diff-lcs (1.2.5)
|
26
|
+
docile (1.1.5)
|
27
|
+
equatable (0.5.0)
|
28
|
+
i18n (0.7.0)
|
29
|
+
jira-ruby (1.1.3)
|
30
|
+
activesupport
|
31
|
+
oauth (~> 0.5, >= 0.5.0)
|
32
|
+
json (1.8.3)
|
33
|
+
method_source (0.8.2)
|
34
|
+
minitest (5.10.1)
|
35
|
+
necromancer (0.3.0)
|
36
|
+
oauth (0.5.1)
|
37
|
+
pastel (0.6.1)
|
38
|
+
equatable (~> 0.5.0)
|
39
|
+
tty-color (~> 0.3.0)
|
40
|
+
pry (0.10.4)
|
41
|
+
coderay (~> 1.1.0)
|
42
|
+
method_source (~> 0.8.1)
|
43
|
+
slop (~> 3.4)
|
44
|
+
rake (10.5.0)
|
45
|
+
rspec (3.5.0)
|
46
|
+
rspec-core (~> 3.5.0)
|
47
|
+
rspec-expectations (~> 3.5.0)
|
48
|
+
rspec-mocks (~> 3.5.0)
|
49
|
+
rspec-core (3.5.4)
|
50
|
+
rspec-support (~> 3.5.0)
|
51
|
+
rspec-expectations (3.5.0)
|
52
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
53
|
+
rspec-support (~> 3.5.0)
|
54
|
+
rspec-mocks (3.5.0)
|
55
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
56
|
+
rspec-support (~> 3.5.0)
|
57
|
+
rspec-support (3.5.0)
|
58
|
+
simplecov (0.11.2)
|
59
|
+
docile (~> 1.1.0)
|
60
|
+
json (~> 1.8)
|
61
|
+
simplecov-html (~> 0.10.0)
|
62
|
+
simplecov-html (0.10.0)
|
63
|
+
slop (3.6.0)
|
64
|
+
thor (0.19.4)
|
65
|
+
thread_safe (0.3.5)
|
66
|
+
tty-color (0.3.0)
|
67
|
+
tty-cursor (0.3.0)
|
68
|
+
tty-prompt (0.8.0)
|
69
|
+
necromancer (~> 0.3.0)
|
70
|
+
pastel (~> 0.6.0)
|
71
|
+
tty-cursor (~> 0.3.0)
|
72
|
+
wisper (~> 1.6.1)
|
73
|
+
tty-screen (0.5.0)
|
74
|
+
tty-spinner (0.4.1)
|
75
|
+
tty-table (0.6.0)
|
76
|
+
equatable (~> 0.5.0)
|
77
|
+
necromancer (~> 0.3.0)
|
78
|
+
pastel (~> 0.6.0)
|
79
|
+
tty-screen (~> 0.5.0)
|
80
|
+
unicode-display_width (~> 1.1.0)
|
81
|
+
verse (~> 0.5.0)
|
82
|
+
tzinfo (1.2.2)
|
83
|
+
thread_safe (~> 0.1)
|
84
|
+
unicode-display_width (1.1.2)
|
85
|
+
unicode_utils (1.4.0)
|
86
|
+
verse (0.5.0)
|
87
|
+
unicode-display_width (~> 1.1.0)
|
88
|
+
unicode_utils (~> 1.4.0)
|
89
|
+
wisper (1.6.1)
|
90
|
+
|
91
|
+
PLATFORMS
|
92
|
+
ruby
|
93
|
+
|
94
|
+
DEPENDENCIES
|
95
|
+
bundler (~> 1.11)
|
96
|
+
codeclimate-test-reporter (~> 1.0.0)
|
97
|
+
pry (~> 0.10.0)
|
98
|
+
rake (~> 10.0)
|
99
|
+
rspec (~> 3.5)
|
100
|
+
simplecov
|
101
|
+
terjira!
|
102
|
+
|
103
|
+
BUNDLED WITH
|
104
|
+
1.11.2
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 keepcosmos
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
[![Build Status](https://travis-ci.org/keepcosmos/terjira.svg?branch=master)](https://travis-ci.org/keepcosmos/terjira)
|
2
|
+
[![Test Coverage](https://codeclimate.com/github/keepcosmos/terjira/badges/coverage.svg)](https://codeclimate.com/github/keepcosmos/terjira/coverage)
|
3
|
+
[![Code Climate](https://codeclimate.com/github/keepcosmos/terjira/badges/gpa.svg)](https://codeclimate.com/github/keepcosmos/terjira)
|
4
|
+
|
5
|
+
# Terjira
|
6
|
+
|
7
|
+
Terjira is a very interactive and easy to use command line interface for Jira.
|
8
|
+
|
9
|
+
|
10
|
+
I'm working now..
|
11
|
+
|
12
|
+
## Installation
|
13
|
+
|
14
|
+
Add this line to your application's Gemfile:
|
15
|
+
|
16
|
+
```ruby
|
17
|
+
gem 'terjira'
|
18
|
+
```
|
19
|
+
|
20
|
+
And then execute:
|
21
|
+
|
22
|
+
$ bundle
|
23
|
+
|
24
|
+
Or install it yourself as:
|
25
|
+
|
26
|
+
$ gem install terjira
|
27
|
+
|
28
|
+
## Usage
|
29
|
+
|
30
|
+
TODO: Write usage instructions here
|
31
|
+
|
32
|
+
* Mock data is from jira-ruby
|
33
|
+
|
34
|
+
## Development
|
35
|
+
|
36
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
37
|
+
|
38
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
39
|
+
|
40
|
+
## Contributing
|
41
|
+
|
42
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/terjira. 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.
|
43
|
+
|
44
|
+
|
45
|
+
## License
|
46
|
+
|
47
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/Vagrantfile
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
# -*- mode: ruby -*-
|
2
|
+
# vi: set ft=ruby :
|
3
|
+
|
4
|
+
# All Vagrant configuration is done below. The "2" in Vagrant.configure
|
5
|
+
# configures the configuration version (we support older styles for
|
6
|
+
# backwards compatibility). Please don't change it unless you know what
|
7
|
+
# you're doing.
|
8
|
+
Vagrant.configure(2) do |config|
|
9
|
+
config.vm.box = 'ubuntu/trusty64'
|
10
|
+
config.vm.box_check_update = false
|
11
|
+
|
12
|
+
config.vm.network :private_network, ip: '192.168.20.21'
|
13
|
+
# config.vm.network "public_network"
|
14
|
+
|
15
|
+
config.vm.network 'forwarded_port', guest: 2990, host: 2990
|
16
|
+
|
17
|
+
config.vm.synced_folder '.', '/vagrant', type: 'nfs'
|
18
|
+
|
19
|
+
config.vm.provider 'virtualbox' do |vb|
|
20
|
+
vb.customize ["modifyvm", :id, "--memory", 4096]
|
21
|
+
vb.customize ["modifyvm", :id, "--cpus", 2]
|
22
|
+
# vb.gui = true
|
23
|
+
end
|
24
|
+
|
25
|
+
# config.vm.provision :shell, path: 'dev/bootstrap.sh', keep_color: true
|
26
|
+
end
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "terjira"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/jira
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'bundler/setup'
|
3
|
+
require 'terjira'
|
4
|
+
require 'json'
|
5
|
+
|
6
|
+
begin
|
7
|
+
Terjira::CLI.start(ARGV)
|
8
|
+
rescue JIRA::HTTPError => e
|
9
|
+
message = JSON.parse(e.response.body)
|
10
|
+
error_message = message['errorMessages']
|
11
|
+
error_message = error_message.join(' ') if error_message.is_a? Array
|
12
|
+
puts "#{e.message} :: #{error_message}"
|
13
|
+
end
|