-
Notifications
You must be signed in to change notification settings - Fork 286
Conversation
Codecov Report
@@ Coverage Diff @@
## master #628 +/- ##
=========================================
+ Coverage 5.04% 5.08% +0.04%
=========================================
Files 10 10
Lines 119 118 -1
Branches 20 20
=========================================
Hits 6 6
+ Misses 113 112 -1
Continue to review full report at Codecov.
|
Per rubyide#627, the previous behavior of the rubyfmt formatter class included an embedded version of the rubyfmt script. This isn't really a workable solution anymore as the program has evolved beyond a simple ruby script to include native modules. This instead changes the formatter class to rely on a `rubyfmt` executable on the user's `$PATH`. Because rubyfmt is not currently installable via bundler and is in a pre-release state, users are expected to have followed the necessary installation instructions from the [project README](https://github.com/penelopezone/rubyfmt/blob/master/README.md#how-do-i-use-it). The current instructions recommend adding an alias, but vscode will not respect that (or at least vscode-ruby doesn't). Instead I have a [commit](fables-tales/rubyfmt@19d5946) submitted in [a PR](fables-tales/rubyfmt#201) which will make it easier to install an actual executable shim script.
Hey, thanks for this. Looks good overall. I do prefer using a shim on the Rubyfmt side but if Penelope prefers to direct people to use an alias we could keep the direct The inability to use an alias is linked to node's |
Previously this was passing in the file path. This caused rubyfmt to ignore the current contents of the file on stdin, and instead just formated the currently saved version of the file. A recent update to rubyfmt will properly handle the input from stdin instead
@wadetandy if this is ready I'm happy to merge it |
I think this is ready to go with the caveat that it won't really work until the corresponding shim script PR in rubyfmt gets merged, which should hopefully be this week sometime. |
Rubyfmt changes & vscode-ruby usage instructions were merged, so this should be GTG! |
Per #627, the previous behavior of the rubyfmt formatter class included
an embedded version of the rubyfmt script. This isn't really a workable
solution anymore as the program has evolved beyond a simple ruby script
to include native modules. This instead changes the formatter class to
rely on a
rubyfmt
executable on the user's$PATH
. Because rubyfmtis not currently installable via bundler and is in a pre-release state,
users are expected to have followed the necessary installation
instructions from the project
README.
The current instructions recommend adding an alias, but vscode will not
respect that (or at least vscode-ruby doesn't). Instead I have a
commit
submitted in a PR
which will make it easier to install an actual executable shim script.
yarn lint
is failing on a few things, but nothing in the changed files from this PR.