yaml

Compile error while compiling libyaml under windows 7

I am trying to compile libyaml under Windows 7 with MingW. I have tried to compile 0.1.2 and 0.1.3 but i just get this error: api.c:579: error: failure in redeclaration of 'yaml_token_delete': dllimport'd symbol lacks external linkage. api.c:579: confused by earlier errors, bailing out Have anyone else seen this error? Do you guys an...

Ruby on Rails: Can you put Ruby code in a YAML config file?

Sorry if this is a dumb question, but I am new to Ruby on Rails. I would like to do something like this in my amazon_s3.yml config file: access_key_id: ENV['S3_KEY'] secret_access_key: ENV['S3_SECRET'] ...but I know this isn't working. Not sure if it is even possible, but can you put Ruby code in a YAML file? ...

YAML - one to many object graph

Hello, I use a snakeyaml (java) based parser to write a test case, and couldn't figure out how to properly build the graph. Any help, highly appreciated. thanks. RuntimeException occured : Cannot load fixture test-data.yml: org.hibernate.PropertyAccessException: could not get a field value by reflection getter of models.Priority.des...

How to default to CLoader in PyYaml.load

Is there any way to have the default loader for PyYaml be CLoader. So instead of having to do yaml.load(f, Loader=yaml.CLoader) It would just default to CLoader, so I could do: yaml.load(f) ...

Cron file - disable access (Google App Engine)

I'm running a cron file in Google App Engine. It seems to be working fine, except I don't want anyone to be able to access the URL. Here is my .cron file: cron: - description: testing cron url: /tester schedule: every 1 minutes I tried adding: "login: admin" underneath "schedule", but I get: enter code here Error parsing yaml file: ...

How to specify ranges in YAML?

I can express 3rd page is the title page in YAML title: 3 What about the following? Pages 10 to 15 contains chapter 1 One way is chapter 1: [10, 11, 12, 13, 14, 15] I would prefer a range here. Is there anything like that in YAML? chapter 1: (10..15) ** Update ** The following would be my alternative if there is no ...

Problems with retrieving application constants in ror using the active_hash gem and a yaml file

I am trying to create a consolidated Application Constants file which populates various dropdowns in different parts of the application. I am using the very effective active_hash gem for this (http://github.com/zilkey/active_hash) The application constants (named def_constants)file typically has the following yaml structure ####### com...

Rails - YAML load returns false

Hey, I am storing an object in a table with YAML dump but when I go to get it back with load it returns false when I use .to_s require "yaml" @candidates = YAML::load(serialized_object.to_s) if I do it without .to_s I get an "instance of IO needed" error serialized_object.inspect shows this --- "[#<SearchIndex data: \"--- \\n- 1\\...

Bidirectional relationship in yaml

Hello, I am using Snakeyaml for building my domain graph. I couldn't find the right syntax for it. Please see the domain model, and the yaml. public class Person { String fullname; @OneToMany(mappedBy="person",cascade=CascadeType.ALL) public List<Role> roles; } public class Role { public RoleType roleType...

Convert from Database / Excel / CSV to YAML data fixtures?

Was wondering if there is an easy to convert structured files into YAML data fixtures for Doctrine / Symfony. I don't see any utility with Doctrine to accept CSV. I might just start writing something simple to do this. Is it worthwhile? ...

How do you actually parse values in YAML in Java?

I have a YAML file that I'm using as sort of a config file. It ooks like this, tests: - category: some_category test: - name: hello key1: value1 key2: value2 - name: hithere key1: value1 key2: value2 I want to do something like this: for all tests as test:...

yaml property value

I am using yaml file to store attribute and value. But some of the values need the current date to be appended. So how do I enter the value in yaml file, so that yaml parser can automatically recognise and substitute with current date I am using pyyaml and python ...

YAML adapter for Zend_Translate?

Does anybody know a high-quality yaml adapter for Zend Framework's Zend_Translate? There seems to be a proposal in the Zend project itself, but it's been inactive for years. ...

Browser-based yaml editor, preferably in PHP?

Does somebody know an installable on-line editor tool for YAML data structures, one that an end-user could use, preferably written in PHP? No luck on the official yaml site. Open Source would be nice; commercial is an option. Clarification: What I need is a tool that shows each key/value pair of a YAML tree in a separate control to...

ConfigObj/ConfigParser vs. using YAML for Python settings file

Which is better for creating a settings file for Python programs, the built-in module (ConfigParser) or the independent project (ConfigObj), or using the YAML data serialization format? I have heard that ConfigObj is easier to use than ConfigParser, even though it is not a built-in library. I have also read that PyYAML is easy to use, ...

Ruby: Removing all empty elements from a hash / YAML?

How would I go about removing all empty elements (empty list items) from a nested Hash or YAML file? Thanks for any advice. ...

Simple example of using data from a YAML configuration file in a Perl script

I need to create a YAML file to store some configuration data for a Perl script. This seems like it should be really easy but I haven't been able to work it out, I think if I had just one simple example to copy I'd be fine. I want to do something like this: -----test.yaml----- image_width: 500 show_values: 0 ------------------- ------t...

2 identical YAML files but one doesn't display all the informacion?

I'm really puzzled. When I open the terminal and do: php symfony doctrine:data-load having this file in my fixtures directory: JobeetJob: job_sensio_labs: JobeetCategory: programming type: full-time company: Sensio Labs logo: sensio-labs.gif url: http://www.sensiolabs.com/ positio...

How to parse a yaml file into ruby hashs and/or arrays?

I need to load a yaml file into Hash, What should I do? ...

Decode a YAML serialized object

I have serialized an object in YAML and send it to a remote worker. The worker doesent have the object definition so i get a YAML::Object. How can i access the field inside it? A text field seems like that base64 encoded, how can i decode that? (no, decode64 not works). ...