apipie-dsl 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +21 -0
  3. data/README.md +485 -0
  4. data/app/controllers/apipie_dsl/apipie_dsls_controller.rb +190 -0
  5. data/app/helpers/apipie_dsl_helper.rb +110 -0
  6. data/app/public/apipie_dsl/javascripts/apipie_dsl.js +6 -0
  7. data/app/public/apipie_dsl/javascripts/bundled/bootstrap-collapse.js +138 -0
  8. data/app/public/apipie_dsl/javascripts/bundled/bootstrap.js +1726 -0
  9. data/app/public/apipie_dsl/javascripts/bundled/jquery.js +5 -0
  10. data/app/public/apipie_dsl/javascripts/bundled/prettify.js +28 -0
  11. data/app/public/apipie_dsl/stylesheets/application.css +7 -0
  12. data/app/public/apipie_dsl/stylesheets/bundled/bootstrap-responsive.min.css +12 -0
  13. data/app/public/apipie_dsl/stylesheets/bundled/bootstrap.min.css +689 -0
  14. data/app/public/apipie_dsl/stylesheets/bundled/prettify.css +30 -0
  15. data/app/views/apipie_dsl/apipie_dsls/_index_class_meth.erb +11 -0
  16. data/app/views/apipie_dsl/apipie_dsls/_index_class_prop.erb +13 -0
  17. data/app/views/apipie_dsl/apipie_dsls/_languages.erb +6 -0
  18. data/app/views/apipie_dsl/apipie_dsls/_metadata.erb +1 -0
  19. data/app/views/apipie_dsl/apipie_dsls/_method.erb +34 -0
  20. data/app/views/apipie_dsl/apipie_dsls/_method_detail.erb +58 -0
  21. data/app/views/apipie_dsl/apipie_dsls/_params.html.erb +47 -0
  22. data/app/views/apipie_dsl/apipie_dsls/_params_plain.html.erb +19 -0
  23. data/app/views/apipie_dsl/apipie_dsls/_property.erb +24 -0
  24. data/app/views/apipie_dsl/apipie_dsls/_property_detail.erb +35 -0
  25. data/app/views/apipie_dsl/apipie_dsls/_raises.html.erb +23 -0
  26. data/app/views/apipie_dsl/apipie_dsls/_returns.html.erb +53 -0
  27. data/app/views/apipie_dsl/apipie_dsls/apipie_dsl_404.html.erb +17 -0
  28. data/app/views/apipie_dsl/apipie_dsls/class.html.erb +75 -0
  29. data/app/views/apipie_dsl/apipie_dsls/custom_help.html.erb +10 -0
  30. data/app/views/apipie_dsl/apipie_dsls/getting_started.html.erb +4 -0
  31. data/app/views/apipie_dsl/apipie_dsls/index.html.erb +72 -0
  32. data/app/views/apipie_dsl/apipie_dsls/method.html.erb +52 -0
  33. data/app/views/apipie_dsl/apipie_dsls/plain.html.erb +116 -0
  34. data/app/views/apipie_dsl/apipie_dsls/static.html.erb +158 -0
  35. data/app/views/layouts/apipie_dsl/apipie_dsl.html.erb +26 -0
  36. data/lib/apipie-dsl.rb +3 -0
  37. data/lib/apipie_dsl.rb +28 -0
  38. data/lib/apipie_dsl/Rakefile +6 -0
  39. data/lib/apipie_dsl/apipie_dsl_module.rb +51 -0
  40. data/lib/apipie_dsl/application.rb +321 -0
  41. data/lib/apipie_dsl/class_description.rb +107 -0
  42. data/lib/apipie_dsl/configuration.rb +87 -0
  43. data/lib/apipie_dsl/dsl.rb +596 -0
  44. data/lib/apipie_dsl/errors.rb +68 -0
  45. data/lib/apipie_dsl/exception_description.rb +39 -0
  46. data/lib/apipie_dsl/markup.rb +41 -0
  47. data/lib/apipie_dsl/method_description.rb +112 -0
  48. data/lib/apipie_dsl/parameter_description.rb +152 -0
  49. data/lib/apipie_dsl/railtie.rb +15 -0
  50. data/lib/apipie_dsl/return_description.rb +71 -0
  51. data/lib/apipie_dsl/routing.rb +17 -0
  52. data/lib/apipie_dsl/see_description.rb +35 -0
  53. data/lib/apipie_dsl/static_dispatcher.rb +70 -0
  54. data/lib/apipie_dsl/tag_list_description.rb +11 -0
  55. data/lib/apipie_dsl/tasks/apipie_dsl/cache.rake +43 -0
  56. data/lib/apipie_dsl/tasks/apipie_dsl/static.rake +43 -0
  57. data/lib/apipie_dsl/tasks/apipie_dsl/static_json.rake +29 -0
  58. data/lib/apipie_dsl/tasks_utils.rb +137 -0
  59. data/lib/apipie_dsl/utils.rb +83 -0
  60. data/lib/apipie_dsl/validator.rb +479 -0
  61. data/lib/apipie_dsl/version.rb +5 -0
  62. data/lib/generators/apipie_dsl/install/install_generator.rb +21 -0
  63. data/lib/generators/apipie_dsl/install/templates/initializer.rb.erb +9 -0
  64. data/lib/generators/apipie_dsl/views_generator.rb +14 -0
  65. data/test/test_helper.rb +6 -0
  66. metadata +220 -0
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ApipieDSL
4
+ VERSION = '2.0.0'
5
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ApipieDSL
4
+ class InstallGenerator < ::Rails::Generators::Base
5
+ source_root File.expand_path('templates', __dir__)
6
+ namespace 'apipie_dsl:install'
7
+ class_option(:route,
8
+ aliases: '-r',
9
+ type: :string,
10
+ desc: 'What path should be the doc available on',
11
+ default: '/apipie-dsl')
12
+
13
+ def create_initializer
14
+ template 'initializer.rb.erb', 'config/initializers/apipie_dsl.rb'
15
+ end
16
+
17
+ def add_route
18
+ route('apipie_dsl')
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,9 @@
1
+ ApipieDSL.configure do |config|
2
+ config.app_name = '<%= Rails.application.class.name[/^\w+/] %>'
3
+ config.doc_base_url = '<%= options.route %>'
4
+ # where is your DSL defined?
5
+ config.dsl_classes_matchers = [
6
+ "#{Rails.root}/lib/dsl/**/*.rb"
7
+ ]
8
+ config.sections = %i[all]
9
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ApipieDSL
4
+ class ViewsGenerator < ::Rails::Generators::Base
5
+ source_root File.expand_path('../../../app/views', __dir__)
6
+ namespace 'apipie_dsl:views'
7
+ desc 'Copy ApipieDSL views to your application'
8
+
9
+ def copy_views
10
+ directory 'apipie_dsl', 'app/views/apipie_dsl'
11
+ directory 'layouts/apipie_dsl', 'app/views/layouts/apipie_dsl'
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ $LOAD_PATH.unshift File.expand_path('../lib', __dir__)
4
+ require 'apipie_dsl'
5
+
6
+ require 'minitest/autorun'
metadata ADDED
@@ -0,0 +1,220 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: apipie-dsl
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Oleh Fedorenko
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2020-03-15 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: nokogiri
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 1.10.4
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 1.10.4
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: json-schema
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: maruku
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: minitest
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rake
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rdoc
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: RedCloth
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ description: Ruby DSL documentation tool
126
+ email:
127
+ - fpostoleh@gmail.com
128
+ executables: []
129
+ extensions: []
130
+ extra_rdoc_files: []
131
+ files:
132
+ - LICENSE
133
+ - README.md
134
+ - app/controllers/apipie_dsl/apipie_dsls_controller.rb
135
+ - app/helpers/apipie_dsl_helper.rb
136
+ - app/public/apipie_dsl/javascripts/apipie_dsl.js
137
+ - app/public/apipie_dsl/javascripts/bundled/bootstrap-collapse.js
138
+ - app/public/apipie_dsl/javascripts/bundled/bootstrap.js
139
+ - app/public/apipie_dsl/javascripts/bundled/jquery.js
140
+ - app/public/apipie_dsl/javascripts/bundled/prettify.js
141
+ - app/public/apipie_dsl/stylesheets/application.css
142
+ - app/public/apipie_dsl/stylesheets/bundled/bootstrap-responsive.min.css
143
+ - app/public/apipie_dsl/stylesheets/bundled/bootstrap.min.css
144
+ - app/public/apipie_dsl/stylesheets/bundled/prettify.css
145
+ - app/views/apipie_dsl/apipie_dsls/_index_class_meth.erb
146
+ - app/views/apipie_dsl/apipie_dsls/_index_class_prop.erb
147
+ - app/views/apipie_dsl/apipie_dsls/_languages.erb
148
+ - app/views/apipie_dsl/apipie_dsls/_metadata.erb
149
+ - app/views/apipie_dsl/apipie_dsls/_method.erb
150
+ - app/views/apipie_dsl/apipie_dsls/_method_detail.erb
151
+ - app/views/apipie_dsl/apipie_dsls/_params.html.erb
152
+ - app/views/apipie_dsl/apipie_dsls/_params_plain.html.erb
153
+ - app/views/apipie_dsl/apipie_dsls/_property.erb
154
+ - app/views/apipie_dsl/apipie_dsls/_property_detail.erb
155
+ - app/views/apipie_dsl/apipie_dsls/_raises.html.erb
156
+ - app/views/apipie_dsl/apipie_dsls/_returns.html.erb
157
+ - app/views/apipie_dsl/apipie_dsls/apipie_dsl_404.html.erb
158
+ - app/views/apipie_dsl/apipie_dsls/class.html.erb
159
+ - app/views/apipie_dsl/apipie_dsls/custom_help.html.erb
160
+ - app/views/apipie_dsl/apipie_dsls/getting_started.html.erb
161
+ - app/views/apipie_dsl/apipie_dsls/index.html.erb
162
+ - app/views/apipie_dsl/apipie_dsls/method.html.erb
163
+ - app/views/apipie_dsl/apipie_dsls/plain.html.erb
164
+ - app/views/apipie_dsl/apipie_dsls/static.html.erb
165
+ - app/views/layouts/apipie_dsl/apipie_dsl.html.erb
166
+ - lib/apipie-dsl.rb
167
+ - lib/apipie_dsl.rb
168
+ - lib/apipie_dsl/Rakefile
169
+ - lib/apipie_dsl/apipie_dsl_module.rb
170
+ - lib/apipie_dsl/application.rb
171
+ - lib/apipie_dsl/class_description.rb
172
+ - lib/apipie_dsl/configuration.rb
173
+ - lib/apipie_dsl/dsl.rb
174
+ - lib/apipie_dsl/errors.rb
175
+ - lib/apipie_dsl/exception_description.rb
176
+ - lib/apipie_dsl/markup.rb
177
+ - lib/apipie_dsl/method_description.rb
178
+ - lib/apipie_dsl/parameter_description.rb
179
+ - lib/apipie_dsl/railtie.rb
180
+ - lib/apipie_dsl/return_description.rb
181
+ - lib/apipie_dsl/routing.rb
182
+ - lib/apipie_dsl/see_description.rb
183
+ - lib/apipie_dsl/static_dispatcher.rb
184
+ - lib/apipie_dsl/tag_list_description.rb
185
+ - lib/apipie_dsl/tasks/apipie_dsl/cache.rake
186
+ - lib/apipie_dsl/tasks/apipie_dsl/static.rake
187
+ - lib/apipie_dsl/tasks/apipie_dsl/static_json.rake
188
+ - lib/apipie_dsl/tasks_utils.rb
189
+ - lib/apipie_dsl/utils.rb
190
+ - lib/apipie_dsl/validator.rb
191
+ - lib/apipie_dsl/version.rb
192
+ - lib/generators/apipie_dsl/install/install_generator.rb
193
+ - lib/generators/apipie_dsl/install/templates/initializer.rb.erb
194
+ - lib/generators/apipie_dsl/views_generator.rb
195
+ - test/test_helper.rb
196
+ homepage: https://github.com/ofedoren/apipie-dsl
197
+ licenses:
198
+ - MIT
199
+ metadata: {}
200
+ post_install_message:
201
+ rdoc_options: []
202
+ require_paths:
203
+ - lib
204
+ required_ruby_version: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - ">="
207
+ - !ruby/object:Gem::Version
208
+ version: 2.3.0
209
+ required_rubygems_version: !ruby/object:Gem::Requirement
210
+ requirements:
211
+ - - ">="
212
+ - !ruby/object:Gem::Version
213
+ version: '0'
214
+ requirements: []
215
+ rubygems_version: 3.0.3
216
+ signing_key:
217
+ specification_version: 4
218
+ summary: Ruby DSL documentation tool
219
+ test_files:
220
+ - test/test_helper.rb