Comments (8)
@jeremyruppel @jjoos @bmarini @badquanta @LukeWinikates opinions?
(I'd like to change this, but only if this would be a universal good idea)
from approvaltests.ruby.
I'm open to putting a newline on the end of the file, but it would break all existing tests, so there should be some sort of heads-up when upgrading. We're not at 1.0 yet, which means that all changes are acceptable, per http://semver.org
from approvaltests.ruby.
Yups, that's why i mentioned it now ;)
from approvaltests.ruby.
Adding a configuration option to trigger the old behavior would be nice for backwards compatibility.
RSpec.configure do |c|
c.approvals_without_new_line_on_eof = true
end
from approvaltests.ruby.
@jjos - that's a great idea. We can definitely do that.
from approvaltests.ruby.
I made a pull-request. I did not implement such a backwards compatibility feature (yet), since I think it has little inherent value, and the value for backwards compatibility is limited. Approvals already ignores whether there is a newline at the end of the approval, so as long as the approvals don't change, you don't have to change anything. As soon as the approval changes, the line at the end of file also appears. I think that given that this doesn't break in any way, this is backwards compatible enough, given that we're still pre-1.0.
from approvaltests.ruby.
I've merged the pull request, and released a new version of the gem. Thanks for the contribution!
from approvaltests.ruby.
Cool, thanks!
from approvaltests.ruby.
Related Issues (20)
- Release a new version? HOT 1
- raise on unrecognized format
- Html approver mangles html with boolean attributes HOT 9
- Initialization issue w/ Approvals::CLI in v0.0.13 HOT 4
- Add JRuby to travis build
- Exclude dynamically changing data from text HOT 5
- Approval with --ask flag deletes the file instead of overwriting it HOT 3
- rspec extension specs don't clean up after themselves
- consolidate configuration behavior
- Differences in jruby and mri json output HOT 8
- Differences in JRuby and MRI HTML output
- Using approvals to verify_sql HOT 3
- Mutual incompatibility with Rails 6.1.x over versions of `thor` HOT 2
- Make 'json' an explicit dependency HOT 1
- Support Ruby 3 HOT 2
- Drop support for Ruby < 2.7
- Consider dropping support for Rubinius
- Display diffs on failure
- Add named environments
- Add scrubbers
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from approvaltests.ruby.