redcuine 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +2 -0
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/lib/redcuine/issue.rb +3 -3
- data/lib/redcuine/optparser.rb +1 -1
- data/redcuine.gemspec +5 -5
- data/test/issue_test.rb +5 -5
- data/test/optparser_test.rb +1 -1
- metadata +4 -4
data/README.rdoc
CHANGED
data/Rakefile
CHANGED
@@ -7,7 +7,7 @@ begin
|
|
7
7
|
gemspec.homepage = "https://github.com/authorNari/redcuine"
|
8
8
|
gemspec.description = "CUI toolkit for Redmine"
|
9
9
|
gemspec.authors = ["Narihiro Nakmaura"]
|
10
|
-
gemspec.add_dependency("
|
10
|
+
gemspec.add_dependency("activeresource", ">= 3.0.3")
|
11
11
|
end
|
12
12
|
rescue LoadError
|
13
13
|
puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.2
|
data/lib/redcuine/issue.rb
CHANGED
@@ -2,7 +2,7 @@ module Redcuine
|
|
2
2
|
class Issue < Base
|
3
3
|
@@default_param = {}
|
4
4
|
@@issue_attribute_keys = [:subject, :description, :tracker_id, :status_id,
|
5
|
-
:category_id, :
|
5
|
+
:category_id, :assigned_to_id, :priority, :fixed_version,
|
6
6
|
:start_date, :due_date, :estimate_date, :done_ratio]
|
7
7
|
|
8
8
|
def self.run
|
@@ -89,7 +89,7 @@ module Redcuine
|
|
89
89
|
end
|
90
90
|
|
91
91
|
def self.index
|
92
|
-
opts = rest_options([:project_id, :tracker_id, :
|
92
|
+
opts = rest_options([:project_id, :tracker_id, :assigned_to_id, :status_id],
|
93
93
|
@@default_param)
|
94
94
|
res = Resource::Issue.find(:all, :params => opts)
|
95
95
|
res.each {|issue| print_get_format(issue)} if res
|
@@ -98,7 +98,7 @@ module Redcuine
|
|
98
98
|
|
99
99
|
def self.print_get_format(issue)
|
100
100
|
puts "- id: #{issue.id}"
|
101
|
-
%w(project status priority author assigned_to fixed_version).each do |k|
|
101
|
+
%w(project tracker status priority author assigned_to fixed_version).each do |k|
|
102
102
|
if issue.respond_to?(k)
|
103
103
|
puts " #{k}: #{issue.send(k).name}, id:#{issue.send(k).id}"
|
104
104
|
end
|
data/lib/redcuine/optparser.rb
CHANGED
@@ -31,7 +31,7 @@ module Redcuine
|
|
31
31
|
opt.program_name = 'redissue'
|
32
32
|
|
33
33
|
default_opts(opt)
|
34
|
-
%w(id subject description tracker-id status-id category-id assigned-to
|
34
|
+
%w(id subject description tracker-id status-id category-id assigned-to-id
|
35
35
|
priority fixed-version start-date due-date estimate-date
|
36
36
|
done-ratio site project-id).each do |k|
|
37
37
|
src = <<-SRC
|
data/redcuine.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{redcuine}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Narihiro Nakmaura"]
|
12
|
-
s.date = %q{2011-01-
|
12
|
+
s.date = %q{2011-01-31}
|
13
13
|
s.default_executable = %q{redissue}
|
14
14
|
s.description = %q{CUI toolkit for Redmine}
|
15
15
|
s.email = %q{authornari@gmail.com}
|
@@ -54,12 +54,12 @@ Gem::Specification.new do |s|
|
|
54
54
|
s.specification_version = 3
|
55
55
|
|
56
56
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
57
|
-
s.add_runtime_dependency(%q<
|
57
|
+
s.add_runtime_dependency(%q<activeresource>, [">= 3.0.3"])
|
58
58
|
else
|
59
|
-
s.add_dependency(%q<
|
59
|
+
s.add_dependency(%q<activeresource>, [">= 3.0.3"])
|
60
60
|
end
|
61
61
|
else
|
62
|
-
s.add_dependency(%q<
|
62
|
+
s.add_dependency(%q<activeresource>, [">= 3.0.3"])
|
63
63
|
end
|
64
64
|
end
|
65
65
|
|
data/test/issue_test.rb
CHANGED
@@ -31,13 +31,13 @@ class IssueTest < Test::Unit::TestCase
|
|
31
31
|
Redcuine::CONFIG["rest_type"] = :get
|
32
32
|
Redcuine::CONFIG["project_id"] = "1"
|
33
33
|
Redcuine::CONFIG["tracker_id"] = "2"
|
34
|
-
Redcuine::CONFIG["
|
34
|
+
Redcuine::CONFIG["assigned_to_id"] = "3"
|
35
35
|
Redcuine::CONFIG["status_id"] = "4"
|
36
36
|
assert_equal true, Redcuine::Issue.run
|
37
37
|
assert_equal({:params => {:project_id => "1",
|
38
38
|
:tracker_id => "2",
|
39
|
-
:
|
40
|
-
|
39
|
+
:assigned_to_id => "3",
|
40
|
+
:status_id => "4"}},
|
41
41
|
@opts)
|
42
42
|
end
|
43
43
|
|
@@ -64,7 +64,7 @@ class IssueTest < Test::Unit::TestCase
|
|
64
64
|
Redcuine::CONFIG["rest_type"] = :post
|
65
65
|
Redcuine::CONFIG["project_id"] = "1"
|
66
66
|
keys = [:subject, :description, :tracker_id, :status_id,
|
67
|
-
:category_id, :
|
67
|
+
:category_id, :assigned_to_id, :priority, :fixed_version,
|
68
68
|
:start_date, :due_date, :estimate_date, :done_ratio]
|
69
69
|
keys.each do |k|
|
70
70
|
Redcuine::CONFIG[k.to_s] = true
|
@@ -89,7 +89,7 @@ class IssueTest < Test::Unit::TestCase
|
|
89
89
|
Redcuine::CONFIG["rest_type"] = :put
|
90
90
|
Redcuine::CONFIG["id"] = "1"
|
91
91
|
keys = [:subject, :description, :tracker_id, :status_id,
|
92
|
-
:category_id, :
|
92
|
+
:category_id, :assigned_to_id, :priority, :fixed_version,
|
93
93
|
:start_date, :due_date, :estimate_date, :done_ratio]
|
94
94
|
keys.each do |k|
|
95
95
|
Redcuine::CONFIG[k.to_s] = true
|
data/test/optparser_test.rb
CHANGED
@@ -26,7 +26,7 @@ class OptParserTest < Test::Unit::TestCase
|
|
26
26
|
|
27
27
|
def test_issue_parse
|
28
28
|
opts = %w(id subject description tracker-id status-id
|
29
|
-
category-id assigned-to priority fixed-version
|
29
|
+
category-id assigned-to-id priority fixed-version
|
30
30
|
start-date due-date estimate-date done-ratio site project-id)
|
31
31
|
args = opts.map{|k| ["--#{k}", k]}.flatten
|
32
32
|
Redcuine::OptParser.issue_parse!(args)
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
8
|
+
- 2
|
9
|
+
version: 0.1.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Narihiro Nakmaura
|
@@ -14,11 +14,11 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2011-01-
|
17
|
+
date: 2011-01-31 00:00:00 +09:00
|
18
18
|
default_executable: redissue
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
|
-
name:
|
21
|
+
name: activeresource
|
22
22
|
prerelease: false
|
23
23
|
requirement: &id001 !ruby/object:Gem::Requirement
|
24
24
|
none: false
|