redcuine 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -24,6 +24,8 @@ TODO:
24
24
 
25
25
  * Redmine 1.1 - OK
26
26
 
27
+ * ruby1.9.2, 1.8.7
28
+
27
29
  == Author
28
30
 
29
31
  Copyright (c) 2011 {Narihiro Nakamura}[http://www.narihir.info],
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("active_resource", ">= 3.0.3")
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
1
+ 0.1.2
@@ -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, :assigned_to, :priority, :fixed_version,
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, :assigned_to, :status_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
@@ -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.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-30}
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<active_resource>, [">= 3.0.3"])
57
+ s.add_runtime_dependency(%q<activeresource>, [">= 3.0.3"])
58
58
  else
59
- s.add_dependency(%q<active_resource>, [">= 3.0.3"])
59
+ s.add_dependency(%q<activeresource>, [">= 3.0.3"])
60
60
  end
61
61
  else
62
- s.add_dependency(%q<active_resource>, [">= 3.0.3"])
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["assigned_to"] = "3"
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
- :assigned_to => "3",
40
- :status_id => "4"}},
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, :assigned_to, :priority, :fixed_version,
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, :assigned_to, :priority, :fixed_version,
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
@@ -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
- - 1
9
- version: 0.1.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-30 00:00:00 +09:00
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: active_resource
21
+ name: activeresource
22
22
  prerelease: false
23
23
  requirement: &id001 !ruby/object:Gem::Requirement
24
24
  none: false