gem-local 0.2.1 → 0.2.2

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
- SHA256:
3
- metadata.gz: 9bafcddab8068b9d9227cc918745b03b93bf206b0fa1a38520edd6a2ce9ffd3c
4
- data.tar.gz: 2c4cd93fe6e3e996e48178c4b08dd07e1ea58c843b7069d20adf3202e9a6b8be
2
+ SHA1:
3
+ metadata.gz: 8f21b08ab045507ed565cc1827bfac27449ffec5
4
+ data.tar.gz: 054cc0db137c6598ae682cf198540ed54259663f
5
5
  SHA512:
6
- metadata.gz: bcec5573248c3d5601c29a6aa2af2596d55528aedbe6841b7716388939057b49ab36ef8be647d1ad05d86bf0aa9e7c7d3ce3a32095ff0ece3db8e34bb97ab55d
7
- data.tar.gz: 9e80a3cce4a5622d4ab396650ace9ea55f9655e9e17df9f48101b0046ad6f2d31e4091e1583204bce7f58b91d25fcc8311cf541e2452eade4b1bf8b702cfaeb9
6
+ metadata.gz: 83792260f2ef1e3eff99c6db622db749418b1246c418edefeba4c3424131ff7d0330921fa80896d7cc4c5bdaba3361989aa5a6773edaffa5df049a2b1b04d7d0
7
+ data.tar.gz: 0f06803aa604412f33115f6454c4f5d852b348da2d79cfca73e7c848b9dc9d963d09a510e2487b5c49ca100b317d0ca061191e1b7b2d167a8d69cfaf788bee6f
data/gem-local.gemspec CHANGED
@@ -1,7 +1,9 @@
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
+
4
5
  require "rubygems/commands/local_command/version"
6
+ require "rubygems/commands/local_command/artifacts"
5
7
 
6
8
  Gem::Specification.new do |spec|
7
9
  spec.name = "gem-local"
@@ -16,6 +18,8 @@ Gem::Specification.new do |spec|
16
18
  spec.bindir = "exe"
17
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
18
20
  spec.require_paths = ["lib"]
21
+
22
+ spec.post_install_message = "Make sure to add artifacts (#{Gem::Commands::LocalCommand::ARTIFACTS.join(", ")}) to your project's .gitignores by running `gem local install`"
19
23
 
20
24
  spec.add_development_dependency "bundler", "~> 1.11"
21
25
  spec.add_development_dependency "rake", "~> 10.0"
@@ -2,6 +2,7 @@ require 'rubygems/command'
2
2
  require 'bundler'
3
3
 
4
4
  require "rubygems/commands/local_command/version"
5
+ require "rubygems/commands/local_command/artifacts"
5
6
 
6
7
  class Gem::Commands::LocalCommand < Gem::Command
7
8
 
@@ -170,7 +171,7 @@ version | Displays gem-local version.
170
171
  def install(*args)
171
172
  if args.empty?
172
173
  File.open(find_file('.gitignore'), "a+") do |file|
173
- %w[.bundle .gemlocal].each do |ignorable|
174
+ Gem::Commands::LocalCommand::ARTIFACTS.each do |ignorable|
174
175
  unless file.each_line.any?{ |line| line.include? ignorable }
175
176
  file.puts ignorable
176
177
  end
@@ -336,12 +337,19 @@ private
336
337
  Hash[
337
338
  file.readlines.reject do |line|
338
339
  line.start_with? "#" or line.strip.empty?
339
- end.map do |line|
340
+ end.map.with_index do |line, index|
340
341
  status, name, location, *args = line.strip.split
341
342
  if status and name and location and args.empty?
342
343
  [name, Setting.new(location, status)]
343
344
  else
344
- raise "`gem local` config in `#{find_configuration}` is corrupt, each non-empty non-commented line must contain a status, a gem name, and the local path to that gem, separated by spaces\nerror at:\n#{line}"
345
+ raise <<-ERR
346
+ `gem local` config is corrupt
347
+ Delete #{find_configuration} and run `gem local rebuild` to resolve
348
+ Error at line #{index + 1}:
349
+ #{line.strip}
350
+ Each non-empty, non-commented line must contain a status (on/off), a gem name,
351
+ and the local path to that gem, separated by spaces.
352
+ ERR
345
353
  end
346
354
  end
347
355
  ]
@@ -0,0 +1,7 @@
1
+ require 'rubygems/command'
2
+
3
+ class Gem::Commands::LocalCommand < Gem::Command
4
+
5
+ ARTIFACTS = %w[.bundle .gemlocal].freeze
6
+
7
+ end
@@ -2,6 +2,6 @@ require 'rubygems/command'
2
2
 
3
3
  class Gem::Commands::LocalCommand < Gem::Command
4
4
 
5
- VERSION = "0.2.1"
5
+ VERSION = "0.2.2"
6
6
 
7
7
  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.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Keele
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-06-13 00:00:00.000000000 Z
11
+ date: 2018-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -54,12 +54,14 @@ files:
54
54
  - bin/setup
55
55
  - gem-local.gemspec
56
56
  - lib/rubygems/commands/local_command.rb
57
+ - lib/rubygems/commands/local_command/artifacts.rb
57
58
  - lib/rubygems/commands/local_command/version.rb
58
59
  - lib/rubygems_plugin.rb
59
60
  homepage:
60
61
  licenses: []
61
62
  metadata: {}
62
- post_install_message:
63
+ post_install_message: Make sure to add artifacts (.bundle, .gemlocal) to your project's
64
+ .gitignores by running `gem local install`
63
65
  rdoc_options: []
64
66
  require_paths:
65
67
  - lib
@@ -75,7 +77,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
75
77
  version: '0'
76
78
  requirements: []
77
79
  rubyforge_project:
78
- rubygems_version: 2.7.4
80
+ rubygems_version: 2.5.2.1
79
81
  signing_key:
80
82
  specification_version: 4
81
83
  summary: A configuration manager for bundler's local gem settings.