acuforce 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.0
1
+ 0.4.1
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{acuforce}
8
- s.version = "0.4.0"
8
+ s.version = "0.4.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Harrison Strowd"]
12
- s.date = %q{2012-02-11}
12
+ s.date = %q{2012-02-12}
13
13
  s.description = %q{
14
14
  Provides an API for the following actions:
15
15
  * Logging in and Logging out
@@ -15,5 +15,6 @@ require 'rubygems'
15
15
  require 'acunote_connection'
16
16
  require 'acunote_project'
17
17
  require 'acunote_sprint'
18
+ require 'acunote_task'
18
19
 
19
20
  DEBUG = true unless defined? DEBUG
@@ -10,11 +10,13 @@ class AcunoteTask
10
10
  "#{acu_conn.home_url}/projects/#{proj_id}/tasks/#{task_id}"
11
11
  end
12
12
 
13
+ # This assumes that the task is current in the not started state. If it is in any other state, this will not work.
14
+ # TODO: Update this to identify the current status of the task and move it from any status to completed.
13
15
  def self.mark_complete(proj_id, task_id)
14
16
  task_page = acu_conn.get_page(url(proj_id,task_id))
15
17
  if task_page.root.to_s =~ /FORM_AUTH_TOKEN = '(.*=)';/
16
18
  form_auth_token = $1
17
- acu_conn.mech.post("#{acu_conn.home_url}/issues/update", {'number'=>task_id,'field'=>'status','view'=>'task_details','value'=>'In Progress','old_value'=>'Not Started','authenticity_token'=>form_auth_token,'project_id'=>proj_id,'_method'=>'post'})
19
+ acu_conn.mech.post("#{acu_conn.home_url}/issues/update", {'number'=>task_id,'field'=>'status','view'=>'task_details','value'=>'Completed','old_value'=>'Not Started','authenticity_token'=>form_auth_token,'project_id'=>proj_id,'_method'=>'post'})
18
20
  true
19
21
  else
20
22
  nil
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: acuforce
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.4.0
5
+ version: 0.4.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Harrison Strowd
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2012-02-11 00:00:00 -06:00
13
+ date: 2012-02-12 00:00:00 -06:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -122,7 +122,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
122
122
  requirements:
123
123
  - - ">="
124
124
  - !ruby/object:Gem::Version
125
- hash: -616021078157183817
125
+ hash: 1137398902312620885
126
126
  segments:
127
127
  - 0
128
128
  version: "0"