specific_install 0.3.7 → 0.3.8

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
2
  SHA256:
3
- metadata.gz: 3116c3947928d56b53ddefb21f04e054ee6f7f6d87c9a2f6db5eb0cee6c35b95
4
- data.tar.gz: 937108da7d150435f786a76ee72e4076af3977b00abe6cb7df57b7818aee54e1
3
+ metadata.gz: 89623dd23cac065b235739fb2421aa1e42f3fdd2f4bb9aab381519acb081c554
4
+ data.tar.gz: 8858a6d3ad8991f182e16171c0db2d8e12f0197ffc757e8e91c96780a415a076
5
5
  SHA512:
6
- metadata.gz: b4d2988cd8f060580d3060ab8bc1a09e5ae6d9565b581b1f645007cdbb3315e859bcfce3fc21453fa6132225ede9dbad8c12b2927c86a0549e2fa6e6e0289005
7
- data.tar.gz: 47c325189d85d00bf40cef6ca203f820f95a3fa1eee31f853d66353894556dc525ec38b928374035f816f152c8c1b7ad66b72b68e6b373c27348baa75597f6a0
6
+ metadata.gz: bc541b6fd943749db8bd12f471b6b8a621ae3a74d755d5b3e42a0d95382b94dc512760f1e2a28f46f0dc9100144c9ef508910a32887d3bb69cd5ec842a6a0357
7
+ data.tar.gz: 52903f6b1dc99f5cb350c6e1a2d328052974c808404f391dc19b1b714871c698214402037fbe995bc740cd84cef9cbd85ffc8b6f9bdb322d479e915db732452b
data/ChangeLog CHANGED
@@ -1,3 +1,5 @@
1
+ 0.3.8
2
+ Ruby 3.2 compat
1
3
  0.3.3
2
4
  Added an option '-r' to specify commit-ish
3
5
  0.2.12
data/README.md CHANGED
@@ -17,9 +17,9 @@ Or install it yourself as:
17
17
  ## Usage
18
18
 
19
19
  A Rubygem plugin that allows you to install an "edge" gem straight from its github repository,
20
- or install one from an arbitrary url web:
20
+ or install one from an arbitrary web url:
21
21
 
22
- ex:
22
+ examples:
23
23
 
24
24
  `
25
25
  $ gem specific_install https://github.com/githubsvnclone/rdoc.git
@@ -33,7 +33,9 @@ Or more explicitly:
33
33
 
34
34
  Or very tersely:
35
35
 
36
- `gem specific_install githubsvnclone/rdoc`
36
+ `
37
+ $ gem specific_install githubsvnclone/rdoc
38
+ `
37
39
 
38
40
  Or a specific branch
39
41
 
@@ -64,9 +66,9 @@ The following URI types are accepted:
64
66
  - http(s)://github.com/rdp/specific_install.git
65
67
  - http(s)://github.com/rdp/specific_install-current.gem
66
68
  - http://github.com/rdp/specific_install.git
69
+ - http://somewhere_else.com/rdp/specific_install.git
67
70
  - git@github.com:rdp/specific_install.git
68
- - rdp/specific_install
69
-
71
+ - rdp/specific_install # implies github
70
72
 
71
73
  ### Additional Options
72
74
 
@@ -95,6 +97,10 @@ The following URI types are accepted:
95
97
 
96
98
  `git_install` is aliased to the behavior of `specific_install`
97
99
  This alias is shorter and is more intention revealing of the gem's behavior.
100
+
101
+ -t, --tag to indicate git tag to be checked out.
102
+ This will use/install a specific git tag.
103
+
98
104
  ## Internal Behavior
99
105
 
100
106
  It runs `git clone`, and `rake install,` install the gem, then deletes the temp directory.
@@ -28,6 +28,10 @@ class Gem::Commands::SpecificInstallCommand < Gem::Command
28
28
  options[:ref] = ref
29
29
  end
30
30
 
31
+ add_option('-t', '--tag TAG', arguments) do |tag, options|
32
+ options[:tag] = tag
33
+ end
34
+
31
35
  add_option('-u', '--user-install', arguments) do |userinstall, options|
32
36
  options[:userinstall] = userinstall
33
37
  end
@@ -47,6 +51,7 @@ class Gem::Commands::SpecificInstallCommand < Gem::Command
47
51
  @loc ||= set_location
48
52
  @branch ||= set_branch if set_branch
49
53
  @ref ||= set_ref
54
+ @tag ||= set_tag
50
55
  if @loc.nil?
51
56
  raise ArgumentError, "No location received. Use like `gem specific_install -l http://example.com/rdp/specific_install`"
52
57
  end
@@ -150,6 +155,7 @@ class Gem::Commands::SpecificInstallCommand < Gem::Command
150
155
  Dir.chdir @top_dir do
151
156
  change_to_branch(@branch) if @branch
152
157
  reset_to_commit(@ref) if @ref
158
+ change_to_tag(@tag) if @tag
153
159
  git "submodule", "update", "--init", "--recursive" # Issue 25
154
160
  end
155
161
 
@@ -184,6 +190,10 @@ class Gem::Commands::SpecificInstallCommand < Gem::Command
184
190
  options[:ref] || options[:args][2]
185
191
  end
186
192
 
193
+ def set_tag
194
+ options[:tag]
195
+ end
196
+
187
197
  def success_message
188
198
  output.puts 'Successfully installed'
189
199
  end
@@ -217,7 +227,7 @@ class Gem::Commands::SpecificInstallCommand < Gem::Command
217
227
 
218
228
  def gemspec_exists?(name = "*.gemspec")
219
229
  if gemspec_file(name)
220
- File.exists?(gemspec_file(name))
230
+ File.exist?(gemspec_file(name))
221
231
  else
222
232
  false
223
233
  end
@@ -240,6 +250,10 @@ class Gem::Commands::SpecificInstallCommand < Gem::Command
240
250
  git "show", "-q"
241
251
  end
242
252
 
253
+ def change_to_tag(tag)
254
+ git "checkout", tag
255
+ end
256
+
243
257
  DOTDOT_REGEX = /(?:#{File::PATH_SEPARATOR}|\A)\.\.(?:#{File::PATH_SEPARATOR}|\z)/.freeze
244
258
  ABS_REGEX = /\A#{File::PATH_SEPARATOR}/.freeze
245
259
 
@@ -1,3 +1,3 @@
1
1
  module SpecificInstall
2
- VERSION = "0.3.7"
2
+ VERSION = "0.3.8"
3
3
  end
@@ -57,7 +57,7 @@ describe Gem::Commands::SpecificInstallCommand do
57
57
  url = "https://rubygems.org/downloads/specific_install-0.2.7.gem"
58
58
  output_name = "specific_install.gem"
59
59
  subject.download(url, output_name)
60
- expect(File.exists?(output_name)).to be_true
60
+ expect(File.exist?(output_name)).to be_true
61
61
  end
62
62
  end
63
63
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: specific_install
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.7
4
+ version: 0.3.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roger Pack
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-11-10 00:00:00.000000000 Z
12
+ date: 2022-12-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
@@ -136,8 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
136
136
  - !ruby/object:Gem::Version
137
137
  version: '0'
138
138
  requirements: []
139
- rubyforge_project:
140
- rubygems_version: 2.7.6
139
+ rubygems_version: 3.1.2
141
140
  signing_key:
142
141
  specification_version: 4
143
142
  summary: rubygems plugin that allows you you to install a gem from from its github