freshtrack 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -2,3 +2,8 @@
2
2
 
3
3
  * 1 major enhancement:
4
4
  * Initial release
5
+
6
+ == 0.2.1 2008-02-27
7
+
8
+ * 1 major enhancement:
9
+ * Update to use API 2.1
data/README.txt CHANGED
@@ -27,4 +27,4 @@ The 'Company Name' is the XXX in 'XXX.freshbooks.com'. The 'project_name' is the
27
27
 
28
28
  NOTE: As of this writing, punch (0.0.1) specifically requires attributes version 5.0.0 even though 5.0.1 is out.
29
29
  Because of the way gems work, punch will not work if both are installed. Make sure the specific installed version
30
- of attributes is 5.0.0.
30
+ of attributes is 5.0.0.
data/config/hoe.rb CHANGED
@@ -60,7 +60,7 @@ hoe = Hoe.new(GEM_NAME, VERS) do |p|
60
60
  # == Optional
61
61
  p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
62
62
  p.extra_deps = [ # An array of rubygem dependencies [name, version], e.g. [ ['active_support', '>= 1.3.1'] ]
63
- ['freshbooks', '>= 1.0.0'],
63
+ ['freshbooks', '>= 2.1'],
64
64
  ['punch', '>= 0.0.1']
65
65
  ]
66
66
 
@@ -14,7 +14,8 @@ module FreshBooks
14
14
  def list(options = {})
15
15
  resp = FreshBooks.call_api('project.list', options)
16
16
  return nil unless resp.success?
17
- resp.elements.collect { |elem| new_from_xml(elem) }
17
+ list_elements = resp.elements[1].elements
18
+ list_elements.collect { |elem| new_from_xml(elem) }
18
19
  end
19
20
 
20
21
  def find_by_name(name)
@@ -14,7 +14,8 @@ module FreshBooks
14
14
  def list(options = {})
15
15
  resp = FreshBooks.call_api('task.list', options)
16
16
  return nil unless resp.success?
17
- resp.elements.collect { |elem| new_from_xml(elem) }
17
+ list_elements = resp.elements[1].elements
18
+ list_elements.collect { |elem| new_from_xml(elem) }
18
19
  end
19
20
 
20
21
  def find_by_name(name)
@@ -17,7 +17,8 @@ module FreshBooks
17
17
  def list(options = {})
18
18
  resp = FreshBooks.call_api('time_entry.list', options)
19
19
  return nil unless resp.success?
20
- resp.elements.collect { |elem| new_from_xml(elem) }
20
+ list_elements = resp.elements[1].elements
21
+ list_elements.collect { |elem| new_from_xml(elem) }
21
22
  end
22
23
 
23
24
  def delete(time_entry_id)
@@ -2,7 +2,7 @@ module Freshtrack #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 2
5
- TINY = 0
5
+ TINY = 1
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
data/spec/project_spec.rb CHANGED
@@ -243,8 +243,8 @@ describe FreshBooks::Project do
243
243
  describe 'getting a list' do
244
244
  before :each do
245
245
  @project_id = 1
246
- @elements = Array.new(3) { stub('element') }
247
- @response = stub('response', :elements => @elements, :success? => nil)
246
+ @elements = Array.new(3) { stub('list element') }
247
+ @response = stub('response', :elements => [stub('pre element'), stub('element', :elements => @elements), stub('post element')], :success? => nil)
248
248
  FreshBooks.stubs(:call_api).returns(@response)
249
249
  end
250
250
 
data/spec/task_spec.rb CHANGED
@@ -235,8 +235,8 @@ describe FreshBooks::Task do
235
235
  describe 'getting a list' do
236
236
  before :each do
237
237
  @task_id = 1
238
- @elements = Array.new(3) { stub('element') }
239
- @response = stub('response', :elements => @elements, :success? => nil)
238
+ @elements = Array.new(3) { stub('list element') }
239
+ @response = stub('response', :elements => [stub('pre element'), stub('element', :elements => @elements), stub('post element')], :success? => nil)
240
240
  FreshBooks.stubs(:call_api).returns(@response)
241
241
  end
242
242
 
@@ -251,8 +251,8 @@ describe FreshBooks::TimeEntry do
251
251
  describe 'getting a list' do
252
252
  before :each do
253
253
  @time_entry_id = 1
254
- @elements = Array.new(3) { stub('element') }
255
- @response = stub('response', :elements => @elements, :success? => nil)
254
+ @elements = Array.new(3) { stub('list element') }
255
+ @response = stub('response', :elements => [stub('pre element'), stub('element', :elements => @elements), stub('post element')], :success? => nil)
256
256
  FreshBooks.stubs(:call_api).returns(@response)
257
257
  end
258
258
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: freshtrack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ""
6
6
  authors:
7
7
  - Yossef Mendelssohn
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-01-30 00:00:00 -06:00
12
+ date: 2008-02-27 00:00:00 -06:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -19,7 +19,7 @@ dependencies:
19
19
  requirements:
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 1.0.0
22
+ version: "2.1"
23
23
  version:
24
24
  - !ruby/object:Gem::Dependency
25
25
  name: punch