This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function(doc) { | |
| if (doc.content) { | |
| var html = new XML(doc.content); | |
| emit(doc._id, {title: doc.content}); | |
| } | |
| emit("nic", "nikde") | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function(doc) { | |
| if (doc.content) { | |
| var content = doc.content.replace(/^<\?xml\s+version\s*=\s*(["'])[^\1]+\1[^?]*\?>/, ""); // bug 336551 | |
| var data = new XML(content); | |
| var dtt = new Namespace("http://wwwinfo.mfcr.cz/ares/xml_doc/schemas/ares/ares_datatypes/v_1.0.2"); | |
| emit(doc._id, { | |
| name: data..dtt::Obchodni_firma.text(), | |
| ic: data..dtt::ICO.text(), | |
| konkurz: data..dtt::Konkurz.dtt::Kod.text() | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| get '/companies/:ic' do | |
| @db = CouchRest.database!("http://127.0.0.1:5984/obchodni_rejstrik") | |
| doc = @db.get(params[:ic]) | |
| xml = Nokogiri::XML(doc['content']) | |
| xslt = Nokogiri::XSLT(File.read('obchodni_rejstrik.xslt')) | |
| xslt.transform(xml).to_s | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function(doc, req) { | |
| if(doc) { | |
| return { \"headers\" : {\"Content-Type\" : \"application/xml\"}, \"body\" : doc.content } | |
| } else { | |
| return {\"code\": 404, \"body\": \"Not-found\"} | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pkg_add -r gmake erlang-lite libtool icu spidermonkey curl | |
| cd /usr/ports/databases | |
| fetch "http://www.freebsd.org/cgi/query-pr.cgi?prp=148803-1-txt&n=/patch.txt" | |
| patch -p0 < patch.txt | |
| rm patch.txt | |
| cd /usr/ports/databases/couchdb | |
| make install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class CreateAccounts < ActiveRecord::Migration | |
| def self.up | |
| create_table(:accounts) do |t| | |
| t.string :name | |
| t.string :surname | |
| t.string :email | |
| t.string :crypted_password | |
| t.string :salt | |
| t.string :role | |
| t.timestamps |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .DS_Store | |
| *.log | |
| tmp/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| after "deploy:update_code", "bundler:bundle_new_release" | |
| namespace :bundler do | |
| task :create_symlink, :roles => :app do | |
| set :bundle_dir, File.join(release_path, 'vendor/bundle') | |
| shared_dir = File.join(shared_path, 'bundle') | |
| run "if [ -d #{bundle_dir} ]; then rm -rf #{bundle_dir}; fi" # in the event it already exists..? | |
| run("mkdir -p #{shared_dir} && ln -s #{shared_dir} #{bundle_dir}") | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module ApplicationHelper | |
| def number_to_currency(number, options = {}) | |
| options[:unit]=t(:czk) | |
| options[:format]="%n %u" | |
| super(number, options) | |
| end | |
| end |