specific_install 0.3.6 → 0.3.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +2 -0
- data/README.md +11 -5
- data/Rakefile +4 -0
- data/lib/rubygems/commands/specific_install_command.rb +16 -2
- data/lib/specific_install/version.rb +1 -1
- data/spec/specific_install_spec.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 89623dd23cac065b235739fb2421aa1e42f3fdd2f4bb9aab381519acb081c554
|
4
|
+
data.tar.gz: 8858a6d3ad8991f182e16171c0db2d8e12f0197ffc757e8e91c96780a415a076
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc541b6fd943749db8bd12f471b6b8a621ae3a74d755d5b3e42a0d95382b94dc512760f1e2a28f46f0dc9100144c9ef508910a32887d3bb69cd5ec842a6a0357
|
7
|
+
data.tar.gz: 52903f6b1dc99f5cb350c6e1a2d328052974c808404f391dc19b1b714871c698214402037fbe995bc740cd84cef9cbd85ffc8b6f9bdb322d479e915db732452b
|
data/ChangeLog
CHANGED
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
|
20
|
+
or install one from an arbitrary web url:
|
21
21
|
|
22
|
-
|
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
|
-
`
|
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.
|
data/Rakefile
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
require "bundler/gem_tasks"
|
3
3
|
|
4
|
+
# how to:
|
5
|
+
# edit lib/specific_install/version.rb
|
6
|
+
# rake release, seems to work!
|
7
|
+
|
4
8
|
desc "Uninstall specific_install and release, then reinstall"
|
5
9
|
task :rubygems do
|
6
10
|
sh "gem uninstall specific_install --executables"
|
@@ -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
|
@@ -71,7 +76,7 @@ class Gem::Commands::SpecificInstallCommand < Gem::Command
|
|
71
76
|
end
|
72
77
|
|
73
78
|
def break_unless_git_present
|
74
|
-
unless system("
|
79
|
+
unless system("git --version") || system("sh -c 'command -V git'")
|
75
80
|
abort("Please install git before using a git based link for specific_install")
|
76
81
|
end
|
77
82
|
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.
|
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
|
|
@@ -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.
|
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.
|
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:
|
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
|
-
|
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
|