bundle-try 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +17 -3
- data/bundle-try.gemspec +2 -1
- data/exe/bundler-try +24 -7
- data/lib/bundle_try/gemfile_generator.rb +3 -2
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2eef048aacf47d8c83fa67a7c49dfff0bc999762
|
4
|
+
data.tar.gz: a40b9a7e7568286a4944783cb3cf00b3e7f5ad84
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 765ef0991a189cb8f427a507f978d65df5b416746b54059b62aca6fc181cf9b147cd1356effd9578b98e7f4d81163e93d03d07a174f668eb3356405958d3f642
|
7
|
+
data.tar.gz: f4295a269c378508a64cdba3859939de7bddc462e9d2b8fff0d01d3b77c45e3354938c6e2aabcb1c9b1c38f48065866d686f69edf87375f915035052091bfdaf
|
data/README.md
CHANGED
@@ -44,16 +44,22 @@ Github repository:
|
|
44
44
|
$ bundle try https://github.com/jeremyevans/sequel # or the clone-url with .git
|
45
45
|
```
|
46
46
|
|
47
|
-
|
47
|
+
...or via the short notation:
|
48
48
|
|
49
49
|
```
|
50
|
-
$ bundle try
|
50
|
+
$ bundle try gh:jeremyevans/sequel
|
51
|
+
```
|
52
|
+
|
53
|
+
Specific Github version:
|
54
|
+
|
55
|
+
```
|
56
|
+
$ bundle try gh:jeremyevans/sequel 4.21.0
|
51
57
|
```
|
52
58
|
|
53
59
|
Prepend the gem-name when it can't be derived from the url:
|
54
60
|
|
55
61
|
```
|
56
|
-
$ bundle try redis@
|
62
|
+
$ bundle try redis@gh:redis/redis-rb
|
57
63
|
```
|
58
64
|
|
59
65
|
No Gemfile will be saved, so it's save to run from an existing project-folder.
|
@@ -63,6 +69,14 @@ But if you need it:
|
|
63
69
|
$ bundle try rake > Gemfile
|
64
70
|
```
|
65
71
|
|
72
|
+
No, the following won't work :(
|
73
|
+
|
74
|
+
```
|
75
|
+
# No Gemception
|
76
|
+
$ bundle try bundle-try
|
77
|
+
```
|
78
|
+
|
79
|
+
|
66
80
|
## Installation
|
67
81
|
|
68
82
|
```
|
data/bundle-try.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "bundle-try"
|
7
|
-
spec.version = '1.
|
7
|
+
spec.version = '1.3.0'
|
8
8
|
spec.authors = ["Gert Goet"]
|
9
9
|
spec.email = ["gert@thinkcreate.nl"]
|
10
10
|
|
@@ -28,4 +28,5 @@ Gem::Specification.new do |spec|
|
|
28
28
|
|
29
29
|
spec.add_dependency "bundler", "~> 1.9"
|
30
30
|
spec.add_development_dependency "rake", "~> 10.0"
|
31
|
+
spec.add_development_dependency "aruba", "~> 0.6.2"
|
31
32
|
end
|
data/exe/bundler-try
CHANGED
@@ -5,7 +5,7 @@ gemfile = Tempfile.new('bundle-try')
|
|
5
5
|
gemfile_content = BundleTry::GemfileGenerator.new(ARGV.dup).generate
|
6
6
|
File.write(gemfile.path, gemfile_content)
|
7
7
|
|
8
|
-
if %w(-h --help help try).include?(ARGV.first)
|
8
|
+
if ARGV.empty? || %w(-h --help help try).include?(ARGV.first)
|
9
9
|
puts(<<-EOH)
|
10
10
|
Examples:
|
11
11
|
|
@@ -16,37 +16,54 @@ $ bundle try redis
|
|
16
16
|
irb(main):001:0> Redis
|
17
17
|
=> Redis
|
18
18
|
|
19
|
-
|
20
19
|
Multiple gems:
|
20
|
+
|
21
21
|
$ bundle try redis rake
|
22
22
|
|
23
23
|
Specific version:
|
24
|
+
|
24
25
|
$ bundle try redis '3.1.0'
|
25
26
|
|
26
27
|
...or any requirement that would be understood by bundler:
|
28
|
+
|
27
29
|
$ bundle try redis '~> 3.1.0'
|
28
30
|
|
29
|
-
|
30
|
-
|
31
|
+
Combined with gems that don't need a specific version:
|
32
|
+
|
33
|
+
$ bundle try redis '~> 3.1.0' rake gem_with_version '1.0'
|
31
34
|
|
32
35
|
Github repository:
|
36
|
+
|
33
37
|
$ bundle try https://github.com/jeremyevans/sequel # or the clone-url with .git
|
34
38
|
|
35
|
-
|
36
|
-
|
39
|
+
...or via the short notation:
|
40
|
+
|
41
|
+
$ bundle try gh:jeremyevans/sequel
|
42
|
+
|
43
|
+
Specific Github version:
|
44
|
+
|
45
|
+
$ bundle try gh:jeremyevans/sequel 4.21.0
|
37
46
|
|
38
47
|
Prepend the gem-name when it can't be derived from the url:
|
39
|
-
|
48
|
+
|
49
|
+
$ bundle try redis@gh:redis/redis-rb
|
40
50
|
|
41
51
|
No Gemfile will be saved, so it's save to run from an existing project-folder.
|
42
52
|
But if you need it:
|
53
|
+
|
43
54
|
$ bundle try rake > Gemfile
|
44
55
|
|
56
|
+
No, the following won't work :(
|
57
|
+
|
58
|
+
# No Gemception
|
59
|
+
$ bundle try bundle-try
|
60
|
+
|
45
61
|
EOH
|
46
62
|
exit
|
47
63
|
end
|
48
64
|
|
49
65
|
ENV['BUNDLE_GEMFILE'] = gemfile.path
|
66
|
+
|
50
67
|
if STDOUT.tty?
|
51
68
|
puts "Want to capture the generated Gemfile? Use `bundle try rake > Gemfile`."
|
52
69
|
require 'bundler/cli'
|
@@ -23,8 +23,9 @@ module BundleTry
|
|
23
23
|
def group2gemline(group)
|
24
24
|
result = begin
|
25
25
|
case group.first
|
26
|
-
when /\/\/github\.com
|
27
|
-
|
26
|
+
when /\/\/github\.com|gh:/
|
27
|
+
group.first[/(?:github\.com\/|gh:)(?:(.*)\.git|(.*))$/]
|
28
|
+
github = $1 || $2
|
28
29
|
name = if group.first.include?('@')
|
29
30
|
group.first.split('@').first
|
30
31
|
else
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bundle-try
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gert Goet
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: aruba
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.6.2
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.6.2
|
41
55
|
description: Start a REPL with the gems you want to try
|
42
56
|
email:
|
43
57
|
- gert@thinkcreate.nl
|