Skip to content

Commit

Permalink
initial import
Browse files Browse the repository at this point in the history
  • Loading branch information
John Tajima committed Jun 27, 2012
0 parents commit 6232f07
Show file tree
Hide file tree
Showing 5 changed files with 408 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -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 changes: 22 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -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.
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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" ])

19 changes: 19 additions & 0 deletions country_code_select.gemspec
Original file line number Diff line number Diff line change
@@ -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
Loading

0 comments on commit 6232f07

Please sign in to comment.