team_api 0.0.12 → 0.0.13

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
  SHA1:
3
- metadata.gz: f31b401ffc417fa83d0ee449df251344d5a335ad
4
- data.tar.gz: fa3955bd6883d49800ec50d351e778d41766a65d
3
+ metadata.gz: e322bcf970cf88c206804d6417208e55bbd7b34a
4
+ data.tar.gz: e62207aeac14d269bb8088c6837622b5e93a614b
5
5
  SHA512:
6
- metadata.gz: 0154afdd77ec5af1a0aafef5109aa1fa5b618828842023f678166af63fce7d9e1225cea371a4b4b34853249ff28967ca5c49268fcf5062f919dfff3cf150ec95
7
- data.tar.gz: a032bcbcdd2b2682aeb4107779084377ead02f3641751155ae906f04fe13d14add0957134b5f6efa6b391259ee1616e14e154c9241dddc04e54e73e96cc37ef5
6
+ metadata.gz: 39c5a770c4c17de846533d36aeb6433f0e6139df6223798c2173ea46925ad03382386528028e673a1753b76619d8f4c6e0b428858f0045307787a2830a1ceacc
7
+ data.tar.gz: 2fec59db2191cd3513ddc63fa416c6127cb3349183661745af2e321365b7ddf0865bbada97e8e1496805e1c006522142670a6773f1a7733a85c015ff72186c90
@@ -34,11 +34,20 @@ module TeamApi
34
34
  end
35
35
 
36
36
  def generate_schema_endpoint(schema_file_location)
37
- return if schema_file_location.nil? || schema_file_location.empty?
38
- file = File.read schema_file_location
39
- items = JSON.parse file
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
- 'Schema used to parse .about.yml files',
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
+ }
@@ -72,7 +72,7 @@
72
72
  "type": "string"
73
73
  },
74
74
  "uniqueItems": true
75
- },
75
+ }
76
76
  },
77
77
  "required": [
78
78
  "name",
@@ -1,5 +1,5 @@
1
1
  # @author Mike Bland (michael.bland@gsa.gov)
2
2
 
3
3
  module TeamApi
4
- VERSION = '0.0.12'
4
+ VERSION = '0.0.13'
5
5
  end
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.12
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-02-11 00:00:00.000000000 Z
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