Refactor specs #29

Open
wants to merge 12 commits into
from

Conversation

Projects
None yet
3 participants
@mootpointer

Not yet finished, but the start of this. Pull request is to get travis to run the tests.

  • Added matchers for better spec readability
  • Moved refactored examples into contexts

mootpointer added some commits Apr 9, 2013

First pass of refactoring
* Added matchers for better spec readability
* Moved refactored examples into contexts
gemnasium-parser.gemspec
@@ -12,6 +12,7 @@ Gem::Specification.new do |gem|
gem.add_development_dependency "rake", ">= 0.8.7"
gem.add_development_dependency "rspec", "~> 2.4"
+ gem.add_runtime_dependency "bundler", "~> 1.3.4"

This comment has been minimized.

Show comment Hide comment
@laserlemon

laserlemon Apr 9, 2013

Contributor

You might consider opening up the requirement for a runtime dependency so it's easier for people to integrate this gem into their codebase. Consider ~> 1.3 or even ~> 1.0 if it works!

@laserlemon

laserlemon Apr 9, 2013

Contributor

You might consider opening up the requirement for a runtime dependency so it's easier for people to integrate this gem into their codebase. Consider ~> 1.3 or even ~> 1.0 if it works!

This comment has been minimized.

Show comment Hide comment
@mootpointer

mootpointer Apr 9, 2013

The problem is that you're working with a particular version of bundler. Semantic versioning means that we can't guarantee that the interface will be the same.

@mootpointer

mootpointer Apr 9, 2013

The problem is that you're working with a particular version of bundler. Semantic versioning means that we can't guarantee that the interface will be the same.

This comment has been minimized.

Show comment Hide comment
@laserlemon

laserlemon Apr 9, 2013

Contributor

Semantic versioning tells us that Bundler 1.4 will be backwards-compatible with 1.3. The interface doesn't have to be the same; it just has to be backwards compatible and that's what minor versions are all about.

@laserlemon

laserlemon Apr 9, 2013

Contributor

Semantic versioning tells us that Bundler 1.4 will be backwards-compatible with 1.3. The interface doesn't have to be the same; it just has to be backwards compatible and that's what minor versions are all about.

spec/gemnasium/parser/gemfile_spec.rb
describe Gemnasium::Parser::Gemfile do
+
+ let(:gemfile) {Gemnasium::Parser::Gemfile.new(@content)}

This comment has been minimized.

Show comment Hide comment
@laserlemon

laserlemon Apr 9, 2013

Contributor

RSpec lets you used named subjects:

subject(:gemfile) { Gemnasium::Parser::Gemfile.new(@content) }
@laserlemon

laserlemon Apr 9, 2013

Contributor

RSpec lets you used named subjects:

subject(:gemfile) { Gemnasium::Parser::Gemfile.new(@content) }

This comment has been minimized.

Show comment Hide comment
@mootpointer

mootpointer Apr 9, 2013

Thanks. Will fix.

@mootpointer

mootpointer Apr 9, 2013

Thanks. Will fix.

@mootpointer

This comment has been minimized.

Show comment Hide comment
@mootpointer

mootpointer Apr 9, 2013

Okay. The main idea of this was to get the build green. It turned out that rubygems has been upgraded on Travis, which broke the specs. I've fixed the specs to build green, and refactored a bunch. The decision worth making now is whether you want to keep the refactor open for a while (probably another 24 hours), or merge in now and I'll take another pass from master.

Okay. The main idea of this was to get the build green. It turned out that rubygems has been upgraded on Travis, which broke the specs. I've fixed the specs to build green, and refactored a bunch. The decision worth making now is whether you want to keep the refactor open for a while (probably another 24 hours), or merge in now and I'll take another pass from master.

@laserlemon

This comment has been minimized.

Show comment Hide comment
@laserlemon

laserlemon Apr 9, 2013

Contributor

Oh, merge away! I'm just a spectator. 😃

Contributor

laserlemon commented Apr 9, 2013

Oh, merge away! I'm just a spectator. 😃

@mootpointer

This comment has been minimized.

Show comment Hide comment
@mootpointer

mootpointer Apr 10, 2013

It's your repo 😃 I'll work on the rest of the specs on the plane tonight.

It's your repo 😃 I'll work on the rest of the specs on the plane tonight.

@axilleas

This comment has been minimized.

Show comment Hide comment
@axilleas

axilleas Jan 19, 2014

Hey guys! Any news on merging this and pushing a new version to rubygems.org? We are in the process of packaging this for Fedora and it would be cool to have passing tests :)

Hey guys! Any news on merging this and pushing a new version to rubygems.org? We are in the process of packaging this for Fedora and it would be cool to have passing tests :)

@mootpointer

This comment has been minimized.

Show comment Hide comment
@mootpointer

mootpointer Jan 19, 2014

I think the change got clobbered somewhere.

I'll review and see if I need to do a new pull, or maybe just fix up this
one.
On 20 Jan 2014 08:48, "Achilleas Pipinellis" notifications@github.com
wrote:

Hey guys! Any news on merging this and pushing a new version to
rubygems.org? We are in the process of packaginghttps://bugzilla.redhat.com/show_bug.cgi?id=1046992this for Fedora and it would be cool to have passing tests :)


Reply to this email directly or view it on GitHubhttps://github.com/gemnasium/gemnasium-parser/pull/29#issuecomment-32721326
.

I think the change got clobbered somewhere.

I'll review and see if I need to do a new pull, or maybe just fix up this
one.
On 20 Jan 2014 08:48, "Achilleas Pipinellis" notifications@github.com
wrote:

Hey guys! Any news on merging this and pushing a new version to
rubygems.org? We are in the process of packaginghttps://bugzilla.redhat.com/show_bug.cgi?id=1046992this for Fedora and it would be cool to have passing tests :)


Reply to this email directly or view it on GitHubhttps://github.com/gemnasium/gemnasium-parser/pull/29#issuecomment-32721326
.

@axilleas

This comment has been minimized.

Show comment Hide comment
@axilleas

axilleas Jan 19, 2014

Cool, thanks! No rush, it's just sitting here for too long and thought to ping you :)

Cool, thanks! No rush, it's just sitting here for too long and thought to ping you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment