piwigo-api 0.5.0 → 0.5.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
  SHA256:
3
- metadata.gz: 25b24077502730104d7ff8bb0fc3e4de59c1de1de94157936dd80846da1ee876
4
- data.tar.gz: ecc50b004fc354d5f45599c745ccec83a5f77293eed1fd41d4ab34280e23cde9
3
+ metadata.gz: 43b32bd1bcf777d69dc54b99ec4f3ab2b104ca59af264fa1dfc5724d40bdc221
4
+ data.tar.gz: 7d7b80f00e3a9733bdb8202d1489570f8bc163ceb3a3176ef97ff478437aade7
5
5
  SHA512:
6
- metadata.gz: 7de1e335ce5f1a13e912cce73fe2cd3312876d687a64cc3ae488f419c11849b9484ba70d60393215566c3de8c6e9f489d9fdc1099d755c6f7670234a46ce83f6
7
- data.tar.gz: 8cbc75ee1512e858c9190263c1c4a741ffccf0d71249c8813e7c501c73785534db59eefb85de8ddd472d6d519dd890a7609e41e7a4374d1fd9c869011cc6e6cb
6
+ metadata.gz: 0e05d77f7f5a347ac7fb10bf046704c2367411417b26714966fe82a4b1514292edcb0225af52b87998a57b69e3449976b64ad1bcbb14f3f9bf2a20eac12b962a
7
+ data.tar.gz: e1d071144af4c9fa1f9786f71f25d91f971a764dcc22dc6bbec67cbb0fc6ac4a5e3a9d94a2c73b548c6ea33a7044ba6b3d90e5faa069531a47f37fb8ab7caf85
data/CHANGELOG.md CHANGED
@@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ 0.5.1 - 2019-11-23
8
+ - Fixed image.lookup
9
+
7
10
  0.5.0 - 2019-11-23
8
11
  - Added a directory of example scripts
9
12
  - Added a folder-album syncronization methods
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- piwigo-api (0.5.0)
4
+ piwigo-api (0.5.1)
5
5
  http (~> 4.2)
6
6
  logger (~> 1.4)
7
7
 
@@ -14,11 +14,9 @@ GEM
14
14
  json
15
15
  simplecov
16
16
  url
17
- diff-lcs (1.3)
18
17
  docile (1.3.2)
19
18
  domain_name (0.5.20190701)
20
19
  unf (>= 0.0.5, < 1.0.0)
21
- ffi (1.11.2)
22
20
  ffi (1.11.2-x64-mingw32)
23
21
  ffi-compiler (1.0.1)
24
22
  ffi (>= 1.0.0)
@@ -38,19 +36,6 @@ GEM
38
36
  minitest (5.13.0)
39
37
  public_suffix (4.0.1)
40
38
  rake (10.5.0)
41
- rspec (3.9.0)
42
- rspec-core (~> 3.9.0)
43
- rspec-expectations (~> 3.9.0)
44
- rspec-mocks (~> 3.9.0)
45
- rspec-core (3.9.0)
46
- rspec-support (~> 3.9.0)
47
- rspec-expectations (3.9.0)
48
- diff-lcs (>= 1.2.0, < 2.0)
49
- rspec-support (~> 3.9.0)
50
- rspec-mocks (3.9.0)
51
- diff-lcs (>= 1.2.0, < 2.0)
52
- rspec-support (~> 3.9.0)
53
- rspec-support (3.9.0)
54
39
  simplecov (0.17.1)
55
40
  docile (~> 1.1)
56
41
  json (>= 1.8, < 3)
@@ -71,7 +56,6 @@ DEPENDENCIES
71
56
  minitest (~> 5.0)
72
57
  piwigo-api!
73
58
  rake (~> 10.0)
74
- rspec (~> 3.9)
75
59
 
76
60
  BUNDLED WITH
77
61
  2.0.2
data/lib/piwigo/albums.rb CHANGED
@@ -105,7 +105,7 @@ module Piwigo
105
105
  end
106
106
  end
107
107
 
108
- # lookup a specific Album from a list of albums
108
+ # Lookup a specific Album from a list of albums
109
109
  #
110
110
  # @param [<Type>] session
111
111
  # @param [<Type>] album_name - Name of the album to locate
data/lib/piwigo/images.rb CHANGED
@@ -154,14 +154,14 @@ module Piwigo
154
154
  }
155
155
  request.set_form_data(form)
156
156
  request['Cookie'] = [session.id]
157
+ p file_sum
157
158
 
158
159
  # Send the request
159
160
  response = http.request(request)
160
161
  if response.code == '200'
161
162
  data = JSON.parse(response.body)
162
163
  logger.info "Image lookup succeeded: #{data['result']}"
163
- result = data['result'][file_sum]
164
- result.nil? ? nil : result[file_sum]
164
+ data['result'][file_sum]
165
165
  end
166
166
  rescue Timeout::Error, Errno::EINVAL, Errno::ECONNRESET, EOFError, Net::HTTPBadResponse, Net::HTTPHeaderSyntaxError, Net::ProtocolError => e
167
167
  logger.error "Image lookup failed: #{e.message}"
@@ -1,3 +1,3 @@
1
1
  module Piwigo
2
- VERSION = '0.5.0'.freeze
2
+ VERSION = '0.5.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: piwigo-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrian Gilbert