Comments (5)
More generally, I think we should offer a bit better workflow in the readme than 'you move the file when you like it'.
OMG Yes!
I use the command line tool with vimdiff. It works seamlessly for me.
I have a key mapped to this in my vimrc:
map <leader>v :!approvals verify -d vimdiff -a<cr>
I run my tests from within vim, so I'm already in vim when I get the failure. When I see that I have approvals failures, I hit <leader>v
, which opens the vimdiff screen, and I can view the changes.
To quit out of vimdiff I say :qa
, at which point the script kicks back in and says do you want to approve this? The default is no, so if I just hit enter, it goes to the next failure. If I say y
then it moves the file, and then moves to the next failure.
I wrote a custom vimdiff colorscheme because the default one made me anxious.
$ cat ~/.vim/colors/simplediff.vim
" http://guns.github.com/xterm-color-table.vim/images/xterm-color-table.png
hi clear
" Normal black, white
hi Normal ctermfg=0 ctermbg=15
" Line number dark gray
hi LineNr ctermfg=8
" NonText dark blue
hi NonText ctermfg=12
" DiffText red, white
hi DiffText cterm=none ctermfg=15 ctermbg=1
" DiffChange black, light gray
hi DiffChange ctermfg=0 ctermbg=7
" DiffAdd white, dark gray
hi DiffAdd ctermfg=15 ctermbg=8
" DiffDelete blue, white
hi DiffDelete ctermfg=12 ctermbg=15
from approvaltests.ruby.
I've added a bit of documentation about the CLI in the README. Do you think this is sufficient?
from approvaltests.ruby.
I think it is. From reading it it's only unclear to me what setting ask to false would do. Does it accept everything or refuse everything?
from approvaltests.ruby.
Ah, I'll clarify.
from approvaltests.ruby.
Ok, cool. I've updated it for now. I'm closing this, but I'm planning on doing a proper overhaul in April so that I can get this thing to 1.0.
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.