gem-local 0.1.7 → 0.1.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
  SHA1:
3
- metadata.gz: d1b94904afdc5de2c12787a6ac78b3c1cc5c7dcb
4
- data.tar.gz: 7187a5b97309f43fc8251ad45941eb3cfe210de4
3
+ metadata.gz: 507faf08358547a0319eafb91b83e0000eed9978
4
+ data.tar.gz: 2a28bdd5e1f7c65ddcaff2c43604d617edf60f0f
5
5
  SHA512:
6
- metadata.gz: cfb2befa4dbd2f372be0b0a976f209cad45a4fa2eb18be52a6a0587b2eca72d721917bdcd26add2e731f5ef68aac3891bec587dedcab487eedac5e1dd1c2bea9
7
- data.tar.gz: b8ad9e202b219b4bb3888fd7068c589a71310d8505bfbf308612af413262a26139be08da83fb77fec2e6e2ac70094c117eb012c7988bf963c1174757bdc0a04c
6
+ metadata.gz: 8c0a6b9dddbe33522bd0feebab4258523397162bb2dbafbf1c117fde60ba4ab4e463f1d8e93284444703496283213cbae5c849e6132a20fcc57e1805f028f977
7
+ data.tar.gz: 4dbe9c2c46ee0f79ef1b326a37d66d4426632f004a629bd57ff019b714380110d5d8789e7a04a69777e65365c862ecde1852ee27c3984c06de7f33fd76a8c738
@@ -1,10 +1,11 @@
1
1
  # coding: utf-8
2
2
  lib = File.expand_path('../lib', __FILE__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require "rubygems/commands/local_command"
4
5
 
5
6
  Gem::Specification.new do |spec|
6
7
  spec.name = "gem-local"
7
- spec.version = "0.1.7"
8
+ spec.version = Gem::Commands::LocalCommand::VERSION
8
9
  spec.authors = ["Chris Keele"]
9
10
  spec.email = ["dev@chriskeele.com"]
10
11
 
@@ -2,6 +2,8 @@ require 'bundler'
2
2
 
3
3
  class Gem::Commands::LocalCommand < Gem::Command
4
4
 
5
+ VERSION = "0.1.9"
6
+
5
7
  class Setting
6
8
  attr_accessor :location, :status
7
9
  def initialize(location, status = "off")
@@ -29,6 +31,7 @@ ignore [gem, ...] | Disables local gem(s).
29
31
  rebuild | Regenerates your `.gemlocal` from bundle config state.
30
32
  install | Adds `.gemlocal` artifact to project `.gitignore`.
31
33
  help [cmd] | Displays help information.
34
+ version | Displays gem-local version.
32
35
  ARGS
33
36
  end
34
37
 
@@ -188,6 +191,14 @@ help [cmd] | Displays help information.
188
191
  end
189
192
  end
190
193
 
194
+ def version(*args)
195
+ if args.empty?
196
+ puts "v#{Gem::Commands::LocalCommand::VERSION}"
197
+ else
198
+ arity_error __method__
199
+ end
200
+ end
201
+
191
202
  # Shows in `gem help local`
192
203
  def full_help
193
204
  [
@@ -258,6 +269,12 @@ private
258
269
  arguments: "takes zero or one arguments",
259
270
  aliases: %w[],
260
271
  },
272
+ "version" => {
273
+ description: "Displays the version of gem-local you have installed, chiefly for debugging purposes.",
274
+ usage: "gem local version",
275
+ arguments: "takes no arguments",
276
+ aliases: %w[],
277
+ },
261
278
  }
262
279
  end
263
280
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gem-local
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Keele