yaml

Changelog file: YAML vs JSON vs CSV

Hello everybody. I am creating a simple Changelog lib in CodeIgniter that will basically log a message everytime someone adds, deletes, changes or publish a blog post. I will log messages in files by batches of 300. So every 301st message will go in a new file. At first I wanted to write the logs to simple .log files but then I got the ...

Is there an existing XStream HierarchicalStreamDriver for YAML that is current?

I know there is an old question from 2 years ago about this and I am not satisfied with that old answer. I have searched Google extensively and before I go and start writing my own implementation of an YamlHierarchicalStreamDriver I wanted to make sure I am not missing something that is already out there. So the relevant question is, is ...

Using fixtures without a corresponding model in Rails

I currently have some large strings that I would like use as test data when testing a log scraper. It would work well to have these strings in a YAML file. I would love to refer to them while testing in a short and concise manner such as: log_lines(:incorrect_string) Is there anyway to do this using fixtures, or are they exclusively...

Why is tab valid in key/value pair in YAML parser?

t: test Pay attention that it's a tab after :,and I used this YAML parser to test whether it's valid or not(IMO it's not valid): Array ( [t] => test ) ...

How do you do block comment in yaml?

Does anyone know how to comment a block of lines in yaml? ...

How to include a YAML file inside a YAML file?

Is there a custom tag in YAML for ruby to include a YAML file inside a YAML file? #E.g.: --- !include filename: another.yml A similar question was asked some time ago and there was no relevant answer. I am wondering if there is some custom tag for Ruby similar to this one for Python. ...

How to keep strings in yaml from getting converted to times

I have a yaml file which contains some times: hours: - 00:00:00 - 00:30:00 - 01:00:00 But as soon as I read them they get converted to time (in seconds), but I want them to remain as strings for a moment so i can do the conversion. Here's how I'm reading them: def daily_hours DefaultsConfig.hours.collect {|hour| ...

Filling a select with a series of times in increments, plus additional options

Using Ruby on Rails, I'm filling a 'select' with times using a given increment, such as every 30 minutes. Currently I'm writing out all the possibilities in a YAML file, but i feel like there's a slicker way. I'm thinking I want to provide a start_time, an end_time, an increment, and currently just one more option called 'Closed' (think...

Escape an & (ampersand) at the start of a YAML entry?

An ampersand at the start of a YAML entry is normally seen as a label for a set of data that can be referenced later. How do you escape a legitimate ampersand at the start of a YAML entry. For example: --- - news:     news_text: “Text!’ I am looking to not have &ldquo be a label within the yaml file, but rather when I get...

What are your crowdsource translation management system recommendations?

I'm looking for a tool to help with crowdsourcing the translations for a web site. Some generous translators have volunteered to help so I want to provide them with a tool to use that will make their job as easy as possible. Ideally the tool/app will be free or have only a small charge. Ideally I'd like a translation system that makes ...

Ruby: how can I get the name/version of the Yaml parser I'm using? Where can I get yaml4r?

I've been reading the YAML docs on http://yaml4r.sourceforge.net/doc/ There is an example: puts [[ 'Crispin', 'Glover' ]].to_yaml( :Indent => 4, :UseHeader => true, :UseVersion => true ) It's supposed to emit a string with a "%YAML:1.0" tag in it---when I run it I don't get that at all. Is there a way to tell which library I'm actua...

How to implement this with NestedSet behavior in doctrine?

Task: columns: name: string(100) parent_id: integer relations: Parent: class: Task local: parent_id foreign: id foreignAlias: Subtasks ...

Passing .Net Stream into IronRuby?

I am using IronRuby to parse Yaml files and then use the parsed document in C#. This is working fine for creating an engine (Ruby.CreateEngine()), and executing the YAML::load(File.open('myFile.yaml')). But, this works well because I can hard-code a string for the file name when I execute a few lines of ruby code. Now, I want to under...

How do you set singular/plural forms for table names like news?

It's frequently seen in YAML: User: tableName: users columns: ... foreignAlias:User And things like that. But what if the table is called news?How will you make it distinguish-able? ...

How can I load some ActiveRecord models from a YAML file and save them to the DB?

I'm trying to save some lookup table data out to a YAML file so that later when I need to set up my app on a different machine I can load the data in as seed data. The data is stuff like select options, and it's pretty much set, so no worries about the live data changing between serializing and deserializing. I have output the data lik...

Database migration from new YAML in Doctrine

I have to add a new column and a new table to my database but i dont have access to shell of my server. I changed my YAML file. How can i tell doctrine to "migrate models and database to changed yaml"? ...

Symfony + doctrine + one-to-many relationships

Hi everybody. I need a one-to-many relationships for my sf 1.4 + doctrine 1.2 project. I copied the relation just like this: User: columns: id: type: integer(4) primary: true autoincrement: true contact_id: type: integer(4) username: type: string(255) password: type: string(255) Ph...

Error yaml-cpp compile in RAD Studio 2010

I can't compile yaml-cpp in RAD Studio 2010. I have error in nodeutil.h template <typename T, typename U> struct is_same_type { enum { value = false }; }; template <typename T> struct is_same_type<T, T> { enum { value = true }; }; template <typename T, bool check> struct is_index_type_with_check { enum { value = false }; }; template ...

Which has the most mature stable libraries for multiple languages available for it, YAML or JSON?

I'm not looking for a comparison of the relative merits of YAML or JSON over each other, I'm purely looking for something that is supported by many languages and has stable implementations. Also another plus would be to know which has the libraries that do not have huge dependency trees requiring other libraries. ...

There is no mature yaml library for erlang

Is there a mature and stable YAML library for Erlang that someone has actually used? I can't seem to find one anywhere Update: I have searched and searched and still not found one ...