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

optimize command simulator auto-generation #1078

Merged
merged 1 commit into from
Sep 16, 2016

Conversation

chris-rock
Copy link
Contributor

@chris-rock chris-rock commented Sep 14, 2016

  • run bundle exec rake update_demo from the root, and everything is magic then
  • all commands are simulated in a docker container now
  • builds the simulator container with InSpec and the mock backend
  • moves all generated content to app/responses
  • merges commands.json and extra_commands.json
  • move rake scripts to www/turorial/scripts
  • simulate README.md via simulator now
  • updates examples
  • updates README.md

@vjeffrey
Copy link

got this error running the rake task:
screen shot 2016-09-15 at 9 06 39 pm
changing line 50 of build_simulator_runtime.rb to FileUtils.cp_r(Dir.glob(pwd+'/examples/profile/*'), pwd + '/simulator/filesystem/examples/profile') fixed it

@vjeffrey
Copy link

holy awesome awesomeness :) this is so cool chris. i would love it if you could walk me through how you did all the updates sometime whenever you have time :)

reading the user's input, and displaying it. App then explained she could take that final user input sent over by xterm and
and transform it into a regular expression, which she could then use to match against the information in the commandsjson file,
and transform it into a regular expression, which she could then use to match against the information in the `commands.json` file,
matching the user's input against the key and then retrieving the associated value's txt file.
And it was so. :)

Choose a reason for hiding this comment

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

We should probably remove my silly paragraph above here and just explain how it works normally, now that's it's so awesome :) no one wants to read a whole paragraph thing; that was just the result of wine + code

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was not sure, I liked the idea somehow, but we could shorten that up a bit :-)

@chris-rock
Copy link
Contributor Author

@vjeffrey Thanks for the feedback, I added an empty profile directory to this PR. Therefore the script should now work trough.

@vjeffrey
Copy link

👍 works wonderfully :)

@chris-rock chris-rock merged commit 83488cf into master Sep 16, 2016
@chris-rock chris-rock deleted the chris-rock/inspec-simulator branch September 16, 2016 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Improves an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants