kirgudu_refs 0.0.3 → 0.0.5

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.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/app/helpers/kirgudu_refs/model_basic_properties.rb +17 -0
  3. data/app/models/kirgudu_refs/globe/city.rb +3 -1
  4. data/app/models/kirgudu_refs/globe/continent.rb +55 -0
  5. data/app/models/kirgudu_refs/globe/country.rb +7 -1
  6. data/app/models/kirgudu_refs/globe/region.rb +4 -1
  7. data/app/models/kirgudu_refs/globe/state.rb +3 -1
  8. data/app/models/kirgudu_refs/globe/subway_line.rb +1 -1
  9. data/app/models/kirgudu_refs/globe/subway_station.rb +1 -1
  10. data/app/models/kirgudu_refs/globe/timezone.rb +4 -1
  11. data/app/models/kirgudu_refs/it/encoding.rb +1 -1
  12. data/app/models/kirgudu_refs/it/hosting_type.rb +1 -1
  13. data/app/models/kirgudu_refs/it/operating_system.rb +1 -1
  14. data/app/models/kirgudu_refs/it/operating_system_family.rb +1 -1
  15. data/app/models/kirgudu_refs/it/processor_architecture.rb +1 -1
  16. data/app/models/kirgudu_refs/it/top_level_domain.rb +1 -1
  17. data/app/models/kirgudu_refs/it/website_type.rb +1 -1
  18. data/app/models/kirgudu_refs/national/currency.rb +1 -1
  19. data/app/models/kirgudu_refs/national/language.rb +1 -1
  20. data/app/models/kirgudu_refs/shops/manufacturer.rb +2 -2
  21. data/db/migrate/20140317170550_add_fields_to_globe_country.rb +12 -0
  22. data/db/migrate/20140317172757_create_kirgudu_refs_globe_continents.rb +34 -0
  23. data/db/migrate/20140318070344_add_fields_to_globe_state.rb +14 -0
  24. data/db/migrate/20140320061618_add_la_lo_to_globe_city.rb +11 -0
  25. data/db/migrate/20140405115838_add_is_active_to_globe_countries.rb +6 -0
  26. data/db/migrate/20140405115851_add_is_active_to_globe_regions.rb +6 -0
  27. data/db/migrate/20140405115857_add_is_active_to_globe_cities.rb +6 -0
  28. data/db/migrate/20140405120857_add_is_active_to_globe_states.rb +6 -0
  29. data/db/migrate/20140405121618_add_is_active_to_national_language.rb +6 -0
  30. data/db/migrate/20140405121626_add_is_active_to_national_currency.rb +6 -0
  31. data/test/fixtures/kirgudu_refs/globe/continents.yml +15 -0
  32. data/test/models/kirgudu_refs/globe/continent_test.rb +9 -0
  33. metadata +18 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 01ea468d9e566ff2298438e7e21d6d3ead8afd9d
4
- data.tar.gz: a52a891c52fc92c0dae316fcb6b162c178013394
3
+ metadata.gz: 9153e71116cc11396a6258e48695da81348cdede
4
+ data.tar.gz: 2c38e58ab70255223ab2f0e050292e007eee8d2a
5
5
  SHA512:
6
- metadata.gz: 5f7b366f0002435e253ea97881a08f577c8100025a8816095ed06133cd55501c0789aa94cf8eecd009620fa67fefc1258f6c78301286804b7aff808c86dd0cb5
7
- data.tar.gz: 7c47ec3bd10b5ea48a3450959a95e880b3d59bce3af7091ca2d6847e069330099bdaf808d517de19f6573a875bc2317a3ce131c26ad1cb96b4e645bb880f9aca
6
+ metadata.gz: 24cc1932f7ff20b52459f6abf024b0056ca58471f56d7c23b0ab28a0101e7d64eeda64a0ec6170f1253d1a376596ad9f29c422cdabb31239603116ad0d139c3c
7
+ data.tar.gz: 70f9cc4fcb9ab7638b1f5509d8039ddf736084619e6f02b8ed60e4c40820953d617fb91b7d178823f5a7b69d628eb6f00a477e120e39e07273cc26f254dd5790
@@ -67,6 +67,23 @@ module KirguduRefs
67
67
  end
68
68
  end
69
69
 
70
+ module ContinentID
71
+ def self.included(base)
72
+ base.belongs_to :continent, class_name: ::KirguduRefs::Globe::Continent, foreign_key: :continent_id
73
+ base.scope :by_continent, lambda { |value| base.where(continent_id: value) if value }
74
+
75
+ base.class_eval do
76
+ include InstanceMethods
77
+ end
78
+ end
79
+
80
+ module InstanceMethods
81
+ def continent_name
82
+ continent.name if continent
83
+ end
84
+ end
85
+ end
86
+
70
87
 
71
88
  module CountryID
72
89
  def self.included(base)
@@ -19,7 +19,7 @@ module KirguduRefs
19
19
 
20
20
  validates_length_of :name, maximum: 128, allow_blank: true
21
21
  validates_length_of :slug, maximum: 128, allow_blank: true
22
- validate_as_seo_tag :slug
22
+ validates_slug_format_of :slug, allow_blank: true
23
23
 
24
24
  validates_length_of :meta_keywords, maximum: 200, allow_blank: true
25
25
  validates_length_of :meta_description, maximum: 200, allow_blank: true
@@ -31,6 +31,7 @@ module KirguduRefs
31
31
  include ::KirguduBase::Models::Scopes::WithName
32
32
  include ::KirguduBase::Models::Scopes::WithSlug
33
33
 
34
+ scope :with_is_active, lambda { |value| where(is_active: value) if value }
34
35
  scope :with_area_min, lambda { |value| where { area >= value } if value }
35
36
  scope :with_area_max, lambda { |value| where { area <= value } if value }
36
37
  scope :with_population_min, lambda { |value| where { population >= value } if value }
@@ -55,6 +56,7 @@ module KirguduRefs
55
56
  .by_country(filters[:country_id])
56
57
  .by_state(filters[:state_id])
57
58
  .by_region(filters[:region_id])
59
+ .with_is_active(filters[:is_active])
58
60
 
59
61
  super(query, filters)
60
62
  end
@@ -0,0 +1,55 @@
1
+ module KirguduRefs
2
+ class Globe::Continent < ::KirguduRefs::BaseModel
3
+
4
+ include ::KirguduBase::Models::BasicProperties::Portal
5
+ include ::KirguduBase::Models::BasicProperties::CreatedBy
6
+ include ::KirguduBase::Models::BasicProperties::UpdatedBy
7
+
8
+ ########################################## VALIDATIONS #######################################
9
+
10
+ validates_presence_of :name, :slug, :code
11
+ validates_uniqueness_of :name, :slug, :code, case_sensitive: false, scope: :portal_id
12
+
13
+ validates_length_of :name, maximum: 128
14
+ validates_length_of :slug, maximum: 128
15
+ validates_slug_format_of :slug, allow_blank: true
16
+
17
+ validates_length_of :code, is: 2, allow_blank: true
18
+
19
+ validates_length_of :meta_keywords, maximum: 200, allow_blank: true
20
+ validates_length_of :meta_description, maximum: 200, allow_blank: true
21
+
22
+
23
+ ########################################### SCOPES #########################################
24
+
25
+ include ::KirguduBase::Models::Scopes::WithName
26
+ include ::KirguduBase::Models::Scopes::WithSlug
27
+
28
+ scope :with_keyword, lambda { |value|
29
+ if value
30
+ value = value.gsub('%', ' ').strip
31
+ like_value ="%#{value}%"
32
+ where { (name.like like_value) | (slug.like like_value) }
33
+ end
34
+ }
35
+
36
+ def self.apply_filters_to_query(query, filters={})
37
+ filters ||= {}
38
+
39
+ query = query
40
+
41
+ super(query, filters)
42
+ end
43
+
44
+ def capital_name
45
+ capital.name if capital
46
+ end
47
+
48
+ private
49
+ def normalize_values_before_validation
50
+
51
+ self.name.capitalize!
52
+ super
53
+ end
54
+ end
55
+ end
@@ -11,6 +11,7 @@ module KirguduRefs
11
11
  include ::KirguduRefs::ModelBasicProperties::CountryID
12
12
  include ::KirguduRefs::ModelBasicProperties::StateID
13
13
  include ::KirguduRefs::ModelBasicProperties::RegionID
14
+ include ::KirguduRefs::ModelBasicProperties::ContinentID
14
15
 
15
16
  include ::KirguduRefs::ModelBasicProperties::CurrencyID
16
17
 
@@ -20,6 +21,8 @@ module KirguduRefs
20
21
  has_many :states, class_name: ::KirguduRefs::Globe::State, foreign_key: :country_id, dependent: :destroy
21
22
  has_many :regions, class_name: ::KirguduRefs::Globe::Region, foreign_key: :country_id, dependent: :destroy
22
23
  has_many :cities, class_name: ::KirguduRefs::Globe::City, foreign_key: :country_id, dependent: :destroy
24
+ has_many :timezones, class_name: ::KirguduRefs::Globe::Timezone, foreign_key: :country_id, dependent: :nullify
25
+
23
26
 
24
27
  ########################################## VALIDATIONS #######################################
25
28
 
@@ -28,7 +31,7 @@ module KirguduRefs
28
31
 
29
32
  validates_length_of :name, maximum: 128
30
33
  validates_length_of :slug, maximum: 128
31
- validate_as_seo_tag :slug, allow_nil: true
34
+ validates_slug_format_of :slug, allow_blank: true
32
35
 
33
36
  validates_length_of :iso2, is: 2, allow_blank: true
34
37
  validates_length_of :iso3, is: 3, allow_blank: true
@@ -46,6 +49,7 @@ module KirguduRefs
46
49
  scope :by_capital, lambda { |value| where(capital_id: value) if value }
47
50
 
48
51
  scope :with_area_min, lambda { |value| where { area >= value } if value }
52
+ scope :with_is_active, lambda { |value| where(is_active: value) if value }
49
53
  scope :with_area_max, lambda { |value| where { area <= value } if value }
50
54
  scope :with_population_min, lambda { |value| where { population >= value } if value }
51
55
  scope :with_population_max, lambda { |value| where { population <= value } if value }
@@ -68,6 +72,8 @@ module KirguduRefs
68
72
  .with_population_max(filters[:population_max])
69
73
  .by_currency(filters[:currency_id])
70
74
  .by_capital(filters[:capital_id])
75
+ .by_continent(filters[:continent_id])
76
+ .with_is_active(filters[:is_active])
71
77
 
72
78
  super(query, filters)
73
79
  end
@@ -26,7 +26,7 @@ module KirguduRefs
26
26
 
27
27
  validates_length_of :name, maximum: 128
28
28
  validates_length_of :slug, maximum: 128
29
- validate_as_seo_tag :slug, allow_blank: true
29
+ validates_slug_format_of :slug, allow_blank: true
30
30
 
31
31
 
32
32
  ######################################### SCOPES #############################################
@@ -37,11 +37,13 @@ module KirguduRefs
37
37
 
38
38
  scope :by_capital, lambda { |value| where(capital_id: value) if value }
39
39
 
40
+ scope :with_is_active, lambda { |value| where(is_active: value) if value }
40
41
  scope :with_area_min, lambda { |value| where { area >= value } if value }
41
42
  scope :with_area_max, lambda { |value| where { area <= value } if value }
42
43
  scope :with_population_min, lambda { |value| where { population >= value } if value }
43
44
  scope :with_population_max, lambda { |value| where { population <= value } if value }
44
45
 
46
+
45
47
  scope :with_keyword, lambda { |value|
46
48
  if value
47
49
  value = value.gsub('%', ' ').strip
@@ -61,6 +63,7 @@ module KirguduRefs
61
63
  .by_country(filters[:country_id])
62
64
  .by_capital(filters[:capital_id])
63
65
  .by_state(filters[:state_id])
66
+ .with_is_active(filters[:is_active])
64
67
 
65
68
  super(query, filters)
66
69
  end
@@ -23,7 +23,7 @@ module KirguduRefs
23
23
 
24
24
  validates_length_of :name, maximum: 128, allow_blank: true
25
25
  validates_length_of :slug, maximum: 128, allow_blank: true
26
- validate_as_seo_tag :slug, allow_nil: true
26
+ validates_slug_format_of :slug, allow_blank: true
27
27
 
28
28
  validates_length_of :meta_keywords, maximum: 200, allow_blank: true
29
29
  validates_length_of :meta_description, maximum: 200, allow_blank: true
@@ -35,6 +35,7 @@ module KirguduRefs
35
35
 
36
36
  scope :by_capital, lambda { |value| where(capital_id: value) if value }
37
37
 
38
+ scope :with_is_active, lambda { |value| where(is_active: value) if value }
38
39
  scope :with_area_min, lambda { |value| where { area >= value } if value }
39
40
  scope :with_area_max, lambda { |value| where { area <= value } if value }
40
41
  scope :with_population_min, lambda { |value| where { population >= value } if value }
@@ -66,6 +67,7 @@ module KirguduRefs
66
67
  .by_country(filters[:country_id])
67
68
  .by_capital(filters[:capital_id])
68
69
  .with_car_code(filters[:car_code])
70
+ .with_is_active(filters[:is_active])
69
71
 
70
72
  super(query, filters)
71
73
  end
@@ -19,7 +19,7 @@ module KirguduRefs
19
19
 
20
20
  validates_length_of :name, maximum: 128, allow_blank: true
21
21
  validates_length_of :slug, maximum: 128, allow_blank: true
22
- validate_as_seo_tag :slug, allow_nil: true
22
+ validates_slug_format_of :slug, allow_blank: true
23
23
 
24
24
  ########################################## VALIDATIONS #######################################
25
25
 
@@ -24,7 +24,7 @@ module KirguduRefs
24
24
 
25
25
  validates_length_of :name, maximum: 128, allow_blank: true
26
26
  validates_length_of :slug, maximum: 128, allow_blank: true
27
- validate_as_seo_tag :slug, allow_nil: true
27
+ validates_slug_format_of :slug, allow_blank: true
28
28
 
29
29
  ######################################### SCOPES #############################################
30
30
 
@@ -17,10 +17,13 @@ module KirguduRefs
17
17
 
18
18
  validates_length_of :name, maximum: 128, allow_blank: true
19
19
  validates_length_of :slug, maximum: 128, allow_blank: true
20
- validate_as_seo_tag :slug, allow_nil: true
20
+ validates_slug_format_of :slug, allow_blank: true
21
21
 
22
22
  ######################################### SCOPES #############################################
23
23
 
24
+ include ::KirguduBase::Models::Scopes::WithName
25
+ include ::KirguduBase::Models::Scopes::WithSlug
26
+
24
27
  scope :with_keyword, lambda { |value|
25
28
  if value
26
29
  value = value.gsub('%', ' ').strip
@@ -16,7 +16,7 @@ module KirguduRefs
16
16
 
17
17
  validates_length_of :name, maximum: 128, allow_blank: true
18
18
  validates_length_of :slug, maximum: 128, allow_blank: true
19
- validate_as_seo_tag :slug, allow_nil: true
19
+ validates_slug_format_of :slug, allow_blank: true
20
20
 
21
21
 
22
22
  ############################################### SCOPES #######################################
@@ -17,7 +17,7 @@ module KirguduRefs
17
17
 
18
18
  validates_length_of :name, maximum: 128, allow_blank: true
19
19
  validates_length_of :slug, maximum: 128, allow_blank: true
20
- validate_as_seo_tag :slug, allow_nil: true
20
+ validates_slug_format_of :slug, allow_blank: true
21
21
 
22
22
  validates_length_of :meta_keywords, maximum: 200, allow_blank: true
23
23
  validates_length_of :meta_description, maximum: 200, allow_blank: true
@@ -18,7 +18,7 @@ module KirguduRefs
18
18
 
19
19
  validates_length_of :name, maximum: 128, allow_blank: true
20
20
  validates_length_of :slug, maximum: 128, allow_blank: true
21
- validate_as_seo_tag :slug, allow_nil: true
21
+ validates_slug_format_of :slug, allow_blank: true
22
22
 
23
23
  ######################################### SCOPES #############################################
24
24
 
@@ -17,7 +17,7 @@ module KirguduRefs
17
17
 
18
18
  validates_length_of :name, maximum: 128, allow_blank: true
19
19
  validates_length_of :slug, maximum: 128, allow_blank: true
20
- validate_as_seo_tag :slug, allow_nil: true
20
+ validates_slug_format_of :slug, allow_blank: true
21
21
 
22
22
  ######################################### SCOPES #############################################
23
23
 
@@ -15,7 +15,7 @@ module KirguduRefs
15
15
 
16
16
  validates_length_of :name, maximum: 128, allow_blank: true
17
17
  validates_length_of :slug, maximum: 128, allow_blank: true
18
- validate_as_seo_tag :slug, allow_nil: true
18
+ validates_slug_format_of :slug, allow_blank: true
19
19
 
20
20
  ######################################### SCOPES #############################################
21
21
 
@@ -15,7 +15,7 @@ module KirguduRefs
15
15
  validates_length_of :name, maximum: 128, allow_blank: true
16
16
  validates_length_of :slug, maximum: 128, allow_blank: true
17
17
  validates_length_of :domain_name, maximum: 128, allow_blank: true
18
- validate_as_seo_tag :slug, allow_nil: true
18
+ validates_slug_format_of :slug, allow_blank: true
19
19
 
20
20
  validates_length_of :meta_keywords, maximum: 200, allow_blank: true
21
21
  validates_length_of :meta_description, maximum: 200, allow_blank: true
@@ -16,7 +16,7 @@ module KirguduRefs
16
16
 
17
17
  validates_length_of :name, maximum: 128, allow_blank: true
18
18
  validates_length_of :slug, maximum: 128, allow_blank: true
19
- validate_as_seo_tag :slug, allow_nil: true
19
+ validates_slug_format_of :slug, allow_blank: true
20
20
 
21
21
  validates_length_of :meta_keywords, maximum: 200, allow_blank: true
22
22
  validates_length_of :meta_description, maximum: 200, allow_blank: true
@@ -27,7 +27,7 @@ module KirguduRefs
27
27
  validates_length_of :meta_keywords, maximum: 200, allow_blank: true
28
28
  validates_length_of :meta_description, maximum: 200, allow_blank: true
29
29
 
30
- validate_as_seo_tag :slug, allow_nil: true
30
+ validates_slug_format_of :slug, allow_blank: true
31
31
 
32
32
 
33
33
  ########################################## SCOPES ########################################
@@ -20,7 +20,7 @@ module KirguduRefs
20
20
 
21
21
  validates_length_of :iso3, is: 3, allow_blank: true
22
22
  validates_length_of :iso2, is: 2, allow_blank: true
23
- validate_as_seo_tag :slug, allow_blank: true
23
+ validates_slug_format_of :slug, allow_blank: true
24
24
 
25
25
 
26
26
  validates_length_of :meta_keywords, maximum: 200, allow_blank: true
@@ -18,8 +18,8 @@ module KirguduRefs
18
18
  validates_length_of :name, maximum: 180, allow_blank: true
19
19
  validates_length_of :slug, maximum: 180, allow_blank: true
20
20
 
21
- validate_as_seo_tag :slug, allow_nil: true, allow_blank: true
22
- validate_as_url :website, allow_blank: true, allow_nil: true
21
+ validates_slug_format_of :slug, allow_blank: true, allow_blank: true
22
+ validates_url_format_of :website, allow_blank: true, allow_nil: true
23
23
 
24
24
 
25
25
  ########################################### SCOPES ##########################################
@@ -0,0 +1,12 @@
1
+ class AddFieldsToGlobeCountry < ActiveRecord::Migration
2
+ def change
3
+ add_column :kirgudu_refs_globe_countries, :continent_id, :integer, limit: 8
4
+ add_column :kirgudu_refs_globe_countries, :iso_numeric, :integer
5
+ add_column :kirgudu_refs_globe_countries, :gpd, :integer, limit: 8
6
+ add_column :kirgudu_refs_globe_countries, :postal_code_format, :string, limit: 128
7
+ add_column :kirgudu_refs_globe_countries, :postal_code_regex, :string, limit: 128
8
+
9
+ add_index :kirgudu_refs_globe_countries, :continent_id, name: "idx_krgd_refs_globe_countries_on_continent_id"
10
+
11
+ end
12
+ end
@@ -0,0 +1,34 @@
1
+ class CreateKirguduRefsGlobeContinents < ActiveRecord::Migration
2
+ def change
3
+ create_table :kirgudu_refs_globe_continents do |t|
4
+ t.integer :portal_id, limit: 8, null: false
5
+ t.string :uin, limit: 36, null: false
6
+ t.integer :created_by, limit: 8, null: false
7
+ t.integer :updated_by, limit: 8, null: false
8
+
9
+ t.string :name, limit: 128, null: false
10
+ t.string :slug, limit: 128, null: false
11
+ t.string :code, limit: 2, null: false
12
+ t.string :meta_keywords, limit: 200
13
+ t.string :meta_description, limit: 200
14
+ t.text :description
15
+
16
+ t.integer :deletion_status_id, limit: 8, null: false, default: 0
17
+
18
+ t.timestamps
19
+ end
20
+
21
+
22
+ add_index :kirgudu_refs_globe_continents, :name, name: "idx_krgd_refs_globe_continents_on_name"
23
+ add_index :kirgudu_refs_globe_continents, :code, name: "idx_krgd_refs_globe_continents_on_code"
24
+ add_index :kirgudu_refs_globe_continents, :slug, name: "idx_krgd_refs_globe_continents_on_slug"
25
+
26
+ add_index :kirgudu_refs_globe_continents, :portal_id, name: "idx_krgd_refs_globe_continents_on_prtl_id"
27
+ add_index :kirgudu_refs_globe_continents, :uin, name: "idx_krgd_refs_globe_continents_on_uin"
28
+ add_index :kirgudu_refs_globe_continents, :created_by, name: "idx_krgd_refs_globe_continents_on_crtd_by"
29
+ add_index :kirgudu_refs_globe_continents, :created_at, name: "idx_krgd_refs_globe_continents_on_crtd_at"
30
+ add_index :kirgudu_refs_globe_continents, :updated_by, name: "idx_krgd_refs_globe_continents_on_updt_by"
31
+ add_index :kirgudu_refs_globe_continents, :updated_at, name: "idx_krgd_refs_globe_continents_on_updt_at"
32
+ add_index :kirgudu_refs_globe_continents, :deletion_status_id, name: "idx_krgd_refs_globe_continents_on_del_stat_id"
33
+ end
34
+ end
@@ -0,0 +1,14 @@
1
+ class AddFieldsToGlobeState < ActiveRecord::Migration
2
+ def change
3
+ add_column :kirgudu_refs_globe_states, :gdp, :integer, limit: 8
4
+ add_column :kirgudu_refs_globe_states, :iso, :string, limit: 10
5
+ add_column :kirgudu_refs_globe_states, :fips, :string, limit: 10
6
+ add_column :kirgudu_refs_globe_states, :timezone_id, :integer, limit: 8
7
+
8
+
9
+ add_index :kirgudu_refs_globe_states, :iso, name: "idx_krgd_refs_globe_states_on_iso"
10
+ add_index :kirgudu_refs_globe_states, :timezone_id, name: "idx_krgd_refs_globe_states_on_timezone_id"
11
+ add_index :kirgudu_refs_globe_states, :gdp, name: "idx_krgd_refs_globe_states_on_gdp"
12
+
13
+ end
14
+ end
@@ -0,0 +1,11 @@
1
+ class AddLaLoToGlobeCity < ActiveRecord::Migration
2
+ def change
3
+ add_column :kirgudu_refs_globe_cities, :latitude, :decimal, precision: 10, scale: 7
4
+ add_column :kirgudu_refs_globe_cities, :longitude, :decimal, precision: 10, scale: 7
5
+ add_column :kirgudu_refs_globe_cities, :gdp, :integer, limit: 8
6
+
7
+ add_index :kirgudu_refs_globe_cities, :latitude, name: "idx_krgd_refs_globe_cities_on_latitude"
8
+ add_index :kirgudu_refs_globe_cities, :longitude, name: "idx_krgd_refs_globe_cities_on_longitude"
9
+ add_index :kirgudu_refs_globe_cities, :gdp, name: "idx_krgd_refs_globe_cities_on_gdp"
10
+ end
11
+ end
@@ -0,0 +1,6 @@
1
+ class AddIsActiveToGlobeCountries < ActiveRecord::Migration
2
+ def change
3
+ add_column :kirgudu_refs_globe_countries, :is_active, :boolean, null: false, default: true
4
+ add_index :kirgudu_refs_globe_countries, :is_active, name: "idx_krgd_refs_globe_countries_on_is_active"
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ class AddIsActiveToGlobeRegions < ActiveRecord::Migration
2
+ def change
3
+ add_column :kirgudu_refs_globe_regions, :is_active, :boolean, null: false, default: true
4
+ add_index :kirgudu_refs_globe_regions, :is_active, name: "idx_krgd_refs_globe_regions_on_is_active"
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ class AddIsActiveToGlobeCities < ActiveRecord::Migration
2
+ def change
3
+ add_column :kirgudu_refs_globe_cities, :is_active, :boolean, null: false, default: true
4
+ add_index :kirgudu_refs_globe_cities, :is_active, name: "idx_krgd_refs_globe_cities_on_is_active"
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ class AddIsActiveToGlobeStates < ActiveRecord::Migration
2
+ def change
3
+ add_column :kirgudu_refs_globe_states, :is_active, :boolean, null: false, default: true
4
+ add_index :kirgudu_refs_globe_states, :is_active, name: "idx_krgd_refs_globe_states_on_is_active"
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ class AddIsActiveToNationalLanguage < ActiveRecord::Migration
2
+ def change
3
+ add_column :kirgudu_refs_national_languages, :is_active, :boolean, null: false, default: true
4
+ add_index :kirgudu_refs_national_languages, :is_active, name: "idx_krgd_refs_national_langs_is_active"
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ class AddIsActiveToNationalCurrency < ActiveRecord::Migration
2
+ def change
3
+ add_column :kirgudu_refs_national_currencies, :is_active, :boolean, null: false, default: true
4
+ add_index :kirgudu_refs_national_currencies, :is_active, name: "idx_krgd_refs_national_currs_is_active"
5
+ end
6
+ end
@@ -0,0 +1,15 @@
1
+ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2
+
3
+ one:
4
+ name: MyString
5
+ code: MyString
6
+ meta_keywords: MyString
7
+ meta_description: MyString
8
+ description: MyText
9
+
10
+ two:
11
+ name: MyString
12
+ code: MyString
13
+ meta_keywords: MyString
14
+ meta_description: MyString
15
+ description: MyText
@@ -0,0 +1,9 @@
1
+ require 'test_helper'
2
+
3
+ module KirguduRefs
4
+ class Globe::ContinentTest < ActiveSupport::TestCase
5
+ # test "the truth" do
6
+ # assert true
7
+ # end
8
+ end
9
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kirgudu_refs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mitrofanov Dmitry
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-11 00:00:00.000000000 Z
11
+ date: 2014-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -127,6 +127,7 @@ files:
127
127
  - app/models/kirgudu_refs/finances/bank.rb
128
128
  - app/models/kirgudu_refs/globe.rb
129
129
  - app/models/kirgudu_refs/globe/city.rb
130
+ - app/models/kirgudu_refs/globe/continent.rb
130
131
  - app/models/kirgudu_refs/globe/country.rb
131
132
  - app/models/kirgudu_refs/globe/region.rb
132
133
  - app/models/kirgudu_refs/globe/state.rb
@@ -166,6 +167,16 @@ files:
166
167
  - db/migrate/20140111155332_create_kirgudu_refs_it_hosting_types.rb
167
168
  - db/migrate/20140113072335_create_kirgudu_refs_it_top_level_domains.rb
168
169
  - db/migrate/20140215071954_create_kirgudu_refs_finances_banks.rb
170
+ - db/migrate/20140317170550_add_fields_to_globe_country.rb
171
+ - db/migrate/20140317172757_create_kirgudu_refs_globe_continents.rb
172
+ - db/migrate/20140318070344_add_fields_to_globe_state.rb
173
+ - db/migrate/20140320061618_add_la_lo_to_globe_city.rb
174
+ - db/migrate/20140405115838_add_is_active_to_globe_countries.rb
175
+ - db/migrate/20140405115851_add_is_active_to_globe_regions.rb
176
+ - db/migrate/20140405115857_add_is_active_to_globe_cities.rb
177
+ - db/migrate/20140405120857_add_is_active_to_globe_states.rb
178
+ - db/migrate/20140405121618_add_is_active_to_national_language.rb
179
+ - db/migrate/20140405121626_add_is_active_to_national_currency.rb
169
180
  - lib/kirgudu_refs.rb
170
181
  - lib/kirgudu_refs/engine.rb
171
182
  - lib/kirgudu_refs/version.rb
@@ -203,6 +214,7 @@ files:
203
214
  - test/dummy/script/rails
204
215
  - test/fixtures/kirgudu_refs/finances/banks.yml
205
216
  - test/fixtures/kirgudu_refs/globe/cities.yml
217
+ - test/fixtures/kirgudu_refs/globe/continents.yml
206
218
  - test/fixtures/kirgudu_refs/globe/countries.yml
207
219
  - test/fixtures/kirgudu_refs/globe/regions.yml
208
220
  - test/fixtures/kirgudu_refs/globe/states.yml
@@ -220,6 +232,7 @@ files:
220
232
  - test/integration/navigation_test.rb
221
233
  - test/kirgudu_refs_test.rb
222
234
  - test/models/kirgudu_refs/finances/bank_test.rb
235
+ - test/models/kirgudu_refs/globe/continent_test.rb
223
236
  - test/models/kirgudu_refs/it/top_level_domain_test.rb
224
237
  - test/test_helper.rb
225
238
  - test/unit/kirgudu_refs/globe/city_test.rb
@@ -255,7 +268,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
255
268
  version: '0'
256
269
  requirements: []
257
270
  rubyforge_project:
258
- rubygems_version: 2.2.0
271
+ rubygems_version: 2.2.2
259
272
  signing_key:
260
273
  specification_version: 4
261
274
  summary: References for Kirgudu.NET Apps
@@ -293,6 +306,7 @@ test_files:
293
306
  - test/dummy/script/rails
294
307
  - test/fixtures/kirgudu_refs/finances/banks.yml
295
308
  - test/fixtures/kirgudu_refs/globe/cities.yml
309
+ - test/fixtures/kirgudu_refs/globe/continents.yml
296
310
  - test/fixtures/kirgudu_refs/globe/countries.yml
297
311
  - test/fixtures/kirgudu_refs/globe/regions.yml
298
312
  - test/fixtures/kirgudu_refs/globe/states.yml
@@ -310,6 +324,7 @@ test_files:
310
324
  - test/integration/navigation_test.rb
311
325
  - test/kirgudu_refs_test.rb
312
326
  - test/models/kirgudu_refs/finances/bank_test.rb
327
+ - test/models/kirgudu_refs/globe/continent_test.rb
313
328
  - test/models/kirgudu_refs/it/top_level_domain_test.rb
314
329
  - test/test_helper.rb
315
330
  - test/unit/kirgudu_refs/globe/city_test.rb