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 +4 -4
- data/CHANGELOG.md +3 -0
- data/Gemfile.lock +1 -17
- data/lib/piwigo/albums.rb +1 -1
- data/lib/piwigo/images.rb +2 -2
- data/lib/piwigo/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 43b32bd1bcf777d69dc54b99ec4f3ab2b104ca59af264fa1dfc5724d40bdc221
|
|
4
|
+
data.tar.gz: 7d7b80f00e3a9733bdb8202d1489570f8bc163ceb3a3176ef97ff478437aade7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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.
|
|
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
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
|
-
|
|
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}"
|
data/lib/piwigo/version.rb
CHANGED