gem-local 0.1.9 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +2 -2
- data/gem-local.gemspec +1 -1
- data/lib/rubygems/commands/local_command.rb +9 -10
- data/lib/rubygems/commands/local_command/version.rb +7 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: cedf050cad624510c3813d6640b416504749cbac4f7db7af9a6f682f4af50394
|
4
|
+
data.tar.gz: b6a86b07581268db53039311d41899c82c3320c24e47b3c285b40f072b6192d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6eb1842ff47ff39583fd3f6c49abf2c2a63ef90cbcca270b4c73398f88fdf30c12c23b34abf49e09c8d93eedcf4adf87666245f0068692f5dad1c9b4060499d7
|
7
|
+
data.tar.gz: e0e13a43b457879d8f3c3c236934598f20192d0be86ca7bc51458a9858bc4a7244c899bca9b7b6a669d49c478121cec027618d9b8ed846298c50c4ec0f714227
|
data/README.md
CHANGED
@@ -7,9 +7,9 @@ If you're developing a gem alongside projects that consume them, you've probably
|
|
7
7
|
|
8
8
|
Of course, if you accidentally commit this, you'll probably cause somebody or someserver some grief down the line. This is why [local bundler git repos](http://bundler.io/v1.5/git.html#local) exist: so that by using `gem 'name', git: 'repo', branch: 'master'`, you can program against a local gem dependency while always leaving your Gemfile in a valid state.
|
9
9
|
|
10
|
-
However, actually *using* `
|
10
|
+
However, actually *using* `bundle config local.xxx` is a bit of a pain:
|
11
11
|
|
12
|
-
- you have to remember to use the `--local` flag every invocation, otherwise you might bork other local projects using the dependency
|
12
|
+
- you have to remember to use the `--local` flag as well every invocation, otherwise you might bork other local projects using the dependency
|
13
13
|
- you have to remember to unset the configuration if you check out a version of your Gemfile without the `gem git:, branch:` bit
|
14
14
|
- you have to remember what that configuration was and to reset it when you checkout back to your branch
|
15
15
|
- if you frequently develop against local gems, you have to do this for every gem, in every project, and remember where you are in the above workflow every time you revisit a project after a few days
|
data/gem-local.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
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
|
+
require "rubygems/commands/local_command/version"
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "gem-local"
|
@@ -1,9 +1,8 @@
|
|
1
|
+
require 'rubygems/command'
|
1
2
|
require 'bundler'
|
2
3
|
|
3
4
|
class Gem::Commands::LocalCommand < Gem::Command
|
4
5
|
|
5
|
-
VERSION = "0.1.9"
|
6
|
-
|
7
6
|
class Setting
|
8
7
|
attr_accessor :location, :status
|
9
8
|
def initialize(location, status = "off")
|
@@ -221,7 +220,7 @@ private
|
|
221
220
|
|
222
221
|
def cmds
|
223
222
|
@cmds ||= {
|
224
|
-
"add"
|
223
|
+
"add" => {
|
225
224
|
description: "Adds or overwrites a local gem configuration and activates the gem from sourcein bundler.",
|
226
225
|
usage: "gem local add <gem> <path>",
|
227
226
|
arguments: "takes exactly two arguments",
|
@@ -239,13 +238,13 @@ private
|
|
239
238
|
arguments: "takes exactly one argument",
|
240
239
|
aliases: %w[delete],
|
241
240
|
},
|
242
|
-
"use"
|
241
|
+
"use" => {
|
243
242
|
description: "Activates all registered local gems, or the specified gems, in bundler.",
|
244
243
|
usage: "gem local use [gem]",
|
245
244
|
arguments: "takes any number of arguments",
|
246
245
|
aliases: %w[on activate enable renable reactivate],
|
247
246
|
},
|
248
|
-
"ignore"
|
247
|
+
"ignore" => {
|
249
248
|
description: "Deactivates all registered local gems, or the specified gems, in bundler.",
|
250
249
|
usage: "gem local ignore [gem]",
|
251
250
|
arguments: "takes any number of arguments",
|
@@ -263,13 +262,13 @@ private
|
|
263
262
|
arguments: "takes zero arguments",
|
264
263
|
aliases: %w[init],
|
265
264
|
},
|
266
|
-
"help"
|
265
|
+
"help" => {
|
267
266
|
description: "Displays help information, either about `gem local` or a `gem local` subcommand.",
|
268
267
|
usage: "gem local help [cmd]",
|
269
268
|
arguments: "takes zero or one arguments",
|
270
269
|
aliases: %w[],
|
271
270
|
},
|
272
|
-
"version"
|
271
|
+
"version" => {
|
273
272
|
description: "Displays the version of gem-local you have installed, chiefly for debugging purposes.",
|
274
273
|
usage: "gem local version",
|
275
274
|
arguments: "takes no arguments",
|
@@ -384,12 +383,12 @@ private
|
|
384
383
|
end
|
385
384
|
|
386
385
|
def bundler_add(name, setting)
|
387
|
-
Bundler.settings
|
386
|
+
Bundler.settings.set_local("local.#{name}", setting.location)
|
388
387
|
!! Bundler.settings["local.#{name}"]
|
389
388
|
end
|
390
389
|
|
391
390
|
def bundler_remove(name, setting)
|
392
|
-
Bundler.settings
|
391
|
+
Bundler.settings.set_local("local.#{name}", nil)
|
393
392
|
not Bundler.settings["local.#{name}"]
|
394
393
|
end
|
395
394
|
|
@@ -414,4 +413,4 @@ private
|
|
414
413
|
]
|
415
414
|
end
|
416
415
|
|
417
|
-
end
|
416
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gem-local
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Keele
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-06-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -54,6 +54,7 @@ files:
|
|
54
54
|
- bin/setup
|
55
55
|
- gem-local.gemspec
|
56
56
|
- lib/rubygems/commands/local_command.rb
|
57
|
+
- lib/rubygems/commands/local_command/version.rb
|
57
58
|
- lib/rubygems_plugin.rb
|
58
59
|
homepage:
|
59
60
|
licenses: []
|
@@ -74,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
74
75
|
version: '0'
|
75
76
|
requirements: []
|
76
77
|
rubyforge_project:
|
77
|
-
rubygems_version: 2.
|
78
|
+
rubygems_version: 2.7.4
|
78
79
|
signing_key:
|
79
80
|
specification_version: 4
|
80
81
|
summary: A configuration manager for bundler's local gem settings.
|