pivotal-tracker-api 1.0.1 → 1.0.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0b104677712cae09b437565df220315ae88480d0
4
- data.tar.gz: 92f8ff95cc3783d225490b0b53a0a42bcb6420f1
3
+ metadata.gz: 7ce3b6e18ed0a72fc3707c7f5967b7e03bbc818d
4
+ data.tar.gz: 006f6bdd3517587f7cfc261229f21e3bdcfb3c93
5
5
  SHA512:
6
- metadata.gz: 7e0fd85f353763e431780593df56b051e5c021b59474f45aedb0fbfc7c3babb2245efff89501fbbfc395d997798807a5456aca5aaf12d1220c9d04185fe97fe2
7
- data.tar.gz: 602e9a5acacb5429c59adf434d050266ff3428027dedb8b1a0c2be8e45ff718e318ab8a4ed9493fc3fadd5612cfae38b97d382301ed6fc462ee2520a9515ecf1
6
+ metadata.gz: a5c0b17773962b9756fb287ced83a0bec9baea04a7a63cd2b99e7103b571d2c26a0a2f6debb98e666e6987e2d953da4fdf6bf6e2658d33afac12fb765962e17e
7
+ data.tar.gz: 5582afefd47383eedc678b8cfc820d3e66d86e3a4597d7a137474169627c996a2a9d95f9c6bdf51d9ef69ad4f961a28bbe08008886ed7fcd6af4b18353875acb
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.1
1
+ 1.0.2
@@ -115,7 +115,6 @@ module PivotalAPI
115
115
  if prev_transition
116
116
  start_time = Time.parse(prev_transition.occurred_at.to_s)
117
117
  end_time = Time.parse(transition.occurred_at.to_s)
118
- puts "finished: start_time: #{start_time} - end_time: #{end_time}"
119
118
  duration_hrs += hours_between(start_time, end_time)
120
119
  end
121
120
  prev_transition = transition
@@ -123,7 +122,6 @@ module PivotalAPI
123
122
  if prev_transition
124
123
  start_time = Time.parse(prev_transition.occurred_at.to_s)
125
124
  end_time = Time.parse(transition.occurred_at.to_s)
126
- puts "delivered: start_time: #{start_time} - end_time: #{end_time}"
127
125
  duration_hrs += hours_between(start_time, end_time)
128
126
  end
129
127
  prev_transition = transition
@@ -131,7 +129,6 @@ module PivotalAPI
131
129
  if prev_transition
132
130
  start_time = Time.parse(prev_transition.occurred_at.to_s)
133
131
  end_time = Time.parse(transition.occurred_at.to_s)
134
- puts "rejected: start_time: #{start_time} - end_time: #{end_time}"
135
132
  duration_hrs += hours_between(start_time, end_time)
136
133
  end
137
134
  prev_transition = transition
@@ -139,17 +136,21 @@ module PivotalAPI
139
136
  if prev_transition
140
137
  start_time = Time.parse(prev_transition.occurred_at.to_s)
141
138
  end_time = Time.parse(transition.occurred_at.to_s)
142
- puts "accepted: start_time: #{start_time} - end_time: #{end_time}"
143
139
  duration_hrs += hours_between(start_time, end_time)
144
140
  end
145
141
  prev_transition = transition
146
142
  end
147
143
  end
148
144
 
145
+ if current_state != 'accepted' && prev_transition && prev_transition.state == 'started'
146
+ return hours_between(Time.parse(prev_transition.occurred_at.to_s), Time.now)
147
+ end
148
+
149
149
  duration_hrs
150
150
  end
151
151
 
152
152
  def overdue?
153
+ return false if estimate < 0
153
154
  hours >= estimate
154
155
  end
155
156
 
@@ -2,11 +2,11 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: pivotal-tracker-api 1.0.1 ruby lib
5
+ # stub: pivotal-tracker-api 1.0.2 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "pivotal-tracker-api"
9
- s.version = "1.0.1"
9
+ s.version = "1.0.2"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pivotal-tracker-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - jfox