Giter VIP home page Giter VIP logo

Comments (9)

zmoazeni avatar zmoazeni commented on May 31, 2024

I haven't run the suite in a while. Going to mess with it tonight and report back. Perhaps I can do something clever with the VCR cassettes so we can commit them without sensitive data.

from harvested.

GregBaugues avatar GregBaugues commented on May 31, 2024

You're looking for filter_sensitive_data. In your VCR configuration block, starting on line 7 of spec_helper.rb, you can do something like:

VCR.configure do |c|
  c.cassette_library_dir = '.cassettes'
  c.hook_into :webmock
  c.filter_sensitive_data('RANDOMGIBBERISH') { 'my-secret-harvest-password' }
end

VCR.config and c.stub_with :webmock are deprecated. I've changed to VCR.configure and c.hook_into :webmock

from harvested.

zmoazeni avatar zmoazeni commented on May 31, 2024

Nice. Thanks for the tip!

from harvested.

zmoazeni avatar zmoazeni commented on May 31, 2024

I also got the same failing tests.

from harvested.

zmoazeni avatar zmoazeni commented on May 31, 2024

I'm not sure yet if these failures are due to API bugs or the library. I'll investigate when I have some time.

Also on filter_sensitive_data: that's not quite what I want. I want VCR to record the requests and responses but not put in the harvest username, password or subdomain. And I don't want to have to manually mess with the cassettes. That doesn't seem easily doable. Open to suggestions though.

from harvested.

GregBaugues avatar GregBaugues commented on May 31, 2024

This is what filter_sensitive data does. I'll mock up an example and submit a pull request.

from harvested.

zmoazeni avatar zmoazeni commented on May 31, 2024

Cool, please do. I'm under the impression it's looking for tokens in an existing cassette and replaces it with what you specify in the configuration. If I can have the server calls to create the cassettes and use filter_sensitive_data ... uber win.

from harvested.

zmoazeni avatar zmoazeni commented on May 31, 2024

I believe @prsimp has a fully green suite locally.

from harvested.

zmoazeni avatar zmoazeni commented on May 31, 2024

Closing this bad boy now that @prsimp green'd up our suite.

from harvested.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.