ine-places 0.2.0 → 0.3.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: a9c40a5b8a452e7d8b6787ad5d51b02335d96a12
4
- data.tar.gz: ad0e0a42a637c259cd44d4d12c9c1271f8d5c69d
2
+ SHA256:
3
+ metadata.gz: 077ed4cb612c43e1d63ac6cce051283a17227ab8c28aff8704c404215c3a50d2
4
+ data.tar.gz: 87026a11a94039765c8e90014f613f91ef38190417c89c0fea640370bd90cee2
5
5
  SHA512:
6
- metadata.gz: e1dae82ef5d18dc59dc04293dc73de027ee682f852ec94e50a6e4f4be360224ac3659d10cd1d38a3f7bd082b7f31a9b85775b19223ab73ed6b4279cad4e62b3c
7
- data.tar.gz: 066eb9c4b82d30f78747fd0f2cb2bbf5936206c3bb235ae62ded220d193eb4eaa39fb81afae65b58d49471def3390233f2edf50d523d3efa95de06b2724e1f6b
6
+ metadata.gz: 287f655061eb8a40b18f13410fb66376df2c474b48cf52f089a3cfd8ae2bf6148ff27d6f268a5af058c5a4738f210f263bfe0dbb6ff3e2a8491bff9c4ad847fe
7
+ data.tar.gz: 662d3e5e0e80a03ddb9d20400ac01ffa2a03be063df7e1a2a7a257c23ae38fec331345dc5eda2fd435a614dc86fd95d7249a8607657e6d82089bf0b9f7f26830
data/ine-places.gemspec CHANGED
@@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
30
30
  spec.add_runtime_dependency "activesupport", ">= 4.2"
31
31
 
32
32
  spec.add_development_dependency "bundler", "~> 1.12"
33
- spec.add_development_dependency "rake", "~> 11.1"
33
+ spec.add_development_dependency "rake", "~> 12.3"
34
34
  spec.add_development_dependency "rspec", "~> 3.4"
35
- spec.add_development_dependency "byebug", '~> 9.0', '>= 9.0.5'
35
+ spec.add_development_dependency "byebug", '~> 10.0', '>= 9.0.5'
36
36
  end
@@ -5,6 +5,14 @@ class INE::Places::AutonomousRegion < OpenStruct
5
5
  INE::Places::Province.find_all_by_autonomous_region_id(self.id)
6
6
  end
7
7
 
8
+ def name(locale = nil)
9
+ if locale == :ca
10
+ self['name_ca']
11
+ else
12
+ self['name']
13
+ end
14
+ end
15
+
8
16
  private
9
17
 
10
18
  def self.collection_klass
@@ -10,7 +10,7 @@ class INE::Places::AutonomousRegionsCollection
10
10
  def self.build_from_raw_data(raw_data)
11
11
  INE::Places::AutonomousRegion.new({
12
12
  id: raw_data[0], name: raw_data[1], slug: raw_data[2],
13
- lon: raw_data[3], lat: raw_data[4]
13
+ lon: raw_data[3], lat: raw_data[4], name_ca: raw_data[5]
14
14
  })
15
15
  end
16
16
  private_class_method :build_from_raw_data
@@ -1,20 +1,20 @@
1
- codigo autonomia,nombre,slug,lon,lat
2
- 1,Andalucía,andalucia,-4.7277528,37.5442706
3
- 2,Aragón,aragon,-0.9056623,41.5976275
4
- 3,Principado de Asturias,asturias,-5.8593267,43.3613953
5
- 4,Baleares,baleares,2.8577105,39.5341789
6
- 5,Canarias,canarias,-16.6291304,28.2915637
7
- 6,Cantabria,cantabria,-3.9878427,43.1828396
8
- 7,Castilla y León,castilla-leon,-4.397635699999999,41.83568210000001
9
- 8,Castilla-La Mancha,castilla-la-mancha,-3.097702,39.2795607
10
- 9,Cataluña,catalunya,1.5208624,41.5911589
11
- 10,Comunidad Valenciana,comunidad-valenciana,-0.7532808999999999,39.4840108
12
- 11,Extremadura,extremadura,-6.0679194,39.4937392
13
- 12,Galicia,galicia,-8.1338558,42.5750554
14
- 13,Comunidad de Madrid,madrid,-3.7038322,40.4167515
15
- 14,Región de Murcia,murcia,-1.366216,38.1398141
16
- 15,Comunidad Foral de Navarra,navarra,-1.6760691,42.6953909
17
- 16,País Vasco,pais-vasco,-2.6189273,42.9896248
18
- 17,La Rioja,la-rioja,-2.539603,42.2870733
19
- 18,Ceuta,ceuta,-5.3213455,35.8893874
20
- 19,Melilla,melilla,-2.9380973,35.2922775
1
+ codigo autonomia,nombre,slug,lon,lat,nombre_ca
2
+ 1,Andalucía,andalucia,-4.7277528,37.5442706,Andalucia
3
+ 2,Aragón,aragon,-0.9056623,41.5976275,Aragó
4
+ 3,Principado de Asturias,asturias,-5.8593267,43.3613953,Principat D'Astúries
5
+ 4,Baleares,baleares,2.8577105,39.5341789,Balears
6
+ 5,Canarias,canarias,-16.6291304,28.2915637,Canaries
7
+ 6,Cantabria,cantabria,-3.9878427,43.1828396,Cantabria
8
+ 7,Castilla y León,castilla-leon,-4.397635699999999,41.83568210000001,Castilla i Lleó
9
+ 8,Castilla-La Mancha,castilla-la-mancha,-3.097702,39.2795607,Castilla-La Mancha,
10
+ 9,Cataluña,catalunya,1.5208624,41.5911589,Catalunya
11
+ 10,Comunidad Valenciana,comunidad-valenciana,-0.7532808999999999,39.4840108,Comunitat Valenciana
12
+ 11,Extremadura,extremadura,-6.0679194,39.4937392,Extremadura
13
+ 12,Galicia,galicia,-8.1338558,42.5750554,Galícia
14
+ 13,Comunidad de Madrid,madrid,-3.7038322,40.4167515,Comunitat de Madrid
15
+ 14,Región de Murcia,murcia,-1.366216,38.1398141,Regió de Múrcia
16
+ 15,Comunidad Foral de Navarra,navarra,-1.6760691,42.6953909,Navarra
17
+ 16,País Vasco,pais-vasco,-2.6189273,42.9896248,Pais Vasc
18
+ 17,La Rioja,la-rioja,-2.539603,42.2870733,La Rioja
19
+ 18,Ceuta,ceuta,-5.3213455,35.8893874,Ceuta
20
+ 19,Melilla,melilla,-2.9380973,35.2922775,Melilla
@@ -1,5 +1,5 @@
1
1
  module INE
2
2
  module Places
3
- VERSION = "0.2.0"
3
+ VERSION = "0.3.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ine-places
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fernando Blat
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-05-26 00:00:00.000000000 Z
11
+ date: 2018-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '11.1'
47
+ version: '12.3'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '11.1'
54
+ version: '12.3'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -72,7 +72,7 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '9.0'
75
+ version: '10.0'
76
76
  - - ">="
77
77
  - !ruby/object:Gem::Version
78
78
  version: 9.0.5
@@ -82,7 +82,7 @@ dependencies:
82
82
  requirements:
83
83
  - - "~>"
84
84
  - !ruby/object:Gem::Version
85
- version: '9.0'
85
+ version: '10.0'
86
86
  - - ">="
87
87
  - !ruby/object:Gem::Version
88
88
  version: 9.0.5
@@ -137,7 +137,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
137
137
  version: '0'
138
138
  requirements: []
139
139
  rubyforge_project:
140
- rubygems_version: 2.6.11
140
+ rubygems_version: 2.7.6
141
141
  signing_key:
142
142
  specification_version: 4
143
143
  summary: An easy way to work with Spanish regions in Ruby