matching_bundle 0.1.0 → 0.1.1
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.
- data/Readme.md +3 -0
- data/VERSION +1 -1
- data/lib/matching_bundle.rb +3 -3
- data/matching_bundle.gemspec +2 -2
- data/spec/matching_bundle_spec.rb +14 -3
- metadata +4 -4
data/Readme.md
CHANGED
|
@@ -15,12 +15,15 @@ If there is a specific bundler version locked in the gemfile it will be used.
|
|
|
15
15
|
...
|
|
16
16
|
|
|
17
17
|
If you need sudo to install gems do something like:
|
|
18
|
+
|
|
18
19
|
sudo matching_bundle --version # matching version is installed
|
|
19
20
|
matching_bundle install # matching version is used
|
|
20
21
|
|
|
21
22
|
TODO
|
|
22
23
|
====
|
|
23
24
|
- parse --gemfile option
|
|
25
|
+
- use highest matching version
|
|
26
|
+
- add a --no-install flag so only local versions are used
|
|
24
27
|
|
|
25
28
|
Author
|
|
26
29
|
======
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.1.
|
|
1
|
+
0.1.1
|
data/lib/matching_bundle.rb
CHANGED
|
@@ -45,8 +45,8 @@ class MatchingBundle
|
|
|
45
45
|
end
|
|
46
46
|
|
|
47
47
|
def self.bundler_requirement(gemfile_content)
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
found = gemfile_content.scan(/^\s*bundler \((.*)\)/)
|
|
49
|
+
versions = found.map(&:last)
|
|
50
|
+
versions.find{|version| version =~ /^=\s*\d/ } || versions.first
|
|
51
51
|
end
|
|
52
52
|
end
|
data/matching_bundle.gemspec
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = %q{matching_bundle}
|
|
8
|
-
s.version = "0.1.
|
|
8
|
+
s.version = "0.1.1"
|
|
9
9
|
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
11
11
|
s.authors = ["Michael Grosser"]
|
|
12
|
-
s.date = %q{2011-
|
|
12
|
+
s.date = %q{2011-11-19}
|
|
13
13
|
s.default_executable = %q{matching_bundle}
|
|
14
14
|
s.email = %q{michael@grosser.it}
|
|
15
15
|
s.executables = ["matching_bundle"]
|
|
@@ -6,16 +6,27 @@ describe MatchingBundle do
|
|
|
6
6
|
end
|
|
7
7
|
|
|
8
8
|
describe :bundler_requirement do
|
|
9
|
+
def requirement(*args)
|
|
10
|
+
MatchingBundle.bundler_requirement(*args)
|
|
11
|
+
end
|
|
12
|
+
|
|
9
13
|
it "finds nothing when there is nothing" do
|
|
10
|
-
|
|
14
|
+
requirement("").should == nil
|
|
11
15
|
end
|
|
12
16
|
|
|
13
17
|
it "finds a direct requirement" do
|
|
14
|
-
|
|
18
|
+
gemfile = "asd\n bundler (1.0.1)"
|
|
19
|
+
requirement(gemfile).should == "1.0.1"
|
|
15
20
|
end
|
|
16
21
|
|
|
17
22
|
it "finds a indirect requirement" do
|
|
18
|
-
|
|
23
|
+
gemfile = "asd\n bundler (~>1.0.1)"
|
|
24
|
+
requirement(gemfile).should == "~>1.0.1"
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
it "finds dependencies before other requirements" do
|
|
28
|
+
gemfile = "asd\n bundler (~>1.0.1)\nDEPENDENCIES\n bundler (= 1.1.rc)"
|
|
29
|
+
requirement(gemfile).should == "= 1.1.rc"
|
|
19
30
|
end
|
|
20
31
|
end
|
|
21
32
|
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: matching_bundle
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 25
|
|
5
5
|
prerelease:
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 1
|
|
9
|
-
-
|
|
10
|
-
version: 0.1.
|
|
9
|
+
- 1
|
|
10
|
+
version: 0.1.1
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Michael Grosser
|
|
@@ -15,7 +15,7 @@ autorequire:
|
|
|
15
15
|
bindir: bin
|
|
16
16
|
cert_chain: []
|
|
17
17
|
|
|
18
|
-
date: 2011-
|
|
18
|
+
date: 2011-11-19 00:00:00 -08:00
|
|
19
19
|
default_executable: matching_bundle
|
|
20
20
|
dependencies: []
|
|
21
21
|
|