Repository navigation
Fix Travis failure on nil ENV['BITPAYPEM'] - #52
javierjulio wants to merge 2 commits into
Conversation
The commit 671fe56 introduced (a new ENV['BITPAYPEM'])[bitpay@671fe56#diff-2fbdf6e6f53a9bb9a2c06059507373a8R18] but it wasn't defined anywhere. There is already (a constant called `PEM` in the `spec_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.
|
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 |
The tests failing are for cucumber so using the constant in step_helpers.rb didn't fix anything since we need it defined here. I saw it defined in spec_helper.rb but that's only for rspec tests.
|
Now getting |
|
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 671fe56 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
PEMin thespec_helper.rbfile)[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.