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 +5 -0
- data/README.txt +1 -1
- data/config/hoe.rb +1 -1
- data/lib/freshbooks/extensions/project.rb +2 -1
- data/lib/freshbooks/extensions/task.rb +2 -1
- data/lib/freshbooks/extensions/time_entry.rb +2 -1
- data/lib/freshtrack/version.rb +1 -1
- data/spec/project_spec.rb +2 -2
- data/spec/task_spec.rb +2 -2
- data/spec/time_entry_spec.rb +2 -2
- metadata +3 -3
data/History.txt
CHANGED
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
|
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.
|
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.
|
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.
|
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)
|
data/lib/freshtrack/version.rb
CHANGED
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
|
|
data/spec/time_entry_spec.rb
CHANGED
@@ -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.
|
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-
|
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
|
22
|
+
version: "2.1"
|
23
23
|
version:
|
24
24
|
- !ruby/object:Gem::Dependency
|
25
25
|
name: punch
|