trac4r 1.2.2 → 1.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (7) hide show
  1. data/README.rdoc +2 -0
  2. data/Rakefile +4 -1
  3. data/VERSION +1 -1
  4. data/bin/trac +9 -1
  5. data/lib/trac4r/ticket.rb +1 -1
  6. metadata +37 -15
  7. data/trac.rdoc +0 -75
data/README.rdoc CHANGED
@@ -9,6 +9,8 @@ For more information on the Trac XML-RPC see the {plugin's page on trac-hacks.co
9
9
 
10
10
  Thanks to the original author, Niklas Cathor, who has done most of the work.
11
11
 
12
+ <i>Note that I (David Copeland) will probably not be making more changes to this, as my main reason for picking this up was that I am using Trac where I work. We are moving away from Trac, so I have less need to do anything with this library. If someone is interested in claiming ownership, specifically owning the gem on Gemcutter, just let me know and I'll hand it over.</i>
13
+
12
14
  == Install
13
15
 
14
16
  # Only if you haven't set up gemcutter yet
data/Rakefile CHANGED
@@ -1,8 +1,9 @@
1
1
  require 'rake/clean'
2
- require 'hanna/rdoctask'
2
+ require 'rake/rdoctask'
3
3
  require 'rubygems'
4
4
  require 'rake/gempackagetask'
5
5
  require 'grancher'
6
+ require 'sdoc'
6
7
 
7
8
  begin
8
9
  require 'grancher/task'
@@ -42,6 +43,8 @@ CLOBBER.include('trac.rdoc')
42
43
  Rake::RDocTask.new(:generate_rdoc) do |rd|
43
44
  rd.main = "README.rdoc"
44
45
  rd.rdoc_files.include("README.rdoc","lib/**/*.rb","bin/**/*")
46
+ rd.options << '--fmt' << 'shtml'
47
+ rd.template = 'direct'
45
48
  rd.title = 'Ruby interface to Trac'
46
49
  end
47
50
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.2
1
+ 1.2.3
data/bin/trac CHANGED
@@ -57,7 +57,7 @@ end
57
57
  desc 'Go to the new ticket web interface'
58
58
  long_desc 'Navigates your browser to the web interface, initialized with the values you provide, but does not actually create the ticket'
59
59
  arg_name 'summary for the ticket'
60
- command [:newticket] do |c|
60
+ command [:newticket,:nt] do |c|
61
61
  c.desc 'component'
62
62
  c.flag [:c,:component]
63
63
 
@@ -67,11 +67,19 @@ command [:newticket] do |c|
67
67
  c.desc 'priority'
68
68
  c.flag [:p,:priority]
69
69
 
70
+ c.desc 'milestone'
71
+ c.flag [:m,:milestone]
72
+
73
+ c.desc 'keywords'
74
+ c.flag [:k,:keywords]
75
+
70
76
  c.action do |global_options,options,args|
71
77
  query_params = {}
72
78
  query_params['priority'] = options[:p] if options[:p]
73
79
  query_params['component'] = options[:c] if options[:c]
74
80
  query_params['type'] = options[:t] if options[:t]
81
+ query_params['milestone'] = options[:m] if options[:m]
82
+ query_params['keywords'] = options[:k] if options[:k]
75
83
  query_params['summary'] = args.join(' ')
76
84
  query_string = ''
77
85
  query_params.each do |key,value|
data/lib/trac4r/ticket.rb CHANGED
@@ -43,7 +43,7 @@ module Trac
43
43
  def method_missing(sym,*args)
44
44
  method = sym.to_s
45
45
  method = method[0..-2] if method =~ /!$/
46
- if args.size == 0 && instance_variables.include?("@" + sym.to_s)
46
+ if args.size == 0 && instance_variables.include?("@#{method}".to_sym)
47
47
  instance_eval("@" + sym.to_s)
48
48
  elsif method != sym.to_s
49
49
  nil
metadata CHANGED
@@ -1,7 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trac4r
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ hash: 25
5
+ prerelease: false
6
+ segments:
7
+ - 1
8
+ - 2
9
+ - 3
10
+ version: 1.2.3
5
11
  platform: ruby
6
12
  authors:
7
13
  - Niklas Cathro
@@ -10,29 +16,41 @@ autorequire:
10
16
  bindir: bin
11
17
  cert_chain: []
12
18
 
13
- date: 2010-01-03 00:00:00 -05:00
19
+ date: 2010-07-23 00:00:00 -04:00
14
20
  default_executable: trac
15
21
  dependencies:
16
22
  - !ruby/object:Gem::Dependency
17
23
  name: rainbow
18
- type: :runtime
19
- version_requirement:
20
- version_requirements: !ruby/object:Gem::Requirement
24
+ prerelease: false
25
+ requirement: &id001 !ruby/object:Gem::Requirement
26
+ none: false
21
27
  requirements:
22
28
  - - ">="
23
29
  - !ruby/object:Gem::Version
30
+ hash: 31
31
+ segments:
32
+ - 1
33
+ - 0
34
+ - 4
24
35
  version: 1.0.4
25
- version:
36
+ type: :runtime
37
+ version_requirements: *id001
26
38
  - !ruby/object:Gem::Dependency
27
39
  name: gli
28
- type: :runtime
29
- version_requirement:
30
- version_requirements: !ruby/object:Gem::Requirement
40
+ prerelease: false
41
+ requirement: &id002 !ruby/object:Gem::Requirement
42
+ none: false
31
43
  requirements:
32
44
  - - ">="
33
45
  - !ruby/object:Gem::Version
46
+ hash: 19
47
+ segments:
48
+ - 1
49
+ - 1
50
+ - 0
34
51
  version: 1.1.0
35
- version:
52
+ type: :runtime
53
+ version_requirements: *id002
36
54
  description: Basic ruby client library and command line interface for accessing Trac instances via its XML RPC API
37
55
  email: davidcopeland@naildrivin5.com
38
56
  executables:
@@ -41,7 +59,6 @@ extensions: []
41
59
 
42
60
  extra_rdoc_files:
43
61
  - README.rdoc
44
- - trac.rdoc
45
62
  files:
46
63
  - .gitignore
47
64
  - LICENCE
@@ -55,7 +72,6 @@ files:
55
72
  - lib/trac4r/ticket.rb
56
73
  - lib/trac4r/tickets.rb
57
74
  - lib/trac4r/wiki.rb
58
- - trac.rdoc
59
75
  has_rdoc: true
60
76
  homepage:
61
77
  licenses: []
@@ -73,21 +89,27 @@ require_paths:
73
89
  - lib
74
90
  - lib
75
91
  required_ruby_version: !ruby/object:Gem::Requirement
92
+ none: false
76
93
  requirements:
77
94
  - - ">="
78
95
  - !ruby/object:Gem::Version
96
+ hash: 3
97
+ segments:
98
+ - 0
79
99
  version: "0"
80
- version:
81
100
  required_rubygems_version: !ruby/object:Gem::Requirement
101
+ none: false
82
102
  requirements:
83
103
  - - ">="
84
104
  - !ruby/object:Gem::Version
105
+ hash: 3
106
+ segments:
107
+ - 0
85
108
  version: "0"
86
- version:
87
109
  requirements: []
88
110
 
89
111
  rubyforge_project:
90
- rubygems_version: 1.3.5
112
+ rubygems_version: 1.3.7
91
113
  signing_key:
92
114
  specification_version: 3
93
115
  summary: Ruby Client Library for Trac
data/trac.rdoc DELETED
@@ -1,75 +0,0 @@
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)