rspec-usecases 0.0.12 → 0.0.37

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/main.yml +2 -0
  3. data/.gitignore +5 -0
  4. data/.rubocop.yml +7 -0
  5. data/Gemfile +19 -10
  6. data/Guardfile +1 -0
  7. data/STORIES.md +25 -4
  8. data/bin/console +1 -1
  9. data/docs/regexp-01.md +56 -0
  10. data/docs/samples.md +62 -0
  11. data/docs/test.debug.txt +93 -0
  12. data/docs/test.json +172 -0
  13. data/docs/test.md +39 -0
  14. data/lib/rspec/usecases.rb +20 -4
  15. data/lib/rspec/usecases/configure.rb +40 -0
  16. data/lib/rspec/usecases/contents/base_content.rb +145 -0
  17. data/lib/rspec/usecases/contents/code.rb +33 -0
  18. data/lib/rspec/usecases/contents/outcome.rb +27 -0
  19. data/lib/rspec/usecases/document.rb +173 -0
  20. data/lib/rspec/usecases/documentor.rb +35 -0
  21. data/lib/rspec/usecases/generator/base_generator.rb +58 -0
  22. data/lib/rspec/usecases/generator/debug_generator.rb +106 -0
  23. data/lib/rspec/usecases/generator/json_generator.rb +39 -0
  24. data/lib/rspec/usecases/generator/markdown_generator.rb +136 -0
  25. data/lib/rspec/usecases/groups/base_group.rb +116 -0
  26. data/lib/rspec/usecases/groups/group.rb +14 -0
  27. data/lib/rspec/usecases/groups/usecase.rb +30 -0
  28. data/lib/rspec/usecases/helpers/uc_file_as_markdown_content.rb +26 -0
  29. data/lib/rspec/usecases/helpers/uc_grab_lines.rb +54 -0
  30. data/lib/rspec/usecases/options/debug_options.rb +33 -0
  31. data/lib/rspec/usecases/options/document_options.rb +24 -0
  32. data/lib/rspec/usecases/options/dynamic_options.rb +102 -0
  33. data/lib/rspec/usecases/options/json_options.rb +32 -0
  34. data/lib/rspec/usecases/options/markdown_options.rb +37 -0
  35. data/lib/rspec/usecases/version.rb +1 -1
  36. data/rspec-usecases.gemspec +6 -0
  37. metadata +45 -9
  38. data/lib/rspec/usecases/content.rb +0 -155
  39. data/lib/rspec/usecases/content_code.rb +0 -42
  40. data/lib/rspec/usecases/content_outcome.rb +0 -30
  41. data/lib/rspec/usecases/usecase.rb +0 -103
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dbf5167aac3c896a46c81986794c7505fe50cad8efb7fa5b6986a962c0ca1d51
4
- data.tar.gz: d93be1d47ac05674e9eab8f7d77514064ab727d47548a9ee251591f819e44d3f
3
+ metadata.gz: 0fe106f2d54203a80a9fdf117c87cc1f904628bb9eaa0724d5f8fb32f34be56e
4
+ data.tar.gz: 81e90bf6bfe148ecb97d070f8b01e1367f37162252577cca12ba7bcef3b46835
5
5
  SHA512:
6
- metadata.gz: f7e09d32dbcd1c397d51e10f30a0f1d767682298b4d7379857b4b50698e3f205f005b74e7c21a586d28cc279953681633e17ac626832d3722462d0dee434a722
7
- data.tar.gz: 66bd3d2d1af7e388b819285bdc7b32831ba59a8adfd43b4162ac4269317abb67f7b06580fee95f2b27632df5becb29ddd56bc9362af1c182af7889b5681d9fdb
6
+ metadata.gz: be8597d40eb2151612162d9807662168ba3ff19501c61cdd4bb9e72a27aa971522e3b60bb8eacac8c2f04f6af8c09f5f566ca237c6d1487aac421273d8573314
7
+ data.tar.gz: fb25e0896e1dc643cc93de59ed3b18993cd9018b85d387616918aa6830fb685826b0cc23b488140fbd7e914d77c4b22fea4056e82c8f84cf895d4b05eace1bdb
@@ -26,6 +26,8 @@ jobs:
26
26
  gem install bundler -v 2.2.5
27
27
  bundle install
28
28
  - name: Run tests
29
+ env:
30
+ USAGE_CI: 'github_actions'
29
31
  run: bundle exec rspec
30
32
  - name: Run rubocop
31
33
  run: bundle exec rubocop
data/.gitignore CHANGED
@@ -40,8 +40,13 @@ mkmf.log
40
40
  # Gems should not use a Gemfile.lock
41
41
  Gemfile.lock
42
42
 
43
+ # RubyGem definitions
44
+ *.gem
45
+
43
46
  # rspec failure tracking
44
47
  .rspec_status
45
48
 
46
49
  # ByeBug history
47
50
  .byebug_history
51
+
52
+ generate_markdown.md
data/.rubocop.yml CHANGED
@@ -8,6 +8,7 @@ AllCops:
8
8
  NewCops: enable
9
9
  Exclude:
10
10
  - "_/**/*"
11
+ - "spec/samples/**/*"
11
12
 
12
13
  Metrics/BlockLength:
13
14
  Exclude:
@@ -45,6 +46,9 @@ Layout/LineLength:
45
46
  Lint/UnusedMethodArgument:
46
47
  AllowUnusedKeywordArguments: true
47
48
 
49
+ Style/DoubleNegation:
50
+ Enabled: false
51
+
48
52
  Style/BlockComments:
49
53
  Enabled: false
50
54
  Include:
@@ -53,6 +57,9 @@ Style/BlockComments:
53
57
  # My Preferences - Start
54
58
  Metrics/ClassLength:
55
59
  Enabled: false
60
+ Metrics/ModuleLength:
61
+ Exclude:
62
+ - "**/spec/**/*"
56
63
  Naming/MemoizedInstanceVariableName:
57
64
  Enabled: false
58
65
  Naming/VariableNumber:
data/Gemfile CHANGED
@@ -7,23 +7,32 @@ gemspec
7
7
 
8
8
  group :development do
9
9
  if ENV['RUBY_DEBUG_DEVELOPMENT']
10
- # Currently conflicts with GitHub actions and so only available when
11
- # environment varialbe is set.
12
- # On Mac:
13
- # ```export RUBY_DEBUG_DEVELOPMENT=true```
14
- gem 'jazz_fingers'
10
+ # # Currently conflicts with GitHub actions and so only available when
11
+ # # environment varialbe is set.
12
+ # # On Mac:
13
+ # # ```export RUBY_DEBUG_DEVELOPMENT=true```
14
+ # # gem 'jazz_fingers'
15
+ # # gem 'pry-coolline', github: 'owst/pry-coolline', branch: 'support_new_pry_config_api'
15
16
  gem 'pry-coolline', github: 'owst/pry-coolline', branch: 'support_new_pry_config_api'
16
17
  end
17
18
  end
18
-
19
19
  group :development, :test do
20
- gem 'guard-bundler'
21
- gem 'guard-rspec'
22
- gem 'guard-rubocop'
20
+ gem 'guard-bundler', '~> 3.0'
21
+ gem 'guard-rspec', '~> 4.0'
22
+ gem 'guard-rubocop', '~> 1.2'
23
+ gem 'jazz_fingers'
24
+ gem 'pry'
23
25
  gem 'rake', '~> 12.0'
24
26
  gem 'rake-compiler', require: false
25
27
  gem 'rspec', '~> 3.0'
26
- gem 'rubocop'
28
+
29
+ # # gem 'rspec', path: '~/dev/gems_3rd/rspec'
30
+ # gem 'rspec-core', path: '~/dev/gems_3rd/rspec-core'
31
+ # gem 'rspec-expectations', path: '~/dev/gems_3rd/rspec-expectations'
32
+ # gem 'rspec-mocks', path: '~/dev/gems_3rd/rspec-mocks'
33
+ # gem 'rspec-support', path: '~/dev/gems_3rd/rspec-support'
34
+
35
+ gem 'rubocop', '~> 1.9'
27
36
  gem 'rubocop-rake', require: false
28
37
  gem 'rubocop-rspec', require: false
29
38
  end
data/Guardfile CHANGED
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'guard/rspec/dsl'
3
4
  guard :bundler, cmd: 'bundle install' do
4
5
  watch('Gemfile')
5
6
  watch('rspec_usecases.gemspec')
data/STORIES.md CHANGED
@@ -16,12 +16,12 @@ As a Developer, I can build documentable usecases, so that I easily document usa
16
16
 
17
17
  - Build Usecase
18
18
 
19
- ### Tasks next on list
19
+ As a Developer, I can build documentation presentations, so that I can create videos quickly
20
20
 
21
- Setup RubyGems and RubyDoc
21
+ - https://revealjs.com/
22
+ - https://mofesolapaul.github.io/sectionizr/
22
23
 
23
- - Build and deploy gem to [rubygems.org](https://rubygems.org/gems/rspec-usecases)
24
- - Attach documentation to [rubydoc.info](https://rubydoc.info/github/to-do-/rspec-usecases/master)
24
+ ### Tasks next on list
25
25
 
26
26
  Setup GitHub Action (test and lint)
27
27
 
@@ -32,12 +32,33 @@ Setup GitHub Action (test and lint)
32
32
 
33
33
  ### Stories - completed
34
34
 
35
+ As a Developer, I can extend Rspec with code specific documentation extensions, so that I easily build documentation that parses unit tests
36
+
37
+ As a Developer, I can have component based renderers, so that I easily extend documentation output renders
38
+
39
+ - Build JSON renderer
40
+ - Build Debug renderer
41
+ - Build Markdown renderer
42
+
43
+ Remove cooline and jazz_fingers gem from github actions by running from env variable
44
+
45
+ - On Mac `export RUBY_DEBUG_DEVELOPMENT=true`
46
+
35
47
  As a Developer, I can extract code and other content from unit test, so that I can inject it into documentation
36
48
 
37
49
  - Build Content, ContentCode an ContentOutcome
38
50
 
39
51
  ### Tasks - completed
40
52
 
53
+ Move content.\* into a namespace called contents
54
+
55
+ - Content items take on the same role as Rspec::Example
56
+
57
+ Setup RubyGems and RubyDoc
58
+
59
+ - Build and deploy gem to [rubygems.org](https://rubygems.org/gems/rspec-usecases)
60
+ - Attach documentation to [rubydoc.info](https://rubydoc.info/github/to-do-/rspec-usecases/master)
61
+
41
62
  Setup project management, requirement and SCRUM documents
42
63
 
43
64
  - Setup readme file
data/bin/console CHANGED
@@ -3,7 +3,7 @@
3
3
  # frozen_string_literal: true
4
4
 
5
5
  require 'bundler/setup'
6
- require 'rspec_usecases'
6
+ require 'rspec/usecases'
7
7
 
8
8
  # You can add fixtures and/or initialization code here to make experimenting
9
9
  # with your gem easier. You can also use a different console, if you like.
data/docs/regexp-01.md ADDED
@@ -0,0 +1,56 @@
1
+ # Ruby RegExp by example
2
+
3
+ Working through various regular expression scenarios using Ruby syntax
4
+
5
+ ## Character classes
6
+
7
+ #### match index `=~`
8
+
9
+ ```ruby
10
+ source = 'abcdefghijklmnopqrstuvwxyz'
11
+
12
+ label_value('source =~ /[aeiou]/', source =~ /[aeiou]/)
13
+ label_value('source =~ /[crazy]/', source =~ /[crazy]/)
14
+ label_value('source =~ /[12345]/', source =~ /[12345]/)
15
+ ```
16
+
17
+ ```ruby
18
+ # source =~ /[aeiou]/ : 0
19
+ # source =~ /[crazy]/ : 0
20
+ # source =~ /[12345]/ : nil
21
+ ```
22
+
23
+ #### global variable `$~` for MatchData
24
+
25
+ ```ruby
26
+ source = 'abcdefghijklmnopqrstuvwxyz'
27
+
28
+ puts source =~ /[aeiou]/
29
+ puts $~
30
+ puts source =~ /[12345]/
31
+ puts $~
32
+ puts source =~ /[d]/
33
+ puts $~
34
+ ```
35
+
36
+ ```ruby
37
+ # 0
38
+ # a
39
+ # 3
40
+ # d
41
+ ```
42
+
43
+ #### match() for MatchData
44
+
45
+ ```ruby
46
+ source = 'abcdefghijklmnopqrstuvwxyz'
47
+
48
+ puts source.match(/[aeiou]/)
49
+ puts source.match(/[12345]/)
50
+ puts source.match(/[d]/)
51
+ ```
52
+
53
+ ```ruby
54
+ # a
55
+ # nil
56
+ ```
data/docs/samples.md ADDED
@@ -0,0 +1,62 @@
1
+ # Usage Samples
2
+
3
+ Some examples of how to use Rspec::Usage
4
+
5
+ ## Array load 1st basics
6
+
7
+ ### Array.load
8
+
9
+ Array.load - description goes here
10
+
11
+ #### Initialize an array
12
+
13
+ ```
14
+ ar = [1,2,3]
15
+ ```
16
+
17
+ #### Push to array
18
+
19
+ ```
20
+ # ar << 4
21
+ ```
22
+
23
+ - AAAAAA
24
+ - BBBBBB
25
+
26
+ ## Array load 2nd basics
27
+
28
+ ### Array.load
29
+
30
+ Array.load - description goes here
31
+
32
+ ---
33
+
34
+ #### Initialize an array
35
+
36
+ ```ruby
37
+ display = false
38
+ [1, 2, 3].each do |i|
39
+ puts "the quick brown fox: #{i}" if display
40
+
41
+ %w[A B C].each { |x| puts "the quick brown fox: #{i}:#{x}" if display }
42
+ puts '-----------------------' if display
43
+ end
44
+ ```
45
+
46
+ ## Default.load will load your application configuration from your `.env` file found in the project root
47
+
48
+ ### Array.load
49
+
50
+ - aaaa
51
+
52
+ ## Array load -> namespace -> Can I move content_block into a test block
53
+
54
+ ### Array.load
55
+
56
+ #### example
57
+
58
+ ```
59
+ #
60
+ ```
61
+
62
+ - xxxxx
@@ -0,0 +1,93 @@
1
+ ****************************************************************************************************
2
+ Title : debug title
3
+ Description : debug description
4
+ ====================================================================================================
5
+ Key : RSpec::ExampleGroups::RspecUsecasesGeneratorDebugGenerator::ValidLevel1Usecase1
6
+ Title : valid level 1 usecase #1
7
+ Deep Title : Rspec::Usecases::Generator::DebugGenerator valid level 1 usecase #1
8
+ Summary : first encountered usecases
9
+ Usage : SomeClass.some_method
10
+ Usage Description : Calls some_method on SomeClass
11
+ ----------------------------------------------------------------------------------------------------
12
+ Type : outcome
13
+ # Title should be blank on this outcome
14
+ ----------------------------------------------------------------------------------------------------
15
+ Title : this outcome has a title
16
+ Type : outcome
17
+ # Source code goes here
18
+ ----------------------------------------------------------------------------------------------------
19
+ Title : this outcome has a note
20
+ Type : outcome
21
+ Note : outcome note
22
+ # Source code goes here
23
+ ----------------------------------------------------------------------------------------------------
24
+ Title : this outcome has an hr
25
+ Type : outcome
26
+ #
27
+ ----------------------------------------------------------------------------------------------------
28
+ Title : this is some unknown code
29
+ Type : code
30
+ # Source code goes here
31
+ ----------------------------------------------------------------------------------------------------
32
+ Title : this is some ruby code
33
+ Type : code
34
+ # Source code goes here
35
+ ====================================================================================================
36
+ Key : RSpec::ExampleGroups::RspecUsecasesGeneratorDebugGenerator::ValidLevel1Usecase1::ValidLevel2Usecase11
37
+ Title : valid level 2 usecase #1.1
38
+ Deep Title : Rspec::Usecases::Generator::DebugGenerator valid level 1 usecase #1 valid level 2 usecase #1.1
39
+ Summary : override the summary
40
+ Usage :
41
+ Usage Description :
42
+ ====================================================================================================
43
+ Key : RSpec::ExampleGroups::RspecUsecasesGeneratorDebugGenerator::ValidLevel1Usecase1::ValidLevel2Usecase12
44
+ Title : valid level 2 usecase #1.2
45
+ Deep Title : Rspec::Usecases::Generator::DebugGenerator valid level 1 usecase #1 valid level 2 usecase #1.2
46
+ Summary :
47
+ Usage :
48
+ Usage Description :
49
+ ====================================================================================================
50
+ Key : RSpec::ExampleGroups::RspecUsecasesGeneratorDebugGenerator::SomeMethod::ValidLevel1Usecase2
51
+ Title : valid level 1 usecase #2
52
+ Deep Title : Rspec::Usecases::Generator::DebugGenerator #some_method valid level 1 usecase #2
53
+ Summary :
54
+ Usage :
55
+ Usage Description :
56
+ ====================================================================================================
57
+ Key : RSpec::ExampleGroups::RspecUsecasesGeneratorDebugGenerator::SomeMethod::ValidLevel1Usecase2::FlattenMeOutOfTheHierarchy::ValidLevel2Usecase21
58
+ Title : valid level 2 usecase #2.1
59
+ Deep Title : Rspec::Usecases::Generator::DebugGenerator #some_method valid level 1 usecase #2 flatten me out of the hierarchy valid level 2 usecase #2.1
60
+ Summary :
61
+ Usage :
62
+ Usage Description :
63
+ ====================================================================================================
64
+ Key : RSpec::ExampleGroups::RspecUsecasesGeneratorDebugGenerator::SomeMethod::ValidLevel1Usecase2::ValidLevel2Usecase22
65
+ Title : valid level 2 usecase #2.2
66
+ Deep Title : Rspec::Usecases::Generator::DebugGenerator #some_method valid level 1 usecase #2 valid level 2 usecase #2.2
67
+ Summary :
68
+ Usage :
69
+ Usage Description :
70
+ ----------------------------------------------------------------------------------------------------
71
+ Title : some code code
72
+ Type : code
73
+ # code goes here
74
+ ----------------------------------------------------------------------------------------------------
75
+ Title : some ruby code
76
+ Type : code
77
+ Code Type : ruby
78
+ # ruby goes here
79
+ ----------------------------------------------------------------------------------------------------
80
+ Title : some css code
81
+ Type : code
82
+ Code Type : css
83
+ # css goes here
84
+ ----------------------------------------------------------------------------------------------------
85
+ Title : some js code
86
+ Type : code
87
+ Code Type : javascript
88
+ # js goes here
89
+ ----------------------------------------------------------------------------------------------------
90
+ Title : some javascript code
91
+ Type : code
92
+ Code Type : javascript
93
+ # javascript goes here
data/docs/test.json ADDED
@@ -0,0 +1,172 @@
1
+ {
2
+ "document": {
3
+ "title": "json title",
4
+ "description": "json description"
5
+ },
6
+ "usecases": [
7
+ {
8
+ "key": "RSpec::ExampleGroups::RspecUsecasesGeneratorJsonGenerator::ValidLevel1Usecase1",
9
+ "title": "valid level 1 usecase #1",
10
+ "deep_title": "Rspec::Usecases::Generator::JsonGenerator valid level 1 usecase #1",
11
+ "summary": "first encountered usecases",
12
+ "usage": "SomeClass.some_method",
13
+ "usage_description": "Calls some_method on SomeClass",
14
+ "contents": [
15
+ {
16
+ "note": "",
17
+ "title": "",
18
+ "type": "outcome",
19
+ "source": "# Title should be blank on this outcome",
20
+ "is_hr": false
21
+ },
22
+ {
23
+ "note": "",
24
+ "title": "this outcome has a title",
25
+ "type": "outcome",
26
+ "source": "# Source code goes here",
27
+ "is_hr": false
28
+ },
29
+ {
30
+ "note": "outcome note",
31
+ "title": "this outcome has a note",
32
+ "type": "outcome",
33
+ "source": "# Source code goes here",
34
+ "is_hr": false
35
+ },
36
+ {
37
+ "note": "",
38
+ "title": "this outcome has an hr",
39
+ "type": "outcome",
40
+ "source": "#",
41
+ "is_hr": true
42
+ },
43
+ {
44
+ "code_type": "",
45
+ "summary": "first encountered usecases",
46
+ "title": "this is some unknown code",
47
+ "type": "code",
48
+ "source": "# Source code goes here",
49
+ "is_hr": false
50
+ },
51
+ {
52
+ "code_type": "",
53
+ "summary": "first encountered usecases",
54
+ "title": "this is some ruby code",
55
+ "type": "code",
56
+ "source": "# Source code goes here",
57
+ "is_hr": false
58
+ }
59
+ ],
60
+ "usecases": [
61
+ {
62
+ "key": "RSpec::ExampleGroups::RspecUsecasesGeneratorJsonGenerator::ValidLevel1Usecase1::ValidLevel2Usecase11",
63
+ "title": "valid level 2 usecase #1.1",
64
+ "deep_title": "Rspec::Usecases::Generator::JsonGenerator valid level 1 usecase #1 valid level 2 usecase #1.1",
65
+ "summary": "override the summary",
66
+ "usage": "",
67
+ "usage_description": "",
68
+ "contents": [
69
+
70
+ ],
71
+ "usecases": [
72
+
73
+ ]
74
+ },
75
+ {
76
+ "key": "RSpec::ExampleGroups::RspecUsecasesGeneratorJsonGenerator::ValidLevel1Usecase1::ValidLevel2Usecase12",
77
+ "title": "valid level 2 usecase #1.2",
78
+ "deep_title": "Rspec::Usecases::Generator::JsonGenerator valid level 1 usecase #1 valid level 2 usecase #1.2",
79
+ "summary": "",
80
+ "usage": "",
81
+ "usage_description": "",
82
+ "contents": [
83
+
84
+ ],
85
+ "usecases": [
86
+
87
+ ]
88
+ }
89
+ ]
90
+ },
91
+ {
92
+ "key": "RSpec::ExampleGroups::RspecUsecasesGeneratorJsonGenerator::SomeMethod::ValidLevel1Usecase2",
93
+ "title": "valid level 1 usecase #2",
94
+ "deep_title": "Rspec::Usecases::Generator::JsonGenerator #some_method valid level 1 usecase #2",
95
+ "summary": "",
96
+ "usage": "",
97
+ "usage_description": "",
98
+ "contents": [
99
+
100
+ ],
101
+ "usecases": [
102
+ {
103
+ "key": "RSpec::ExampleGroups::RspecUsecasesGeneratorJsonGenerator::SomeMethod::ValidLevel1Usecase2::FlattenMeOutOfTheHierarchy::ValidLevel2Usecase21",
104
+ "title": "valid level 2 usecase #2.1",
105
+ "deep_title": "Rspec::Usecases::Generator::JsonGenerator #some_method valid level 1 usecase #2 flatten me out of the hierarchy valid level 2 usecase #2.1",
106
+ "summary": "",
107
+ "usage": "",
108
+ "usage_description": "",
109
+ "contents": [
110
+
111
+ ],
112
+ "usecases": [
113
+
114
+ ]
115
+ },
116
+ {
117
+ "key": "RSpec::ExampleGroups::RspecUsecasesGeneratorJsonGenerator::SomeMethod::ValidLevel1Usecase2::ValidLevel2Usecase22",
118
+ "title": "valid level 2 usecase #2.2",
119
+ "deep_title": "Rspec::Usecases::Generator::JsonGenerator #some_method valid level 1 usecase #2 valid level 2 usecase #2.2",
120
+ "summary": "",
121
+ "usage": "",
122
+ "usage_description": "",
123
+ "contents": [
124
+ {
125
+ "code_type": "",
126
+ "summary": "",
127
+ "title": "some code code",
128
+ "type": "code",
129
+ "source": "# code goes here",
130
+ "is_hr": false
131
+ },
132
+ {
133
+ "code_type": "ruby",
134
+ "summary": "",
135
+ "title": "some ruby code",
136
+ "type": "code",
137
+ "source": "# ruby goes here",
138
+ "is_hr": false
139
+ },
140
+ {
141
+ "code_type": "css",
142
+ "summary": "",
143
+ "title": "some css code",
144
+ "type": "code",
145
+ "source": "# css goes here",
146
+ "is_hr": false
147
+ },
148
+ {
149
+ "code_type": "javascript",
150
+ "summary": "",
151
+ "title": "some js code",
152
+ "type": "code",
153
+ "source": "# js goes here",
154
+ "is_hr": false
155
+ },
156
+ {
157
+ "code_type": "javascript",
158
+ "summary": "",
159
+ "title": "some javascript code",
160
+ "type": "code",
161
+ "source": "# javascript goes here",
162
+ "is_hr": false
163
+ }
164
+ ],
165
+ "usecases": [
166
+
167
+ ]
168
+ }
169
+ ]
170
+ }
171
+ ]
172
+ }