Skip to content

[CI] Fix the build - #45

Merged
bklang merged 22 commits into
adhearsion:support/2.xfrom
sfgeorge:fix-the-build
Aug 25, 2019
Merged

[CI] Fix the build#45
bklang merged 22 commits into
adhearsion:support/2.xfrom
sfgeorge:fix-the-build

Conversation

@sfgeorge

@sfgeorgesfgeorge commented Aug 24, 2019

Copy link
Copy Markdown
Member
  • Make the build green ✅
  • Test modern Rubies
  • Backport RSpec fixes from develop branch

Please forgive me this large commit in the midst:

  • [SPEC] Convert specs automatically using transpec [BREAKS] e4b72e5

...For what it's worth, I didn't add anything special to that commit beyond just letting transpec do its thing to automatically upgrade from RSpec 2.x to 3.x syntax, so no need to review that commit with a fine-toothed comb.

Comment thread.travis.yml Outdated
- rvm: rbx-2.1.1
env:
global:
- JRUBY_OPTS='--debug'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Are you still working on this? Or do you intend to keep this flag? (and if so, why?)

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Good q. This is not needed yet unless we have coveralls on, which we don't. Since it doesn't add value, I'll drop this.

Oh and yes, turns out I still have some commits to add.. coming soon!

@sfgeorge
sfgeorgeforce-pushed the fix-the-build branch 3 times, most recently from e27836a to e4b72e5CompareAugust 25, 2019 11:46
@sfgeorge

Copy link
Copy Markdown
MemberAuthor

@bklang@lpradovera@gfaza Finally ready for review. Can you review this for me?

@sfgeorgesfgeorge added the work-in-progress Not yet ready for review label Aug 25, 2019
@sfgeorge

sfgeorge commented Aug 25, 2019

Copy link
Copy Markdown
MemberAuthor

@bklang@lpradovera@gfaza Sorry, not ready for review yet. My future intent is, once we've reviewed & settled on changes here, to have the support/2.x branch merged into develop.

However, my changes won't cleanly merge-up to develop because I didn't realize that @benlangfeld already tackled some of these kinds of changes on develop in commits like 2df6417 and 4a8f698.

I'm going to re-work this branch to incorporate @benlangfeld's changes so that it will merge cleanlymostly cleanly to develop later on with no surprises.

Should get things passing on:
- ruby-2.5.3
- jruby-9.1.17.0
sfgeorgeand others added 6 commits August 25, 2019 11:26
Makes it easier to ensure that the build stays green from the RSpec 2.99 -> RSpec 3.x transition.
This conversion is done by Transpec 3.4.0 with the following command:
transpec -f
* 65 conversions
from: obj.should
to: expect(obj).to
* 51 conversions
from: == expected
to: eq(expected)
* 8 conversions
from: it { should ... }
to: it { is_expected.to ... }
* 6 conversions
from: obj.should_not
to: expect(obj).not_to
* 5 conversions
from: =~ /pattern/
to: match(/pattern/)
* 5 conversions
from: it { should_not ... }
to: it { is_expected.not_to ... }
* 3 conversions
from: obj.should_receive(:message)
to: expect(obj).to receive(:message)
* 2 conversions
from: be_false
to: be_falsey
* 2 conversions
from: its(:attr) { }
to: describe '#attr' do subject { super().attr }; it { } end
* 1 conversion
from: lambda { }.should
to: expect { }.to
* 1 conversion
from: mock('something')
to: double('something')
* 1 conversion
from: obj.stub(:message)
to: allow(obj).to receive(:message)
* 1 conversion
from: pending
to: skip
For more details: https://github.com/yujinakayama/transpec#supported-conversions
...with a documented, supported argument matcher block to #receive.
Unsupported in #with:
rspec/rspec-mocks#377 (comment)
Supported in #receive:
https://github.com/rspec/rspec-mocks#arbitrary-handling
Convert specs to RSpec 3.8.2 syntax with Transpec
This conversion is done by Transpec 3.4.0 with the following command:
transpec -f
* 2 conversions
from: obj.stub(:message => value)
to: allow(obj).to receive_messages(:message => value)
For more details: https://github.com/yujinakayama/transpec#supported-conversions
@sfgeorgesfgeorge removed the work-in-progress Not yet ready for review label Aug 25, 2019
@sfgeorge

Copy link
Copy Markdown
MemberAuthor

@bklang@lpradovera@gfaza After a few tweaks this is ready for review 😊 😬

@bklangbklang left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Wow, that was a lot of work! Thank you for your efforts here to modernize the test suite. Cheers! 🥂

@bklang
bklang merged commit c06419b into adhearsion:support/2.xAug 25, 2019
@bklang

Copy link
Copy Markdown
Member

@sfgeorge merging because this is clearly useful & helpful. But I also noticed that this is on the support/2.x branch. Is this useful on the main development branch as well?

@lpradovera

Copy link
Copy Markdown
Member

This is absolutely amazing!

@sfgeorge

Copy link
Copy Markdown
MemberAuthor

Wow, that was a lot of work! Thank you for your efforts here to modernize the test suite. Cheers! 🥂

This is absolutely amazing!

Thanks guys! You rock!

@sfgeorge merging because this is clearly useful & helpful. But I also noticed that this is on the support/2.x branch. Is this useful on the main development branch as well?

@bklang Absolutely. I wanted to 1st settle any potential PR changes, but you made it easy for me. I'll now open another PR to up-port the changes to the develop branch, settling some minor/inevitable git conflicts along the way.

@sfgeorge

Copy link
Copy Markdown
MemberAuthor

Also, thank you @benlangfeld for having made a bunch of these stabilization fixes. That would have been A LOT harder to do if I didn't have the benefit of plucking a bunch of the fixes you already made. 🙇

@sfgeorgesfgeorge mentioned this pull request Aug 25, 2019
2 tasks
Sign up for freeto 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.

4 participants

@sfgeorge@bklang@lpradovera@benlangfeld