ruscountrylist 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: c8cc5a1d29a51dcde11e57d3b897b36e5f67bb8caabe81095f9bb19867ee0a74
4
+ data.tar.gz: fa57fb7ffb4f7ba4b16f61320823bd9ce7c4662e3422c3314f3d568198ad94d2
5
+ SHA512:
6
+ metadata.gz: '0872d95a83a06fdbca231ff6dad7981e0d44fcbd7a61c542ff05bb469d22bd59baa529a7699c8bbfef86893272105f62200d62a74d248df1940cc814da437436'
7
+ data.tar.gz: 4c96e5846626c6510193d6b3498dd100e329025bce747f21e052430ea3c1f0e949c7776e9d284e20c58799f002222ea3d6a4cab6038eb23ecb0631ad4d653bd6
@@ -1,8 +1,11 @@
1
+ ## v0.0.3
2
+
3
+ - fix migration warnings on Rails 5
4
+
1
5
  ## v0.0.2
2
6
 
3
- * removed unstable version of ruscountrylist v0.0.1
7
+ - removed unstable version of ruscountrylist v0.0.1
4
8
 
5
9
  ## v0.0.1
6
10
 
7
- * initial release
8
-
11
+ - initial release
data/README.md CHANGED
@@ -1,8 +1,11 @@
1
1
  # Ruscountrylist
2
2
 
3
3
  Список стран на русском языке.
4
+
4
5
  Russian country list.
5
6
 
7
+ За основу взят список стран [http://www.artlebedev.ru/tools/country-list/](http://www.artlebedev.ru/tools/country-list/)
8
+
6
9
  ## Требования
7
10
  * Ruby 1.9.3 (возможо, подойдет версия старше)
8
11
  * Rails 3.2 (возможо, подойдет версия старше)
@@ -73,7 +76,35 @@ Or install it yourself as:
73
76
  В шаблоне (на примере slim)
74
77
 
75
78
  select_tag 'countries', options_from_collection_for_select(@countries, 'id', 'name')
79
+
80
+ ### Таблица стран
81
+
82
+ Содержит следующие поля:
83
+
84
+ * string "name" - Наименование
85
+ * string "fullname" - Полное наименование
86
+ * string "english" - На английском
87
+ * string "alpha2" - Alpha2, двухбуквенное обозначение страны, RU
88
+ * string "alpha3" - Alpha3, трехбуквенное обозначение страны, RUS
89
+ * string "iso" - ISO код
90
+ * string "location" - Часть света
91
+ * string "location_precise" - Расположение
92
+ * boolean "enabled", :default => true - возможность включать и выключать запись
93
+ * integer "show_order", :default => 0 - порядок вывода, 0 - по умолчанию.
94
+
95
+ Индекс по полю `name` (наименовение) с проверкой уникальности.
96
+
97
+ ### Модель
98
+
99
+ По умолчанию модель создается с следующим
100
+
101
+ # attr_accessible :title, :body
102
+
103
+ Если будет желание редактировать страны, то для модели можно добавить такой код:
76
104
 
105
+ attr_accessible :name, :fullname, :english, :alpha2, :alpha3, :iso, :location, :location_precise, :enabled, :show_order
106
+
107
+
77
108
  ## Contributing
78
109
 
79
110
  1. Fork it
@@ -1,5 +1,12 @@
1
1
  # -*- encoding: utf-8 -*-
2
- class Create<%= model_class_name.pluralize %> < ActiveRecord::Migration
2
+ migration_class =
3
+ if ActiveRecord::VERSION::MAJOR >= 5
4
+ ActiveRecord::Migration[4.2]
5
+ else
6
+ ActiveRecord::Migration
7
+ end
8
+
9
+ class Create<%= model_class_name.pluralize %> < migration_class
3
10
  def self.up
4
11
  create_table :<%= model_class_name.pluralize.underscore %> do |t|
5
12
  t.string :name, null: false #Наименование
@@ -1,4 +1,4 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  module Ruscountrylist
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
metadata CHANGED
@@ -1,30 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruscountrylist
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
5
- prerelease:
4
+ version: 0.0.3
6
5
  platform: ruby
7
6
  authors:
8
7
  - vasche
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-11-04 00:00:00.000000000 Z
11
+ date: 2019-02-07 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rake
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - ">="
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :development
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - ">="
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  description: Create russian country list table
@@ -34,8 +31,8 @@ executables: []
34
31
  extensions: []
35
32
  extra_rdoc_files: []
36
33
  files:
37
- - .gitignore
38
- - .travis.yml
34
+ - ".gitignore"
35
+ - ".travis.yml"
39
36
  - CHANGELOG.md
40
37
  - Gemfile
41
38
  - LICENSE.txt
@@ -51,32 +48,24 @@ files:
51
48
  - source/country-list.xml
52
49
  homepage: https://github.com/vasche
53
50
  licenses: []
51
+ metadata: {}
54
52
  post_install_message:
55
53
  rdoc_options: []
56
54
  require_paths:
57
55
  - lib
58
56
  required_ruby_version: !ruby/object:Gem::Requirement
59
- none: false
60
57
  requirements:
61
- - - ! '>='
58
+ - - ">="
62
59
  - !ruby/object:Gem::Version
63
60
  version: '0'
64
- segments:
65
- - 0
66
- hash: -3124732744752070574
67
61
  required_rubygems_version: !ruby/object:Gem::Requirement
68
- none: false
69
62
  requirements:
70
- - - ! '>='
63
+ - - ">="
71
64
  - !ruby/object:Gem::Version
72
65
  version: '0'
73
- segments:
74
- - 0
75
- hash: -3124732744752070574
76
66
  requirements: []
77
- rubyforge_project: ruscountrylist
78
- rubygems_version: 1.8.23
67
+ rubygems_version: 3.0.2
79
68
  signing_key:
80
- specification_version: 3
69
+ specification_version: 4
81
70
  summary: Create russian country list table
82
71
  test_files: []