-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This can now be used more easily and installed via gem.
- Loading branch information
1 parent
1f69a50
commit 7595dd2
Showing
30 changed files
with
90 additions
and
3,121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
*.sw? | ||
pkg | ||
coverage | ||
html | ||
api.yaml |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
trac4r: Ruby wrapper for the Trac XML-RPC API | ||
============================================= | ||
|
||
Author:: Niklas Cathor | ||
License:: See LICENSE in source distribution | ||
|
||
For more information on the Trac XML-RPC see the {plugin's page on trac-hacks.com}[http://trac-hacks.org/wiki/XmlRpcPlugin#UsingfromRuby] | ||
|
||
Thanks to the original author, Niklas Cathor, who has done most of the work. | ||
|
||
== Install | ||
|
||
# Only if you haven't set up gemcutter yet | ||
sudo gem install gemcutter | ||
sudo gem tumble | ||
|
||
# Once Gemcutter is setup | ||
sudo gem install trac4r | ||
|
||
== Overview | ||
|
||
This wraps the Trac XML-RPC plugin. | ||
|
||
require 'rubygems' | ||
require 'trac4r' | ||
|
||
# Note that you need to point to the XMLRPC root and not the root of the trac web interface | ||
trac = Trac.new("http://www.example.com/trac/project/xmlrpc","username","password") | ||
trac.tickets.list # get all tickets | ||
trac.tickets.get 2334 # Get ticket #2334 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,31 @@ | ||
require 'rake' | ||
require 'rake/rdoctask' | ||
require 'ftools' | ||
require 'rake/clean' | ||
require 'hanna/rdoctask' | ||
require 'rubygems' | ||
require 'rake/gempackagetask' | ||
|
||
Rake::RDocTask.new("doc") { |rdoc| | ||
rdoc.rdoc_dir = 'doc' | ||
rdoc.template = ENV['template'] if ENV['template'] | ||
rdoc.title = "Trac for Ruby" | ||
rdoc.options << '--line-number' << '--inline-source' | ||
rdoc.options << '--charset' << 'utf-8' | ||
['lib/*.rb','*.rb'].each do |file| | ||
rdoc.rdoc_files.include(file) | ||
$: << '../grancher/lib' | ||
begin | ||
require 'grancher/task' | ||
Grancher::Task.new do |g| | ||
g.branch = 'gh-pages' | ||
g.push_to = 'origin' | ||
g.directory 'html' | ||
end | ||
} | ||
rescue LoadError | ||
#puts "you may install the optional gem 'grancher'" | ||
end | ||
|
||
desc "Install trac4r on your system." | ||
task :install do | ||
default_dir = $:.first | ||
print "Type installation directory [#{default_dir}]: " | ||
dir = $stdin.gets | ||
dir = default_dir if dir.strip.empty? | ||
File.stat(dir.strip) | ||
install_dir = "#{dir}/trac4r" | ||
begin | ||
Dir.mkdir(install_dir) | ||
rescue => e | ||
$stderr.puts "Error creating directory #{install_dir}. Reason: #{e}" | ||
exit! | ||
end | ||
Dir.mkdir(install_dir+'/lib') | ||
File.syscopy("#{File.dirname(__FILE__)}/trac.rb",install_dir) | ||
puts "trac.rb => #{install_dir}/trac.rb" | ||
File.syscopy("#{File.dirname(__FILE__)}/Rakefile",install_dir) | ||
puts "Rakefile => #{install_dir}/Rakefile" | ||
Dir.entries("#{File.dirname(__FILE__)}/lib").each do |file| | ||
if file =~ /.*\.rb$/ | ||
File.syscopy("#{File.dirname(__FILE__)}/lib/#{file}",install_dir+'/lib') | ||
puts "#{file} => #{install_dir}/lib/#{file}" | ||
end | ||
end | ||
puts "Successfully installed trac4r!" | ||
Rake::RDocTask.new do |rd| | ||
rd.main = "README.rdoc" | ||
rd.rdoc_files.include("README.rdoc","lib/**/*.rb","bin/**/*") | ||
rd.title = 'Ruby interface to Trac' | ||
end | ||
|
||
spec = eval(File.read('trac4r.gemspec')) | ||
|
||
Rake::GemPackageTask.new(spec) do |pkg| | ||
end | ||
|
||
task :default => :test | ||
|
||
task :publish_rdoc => [:rdoc,:publish] |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.