cinebase 1.0.1 → 1.1.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 +4 -4
- data/CHANGELOG.md +13 -0
- data/lib/cinebase/cinema.rb +35 -11
- data/lib/cinebase/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9dbe72822b7cee3c4292fe85bdaaa744feba6756
|
4
|
+
data.tar.gz: b52d2d5b0edca3fef29bd85f433b9ed083381eda
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e7b96aa999eccdcd38dab5b3349659989c898d694181ead54288d77ef82a45f7eadef85c8ef4a808a9fce5571c290ae18bb2fc3c3da1a7715dfbf82277484d9a
|
7
|
+
data.tar.gz: f5ac98bfde0881ecf4afa852694a79ec68d8d18f86cf7549da379d71b4887e45d1bd30e634ae744b82da9c9e356c113bb882d87b594d7f39472fec9463a29e95
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,19 @@
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
4
4
|
|
5
|
+
## [1.1.0]
|
6
|
+
### Changed
|
7
|
+
- It is expected that the `Cinema#adr` method is redefined on the subclass and
|
8
|
+
thus auto-populates the following added methods...
|
9
|
+
|
10
|
+
### Added
|
11
|
+
- Method `Cinema#street_address` to pull String from `Cinema#adr`
|
12
|
+
- Method `Cinema#extended_address` to pull String from `Cinema#adr`
|
13
|
+
- Method `Cinema#locality` to pull String from `Cinema#adr`
|
14
|
+
- Method `Cinema#region` to pull String from `Cinema#adr`
|
15
|
+
- Method `Cinema#postal_code` to pull String from `Cinema#adr`
|
16
|
+
- Method `Cinema#country_name` to pull String from `Cinema#adr`
|
17
|
+
|
5
18
|
## [1.0.1]
|
6
19
|
### Fixed
|
7
20
|
- Implementation of TitleSanitizer no longer creates anonymous `Struct`
|
data/lib/cinebase/cinema.rb
CHANGED
@@ -13,28 +13,52 @@ module Cinebase
|
|
13
13
|
|
14
14
|
def adr
|
15
15
|
{
|
16
|
-
street_address:
|
17
|
-
extended_address:
|
18
|
-
locality:
|
19
|
-
|
20
|
-
|
21
|
-
|
16
|
+
street_address: nil,
|
17
|
+
extended_address: nil,
|
18
|
+
locality: nil,
|
19
|
+
region: nil,
|
20
|
+
postal_code: nil,
|
21
|
+
country_name: nil
|
22
|
+
}
|
22
23
|
end
|
23
24
|
alias_method :address, :adr
|
24
25
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
26
|
+
def country_name
|
27
|
+
adr[:country_name].to_s
|
28
|
+
end
|
29
|
+
|
30
|
+
def extended_address
|
31
|
+
adr[:extended_address].to_s
|
30
32
|
end
|
31
33
|
|
32
34
|
def full_name
|
33
35
|
@full_name ||= "#{brand} #{name}"
|
34
36
|
end
|
35
37
|
|
38
|
+
def locality
|
39
|
+
adr[:locality].to_s
|
40
|
+
end
|
41
|
+
|
42
|
+
def postal_code
|
43
|
+
adr[:postal_code].to_s
|
44
|
+
end
|
45
|
+
|
46
|
+
def region
|
47
|
+
adr[:region].to_s
|
48
|
+
end
|
49
|
+
|
36
50
|
def slug
|
37
51
|
@slug ||= full_name.downcase.gsub(/[^0-9a-z ]/, '').gsub(/\s+/, '-')
|
38
52
|
end
|
53
|
+
|
54
|
+
def street_address
|
55
|
+
adr[:street_address].to_s
|
56
|
+
end
|
57
|
+
|
58
|
+
%i(brand name url).each do |method|
|
59
|
+
define_method(method) do
|
60
|
+
fail NotImplementedError, "This #{self.class} cannot respond to: "
|
61
|
+
end
|
62
|
+
end
|
39
63
|
end
|
40
64
|
end
|
data/lib/cinebase/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cinebase
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Croll
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01-
|
11
|
+
date: 2016-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -110,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
110
110
|
version: '0'
|
111
111
|
requirements: []
|
112
112
|
rubyforge_project:
|
113
|
-
rubygems_version: 2.5
|
113
|
+
rubygems_version: 2.4.5
|
114
114
|
signing_key:
|
115
115
|
specification_version: 4
|
116
116
|
summary: A base for cinema parsers to maintain a regular interface.
|