Share

Kwalify

Code

Repositories

browse code, statistics, last commit on 2005-07-26 cvs -d:pserver:anonymous@kwalify.cvs.sourceforge.net:/cvsroot/kwalify login

cvs -z3 -d:pserver:anonymous@kwalify.cvs.sourceforge.net:/cvsroot/kwalify co -P modulename

Show:

What's happening?

  • Comment: Kwalify::YAML can't parse map of sequences

    I've made a fix for this problem. Not thorough testing but seems to work. --- D:/sdk/kwalify-0.7.1/lib/kwalify/parser/yaml.rb Mon Jan 28 08:57:46 2008 +++ c:/Ruby/lib/ruby/gems/1.8/gems/kwalify-0.7.1/lib/kwalify/parser/yaml.rb Mon Nov 09 14:14:50 2009 @@ -233,11 +233,11 @@ def parse_block_value(level, rule, path, uniq_table, container) skip_spaces_and_comments() ## nil -...

    2009-11-09 13:37:01 UTC by mikaelpahmp

  • Comment: Spaces in key should be allowed

    Here's a test for the Validator: public void testMappingWithStringInKey() throws Exception { _schema = "" + "type: map\n" + "mapping:\n" + " 'foo bar':\n" + " type: str\n"; _valid = "'foo bar': value"; _invalid = "foobar: value"; _error = ":key_undefined : (line 1)[/foobar]...

    2009-09-01 17:44:30 UTC by sixty4bit

  • Spaces in key should be allowed

    The parser does not allow spaces in the key foo bar: value is considered invalid. I have updated PlainYamlParser to allow spaces.

    2009-09-01 17:42:50 UTC by sixty4bit

  • restrict key names?

    for the 'map' type there doesn't seem to be a way to restrict key names; example: type: map pattern: /^[0-9]+$/ mappings: "stuff":

    2009-04-03 02:59:54 UTC by nobody

  • Kwalify::YAML can't parse map of sequences

    irb> Kwalify::Yaml.load({ 'foo' => [ 'bar', 'baz'] }.to_yaml) Kwalify::SyntaxError: 3:1 [/] document end expected (maybe invalid tab char found). It seems Kwalify doesn't recognize '- ' as valid indentation - manually entering a YAML-string where the sequence is indented with spaces before the dash makes it parse just fine.

    2009-04-02 09:19:35 UTC by kvs

  • Mapping of Mappings with undefined keys

    Currently, kwalify cannot support something like the following: users: steve: uid: 501 shell: /bin/bash james: uid: 502 shell: /bin/bash When 'steve' and 'james' are keys that are not defined in the schema. Instead, kwalify would support the following: users: - name: steve uid: 501 shell: /bin/bash - name: james uid: 502 shell:

    2008-08-21 00:48:55 UTC by nobody

  • bool type not documented

    The bool type is not documented. From experimenting it seems that the validator accepts values like yes, no, true, false etc. Regards, Slaven.

    2008-08-11 17:31:00 UTC by eserte

  • float type not documented

    The float type is not documented. The scientific notation e.g. "1e4" is not supported, though ruby itself seems to support this notation. Furthermore, integer values like the value "1" seems to be not a valid float, which I found counterintuitive (as ints are normally part of floats). Therefore I think this type is not very useful, and number should be used instead. Regards, Slaven.

    2008-08-11 17:29:56 UTC by eserte

  • str type not documented

    The "str" type is not documented. By experimenting it seems that "str" is every "text" which is not a "number" (which I find counter-intuitive, and almost never useful --- strings are normally valid to hold integers or numbers, too, in most if not all programming languages) Regards, Slaven.

    2008-08-11 17:29:08 UTC by nobody

  • int type not documented

    The "int" type is not documented. It is not clear if the scientific notation (e.g. 1e4) is valid for ints or not. By experimenting, it seems they are not in the ruby implementation. Regards, Slaven.

    2008-08-11 17:26:19 UTC by nobody

Our Numbers