wes-data-api 2.3.0 → 3.0.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/wes/data/api/challenge.rb +21 -26
- data/lib/wes/data/api/version.rb +1 -1
- 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: 5d3b20444adc11e30733f69977781989efd9c706
|
|
4
|
+
data.tar.gz: d07c857738028ab4b9cffdc663a2f79a3ffdcd7f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: abe0002159e76a935cbae98197ff38a7bd7596affebcb66b9436e3893791bc23e87f847cd50ba467ed19d8386b7ac10d977c32ba1784641462b527fc01318912
|
|
7
|
+
data.tar.gz: 6f3ae4d07ad6dc5a0339d12771ad408bfab4475e0eef58417e5d14476b0f5543054ee1f4eaf220406e68a684b319612268d2bfcfbab07b3900a9df77e9777dac
|
|
@@ -5,28 +5,29 @@ module Wes
|
|
|
5
5
|
module Data
|
|
6
6
|
module API
|
|
7
7
|
class Challenge
|
|
8
|
-
|
|
9
|
-
@id = id
|
|
10
|
-
end
|
|
8
|
+
attr_reader :attributes
|
|
11
9
|
|
|
12
|
-
def
|
|
13
|
-
|
|
10
|
+
def initialize(attributes)
|
|
11
|
+
@attributes = attributes
|
|
14
12
|
end
|
|
15
13
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
class << self
|
|
15
|
+
def client
|
|
16
|
+
Client.new
|
|
17
|
+
end
|
|
19
18
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
def configuration
|
|
20
|
+
Configuration
|
|
21
|
+
end
|
|
23
22
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
def find(id)
|
|
24
|
+
attributes = client.get("#{routes.challenge}/#{id}").first
|
|
25
|
+
new(attributes)
|
|
26
|
+
end
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
def routes
|
|
29
|
+
configuration.routes
|
|
30
|
+
end
|
|
30
31
|
end
|
|
31
32
|
|
|
32
33
|
def all
|
|
@@ -41,10 +42,6 @@ module Wes
|
|
|
41
42
|
client.get "#{routes.challenges}/drafts"
|
|
42
43
|
end
|
|
43
44
|
|
|
44
|
-
def find(id)
|
|
45
|
-
client.get("#{routes.challenge}/#{id}").first
|
|
46
|
-
end
|
|
47
|
-
|
|
48
45
|
def open
|
|
49
46
|
client.get "#{routes.challenges}/open"
|
|
50
47
|
end
|
|
@@ -56,18 +53,16 @@ module Wes
|
|
|
56
53
|
|
|
57
54
|
private
|
|
58
55
|
|
|
59
|
-
attr_reader :id
|
|
60
|
-
|
|
61
56
|
def client
|
|
62
|
-
|
|
57
|
+
self.class.client
|
|
63
58
|
end
|
|
64
59
|
|
|
65
|
-
def
|
|
66
|
-
|
|
60
|
+
def id
|
|
61
|
+
attributes.id
|
|
67
62
|
end
|
|
68
63
|
|
|
69
64
|
def routes
|
|
70
|
-
|
|
65
|
+
self.class.routes
|
|
71
66
|
end
|
|
72
67
|
end
|
|
73
68
|
end
|
data/lib/wes/data/api/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: wes-data-api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 3.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ''
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-04-
|
|
11
|
+
date: 2016-04-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|