adp-downloader 0.2.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 980f8c4dc82ef6afc55e1db3d09749f3cbe6f458
4
- data.tar.gz: ea629da340c356971c5ee23d49bc017e0888e7b1
3
+ metadata.gz: a4956fc33bceb12c43fae6e8a2667828524b0e86
4
+ data.tar.gz: 70acb5b0cda437e1ba652f854d2032012059d747
5
5
  SHA512:
6
- metadata.gz: 331654ef077e937d1556f3eb4878ae8c37a737b3c9aeb9f3f691f8f2d1858e76c7484ab0c543af7327afc6dc77cc30f89938aa7eb2e25c027c0fbb58ffbdbd0c
7
- data.tar.gz: afef72a5b199f7f50f239fed12895cb15619366012deb574f1ee8adb7135732c80b19a433e8bf4be1afd809d2302ea4654c8f899e486877cc2ba5f1f5e472bc5
6
+ metadata.gz: d811e831b8ce53644974f6e2b9361f33b009cc4c2cb835436241b16224d2433ff03fe21d58d0ef1aea7a9cdc4826c4ba8ebc3f5614690d078de5ff3d52ad6109
7
+ data.tar.gz: 8e907f3793fe04cd286bab418d0fb4d1b4484a95e3cb4e615fbda091bfa776f1d6a46975af1cc8c91662a7e3e8063e82a16116a006835d7d649c9e5988c86083
@@ -6,6 +6,20 @@ Changelog
6
6
  * -
7
7
 
8
8
 
9
+ ## 0.2.5
10
+
11
+ * [00e3ff6][] Gracefully handle empty tax or pay statements
12
+
13
+ [00e3ff6]: ../../commit/00e3ff6
14
+
15
+
16
+ ## 0.2.4
17
+
18
+ * [91dfaaa][] Add --version cmdline option
19
+
20
+ [91dfaaa]: ../../commit/91dfaaa
21
+
22
+
9
23
  ## 0.2.3
10
24
 
11
25
  * [f73306b][] Add employer cmdline option
@@ -13,12 +13,12 @@ module ADPDownloader
13
13
 
14
14
  def pay_statements
15
15
  response = @http_client.get(full_url(PAY_STATEMENTS_PATH))
16
- response["payStatements"].map { |json| PayStatement.new(json) }
16
+ response.fetch("payStatements", []).map { |json| PayStatement.new(json) }
17
17
  end
18
18
 
19
19
  def tax_statements
20
20
  response = @http_client.get(full_url(TAX_STATEMENTS_PATH))
21
- response["workerTaxStatements"].map { |json| TaxStatement.new(json) }
21
+ response.fetch("workerTaxStatements", []).map { |json| TaxStatement.new(json) }
22
22
  end
23
23
 
24
24
  def download_statement_files(statement)
@@ -11,7 +11,8 @@ module ADPDownloader
11
11
  end
12
12
 
13
13
  def get(url)
14
- JSON.parse(download(url))
14
+ contents = download(url)
15
+ contents.to_s.empty? ? {} : JSON.parse(contents)
15
16
  end
16
17
 
17
18
  def post(url, data)
@@ -1,3 +1,3 @@
1
1
  module ADPDownloader
2
- VERSION = "0.2.4"
2
+ VERSION = "0.2.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adp-downloader
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anderson Mesquita (andersonvom)
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-09 00:00:00.000000000 Z
11
+ date: 2017-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mechanize
@@ -142,7 +142,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
142
142
  version: '0'
143
143
  requirements: []
144
144
  rubyforge_project:
145
- rubygems_version: 2.6.8
145
+ rubygems_version: 2.6.13
146
146
  signing_key:
147
147
  specification_version: 4
148
148
  summary: ADP pay statement / pay stub downloader from MyADP