GithubHelp home page GithubHelp logo

rspec-its breaking InSpec about rspec-its HOT 4 OPEN

rspec avatar rspec commented on July 17, 2024 1
rspec-its breaking InSpec

from rspec-its.

Comments (4)

walterdolce avatar walterdolce commented on July 17, 2024 1

@lavahot done :)

from rspec-its.

JonRowe avatar JonRowe commented on July 17, 2024

Apologies for the long time taken to come back to you on this, to fix this you'd have to add a way to escape the dot for people using long string keys like this.

from rspec-its.

lavahot avatar lavahot commented on July 17, 2024

This is actually a breaking bug for some of my tests. Any chance you can submit a pull request, @walterdolce ?

from rspec-its.

walterdolce avatar walterdolce commented on July 17, 2024

It's not really a fix. It's actually a new "feature" as my PR above adds the ability to define a split_attribute_by option to define how to split attribute names.

Then, within InSpec I do something like this:

describe parse_config_file('/etc/beaver/beaver.conf', {
        assignment_regex: /^\s*([^:]*?)\s*:\s*(.*?)\s*$/,
        comment_character: '#',
        split_attribute_by: '#' // skips splitting by dot
    }) do
        its('beaver') {
            should include('foo' => 'baz')
        }

        its('/var/log/apache2/access.log') {
            should include('bar' => 'baz')
        }
    end

from rspec-its.

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.