pax_global_header00006660000000000000000000000064121432074220014507gustar00rootroot0000000000000052 comment=6e9f224fc211cf9dea5f5d1d0e3dc4dc379314f9 ruby-appraisal-0.5.1/000077500000000000000000000000001214320742200144455ustar00rootroot00000000000000ruby-appraisal-0.5.1/.gitignore000066400000000000000000000000611214320742200164320ustar00rootroot00000000000000*.swp tmp pkg .swo *~ *.gem Gemfile.lock .bundle ruby-appraisal-0.5.1/.rspec000066400000000000000000000000101214320742200155510ustar00rootroot00000000000000--color ruby-appraisal-0.5.1/.travis.yml000066400000000000000000000001021214320742200165470ustar00rootroot00000000000000rvm: - 1.8.7 - 1.9.2 - 1.9.3 branches: only: - master ruby-appraisal-0.5.1/CONTRIBUTING.md000066400000000000000000000024701214320742200167010ustar00rootroot00000000000000We love pull requests. Here's a quick guide: 1. Fork the repo. 2. Run the tests. We only take pull requests with passing tests, and it's great to know that you have a clean slate: `bundle && rake` 3. Add a test for your change. Only refactoring and documentation changes require no new tests. If you are adding functionality or fixing a bug, we need a test! 4. Make the test pass. 5. Push to your fork and submit a pull request. At this point you're waiting on us. We like to at least comment on, if not accept, pull requests within three business days (and, typically, one business day). We may suggest some changes or improvements or alternatives. Some things that will increase the chance that your pull request is accepted, taken straight from the Ruby on Rails guide: * Use Rails idioms and helpers * Include tests that fail without your code, and pass with it * Update the documentation, the surrounding one, examples elsewhere, guides, whatever is affected by your contribution Syntax: * Two spaces, no tabs. * No trailing whitespace. Blank lines should not have any space. * Prefer &&/|| over and/or. * MyClass.my_method(my_arg) not my_method( my_arg ) or my_method my_arg. * a = b and not a=b. * Follow the conventions you see used in the source already. And in case we didn't emphasize it enough: we love tests! ruby-appraisal-0.5.1/GOALS000066400000000000000000000003311214320742200152320ustar00rootroot00000000000000Appraisal hits 1.0.0 when: * It can reliably reproduce bugs in specific configurations of gems. * It has standalone binary for controlling the infrastructure. * It is transparent unless specifically interacted with. ruby-appraisal-0.5.1/Gemfile000066400000000000000000000000321214320742200157330ustar00rootroot00000000000000source :rubygems gemspec ruby-appraisal-0.5.1/MIT-LICENSE000066400000000000000000000020721214320742200161020ustar00rootroot00000000000000The MIT License Copyright (c) 2010-2012 thoughtbot, inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ruby-appraisal-0.5.1/README.md000066400000000000000000000072261214320742200157330ustar00rootroot00000000000000# Appraisal [![Build Status](https://secure.travis-ci.org/thoughtbot/appraisal.png)](http://travis-ci.org/thoughtbot/appraisal?branch=master) Find out what your Ruby gems are worth. Synopsis -------- Appraisal integrates with bundler and rake to test your library against different versions of dependencies in repeatable scenarios called "appraisals." Appraisal is designed to make it easy to check for regressions in your library without interfering with day-to-day development using bundler. Installation ------------ In your Gemfile: gem "appraisal" Setup ----- Setting up appraisal requires an Appraisals file (similar to a Gemfile) in your project root, named "Appraisals" (note the case), and some slight changes to your project's Rakefile. An Appraisals file consists of several appraisal definitions. An appraisal definition is simply a list of gem dependencies. For example, to test with a few versions of Rails: appraise "rails2" do gem "rails", "2.3.9" end appraise "rails3" do gem "rails", "3.0.0" end The dependencies in your Appraisals file are combined with dependencies in your Gemfile, so you don't need to repeat anything that's the same for each appraisal. If something is specified in both the Gemfile and an appraisal, the version from the appraisal takes precedence. Once you have an Appraisals file set up, just require appraisal in your Rakefile: require 'appraisal' It's also recommended that you setup bundler at the very top of your Rakefile, so that you don't need to constantly run bundle exec: require 'rubygems' require 'bundler/setup' Usage ----- Once you've configured the appraisals you want to use, you need to install the dependencies for each appraisal: rake appraisal:install This will resolve, install, and lock the dependencies for that appraisal using bundler. Once you have your dependencies setup, you can run any rake task in a single appraisal: rake appraisal:rails2 test This will run your "test" rake task using the dependencies configured for Rails 2. You can also run each appraisal in turn: rake appraisal test If you want to use only the dependencies from your Gemfile, just run "rake test" as normal. This allows you to keep running with the latest versions of your dependencies in quick test runs, but keep running the tests in older versions to check for regressions. Under the hood -------------- Running "rake appraisal:install" generates a Gemfile for each appraisal by combining your root Gemfile with the specific requirements for each appraisal. These are stored in the "gemfiles" directory, and should be added to version control to ensure that the same versions are always used. When running rake tasks for an appraisal, the rake task is run with the appropriate Gemfile for that appraisal, ensuring the correct dependencies are used. Version Control -------------- When using Appraisal, we recommend that you check your Gemfile.lock into version control, as well as the gemfiles directory generated by Appraisal. This will ensure that your tests are always green when you check out a fresh copy. It also allows you to create reproducible regression tests for version-specific bugs. Credits ------- ![thoughtbot](http://thoughtbot.com/images/tm/logo.png) Appraisal is maintained and funded by [thoughtbot, inc](http://thoughtbot.com/community) Thank you to all [the contributors](https://github.com/thoughtbot/appraisal/contributors)! The names and logos for thoughtbot are trademarks of thoughtbot, inc. License ------- Appraisal is Copyright © 2010-2012 Joe Ferris and thoughtbot. It is free software, and may be redistributed under the terms specified in the MIT-LICENSE file. ruby-appraisal-0.5.1/Rakefile000066400000000000000000000006441214320742200161160ustar00rootroot00000000000000require 'bundler/setup' require 'bundler/gem_tasks' require 'rspec/core/rake_task' require 'cucumber/rake/task' RSpec::Core::RakeTask.new do |t| t.pattern = 'spec/**/*_spec.rb' end Cucumber::Rake::Task.new(:cucumber) do |t| t.fork = true t.cucumber_opts = ['--format', (ENV['CUCUMBER_FORMAT'] || 'progress')] end desc "Default: run the rspec examples and cucumber scenarios" task :default => [:spec, :cucumber] ruby-appraisal-0.5.1/appraisal.gemspec000066400000000000000000000020701214320742200177650ustar00rootroot00000000000000# -*- encoding: utf-8 -*- $:.push File.expand_path("../lib", __FILE__) require "appraisal/version" Gem::Specification.new do |s| s.name = %q{appraisal} s.version = Appraisal::VERSION.dup s.platform = Gem::Platform::RUBY s.authors = ["Joe Ferris"] s.email = %q{jferris@thoughtbot.com} s.homepage = "http://github.com/thoughtbot/appraisal" s.summary = %q{Find out what your Ruby gems are worth} s.description = %q{Appraisal integrates with bundler and rake to test your library against different versions of dependencies in repeatable scenarios called "appraisals."} s.files = `git ls-files`.split("\n") s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } s.require_paths = ["lib"] s.add_runtime_dependency('rake') s.add_runtime_dependency('bundler') s.add_development_dependency('cucumber', '~> 1.0') s.add_development_dependency('rspec', '~> 2.6') s.add_development_dependency('aruba', '~> 0.4.2') end ruby-appraisal-0.5.1/features/000077500000000000000000000000001214320742200162635ustar00rootroot00000000000000ruby-appraisal-0.5.1/features/appraisals.feature000066400000000000000000000057771214320742200220170ustar00rootroot00000000000000@disable-bundler Feature: run a rake task through several appraisals Background: Given a directory named "projecto" And the following installed dummy gems: | name | version | | dummy_girl | 1.3.0 | | dummy_girl | 1.3.2 | | dummy_rake | 0.8.7 | | dummy_rake | 0.9.0 | | dummy_sass | 3.1.0 | | dummy_spec | 3.1.9 | When I cd to "projecto" And I write to "Gemfile" with: """ gem "dummy_rake", "0.8.7" gem "dummy_girl" group :assets do gem 'dummy_sass', " ~> 3.1.0" end group :test, :development do gem 'dummy_spec', " ~> 3.1.0" end """ When I add "appraisal" from this project as a dependency And I write to "Appraisals" with: """ appraise "1.3.2" do gem "dummy_girl", "1.3.2" end appraise "1.3.0" do gem "dummy_girl", "1.3.0" gem "dummy_rake", "0.9.0" end """ When I write to "Rakefile" with: """ require 'rubygems' require 'bundler/setup' require 'appraisal' task :version do require 'dummy_girl' puts "Loaded #{$dummy_girl_version}" end task :fail do require 'dummy_girl' puts "Fail #{$dummy_girl_version}" raise end task :default => :version """ When I successfully run `bundle install --local` And I successfully run `bundle exec rake appraisal:install --trace` Scenario: run a specific task with one appraisal When I successfully run `bundle exec rake appraisal:1.3.0 version --trace` Then the output should contain "Loaded 1.3.0" Scenario: run a specific task with all appraisals When I successfully run `bundle exec rake appraisal version --trace` Then the output should contain "Loaded 1.3.0" And the output should contain "Loaded 1.3.2" And the output should not contain "Invoke version" Scenario: run the default task with one appraisal When I successfully run `bundle exec rake appraisal:1.3.0 --trace` Then the output should contain "Loaded 1.3.0" Scenario: run the default task with all appraisals When I successfully run `bundle exec rake appraisal --trace` Then the output should contain "Loaded 1.3.0" And the output should contain "Loaded 1.3.2" Scenario: run a failing task with one appraisal When I run `bundle exec rake appraisal:1.3.0 fail --trace` Then the output should contain "Fail 1.3.0" And the exit status should be 1 Scenario: run a failing task with all appraisals When I run `bundle exec rake appraisal fail --trace` Then the output should contain "Fail 1.3.2" But the output should not contain "Fail 1.3.0" And the exit status should be 1 Scenario: run a cleanup task When I run `bundle exec rake appraisal:cleanup --trace` Then a file named "gemfiles/1.3.0.gemfile" should not exist And a file named "gemfiles/1.3.0.gemfile.lock" should not exist And a file named "gemfiles/1.3.2.gemfile" should not exist And a file named "gemfiles/1.3.2.gemfile.lock" should not exist ruby-appraisal-0.5.1/features/gemspec.feature000066400000000000000000000044621214320742200212710ustar00rootroot00000000000000@disable-bundler Feature: appraisals using an existing gemspec Background: Given a directory named "gemspecced" And the following installed dummy gems: | name | version | | dummy_girl | 1.3.0 | | dummy_girl | 1.3.2 | When I cd to "gemspecced" And I write to "gemspecced.gemspec" with: """ Gem::Specification.new do |s| s.name = %q{gemspecced} s.version = '0.1' s.summary = %q{featureful!} s.add_development_dependency('dummy_girl', '1.3.2') end """ And a directory named "specdir" And I write to "specdir/gemspecced.gemspec" with: """ Gem::Specification.new do |s| s.name = %q{gemspecced} s.version = '0.1' s.summary = %q{featureful!} s.add_development_dependency('dummy_girl', '1.3.0') end """ And I write to "Appraisals" with: """ appraise "stock" do gem "rake" end """ When I write to "Rakefile" with: """ require 'rubygems' require 'bundler/setup' require 'appraisal' task :version do require 'dummy_girl' puts "Loaded #{$dummy_girl_version}" end """ Scenario: run a gem in the gemspec And I write to "Gemfile" with: """ gemspec """ When I add "appraisal" from this project as a dependency And I successfully run `bundle install --local` And I successfully run `bundle exec rake appraisal:install --trace` And I run `bundle exec rake appraisal version --trace` Then the output should contain "Loaded 1.3.2" Scenario: run a gem in the gemspec via path And I write to "Gemfile" with: """ gemspec :path => './specdir' """ When I add "appraisal" from this project as a dependency When I successfully run `bundle exec rake appraisal:install --trace` When I run `bundle exec rake appraisal version --trace` Then the output should contain "Loaded 1.3.0" Scenario: run a gem in the gemspec via path And I write to "Gemfile" with: """ gemspec :path => './specdir' """ When I add "appraisal" from this project as a dependency When I successfully run `bundle exec rake appraisal:install --trace` When I run `bundle exec rake appraisal version --trace` Then the output should contain "Loaded 1.3.0" ruby-appraisal-0.5.1/features/step_definitions/000077500000000000000000000000001214320742200216315ustar00rootroot00000000000000ruby-appraisal-0.5.1/features/step_definitions/dependency_steps.rb000066400000000000000000000017301214320742200255130ustar00rootroot00000000000000When /^I add "([^"]*)" from this project as a dependency$/ do |gem_name| append_to_file('Gemfile', %{\ngem "#{gem_name}", :path => "#{PROJECT_ROOT}"}) end Given /^the following installed dummy gems:$/ do |table| table.hashes.each do |hash| name = hash["name"] version = hash["version"] create_dir(name) cd(name) create_dir("lib") gem_path = "#{name}.gemspec" version_path = "lib/#{name}.rb" spec = <<-SPEC Gem::Specification.new do |s| s.name = '#{name}' s.version = '#{version}' s.authors = 'Mr. Smith' s.summary = 'summary' s.files = '#{version_path}' end SPEC write_file(gem_path, spec) write_file(version_path, "$#{name}_version = '#{version}'") in_current_dir { `gem build #{gem_path} 2>&1` } set_env("GEM_HOME", TMP_GEM_ROOT) in_current_dir { `gem install #{name}-#{version}.gem 2>&1` } FileUtils.rm_rf(File.join(current_dir, name)) dirs.pop end end ruby-appraisal-0.5.1/features/support/000077500000000000000000000000001214320742200177775ustar00rootroot00000000000000ruby-appraisal-0.5.1/features/support/aruba.rb000066400000000000000000000001751214320742200214210ustar00rootroot00000000000000Before do # Extend the timeout before Aruba will kill the process to 5 minutes. @aruba_timeout_seconds = 5 * 60 * 60 end ruby-appraisal-0.5.1/features/support/env.rb000066400000000000000000000004641214320742200211200ustar00rootroot00000000000000require 'aruba/cucumber' PROJECT_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..', '..')).freeze TMP_GEM_ROOT = File.join(PROJECT_ROOT, "tmp", "gems") Before do FileUtils.rm_rf(TMP_GEM_ROOT) FileUtils.mkdir_p(TMP_GEM_ROOT) end ENV["GEM_PATH"] = [TMP_GEM_ROOT, ENV["GEM_PATH"]].join(":") ruby-appraisal-0.5.1/lib/000077500000000000000000000000001214320742200152135ustar00rootroot00000000000000ruby-appraisal-0.5.1/lib/appraisal.rb000066400000000000000000000001121214320742200175060ustar00rootroot00000000000000require 'appraisal/version' require 'appraisal/task' Appraisal::Task.new ruby-appraisal-0.5.1/lib/appraisal/000077500000000000000000000000001214320742200171675ustar00rootroot00000000000000ruby-appraisal-0.5.1/lib/appraisal/appraisal.rb000066400000000000000000000021261214320742200214710ustar00rootroot00000000000000require 'appraisal/gemfile' require 'appraisal/command' require 'fileutils' module Appraisal # Represents one appraisal and its dependencies class Appraisal attr_reader :name, :gemfile def initialize(name, source_gemfile) @name = name @gemfile = source_gemfile.dup end def gem(name, *requirements) gemfile.gem(name, *requirements) end def write_gemfile ::File.open(gemfile_path, "w") do |file| file.puts("# This file was generated by Appraisal") file.puts file.write(gemfile.to_s) end end def install Command.new(bundle_command).run end def gemfile_path unless ::File.exist?(gemfile_root) FileUtils.mkdir(gemfile_root) end ::File.join(gemfile_root, "#{clean_name}.gemfile") end def bundle_command gemfile = "--gemfile='#{gemfile_path}'" "bundle check #{gemfile} || bundle install #{gemfile}" end private def gemfile_root ::File.join(Dir.pwd, "gemfiles") end def clean_name name.gsub(/[^\w\.]/, '_') end end end ruby-appraisal-0.5.1/lib/appraisal/command.rb000066400000000000000000000024151214320742200211340ustar00rootroot00000000000000module Appraisal # Executes commands with a clean environment class Command BUNDLER_ENV_VARS = %w(RUBYOPT BUNDLE_PATH BUNDLE_BIN_PATH BUNDLE_GEMFILE).freeze def self.from_args(gemfile) command = ([$0] + ARGV.slice(1, ARGV.size)).join(' ') new(command, gemfile) end def initialize(command, gemfile = nil) @original_env = {} @gemfile = gemfile if command =~ /^bundle/ @command = command else @command = "bundle exec #{command}" end end def run announce with_clean_env do unless Kernel.system(@command) exit(1) end end end def exec announce with_clean_env { Kernel.exec(@command) } end private def with_clean_env unset_bundler_env_vars ENV['BUNDLE_GEMFILE'] = @gemfile yield ensure restore_env end def announce if @gemfile puts ">> BUNDLE_GEMFILE=#{@gemfile} #{@command}" else puts ">> #{@command}" end end def unset_bundler_env_vars BUNDLER_ENV_VARS.each do |key| @original_env[key] = ENV[key] ENV[key] = nil end end def restore_env @original_env.each { |key, value| ENV[key] = value } end end end ruby-appraisal-0.5.1/lib/appraisal/dependency.rb000066400000000000000000000012111214320742200216250ustar00rootroot00000000000000module Appraisal # Dependency on a gem and optional version requirements class Dependency attr_reader :name, :requirements def initialize(name, requirements) @name = name @requirements = requirements end def to_s if no_requirements? gem_name else "#{gem_name}, #{inspect_requirements}" end end private def gem_name %{gem "#{name}"} end def no_requirements? requirements.nil? || requirements.empty? end def inspect_requirements requirements.map { |requirement| requirement.inspect.gsub(/^\{|\}$/, '') }.join(", ") end end end ruby-appraisal-0.5.1/lib/appraisal/file.rb000066400000000000000000000014061214320742200204340ustar00rootroot00000000000000require 'appraisal/appraisal' require 'appraisal/gemfile' module Appraisal # Loads and parses Appraisal files class File attr_reader :appraisals, :gemfile def self.each(&block) new.each(&block) end def initialize @appraisals = [] @gemfile = Gemfile.new @gemfile.load(ENV['BUNDLE_GEMFILE'] || 'Gemfile') run(IO.read(path)) if ::File.exists?(path) end def each(&block) appraisals.each(&block) end def appraise(name, &block) appraisal = Appraisal.new(name, gemfile) appraisal.instance_eval(&block) @appraisals << appraisal end private def run(definitions) instance_eval(definitions, __FILE__, __LINE__) end def path 'Appraisals' end end end ruby-appraisal-0.5.1/lib/appraisal/gemfile.rb000066400000000000000000000025661214320742200211350ustar00rootroot00000000000000require 'appraisal/dependency' require 'appraisal/gemspec' module Appraisal # Load bundler Gemfiles and merge dependencies class Gemfile attr_reader :dependencies def initialize @sources = [] @dependencies = [] end def load(path) run(IO.read(path)) end def run(definitions) instance_eval(definitions, __FILE__, __LINE__) end def gem(name, *requirements) @dependencies.reject! { |dependency| dependency.name == name } @dependencies << Dependency.new(name, requirements) end def group(*names) # ignore the group end def source(source) @sources << source end def to_s [source_entry, dependencies_entry, gemspec_entry].join("\n\n") end def dup gemfile = Gemfile.new @sources.each { |source| gemfile.source(source) } dependencies.each do |dependency| gemfile.gem(dependency.name, *dependency.requirements) end gemfile.gemspec(@gemspec.options) if @gemspec gemfile end def gemspec(options = {}) @gemspec = Gemspec.new(options) end protected def source_entry @sources.map { |source| "source #{source.inspect}" }.join("\n") end def dependencies_entry dependencies.map { |dependency| dependency.to_s }.join("\n") end def gemspec_entry @gemspec.to_s end end end ruby-appraisal-0.5.1/lib/appraisal/gemspec.rb000066400000000000000000000013341214320742200211400ustar00rootroot00000000000000require 'pathname' module Appraisal class Gemspec attr_reader :options def initialize(options = {}) @options = options @options[:path] ||= '.' end def exists? Dir[::File.join(@options[:path], "*.gemspec")].size > 0 end def to_s if exists? "gemspec #{exported_options.inspect.gsub(/^\{|\}$/, '')}" end end private def exported_options # Check to see if this is an absolute path if @options[:path] =~ /^(?:\/|\S:)/ @options else # Remove leading ./ from path, if any exported_path = ::File.join("..", @options[:path].sub(/^\.\/?/,'')) @options.merge(:path => exported_path) end end end end ruby-appraisal-0.5.1/lib/appraisal/task.rb000066400000000000000000000024521214320742200204610ustar00rootroot00000000000000require 'appraisal/file' require 'rake/tasklib' module Appraisal # Defines tasks for installing appraisal dependencies and running other tasks # for a given appraisal. class Task < Rake::TaskLib def initialize namespace :appraisal do desc "Generate a Gemfile for each appraisal" task :gemfiles do File.each do |appraisal| appraisal.write_gemfile end end desc "Resolve and install dependencies for each appraisal" task :install => :gemfiles do File.each do |appraisal| appraisal.install end end desc "Remove all generated gemfiles from gemfiles/ folder" task :cleanup do require 'fileutils' FileUtils.rm_f Dir['gemfiles/*.{gemfile,gemfile.lock}'] end File.each do |appraisal| desc "Run the given task for appraisal #{appraisal.name}" task appraisal.name do Command.from_args(appraisal.gemfile_path).exec end end task :all do File.each do |appraisal| Command.from_args(appraisal.gemfile_path).run end exit end end desc "Run the given task for all appraisals" task :appraisal => "appraisal:all" end end end ruby-appraisal-0.5.1/lib/appraisal/version.rb000066400000000000000000000000601214320742200211750ustar00rootroot00000000000000module Appraisal VERSION = '0.5.1'.freeze end ruby-appraisal-0.5.1/metadata.yml000066400000000000000000000076551214320742200167650ustar00rootroot00000000000000--- !ruby/object:Gem::Specification name: appraisal version: !ruby/object:Gem::Version version: 0.5.1 prerelease: platform: ruby authors: - Joe Ferris autorequire: bindir: bin cert_chain: [] date: 2012-11-07 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: rake requirement: !ruby/object:Gem::Requirement none: false requirements: - - ! '>=' - !ruby/object:Gem::Version version: '0' type: :runtime prerelease: false version_requirements: !ruby/object:Gem::Requirement none: false requirements: - - ! '>=' - !ruby/object:Gem::Version version: '0' - !ruby/object:Gem::Dependency name: bundler requirement: !ruby/object:Gem::Requirement none: false requirements: - - ! '>=' - !ruby/object:Gem::Version version: '0' type: :runtime prerelease: false version_requirements: !ruby/object:Gem::Requirement none: false requirements: - - ! '>=' - !ruby/object:Gem::Version version: '0' - !ruby/object:Gem::Dependency name: cucumber requirement: !ruby/object:Gem::Requirement none: false requirements: - - ~> - !ruby/object:Gem::Version version: '1.0' type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement none: false requirements: - - ~> - !ruby/object:Gem::Version version: '1.0' - !ruby/object:Gem::Dependency name: rspec requirement: !ruby/object:Gem::Requirement none: false requirements: - - ~> - !ruby/object:Gem::Version version: '2.6' type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement none: false requirements: - - ~> - !ruby/object:Gem::Version version: '2.6' - !ruby/object:Gem::Dependency name: aruba requirement: !ruby/object:Gem::Requirement none: false requirements: - - ~> - !ruby/object:Gem::Version version: 0.4.2 type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement none: false requirements: - - ~> - !ruby/object:Gem::Version version: 0.4.2 description: Appraisal integrates with bundler and rake to test your library against different versions of dependencies in repeatable scenarios called "appraisals." email: jferris@thoughtbot.com executables: [] extensions: [] extra_rdoc_files: [] files: - .gitignore - .rspec - .travis.yml - CONTRIBUTING.md - GOALS - Gemfile - MIT-LICENSE - README.md - Rakefile - appraisal.gemspec - features/appraisals.feature - features/gemspec.feature - features/step_definitions/dependency_steps.rb - features/support/aruba.rb - features/support/env.rb - lib/appraisal.rb - lib/appraisal/appraisal.rb - lib/appraisal/command.rb - lib/appraisal/dependency.rb - lib/appraisal/file.rb - lib/appraisal/gemfile.rb - lib/appraisal/gemspec.rb - lib/appraisal/task.rb - lib/appraisal/version.rb - spec/appraisal/appraisal_spec.rb - spec/appraisal/gemfile_spec.rb - spec/spec_helper.rb homepage: http://github.com/thoughtbot/appraisal licenses: [] post_install_message: rdoc_options: [] require_paths: - lib required_ruby_version: !ruby/object:Gem::Requirement none: false requirements: - - ! '>=' - !ruby/object:Gem::Version version: '0' segments: - 0 hash: 2044545027023341244 required_rubygems_version: !ruby/object:Gem::Requirement none: false requirements: - - ! '>=' - !ruby/object:Gem::Version version: '0' segments: - 0 hash: 2044545027023341244 requirements: [] rubyforge_project: rubygems_version: 1.8.24 signing_key: specification_version: 3 summary: Find out what your Ruby gems are worth test_files: - features/appraisals.feature - features/gemspec.feature - features/step_definitions/dependency_steps.rb - features/support/aruba.rb - features/support/env.rb - spec/appraisal/appraisal_spec.rb - spec/appraisal/gemfile_spec.rb - spec/spec_helper.rb ruby-appraisal-0.5.1/spec/000077500000000000000000000000001214320742200153775ustar00rootroot00000000000000ruby-appraisal-0.5.1/spec/appraisal/000077500000000000000000000000001214320742200173535ustar00rootroot00000000000000ruby-appraisal-0.5.1/spec/appraisal/appraisal_spec.rb000066400000000000000000000017071214320742200226730ustar00rootroot00000000000000require 'spec_helper' require 'appraisal/appraisal' describe Appraisal::Appraisal do it "creates a proper bundle command" do appraisal = Appraisal::Appraisal.new('fake', 'fake') appraisal.stub(:gemfile_path).and_return("/home/test/test directory") appraisal.bundle_command.should == "bundle check --gemfile='/home/test/test directory' || bundle install --gemfile='/home/test/test directory'" end it "converts spaces to underscores in the gemfile path" do appraisal = Appraisal::Appraisal.new("one two", "Gemfile") appraisal.gemfile_path.should =~ /one_two\.gemfile$/ end it "converts punctuation to underscores in the gemfile path" do appraisal = Appraisal::Appraisal.new("o&ne!", "Gemfile") appraisal.gemfile_path.should =~ /o_ne_\.gemfile$/ end it "keeps dots in the gemfile path" do appraisal = Appraisal::Appraisal.new("rails3.0", "Gemfile") appraisal.gemfile_path.should =~ /rails3\.0\.gemfile$/ end end ruby-appraisal-0.5.1/spec/appraisal/gemfile_spec.rb000066400000000000000000000013531214320742200223240ustar00rootroot00000000000000require 'spec_helper' require 'appraisal/gemfile' describe Appraisal::Gemfile do it "supports gemfiles without sources" do gemfile = Appraisal::Gemfile.new gemfile.to_s.strip.should == "" end it "supports multiple sources" do gemfile = Appraisal::Gemfile.new gemfile.source "one" gemfile.source "two" gemfile.to_s.strip.should == %{source "one"\nsource "two"} end it "preserves dependency order" do gemfile = Appraisal::Gemfile.new gemfile.gem "one" gemfile.gem "two" gemfile.gem "three" gemfile.to_s.should =~ /one.*two.*three/m end it "supports symbol sources" do gemfile = Appraisal::Gemfile.new gemfile.source :one gemfile.to_s.strip.should == %{source :one} end end ruby-appraisal-0.5.1/spec/spec_helper.rb000066400000000000000000000000531214320742200202130ustar00rootroot00000000000000require 'rubygems' require 'bundler/setup'