Permalink
Browse files

initial import

  • Loading branch information...
redronin committed Jun 27, 2012
0 parents commit 6232f071eefc70679f5f5b15e1f9d8733db78538
Showing with 408 additions and 0 deletions.
  1. +17 −0 .gitignore
  2. +22 −0 LICENSE
  3. +28 −0 README.md
  4. +19 −0 country_code_select.gemspec
  5. +322 −0 lib/country_code_select.rb
@@ -0,0 +1,17 @@
+*.gem
+*.rbc
+.bundle
+.config
+.yardoc
+Gemfile.lock
+InstalledFiles
+_yardoc
+coverage
+doc/
+lib/bundler/man
+pkg
+rdoc
+spec/reports
+test/tmp
+test/version_tmp
+tmp
22 LICENSE
@@ -0,0 +1,22 @@
+Copyright (c) 2012 John Tajima
+
+MIT License
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,28 @@
+# Country-Code-Select
+
+A country-select compatible country selector helper which uses ISO country codes.
+
+## Installation
+
+Add this line to your application's Gemfile:
+
+ gem 'country_code_select'
+
+And then execute:
+
+ $ bundle
+
+Or install it yourself as:
+
+ $ gem install country_code_select
+
+## Usage
+
+Simple use supplying model and attribute as parameters:
+
+country_select("user", "country_name")
+
+Supplying priority countries to be placed at the top of the list. Countries entered should be the country code.:
+
+country_select("user", "country_name", [ "GB", "FR", "US" ])
+
@@ -0,0 +1,19 @@
+# -*- encoding: utf-8 -*-
+require File.expand_path('../lib/country_code_select/version', __FILE__)
+
+Gem::Specification.new do |gem|
+ gem.authors = ["John Tajima"]
+ gem.email = ["john@shopify.com"]
+ gem.description = %q{country-select compatible gem which uses country codes}
+ gem.summary = %q{Provides a form helper to insert a country select box using the ISO 3166 country list}
+ gem.homepage = ""
+
+ gem.files = [ 'lib/country-select.rb',
+ 'README.md',
+ 'LICENSE' ]
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
+ gem.name = "country_code_select"
+ gem.require_paths = ["lib"]
+ gem.version = "0.1"
+end
Oops, something went wrong.

0 comments on commit 6232f07

Please sign in to comment.