issues 0.0.1
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.
- data/Gemfile +2 -0
- data/LICENSE +22 -0
- data/README.rdoc +88 -0
- data/Rakefile +26 -0
- data/bin/issues +95 -0
- data/issues.gemspec +20 -0
- data/issues.rdoc +62 -0
- data/lib/issues/version.rb +3 -0
- data/lib/issues.rb +5 -0
- data/test/tc_nothing.rb +14 -0
- metadata +85 -0
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2012 Marcin Ciunelis
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
@@ -0,0 +1,88 @@
|
|
1
|
+
= Issues
|
2
|
+
|
3
|
+
GitHub Issues Command Line Interface
|
4
|
+
|
5
|
+
== Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'issues'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install issues
|
18
|
+
|
19
|
+
== Usage
|
20
|
+
|
21
|
+
issues [global options] command_name [command-specific options] [--] arguments...
|
22
|
+
|
23
|
+
* Use the command +help+ to get a summary of commands
|
24
|
+
* Use the command <tt>help command_name</tt> to get a help for +command_name+
|
25
|
+
* Use <tt>--</tt> to stop command line argument processing; useful if your arguments have dashes in them
|
26
|
+
|
27
|
+
=== Global Options
|
28
|
+
These options are available for any command and are specified before the name of the command
|
29
|
+
|
30
|
+
[<tt>--help</tt>] Show this message
|
31
|
+
[<tt>-p, --password=password</tt>] password
|
32
|
+
[<tt>-r, --repo=owner/repo</tt>] repository
|
33
|
+
[<tt>-u, --username=username</tt>] username
|
34
|
+
== Commands
|
35
|
+
[<tt>help</tt>] Shows list of commands or help for one command
|
36
|
+
[<tt>initconfig</tt>] Initialize the config file using current global options
|
37
|
+
[<tt>list</tt>] List of Issues
|
38
|
+
[<tt>milestones</tt>] List of Milestones
|
39
|
+
|
40
|
+
==== <tt>help [command]</tt>
|
41
|
+
|
42
|
+
Shows list of commands or help for one command
|
43
|
+
|
44
|
+
Gets help for the application or its commands. Can also list the commands in a way helpful to creating a bash-style completion function
|
45
|
+
|
46
|
+
===== Options
|
47
|
+
These options are specified *after* the command.
|
48
|
+
|
49
|
+
[<tt>-c, --completion</tt>] List all commands one line at a time, for use with shell completion ([command] argument is partial command to match)
|
50
|
+
==== <tt>initconfig </tt>
|
51
|
+
|
52
|
+
Initialize the config file using current global options
|
53
|
+
|
54
|
+
Initializes a configuration file where you can set default options for command line flags, both globally and on a per-command basis. These defaults override the built-in defaults and allow you to omit commonly-used command line flags when invoking this program
|
55
|
+
|
56
|
+
===== Options
|
57
|
+
These options are specified *after* the command.
|
58
|
+
|
59
|
+
[<tt>--force</tt>] force overwrite of existing config file
|
60
|
+
==== <tt>list </tt>
|
61
|
+
|
62
|
+
List of Issues
|
63
|
+
|
64
|
+
===== Options
|
65
|
+
These options are specified *after* the command.
|
66
|
+
|
67
|
+
[<tt>-a, --assignee=username</tt>] assignee
|
68
|
+
[<tt>-l, --labels=label1,label2</tt>] list of comma separated Label names. Example: bug,ui,@high
|
69
|
+
[<tt>-m, --milestone</tt>] mileston
|
70
|
+
[<tt>-s, --state=state</tt>] state
|
71
|
+
==== <tt>milestones </tt>
|
72
|
+
|
73
|
+
List of Milestones
|
74
|
+
|
75
|
+
===== Options
|
76
|
+
These options are specified *after* the command.
|
77
|
+
|
78
|
+
[<tt>-s, --state=state</tt>] state <i>( default: <tt>open</tt>)</i>
|
79
|
+
:include:issues.rdoc
|
80
|
+
|
81
|
+
== Contributing
|
82
|
+
|
83
|
+
1. Fork it
|
84
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
85
|
+
3. Commit your changes (`git commit -am 'Added some feature'`)
|
86
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
87
|
+
5. Create new Pull Request
|
88
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
require "bundler/gem_tasks"
|
3
|
+
require 'rake/clean'
|
4
|
+
require 'rubygems'
|
5
|
+
require 'rubygems/package_task'
|
6
|
+
require 'rdoc/task'
|
7
|
+
|
8
|
+
Rake::RDocTask.new do |rd|
|
9
|
+
rd.main = "README.rdoc"
|
10
|
+
rd.rdoc_files.include("README.rdoc","lib/**/*.rb","bin/**/*")
|
11
|
+
rd.title = 'GitHub Issues Command Line Interface'
|
12
|
+
end
|
13
|
+
|
14
|
+
spec = eval(File.read('issues.gemspec'))
|
15
|
+
|
16
|
+
Gem::PackageTask.new(spec) do |pkg|
|
17
|
+
end
|
18
|
+
|
19
|
+
require 'rake/testtask'
|
20
|
+
Rake::TestTask.new do |t|
|
21
|
+
t.libs << "test"
|
22
|
+
t.test_files = FileList['test/tc_*.rb']
|
23
|
+
end
|
24
|
+
|
25
|
+
task :default => :test
|
26
|
+
|
data/bin/issues
ADDED
@@ -0,0 +1,95 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# 1.9 adds realpath to resolve symlinks; 1.8 doesn't
|
3
|
+
# have this method, so we add it so we get resolved symlinks
|
4
|
+
# and compatibility
|
5
|
+
unless File.respond_to? :realpath
|
6
|
+
class File #:nodoc:
|
7
|
+
def self.realpath path
|
8
|
+
return realpath(File.readlink(path)) if symlink?(path)
|
9
|
+
path
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
$: << File.expand_path(File.dirname(File.realpath(__FILE__)) + '/../lib')
|
14
|
+
require 'rubygems'
|
15
|
+
require 'gli'
|
16
|
+
require 'issues'
|
17
|
+
|
18
|
+
include GLI
|
19
|
+
|
20
|
+
program_desc 'GitHub Issues Command Line Interface'
|
21
|
+
|
22
|
+
version Issues::VERSION
|
23
|
+
|
24
|
+
config_file '.issuesrc'
|
25
|
+
|
26
|
+
desc 'username'
|
27
|
+
arg_name 'username'
|
28
|
+
flag [:u, :username]
|
29
|
+
|
30
|
+
desc 'password'
|
31
|
+
arg_name 'password'
|
32
|
+
flag [:p, :password]
|
33
|
+
|
34
|
+
desc 'repository'
|
35
|
+
arg_name 'owner/repo'
|
36
|
+
flag [:r, :repo]
|
37
|
+
|
38
|
+
desc 'List of Issues'
|
39
|
+
command :list do |c|
|
40
|
+
c.desc 'mileston '
|
41
|
+
c.arg_name 'milestone'
|
42
|
+
c.switch [:m, :milestone]
|
43
|
+
|
44
|
+
c.desc 'assignee'
|
45
|
+
c.arg_name 'username'
|
46
|
+
c.flag [:a, :assignee]
|
47
|
+
|
48
|
+
c.desc 'list of comma separated Label names. Example: bug,ui,@high'
|
49
|
+
c.arg_name 'label1,label2'
|
50
|
+
c.flag [:l, :labels]
|
51
|
+
|
52
|
+
c.desc 'state'
|
53
|
+
c.arg_name 'state'
|
54
|
+
c.flag [:s, :state]
|
55
|
+
|
56
|
+
c.action do |global_options,options,args|
|
57
|
+
puts '[TODO] Implement Issues List'
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
desc 'List of Milestones'
|
62
|
+
command :milestones do |c|
|
63
|
+
c.desc 'state'
|
64
|
+
c.arg_name 'state'
|
65
|
+
c.default_value 'open'
|
66
|
+
c.flag [:s, :state]
|
67
|
+
|
68
|
+
c.action do |global_options,options,args|
|
69
|
+
p '[TODO] Implement Milestones List'
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
|
74
|
+
pre do |global,command,options,args|
|
75
|
+
# Pre logic here
|
76
|
+
# Return true to proceed; false to abort and not call the
|
77
|
+
# chosen command
|
78
|
+
# Use skips_pre before a command to skip this block
|
79
|
+
# on that command only
|
80
|
+
true
|
81
|
+
end
|
82
|
+
|
83
|
+
post do |global,command,options,args|
|
84
|
+
# Post logic here
|
85
|
+
# Use skips_post before a command to skip this
|
86
|
+
# block on that command only
|
87
|
+
end
|
88
|
+
|
89
|
+
on_error do |exception|
|
90
|
+
# Error logic here
|
91
|
+
# return false to skip default error handling
|
92
|
+
true
|
93
|
+
end
|
94
|
+
|
95
|
+
exit GLI.run(ARGV)
|
data/issues.gemspec
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
require File.expand_path('../lib/issues/version', __FILE__)
|
2
|
+
spec = Gem::Specification.new do |s|
|
3
|
+
s.name = 'issues'
|
4
|
+
s.version = Issues::VERSION
|
5
|
+
s.author = 'Marcin Ciunelis'
|
6
|
+
s.email = 'marcin.ciunelis@gmail.com'
|
7
|
+
s.homepage = 'https://github.com/martinciu/issues'
|
8
|
+
s.platform = Gem::Platform::RUBY
|
9
|
+
s.summary = 'GitHub Issues Command Line Interface'
|
10
|
+
s.has_rdoc = true
|
11
|
+
s.extra_rdoc_files = ['README.rdoc','issues.rdoc']
|
12
|
+
s.rdoc_options << '--title' << 'issues' << '--main' << 'README.rdoc' << '-ri'
|
13
|
+
s.bindir = 'bin'
|
14
|
+
s.add_development_dependency('rake')
|
15
|
+
s.add_development_dependency('rdoc')
|
16
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
17
|
+
s.files = `git ls-files`.split("\n")
|
18
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
19
|
+
s.require_paths = ["lib"]
|
20
|
+
end
|
data/issues.rdoc
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
= <tt>issues</tt>
|
2
|
+
|
3
|
+
GitHub Issues Command Line Interface
|
4
|
+
|
5
|
+
issues [global options] command_name [command-specific options] [--] arguments...
|
6
|
+
|
7
|
+
* Use the command +help+ to get a summary of commands
|
8
|
+
* Use the command <tt>help command_name</tt> to get a help for +command_name+
|
9
|
+
* Use <tt>--</tt> to stop command line argument processing; useful if your arguments have dashes in them
|
10
|
+
|
11
|
+
== Global Options
|
12
|
+
These options are available for any command and are specified before the name of the command
|
13
|
+
|
14
|
+
[<tt>--help</tt>] Show this message
|
15
|
+
[<tt>-p, --password=password</tt>] password
|
16
|
+
[<tt>-r, --repo=owner/repo</tt>] repository
|
17
|
+
[<tt>-u, --username=username</tt>] username
|
18
|
+
== Commands
|
19
|
+
[<tt>help</tt>] Shows list of commands or help for one command
|
20
|
+
[<tt>initconfig</tt>] Initialize the config file using current global options
|
21
|
+
[<tt>list</tt>] List of Issues
|
22
|
+
[<tt>milestones</tt>] List of Milestones
|
23
|
+
|
24
|
+
=== <tt>help [command]</tt>
|
25
|
+
|
26
|
+
Shows list of commands or help for one command
|
27
|
+
|
28
|
+
Gets help for the application or its commands. Can also list the commands in a way helpful to creating a bash-style completion function
|
29
|
+
|
30
|
+
==== Options
|
31
|
+
These options are specified *after* the command.
|
32
|
+
|
33
|
+
[<tt>-c, --completion</tt>] List all commands one line at a time, for use with shell completion ([command] argument is partial command to match)
|
34
|
+
=== <tt>initconfig </tt>
|
35
|
+
|
36
|
+
Initialize the config file using current global options
|
37
|
+
|
38
|
+
Initializes a configuration file where you can set default options for command line flags, both globally and on a per-command basis. These defaults override the built-in defaults and allow you to omit commonly-used command line flags when invoking this program
|
39
|
+
|
40
|
+
==== Options
|
41
|
+
These options are specified *after* the command.
|
42
|
+
|
43
|
+
[<tt>--force</tt>] force overwrite of existing config file
|
44
|
+
=== <tt>list </tt>
|
45
|
+
|
46
|
+
List of Issues
|
47
|
+
|
48
|
+
==== Options
|
49
|
+
These options are specified *after* the command.
|
50
|
+
|
51
|
+
[<tt>-a, --assignee=username</tt>] assignee
|
52
|
+
[<tt>-l, --labels=label1,label2</tt>] list of comma separated Label names. Example: bug,ui,@high
|
53
|
+
[<tt>-m, --milestone</tt>] mileston
|
54
|
+
[<tt>-s, --state=state</tt>] state
|
55
|
+
=== <tt>milestones </tt>
|
56
|
+
|
57
|
+
List of Milestones
|
58
|
+
|
59
|
+
==== Options
|
60
|
+
These options are specified *after* the command.
|
61
|
+
|
62
|
+
[<tt>-s, --state=state</tt>] state <i>( default: <tt>open</tt>)</i>
|
data/lib/issues.rb
ADDED
data/test/tc_nothing.rb
ADDED
metadata
ADDED
@@ -0,0 +1,85 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: issues
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Marcin Ciunelis
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-03-22 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: rake
|
16
|
+
requirement: &70346535924580 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :development
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *70346535924580
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: rdoc
|
27
|
+
requirement: &70346535924100 !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
type: :development
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *70346535924100
|
36
|
+
description:
|
37
|
+
email: marcin.ciunelis@gmail.com
|
38
|
+
executables:
|
39
|
+
- issues
|
40
|
+
extensions: []
|
41
|
+
extra_rdoc_files:
|
42
|
+
- README.rdoc
|
43
|
+
- issues.rdoc
|
44
|
+
files:
|
45
|
+
- Gemfile
|
46
|
+
- LICENSE
|
47
|
+
- README.rdoc
|
48
|
+
- Rakefile
|
49
|
+
- bin/issues
|
50
|
+
- issues.gemspec
|
51
|
+
- issues.rdoc
|
52
|
+
- lib/issues.rb
|
53
|
+
- lib/issues/version.rb
|
54
|
+
- test/tc_nothing.rb
|
55
|
+
homepage: https://github.com/martinciu/issues
|
56
|
+
licenses: []
|
57
|
+
post_install_message:
|
58
|
+
rdoc_options:
|
59
|
+
- --title
|
60
|
+
- issues
|
61
|
+
- --main
|
62
|
+
- README.rdoc
|
63
|
+
- -ri
|
64
|
+
require_paths:
|
65
|
+
- lib
|
66
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
67
|
+
none: false
|
68
|
+
requirements:
|
69
|
+
- - ! '>='
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
version: '0'
|
72
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
requirements: []
|
79
|
+
rubyforge_project:
|
80
|
+
rubygems_version: 1.8.10
|
81
|
+
signing_key:
|
82
|
+
specification_version: 3
|
83
|
+
summary: GitHub Issues Command Line Interface
|
84
|
+
test_files:
|
85
|
+
- test/tc_nothing.rb
|