Sha256: d6d49797f9021d768f182569668d0eaf4c3f1e71b1965f79ac9159f4390fe894
Contents?: true
Size: 608 Bytes
Versions: 6
Compression:
Stored size: 608 Bytes
Contents
namespace :ourkudos do namespace :config do namespace :generate => :environment do config = {:base_uri => "http://ourkudos.com", :api_key => "your api key" } File.open(File.join(Rails.root,'config', 'ourkudos.yml'), 'w') do |f| method = config.respond_to?(:ya2yaml) ? :ya2yaml : :to_yaml string = config.deep_stringify_keys.send(method) f.write string.gsub("!ruby/symbol ", ":").gsub("---","").split("\n").map(&:rstrip).join("\n").strip end end end end
Version data entries
6 entries across 6 versions & 1 rubygems