zombie_battleground-api 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2acaf3416a0f31d86fcff302d3379ed5884176681dcc15e76a98ce5a3747ba42
4
- data.tar.gz: f766298c75216df689c2e46f8ec573de5969637d620da1391128f9d3c20ce4ce
3
+ metadata.gz: 3f9ccf27c8858a8d641228a4560dc535c472648f8db49de60960f4602a84095b
4
+ data.tar.gz: 773501da406f8b018652e04b5373a4318aeecd583dc6012bb664b0cbe6b3dc2d
5
5
  SHA512:
6
- metadata.gz: 611408f4ef29cc8c24ac1c905242361cd9675549d0a8a7606560cb204e689117fd4cd42aae0d04abc9b40abb25d6cbe3c82c2e9924e277fa69a1f7a4c6fef201
7
- data.tar.gz: 68d8e0552e801dfc97d8490d08dc50b9832c92596a2f43ed35ab36b8fce1aa22766b57b090f46fd0fba81ae39a121b657587f5df5dd025e572205e1f4e98bddd
6
+ metadata.gz: c47bdffaee27fedb0e0fb92fb4ddc3d09eb5e8c5200f520051df14ecf2764871e41d178744401472be5475b3bc0fbdd12f765ed396dcaabd2f7e945992be8b78
7
+ data.tar.gz: 2cd08e78cfa81240172b0fe2eb380ba5d5f7788913146b821a5a7bbe9cbf03c45529523147acdbfe1a583f08543829e02064c63cd3e4b31956412b3cf53e6459
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- zombie_battleground-api (0.7.0)
4
+ zombie_battleground-api (0.7.1)
5
5
  activerecord
6
6
  faraday
7
7
  json
data/README.md CHANGED
@@ -26,7 +26,7 @@ Or install it yourself as:
26
26
 
27
27
  ## Usage
28
28
 
29
- See the [API documentation](https://www.rubydoc.info/gems/zombie_battleground-api/0.7.0).
29
+ See the [API documentation](https://www.rubydoc.info/gems/zombie_battleground-api/0.7.1).
30
30
  Every API call returns a response object that contains a complete modeled Ruby object of the response.
31
31
 
32
32
  Use the singleton class `ZombieBattleground::Api`. The singleton has additional extentions, the client implements the public API as is.
@@ -64,12 +64,9 @@ module ZombieBattleground
64
64
  #
65
65
  # @api public
66
66
  def recently_created_matches(limit)
67
- # the `.sort` calls are dodging coverage?...
68
- # :nocov:
69
67
  all_matches.to_a
70
68
  .sort { |a, b| b.created_at <=> a.created_at }
71
69
  .first(limit)
72
- # :nocov:
73
70
  end
74
71
 
75
72
  ##
@@ -85,12 +82,9 @@ module ZombieBattleground
85
82
  #
86
83
  # @api public
87
84
  def recently_updated_matches(limit)
88
- # the `.sort` calls are dodging coverage?...
89
- # :nocov:
90
85
  all_matches.to_a
91
86
  .sort { |a, b| b.updated_at <=> a.updated_at }
92
87
  .first(limit)
93
- # :nocov:
94
88
  end
95
89
 
96
90
  ##
@@ -106,13 +100,10 @@ module ZombieBattleground
106
100
  #
107
101
  # @api public
108
102
  def recently_ended_matches(limit)
109
- # the `.sort` calls are dodging coverage?...
110
- # :nocov:
111
103
  all_matches.to_a
112
104
  .select { |match| match.status == 'Ended' }
113
- .sort { |a, b| b.ended_at <=> a.ended_at }
105
+ .sort { |a, b| b.updated_at <=> a.updated_at }
114
106
  .first(limit)
115
- # :nocov:
116
107
  end
117
108
 
118
109
  ##
@@ -128,14 +119,11 @@ module ZombieBattleground
128
119
  #
129
120
  # @api public
130
121
  def matches_for_player(player_id)
131
- # the `.sort` calls are dodging coverage?...
132
- # :nocov:
133
122
  all_matches(player1_id: player_id)
134
123
  .to_a
135
124
  .push(*all_matches(player2_id: player_id).to_a)
136
125
  .uniq(&:id)
137
126
  .sort { |a, b| b.created_at <=> a.created_at }
138
- # :nocov:
139
127
  end
140
128
  end
141
129
  end
@@ -6,6 +6,6 @@ module ZombieBattleground
6
6
  class Api
7
7
  ##
8
8
  # Verion of the Gem
9
- VERSION = '0.7.0'
9
+ VERSION = '0.7.1'
10
10
  end
11
11
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zombie_battleground-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Shields