pastvu 1.0.1 → 1.0.2

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: 8e0e14db9b88b1a72bfe18b3480d679bb07bcc253e263cd81a054d2d23dd8569
4
- data.tar.gz: 16306a452f788174418ff4342cf378f422d3660b43168c09ecb4f067c3b252d8
3
+ metadata.gz: 50bc81084dca16460f3de01a114b870bc9139d7761b1ae858763774559aa3668
4
+ data.tar.gz: 56cee8527470031d0e93b942bd44408e987d37e26892a08220c9fc9a0fe53b22
5
5
  SHA512:
6
- metadata.gz: b27fa83719e8d559d5dbcbf1e7aa4ed9893434c6ca58c1cfe8e70d669b95e6504537f3e273edb701aa2697fea6444dd57d49113a739e26b31fb443569e72d151
7
- data.tar.gz: 10df7d1c9dd47ae926be00470ae374215e059bfe18606b1556dbbcd567e025bafb0602e4f0f97457609ceef31745be6d98537eeaf868585d305c769c467d4ad6
6
+ metadata.gz: ae98ebbf32c9fb79f856c4bc5e6e0cafb02b431ae3a62d71dbf350682014dc6f4d14293b46a5fc542f1a78018668934e54e1d80abf2f9bf9d60de30c758c9d66
7
+ data.tar.gz: b0e6ece8d5076fcca3a890c109b58e4abeb1f6ea4baf545569cc971b903858e739bf360d010c1bb29f1d4636eb81be178ec69cee8ac936d1d1cf2e4df25b4d4f
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [1.0.2] - 2024-10-24
2
+ - Remove Addressable dependency
3
+ - Fix README errors
4
+
1
5
  ## [1.0.1] - 2023-1-12
2
6
  - In README, remove the installation instruction to specify version in the Gemfile
3
7
  - In README, add To do section
data/README.md CHANGED
@@ -97,9 +97,9 @@ photo_collection.each_with_index do |photo, i|
97
97
  desired_path_to_photo = "awesome_photo_number_#{i + 1}.jpg"
98
98
 
99
99
  # All return File object:
100
- photo.download(desired_path_to_photo, :standard)
101
- photo.download(desired_path_to_photo, :original)
102
- photo.download(desired_path_to_photo, :thumb) # or :thumbnail
100
+ photo.download(:standard, desired_path_to_photo)
101
+ photo.download(:original, desired_path_to_photo)
102
+ photo.download(:thumb, desired_path_to_photo) # or :thumbnail
103
103
  end
104
104
  ```
105
105
 
@@ -11,7 +11,7 @@ module Pastvu
11
11
 
12
12
  DEFAULT_VALUES = {
13
13
  default_host: "pastvu.com",
14
- default_path: "api2",
14
+ default_path: "/api2",
15
15
  default_user_agent: "Ruby PastVu Gem/#{VERSION}, #{RUBY_PLATFORM}, Ruby/#{RUBY_VERSION}",
16
16
  default_ensure_successful_responses: true,
17
17
  default_check_params_type: true,
@@ -1,5 +1,4 @@
1
1
  require "net/http"
2
- require "addressable"
3
2
  require "open-uri"
4
3
 
5
4
  module Pastvu
@@ -24,19 +23,16 @@ module Pastvu
24
23
  @response = response.body
25
24
  end
26
25
  end
27
-
26
+
28
27
  def build_uri
29
- uri = Addressable::URI.new({ scheme: 'https', host: Pastvu.config.host })
30
-
31
- template = Addressable::Template.new(uri.to_s + "{/path*}" + "{?query*}")
32
-
33
- template.expand({
34
- "path" => Pastvu.config.path,
35
- "query" => {
36
- "method" => @method,
37
- "params" => JSON.dump(@params)
38
- }
39
- })
28
+ query = {
29
+ method: @method,
30
+ params: JSON.dump(@params)
31
+ }
32
+
33
+ URI::HTTPS.build(host: Pastvu.config.host,
34
+ path: Pastvu.config.path,
35
+ query: URI.encode_www_form(query))
40
36
  end
41
37
  end
42
38
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Pastvu
4
- VERSION = "1.0.1"
4
+ VERSION = "1.0.2"
5
5
  end
data/pastvu.gemspec CHANGED
@@ -20,7 +20,6 @@ Gem::Specification.new do |spec|
20
20
  end
21
21
  end
22
22
 
23
- spec.add_dependency "addressable", "~> 2.8"
24
23
  spec.add_development_dependency "rspec", "~> 3.0"
25
24
  spec.add_development_dependency "webmock", "~> 3.19"
26
25
  end
metadata CHANGED
@@ -1,29 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pastvu
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evgeny Nedoborskiy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-12 00:00:00.000000000 Z
11
+ date: 2024-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: addressable
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '2.8'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '2.8'
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: rspec
29
15
  requirement: !ruby/object:Gem::Requirement