twenty_sixteen 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/twenty_sixteen/candidates.json +4 -4
- data/lib/twenty_sixteen/version.rb +1 -1
- data/spec/candidate_spec.rb +11 -5
- 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: 96eb2953c125670f35b44d947fae99ac96fbfec1
|
4
|
+
data.tar.gz: 6709b814eede5cf48e71bdf0ddf6e901f7dd14d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e7872467ab06c4acee7efc861c0a66a2e7035374d280302bf43f74ad4bfd67a998433cf29551ee07520d5d370b9a466f38bff0c9b6781ce801b55e6f9c94f1d0
|
7
|
+
data.tar.gz: ce1c2b9ba7ec012242c4574066c7f938e906917aebbf2f20986d288c511223a603b40b829aad94c7676056d44df1b94386a3ef5ea5b2da05d99c0d745ff31be0
|
@@ -1,11 +1,11 @@
|
|
1
1
|
[
|
2
2
|
{
|
3
|
-
"party":"
|
3
|
+
"party":"Democrat",
|
4
4
|
"first_name":"Jim",
|
5
5
|
"last_name":"Webb",
|
6
6
|
"url":"http://www.webb2016.com/",
|
7
7
|
"campaign_name":null,
|
8
|
-
"campaign_status":"
|
8
|
+
"campaign_status":"inactive",
|
9
9
|
"slogans":["Leadership You Can Trust"],
|
10
10
|
"social_urls":[
|
11
11
|
"http://www.facebook.com/IHeardMyCountryCalling",
|
@@ -149,7 +149,7 @@
|
|
149
149
|
"last_name":"Bush",
|
150
150
|
"url":"https://jeb2016.com",
|
151
151
|
"campaign_name":"Jeb 2016",
|
152
|
-
"campaign_status":"
|
152
|
+
"campaign_status":"inactive",
|
153
153
|
"slogans":[],
|
154
154
|
"social_urls":[
|
155
155
|
"https://twitter.com/JebBush",
|
@@ -253,7 +253,7 @@
|
|
253
253
|
"last_name":"Carson",
|
254
254
|
"url":"https://www.bencarson.com/",
|
255
255
|
"campaign_name":"Carson America",
|
256
|
-
"campaign_status":"
|
256
|
+
"campaign_status":"inactive",
|
257
257
|
"slogans":["Heal, Inspire, Revive"],
|
258
258
|
"social_urls":[
|
259
259
|
"https://www.facebook.com/realbencarson/",
|
data/spec/candidate_spec.rb
CHANGED
@@ -39,16 +39,22 @@ module TwentySixteen
|
|
39
39
|
describe '.independent' do
|
40
40
|
it "returns an array of matching candidates, indies only" do
|
41
41
|
indies = TwentySixteen::Candidate.independent
|
42
|
-
expect(indies).to
|
43
|
-
expect(indies).not_to be_empty
|
44
|
-
expect(indies.first).to be_kind_of(Hash)
|
42
|
+
expect(indies).to be_empty
|
45
43
|
end
|
46
44
|
end
|
47
45
|
|
48
46
|
describe '.active' do
|
49
47
|
it "returns an array of candidates having a campaign_status of 'active'" do
|
50
|
-
expect(active_dems.map{|c| c[:last_name]}.sort).to eql([
|
51
|
-
|
48
|
+
expect(active_dems.map{|c| c[:last_name]}.sort).to eql([
|
49
|
+
"Clinton",
|
50
|
+
"Sanders"
|
51
|
+
])
|
52
|
+
expect(active_gops.map{|c| c[:last_name]}.sort).to eql([
|
53
|
+
"Cruz",
|
54
|
+
"Kasich",
|
55
|
+
"Rubio",
|
56
|
+
"Trump"
|
57
|
+
])
|
52
58
|
end
|
53
59
|
end
|
54
60
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twenty_sixteen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- MJ Rossetti (@s2t2)
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|