RamblingCookieMonster / RabbitMQTools

PowerShell module containing cmdlets to manage RabbitMQ.
http://ramblingcookiemonster.github.io/RabbitMQ-Intro/
MIT License
31 stars 22 forks source link

Moved func to /Public and ScriptsToProcess to Private #22

Closed gaelcolas closed 8 years ago

gaelcolas commented 8 years ago

There was an issue with the Invoke-RestMethod proxy not working over Scheduled Tasks (or test-kitchen)[https://github.com/mariuszwojcik/RabbitMQTools/issues/4], so I moved the 2 scripts previously in ScriptsToProcess to Private functions. This is where they should be as, AFAIK, they're meant to be used internally in the module, not in the caller's session (while it's the case of the TabExtension).

While at it, I moved the ps1 functions off the root directory to public and pulled some changes from @AtomicBlom.

Any feedback welcome.

AtomicBlom commented 8 years ago

Heh, I'd completely forgotten I'd done these changes.

gaelcolas commented 8 years ago

Just added a few aliases in that PR to support piping the RabbitMQ definition export to the RabbitMQTools commands like so:

 $RabbitMQConfiguration = Get-Content -Raw rabbit_WIN-0PND6Q2OUEJ_2016-8-2.json | convertFrom-Json
    switch (($RabbitMQConfiguration | Get-Member -MemberType NoteProperty | sort-object -Descending).Name) {
        "queues" { $RabbitMQConfiguration.queues | Add-RabbitMQQueue  }
        "exchanges" { $RabbitMQConfiguration.exchanges | Add-RabbitMQExchange }
        "bindings" { $RabbitMQConfiguration.bindings | Add-RabbitMQQueueBinding }
        Default {}
    }
gaelcolas commented 8 years ago

What about that PR @RamblingCookieMonster and @gpduck? :)

RamblingCookieMonster commented 8 years ago

Awesome, thanks for the PR!

I don't see any issues, we can roll back if things go sideways : ) Apologies for the delay! Need to add some scaffolding to simplify these deployments, should have this in the gallery in the next few days.

Cheers!