yaml

How to declare the welcome file (e.g. index.html) in app.yaml

Hey all, In Java, the web.xml might contain some <welcome-file> elements. I am trying to do something equivalent in python with no luck. application: wk version: 1 runtime: python api_version: 1 handlers: - url: / static_dir: docs welcome_files: - index.html Any thoughts? I get an error that "welcome_files" is not understood. ...

My .yaml is not redirecting properly.

app.yaml application: classscheduler9000 version: 1 runtime: python api_version: 1 handlers: - url: /static static_dir: static - url: /images static_dir: static/images - url: /stylesheets static_dir: static/stylesheets - url: /users\.html script: main.py - url: /.* script: login.py main.py import hashlib from googl...

Retrieving YAML parameters during runtime in App Engine (Python)

Is it possible to programmatically retrieve any of the YAML parameters during run-time? Are they stored in the environment somewhere? Good example would be to automatically find the application version and to add it as a comment in the landing HTML page. ...

How to declare Doctrines Inheritance in a fixtures.yml file?

Hello folks, I have a problem with the inheritance of Doctrine within my fixtures.yml file of Symfony. Imagine the following: NewsAuthor: inheritance: extends: sfGuardUser type: simple Now I want to declare the default guard user User_admin of the fixtures file of the sfDoctrineGuardPlugin to be the author of the first d...

What are good examples of mapping YAML data to Ruby objects?

I am looking for basic examples of YAML syntax and how to work with it in Ruby. Basically, by looking at the examples, I hope to better understand how to map YAML scalars to object attributes, and whether to use different YAML files or having one YAML file containing multiple objects. ...

Parse YAML and assume a certain path is always a string

I am using the YAML parser from http://pyyaml.org and I want it to always interpret certain fields as string, but I can't figure out how add_path_resolver() works. For example: The parser assumes that "version" is a float: network: - name: apple - name: orange version: 2.3 site: banana Some files have "version: 2" (which is interpret...

How to parse a YAML file in Ruby

I would like to know how to parse a YAML file with the following contents: --- javascripts: - fo_global: - lazyload-min - holla-min Currently I am trying to parse it this way: @custom_asset_packages_yml = (File.exists?("#{RAILS_ROOT}/config/asset_packages.yml") ? YAML.load_file("#{RAILS_ROOT}/config/asset_packages.yml") : nil) ...

Reset globally set routing suffix in symfony routing.yml file

Hi, I am using Symfony 1.3 and I have the following problem: I need a url in this format www.domain.com/folder (no suffix) however the application sets the default suffix to be .html Is there a way to override the global suffix in the routing.yml file? I could use mod_rewrite but I would like this link to be able to work without relying ...

Google App Engine App.yaml config for skip-files to ignore Mercurial files

I have added a line at the top of skip_files to make app engine deployment skip all files starting with .hg such as the .hgignore file and the .hg directory. Will this ignore the whole .hg directory and all its files and subdirectories? skip_files: - ^(./)?.hg$ ^(.*/)?app.yaml ^(.*/)?app.yml ^(.*/)?index.yaml ^(.*/)?index.yml ^(./)?#....

YAML / SnakeYAML: how refer to the same object multiple times

Hi all, I am using YAML to import data into a db4o database and am wondering how I can structure my documents such that when I create an object, I can re-use that same object later on in another object. For instance, I declare a content type, and then a file after it that uses that content type. How do I refer to that content type? W...

Doctrine many-to-many relations with extra field

Hi! I want to join 3 table, Szamla, Termek and Vasarlo. This is my schema: options: collate: utf8_unicode_ci charset: utf8 Szamla: actAs: [Timestampable] columns: datum: type: timestamp notnull: true total: type: float notnull: true fizetesi_datum: type: date fizetesi_ora: ...

Human- and computer-readable hierarchical data format with inheritance across files

I'm looking for a data format for text files with hierarchical information. These files will be created primarily by human input (rather than generated by programs), but will be read primarily by programs. The main requirements are: Very simple and uncluttered syntax. (Example: levels of hierarchy defined by tabs would work fine.) So s...

yaml2xml/xml2yaml implementation available?

What yaml2xml and xml2yaml is available? I googled this, but it's not working correctly. ...

Builder Pattern in Ruby with YAML

I have an instance of the Builder pattern in my project right now. Currently, the supported output format is CSV, however I would now like to include YAML. Easy, I thought. I have all of the supporting code in to make the type change. I'm finding myself to be in a bit of a complex. The intent of using the Builder pattern was to construc...

Appengine create and export yaml file

Hi, I´m having trouble in creating a file and export to .yaml. I´m using Google App Engine with Python 2.5. Don´t understand the Yaml doc´s, it makes me confused. What i want is to create a file and save it. It´s necessary to get entities from Models. class SaveYAML(webapp.RequestHandler): def post(self): user = db.Query(m...

how to get and use associative array from YAML to action in symfony framework 1.4.8

Ive got in app.yml some configration data, and I want to foreach them in action. I try do this by get them by sfConfig::get('app_datas') but it fails. Lets show them in details: YAML: all: datas: foo: bar foo2: bar2 and in the actions.class.php I try use this code: foreach (sfConfig::get('app_datas') as $key => $value) { ...

Is there a Perl module for converting YAML files into Moose objects dynamically at runtime?

I've been trying to find a Perl module that converts a YAML file into moose objects without having to pre-declare the structure as you seem to need to do when using MooseX::YAML. Does anyone know of such a module (or script)? ...

XML vs YAML vs JSON

Assuming I'm starting a project from scratch, which is not dependent on any other project. I would like to use a format to store feeds, something like XML, since XML is not the only available format of its kind, I would like to know: why should I choose one over the rest? I will be using perl. 'Feed' is a description of a product (name...

Rails 3 - How do I define ActiveModel translations for several attributes?

Hi, I'm trying to an activemodel instance with translations. I find that the only way validations work (with another locale) is by duplicating the error message for every field I defined int he model. So for this model: require 'active_model' class User include ActiveModel::Validations attr_accessor :first_name, :last_name, :email...

YAML syntax validator?

I am having issues pulling from a YAML config file : `Fatal error: while parsing a block mapping; expected , but found BlockEntry . I recall being able to copy/paste my YAML contents into a website, and it giving me line-by-line syntax errors. Does anyone know of a linux package that will fix errors like this, or the website I am think...