aleph_api 0.2.0 → 0.2.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 222c7396839063fb5d61484ef201b06b5c2af46a
4
- data.tar.gz: f0a4590805f70d135053f8599e5615182d8e455a
3
+ metadata.gz: 1352602d9dbe52b7cf03378bfbe1f66f6e44f934
4
+ data.tar.gz: 17d52ff31e2de3379085281e86ee9fc958950b89
5
5
  SHA512:
6
- metadata.gz: d472688306022b19d1dbe71e0fa3299e6e22bf569b6374de2a4f0dbfecd8aecfbe7b82d4a23d5ca8c78851c9ffcef00fd8ec700080b8a3d6a5f808ca63911382
7
- data.tar.gz: fab4df3a58c5dbb3e3f391a0a2227410c61cc5d23bd7c69daaadee827dbc5df4acf91bf9ec3fefa463d719e51842a09e78beee83bb6902de3027a474d915b2d6
6
+ metadata.gz: 7b2624a832dcdbdaefa6e16c6f0730914103f2b8728db32cc25edb5640ee42a96eeebb7784d3df6d1547810c22207ebfa33192ef4ba5d0ad5541bda6d444a476
7
+ data.tar.gz: 5e4aae621978c2501b5995dc23f0d86531ea227e228b0bb594da4379f95be74af01c1b1ffd9643eaf9f2d3140c8ebbaab7dd06be3439414b08d45423b00450e0
@@ -8,14 +8,16 @@ class AlephApi::RestfulApiClient::Patron::CirculationActions::Loans
8
8
  end
9
9
 
10
10
  def get(options = {})
11
- if @loan_id
12
- @client.http(:get, "/patron/#{@patron_id}/circulationActions/loans/#{@loan_id}", options).try do |_response|
13
- _response.body
14
- end
15
- else
16
- @client.http(:get, "/patron/#{@patron_id}/circulationActions/loans", options).try do |_response|
17
- _response.body
18
- end
19
- end
11
+ @client.http(:get, url, options).try(:body)
12
+ end
13
+
14
+ def post(options = {})
15
+ @client.http(:post, url, options).try(:body)
16
+ end
17
+
18
+ private
19
+
20
+ def url
21
+ "/patron/#{@patron_id}/circulationActions/loans/#{@loan_id}".sub(/\/\Z/, "")
20
22
  end
21
23
  end
@@ -1,3 +1,3 @@
1
1
  module AlephApi
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aleph_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Sievers
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-11-06 00:00:00.000000000 Z
11
+ date: 2015-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport