Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have Zork use plugin installer to pull down zorkjs package #27

Merged
merged 3 commits into from
Jun 4, 2019

Conversation

dprothero
Copy link
Contributor

@dprothero dprothero commented Jun 4, 2019

Fixes

N/A

Checklist

  • I have made a material change to the repo (functionality, testing, spelling, grammar)
  • I updated my branch with the master branch.
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation about the functionality in the appropriate .md file
  • I have added in line documentation to the code I modified

Contributing to Twilio

All third party contributors acknowledge that any contributions they provide will be made under the same open source license that the open source project is provided under.

Short description of what this PR does:

  • Instead of shelling out to npm, uses the @oclif/plugin-plugins module to install the zorkjs module

If you have questions, please file a support ticket, or create a Github Issue in this repository.

@codecov
Copy link

codecov bot commented Jun 4, 2019

Codecov Report

Merging #27 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #27      +/-   ##
==========================================
+ Coverage   98.36%   98.36%   +<.01%     
==========================================
  Files          22       21       -1     
  Lines         549      551       +2     
==========================================
+ Hits          540      542       +2     
  Misses          9        9
Impacted Files Coverage Δ
src/commands/zork.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0454848...9474585. Read the comment docs.

@@ -23,9 +25,11 @@ class Zork extends BaseCommand {
this.logger.warn('Standby, loading the dungeon...');

try {
await this.exec('npm install --no-save zorkjs');
this.plugins = this.plugins || new Plugins(this.config);
await this.plugins.install('zorkjs', { tag: 'latest', force: false });
Copy link
Contributor

Choose a reason for hiding this comment

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

Got this the first time:

➜  rm -rf ~/.twilio/node_modules/zorkjs 
➜  bin/run zork -l debug               
[DEBUG] Config File: /Users/sharrison/.twilio/config.json
 » Standby, loading the dungeon...
[DEBUG] {}
 » I don't know the word "zork".

Works the second time, which is why I had to manually delete zorkjs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ahh, same for me. Weird.

@dprothero
Copy link
Contributor Author

OK, try again @childish-sambino ... not sure why the plugin installer throws a {} empty object even when it was successful.

@dprothero dprothero merged commit d7db476 into master Jun 4, 2019
@dprothero dprothero deleted the fixzork branch June 4, 2019 19:24
Sign up for free to 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.

2 participants