hu 2.0.25 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/hu/scale.rb +3 -3
  3. data/lib/hu/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2d5d7512f4a0af297c2552cf42f8e84065fd71025fae92117442888282fd59a3
4
- data.tar.gz: baedf47c708fbd04f14c23b1152f077eb7615e74eefae18ffd617450c6b2e467
3
+ metadata.gz: 5ef35acb141cf349673d4799f2ff577a8a5efdf26fdddf43f74936167b043009
4
+ data.tar.gz: '088b4e4534a62f3e35bf88e17d9180c79c8c46f69271ac2a1a8670b21fcc52fd'
5
5
  SHA512:
6
- metadata.gz: 3a490b244aafd1459317be746c47c1242ce65ff8a2b738664795ed4b9bdc775eb0fecd4b3b70aa4bdb1e534ba9eafa8b4da807b28925496d8a1bafe73d90bfe8
7
- data.tar.gz: ada9265b5d0efe9da499948d01cdf1f7f13de661397878bf8219ed217b7ed30649afbca25ed8e21ed460f01dec12251373626b46f1c5161f6ac62bf6f5f51c96
6
+ metadata.gz: 278827d8509efd6999b24704be77eaf3e87a0f3b0a536b62c8fb64fdbd1df6effeff2de488ed5b35e3b03bcf03f52811c250184609443733d02822426e9ea2af
7
+ data.tar.gz: c0550c95650ccfebb7867acdb343d8cc844f32f3cd4f26593b8d17781452417a5e036020a4eef6b802514a4c7f9dff4191a73c769ab4fe9f4bea0c9131661f76
data/lib/hu/scale.rb CHANGED
@@ -6,7 +6,7 @@ module Hu
6
6
  class Scale < Optix::Cli
7
7
  DYNO_TYPES = [
8
8
  {
9
- id: 'free',
9
+ id: 'eco',
10
10
  sleeps: true,
11
11
  pro: false,
12
12
  ram: 512,
@@ -17,7 +17,7 @@ module Hu
17
17
  color: "\e[0;32;1m",
18
18
  },
19
19
  {
20
- id: 'hobby',
20
+ id: 'basic',
21
21
  sleeps: false,
22
22
  pro: false,
23
23
  ram: 512,
@@ -137,7 +137,7 @@ module Hu
137
137
  row['fH12ML'][idx] = 'fH12ML'[idx]
138
138
  end
139
139
  row['formation'] += " #{dyno_type_str}" + '='.color(:black).bright + quant_colon_type.to_s
140
- cost += DYNO_TYPES.find { |e| e[:id] == dyno_type }[:usd] * dyno[:quantity]
140
+ cost += (DYNO_TYPES.find { |e| e[:id] == dyno_type }&.fetch(:usd, 0) || 0) * dyno[:quantity]
141
141
  end
142
142
  end
143
143
  new_row = ''.dup
data/lib/hu/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Hu
3
- VERSION = '2.0.25'
3
+ VERSION = '3.0.0'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hu
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.25
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - moe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-23 00:00:00.000000000 Z
11
+ date: 2022-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler