Closed javierjulio closed 8 years ago
For the record I verified that an earlier commit was receiving the same Travis errors I was on my PR #51. The Travis failures from both https://travis-ci.org/bitpay/ruby-client/builds/80143710 and from my new PR https://travis-ci.org/bitpay/ruby-client/builds/148928762
Now getting 500: Unauthorized sin (BitPay::BitPayError)
after implementing this update. Getting in a little over my head here but was trying to help out resolve these failures to get my PR #51 accepted. Happy to help further if I can get a little more advice/direction on this since it seems its been occurring for a year now (last Sept).
Pull requests will always fail, because they cannot use the encrypted environment variables (such as BITPAYPEM). However, these variables are defined in Travis.
But they are failing in Travis because the ENV variable is nil. Unless I misread/misunderstood.
Because the pull request can't read encrypted environment variables. Hence nil.
Ok thanks. Sorry, I thought I could help address this to get tests passing. If there is something I can do please let me know. I started on this as I was to fix so PR #51 could be accepted. Figured that would prevent it.
Private keys/account information does not belong in the code base though I understand the problem that you are attempting to solve. Encrypted environment variables in BitPay's Travis config for this repo is the place to store this information, yet those values aren't available to forks, unfortunately. For each merge request, I will pull the changes and run locally.
Yes this was more involved and I didn't really understand what was going on. Thanks @kleetus.
The commit 671fe5657b3558c242fa2367e979c3d9ca571b2b introduced (a new ENV['BITPAYPEM'])[https://github.com/bitpay/ruby-client/commit/671fe5657b3558c242fa2367e979c3d9ca571b2b#diff-2fbdf6e6f53a9bb9a2c06059507373a8R18] but it wasn't defined anywhere. There is already (a constant called
PEM
in thespec_helper.rb
file)[https://github.com/bitpay/ruby-client/blob/master/spec/spec_helper.rb#L12] so figured it should just use that. This could be moved to the constants config file instead if preferred and use the ENV variable and default to a value if ENV variable is nil.