Skip to content
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

Remove Rails dependencies #47

Merged
merged 1 commit into from
Oct 28, 2016
Merged

Conversation

seanpdoyle
Copy link
Collaborator

#39

This PR replaces rspec-rails with rspec, and removes the activesupport dependency, which should make it easier to use this gem outside of a Rails environment. As a nice bonus, it also reduces the total number of gem dependencies (as reported by bundle install) from 35 to 15.

There were only 2 methods provided by ActiveSupport that were being used: Module#mattr_accessor and String#strip_heredoc. For mattr_accessor, I've added a (roughly) equivalent implementation, minus the instance-level getter and setter methods (which we presumably don't want anyway). As for strip_heredoc, I've just copied the implementation from ActiveSupport into a private method inside JsonMatchers::RSpec. Personally I'd de-indent the heredocs and live with the ugliness, but to each their own.

Anyway, thank you for writing this gem. I've used it in a bunch of projects when I needed to test my JSON APIs, and it's been hugely helpful :)

@seanpdoyle seanpdoyle force-pushed the omghax-remove-rails-dependencies branch 2 times, most recently from 19f9876 to 20cfb50 Compare October 28, 2016 19:13
#39

This PR replaces `rspec-rails` with `rspec`, and removes the
`activesupport` dependency, which should make it easier to use this gem
outside of a Rails environment.

As a nice bonus, it also reduces the total number of gem dependencies
(as reported by `bundle install`) from 35 to 15.

There were only a few methods provided by ActiveSupport that were being
used, which have been replaced.
@seanpdoyle seanpdoyle force-pushed the omghax-remove-rails-dependencies branch from 20cfb50 to 395f0bb Compare October 28, 2016 19:27
@seanpdoyle seanpdoyle merged commit 395f0bb into master Oct 28, 2016
@seanpdoyle seanpdoyle deleted the omghax-remove-rails-dependencies branch October 28, 2016 19:44
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.

None yet

2 participants