team_api 0.0.12 → 0.0.13
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/team_api/api_impl.rb +20 -4
- data/lib/team_api/snippet_schema.json +37 -0
- data/lib/team_api/team_member_schema.json +1 -1
- data/lib/team_api/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e322bcf970cf88c206804d6417208e55bbd7b34a
|
4
|
+
data.tar.gz: e62207aeac14d269bb8088c6837622b5e93a614b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 39c5a770c4c17de846533d36aeb6433f0e6139df6223798c2173ea46925ad03382386528028e673a1753b76619d8f4c6e0b428858f0045307787a2830a1ceacc
|
7
|
+
data.tar.gz: 2fec59db2191cd3513ddc63fa416c6127cb3349183661745af2e321365b7ddf0865bbada97e8e1496805e1c006522142670a6773f1a7733a85c015ff72186c90
|
data/lib/team_api/api_impl.rb
CHANGED
@@ -34,11 +34,20 @@ module TeamApi
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def generate_schema_endpoint(schema_file_location)
|
37
|
-
|
38
|
-
|
39
|
-
|
37
|
+
items = {}
|
38
|
+
unless schema_file_location.nil? || schema_file_location.empty?
|
39
|
+
about_yml_schema_file = File.read schema_file_location
|
40
|
+
items = items.merge({ 'about_yml' => JSON.parse(about_yml_schema_file) })
|
41
|
+
end
|
42
|
+
|
43
|
+
local_schema_files.each do |filename|
|
44
|
+
file = File.join File.dirname(__FILE__), filename
|
45
|
+
schema = JSON.parse(File.read(file))
|
46
|
+
items = items.merge schema
|
47
|
+
end
|
48
|
+
|
40
49
|
generate_index_endpoint('schemas', 'Schemas',
|
41
|
-
'
|
50
|
+
'Schemas used to parse .about.yml and team member .yml files',
|
42
51
|
items)
|
43
52
|
end
|
44
53
|
|
@@ -65,6 +74,13 @@ module TeamApi
|
|
65
74
|
end
|
66
75
|
end
|
67
76
|
|
77
|
+
def local_schema_files
|
78
|
+
%w(
|
79
|
+
snippet_schema.json
|
80
|
+
team_member_schema.json
|
81
|
+
)
|
82
|
+
end
|
83
|
+
|
68
84
|
def generate_snippets_endpoints
|
69
85
|
generate_latest_snippet_endpoint
|
70
86
|
generate_snippets_by_date_endpoints
|
@@ -0,0 +1,37 @@
|
|
1
|
+
{
|
2
|
+
"snippet": {
|
3
|
+
"title": "snippet files",
|
4
|
+
"description": "Guild metadata",
|
5
|
+
"$schema": "http://json-schema.org/draft-04/hyper-schema",
|
6
|
+
"type": "array",
|
7
|
+
"items": {
|
8
|
+
"type": "object",
|
9
|
+
"properties": {
|
10
|
+
"timestamp": {
|
11
|
+
"type": "string",
|
12
|
+
"description": "Timestamp of snippet"
|
13
|
+
},
|
14
|
+
"username": {
|
15
|
+
"type": "string",
|
16
|
+
"description": "Email address of user who created snippet"
|
17
|
+
},
|
18
|
+
"full_name": {
|
19
|
+
"type": "string",
|
20
|
+
"description": "Full name of user who created snippet"
|
21
|
+
},
|
22
|
+
"last-week": {
|
23
|
+
"type": "string",
|
24
|
+
"description": "Full text of snippet"
|
25
|
+
},
|
26
|
+
"markdown": {
|
27
|
+
"type": "boolean",
|
28
|
+
"description": "Indicates whether text is formatted in Markdown"
|
29
|
+
},
|
30
|
+
"public": {
|
31
|
+
"type": "boolean",
|
32
|
+
"description": "Indicates whether snipped is public"
|
33
|
+
}
|
34
|
+
}
|
35
|
+
}
|
36
|
+
}
|
37
|
+
}
|
data/lib/team_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: team_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Bland
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-
|
13
|
+
date: 2016-03-15 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|
@@ -225,6 +225,7 @@ files:
|
|
225
225
|
- lib/team_api/index_page.rb
|
226
226
|
- lib/team_api/joiner.rb
|
227
227
|
- lib/team_api/name_canonicalizer.rb
|
228
|
+
- lib/team_api/snippet_schema.json
|
228
229
|
- lib/team_api/snippets.rb
|
229
230
|
- lib/team_api/tag_canonicalizer.rb
|
230
231
|
- lib/team_api/tag_categories.yml
|
@@ -250,7 +251,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
250
251
|
version: '0'
|
251
252
|
requirements: []
|
252
253
|
rubyforge_project:
|
253
|
-
rubygems_version: 2.5.1
|
254
|
+
rubygems_version: 2.4.5.1
|
254
255
|
signing_key:
|
255
256
|
specification_version: 4
|
256
257
|
summary: Compiles team information and publishes it as a JSON API
|