cloudcost 0.1.1 → 0.2.0

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: 8ff5e2d72a7a5655eb528bd4b762c8682e7b388bdbd15f14785ba13b733710e6
4
- data.tar.gz: 045d769db58a4f871a228200500ad3de827d593e562cb6b6ad3976718ca1c859
3
+ metadata.gz: b79b93bfa4a348fdc4d6990402400ebf709ff1cb9c8a105816f39beefc5209f4
4
+ data.tar.gz: 281358b34a8c77704a074fa9399b6b9d0f1ffda9d7ca96a4d3b30f6ad40794a0
5
5
  SHA512:
6
- metadata.gz: 61f67a42c2575cfca9b88f55ed00715a8f32c3a9c1dc4b4f03e3c56a783ef9574c7d63060a3aa6fc5e501ea0cd6f5fcbdf866f0fafd78da4b7f8d202fcafcac9
7
- data.tar.gz: 3d96ff16f9b0015af1f03ffc37ec70c559c42fbcb59403f5bd331c3acec6066f3d4120d9a6a93aaa2d1fe0cc1827f2c6c5c5b342bf3abb11560fa05bd661609b
6
+ metadata.gz: 0541d3c1e6904a79903b45980b4fd5de642f01da8df6bfd3e038f5f0f18e9bbb33d46cbf58f2898f249f9757297609be7e03ec5e5674b8a047bd1bb2840e4761
7
+ data.tar.gz: 93562d90574c73387a5cd6d57637e36836cc480fd045c03ac3459331028cf6b0c16886c9642f403a6adacffdc77cf3021eb20995fa102ae664510dfc70b12f6e
data/Dockerfile ADDED
@@ -0,0 +1,12 @@
1
+ FROM ruby:3.0-alpine
2
+
3
+ ARG INFLUX_RELEASE=influxdb2-client-2.1.0-linux-amd64.tar.gz
4
+
5
+ RUN apk --no-cache add wget \
6
+ && gem install cloudcost \
7
+ && wget https://dl.influxdata.com/influxdb/releases/$INFLUX_RELEASE \
8
+ && tar xvfz $INFLUX_RELEASE -C /usr/local/bin --strip-components=1 \
9
+ && rm -f $INFLUX_RELEASE
10
+
11
+ ENTRYPOINT [ "cloudcost" ]
12
+ CMD [ "help" ]
@@ -111,9 +111,9 @@ module Cloudcost
111
111
  { field: "memory_gb", position: 3, unit: "i" },
112
112
  { field: "ssd_gb", position: 4, unit: "i" },
113
113
  { field: "bulk_gb", position: 5, unit: "i" },
114
- { field: "cost_per_day", position: 6, unit: "" },
114
+ { field: "chf_per_day", position: 6, unit: "" },
115
115
  ].each do |field|
116
- lines << "cloudscaleServerCosts,grouped_by=#{@options[:group_by]},group=#{row[0]},environment=#{@options[:profile] || "default"},currency=CHF #{field[:field]}=#{row[field[:position]]}#{field[:unit]}"
116
+ lines << "cloudscaleServerCosts,group=#{row[0]},profile=#{@options[:profile] || "?"} #{field[:field]}=#{row[field[:position]]}#{field[:unit]}"
117
117
  end
118
118
  end
119
119
  lines.join("\n")
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cloudcost
4
- VERSION = "0.1.1"
4
+ VERSION = "0.2.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudcost
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nik Wolfgramm
@@ -89,6 +89,7 @@ extra_rdoc_files: []
89
89
  files:
90
90
  - ".gitignore"
91
91
  - ".rubocop.yml"
92
+ - Dockerfile
92
93
  - Gemfile
93
94
  - Gemfile.lock
94
95
  - LICENSE