stekker_zaptec 1.0.1 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1cdb9b4535827b0db36d1ad90cf5de024e3dd501cf5c9ee122ca65f588f80a23
4
- data.tar.gz: 9767780755997f13186fc90494a0077e325419061d9e82409b55922aa2914a96
3
+ metadata.gz: b93472771162eced218695ad47612b8d001d0b562669077af092de5ac5733d81
4
+ data.tar.gz: 78d184fb7979d966be2944c575a70444372555ea78101163f78c8565b5a90cec
5
5
  SHA512:
6
- metadata.gz: d49d9b6eb31cc4a7a3ab60783ab1aceb80561ef58a70fdc732de4998a0fdfd0fd172db90d166523293f78c5547baf184dc7b94efe525ba4f5f6885fc06181492
7
- data.tar.gz: 59a6a81dddcbb0beba039c6f8bef5e2668180c0cea753b83c5d0c5cc24cbaa023ed06742768ff53a383b257b169a5c2317d720a0c656fe3595bba720a43bd9cd
6
+ metadata.gz: d9930219d2b59aea5968498626b3289e40762a83afdfbd177605e4909ec9424cf588ca62f29b6162bce63803f4a4dd4a1ee06631451251cc547fb8678712bfc4
7
+ data.tar.gz: 5674b39478d6d644036f4ea5e85794e5331ef0440775d83ee21c46e36fd98e0f77e5b09d5e112f9c0238a7269fbf784a52449f08a55a05c9e8738bf870af2b07
data/.rspec CHANGED
@@ -1 +1,3 @@
1
+ --format documentation
2
+ --color
1
3
  --require spec_helper
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- stekker_zaptec (1.0.1)
4
+ stekker_zaptec (1.1.1)
5
5
  activemodel
6
6
  activesupport
7
7
  faraday
data/README.md CHANGED
@@ -24,17 +24,17 @@ goals.
24
24
 
25
25
  Add this line to your application's Gemfile:
26
26
 
27
- gem "zaptec"
27
+ ```ruby
28
+ gem "stekker_zaptec"
28
29
  ```
29
30
 
30
- ```ruby
31
31
  And then execute:
32
32
 
33
33
  $ bundle install
34
34
 
35
35
  Or install it yourself as:
36
36
 
37
- $ gem install zaptec
37
+ $ gem install stekker_zaptec
38
38
 
39
39
  ## Usage
40
40
 
@@ -45,10 +45,8 @@ $ bin/console
45
45
  ```
46
46
 
47
47
  ```ruby
48
- require "zaptec"
49
-
50
48
  client = Zaptec::Client.new
51
- client.login("username@example.com", "password")
49
+ client.authorize(username: "username@example.com", password: "password")
52
50
  # #<Zaptec::Credentials:0x000000011c35d708
53
51
 
54
52
  # Get a list of chargers
data/bin/console CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  require "bundler/setup"
3
- require "zaptec"
3
+ require "stekker_zaptec"
4
4
 
5
5
  # You can add fixtures and/or initialization code here to make experimenting
6
6
  # with your gem easier. You can also use a different console, if you like.
File without changes
@@ -4,6 +4,8 @@ module Zaptec
4
4
  def observation_state_id_to_name(state_id:, device_type:)
5
5
  device_type_observation_ids(device_type)
6
6
  .fetch(state_id)
7
+ rescue KeyError
8
+ "Unknown state id '#{state_id}' (device type '#{device_type}')"
7
9
  end
8
10
 
9
11
  def charger_operation_mode_to_name(operation_mode)
@@ -1,3 +1,3 @@
1
1
  module Zaptec
2
- VERSION = "1.0.1".freeze
2
+ VERSION = "1.1.1".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stekker_zaptec
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Team Stekker
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-02-06 00:00:00.000000000 Z
11
+ date: 2023-02-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -82,14 +82,10 @@ files:
82
82
  - Gemfile.lock
83
83
  - README.md
84
84
  - Rakefile
85
- - StekkerWeb/gems/zaptec/.gitignore
86
- - StekkerWeb/gems/zaptec/.rspec
87
- - StekkerWeb/gems/zaptec/.rubocop.yml
88
- - StekkerWeb/gems/zaptec/.ruby-version
89
85
  - bin/console
90
86
  - bin/setup
91
87
  - data/constants.json
92
- - lib/zaptec.rb
88
+ - lib/stekker_zaptec.rb
93
89
  - lib/zaptec/charger.rb
94
90
  - lib/zaptec/client.rb
95
91
  - lib/zaptec/constants.rb
@@ -1,11 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
4
- /coverage/
5
- /doc/
6
- /pkg/
7
- /spec/reports/
8
- /tmp/
9
-
10
- # rspec failure tracking
11
- .rspec_status
@@ -1,3 +0,0 @@
1
- --format documentation
2
- --color
3
- --require spec_helper
@@ -1 +0,0 @@
1
- ../../.rubocop.yml
@@ -1 +0,0 @@
1
- ../../.ruby-version