appraisal 2.0.1 → 2.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 +4 -4
- data/appraisal.gemspec +1 -1
- data/lib/appraisal/appraisal.rb +6 -1
- data/lib/appraisal/bundler_dsl.rb +5 -5
- data/lib/appraisal/dependency_list.rb +2 -2
- data/lib/appraisal/gemfile.rb +3 -1
- data/lib/appraisal/ordered_hash.rb +22 -0
- data/lib/appraisal/travis_ci_helper.rb +3 -2
- data/lib/appraisal/version.rb +1 -1
- data/spec/acceptance/bundle_with_custom_path_spec.rb +48 -0
- data/spec/appraisal/file_spec.rb +1 -0
- metadata +5 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3e62486edd88ce962fe2bfa9385aaee5f7a18a3d
|
|
4
|
+
data.tar.gz: 87e7f4913a92cef3083029622223544ea4de2701
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 39c0aefe135188fb147aef623f10ff609e478daca8836855767c1260dc18576fc364c83dea9ee76aee39c84fc9afce5802a3c26b5a666c97e32b67b63a25a733
|
|
7
|
+
data.tar.gz: c80f38736122daa41bfc7f7c1773b2cc49e6b931707157d9c3dbca01ab4c35d30291ee858b29251a72f1506744d1fde3321f16447d4f370afbc097b3c0a93db7
|
data/appraisal.gemspec
CHANGED
|
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
|
|
|
21
21
|
s.add_runtime_dependency('rake')
|
|
22
22
|
s.add_runtime_dependency('bundler')
|
|
23
23
|
s.add_runtime_dependency('thor', '>= 0.14.0')
|
|
24
|
-
s.add_runtime_dependency("activesupport", ">= 3.2.21")
|
|
25
24
|
|
|
25
|
+
s.add_development_dependency("activesupport", ">= 3.2.21")
|
|
26
26
|
s.add_development_dependency('rspec', '~> 3.0')
|
|
27
27
|
end
|
data/lib/appraisal/appraisal.rb
CHANGED
|
@@ -60,7 +60,12 @@ module Appraisal
|
|
|
60
60
|
install_command(job_size)
|
|
61
61
|
].flatten.join(" ")
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
if Bundler.settings[:path]
|
|
64
|
+
env = { 'BUNDLE_DISABLE_SHARED_GEMS' => '1' }
|
|
65
|
+
Command.new(command, :env => env).run
|
|
66
|
+
else
|
|
67
|
+
Command.new(command).run
|
|
68
|
+
end
|
|
64
69
|
end
|
|
65
70
|
|
|
66
71
|
def update(gems = [])
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
require "appraisal/dependency_list"
|
|
2
|
-
require "
|
|
2
|
+
require "appraisal/ordered_hash"
|
|
3
3
|
|
|
4
4
|
module Appraisal
|
|
5
5
|
class BundlerDSL
|
|
@@ -13,10 +13,10 @@ module Appraisal
|
|
|
13
13
|
@ruby_version = nil
|
|
14
14
|
@dependencies = DependencyList.new
|
|
15
15
|
@gemspec = nil
|
|
16
|
-
@groups =
|
|
17
|
-
@platforms =
|
|
18
|
-
@git_sources =
|
|
19
|
-
@path_sources =
|
|
16
|
+
@groups = OrderedHash.new
|
|
17
|
+
@platforms = OrderedHash.new
|
|
18
|
+
@git_sources = OrderedHash.new
|
|
19
|
+
@path_sources = OrderedHash.new
|
|
20
20
|
end
|
|
21
21
|
|
|
22
22
|
def run(&block)
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
require 'appraisal/dependency'
|
|
2
|
-
require
|
|
2
|
+
require 'appraisal/ordered_hash'
|
|
3
3
|
|
|
4
4
|
module Appraisal
|
|
5
5
|
class DependencyList
|
|
6
6
|
def initialize
|
|
7
|
-
@dependencies =
|
|
7
|
+
@dependencies = OrderedHash.new
|
|
8
8
|
end
|
|
9
9
|
|
|
10
10
|
def add(name, requirements)
|
data/lib/appraisal/gemfile.rb
CHANGED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
module Appraisal
|
|
2
|
+
# An ordered hash implementation for Ruby 1.8.7 compatibility. This is not
|
|
3
|
+
# a complete implementation, but it covers Appraisal's specific needs.
|
|
4
|
+
class OrderedHash < ::Hash
|
|
5
|
+
# Hashes are ordered in Ruby 1.9.
|
|
6
|
+
if RUBY_VERSION < '1.9'
|
|
7
|
+
def initialize(*args, &block)
|
|
8
|
+
super
|
|
9
|
+
@keys = []
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def []=(key, value)
|
|
13
|
+
@keys << key unless has_key?(key)
|
|
14
|
+
super
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def values
|
|
18
|
+
@keys.collect { |key| self[key] }
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -3,8 +3,9 @@ require "yaml"
|
|
|
3
3
|
|
|
4
4
|
module Appraisal
|
|
5
5
|
class TravisCIHelper
|
|
6
|
-
NO_CONFIGURATION_WARNING = <<-WARNING.strip
|
|
7
|
-
Note: Run
|
|
6
|
+
NO_CONFIGURATION_WARNING = <<-WARNING.strip.gsub(/\s+/, " ")
|
|
7
|
+
Note: Run `appraisal generate --travis` to generate Travis CI
|
|
8
|
+
configuration.
|
|
8
9
|
WARNING
|
|
9
10
|
|
|
10
11
|
INVALID_CONFIGURATION_WARNING = <<-WARNING.strip.gsub(/\s+/, " ")
|
data/lib/appraisal/version.rb
CHANGED
|
@@ -19,4 +19,52 @@ describe "Bundle with custom path" do
|
|
|
19
19
|
expect(file "gemfiles/breakfast.gemfile").to be_exists
|
|
20
20
|
expect(output).to include("Successfully installed bundler")
|
|
21
21
|
end
|
|
22
|
+
|
|
23
|
+
context 'when already installed in vendor/another' do
|
|
24
|
+
let(:gem_name) { 'rack' }
|
|
25
|
+
let(:path) { 'vendor/bundle' }
|
|
26
|
+
|
|
27
|
+
before do
|
|
28
|
+
build_gemfile <<-Gemfile
|
|
29
|
+
source "https://rubygems.org"
|
|
30
|
+
|
|
31
|
+
gem '#{gem_name}'
|
|
32
|
+
Gemfile
|
|
33
|
+
|
|
34
|
+
run 'bundle install --path vendor/another'
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
it 'installs gems in the --path directory' do
|
|
38
|
+
build_gemfile <<-Gemfile
|
|
39
|
+
source "https://rubygems.org"
|
|
40
|
+
|
|
41
|
+
gem 'appraisal', :path => #{PROJECT_ROOT.inspect}
|
|
42
|
+
|
|
43
|
+
if RUBY_VERSION < "1.9"
|
|
44
|
+
gem "i18n", "~> 0.6.0"
|
|
45
|
+
gem "activesupport", "~> 3.2.21"
|
|
46
|
+
end
|
|
47
|
+
Gemfile
|
|
48
|
+
|
|
49
|
+
build_appraisal_file <<-Appraisals
|
|
50
|
+
appraise "#{gem_name}" do
|
|
51
|
+
gem '#{gem_name}'
|
|
52
|
+
end
|
|
53
|
+
Appraisals
|
|
54
|
+
|
|
55
|
+
run %(bundle install --path="#{path}")
|
|
56
|
+
run 'bundle exec appraisal install'
|
|
57
|
+
|
|
58
|
+
installed_gem = Dir.glob("tmp/stage/#{path}/ruby/*/gems/*").
|
|
59
|
+
map { |path| path.split('/').last }.
|
|
60
|
+
select { |gem| gem.include?(gem_name) }
|
|
61
|
+
expect(installed_gem).not_to be_empty
|
|
62
|
+
|
|
63
|
+
bundle_output = run 'bundle check'
|
|
64
|
+
expect(bundle_output).to include("The Gemfile's dependencies are satisfied")
|
|
65
|
+
|
|
66
|
+
appraisal_output = run 'bundle exec appraisal install'
|
|
67
|
+
expect(appraisal_output).to include("The Gemfile's dependencies are satisfied")
|
|
68
|
+
end
|
|
69
|
+
end
|
|
22
70
|
end
|
data/spec/appraisal/file_spec.rb
CHANGED
|
@@ -7,6 +7,7 @@ require 'rspec/matchers/built_in/raise_error'
|
|
|
7
7
|
|
|
8
8
|
describe Appraisal::File do
|
|
9
9
|
it "complains when no Appraisals file is found" do
|
|
10
|
+
allow(::File).to receive(:exist?).with(/Gemfile/).and_return(true)
|
|
10
11
|
allow(::File).to receive(:exist?).with("Appraisals").and_return(false)
|
|
11
12
|
expect { described_class.new }.to raise_error(Appraisal::AppraisalsNotFound)
|
|
12
13
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: appraisal
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0.
|
|
4
|
+
version: 2.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Joe Ferris
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2015-
|
|
12
|
+
date: 2015-06-26 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rake
|
|
@@ -60,7 +60,7 @@ dependencies:
|
|
|
60
60
|
- - ">="
|
|
61
61
|
- !ruby/object:Gem::Version
|
|
62
62
|
version: 3.2.21
|
|
63
|
-
type: :
|
|
63
|
+
type: :development
|
|
64
64
|
prerelease: false
|
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
|
66
66
|
requirements:
|
|
@@ -114,6 +114,7 @@ files:
|
|
|
114
114
|
- lib/appraisal/gemspec.rb
|
|
115
115
|
- lib/appraisal/git_source.rb
|
|
116
116
|
- lib/appraisal/group.rb
|
|
117
|
+
- lib/appraisal/ordered_hash.rb
|
|
117
118
|
- lib/appraisal/path_source.rb
|
|
118
119
|
- lib/appraisal/platform.rb
|
|
119
120
|
- lib/appraisal/task.rb
|
|
@@ -163,7 +164,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
163
164
|
version: '0'
|
|
164
165
|
requirements: []
|
|
165
166
|
rubyforge_project:
|
|
166
|
-
rubygems_version: 2.4.
|
|
167
|
+
rubygems_version: 2.4.8
|
|
167
168
|
signing_key:
|
|
168
169
|
specification_version: 4
|
|
169
170
|
summary: Find out what your Ruby gems are worth
|