bugzyrb 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +26 -0
- data/LICENSE +20 -0
- data/README.rdoc +97 -0
- data/Rakefile +59 -0
- data/VERSION +1 -0
- data/bin/bugzyrb +4 -0
- data/bugzy.cfg +35 -0
- data/bugzyrb.gemspec +72 -0
- data/lib/bugzyrb.rb +1131 -0
- data/lib/common/cmdapp.rb +280 -0
- data/lib/common/colorconstants.rb +79 -0
- data/lib/common/db.rb +249 -0
- data/lib/common/sed.rb +118 -0
- metadata +158 -0
data/.document
ADDED
data/.gitignore
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
## MAC OS
|
2
|
+
.DS_Store
|
3
|
+
|
4
|
+
## TEXTMATE
|
5
|
+
*.tmproj
|
6
|
+
tmtags
|
7
|
+
|
8
|
+
## EMACS
|
9
|
+
*~
|
10
|
+
\#*
|
11
|
+
.\#*
|
12
|
+
|
13
|
+
## VIM
|
14
|
+
*.swp
|
15
|
+
|
16
|
+
## PROJECT::GENERAL
|
17
|
+
coverage
|
18
|
+
rdoc
|
19
|
+
pkg
|
20
|
+
TODO2.txt
|
21
|
+
serial_number*
|
22
|
+
*.sqlite
|
23
|
+
*.db
|
24
|
+
|
25
|
+
|
26
|
+
## PROJECT::SPECIFIC
|
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2009 Rahul Kumar
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
@@ -0,0 +1,97 @@
|
|
1
|
+
= bugzyrb
|
2
|
+
|
3
|
+
A command-line bug tracking system using sqlite3 as a store.
|
4
|
+
This is a port of bugzy.sh (bash-shell based tracker that uses tab delimited files).
|
5
|
+
|
6
|
+
This is not an extensive, full-fledged bug or issue tracker such a bugzilla. Its a simple tracker that maintains one sqlite file per directory. Thus, you could create one for each project.
|
7
|
+
|
8
|
+
Maintains priority, severity, status, fix, comments. All updates are logged.
|
9
|
+
|
10
|
+
== Purpose
|
11
|
+
|
12
|
+
There are already other command-line bug trackers, some ruby some not. I've had problems installing many. As far as ruby ones, some do not work on 1.9 and this bug has not been rectified for over a year. Others rely on gems that are broken and the maintainer has abandoned them.
|
13
|
+
|
14
|
+
So finally, for personal needs I wrote bugzy.sh. However, that's bash shell based, and relies on GNU's coreutils being installed with default_names options. I wish to get out of the mess of bash commands having different options across BSD and GNU ( I use a Mac, and use GNU coreutils ).
|
15
|
+
So I am rewriting this simple issue tracker in ruby with sqlite3. The advantage over having data in a SQL database is that the user can query it easily. With having data in separate Yaml files, searching filtering etc is a big pain.
|
16
|
+
|
17
|
+
== Features
|
18
|
+
|
19
|
+
* "Easier than baking cookies"
|
20
|
+
* "Leather Pants"
|
21
|
+
* other features to come
|
22
|
+
|
23
|
+
|
24
|
+
== Installation
|
25
|
+
sqlite3 itself has to be installed
|
26
|
+
|
27
|
+
sudo port install sqlite3
|
28
|
+
|
29
|
+
TODO
|
30
|
+
Depends on :
|
31
|
+
* subcommand (tiny wrapper over optionparser for subcommands)
|
32
|
+
* sqlite3-ruby
|
33
|
+
* highline - for accepting some input
|
34
|
+
* terminal-table - for formatting output (this is optional)
|
35
|
+
if you use list --bare, then you don't need this gem
|
36
|
+
|
37
|
+
Install [Gemcutter](http://gemcutter.org) and execute:
|
38
|
+
$ sudo gem install bugzyrb
|
39
|
+
|
40
|
+
== Example
|
41
|
+
TODO
|
42
|
+
|
43
|
+
init: Initialize a database with tables
|
44
|
+
add: Add an issue -- will prompt for fields
|
45
|
+
qadd: Add an issue -- will use defaults for all fields but title
|
46
|
+
view: view given issue (or last entered)
|
47
|
+
|
48
|
+
bugzyrb help
|
49
|
+
bugzyrb help <command>
|
50
|
+
bugzyrb init
|
51
|
+
bugzyrb add "Something does not work"
|
52
|
+
bugzyrb qadd "A new issue"
|
53
|
+
bugzyrb qadd --type "feature" --priority "P5" "Another issue"
|
54
|
+
bugzyrb view 1
|
55
|
+
bugzyrb list
|
56
|
+
|
57
|
+
# list without using terminal-table, for filtering purposes
|
58
|
+
bugzyrb list --bare
|
59
|
+
bugzyrb list --bare --delimited "|"
|
60
|
+
|
61
|
+
# list issues with title containing ruby but not containing python
|
62
|
+
bugzyrb list ruby -python
|
63
|
+
|
64
|
+
# list issues with title not containing python
|
65
|
+
bugzyrb list -- -python
|
66
|
+
|
67
|
+
bugzyrb list --short
|
68
|
+
bugzyrb list --long
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
== Known Issues
|
74
|
+
TODO
|
75
|
+
|
76
|
+
* Doesn't make coffee (not yet)
|
77
|
+
* Occassionally burns toast
|
78
|
+
|
79
|
+
== Database
|
80
|
+
|
81
|
+
* bugs table containing title, id, type, statuses, description, fix, start and due date, etc
|
82
|
+
* comments table - any number of comments per issue
|
83
|
+
* log - a log of whatever activity has happened per issue/bug.
|
84
|
+
|
85
|
+
== Note on Patches/Pull Requests
|
86
|
+
|
87
|
+
* Fork the project.
|
88
|
+
* Make your feature addition or bug fix.
|
89
|
+
* Add tests for it. This is important so I don't break it in a
|
90
|
+
future version unintentionally.
|
91
|
+
* Commit, do not mess with rakefile, version, or history.
|
92
|
+
(if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
|
93
|
+
* Send me a pull request. Bonus points for topic branches.
|
94
|
+
|
95
|
+
== Copyright
|
96
|
+
|
97
|
+
Copyright (c) 2010 Rahul Kumar. See LICENSE for details.
|
data/Rakefile
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'jeweler'
|
6
|
+
Jeweler::Tasks.new do |gem|
|
7
|
+
gem.name = "bugzyrb"
|
8
|
+
gem.summary = %Q{command-line bug/issue tracker using sqlite, ruby 1.9}
|
9
|
+
gem.description = %Q{basic, easy-to-use command-line issue-tracker using sqlite for ruby 1.9}
|
10
|
+
gem.email = "sentinel1879@gmail.com"
|
11
|
+
gem.homepage = "http://github.com/rkumar/bugzyrb"
|
12
|
+
gem.authors = ["Rahul Kumar"]
|
13
|
+
gem.rubyforge_project = "bugzyrb"
|
14
|
+
#gem.add_development_dependency "thoughtbot-shoulda", ">= 0"
|
15
|
+
gem.add_development_dependency "yard", ">= 0.5"
|
16
|
+
gem.add_dependency "subcommand", ">= 1.0.5"
|
17
|
+
gem.add_dependency "highline", ">= 1.5.2"
|
18
|
+
gem.add_dependency "terminal-table", ">= 1.4.2"
|
19
|
+
gem.add_dependency "sqlite3-ruby", ">= 1.2.5"
|
20
|
+
gem.add_dependency "arrayfields", ">= 4.7.4"
|
21
|
+
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
22
|
+
end
|
23
|
+
Jeweler::GemcutterTasks.new
|
24
|
+
rescue LoadError
|
25
|
+
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
26
|
+
end
|
27
|
+
|
28
|
+
require 'rake/testtask'
|
29
|
+
Rake::TestTask.new(:test) do |test|
|
30
|
+
test.libs << 'lib' << 'test'
|
31
|
+
test.pattern = 'test/**/test_*.rb'
|
32
|
+
test.verbose = true
|
33
|
+
end
|
34
|
+
|
35
|
+
begin
|
36
|
+
require 'rcov/rcovtask'
|
37
|
+
Rcov::RcovTask.new do |test|
|
38
|
+
test.libs << 'test'
|
39
|
+
test.pattern = 'test/**/test_*.rb'
|
40
|
+
test.verbose = true
|
41
|
+
end
|
42
|
+
rescue LoadError
|
43
|
+
task :rcov do
|
44
|
+
abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
task :test => :check_dependencies
|
49
|
+
|
50
|
+
task :default => :test
|
51
|
+
|
52
|
+
begin
|
53
|
+
require 'yard'
|
54
|
+
YARD::Rake::YardocTask.new
|
55
|
+
rescue LoadError
|
56
|
+
task :yardoc do
|
57
|
+
abort "YARD is not available. In order to run yardoc, you must: sudo gem install yard"
|
58
|
+
end
|
59
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.1.0
|
data/bin/bugzyrb
ADDED
data/bugzy.cfg
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
# ruby configuration
|
2
|
+
# use -c bugzy.cfg topick up this file.
|
3
|
+
# this overrides defaults inside main program
|
4
|
+
|
5
|
+
$prompt_assigned_to = false
|
6
|
+
$default_assigned_to = ENV['logname']
|
7
|
+
$send_email = true
|
8
|
+
$email_to = ENV['logname']
|
9
|
+
#$app_dir =
|
10
|
+
|
11
|
+
$default_type = "bug"
|
12
|
+
$default_severity = "normal"
|
13
|
+
$default_status = "open"
|
14
|
+
$default_priority = "P3"
|
15
|
+
|
16
|
+
$prompt_type = true
|
17
|
+
$prompt_severity = false
|
18
|
+
$prompt_status = false
|
19
|
+
$prompt_priority = false
|
20
|
+
|
21
|
+
$prompt_desc = true
|
22
|
+
$prompt_due_date = false
|
23
|
+
$default_due = 5 # 5 days from today
|
24
|
+
#$default_due_date = "+2 days"
|
25
|
+
|
26
|
+
$use_project = true
|
27
|
+
$use_component = true
|
28
|
+
$use_version = false
|
29
|
+
#$append_modules = %w[project component version]
|
30
|
+
$valid_project = %w[bugzyrb todorb subcommand]
|
31
|
+
$default_project = "bugzyrb"
|
32
|
+
$prompt_project = false # false, true, :freeform, :choice
|
33
|
+
$prompt_component = :freeform
|
34
|
+
$prompt_version = :freeform
|
35
|
+
$default_version = File.read("VERSION") if File.exists? "VERSION"
|
data/bugzyrb.gemspec
ADDED
@@ -0,0 +1,72 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{bugzyrb}
|
8
|
+
s.version = "0.1.0"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Rahul Kumar"]
|
12
|
+
s.date = %q{2010-07-07}
|
13
|
+
s.default_executable = %q{bugzyrb}
|
14
|
+
s.description = %q{basic, easy-to-use command-line issue-tracker using sqlite for ruby 1.9}
|
15
|
+
s.email = %q{sentinel1879@gmail.com}
|
16
|
+
s.executables = ["bugzyrb"]
|
17
|
+
s.extra_rdoc_files = [
|
18
|
+
"LICENSE",
|
19
|
+
"README.rdoc"
|
20
|
+
]
|
21
|
+
s.files = [
|
22
|
+
".document",
|
23
|
+
".gitignore",
|
24
|
+
"LICENSE",
|
25
|
+
"README.rdoc",
|
26
|
+
"Rakefile",
|
27
|
+
"VERSION",
|
28
|
+
"bin/bugzyrb",
|
29
|
+
"bugzy.cfg",
|
30
|
+
"bugzyrb.gemspec",
|
31
|
+
"lib/bugzyrb.rb",
|
32
|
+
"lib/common/cmdapp.rb",
|
33
|
+
"lib/common/colorconstants.rb",
|
34
|
+
"lib/common/db.rb",
|
35
|
+
"lib/common/sed.rb"
|
36
|
+
]
|
37
|
+
s.homepage = %q{http://github.com/rkumar/bugzyrb}
|
38
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
39
|
+
s.require_paths = ["lib"]
|
40
|
+
s.rubyforge_project = %q{bugzyrb}
|
41
|
+
s.rubygems_version = %q{1.3.6}
|
42
|
+
s.summary = %q{command-line bug/issue tracker using sqlite, ruby 1.9}
|
43
|
+
|
44
|
+
if s.respond_to? :specification_version then
|
45
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
46
|
+
s.specification_version = 3
|
47
|
+
|
48
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
49
|
+
s.add_development_dependency(%q<yard>, [">= 0.5"])
|
50
|
+
s.add_runtime_dependency(%q<subcommand>, [">= 1.0.5"])
|
51
|
+
s.add_runtime_dependency(%q<highline>, [">= 1.5.2"])
|
52
|
+
s.add_runtime_dependency(%q<terminal-table>, [">= 1.4.2"])
|
53
|
+
s.add_runtime_dependency(%q<sqlite3-ruby>, [">= 1.2.5"])
|
54
|
+
s.add_runtime_dependency(%q<arrayfields>, [">= 4.7.4"])
|
55
|
+
else
|
56
|
+
s.add_dependency(%q<yard>, [">= 0.5"])
|
57
|
+
s.add_dependency(%q<subcommand>, [">= 1.0.5"])
|
58
|
+
s.add_dependency(%q<highline>, [">= 1.5.2"])
|
59
|
+
s.add_dependency(%q<terminal-table>, [">= 1.4.2"])
|
60
|
+
s.add_dependency(%q<sqlite3-ruby>, [">= 1.2.5"])
|
61
|
+
s.add_dependency(%q<arrayfields>, [">= 4.7.4"])
|
62
|
+
end
|
63
|
+
else
|
64
|
+
s.add_dependency(%q<yard>, [">= 0.5"])
|
65
|
+
s.add_dependency(%q<subcommand>, [">= 1.0.5"])
|
66
|
+
s.add_dependency(%q<highline>, [">= 1.5.2"])
|
67
|
+
s.add_dependency(%q<terminal-table>, [">= 1.4.2"])
|
68
|
+
s.add_dependency(%q<sqlite3-ruby>, [">= 1.2.5"])
|
69
|
+
s.add_dependency(%q<arrayfields>, [">= 4.7.4"])
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|