trac4r 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +2 -0
- data/Rakefile +13 -4
- data/VERSION +1 -1
- data/bin/trac +3 -2
- data/trac.rdoc +75 -0
- metadata +3 -1
data/README.rdoc
CHANGED
@@ -45,6 +45,8 @@ a more Rubyesque syntax:
|
|
45
45
|
# This is a bit wierd, the "!" in the first element means "none of these values"
|
46
46
|
not_closed_nor_testing = trac.tickets.query(:status => ["!closed","test"])
|
47
47
|
|
48
|
+
:include:trac.rdoc
|
49
|
+
|
48
50
|
== More Info
|
49
51
|
|
50
52
|
* {RDoc}[http://davetron5000.github.com/trac4r]
|
data/Rakefile
CHANGED
@@ -2,8 +2,8 @@ require 'rake/clean'
|
|
2
2
|
require 'hanna/rdoctask'
|
3
3
|
require 'rubygems'
|
4
4
|
require 'rake/gempackagetask'
|
5
|
+
require 'grancher'
|
5
6
|
|
6
|
-
$: << '../grancher/lib'
|
7
7
|
begin
|
8
8
|
require 'grancher/task'
|
9
9
|
Grancher::Task.new do |g|
|
@@ -12,7 +12,7 @@ begin
|
|
12
12
|
g.directory 'html'
|
13
13
|
end
|
14
14
|
rescue LoadError
|
15
|
-
|
15
|
+
puts 'You should install the \'grancher\' gem if you wish to push to gh-pages'
|
16
16
|
end
|
17
17
|
|
18
18
|
begin
|
@@ -27,7 +27,7 @@ begin
|
|
27
27
|
s.add_dependency('rainbow', '>= 1.0.4')
|
28
28
|
s.add_dependency('gli', '>= 1.1.0')
|
29
29
|
s.has_rdoc = true
|
30
|
-
s.extra_rdoc_files = ['README.rdoc']
|
30
|
+
s.extra_rdoc_files = ['README.rdoc','trac.rdoc']
|
31
31
|
s.rdoc_options << '--title' << 'trac4r Trac Ruby Client' << '--main' << 'README.rdoc' << '-ri'
|
32
32
|
s.require_paths << 'lib'
|
33
33
|
end
|
@@ -35,8 +35,11 @@ begin
|
|
35
35
|
rescue LoadError
|
36
36
|
puts "Jeweler, or one of its dependencies, is not available. Install it with: sudo gem install jeweler"
|
37
37
|
end
|
38
|
+
CLOBBER.include('trac4r.gemspec')
|
39
|
+
CLOBBER.include('pkg')
|
40
|
+
CLOBBER.include('trac.rdoc')
|
38
41
|
|
39
|
-
Rake::RDocTask.new do |rd|
|
42
|
+
Rake::RDocTask.new(:generate_rdoc) do |rd|
|
40
43
|
rd.main = "README.rdoc"
|
41
44
|
rd.rdoc_files.include("README.rdoc","lib/**/*.rb","bin/**/*")
|
42
45
|
rd.title = 'Ruby interface to Trac'
|
@@ -45,3 +48,9 @@ end
|
|
45
48
|
task :default => :test
|
46
49
|
|
47
50
|
task :publish_rdoc => [:rdoc,:publish]
|
51
|
+
|
52
|
+
task :rdoc => [:bin_rdoc,:generate_rdoc]
|
53
|
+
|
54
|
+
task :bin_rdoc do |t|
|
55
|
+
`bin/trac rdoc`
|
56
|
+
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.2.
|
1
|
+
1.2.2
|
data/bin/trac
CHANGED
@@ -160,7 +160,7 @@ command [:tickets,:ls] do |c|
|
|
160
160
|
end
|
161
161
|
printf_string.gsub!(/ - $/,'')
|
162
162
|
if columns.include? 'summary'
|
163
|
-
args <<
|
163
|
+
args << do_wrap(ticket.summary,padding+1,global_options[:cols])
|
164
164
|
printf_string += " - %s"
|
165
165
|
end
|
166
166
|
printf("#{printf_string}\n",*args)
|
@@ -181,7 +181,7 @@ command [:tickets,:ls] do |c|
|
|
181
181
|
end
|
182
182
|
|
183
183
|
# Not sure about this
|
184
|
-
def
|
184
|
+
def do_wrap(string,indent,cols)
|
185
185
|
cols_left = cols.to_i - indent
|
186
186
|
raise "Your terminal is too small for formatting" if (cols_left < 5)
|
187
187
|
return_me = ""
|
@@ -281,6 +281,7 @@ post do |global,command,options,args|
|
|
281
281
|
end
|
282
282
|
|
283
283
|
on_error do |exception|
|
284
|
+
raise exception
|
284
285
|
# Error logic here
|
285
286
|
# return false to skip default error handling
|
286
287
|
true
|
data/trac.rdoc
ADDED
@@ -0,0 +1,75 @@
|
|
1
|
+
= <tt>trac</tt>
|
2
|
+
|
3
|
+
trac [global options] command_name [command-specific options] [--] arguments...
|
4
|
+
|
5
|
+
* Use the command +help+ to get a summary of commands
|
6
|
+
* Use the command <tt>help command_name</tt> to get a help for +command_name+
|
7
|
+
* Use <tt>--</tt> to stop command line argument processing; useful if your arguments have dashes in them
|
8
|
+
|
9
|
+
== Global Options
|
10
|
+
These options are available for any command and are specified before the name of the command
|
11
|
+
|
12
|
+
[<tt>--cols=arg</tt>] number of columns for formatting <i>( default: <tt> 136</tt>)</i>
|
13
|
+
[<tt>--noformat</tt>] Do not format output
|
14
|
+
|
15
|
+
By default, the output is formatted fo readability in the terminal. By disabling this, the output is more "machine readable" and parsable by other scripts
|
16
|
+
|
17
|
+
[<tt>-o, --open=arg</tt>] Command to use to open URLs <i>( default: <tt>open</tt>)</i>
|
18
|
+
[<tt>-p, --password=arg</tt>] Your password
|
19
|
+
[<tt>-u, --user=arg</tt>] Your username
|
20
|
+
[<tt>--url=arg</tt>] URL to trac
|
21
|
+
== Commands
|
22
|
+
[<tt>help</tt>] Shows list of commands or help for one command
|
23
|
+
[<tt>initconfig</tt>] Initialize the config file using current global options
|
24
|
+
[<tt>newticket</tt>] Go to the new ticket web interface
|
25
|
+
[<tt>open</tt>] Open the ticket or wiki page
|
26
|
+
[<tt>tickets</tt>] Lists tickets
|
27
|
+
|
28
|
+
=== <tt>help [command]</tt>
|
29
|
+
|
30
|
+
Shows list of commands or help for one command
|
31
|
+
|
32
|
+
=== <tt>initconfig </tt>
|
33
|
+
|
34
|
+
Initialize the config file using current global options
|
35
|
+
|
36
|
+
Initializes a configuration file where you can set default options for command line flags, but 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
|
37
|
+
|
38
|
+
==== Options
|
39
|
+
These options are specified *after* the command.
|
40
|
+
|
41
|
+
[<tt>--force</tt>] force overwrite of existing config file
|
42
|
+
=== <tt>newticket summary for the ticket</tt>
|
43
|
+
|
44
|
+
Go to the new ticket web interface
|
45
|
+
|
46
|
+
Navigates your browser to the web interface, initialized with the values you provide, but does not actually create the ticket
|
47
|
+
|
48
|
+
==== Options
|
49
|
+
These options are specified *after* the command.
|
50
|
+
|
51
|
+
[<tt>-c, --component=arg</tt>] component
|
52
|
+
[<tt>-p, --priority=arg</tt>] priority
|
53
|
+
[<tt>-t, --type=arg</tt>] type
|
54
|
+
=== <tt>open the id of the ticket or name of wiki page</tt>
|
55
|
+
|
56
|
+
Open the ticket or wiki page
|
57
|
+
|
58
|
+
=== <tt>tickets ticket ids (blank for all)</tt>
|
59
|
+
|
60
|
+
Lists tickets
|
61
|
+
|
62
|
+
*Aliases*
|
63
|
+
* <tt><b>ls</b></tt>
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
==== Options
|
68
|
+
These options are specified *after* the command.
|
69
|
+
|
70
|
+
[<tt>-a, --accepted</tt>] Show tickets accepted
|
71
|
+
[<tt>-c, --component=arg</tt>] Component
|
72
|
+
[<tt>--columns=arg</tt>] Columns to show
|
73
|
+
[<tt>-l, --description</tt>] Show full description
|
74
|
+
[<tt>-o, --owner=arg</tt>] Owner ("ME" for the -u user)
|
75
|
+
[<tt>-q, --query=arg</tt>] Arbitrary query (flags are included, too)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trac4r
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Niklas Cathro
|
@@ -41,6 +41,7 @@ extensions: []
|
|
41
41
|
|
42
42
|
extra_rdoc_files:
|
43
43
|
- README.rdoc
|
44
|
+
- trac.rdoc
|
44
45
|
files:
|
45
46
|
- .gitignore
|
46
47
|
- LICENCE
|
@@ -54,6 +55,7 @@ files:
|
|
54
55
|
- lib/trac4r/ticket.rb
|
55
56
|
- lib/trac4r/tickets.rb
|
56
57
|
- lib/trac4r/wiki.rb
|
58
|
+
- trac.rdoc
|
57
59
|
has_rdoc: true
|
58
60
|
homepage:
|
59
61
|
licenses: []
|