harvested 0.6.1 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
data/HISTORY CHANGED
@@ -1,3 +1,5 @@
1
+ 0.6.2 - August 25, 2012
2
+ * Fixing Mash constructor errors
1
3
  0.6.1 - August 22, 2012
2
4
  * Adds options to "all" finder (thanks Mikel Lindsaar)
3
5
  * Adds Unauthorized error type (thanks @bcobb)
data/README.md CHANGED
@@ -53,7 +53,6 @@ Harvested's tests are currently passing for 1.8.7, 1.9.2, JRuby 1.6.2, and Rubin
53
53
  * [Harvested Documentation](http://rdoc.info/projects/zmoazeni/harvested)
54
54
  * [Harvest API Documentation](http://www.getharvest.com/api)
55
55
  * [Source Code for Harvested](http://github.com/zmoazeni/harvested)
56
- * [Mailing List for Harvested](http://groups.google.com/group/harvested)
57
56
 
58
57
  ## How to Contribute
59
58
 
@@ -91,6 +90,3 @@ Each runtime needs to be installed in rvm along with the bundler gem.
91
90
 
92
91
  Estimates aren't currently supported due to lack of an API. If this opens up, harvested will include them.
93
92
 
94
- ## Copyright
95
-
96
- Copyright (c) 2010-2011 Zach Moazeni. See LICENSE for details.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.1
1
+ 0.6.2
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "harvested"
8
- s.version = "0.6.1"
8
+ s.version = "0.6.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Zach Moazeni"]
12
- s.date = "2012-08-23"
12
+ s.date = "2012-08-25"
13
13
  s.description = "Harvested wraps the Harvest API concisely without the use of Rails dependencies. More information about the Harvest API can be found on their website (http://www.getharvest.com/api). For support hit up the Mailing List (http://groups.google.com/group/harvested)"
14
14
  s.email = "zach.moazeni@gmail.com"
15
15
  s.extra_rdoc_files = [
@@ -6,8 +6,8 @@ module Harvest
6
6
  delegate_methods(:billed? => :is_billed,
7
7
  :closed? => :is_closed)
8
8
 
9
- def initialize(args = {})
10
- args = args.stringify_keys
9
+ def initialize(args = {}, _ = nil)
10
+ args = args.to_hash.stringify_keys
11
11
  self.spent_at = args.delete("spent_at") if args["spent_at"]
12
12
  super
13
13
  end
@@ -17,7 +17,7 @@ module Harvest
17
17
  end
18
18
 
19
19
  def as_json(args = {})
20
- super(args).stringify_keys.tap do |hash|
20
+ super(args).to_hash.stringify_keys.tap do |hash|
21
21
  hash[json_root].update("spent_at" => (spent_at.nil? ? nil : spent_at.to_time.xmlschema))
22
22
  hash[json_root].delete("has_receipt")
23
23
  hash[json_root].delete("receipt_url")
@@ -9,9 +9,9 @@ module Harvest
9
9
  def self.json_root; "doc"; end
10
10
  # skip_json_root true
11
11
 
12
- def initialize(args = {})
12
+ def initialize(args = {}, _ = nil)
13
13
  @line_items = []
14
- args = args.stringify_keys
14
+ args = args.to_hash.stringify_keys
15
15
  self.line_items = args.delete("csv_line_items")
16
16
  self.line_items = args.delete("line_items")
17
17
  super
@@ -2,8 +2,8 @@ module Harvest
2
2
  class TaskAssignment < Hashie::Mash
3
3
  include Harvest::Model
4
4
 
5
- def initialize(args = {})
6
- args = args.stringify_keys
5
+ def initialize(args = {}, _ = nil)
6
+ args = args.to_hash.stringify_keys
7
7
  self.task = args.delete("task") if args["task"]
8
8
  self.project = args.delete("project") if args["project"]
9
9
  super
@@ -6,8 +6,8 @@ module Harvest
6
6
  delegate_methods(:closed? => :is_closed,
7
7
  :billed? => :is_billed)
8
8
 
9
- def initialize(args = {})
10
- args = args.stringify_keys
9
+ def initialize(args = {}, _ = nil)
10
+ args = args.to_hash.stringify_keys
11
11
  self.spent_at = args.delete("spent_at") if args["spent_at"]
12
12
  super
13
13
  end
@@ -17,7 +17,7 @@ module Harvest
17
17
  end
18
18
 
19
19
  def as_json(args = {})
20
- super(args).stringify_keys.tap do |hash|
20
+ super(args).to_hash.stringify_keys.tap do |hash|
21
21
  hash.update("spent_at" => (spent_at.nil? ? nil : spent_at.to_time.xmlschema))
22
22
  end
23
23
  end
@@ -24,10 +24,10 @@ module Harvest
24
24
  :admin? => :is_admin,
25
25
  :contractor? => :is_contractor)
26
26
 
27
- def initialize(args = {})
28
- args = args.stringify_keys
27
+ def initialize(args = {}, _ = nil)
28
+ args = args.to_hash.stringify_keys
29
29
  args["is_admin"] = args.delete("admin") if args["admin"]
30
- self.timezone = args.delete("timezone") if args["timezone"]
30
+ self.timezone = args.delete("timezone") if args["timezone"]
31
31
  super
32
32
  end
33
33
 
@@ -4,8 +4,8 @@ module Harvest
4
4
 
5
5
  delegate_methods :project_manager? => :is_project_manager
6
6
 
7
- def initialize(args = {})
8
- args = args.stringify_keys
7
+ def initialize(args = {}, _ = nil)
8
+ args = args.to_hash.stringify_keys
9
9
  self.user = args.delete("user") if args["user"]
10
10
  self.project = args.delete("project") if args["project"]
11
11
  super
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.1
4
+ version: 0.6.2
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-23 00:00:00.000000000 Z
12
+ date: 2012-08-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty
@@ -261,7 +261,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
261
261
  version: '0'
262
262
  segments:
263
263
  - 0
264
- hash: -3050275460586809448
264
+ hash: -1819438649824317114
265
265
  required_rubygems_version: !ruby/object:Gem::Requirement
266
266
  none: false
267
267
  requirements: