Fixed up the tests so they no longer use the network. They still change files on the HDD though... #11

merged 66 commits into from Oct 18, 2012


None yet

3 participants


Hey Walle,
LONG, long time no see. Sorry I haven't been more active with this but you know how time constraints go. I was talking with a rails dev and he showed me a gem called VCR which allows you to record http traffic in your unit/integration/acceptance tests, and so I implemented. It's one step closer I guess... Anyway, if you'd like to update the project, here's the pull request. I'm not sure I'll be able to fix any of the writes to the HDD, but if I do get some free time and motivation, I'll spend it doing that.


This pull request fails (merged 35fd395 into 15231b4).


This pull request fails (merged 48970a6 into 15231b4).


This pull request fails (merged 7c5aff6 into 15231b4).


This pull request fails (merged cb49cca into 15231b4).


Hey, I've made what I think is going to be my final commit for a while. I have it so it's writing and reading test files from /tmp/gas-virtual-fs/ and so that solves that problem I'm pretty sure.

I didn't touch that configuration object. I've gotta admit, I somewhat didn't follow how that worked, so I never attempted to work on it. With the way that I'm using ENV['HOME'] = fake_directory in the spec_helper.rb, maybe we don't need to implement that object so bad anymore?

TheNotary and others added some commits Sep 3, 2012
@TheNotary TheNotary starting to impliment the GithubSpeaker class c876471
@TheNotary TheNotary tests passing... d4b6066
@TheNotary TheNotary first acceptance test against githubspeaker was a success 4ae79cb
@TheNotary TheNotary refactored tests, now working gracefully with githubspeaker... Now to…
… use some of github speakers methods in the tests.
@TheNotary TheNotary got first unit test for githubSpeaker... it's an integration test... f51f278
@TheNotary TheNotary done refactoring tests for a while... I think I'd like to refactor al…
…l of the self.user_wants_* functions into a class just to clean up that huge nasty Ssh class.
@TheNotary TheNotary refreshed vcr cassettes 4c707a8
@TheNotary TheNotary finished refactoring the user prompt methods into their own module. I…
…t now violates SOLID...
test created a new prompter thing... also realized how to restore SOLID to…
… the app. I need to return true/false from... oh wait... nvm...
test Refactored Gas::Ssh.get_associated_rsa_key to return [pub, private] k…
…eys array.
test deleted irb created file... 690c2a2
test buffed up the tests a little bit more. 0c30354
test cleaning tests f47d6f7
test commented out some junk in a before filter that probably can be removed dbe649c
test commented out some junk in a before filter that probably can be removed 005bcfd
test continueing to prune the test 3f8b368
test done pruning the easy stuff from ssh_spec 5eff288
test dryed ssh_spec more bb8654c
test getting closer and closer to SOLID in the prompter.rb file d4ad9bf
@TheNotary TheNotary repaired a UI degridation where @uid wasn't accessible to the new Pro…
…mpter class
@TheNotary TheNotary massively cleaned up Ssh.setup_ssh_keys d2772ae
@TheNotary TheNotary about to embarck on an adventurous refactoring where I can refer to G…
…as::Prompter.user_wants_gas_to_handle_rsa_keys? without that prefix Gas::Prompter (which I kind of like though...)
@TheNotary TheNotary nevermind about last commit... would break too many tests. 239aa7e
@TheNotary TheNotary did a little more pruning of ssh.rb 497ecb7
@TheNotary TheNotary completed a slightly odd refactor of Ssh.delete_associated_github_key…
…s where I get_nils in production, but stub that in testing to provide a username and password to bypass being prompted to put them in... Very odd, yet very elegant.
@TheNotary TheNotary removed methods I just orphined because it's now all being handled in…
… GithubSpeaker
@TheNotary TheNotary tightened up code 3edab31
@TheNotary TheNotary more code tightening 111366f
@TheNotary TheNotary even tighter code dc13752
@TheNotary TheNotary even tighter code eea3606
@TheNotary TheNotary removed some commented out code. 2dd21e6

This pull request fails (merged d4b6066 into 15231b4).

TheNotary added some commits Sep 4, 2012
@TheNotary TheNotary stabalized tests... but there's a refactoring that makes it so much c…
…ooler... I wish I new more about VCRs underworkings.
@TheNotary TheNotary fiddling with the test 'The post_key! and remove_key! methods should …
…work'... I changed the VCR parameter to :record => :all and it fixed the failures... I don't know why at all. I should consult the VCR team.
@TheNotary TheNotary deleted some random files that cropped up throughout development 1cbef57
@TheNotary TheNotary coming up with a good way to do unit tests against my private methods…
…. I have a lot of good tests, but now I need to rewrite some of the VCR code to be more... under control.
@TheNotary TheNotary still refactoring the VCR's usage in tests... I had to bust apart som…
…e sweet lambdas, but I think this way is better.
@TheNotary TheNotary fiddle with the way I introduce local variables to accomidate VCR... 1c3fd75
@TheNotary TheNotary turned off internet for now. I think with the fixtures we have now, w…
…e no longer need to refresh the VCR tapes or connect to the internet.
@TheNotary TheNotary removed fixture I split into two 473a238
@TheNotary TheNotary these fixtures keep squirming... c70bee1
@TheNotary TheNotary getting tests working on windows... b5f77fc
@TheNotary TheNotary still working on the references to expand_path('~') which need to get…
… refactored for windows testing
@TheNotary TheNotary explicitly closed some files so windows wouldn't explode (and it's be…
…st practice.
@TheNotary TheNotary refactoring ~ into gas that was found in tests 986d3a4
@TheNotary TheNotary finished refactoring of tilda character cbb2efa
@TheNotary TheNotary isolated a test that requires scrutiny on linux machine 625a519
@TheNotary TheNotary split up some more lambdas in the test to make VCR simpler. 25c33dc
@TheNotary TheNotary all tests passing in windows... now to test linux again. 3f91c08
@TheNotary TheNotary added jruby dependencies to make the bot thing more green and pretty …
@TheNotary TheNotary getting rid of a .buildpath file that I seem to have tracked in a lon…
…g time ago. Sorry about that.
@TheNotary TheNotary getting rid of a .buildpath file that I seem to have tracked in a lon…
…g time ago. Sorry about that.
@TheNotary TheNotary commented out two test gems from the Gemfile so travis should pass th…
…e entire app.
@TheNotary TheNotary rbx 2.0 is dead since 6mo or so, using rbx1.9 mode to get full green …
…lights from travis.

Ok now I'm definitely done. Do you think you could do a release at some point in the next couple weeks? I noticed there's some nasty error output in the current release that I ran into on a mac once.


Hi, sorry this have taken such time. I'll pull your changes and make a new release now.

I have quite the rewrite planned for gas too. That will affect your code.
My plan is to make gas "plugin based" so it's easier to extend and so other people can extend the functionality of the app without waiting for me to merge ;)

I think I'll make your code to a plugin that you can maintain yourself later on. Just working out the structure of the app right now. If you are interested we could talk about the changes at some point.

Thanks for your pull request! I appreciate it a lot.

@walle walle merged commit f15aac8 into walle:development Oct 18, 2012

1 check passed

Details default The Travis build passed

It's good to hear from you Walle! No worries about the time, I know how it is trying to keep up on these cool kinds of projects when work and other stuff is competing for your time. I'm really busy right now, but I'm very much looking forward to see how the application comes along with it's new format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment