-
Notifications
You must be signed in to change notification settings - Fork 78
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
Full test coverage and API documentation #34
Conversation
Going to trim the scope of this to just test coverage and API docs. I want to get that merged ASAP. |
What's the rationale behind this? I think of it as compiling because of the way we have to generate the PCAP to match the XML. But it's really just a language issue. I don't feel strongly about it, but I'm biased against changing it arbitrarily.
I think this refers to making it so you can do |
Compiling some PCAP audio and dumping the audio/scenario to disk are two separate concerns. As for compile-and-run, executing a scenario would use a temporary location on disk, vs exporting to a permanent location specified by a path. You would never need to do both in one command because the two are separate and independent. |
But "compiling" for the Scenario also refers to taking the steps and outputting generated XML. To me, compiling is the more appropriate verb for both of those things than exporting. |
One of the use-cases I had envisioned was using sippy_cup to compile a scenario, then hand-edit the scenario, then use sippy_cup to run the now-edited scenario. In an ideal world you would never need to do this, but I think that we are not perfect yet in our capabilities. This would also allow you to run a compiled (and possibly edited) scenario repeatedly without needing to recompile the scenario each time. 👍 as far as using temporary files for running the scenarios if the compiled form is not explicitly requested. |
…heir scemantic meaning
Any chance of a quick review please, @bklang? |
# Scenario.from_manifest(manifest, source: '192.168.12.1') | ||
# | ||
def self.from_manifest(manifest, options = {}) | ||
args = ActiveSupport::HashWithIndifferentAccess.new(Psych.safe_load(manifest)).symbolize_keys.merge options |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't #symbolize_keys
redundant with HashWithIndifferentAccess?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Turns out no, but I havn't had time to dig into it.
👍 Looks good, thanks for the cleanup |
Full test coverage and API documentation
WIP