magic-localized_country_select 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.travis.yml +2 -3
- data/Gemfile +1 -1
- data/README.rdoc +14 -3
- data/Rakefile +0 -19
- data/magic-localized_country_select.gemspec +4 -13
- data/test/localized_country_select_test.rb +3 -3
- metadata +20 -27
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: aa6049695b35464136608c1b0bd4f5a4f9b3c372
|
4
|
+
data.tar.gz: c0501ef2e1b502e3af4379cb6f80b48275052d6b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: c7dcfd0bb9de65a377be89168a13df998551f843710687e0f4f3ef0c0b7c7bb251c7d9e7112672ae87254bef28c177ebb8047e5286bc15b11da6b0cd217104b7
|
7
|
+
data.tar.gz: 803c6c81d1ac8ea4f8eda5618e184a08c312f040deaecf152d6b2dda94e0611a33102ff7e2dcded8f62b5dbe63d468f0b246b06522b654bf0bc3e7cc131b9fd2
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/README.rdoc
CHANGED
@@ -1,11 +1,22 @@
|
|
1
|
+
{<img src="https://secure.travis-ci.org/magiclabs/localized_country_select.png?branch=master" alt="Build Status" />}[http://travis-ci.org/magiclabs/localized_country_select]
|
2
|
+
{<img src="http://stillmaintained.com/magiclabs/localized_country_select.png" alt="Development Status" />}[http://stillmaintained.com/magiclabs/localized_country_select]
|
3
|
+
|
1
4
|
= LocalizedCountrySelect
|
2
5
|
|
3
|
-
Rails
|
6
|
+
Rails gem to provide support for localized <tt><select></tt> menu with country names and for
|
4
7
|
storing country information as country _code_ (eg. 'es'), not _name_ (eg. 'Spain'), in the database.
|
5
8
|
|
9
|
+
= Installation
|
10
|
+
|
11
|
+
Put this line into you Gemfile:
|
12
|
+
|
13
|
+
gem "magic-localized_country_select", "~> 0.2.0"
|
14
|
+
|
15
|
+
= Usage
|
16
|
+
|
6
17
|
Uses the Rails internationalization framework (I18n, http://rails-i18n.org) for translating the names of countries.
|
7
|
-
Requires Rails
|
8
|
-
Country names are loaded from hashes in
|
18
|
+
Requires Rails 3 or later versions.
|
19
|
+
Country names are loaded from hashes in config/locale directory, according to <tt>I18n.locale</tt> value.
|
9
20
|
|
10
21
|
You can easily translate country codes in your application like this:
|
11
22
|
|
data/Rakefile
CHANGED
@@ -24,22 +24,3 @@ Rake::RDocTask.new(:rdoc) do |rdoc|
|
|
24
24
|
rdoc.rdoc_files.include('README.rdoc')
|
25
25
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
26
26
|
end
|
27
|
-
|
28
|
-
#
|
29
|
-
# Jeweler
|
30
|
-
#
|
31
|
-
begin
|
32
|
-
require 'jeweler'
|
33
|
-
Jeweler::Tasks.new do |gemspec|
|
34
|
-
gemspec.name = "magic-localized_country_select"
|
35
|
-
gemspec.summary = "Localized country select list"
|
36
|
-
gemspec.description = "Localized country select list"
|
37
|
-
gemspec.email = "mail@magiclabs.de"
|
38
|
-
gemspec.homepage = "https://github.com/magiclabs/localized_country_select"
|
39
|
-
gemspec.authors = ["LIM SAS", "Damien MATHIEU", "Julien SANCHEZ", "Hervé GAUCHER", "Thomas von Deyen"]
|
40
|
-
gemspec.add_dependency "rails", "~> 3"
|
41
|
-
gemspec.add_dependency "hpricot", "~> 0.8"
|
42
|
-
end
|
43
|
-
rescue LoadError
|
44
|
-
puts "Jeweler not available. Install it with: gem install jeweler"
|
45
|
-
end
|
@@ -1,11 +1,6 @@
|
|
1
|
-
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
-
# -*- encoding: utf-8 -*-
|
5
|
-
|
6
1
|
Gem::Specification.new do |s|
|
7
2
|
s.name = "magic-localized_country_select"
|
8
|
-
s.version = "0.2.
|
3
|
+
s.version = "0.2.1"
|
9
4
|
|
10
5
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
6
|
s.authors = ["LIM SAS", "Damien MATHIEU", "Julien SANCHEZ", "Herv\u{e9} GAUCHER", "Thomas von Deyen"]
|
@@ -41,18 +36,14 @@ Gem::Specification.new do |s|
|
|
41
36
|
s.specification_version = 3
|
42
37
|
|
43
38
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
44
|
-
s.add_runtime_dependency(%q<
|
45
|
-
s.add_runtime_dependency(%q<rails>, ["~> 3"])
|
39
|
+
s.add_runtime_dependency(%q<rails>, ["~> 3.0"])
|
46
40
|
s.add_runtime_dependency(%q<hpricot>, ["~> 0.8"])
|
47
41
|
else
|
48
|
-
s.add_dependency(%q<
|
49
|
-
s.add_dependency(%q<rails>, ["~> 3"])
|
42
|
+
s.add_dependency(%q<rails>, ["~> 3.0"])
|
50
43
|
s.add_dependency(%q<hpricot>, ["~> 0.8"])
|
51
44
|
end
|
52
45
|
else
|
53
|
-
s.add_dependency(%q<
|
54
|
-
s.add_dependency(%q<rails>, ["~> 3"])
|
46
|
+
s.add_dependency(%q<rails>, ["~> 3.0"])
|
55
47
|
s.add_dependency(%q<hpricot>, ["~> 0.8"])
|
56
48
|
end
|
57
49
|
end
|
58
|
-
|
@@ -19,12 +19,12 @@ class LocalizedCountrySelectTest < Test::Unit::TestCase
|
|
19
19
|
include ActionView::Helpers::FormTagHelper
|
20
20
|
|
21
21
|
def test_action_view_should_include_helper_for_object
|
22
|
-
assert ActionView::Helpers::FormBuilder.instance_methods.include?(
|
23
|
-
assert ActionView::Helpers::FormOptionsHelper.instance_methods.include?(
|
22
|
+
assert ActionView::Helpers::FormBuilder.instance_methods.map(&:to_s).include?('country_select')
|
23
|
+
assert ActionView::Helpers::FormOptionsHelper.instance_methods.map(&:to_s).include?('country_select')
|
24
24
|
end
|
25
25
|
|
26
26
|
def test_action_view_should_include_helper_tag
|
27
|
-
assert ActionView::Helpers::FormOptionsHelper.instance_methods.include?(
|
27
|
+
assert ActionView::Helpers::FormOptionsHelper.instance_methods.map(&:to_s).include?('country_select_tag')
|
28
28
|
end
|
29
29
|
|
30
30
|
def test_should_return_select_tag_with_proper_name_for_object
|
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: magic-localized_country_select
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
5
|
-
prerelease:
|
4
|
+
version: 0.2.1
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- LIM SAS
|
@@ -16,38 +15,33 @@ cert_chain: []
|
|
16
15
|
date: 2012-03-08 00:00:00.000000000 Z
|
17
16
|
dependencies:
|
18
17
|
- !ruby/object:Gem::Dependency
|
19
|
-
name:
|
20
|
-
requirement:
|
21
|
-
none: false
|
18
|
+
name: rails
|
19
|
+
requirement: !ruby/object:Gem::Requirement
|
22
20
|
requirements:
|
23
|
-
- -
|
21
|
+
- - "~>"
|
24
22
|
- !ruby/object:Gem::Version
|
25
|
-
version: '0'
|
23
|
+
version: '3.0'
|
26
24
|
type: :runtime
|
27
25
|
prerelease: false
|
28
|
-
version_requirements:
|
29
|
-
- !ruby/object:Gem::Dependency
|
30
|
-
name: rails
|
31
|
-
requirement: &70114907121780 !ruby/object:Gem::Requirement
|
32
|
-
none: false
|
26
|
+
version_requirements: !ruby/object:Gem::Requirement
|
33
27
|
requirements:
|
34
|
-
- - ~>
|
28
|
+
- - "~>"
|
35
29
|
- !ruby/object:Gem::Version
|
36
|
-
version: '3'
|
37
|
-
type: :runtime
|
38
|
-
prerelease: false
|
39
|
-
version_requirements: *70114907121780
|
30
|
+
version: '3.0'
|
40
31
|
- !ruby/object:Gem::Dependency
|
41
32
|
name: hpricot
|
42
|
-
requirement:
|
43
|
-
none: false
|
33
|
+
requirement: !ruby/object:Gem::Requirement
|
44
34
|
requirements:
|
45
|
-
- - ~>
|
35
|
+
- - "~>"
|
46
36
|
- !ruby/object:Gem::Version
|
47
37
|
version: '0.8'
|
48
38
|
type: :runtime
|
49
39
|
prerelease: false
|
50
|
-
version_requirements:
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
requirements:
|
42
|
+
- - "~>"
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: '0.8'
|
51
45
|
description: Localized country select list
|
52
46
|
email: mail@magiclabs.de
|
53
47
|
executables: []
|
@@ -55,7 +49,7 @@ extensions: []
|
|
55
49
|
extra_rdoc_files:
|
56
50
|
- README.rdoc
|
57
51
|
files:
|
58
|
-
- .travis.yml
|
52
|
+
- ".travis.yml"
|
59
53
|
- Gemfile
|
60
54
|
- MIT-LICENSE
|
61
55
|
- README.rdoc
|
@@ -72,25 +66,24 @@ files:
|
|
72
66
|
- uninstall.rb
|
73
67
|
homepage: https://github.com/magiclabs/localized_country_select
|
74
68
|
licenses: []
|
69
|
+
metadata: {}
|
75
70
|
post_install_message:
|
76
71
|
rdoc_options: []
|
77
72
|
require_paths:
|
78
73
|
- lib
|
79
74
|
required_ruby_version: !ruby/object:Gem::Requirement
|
80
|
-
none: false
|
81
75
|
requirements:
|
82
|
-
- -
|
76
|
+
- - ">="
|
83
77
|
- !ruby/object:Gem::Version
|
84
78
|
version: '0'
|
85
79
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
86
|
-
none: false
|
87
80
|
requirements:
|
88
|
-
- -
|
81
|
+
- - ">="
|
89
82
|
- !ruby/object:Gem::Version
|
90
83
|
version: '0'
|
91
84
|
requirements: []
|
92
85
|
rubyforge_project:
|
93
|
-
rubygems_version:
|
86
|
+
rubygems_version: 2.5.1
|
94
87
|
signing_key:
|
95
88
|
specification_version: 3
|
96
89
|
summary: Localized country select list
|