wcc-data 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 +4 -4
- data/lib/wcc/data/nucleus/campus.rb +15 -5
- data/lib/wcc/data/version.rb +1 -1
- data/spec/wcc/data/nucleus/campus_spec.rb +19 -15
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de49f3e6cc7c8a7fa683659f77a77937fb06056f
|
4
|
+
data.tar.gz: 6114a2ecf6df061a1f3d8872564ee040c014c89d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae688de645b149f2f823dc4f27dbc29eb530ecd79786962fd00ef8dd2936941d7d55178b71161145135672bb2b6fa8bd113db1613c786a362c501e6ed103f406
|
7
|
+
data.tar.gz: 72e1bd40dd55541460679cf6af7a767f22662246dd615c8f6e1a487ce8da20860f2de05690dcf48399ebb587842232bf3cf1ddbe4b49232e7c316ceb61856a6b
|
@@ -1,5 +1,6 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
|
+
module WCC::Data::Nucleus
|
3
4
|
class Campus < WCC::Data::EnumeratedType
|
4
5
|
attributes :id, :name, :key
|
5
6
|
attributes :street, :city, :state, :zip, :geo
|
@@ -18,7 +19,7 @@ module WCC::Data::Nucleus
|
|
18
19
|
city: 'Dallas',
|
19
20
|
state: 'TX',
|
20
21
|
zip: '75251',
|
21
|
-
geo: [32.922923, -96.7781638]
|
22
|
+
geo: [32.922923, -96.7781638]
|
22
23
|
},
|
23
24
|
{
|
24
25
|
id: 2,
|
@@ -28,7 +29,7 @@ module WCC::Data::Nucleus
|
|
28
29
|
city: 'Fort Worth',
|
29
30
|
state: 'TX',
|
30
31
|
zip: '76116',
|
31
|
-
geo: [32.7280064, -97.4146727]
|
32
|
+
geo: [32.7280064, -97.4146727]
|
32
33
|
},
|
33
34
|
{
|
34
35
|
id: 3,
|
@@ -38,10 +39,19 @@ module WCC::Data::Nucleus
|
|
38
39
|
city: 'Plano',
|
39
40
|
state: 'TX',
|
40
41
|
zip: '75074',
|
41
|
-
geo: [33.060823, -96.688902]
|
42
|
+
geo: [33.060823, -96.688902]
|
42
43
|
},
|
44
|
+
{
|
45
|
+
id: 4,
|
46
|
+
name: 'Frisco',
|
47
|
+
key: :frisco,
|
48
|
+
street: '6401 Parkwood Blvd',
|
49
|
+
city: 'Frisco',
|
50
|
+
state: 'TX',
|
51
|
+
zip: '75034',
|
52
|
+
geo: [33.130761, -96.822322]
|
53
|
+
}
|
43
54
|
]
|
44
55
|
end
|
45
56
|
end
|
46
|
-
|
47
57
|
end
|
data/lib/wcc/data/version.rb
CHANGED
@@ -1,29 +1,33 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe WCC::Data::Nucleus::Campus do
|
4
|
-
it
|
4
|
+
it 'inherits EnumeratedType functionality' do
|
5
5
|
expect(described_class.ancestors).to include(WCC::Data::EnumeratedType)
|
6
6
|
end
|
7
7
|
|
8
|
-
context
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
expect(
|
13
|
-
expect(dallas.name).to eq("Dallas")
|
8
|
+
context 'with defined data' do
|
9
|
+
it 'defines Dallas campus' do
|
10
|
+
campus = described_class[:dallas]
|
11
|
+
expect(campus).to be_a(described_class)
|
12
|
+
expect(campus.name).to eq('Dallas')
|
14
13
|
end
|
15
14
|
|
16
|
-
it
|
17
|
-
|
18
|
-
expect(
|
19
|
-
expect(
|
15
|
+
it 'defines Fort Worth campus' do
|
16
|
+
campus = described_class[:ft_worth]
|
17
|
+
expect(campus).to be_a(described_class)
|
18
|
+
expect(campus.name).to eq('Fort Worth')
|
20
19
|
end
|
21
20
|
|
22
|
-
it
|
23
|
-
|
24
|
-
expect(
|
25
|
-
expect(
|
21
|
+
it 'defines Plano campus' do
|
22
|
+
campus = described_class[:plano]
|
23
|
+
expect(campus).to be_a(described_class)
|
24
|
+
expect(campus.name).to eq('Plano')
|
26
25
|
end
|
27
26
|
|
27
|
+
it 'defines Frisco campus' do
|
28
|
+
campus = described_class[:frisco]
|
29
|
+
expect(campus).to be_a(described_class)
|
30
|
+
expect(campus.name).to eq('Frisco')
|
31
|
+
end
|
28
32
|
end
|
29
33
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wcc-data
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Watermark Dev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-02-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|