ruze 0.1.1 → 0.1.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: 16d4e6bf1c098055bbef8b924d11a7d29692e046b6d3d9dca183c52b1ee96382
4
- data.tar.gz: 331367235605330e8d82e20445926b8a300d7b88d3beb61588eb936426223c28
3
+ metadata.gz: c05176b082da3e8a263b95baf98b6982b0bf1563686fd9c357b575d33c860e2e
4
+ data.tar.gz: a95ddfa50c47176f21bf7b36d5a6be61ec84f5ba8994abd99739f58fac2e292e
5
5
  SHA512:
6
- metadata.gz: a4ceb58ff4754e4a43ce705346d0a6c43171a33e64c2df99940cf5235965452c946ca24bc3e634b48420025c392bb1967f5bed6e15a407961d3da212bad8153d
7
- data.tar.gz: 608db3ee316cd14468820f46719fc90c7f8f6c28ddb58f9d40406559fd03a0c6f3f35adca22e31f83c769515a96a30f649279c87d49aaf5773120de0f681d8be
6
+ metadata.gz: c48c8ac959d98088fca9d2028e281264a37be188a2a94e5bc5233751bf3d9e4463da88b2a4e7eaf7381a16f15448b55e4e0ccfbbce23ebb94bbc6b068e655e2e
7
+ data.tar.gz: 133d2f1b88778b4b01e56f03a1ba6dd629d7968a8030917ba39b14e71487ccb8e2bed733aaa60b7e402912457d75a9f24852f528e44127d93a838b455ec4e9c5
@@ -9,7 +9,7 @@ jobs:
9
9
  strategy:
10
10
  fail-fast: false
11
11
  matrix:
12
- ruby: [ '2.7', '3.0', '3.1' ]
12
+ ruby: ['3.0', '3.1', '3.2', '3.3']
13
13
 
14
14
  steps:
15
15
  - uses: actions/checkout@v3
data/Gemfile CHANGED
@@ -4,19 +4,19 @@ source 'https://rubygems.org'
4
4
  gemspec
5
5
 
6
6
  # Rake is a Make-like program implemented in Ruby (https://github.com/ruby/rake)
7
- gem 'rake', '~> 13.0'
7
+ gem 'rake'
8
8
 
9
- # rspec-3.10.0 (http://github.com/rspec)
10
- gem 'rspec', '~> 3.0'
9
+ # rspec-3.12.0 (http://github.com/rspec)
10
+ gem 'rspec'
11
11
 
12
12
  # Record your test suite's HTTP interactions and replay them during future test runs for fast, deterministic, accurate tests. (https://relishapp.com/vcr/vcr/docs)
13
13
  gem 'vcr'
14
14
 
15
- # Library for stubbing HTTP requests in Ruby. (http://github.com/bblimke/webmock)
15
+ # Library for stubbing HTTP requests in Ruby. (https://github.com/bblimke/webmock)
16
16
  gem 'webmock'
17
17
 
18
18
  # Loads environment variables from `.env`. (https://github.com/bkeepers/dotenv)
19
19
  gem 'dotenv'
20
20
 
21
21
  # Automatic Ruby code style checking tool. (https://github.com/rubocop/rubocop)
22
- gem 'rubocop', '~> 1.7'
22
+ gem 'rubocop'
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2021 Georg Ledermann
3
+ Copyright (c) 2021-2024 Georg Ledermann
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,4 +1,6 @@
1
1
  # RuZE
2
+ [![Test](https://github.com/solectrus/ruze/actions/workflows/main.yml/badge.svg)](https://github.com/solectrus/ruze/actions/workflows/main.yml)
3
+ [![wakatime](https://wakatime.com/badge/user/697af4f5-617a-446d-ba58-407e7f3e0243/project/60f52429-f36d-4981-84e7-930c71a92d95.svg)](https://wakatime.com/badge/user/697af4f5-617a-446d-ba58-407e7f3e0243/project/60f52429-f36d-4981-84e7-930c71a92d95)
2
4
 
3
5
  Unofficial Ruby client to access the API of Renault ZE. Get vehicle data like mileage, charging state and GPS location.
4
6
 
@@ -24,14 +26,13 @@ Or install it yourself as:
24
26
 
25
27
  ## Obtaining API keys
26
28
 
27
- You need two API keys. Both can be obtained from Renault; they're the same for everyone and shouldn't be confused with your email/password credentials. Since the API is apparently not intended for the public, I do not want to publish the API keys here. It's your turn to find them via Google, then store them as ENV variables:
29
+ You need two API keys. Both can be obtained from Renault; they're the same for everyone and shouldn't be confused with your email/password credentials. Since the API is apparently not intended for the public, I do not want to publish the API keys here. It's your turn to find them, then store them as ENV variables:
28
30
 
29
31
  ```bash
30
- export GIGYA_API_KEY=3_7P...
31
- export KAMEREON_API_KEY=VAX7...
32
+ export GIGYA_API_KEY=...
33
+ export KAMEREON_API_KEY=...
32
34
  ```
33
35
 
34
- Hint: https://gist.github.com/mountbatt/772e4512089802a2aa2622058dd1ded7
35
36
 
36
37
 
37
38
  ## Usage
@@ -105,6 +106,8 @@ This project is not affiliated with, endorsed by, or connected to Renault. I acc
105
106
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
106
107
 
107
108
 
109
+ Copyright (c) 2021-2024 Georg Ledermann, released under the AGPL-3.0 License
110
+
108
111
  ## Code of Conduct
109
112
 
110
113
  Everyone interacting in the Renault project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/solectrus/ruze/blob/main/CODE_OF_CONDUCT.md).
data/lib/ruze/kamereon.rb CHANGED
@@ -46,7 +46,7 @@ module Ruze
46
46
 
47
47
  def cockpit
48
48
  @cockpit ||= return_from get(
49
- uri("/accounts/#{account_id}/kamereon/kca/car-adapter/v2/cars/#{vin}/cockpit?country=#{COUNTRY}"),
49
+ uri("/accounts/#{account_id}/kamereon/kca/car-adapter/v1/cars/#{vin}/cockpit?country=#{COUNTRY}"),
50
50
  headers
51
51
  ), keys: %w[data attributes]
52
52
  end
@@ -56,6 +56,10 @@ module Ruze
56
56
  uri("/accounts/#{account_id}/kamereon/kca/car-adapter/v1/cars/#{vin}/location?country=#{COUNTRY}"),
57
57
  headers
58
58
  ), keys: %w[data attributes]
59
+ rescue Error => e
60
+ raise e unless e.message.include?('404')
61
+
62
+ {}
59
63
  end
60
64
 
61
65
  private
data/lib/ruze/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ruze
2
- VERSION = '0.1.1'.freeze
2
+ VERSION = '0.1.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruze
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Georg Ledermann
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-04-02 00:00:00.000000000 Z
11
+ date: 2024-04-16 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Queries vehicle data like mileage, charging state and GPS location
14
14
  email:
@@ -58,7 +58,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
58
58
  - !ruby/object:Gem::Version
59
59
  version: '0'
60
60
  requirements: []
61
- rubygems_version: 3.3.10
61
+ rubygems_version: 3.5.9
62
62
  signing_key:
63
63
  specification_version: 4
64
64
  summary: Unofficial Ruby client for the Renault ZE API