civo_cli 0.2.8 → 0.2.9

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: 23ca23d2c4921948d53b360cc5527c598d56414293613fa98122aa7ce4bc3a65
4
- data.tar.gz: 2795f6c36eb98049373d73658d62cd4214fe9a4ec5baa534fca21a6304f4e638
3
+ metadata.gz: e9a8f2d8231933d229f7835664d1aa3acfbb98a6db901b853e9f657cc12ce8f7
4
+ data.tar.gz: ffbc9a26597e1b0460d1d1f10da71fa63d7917eb6f77123e24ac761c1eafd09d
5
5
  SHA512:
6
- metadata.gz: 03ed21df08336252f21eb6da69b748967c93063df8528c3085847274f10be788b8a8ce626f209891f61aa862568553958a45d10b0c8e6fd134531edbed8a90ed
7
- data.tar.gz: 628a587f8e9b822cfb7325f74e84c5e97e2437ac114ccc7d32384e7dca5c0932ae9fe4a3ba0e32b0039015304e5ff98b2332652d5ba7b4b3c243aedc247fcccb
6
+ metadata.gz: d1a8f75ad27e21a28840675e75e5a6c56a2dc2956ccdb49372dceb6f152a7405b64161b6d5b5f4fa0c25b7c412b22d51ab269cf2e24e4ff12f9431aac3cb5ee3
7
+ data.tar.gz: 82b951dc8354fda86153b60cdf9d4a448e920b184135b353e5bb6d87df99d17ff73fda32c7df246decdd5629aad2676227fdebc0bd8ee044904da69a1be47b51
data/CHANGELOG.md CHANGED
@@ -3,6 +3,10 @@ All notable changes to the Civo CLI will be documented in this file.
3
3
 
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
5
5
 
6
+ ## [0.2.9] - 2019-07-04
7
+ ### Added
8
+ - Version command that tells you your current version and checks if you're out of date
9
+
6
10
  ## [0.2.8] - 2019-07-04
7
11
  ### Fixed
8
12
  - Forced rebuild of a blueprint didn't work
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- civo_cli (0.2.8)
4
+ civo_cli (0.2.9)
5
5
  civo (>= 1.2.1)
6
6
  colorize
7
7
  json
data/lib/blueprint.rb CHANGED
@@ -49,7 +49,7 @@ module CivoCLI
49
49
  params[:dsl_content] = File.read(options["content-file"]) unless options["content-file"].nil?
50
50
  params[:template_id] = options["template-id"] unless options["template-id"].nil?
51
51
  params[:name] = options["name"] unless options["name"].nil?
52
- params[:force_rebuild] = options["force_rebuild"] unless options["force"].nil?
52
+ params[:force_rebuild] = 1 unless options["force"].nil?
53
53
  Civo::Blueprint.update(params)
54
54
  blueprint = detect_blueprint(id)
55
55
  puts "Updated blueprint #{blueprint.name.colorize(:green)}"
@@ -1,3 +1,3 @@
1
1
  module CivoCLI
2
- VERSION = "0.2.8"
2
+ VERSION = "0.2.9"
3
3
  end
data/lib/civo_cli.rb CHANGED
@@ -67,6 +67,21 @@ module CivoCLI
67
67
  subcommand "template", CivoCLI::Template
68
68
  map "templates" => "template"
69
69
 
70
+ desc "version", "show the version of Civo CLI used"
71
+ def version
72
+ gem_details = Civo::Base._request("https://rubygems.org/api/v1/gems/civo_cli.json")
73
+ gem_version = Gem::Version.new(gem_details.version)
74
+ this_version = Gem::Version.new(CivoCLI::VERSION)
75
+ if this_version > gem_version
76
+ puts "You are running an #{"unreleased v#{CivoCLI::VERSION}".colorize(:green)} of Civo CLI"
77
+ elsif this_version == gem_version
78
+ puts "You are running the #{"current".colorize(:green)} v#{CivoCLI::VERSION} of Civo CLI"
79
+ else
80
+ puts "You are running v#{CivoCLI::VERSION} of Civo CLI, but are out of date because #{"v#{gem_details.version}".colorize(:red)} is available"
81
+
82
+ end
83
+ end
84
+
70
85
  desc "volume", "manage volumes"
71
86
  subcommand "volume", CivoCLI::Volume
72
87
  map "volumes" => "volume"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: civo_cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Jeffries