jira4r:使用Ruby操作JIRA

本文介绍了一个用于操作JIRA问题跟踪系统的Ruby库jira4r,并提供了安装指导及常见错误解决方法。文中还包含了一段示例代码,演示如何通过jira4r登录JIRA并获取指定项目的详情。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

jira4r是一个用来操作JIRA 问题跟踪系统的Ruby库。
安装需求 (Windows下):
1. Ruby
2. soap4r (gem install soap4r)
3. jira4r (gem install jira4r)

如果(irb中) require 'jira4r' 后会出现‘XML processor module not found’的抱错提示,其解决办法是(windows下面)打开C:\Ruby193\lib\ruby\gems\1.9.1\gems\soap4r-1.5.8\lib\xsd\xmlparser.rb, 其中66行的 c.downcase == name 改为 c.to_s.downcase == name

 

Sample Code:

# Use gem('soap4r') to ensure that this package is loaded instead of the default implementation 
# contained in the ruby interpreter.
gem('soap4r')
gem('jira4r')
require 'jira4r'

# 2 = the version of the WSDL interface. At present, only v2 is supported
# "http://jira.atlassian.com" = The Base for your JIRA installation
# The module is named Jira4R, not only Jira
jira = Jira4R::JiraTool.new(2, "http://jira.yourdomain.com")

# Login to the JIRA
jira.login("username", "password")

# Get that project
puts jira.getProjectByKey("XYZ").inspect

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值