apipie-rails 0.5.15 → 0.5.19

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 +5 -5
  2. data/.gitignore +1 -0
  3. data/.travis.yml +32 -18
  4. data/CHANGELOG.md +30 -1
  5. data/Gemfile +1 -1
  6. data/Gemfile.rails41 +1 -0
  7. data/Gemfile.rails42 +3 -0
  8. data/Gemfile.rails50 +1 -0
  9. data/Gemfile.rails51 +2 -0
  10. data/Gemfile.rails60 +10 -0
  11. data/Gemfile.rails61 +10 -0
  12. data/README.rst +13 -4
  13. data/config/locales/pt-BR.yml +1 -1
  14. data/lib/apipie-rails.rb +2 -0
  15. data/lib/apipie/application.rb +8 -6
  16. data/lib/apipie/core_ext/route.rb +9 -0
  17. data/lib/apipie/dsl_definition.rb +22 -8
  18. data/lib/apipie/markup.rb +14 -11
  19. data/lib/apipie/method_description.rb +2 -1
  20. data/lib/apipie/routes_formatter.rb +1 -1
  21. data/lib/apipie/swagger_generator.rb +3 -2
  22. data/lib/apipie/validator.rb +2 -0
  23. data/lib/apipie/version.rb +1 -1
  24. data/lib/tasks/apipie.rake +14 -9
  25. data/rel-eng/gem_release.ipynb +366 -0
  26. data/spec/controllers/extended_controller_spec.rb +4 -1
  27. data/spec/controllers/memes_controller_spec.rb +10 -0
  28. data/spec/controllers/users_controller_spec.rb +12 -0
  29. data/spec/dummy/app/controllers/concerns/extending_concern.rb +1 -0
  30. data/spec/dummy/app/controllers/users_controller.rb +1 -0
  31. data/spec/dummy/components/test_engine/Gemfile +6 -0
  32. data/spec/dummy/components/test_engine/app/controllers/test_engine/application_controller.rb +4 -0
  33. data/spec/dummy/components/test_engine/app/controllers/test_engine/memes_controller.rb +37 -0
  34. data/spec/dummy/components/test_engine/config/routes.rb +3 -0
  35. data/spec/dummy/components/test_engine/db/.gitkeep +0 -0
  36. data/spec/dummy/components/test_engine/lib/test_engine.rb +7 -0
  37. data/spec/dummy/components/test_engine/test_engine.gemspec +11 -0
  38. data/spec/dummy/config/application.rb +1 -0
  39. data/spec/dummy/config/routes.rb +2 -0
  40. data/spec/spec_helper.rb +1 -0
  41. metadata +23 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: a05f50c6c4364f6e0c0ad119a9061f4daef9e2f5
4
- data.tar.gz: 05ea27245215efd3d2e2d685fa5e82b9de0e17b8
2
+ SHA256:
3
+ metadata.gz: 444b1aeccaa322d75d64131d2539ae5ecb9ceb3ea984e02c9cfd17a2c80d1190
4
+ data.tar.gz: ddbcdfaee3494a2f35f343a361c9e07b72541b5a75e5e537c0776f8b6c9669e9
5
5
  SHA512:
6
- metadata.gz: 07198e0935b6f4c8ea51616153b29578213614de9a783a602d9edf9ebde2223652ddb1482a55a48a0bdb6582423fe4ff6c807412c4bb0529736b5c0d4f3453b4
7
- data.tar.gz: a4cb3227c448f0f444e6c28972b8d1d6788f011ab3c9bdea8accbf9b41ec614393edff8aafd8c1a521f3a18f05e3eaee767da65cf0f49a2fedfac99f4e046a3a
6
+ metadata.gz: 18f5f97fc24bab7aa9c554cd3be305e9bf5eb5266466a79c4484fb0c7f6e4b80912d5ddb224a8ed1dd8d8002c376cd7e30a359ab4f0855d60d404352dc74acb0
7
+ data.tar.gz: 1c66c6990ab997d21e727900a4a36648b76aa08357491007821c4a5f1b46b25f8e48fbb9cdeccfd26f20b1ea268c32c6698f73b040226036b0f5f72fc9447060
data/.gitignore CHANGED
@@ -12,3 +12,4 @@ Gemfile.local
12
12
  .ruby-gemset
13
13
 
14
14
  .DS_Store
15
+ rel-eng/.ipynb_checkpoints
data/.travis.yml CHANGED
@@ -1,27 +1,41 @@
1
1
  language: ruby
2
2
  sudo: false
3
+ before_install: >-
4
+ if ruby -v | grep 'ruby 2.2'; then
5
+ gem install bundler -v '~> 1.17'
6
+ fi
3
7
  rvm:
4
- - 2.1.7
5
- - 2.2.3
6
- - 2.3.3
7
- - 2.4.3
8
- - 2.5.0
8
+ - 2.2.10
9
+ - 2.3.8
10
+ - 2.4.5
11
+ - 2.5.3
12
+ - 2.6.5
13
+ - 2.7.0
9
14
  gemfile:
10
- - Gemfile.rails41
11
15
  - Gemfile.rails42
12
- - Gemfile.rails50 # Min ruby 2.2.2
13
16
  - Gemfile.rails51 # Min ruby 2.2.2
17
+ - Gemfile.rails60 # Min ruby 2.5.0
18
+ - Gemfile.rails61 # Min ruby 2.5.0
19
+
14
20
  matrix:
15
21
  exclude:
16
- - rvm: 2.0.0
17
- gemfile: Gemfile.rails50
18
- - rvm: 2.0.0
22
+ - rvm: 2.5.3
23
+ gemfile: Gemfile.rails42
24
+ - rvm: 2.6.5
25
+ gemfile: Gemfile.rails42
26
+ - rvm: 2.7.0
27
+ gemfile: Gemfile.rails42
28
+ - rvm: 2.7.0
19
29
  gemfile: Gemfile.rails51
20
- - rvm: 2.1.7
21
- gemfile: Gemfile.rails50
22
- - rvm: 2.1.7
23
- gemfile: Gemfile.rails51
24
- - rvm: 2.4.3
25
- gemfile: Gemfile.rails41
26
- - rvm: 2.5.0
27
- gemfile: Gemfile.rails41
30
+ - rvm: 2.2.10
31
+ gemfile: Gemfile.rails60
32
+ - rvm: 2.3.8
33
+ gemfile: Gemfile.rails60
34
+ - rvm: 2.4.5
35
+ gemfile: Gemfile.rails60
36
+ - rvm: 2.2.10
37
+ gemfile: Gemfile.rails61
38
+ - rvm: 2.3.8
39
+ gemfile: Gemfile.rails61
40
+ - rvm: 2.4.5
41
+ gemfile: Gemfile.rails61
data/CHANGELOG.md CHANGED
@@ -1,5 +1,34 @@
1
1
  Changelog
2
2
  ===========
3
+ ## [v0.5.19](https://github.com/Apipie/apipie-rails/tree/v0.5.19) (2021-07-25)
4
+ [Full Changelog](https://github.com/Apipie/apipie-rails/compare/v0.5.18...v0.5.19)
5
+ * Add rel-eng notebook (Oleh Fedorenko)
6
+ * Correct the word parâmentros for brazilian portuguese [#687](https://github.com/Apipie/apipie-rails/pull/687) (Diego Noronha)
7
+ * Fix depreciated file.exists. [#721](https://github.com/Apipie/apipie-rails/pull/721) (Diane Delallée)
8
+ * Fix typo in changelog [#703](https://github.com/Apipie/apipie-rails/pull/703) (Pavel Rodionov)
9
+ * Add rails 6.1 support in doc generation [#702](https://github.com/Apipie/apipie-rails/pull/702) (andrew-newell)
10
+
11
+
12
+ [v0.5.18](https://github.com/Apipie/apipie-rails/tree/v0.5.18) (2020-05-20)
13
+ --------
14
+
15
+ [Full Changelog](https://github.com/Apipie/apipie-rails/compare/v0.5.17...v0.5.18)
16
+
17
+ - Optional rdoc dependency with lazyload [\#683](https://github.com/Apipie/apipie-rails/pull/683) ([vkrizan](https://github.com/vkrizan))
18
+
19
+ [v0.5.17](https://github.com/Apipie/apipie-rails/tree/v0.5.17) (2020-01-20)
20
+ --------
21
+
22
+ [Full Changelog](https://github.com/Apipie/apipie-rails/compare/v0.5.16...v0.5.17)
23
+
24
+ - Allows update metadata for methods [\#667](https://github.com/Apipie/apipie-rails/pull/667) ([speckins](https://github.com/speckins))
25
+
26
+ [v0.5.16](https://github.com/Apipie/apipie-rails/tree/v0.5.16) (2019-05-22)
27
+ --------
28
+
29
+ [Full Changelog](https://github.com/Apipie/apipie-rails/compare/v0.5.15...v0.5.16)
30
+
31
+ - Load file directly instead of using Rails constant [\#665](https://github.com/Apipie/apipie-rails/pull/665) ([speckins](https://github.com/speckins))
3
32
 
4
33
  [v0.5.15](https://github.com/Apipie/apipie-rails/tree/v0.5.15) (2019-01-03)
5
34
  --------
@@ -201,7 +230,7 @@ v0.3.2
201
230
  v0.3.1
202
231
  ------
203
232
 
204
- * Support for ``api!`` keyword in concerns
233
+ * Support for ``api!`` keyword in concerns
205
234
  [#322](https://github.com/Apipie/apipie-rails/pull/322) [@iNecas][]
206
235
  * More explicit ordering of the static dispatcher middleware
207
236
  [#315](https://github.com/Apipie/apipie-rails/pull/315) [@iNecas][]
data/Gemfile CHANGED
@@ -1 +1 @@
1
- Gemfile.rails50
1
+ ./Gemfile.rails61
data/Gemfile.rails41 CHANGED
@@ -4,3 +4,4 @@ gemspec
4
4
 
5
5
  gem 'rails', '~> 4.1.0'
6
6
  gem 'mime-types', '~> 2.99.3'
7
+ gem 'test_engine', path: 'spec/dummy/components/test_engine', group: :test
data/Gemfile.rails42 CHANGED
@@ -4,8 +4,11 @@ gemspec
4
4
 
5
5
  gem 'rails', '~> 4.2.5'
6
6
  gem 'mime-types', '~> 2.99.3'
7
+ gem 'sqlite3', '~> 1.3.6'
7
8
 
8
9
  if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.1.0')
9
10
  gem 'nokogiri', '~> 1.6.8'
10
11
  gem 'rdoc', '~> 4.2.2'
11
12
  end
13
+
14
+ gem 'test_engine', path: 'spec/dummy/components/test_engine', group: :test
data/Gemfile.rails50 CHANGED
@@ -6,3 +6,4 @@ gem 'rails', '~> 5.0.0'
6
6
  gem 'mime-types', '~> 2.99.3'
7
7
  gem 'rails-controller-testing'
8
8
 
9
+ gem 'test_engine', path: 'spec/dummy/components/test_engine', group: :test
data/Gemfile.rails51 CHANGED
@@ -5,3 +5,5 @@ gemspec
5
5
  gem 'rails', '~> 5.1.0.rc1'
6
6
  gem 'mime-types', '~> 2.99.3'
7
7
  gem 'rails-controller-testing'
8
+
9
+ gem 'test_engine', path: 'spec/dummy/components/test_engine', group: :test
data/Gemfile.rails60 ADDED
@@ -0,0 +1,10 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec
4
+
5
+ gem 'rails', '~> 6.0.2'
6
+ gem 'mime-types', '~> 2.99.3'
7
+ gem 'rails-controller-testing'
8
+ gem 'rspec-rails', '4.0.0.beta3'
9
+
10
+ gem 'test_engine', path: 'spec/dummy/components/test_engine', group: :test
data/Gemfile.rails61 ADDED
@@ -0,0 +1,10 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec
4
+
5
+ gem 'rails', '~> 6.1.1'
6
+ gem 'mime-types', '~> 2.99.3'
7
+ gem 'rails-controller-testing'
8
+ gem 'rspec-rails', '~> 4.0.2'
9
+
10
+ gem 'test_engine', path: 'spec/dummy/components/test_engine', group: :test
data/README.rst CHANGED
@@ -45,7 +45,7 @@ Now you can start documenting your resources and actions (see
45
45
  .. code:: ruby
46
46
 
47
47
  api :GET, '/users/:id'
48
- param :id, :number
48
+ param :id, :number, desc: 'id of the requested user'
49
49
  def show
50
50
  # ...
51
51
  end
@@ -1237,10 +1237,15 @@ override parameters described on the resource level.
1237
1237
  #...
1238
1238
  end
1239
1239
 
1240
- ArrayValidator
1241
- --------------
1240
+ NumberValidator
1241
+ ---------------
1242
1242
 
1243
- Check if the parameter is an array
1243
+ Check if the parameter is a positive integer number or zero
1244
+
1245
+ .. code:: ruby
1246
+
1247
+ param :product_id, :number, :desc => "Identifier of the product", :required => true
1248
+ param :quantity, :number, :desc => "Number of products to order", :required => true
1244
1249
 
1245
1250
  DecimalValidator
1246
1251
  --------------
@@ -1252,6 +1257,10 @@ Check if the parameter is a decimal number
1252
1257
  param :latitude, :decimal, :desc => "Geographic latitude", :required => true
1253
1258
  param :longitude, :decimal, :desc => "Geographic longitude", :required => true
1254
1259
 
1260
+ ArrayValidator
1261
+ --------------
1262
+
1263
+ Check if the parameter is an array
1255
1264
 
1256
1265
  Additional options
1257
1266
  ~~~~~~~~~~~~~~~~~
@@ -16,7 +16,7 @@
16
16
  optional: opcional
17
17
  nil_allowed: nulo permitido
18
18
  param_name: Nome parâmetro
19
- params: Parâmentros
19
+ params: Parâmetros
20
20
  examples: Exemplos
21
21
  metadata: Metadado
22
22
  errors: Erros
data/lib/apipie-rails.rb CHANGED
@@ -2,6 +2,8 @@ require 'i18n'
2
2
  require 'json'
3
3
  require 'active_support/hash_with_indifferent_access'
4
4
 
5
+ require 'apipie/core_ext/route.rb'
6
+
5
7
  require "apipie/routing"
6
8
  require "apipie/markup"
7
9
  require "apipie/apipie_module"
@@ -29,7 +29,7 @@ module Apipie
29
29
  @controller_to_resource_id[controller] = resource_id
30
30
  end
31
31
 
32
- def rails_routes(route_set = nil)
32
+ def rails_routes(route_set = nil, base_url = "")
33
33
  if route_set.nil? && @rails_routes
34
34
  return @rails_routes
35
35
  end
@@ -40,10 +40,13 @@ module Apipie
40
40
  flatten_routes = []
41
41
 
42
42
  route_set.routes.each do |route|
43
- if route.app.respond_to?(:routes) && route.app.routes.is_a?(ActionDispatch::Routing::RouteSet)
44
- # recursively go though the moutned engines
45
- flatten_routes.concat(rails_routes(route.app.routes))
43
+ # This is a hack to workaround a bug in apipie with Rails 4.2.5.1 or newer. See https://github.com/Apipie/apipie-rails/issues/415
44
+ route_app = Rails::VERSION::STRING.to_f >= 4.2 ? route.app.app : route.app
45
+ if route_app.respond_to?(:routes) && route_app.routes.is_a?(ActionDispatch::Routing::RouteSet)
46
+ # recursively go though the mounted engines
47
+ flatten_routes.concat(rails_routes(route_app.routes, File.join(base_url, route.path.spec.to_s)))
46
48
  else
49
+ route.base_url = base_url
47
50
  flatten_routes << route
48
51
  end
49
52
  end
@@ -434,8 +437,7 @@ module Apipie
434
437
  end
435
438
 
436
439
  def load_controller_from_file(controller_file)
437
- controller_class_name = controller_file.gsub(/\A.*\/app\/controllers\//,"").gsub(/\.\w*\Z/,"").camelize
438
- controller_class_name.constantize
440
+ require_dependency controller_file
439
441
  end
440
442
 
441
443
  def ignored?(controller, method = nil)
@@ -0,0 +1,9 @@
1
+ module Apipie
2
+ module BaseUrlExtension
3
+ attr_accessor :base_url
4
+ end
5
+ end
6
+
7
+ class ActionDispatch::Journey::Route
8
+ include Apipie::BaseUrlExtension
9
+ end
@@ -488,19 +488,33 @@ module Apipie
488
488
  # param_names.each { |p| param p, String }
489
489
  # end
490
490
  # end
491
- def apipie_update_params(methods, *args, &block)
491
+ def _apipie_update_params(method_desc, dsl_data)
492
+ params_ordered = dsl_data[:params].map do |args|
493
+ Apipie::ParamDescription.from_dsl_data(method_desc, args)
494
+ end
495
+ ParamDescription.merge(method_desc.params_ordered_self, params_ordered)
496
+ end
497
+
498
+ def _apipie_update_meta(method_desc, dsl_data)
499
+ return unless dsl_data[:meta] && dsl_data[:meta].is_a?(Hash)
500
+
501
+ method_desc.metadata ||= {}
502
+ method_desc.metadata.merge!(dsl_data[:meta])
503
+ end
504
+
505
+ def apipie_update_methods(methods, *args, &block)
492
506
  methods.each do |method|
493
- method_description = Apipie.get_method_description(self, method)
494
- unless method_description
507
+ method_desc = Apipie.get_method_description(self, method)
508
+ unless method_desc
495
509
  raise "Could not find method description for #{self}##{method}. Was the method defined?"
496
510
  end
497
511
  dsl_data = _apipie_eval_dsl(*args, &block)
498
- params_ordered = dsl_data[:params].map do |args|
499
- Apipie::ParamDescription.from_dsl_data(method_description, args)
500
- end
501
- ParamDescription.merge(method_description.params_ordered_self, params_ordered)
512
+ _apipie_update_params(method_desc, dsl_data)
513
+ _apipie_update_meta(method_desc, dsl_data)
502
514
  end
503
515
  end
516
+ # backwards compatibility
517
+ alias_method :apipie_update_params, :apipie_update_methods
504
518
 
505
519
  def _apipie_concern_subst
506
520
  @_apipie_concern_subst ||= {:controller_path => self.controller_path,
@@ -550,7 +564,7 @@ module Apipie
550
564
  controller._apipie_define_validators(description)
551
565
  end
552
566
  _apipie_concern_update_api_blocks.each do |(methods, block)|
553
- controller.apipie_update_params(methods, &block)
567
+ controller.apipie_update_methods(methods, &block)
554
568
  end
555
569
  end
556
570
 
data/lib/apipie/markup.rb CHANGED
@@ -4,20 +4,23 @@ module Apipie
4
4
 
5
5
  class RDoc
6
6
 
7
- def initialize
8
- require 'rdoc'
9
- require 'rdoc/markup/to_html'
10
- if Gem::Version.new(::RDoc::VERSION) < Gem::Version.new('4.0.0')
11
- @rdoc ||= ::RDoc::Markup::ToHtml.new()
12
- else
13
- @rdoc ||= ::RDoc::Markup::ToHtml.new(::RDoc::Options.new)
14
- end
15
- end
16
-
17
7
  def to_html(text)
18
- @rdoc.convert(text)
8
+ rdoc.convert(text)
19
9
  end
20
10
 
11
+ private
12
+
13
+ def rdoc
14
+ @rdoc ||= begin
15
+ require 'rdoc'
16
+ require 'rdoc/markup/to_html'
17
+ if Gem::Version.new(::RDoc::VERSION) < Gem::Version.new('4.0.0')
18
+ ::RDoc::Markup::ToHtml.new()
19
+ else
20
+ ::RDoc::Markup::ToHtml.new(::RDoc::Options.new)
21
+ end
22
+ end
23
+ end
21
24
  end
22
25
 
23
26
  class Markdown
@@ -17,7 +17,8 @@ module Apipie
17
17
 
18
18
  end
19
19
 
20
- attr_reader :full_description, :method, :resource, :apis, :examples, :see, :formats, :metadata, :headers, :show
20
+ attr_reader :full_description, :method, :resource, :apis, :examples, :see, :formats, :headers, :show
21
+ attr_accessor :metadata
21
22
 
22
23
  def initialize(method, resource, dsl_data)
23
24
  @method = method.to_s
@@ -16,7 +16,7 @@ module Apipie
16
16
  end
17
17
 
18
18
  def format_path(rails_route)
19
- rails_route.path.spec.to_s.gsub('(.:format)', '')
19
+ File.join(rails_route.base_url, rails_route.path.spec.to_s.gsub('(.:format)', ''))
20
20
  end
21
21
 
22
22
  def format_verb(rails_route)
@@ -651,14 +651,15 @@ module Apipie
651
651
 
652
652
  def add_headers_from_hash(swagger_params_array, headers)
653
653
  swagger_headers = headers.map do |header|
654
- {
654
+ header_hash = {
655
655
  name: header[:name],
656
656
  in: 'header',
657
657
  required: header[:options][:required],
658
658
  description: header[:description],
659
659
  type: header[:options][:type] || 'string'
660
660
  }
661
-
661
+ header_hash[:default] = header[:options][:default] if header[:options][:default]
662
+ header_hash
662
663
  end
663
664
  swagger_params_array.push(*swagger_headers)
664
665
  end
@@ -129,6 +129,8 @@ module Apipie
129
129
  'array'
130
130
  elsif @type.ancestors.include? Numeric
131
131
  'numeric'
132
+ elsif @type.ancestors.include? File
133
+ 'file'
132
134
  else
133
135
  'string'
134
136
  end
@@ -1,3 +1,3 @@
1
1
  module Apipie
2
- VERSION = '0.5.15'
2
+ VERSION = "0.5.19"
3
3
  end
@@ -172,7 +172,12 @@ namespace :apipie do
172
172
  layouts_paths = [File.expand_path("../../../app/views/layouts", __FILE__)]
173
173
  layouts_paths.unshift("#{Rails.root}/app/views/layouts") if File.directory?("#{Rails.root}/app/views/layouts/apipie")
174
174
 
175
- @apipie_renderer = ActionView::Base.new(base_paths + layouts_paths)
175
+ if ActionView::Base.respond_to?(:with_empty_template_cache) && ActionView::Base.respond_to?(:with_view_paths)
176
+ @apipie_renderer = ActionView::Base.with_empty_template_cache.with_view_paths(base_paths + layouts_paths)
177
+ else
178
+ @apipie_renderer = ActionView::Base.new(base_paths + layouts_paths)
179
+ end
180
+
176
181
  @apipie_renderer.singleton_class.send(:include, ApipieHelper)
177
182
  return @apipie_renderer
178
183
  end
@@ -210,14 +215,14 @@ namespace :apipie do
210
215
  end
211
216
 
212
217
  def generate_json_page(file_base, doc, lang = nil)
213
- FileUtils.mkdir_p(file_base) unless File.exists?(file_base)
218
+ FileUtils.mkdir_p(file_base) unless File.exist?(file_base)
214
219
 
215
220
  filename = "schema_apipie#{lang_ext(lang)}.json"
216
221
  File.open("#{file_base}/#{filename}", 'w') { |file| file.write(JSON.pretty_generate(doc)) }
217
222
  end
218
223
 
219
224
  def generate_swagger_json_page(file_base, doc, sfx="", lang = nil)
220
- FileUtils.mkdir_p(file_base) unless File.exists?(file_base)
225
+ FileUtils.mkdir_p(file_base) unless File.exist?(file_base)
221
226
 
222
227
  path = Pathname.new("#{file_base}/schema_swagger#{sfx}#{lang_ext(lang)}.json")
223
228
  File.open(path, 'w') { |file| file.write(JSON.pretty_generate(doc)) }
@@ -226,21 +231,21 @@ namespace :apipie do
226
231
  end
227
232
 
228
233
  def generate_one_page(file_base, doc, lang = nil)
229
- FileUtils.mkdir_p(File.dirname(file_base)) unless File.exists?(File.dirname(file_base))
234
+ FileUtils.mkdir_p(File.dirname(file_base)) unless File.exist?(File.dirname(file_base))
230
235
 
231
236
  render_page("#{file_base}-onepage#{lang_ext(lang)}.html", "static", {:doc => doc[:docs],
232
237
  :language => lang, :languages => Apipie.configuration.languages})
233
238
  end
234
239
 
235
240
  def generate_plain_page(file_base, doc, lang = nil)
236
- FileUtils.mkdir_p(File.dirname(file_base)) unless File.exists?(File.dirname(file_base))
241
+ FileUtils.mkdir_p(File.dirname(file_base)) unless File.exist?(File.dirname(file_base))
237
242
 
238
243
  render_page("#{file_base}-plain#{lang_ext(lang)}.html", "plain", {:doc => doc[:docs],
239
244
  :language => lang, :languages => Apipie.configuration.languages}, nil)
240
245
  end
241
246
 
242
247
  def generate_index_page(file_base, doc, include_json = false, show_versions = false, lang = nil)
243
- FileUtils.mkdir_p(File.dirname(file_base)) unless File.exists?(File.dirname(file_base))
248
+ FileUtils.mkdir_p(File.dirname(file_base)) unless File.exist?(File.dirname(file_base))
244
249
  versions = show_versions && Apipie.available_versions
245
250
  render_page("#{file_base}#{lang_ext(lang)}.html", "index", {:doc => doc[:docs],
246
251
  :versions => versions, :language => lang, :languages => Apipie.configuration.languages})
@@ -251,7 +256,7 @@ namespace :apipie do
251
256
  def generate_resource_pages(version, file_base, doc, include_json = false, lang = nil)
252
257
  doc[:docs][:resources].each do |resource_name, _|
253
258
  resource_file_base = File.join(file_base, resource_name.to_s)
254
- FileUtils.mkdir_p(File.dirname(resource_file_base)) unless File.exists?(File.dirname(resource_file_base))
259
+ FileUtils.mkdir_p(File.dirname(resource_file_base)) unless File.exist?(File.dirname(resource_file_base))
255
260
 
256
261
  doc = Apipie.to_json(version, resource_name, nil, lang)
257
262
  doc[:docs][:link_extension] = (lang ? ".#{lang}.html" : ".html")
@@ -265,7 +270,7 @@ namespace :apipie do
265
270
  doc[:docs][:resources].each do |resource_name, resource_params|
266
271
  resource_params[:methods].each do |method|
267
272
  method_file_base = File.join(file_base, resource_name.to_s, method[:name].to_s)
268
- FileUtils.mkdir_p(File.dirname(method_file_base)) unless File.exists?(File.dirname(method_file_base))
273
+ FileUtils.mkdir_p(File.dirname(method_file_base)) unless File.exist?(File.dirname(method_file_base))
269
274
 
270
275
  doc = Apipie.to_json(version, resource_name, method[:name], lang)
271
276
  doc[:docs][:link_extension] = (lang ? ".#{lang}.html" : ".html")
@@ -329,7 +334,7 @@ MESSAGE
329
334
  desc "Convert your examples from the old yaml into the new json format"
330
335
  task :convert_examples => :environment do
331
336
  yaml_examples_file = File.join(Rails.root, Apipie.configuration.doc_path, "apipie_examples.yml")
332
- if File.exists?(yaml_examples_file)
337
+ if File.exist?(yaml_examples_file)
333
338
  #if SafeYAML gem is enabled, it will load examples as an array of Hash, instead of hash
334
339
  if defined? SafeYAML
335
340
  examples = YAML.load_file(yaml_examples_file, :safe=>false)
@@ -0,0 +1,366 @@
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "markdown",
5
+ "metadata": {},
6
+ "source": [
7
+ "## Release of apipie-rails gem\n",
8
+ "\n",
9
+ "### Requirements\n",
10
+ "- push access to https://github.com/Apipie/apipie-rails\n",
11
+ "- push access to rubygems.org for apipie-rails\n",
12
+ "- sudo yum install python-slugify asciidoc\n",
13
+ "- ensure neither the `git push` or `gem push` don't require interractive auth. If you can't use api key or ssh key to auth skip these steps and run them form the shell manually \n",
14
+ "\n",
15
+ "### Release process\n",
16
+ "- Follow the steps with `<Shift>+<Enter>` or `<Ctrl>+<Enter>,<Down>`\n",
17
+ "- If anything fails, fix it and re-run the step if applicable\n",
18
+ "\n",
19
+ "### Release settings"
20
+ ]
21
+ },
22
+ {
23
+ "cell_type": "code",
24
+ "execution_count": null,
25
+ "metadata": {},
26
+ "outputs": [],
27
+ "source": [
28
+ "%cd .."
29
+ ]
30
+ },
31
+ {
32
+ "cell_type": "markdown",
33
+ "metadata": {},
34
+ "source": [
35
+ "### Update the following notebook settings"
36
+ ]
37
+ },
38
+ {
39
+ "cell_type": "code",
40
+ "execution_count": null,
41
+ "metadata": {},
42
+ "outputs": [],
43
+ "source": [
44
+ "NEW_VERSION = '0.5.19'\n",
45
+ "LAST_VERSION = '0.5.18'\n",
46
+ "GIT_REMOTE_UPSTREAM = 'origin'\n",
47
+ "WORK_BRANCH = 'master'\n"
48
+ ]
49
+ },
50
+ {
51
+ "cell_type": "markdown",
52
+ "metadata": {},
53
+ "source": [
54
+ "### Ensure the repo is up to date"
55
+ ]
56
+ },
57
+ {
58
+ "cell_type": "code",
59
+ "execution_count": null,
60
+ "metadata": {},
61
+ "outputs": [],
62
+ "source": [
63
+ "! git checkout {WORK_BRANCH}"
64
+ ]
65
+ },
66
+ {
67
+ "cell_type": "code",
68
+ "execution_count": null,
69
+ "metadata": {},
70
+ "outputs": [],
71
+ "source": [
72
+ "! git fetch {GIT_REMOTE_UPSTREAM}"
73
+ ]
74
+ },
75
+ {
76
+ "cell_type": "code",
77
+ "execution_count": null,
78
+ "metadata": {},
79
+ "outputs": [],
80
+ "source": [
81
+ "! git rebase {GIT_REMOTE_UPSTREAM}/{WORK_BRANCH}"
82
+ ]
83
+ },
84
+ {
85
+ "cell_type": "markdown",
86
+ "metadata": {},
87
+ "source": [
88
+ "### Run tests localy"
89
+ ]
90
+ },
91
+ {
92
+ "cell_type": "code",
93
+ "execution_count": null,
94
+ "metadata": {},
95
+ "outputs": [],
96
+ "source": [
97
+ "! bundle update"
98
+ ]
99
+ },
100
+ {
101
+ "cell_type": "code",
102
+ "execution_count": null,
103
+ "metadata": {
104
+ "scrolled": true
105
+ },
106
+ "outputs": [],
107
+ "source": [
108
+ "! bundle exec rake"
109
+ ]
110
+ },
111
+ {
112
+ "cell_type": "markdown",
113
+ "metadata": {},
114
+ "source": [
115
+ "### Update release related stuff"
116
+ ]
117
+ },
118
+ {
119
+ "cell_type": "code",
120
+ "execution_count": null,
121
+ "metadata": {},
122
+ "outputs": [],
123
+ "source": [
124
+ "! sed -i 's/VERSION = .*/VERSION = \"{NEW_VERSION}\"/' lib/apipie/version.rb"
125
+ ]
126
+ },
127
+ {
128
+ "cell_type": "code",
129
+ "execution_count": null,
130
+ "metadata": {},
131
+ "outputs": [],
132
+ "source": [
133
+ "# Parse git changelog\n",
134
+ "from IPython.display import Markdown as md\n",
135
+ "from subprocess import check_output\n",
136
+ "from shlex import split\n",
137
+ "import re\n",
138
+ "\n",
139
+ "def format_log_entry(entry):\n",
140
+ " author = re.search(r'author:(.*)', entry).group(1)\n",
141
+ " entry = re.sub(r'author:(.*)', '', entry)\n",
142
+ " entry = re.sub(r'([fF]ixes|[rR]efs)[^-]*-\\s*(.*)', r'\\2', entry)\n",
143
+ " entry = '* ' + entry.capitalize()\n",
144
+ " entry = re.sub(r'\\(#([0-9]+)\\)', r'[#\\1](https://github.com/Apipie/apipie-rails/pull/\\1)', entry)\n",
145
+ " entry = entry + f'({author})'\n",
146
+ " return entry\n",
147
+ "\n",
148
+ "def skip(entry):\n",
149
+ " if re.match(r'Merge pull', entry) or \\\n",
150
+ " re.match(r'^i18n', entry) or \\\n",
151
+ " re.match(r'^Bump to version', entry):\n",
152
+ " return True\n",
153
+ " else:\n",
154
+ " return False \n",
155
+ "git_log_cmd = 'git log --pretty=format:\"%%s author:%%an\" v%s..HEAD' % LAST_VERSION\n",
156
+ "log = check_output(split(git_log_cmd)).decode('utf8').split('\\n')\n",
157
+ "change_log = [format_log_entry(e) for e in log if not skip(e)]\n",
158
+ "md('\\n'.join(change_log))\n"
159
+ ]
160
+ },
161
+ {
162
+ "cell_type": "code",
163
+ "execution_count": null,
164
+ "metadata": {},
165
+ "outputs": [],
166
+ "source": [
167
+ "# Write release notes\n",
168
+ "from datetime import datetime\n",
169
+ "import fileinput\n",
170
+ "import sys\n",
171
+ "\n",
172
+ "fh = fileinput.input('CHANGELOG.md', inplace=True) \n",
173
+ "for line in fh: \n",
174
+ " print(line.rstrip())\n",
175
+ " if re.match(r'========', line):\n",
176
+ " print('## [v%s](https://github.com/Apipie/apipie-rails/tree/v%s) (%s)' % (NEW_VERSION, NEW_VERSION, datetime.today().strftime('%Y-%m-%d')))\n",
177
+ " print('[Full Changelog](https://github.com/Apipie/apipie-rails/compare/v%s...v%s)' % (LAST_VERSION, NEW_VERSION))\n",
178
+ " for entry in change_log:\n",
179
+ " print(entry)\n",
180
+ " print('')\n",
181
+ "fh.close() "
182
+ ]
183
+ },
184
+ {
185
+ "cell_type": "markdown",
186
+ "metadata": {},
187
+ "source": [
188
+ "#### Manual step: Update deps in the gemspec if neccessary"
189
+ ]
190
+ },
191
+ {
192
+ "cell_type": "markdown",
193
+ "metadata": {},
194
+ "source": [
195
+ "### Check what is going to be commited"
196
+ ]
197
+ },
198
+ {
199
+ "cell_type": "code",
200
+ "execution_count": null,
201
+ "metadata": {
202
+ "scrolled": false
203
+ },
204
+ "outputs": [],
205
+ "source": [
206
+ "! git add -u\n",
207
+ "! git status"
208
+ ]
209
+ },
210
+ {
211
+ "cell_type": "code",
212
+ "execution_count": null,
213
+ "metadata": {
214
+ "scrolled": true
215
+ },
216
+ "outputs": [],
217
+ "source": [
218
+ "! git diff --cached"
219
+ ]
220
+ },
221
+ {
222
+ "cell_type": "markdown",
223
+ "metadata": {},
224
+ "source": [
225
+ "### Commit changes"
226
+ ]
227
+ },
228
+ {
229
+ "cell_type": "code",
230
+ "execution_count": null,
231
+ "metadata": {
232
+ "scrolled": true
233
+ },
234
+ "outputs": [],
235
+ "source": [
236
+ "! git commit -m \"Bump to {NEW_VERSION}\""
237
+ ]
238
+ },
239
+ {
240
+ "cell_type": "markdown",
241
+ "metadata": {},
242
+ "source": [
243
+ "### Tag new version"
244
+ ]
245
+ },
246
+ {
247
+ "cell_type": "code",
248
+ "execution_count": null,
249
+ "metadata": {},
250
+ "outputs": [],
251
+ "source": [
252
+ "! git tag v{NEW_VERSION}"
253
+ ]
254
+ },
255
+ {
256
+ "cell_type": "markdown",
257
+ "metadata": {},
258
+ "source": [
259
+ "### Build the gem"
260
+ ]
261
+ },
262
+ {
263
+ "cell_type": "code",
264
+ "execution_count": null,
265
+ "metadata": {},
266
+ "outputs": [],
267
+ "source": [
268
+ "! rake build"
269
+ ]
270
+ },
271
+ {
272
+ "cell_type": "code",
273
+ "execution_count": null,
274
+ "metadata": {},
275
+ "outputs": [],
276
+ "source": [
277
+ "! gem push pkg/apipie-rails-{NEW_VERSION}.gem"
278
+ ]
279
+ },
280
+ {
281
+ "cell_type": "markdown",
282
+ "metadata": {},
283
+ "source": [
284
+ "### PUSH the changes upstream If everything is correct"
285
+ ]
286
+ },
287
+ {
288
+ "cell_type": "code",
289
+ "execution_count": null,
290
+ "metadata": {},
291
+ "outputs": [],
292
+ "source": [
293
+ "! git push {GIT_REMOTE_UPSTREAM} {WORK_BRANCH}"
294
+ ]
295
+ },
296
+ {
297
+ "cell_type": "code",
298
+ "execution_count": null,
299
+ "metadata": {},
300
+ "outputs": [],
301
+ "source": [
302
+ "! git push --tags {GIT_REMOTE_UPSTREAM} {WORK_BRANCH}"
303
+ ]
304
+ },
305
+ {
306
+ "cell_type": "markdown",
307
+ "metadata": {},
308
+ "source": [
309
+ "#### Now the new release is in upstream repo"
310
+ ]
311
+ },
312
+ {
313
+ "cell_type": "markdown",
314
+ "metadata": {},
315
+ "source": [
316
+ "### Some manual steps follow to improve the UX\n",
317
+ "\n",
318
+ "#### New relase on GitHub\n",
319
+ "\n",
320
+ "Copy the following changelog lines to the description in form on link below\n",
321
+ "The release title is the new version."
322
+ ]
323
+ },
324
+ {
325
+ "cell_type": "code",
326
+ "execution_count": null,
327
+ "metadata": {},
328
+ "outputs": [],
329
+ "source": [
330
+ "print('\\n')\n",
331
+ "print('\\n'.join(change_log))\n",
332
+ "print('\\n\\nhttps://github.com/Apipie/apipie-rails/releases/new?tag=%s' % NEW_VERSION)"
333
+ ]
334
+ },
335
+ {
336
+ "cell_type": "markdown",
337
+ "metadata": {},
338
+ "source": [
339
+ "## Congratulations\n",
340
+ "\n",
341
+ "Release is public now."
342
+ ]
343
+ }
344
+ ],
345
+ "metadata": {
346
+ "kernelspec": {
347
+ "display_name": "Python 3",
348
+ "language": "python",
349
+ "name": "python3"
350
+ },
351
+ "language_info": {
352
+ "codemirror_mode": {
353
+ "name": "ipython",
354
+ "version": 3
355
+ },
356
+ "file_extension": ".py",
357
+ "mimetype": "text/x-python",
358
+ "name": "python",
359
+ "nbconvert_exporter": "python",
360
+ "pygments_lexer": "ipython3",
361
+ "version": "3.6.8"
362
+ }
363
+ },
364
+ "nbformat": 4,
365
+ "nbformat_minor": 2
366
+ }
@@ -7,5 +7,8 @@ describe ExtendedController do
7
7
  user_param = Apipie["extended#create"].params[:user]
8
8
  expect(user_param.validator.params_ordered.map(&:name)).to eq [:name, :password, :from_concern]
9
9
  end
10
- end
11
10
 
11
+ it 'should include updated metadata' do
12
+ expect(Apipie['extended#create'].metadata).to eq metadata: 'data'
13
+ end
14
+ end
@@ -0,0 +1,10 @@
1
+ require 'spec_helper'
2
+
3
+ describe TestEngine::MemesController do
4
+
5
+ describe "#index" do
6
+ it "should have the full mounted path of engine" do
7
+ Apipie.routes_for_action(TestEngine::MemesController, :index, {}).first[:path].should eq("/test/memes")
8
+ end
9
+ end
10
+ end
@@ -488,12 +488,24 @@ describe UsersController do
488
488
  }
489
489
  end
490
490
 
491
+ let(:expected_header_with_default) do
492
+ {
493
+ name: :HeaderNameWithDefaultValue,
494
+ description: 'Header with default value',
495
+ options: {
496
+ required: true,
497
+ default: 'default value'
498
+ }
499
+ }
500
+ end
501
+
491
502
  it 'contains all headers description in method doc' do
492
503
  headers = Apipie.get_method_description(UsersController, :action_with_headers).headers
493
504
  expect(headers).to be_an(Array)
494
505
 
495
506
  compare_hashes headers[0], expected_required_header
496
507
  compare_hashes headers[1], expected_optional_header
508
+ compare_hashes headers[2], expected_header_with_default
497
509
  end
498
510
  end
499
511
 
@@ -6,6 +6,7 @@ module Concerns
6
6
  param :user, Hash do
7
7
  param :from_concern, String, :desc => 'param from concern', :allow_nil => false
8
8
  end
9
+ meta metadata: 'data'
9
10
  end
10
11
  end
11
12
  end
@@ -292,6 +292,7 @@ class UsersController < ApplicationController
292
292
  api :GET, '/users/action_with_headers'
293
293
  header :RequredHeaderName, 'Required header description', required: true
294
294
  header :OptionalHeaderName, 'Optional header description', required: false, type: 'string'
295
+ header :HeaderNameWithDefaultValue, 'Header with default value', required: true, default: 'default value'
295
296
  def action_with_headers
296
297
  end
297
298
  end
@@ -0,0 +1,6 @@
1
+ source "https://rubygems.org"
2
+
3
+ # Declare your gem's dependencies in test_engine.gemspec.
4
+ # Bundler will treat runtime dependencies like base dependencies, and
5
+ # development dependencies will be added by default to the :development group.
6
+ gemspec
@@ -0,0 +1,4 @@
1
+ module TestEngine
2
+ class ApplicationController < ActionController::Base
3
+ end
4
+ end
@@ -0,0 +1,37 @@
1
+ module TestEngine
2
+ class MemesController < TestEngine::ApplicationController
3
+ api! 'Returns a list of all good memes on Twitter'
4
+ param :api_token, String, required: true, desc: 'Your Twitter API token'
5
+ def index
6
+ render json: []
7
+ end
8
+
9
+ api! 'Shows info about a particular meme on Twitter'
10
+ param :id, :number, required: true, desc: 'ID of the meme'
11
+ def show
12
+ render json: {id: params[:id]}
13
+ end
14
+
15
+ api! 'Create a new meme on Twitter'
16
+ param :api_token, String, required: true, desc: 'Your Twitter API token'
17
+ param :name, String, required: true, desc: 'Name of your meme'
18
+ param :src_url, String, required: true, desc: 'URL for your meme'
19
+ def create
20
+ render json: {name: params[:name], src_url: params[:src_url]}, status: :created
21
+ end
22
+
23
+ api! 'Update a meme on Twitter'
24
+ param :api_token, String, required: true, desc: 'Your Twitter API token'
25
+ param :name, String, required: false, desc: 'Name of your meme'
26
+ param :src_url, String, required: false, desc: 'URL for your meme'
27
+ def update
28
+ render json: {name: params[:name], src_url: params[:src_url]}
29
+ end
30
+
31
+ api! 'Delete a meme on Twitter'
32
+ param :id, :number, required: true, desc: 'ID of the meme'
33
+ def destroy
34
+ head :ok
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,3 @@
1
+ TestEngine::Engine.routes.draw do
2
+ resources :memes, only: [:index, :show, :create, :update, :destroy]
3
+ end
File without changes
@@ -0,0 +1,7 @@
1
+ require 'apipie-rails'
2
+
3
+ module TestEngine
4
+ class Engine < ::Rails::Engine
5
+ isolate_namespace TestEngine
6
+ end
7
+ end
@@ -0,0 +1,11 @@
1
+ $:.push File.expand_path('../lib', __FILE__)
2
+
3
+ # Describe your gem and declare its dependencies:
4
+ Gem::Specification.new do |s|
5
+ s.name = 'test_engine'
6
+ s.version = '0.0.1'
7
+ s.summary = 'Test Engine'
8
+ s.authors = 'Test Author'
9
+
10
+ s.files = Dir['{app,config,db,lib}/**/*']
11
+ end
@@ -8,6 +8,7 @@ require "action_mailer/railtie"
8
8
 
9
9
  Bundler.require
10
10
  require "apipie-rails"
11
+ require "test_engine"
11
12
 
12
13
  module Dummy
13
14
  class Application < Rails::Application
@@ -1,5 +1,7 @@
1
1
  Dummy::Application.routes.draw do
2
2
 
3
+ mount TestEngine::Engine => '/test'
4
+
3
5
  scope ENV['RAILS_RELATIVE_URL_ROOT'] || '/' do
4
6
 
5
7
  scope '/api' do
data/spec/spec_helper.rb CHANGED
@@ -8,6 +8,7 @@ require File.expand_path("../dummy/config/environment", __FILE__)
8
8
  require 'rspec/rails'
9
9
 
10
10
  require 'apipie-rails'
11
+ require 'test_engine'
11
12
 
12
13
  module Rails4Compatibility
13
14
  module Testing
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apipie-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.15
4
+ version: 0.5.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Pokorny
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-01-03 00:00:00.000000000 Z
12
+ date: 2021-07-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -155,6 +155,8 @@ files:
155
155
  - Gemfile.rails42
156
156
  - Gemfile.rails50
157
157
  - Gemfile.rails51
158
+ - Gemfile.rails60
159
+ - Gemfile.rails61
158
160
  - MIT-LICENSE
159
161
  - NOTICE
160
162
  - PROPOSAL_FOR_RESPONSE_DESCRIPTIONS.md
@@ -207,6 +209,7 @@ files:
207
209
  - lib/apipie/apipie_module.rb
208
210
  - lib/apipie/application.rb
209
211
  - lib/apipie/configuration.rb
212
+ - lib/apipie/core_ext/route.rb
210
213
  - lib/apipie/dsl_definition.rb
211
214
  - lib/apipie/error_description.rb
212
215
  - lib/apipie/errors.rb
@@ -237,6 +240,7 @@ files:
237
240
  - lib/generators/apipie/install/templates/initializer.rb.erb
238
241
  - lib/generators/apipie/views_generator.rb
239
242
  - lib/tasks/apipie.rake
243
+ - rel-eng/gem_release.ipynb
240
244
  - rel-eng/packages/.readme
241
245
  - rel-eng/packages/rubygem-apipie-rails
242
246
  - rel-eng/tito.props
@@ -246,6 +250,7 @@ files:
246
250
  - spec/controllers/apipies_controller_spec.rb
247
251
  - spec/controllers/concerns_controller_spec.rb
248
252
  - spec/controllers/extended_controller_spec.rb
253
+ - spec/controllers/memes_controller_spec.rb
249
254
  - spec/controllers/users_controller_spec.rb
250
255
  - spec/dummy/Rakefile
251
256
  - spec/dummy/app/controllers/api/base_controller.rb
@@ -270,6 +275,13 @@ files:
270
275
  - spec/dummy/app/controllers/twitter_example_controller.rb
271
276
  - spec/dummy/app/controllers/users_controller.rb
272
277
  - spec/dummy/app/views/layouts/application.html.erb
278
+ - spec/dummy/components/test_engine/Gemfile
279
+ - spec/dummy/components/test_engine/app/controllers/test_engine/application_controller.rb
280
+ - spec/dummy/components/test_engine/app/controllers/test_engine/memes_controller.rb
281
+ - spec/dummy/components/test_engine/config/routes.rb
282
+ - spec/dummy/components/test_engine/db/.gitkeep
283
+ - spec/dummy/components/test_engine/lib/test_engine.rb
284
+ - spec/dummy/components/test_engine/test_engine.gemspec
273
285
  - spec/dummy/config.ru
274
286
  - spec/dummy/config/application.rb
275
287
  - spec/dummy/config/boot.rb
@@ -331,8 +343,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
331
343
  - !ruby/object:Gem::Version
332
344
  version: '0'
333
345
  requirements: []
334
- rubyforge_project:
335
- rubygems_version: 2.5.1
346
+ rubygems_version: 3.1.2
336
347
  signing_key:
337
348
  specification_version: 4
338
349
  summary: Rails REST API documentation tool
@@ -343,6 +354,7 @@ test_files:
343
354
  - spec/controllers/apipies_controller_spec.rb
344
355
  - spec/controllers/concerns_controller_spec.rb
345
356
  - spec/controllers/extended_controller_spec.rb
357
+ - spec/controllers/memes_controller_spec.rb
346
358
  - spec/controllers/users_controller_spec.rb
347
359
  - spec/dummy/Rakefile
348
360
  - spec/dummy/app/controllers/api/base_controller.rb
@@ -367,6 +379,13 @@ test_files:
367
379
  - spec/dummy/app/controllers/twitter_example_controller.rb
368
380
  - spec/dummy/app/controllers/users_controller.rb
369
381
  - spec/dummy/app/views/layouts/application.html.erb
382
+ - spec/dummy/components/test_engine/Gemfile
383
+ - spec/dummy/components/test_engine/app/controllers/test_engine/application_controller.rb
384
+ - spec/dummy/components/test_engine/app/controllers/test_engine/memes_controller.rb
385
+ - spec/dummy/components/test_engine/config/routes.rb
386
+ - spec/dummy/components/test_engine/db/.gitkeep
387
+ - spec/dummy/components/test_engine/lib/test_engine.rb
388
+ - spec/dummy/components/test_engine/test_engine.gemspec
370
389
  - spec/dummy/config.ru
371
390
  - spec/dummy/config/application.rb
372
391
  - spec/dummy/config/boot.rb