Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: opal/opal-rspec
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: b123b18dd0a0
Choose a base ref
...
head repository: opal/opal-rspec
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: c46aba14ba46
Choose a head ref
  • 2 commits
  • 10 files changed
  • 1 contributor

Commits on Oct 15, 2014

  1. Use vendor gems

    adambeynon committed Oct 15, 2014
    Copy the full SHA
    fc9c1a6 View commit details
  2. Copy the full SHA
    c46aba1 View commit details
Showing with 88 additions and 28 deletions.
  1. +15 −0 .gitmodules
  2. +5 −5 Gemfile
  3. +16 −0 lib/opal/rspec.rb
  4. +1 −23 opal/opal/rspec.rb
  5. +46 −0 opal/opal/rspec/requires.rb
  6. +1 −0 rspec
  7. +1 −0 rspec-core
  8. +1 −0 rspec-expectations
  9. +1 −0 rspec-mocks
  10. +1 −0 rspec-support
15 changes: 15 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[submodule "rspec"]
path = rspec
url = https://github.com/rspec/rspec.git
[submodule "rspec-support"]
path = rspec-support
url = https://github.com/rspec/rspec-support.git
[submodule "rspec-core"]
path = rspec-core
url = https://github.com/rspec/rspec-core.git
[submodule "rspec-mocks"]
path = rspec-mocks
url = https://github.com/rspec/rspec-mocks.git
[submodule "rspec-expectations"]
path = rspec-expectations
url = https://github.com/rspec/rspec-expectations.git
10 changes: 5 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -4,8 +4,8 @@ gemspec
gem 'opal', github: 'opal/opal'
# gem 'opal', path: '../opal'

gem 'rspec', '3.0.0.beta1'
gem 'rspec-support', '3.0.0.beta1'
gem 'rspec-core', '3.0.0.beta1'
gem 'rspec-mocks', '3.0.0.beta1'
gem 'rspec-expectations', '3.0.0.beta1'
gem 'rspec', :path => 'rspec'
gem 'rspec-support', :path => 'rspec-support'
gem 'rspec-core', :path => 'rspec-core'
gem 'rspec-mocks', :path => 'rspec-mocks'
gem 'rspec-expectations', :path => 'rspec-expectations'
16 changes: 16 additions & 0 deletions lib/opal/rspec.rb
Original file line number Diff line number Diff line change
@@ -4,3 +4,19 @@
# Just register our opal code path with opal build tools
Opal.append_path File.expand_path('../../../opal', __FILE__)

%w[rspec rspec-core rspec-expectations rspec-mocks rspec-support].each do |gem|
Opal.append_path File.expand_path("../../../#{gem}/lib", __FILE__)
end

::Opal::Processor.dynamic_require_severity = :warning
Opal::Processor.stub_file "rspec/matchers/built_in/have"
Opal::Processor.stub_file "diff/lcs"
Opal::Processor.stub_file "diff/lcs/hunk"
Opal::Processor.stub_file "fileutils"
Opal::Processor.stub_file "test/unit/assertions"
Opal::Processor.stub_file "coderay"
Opal::Processor.stub_file "optparse"
Opal::Processor.stub_file "shellwords"
Opal::Processor.stub_file "socket"
Opal::Processor.stub_file "uri"
Opal::Processor.stub_file "drb/drb"
24 changes: 1 addition & 23 deletions opal/opal/rspec.rb
Original file line number Diff line number Diff line change
@@ -4,29 +4,7 @@ class Unit; end

Test = MiniTest

require 'file'
require 'corelib/dir'
require 'thread'

require 'set'
require 'time'
require 'rbconfig'
require 'pathname'

# vendor a pre-built rspec
require 'opal/rspec/rspec'

# we "fix" these files, so require them now so they are loaded before our
# fixes file. We can't use Kernel#require() directly as the compiler will
# complain it can't find these files at compile time, but they are available
# from rspec.js from the gem.
%w[rspec
rspec/core/formatters/base_text_formatter
rspec/core/formatters/html_printer
rspec/matchers/pretty
rspec/matchers/built_in/base_matcher
rspec/matchers/built_in/be].each { |r| `self.$require(r)` }

require 'opal/rspec/requires'
require 'opal/rspec/fixes'
require 'opal/rspec/text_formatter'
require 'opal/rspec/browser_formatter'
46 changes: 46 additions & 0 deletions opal/opal/rspec/requires.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
require 'file'
require 'corelib/dir'
require 'thread'

require 'set'
require 'time'
require 'rbconfig'
require 'pathname'

# TODO: still needed? meh..
require 'rspec/core/version'
require 'rspec/core/flat_map'
require 'rspec/core/filter_manager'
require 'rspec/core/dsl'
require 'rspec/core/reporter'
require 'rspec/core/hooks'
require 'rspec/core/memoized_helpers'
require 'rspec/core/metadata'
require 'rspec/core/pending'
require 'rspec/core/formatters'
require 'rspec/core/ordering'
require 'rspec/core/world'
require 'rspec/core/configuration'
require 'rspec/core/option_parser'
require 'rspec/core/configuration_options'
require 'rspec/core/command_line'
require 'rspec/core/runner'
require 'rspec/core/example'
require 'rspec/core/shared_example_group/collection'
require 'rspec/core/shared_example_group'
require 'rspec/core/example_group'

require 'rspec/core/mocking/with_rspec'

require 'rspec/support'
require 'rspec/core'
require 'rspec/expectations'
require 'rspec/mocks'
require 'rspec'

# FIXME: still needed?
require 'rspec/core/formatters/base_text_formatter'
require 'rspec/core/formatters/html_printer'
require 'rspec/matchers/pretty'
require 'rspec/matchers/built_in/base_matcher'
require 'rspec/matchers/built_in/be'
1 change: 1 addition & 0 deletions rspec
Submodule rspec added at e058d1
1 change: 1 addition & 0 deletions rspec-core
Submodule rspec-core added at fdcaae
1 change: 1 addition & 0 deletions rspec-expectations
Submodule rspec-expectations added at 311b60
1 change: 1 addition & 0 deletions rspec-mocks
Submodule rspec-mocks added at a501f9
1 change: 1 addition & 0 deletions rspec-support
Submodule rspec-support added at 6c0c93