Skip to content

Setup the initial build for rspec-autotest #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Jul 28, 2013
Merged

Setup the initial build for rspec-autotest #1

merged 15 commits into from
Jul 28, 2013

Conversation

JonRowe
Copy link
Member

@JonRowe JonRowe commented Jul 9, 2013

As a PR

@JonRowe
Copy link
Member Author

JonRowe commented Jul 10, 2013

(ping @myronmarston @alindeman @samphippen etc)

@myronmarston
Copy link
Member

I'll try to review this tonight...

@JonRowe
Copy link
Member Author

JonRowe commented Jul 10, 2013

❤️ Sorry to hassle you, just making sure it got found.:)

# Derived from the `Autotest` class, extends the `autotest` command to work
# with RSpec.
#
class Autotest::Rspec2 < Autotest
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be RSpec or Rspec? (I suppose it should be whatever it was before....)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was Autotest::Rspec2 before

JonRowe added 4 commits July 12, 2013 15:52
autotest will automatically require autotest/rspec2 but having this
in rspec-autotest this will conflict with rspec-core so both
autotest/rspec2 files will automatically require rspec/autotest
@JonRowe
Copy link
Member Author

JonRowe commented Jul 13, 2013

@myronmarston I've checked this with running the following tests:

  • Running autotest on a 2-14 suite.
  • Upgrading to 2-99 and seeing deprecation
  • Installing rspec-autotest and seeing deprecation removed
  • Upgrading to Rspec 3 and seeing autotest still work

@myronmarston
Copy link
Member

👍 Works for me.


spec.required_ruby_version = '>= 1.8.7'

spec.add_dependency "rspec-core", ">= 2.9.9"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be 2.99 not, 2.9.9. They mean different things.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quite right, good spot!

#{'*'*50}
EOS
exit(1)
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this file need to be here? It adds duplication with rspec-core, and will add complication when we remove rspec/autorun...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because I couldn't think of a way to correctly determine the absolute path to rspec-core's executable and we are referencing it at

RSPEC_EXECUTABLE = File.expand_path('../../../exe/rspec', __FILE__)
and then using it to build the rspec command at
%|#{prefix}"#{ruby}"#{suffix} -S "#{RSPEC_EXECUTABLE}" --tty #{normalize(files_to_test).keys.flatten.map { |f| %|"#{f}"|}.join(' ')}|

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if rspec-core exposed it via a public API?

Something like RSpec::Core.path_to_executable ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, I don't have admin access to the repo but can we get TravisCI setup on this? (I can't flick the switch as a contributor) and we also need to set master as the main branch (Github thinks this branch is mainline atm it seems)

@myronmarston
Copy link
Member

BTW, I went ahead and pushed a version of this to rubygems.org just to ensure we get the name rspec-autotest (I can imagine someone squatting on it after seeing this new repo appear).

JonRowe added a commit that referenced this pull request Jul 28, 2013
Setup the initial build for rspec-autotest
@JonRowe JonRowe merged commit f4515e7 into master Jul 28, 2013
@JonRowe JonRowe deleted the initial_build branch July 28, 2013 03:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants