Sha256: de093e6be7a5f668ec455f2c44d604a219d3a8d61cf81924e9be7b48dd820090
Contents?: true
Size: 563 Bytes
Versions: 6
Compression:
Stored size: 563 Bytes
Contents
require "bundler/gem_tasks" task :default => :spec desc 'Update Cache' task :update_cache do require 'yaml' codes = YAML.load_file(File.join(File.dirname(__FILE__), 'lib', 'country_list', 'country_data', 'country_codes.yaml')) || {} data = {} codes.each do |code| data[code] ||= YAML.load_file(File.join(File.dirname(__FILE__), 'lib', 'country_list', 'country_data', 'countries', "#{code}.yaml"))[code] end File.open(File.join(File.dirname(__FILE__), 'lib', 'country_list', 'cache', 'countries'), 'wb') { |f| f.write(Marshal.dump(data)) } end
Version data entries
6 entries across 6 versions & 1 rubygems
Version | Path |
---|---|
country_list-0.1.6 | Rakefile |
country_list-0.1.5 | Rakefile |
country_list-0.1.4 | Rakefile |
country_list-0.1.3 | Rakefile |
country_list-0.1.2 | Rakefile |
country_list-0.1.1 | Rakefile |