harvested 0.6.2 → 0.6.3

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.
@@ -4,7 +4,7 @@ describe Harvest::TimeEntry do
4
4
  context '#as_json' do
5
5
  it 'builds a specialized hash' do
6
6
  entry = Harvest::TimeEntry.new(:notes => 'the notes', :project_id => 'the project id', :task_id => 'the task id', :hours => 'the hours', :spent_at => Time.utc(2009, 12, 28))
7
- entry.as_json.should == {"notes" => "the notes", "hours" => "the hours", "project_id" => "the project id", "task_id" => "the task id", "spent_at" => "2009-12-28T00:00:00Z"}
7
+ entry.as_json.should == {"notes" => "the notes", "hours" => "the hours", "project_id" => "the project id", "task_id" => "the task id", "spent_at" => "2009-12-28"}
8
8
  end
9
9
  end
10
10
 
@@ -12,12 +12,12 @@ describe Harvest::TimeEntry do
12
12
  it "should parse strings" do
13
13
  date = RUBY_VERSION =~ /1.8/ ? "12/01/2009" : "01/12/2009"
14
14
  entry = Harvest::TimeEntry.new(:spent_at => date)
15
- entry.spent_at.should == Time.parse(date)
15
+ entry.spent_at.should == Date.parse(date)
16
16
  end
17
17
 
18
18
  it "should accept times" do
19
19
  entry = Harvest::TimeEntry.new(:spent_at => Time.utc(2009, 12, 1))
20
- entry.spent_at.should == Time.utc(2009, 12, 1)
20
+ entry.spent_at.should == Date.new(2009, 12, 1)
21
21
  end
22
22
  end
23
23
  end
data/spec/spec_helper.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require 'harvested'
2
2
  require 'webmock/rspec'
3
3
  require 'vcr'
4
+ require 'factory_girl'
4
5
 
5
6
  Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require File.expand_path(f) }
6
7
 
@@ -11,6 +12,8 @@ end
11
12
 
12
13
  FileUtils.rm(Dir["#{VCR.configuration.cassette_library_dir}/*"]) if ENV['VCR_REFRESH'] == 'true'
13
14
 
15
+ FactoryGirl.find_definitions
16
+
14
17
  RSpec.configure do |config|
15
18
  config.include HarvestedHelpers
16
19
 
@@ -37,7 +37,7 @@ module HarvestedHelpers
37
37
  # we store expenses on this date in the tests
38
38
  harvest.expenses.all(Time.utc(2009, 12, 28)).each {|e| harvest.expenses.delete(e) }
39
39
 
40
- %w(expense_categories projects contacts clients tasks).each do |collection|
40
+ %w(expense_categories projects invoices contacts clients tasks).each do |collection|
41
41
  harvest.send(collection).all.each {|m| harvest.send(collection).delete(m) }
42
42
  end
43
43
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: harvested
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-25 00:00:00.000000000 Z
12
+ date: 2012-10-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty
@@ -59,6 +59,38 @@ dependencies:
59
59
  - - ! '>='
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
+ - !ruby/object:Gem::Dependency
63
+ name: yard
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ type: :runtime
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ - !ruby/object:Gem::Dependency
79
+ name: redcarpet
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ! '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ type: :runtime
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
62
94
  - !ruby/object:Gem::Dependency
63
95
  name: rspec
64
96
  requirement: !ruby/object:Gem::Requirement
@@ -155,6 +187,22 @@ dependencies:
155
187
  - - ! '>='
156
188
  - !ruby/object:Gem::Version
157
189
  version: '0'
190
+ - !ruby/object:Gem::Dependency
191
+ name: factory_girl
192
+ requirement: !ruby/object:Gem::Requirement
193
+ none: false
194
+ requirements:
195
+ - - ! '>='
196
+ - !ruby/object:Gem::Version
197
+ version: '0'
198
+ type: :development
199
+ prerelease: false
200
+ version_requirements: !ruby/object:Gem::Requirement
201
+ none: false
202
+ requirements:
203
+ - - ! '>='
204
+ - !ruby/object:Gem::Version
205
+ version: '0'
158
206
  description: Harvested wraps the Harvest API concisely without the use of Rails dependencies.
159
207
  More information about the Harvest API can be found on their website (http://www.getharvest.com/api).
160
208
  For support hit up the Mailing List (http://groups.google.com/group/harvested)
@@ -175,6 +223,7 @@ files:
175
223
  - VERSION
176
224
  - examples/basics.rb
177
225
  - examples/clear_account.rb
226
+ - examples/project_create_script.rb
178
227
  - examples/task_assignments.rb
179
228
  - examples/user_assignments.rb
180
229
  - harvested.gemspec
@@ -189,6 +238,7 @@ files:
189
238
  - lib/harvest/api/expense_categories.rb
190
239
  - lib/harvest/api/expenses.rb
191
240
  - lib/harvest/api/invoice_categories.rb
241
+ - lib/harvest/api/invoice_payments.rb
192
242
  - lib/harvest/api/invoices.rb
193
243
  - lib/harvest/api/projects.rb
194
244
  - lib/harvest/api/reports.rb
@@ -209,6 +259,7 @@ files:
209
259
  - lib/harvest/hardy_client.rb
210
260
  - lib/harvest/invoice.rb
211
261
  - lib/harvest/invoice_category.rb
262
+ - lib/harvest/invoice_payment.rb
212
263
  - lib/harvest/line_item.rb
213
264
  - lib/harvest/model.rb
214
265
  - lib/harvest/project.rb
@@ -220,11 +271,13 @@ files:
220
271
  - lib/harvest/user.rb
221
272
  - lib/harvest/user_assignment.rb
222
273
  - lib/harvested.rb
274
+ - spec/factories.rb
223
275
  - spec/functional/account_spec.rb
224
276
  - spec/functional/clients_spec.rb
225
277
  - spec/functional/errors_spec.rb
226
278
  - spec/functional/expenses_spec.rb
227
279
  - spec/functional/hardy_client_spec.rb
280
+ - spec/functional/invoice_payments_spec.rb
228
281
  - spec/functional/invoice_spec.rb
229
282
  - spec/functional/project_spec.rb
230
283
  - spec/functional/reporting_spec.rb
@@ -235,6 +288,7 @@ files:
235
288
  - spec/harvest/credentials_spec.rb
236
289
  - spec/harvest/expense_category_spec.rb
237
290
  - spec/harvest/expense_spec.rb
291
+ - spec/harvest/invoice_payment_spec.rb
238
292
  - spec/harvest/invoice_spec.rb
239
293
  - spec/harvest/project_spec.rb
240
294
  - spec/harvest/task_assignment_spec.rb
@@ -261,7 +315,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
261
315
  version: '0'
262
316
  segments:
263
317
  - 0
264
- hash: -1819438649824317114
318
+ hash: 985923864508843823
265
319
  required_rubygems_version: !ruby/object:Gem::Requirement
266
320
  none: false
267
321
  requirements:
@@ -270,7 +324,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
270
324
  version: '0'
271
325
  requirements: []
272
326
  rubyforge_project:
273
- rubygems_version: 1.8.23
327
+ rubygems_version: 1.8.24
274
328
  signing_key:
275
329
  specification_version: 3
276
330
  summary: A Ruby Wrapper for the Harvest API http://www.getharvest.com/