gem-default 0.0.1 → 0.0.2

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: ac33c127fa1e81e7756608931842be4ede30ea33d6a2c77f99f57e1ceaa5c127
4
- data.tar.gz: 2b4c665766a742076ab0e64814f81b7679b0300075457c9c9dbc374ccfe54004
3
+ metadata.gz: 41f4a06475772f02324b1ea31ccb1806e3bdb12e2a098502a699b00baffff21d
4
+ data.tar.gz: 871325e300d02277cb2a9d982e1fa20d85754d10cfb69a5b6637c8cb207d7cf4
5
5
  SHA512:
6
- metadata.gz: cb8ac2bdb655909ab23818ad5ecad6a8cc130ef27069361e2c06b5baec70ff52a46e7f3fd0b66bd9811007cffc727bc88a512c8adaae0a570055eda3eca22f43
7
- data.tar.gz: f8cb928241049c4ad4a27d3781382aa4769c7eb5ab803d8f0e88f77a8207cc225c4ef63e1301fe47ccc1d518f08a5ee4136b0273952f6cf2623ec6098c1d4991
6
+ metadata.gz: a5f41ab00b99d4e0d346a7f20bf08205d9cab323924cc36bedd04b87960f54dbcb0ff03573242e1ab99a5af0de642d1893514d493bb085604b005a838f2bb4f6
7
+ data.tar.gz: f50a5c1990a25da5618d1f27380a367f3fce70f439189abe1aa95a925eb05e31053378c2d38cd5d60af3e74031b1199eab62d4d25d10cf66bf4be9f6693072dc
data/README.md CHANGED
@@ -16,7 +16,8 @@ Run `gem default xxx` after `gem install xxx`.
16
16
 
17
17
  ### Before
18
18
 
19
- Usually, we cannot run a non-default gem (`pry` for example) with `bundle exec`.
19
+ Usually, we cannot use a non-default gem (`pry` for example) with `bundle exec`
20
+ if it's not written in Gemfile.
20
21
 
21
22
  ```bash
22
23
  $ cat Gemfile
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'gem-default'
3
- spec.version = '0.0.1'
3
+ spec.version = '0.0.2'
4
4
  spec.authors = ['Takashi Kokubun']
5
5
  spec.email = ['takashikkbn@gmail.com']
6
6
 
@@ -64,7 +64,7 @@ class Gem::Commands::DefaultCommand < Gem::Command
64
64
  from = File.join(spec.gem_dir, require_path)
65
65
  to = @ruby_lib_dir
66
66
  glob_path = '**/*.rb'
67
- when /\A#{File.join(@gem_home, 'extensions')}/
67
+ when /\A#{Regexp.escape(File.join(@gem_home, 'extensions'))}/
68
68
  from = require_path
69
69
  to = @ruby_arch_dir
70
70
  glob_path = "**/*.#{@dlext}"
@@ -74,7 +74,7 @@ class Gem::Commands::DefaultCommand < Gem::Command
74
74
 
75
75
  files = Dir.glob(File.join(from, glob_path)).select(&File.method(:file?)).map! do |path|
76
76
  # delete_prefix is from Ruby 2.5 and too new
77
- path.sub(/\A#{from}/, '')
77
+ path.sub(/\A#{Regexp.escape(from)}/, '')
78
78
  end.sort!
79
79
  copy_files(files, from: from, to: to)
80
80
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gem-default
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takashi Kokubun