betterdocs 0.3.0 → 0.4.0

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: 3db95985948a6ea7f7ef6fedb7057c9403c51629
4
- data.tar.gz: 6a6bb0a36b82481e1e7451e533423ab00d765d95
3
+ metadata.gz: a2dce2da10a7aa53142585ae1bcd71e01647ac0a
4
+ data.tar.gz: 39cc4830e670c791553e3b2fc6682dac1f9f0d35
5
5
  SHA512:
6
- metadata.gz: 6515adc1cf8a4faeb58e15acc26dc7129f5658b990cd2bf42506f1fb6508df219dbf87645772cbbd7cb2373c0272d35ba1ba05830a8246f7f9b9ac050f3c7243
7
- data.tar.gz: 7914bad33f84a4a36aff48cb2173ab89d47b8d1c64dcb72143ee68bc4c776d200590eb9635265232dfc249b566a2930227760bd1b0c7a8b8f60b36d75b56ee59
6
+ metadata.gz: 14435b08ce425e42850d60294b562626fcbd0a74b9ac3df8f8a468b43cfb204607cb73a8590d74223cbd35acd38c3438a362cc531db4017450a70288abcf1456
7
+ data.tar.gz: 76eb043df9dc0017a110e3d4f416d67f6f4f40eaeaea2447825b034e36a134fccdfa50e6f64b06db1e2892a8ba59e40e10844bd5730451b7c37171a1c4d95077
data/Rakefile CHANGED
@@ -17,7 +17,7 @@ GemHadar do
17
17
  title "#{name.camelize} -- "
18
18
 
19
19
  dependency 'tins', '~>1.3', '>=1.3.5'
20
- dependency 'rails', '>=3', '<5'
20
+ dependency 'rails', '>=3', '<6'
21
21
  dependency 'term-ansicolor', '~>1.3'
22
22
  dependency 'complex_config', '~>0.5'
23
23
  development_dependency 'simplecov'
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.0
1
+ 0.4.0
@@ -1,51 +1,51 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: betterdocs 0.3.0 ruby lib
2
+ # stub: betterdocs 0.4.0 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
- s.name = "betterdocs"
6
- s.version = "0.3.0"
5
+ s.name = "betterdocs".freeze
6
+ s.version = "0.4.0"
7
7
 
8
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
9
- s.require_paths = ["lib"]
10
- s.authors = ["betterplace Developers"]
11
- s.date = "2016-06-13"
12
- s.description = "This library provides tools to generate API documention for a web site's REST-ful JSON API."
13
- s.email = "developers@betterplace.org"
14
- s.extra_rdoc_files = ["README.md", "lib/betterdocs.rb", "lib/betterdocs/controller_collector.rb", "lib/betterdocs/dsl.rb", "lib/betterdocs/dsl/common.rb", "lib/betterdocs/dsl/controller.rb", "lib/betterdocs/dsl/controller/action.rb", "lib/betterdocs/dsl/controller/action/param.rb", "lib/betterdocs/dsl/controller/action/response.rb", "lib/betterdocs/dsl/controller/controller.rb", "lib/betterdocs/dsl/controller/controller_base.rb", "lib/betterdocs/dsl/json_params.rb", "lib/betterdocs/dsl/json_params/param.rb", "lib/betterdocs/dsl/json_type_mapper.rb", "lib/betterdocs/dsl/naming.rb", "lib/betterdocs/dsl/representer.rb", "lib/betterdocs/dsl/result.rb", "lib/betterdocs/dsl/result/collection_property.rb", "lib/betterdocs/dsl/result/link.rb", "lib/betterdocs/dsl/result/property.rb", "lib/betterdocs/generator/config_shortcuts.rb", "lib/betterdocs/generator/markdown.rb", "lib/betterdocs/global.rb", "lib/betterdocs/json_params_representer.rb", "lib/betterdocs/json_params_representer_collector.rb", "lib/betterdocs/json_time_with_zone.rb", "lib/betterdocs/mix_into_controller.rb", "lib/betterdocs/railtie.rb", "lib/betterdocs/rake_tasks.rb", "lib/betterdocs/representer.rb", "lib/betterdocs/result_representer.rb", "lib/betterdocs/result_representer_collector.rb", "lib/betterdocs/section.rb", "lib/betterdocs/version.rb"]
15
- s.files = [".codeclimate.yml", ".gitignore", ".rspec", ".travis.yml", "COPYING", "Gemfile", "LICENSE", "README.md", "Rakefile", "VERSION", "betterdocs.gemspec", "lib/betterdocs.rb", "lib/betterdocs/controller_collector.rb", "lib/betterdocs/dsl.rb", "lib/betterdocs/dsl/common.rb", "lib/betterdocs/dsl/controller.rb", "lib/betterdocs/dsl/controller/action.rb", "lib/betterdocs/dsl/controller/action/param.rb", "lib/betterdocs/dsl/controller/action/response.rb", "lib/betterdocs/dsl/controller/controller.rb", "lib/betterdocs/dsl/controller/controller_base.rb", "lib/betterdocs/dsl/json_params.rb", "lib/betterdocs/dsl/json_params/param.rb", "lib/betterdocs/dsl/json_type_mapper.rb", "lib/betterdocs/dsl/naming.rb", "lib/betterdocs/dsl/representer.rb", "lib/betterdocs/dsl/result.rb", "lib/betterdocs/dsl/result/collection_property.rb", "lib/betterdocs/dsl/result/link.rb", "lib/betterdocs/dsl/result/property.rb", "lib/betterdocs/generator/config_shortcuts.rb", "lib/betterdocs/generator/markdown.rb", "lib/betterdocs/generator/markdown/templates/README.md.erb", "lib/betterdocs/generator/markdown/templates/section.md.erb", "lib/betterdocs/global.rb", "lib/betterdocs/json_params_representer.rb", "lib/betterdocs/json_params_representer_collector.rb", "lib/betterdocs/json_time_with_zone.rb", "lib/betterdocs/mix_into_controller.rb", "lib/betterdocs/railtie.rb", "lib/betterdocs/rake_tasks.rb", "lib/betterdocs/representer.rb", "lib/betterdocs/result_representer.rb", "lib/betterdocs/result_representer_collector.rb", "lib/betterdocs/section.rb", "lib/betterdocs/tasks/doc.rake", "lib/betterdocs/version.rb", "spec/assets/app/controllers/api/foos_controller.rb", "spec/assets/config/betterdocs.yml", "spec/controller_dsl_spec.rb", "spec/generator/markdown_spec.rb", "spec/global_spec.rb", "spec/json_params_representer_spec.rb", "spec/json_type_mapper_spec.rb", "spec/result_representer_dsl_spec.rb", "spec/result_representer_spec.rb", "spec/spec_helper.rb"]
16
- s.homepage = "http://github.com/betterplace/betterdocs"
17
- s.rdoc_options = ["--title", "Betterdocs -- ", "--main", "README.md"]
18
- s.rubygems_version = "2.5.1"
19
- s.summary = "Betterplace API documentation library"
20
- s.test_files = ["spec/assets/app/controllers/api/foos_controller.rb", "spec/controller_dsl_spec.rb", "spec/generator/markdown_spec.rb", "spec/global_spec.rb", "spec/json_params_representer_spec.rb", "spec/json_type_mapper_spec.rb", "spec/result_representer_dsl_spec.rb", "spec/result_representer_spec.rb", "spec/spec_helper.rb"]
8
+ s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
9
+ s.require_paths = ["lib".freeze]
10
+ s.authors = ["betterplace Developers".freeze]
11
+ s.date = "2016-12-07"
12
+ s.description = "This library provides tools to generate API documention for a web site's REST-ful JSON API.".freeze
13
+ s.email = "developers@betterplace.org".freeze
14
+ s.extra_rdoc_files = ["README.md".freeze, "lib/betterdocs.rb".freeze, "lib/betterdocs/controller_collector.rb".freeze, "lib/betterdocs/dsl.rb".freeze, "lib/betterdocs/dsl/common.rb".freeze, "lib/betterdocs/dsl/controller.rb".freeze, "lib/betterdocs/dsl/controller/action.rb".freeze, "lib/betterdocs/dsl/controller/action/param.rb".freeze, "lib/betterdocs/dsl/controller/action/response.rb".freeze, "lib/betterdocs/dsl/controller/controller.rb".freeze, "lib/betterdocs/dsl/controller/controller_base.rb".freeze, "lib/betterdocs/dsl/json_params.rb".freeze, "lib/betterdocs/dsl/json_params/param.rb".freeze, "lib/betterdocs/dsl/json_type_mapper.rb".freeze, "lib/betterdocs/dsl/naming.rb".freeze, "lib/betterdocs/dsl/representer.rb".freeze, "lib/betterdocs/dsl/result.rb".freeze, "lib/betterdocs/dsl/result/collection_property.rb".freeze, "lib/betterdocs/dsl/result/link.rb".freeze, "lib/betterdocs/dsl/result/property.rb".freeze, "lib/betterdocs/generator/config_shortcuts.rb".freeze, "lib/betterdocs/generator/markdown.rb".freeze, "lib/betterdocs/global.rb".freeze, "lib/betterdocs/json_params_representer.rb".freeze, "lib/betterdocs/json_params_representer_collector.rb".freeze, "lib/betterdocs/json_time_with_zone.rb".freeze, "lib/betterdocs/mix_into_controller.rb".freeze, "lib/betterdocs/railtie.rb".freeze, "lib/betterdocs/rake_tasks.rb".freeze, "lib/betterdocs/representer.rb".freeze, "lib/betterdocs/result_representer.rb".freeze, "lib/betterdocs/result_representer_collector.rb".freeze, "lib/betterdocs/section.rb".freeze, "lib/betterdocs/version.rb".freeze]
15
+ s.files = [".codeclimate.yml".freeze, ".gitignore".freeze, ".rspec".freeze, ".travis.yml".freeze, "COPYING".freeze, "Gemfile".freeze, "LICENSE".freeze, "README.md".freeze, "Rakefile".freeze, "VERSION".freeze, "betterdocs.gemspec".freeze, "lib/betterdocs.rb".freeze, "lib/betterdocs/controller_collector.rb".freeze, "lib/betterdocs/dsl.rb".freeze, "lib/betterdocs/dsl/common.rb".freeze, "lib/betterdocs/dsl/controller.rb".freeze, "lib/betterdocs/dsl/controller/action.rb".freeze, "lib/betterdocs/dsl/controller/action/param.rb".freeze, "lib/betterdocs/dsl/controller/action/response.rb".freeze, "lib/betterdocs/dsl/controller/controller.rb".freeze, "lib/betterdocs/dsl/controller/controller_base.rb".freeze, "lib/betterdocs/dsl/json_params.rb".freeze, "lib/betterdocs/dsl/json_params/param.rb".freeze, "lib/betterdocs/dsl/json_type_mapper.rb".freeze, "lib/betterdocs/dsl/naming.rb".freeze, "lib/betterdocs/dsl/representer.rb".freeze, "lib/betterdocs/dsl/result.rb".freeze, "lib/betterdocs/dsl/result/collection_property.rb".freeze, "lib/betterdocs/dsl/result/link.rb".freeze, "lib/betterdocs/dsl/result/property.rb".freeze, "lib/betterdocs/generator/config_shortcuts.rb".freeze, "lib/betterdocs/generator/markdown.rb".freeze, "lib/betterdocs/generator/markdown/templates/README.md.erb".freeze, "lib/betterdocs/generator/markdown/templates/section.md.erb".freeze, "lib/betterdocs/global.rb".freeze, "lib/betterdocs/json_params_representer.rb".freeze, "lib/betterdocs/json_params_representer_collector.rb".freeze, "lib/betterdocs/json_time_with_zone.rb".freeze, "lib/betterdocs/mix_into_controller.rb".freeze, "lib/betterdocs/railtie.rb".freeze, "lib/betterdocs/rake_tasks.rb".freeze, "lib/betterdocs/representer.rb".freeze, "lib/betterdocs/result_representer.rb".freeze, "lib/betterdocs/result_representer_collector.rb".freeze, "lib/betterdocs/section.rb".freeze, "lib/betterdocs/tasks/doc.rake".freeze, "lib/betterdocs/version.rb".freeze, "spec/assets/app/controllers/api/foos_controller.rb".freeze, "spec/assets/config/betterdocs.yml".freeze, "spec/controller_dsl_spec.rb".freeze, "spec/generator/markdown_spec.rb".freeze, "spec/global_spec.rb".freeze, "spec/json_params_representer_spec.rb".freeze, "spec/json_type_mapper_spec.rb".freeze, "spec/result_representer_dsl_spec.rb".freeze, "spec/result_representer_spec.rb".freeze, "spec/spec_helper.rb".freeze]
16
+ s.homepage = "http://github.com/betterplace/betterdocs".freeze
17
+ s.rdoc_options = ["--title".freeze, "Betterdocs -- ".freeze, "--main".freeze, "README.md".freeze]
18
+ s.rubygems_version = "2.6.8".freeze
19
+ s.summary = "Betterplace API documentation library".freeze
20
+ s.test_files = ["spec/assets/app/controllers/api/foos_controller.rb".freeze, "spec/controller_dsl_spec.rb".freeze, "spec/generator/markdown_spec.rb".freeze, "spec/global_spec.rb".freeze, "spec/json_params_representer_spec.rb".freeze, "spec/json_type_mapper_spec.rb".freeze, "spec/result_representer_dsl_spec.rb".freeze, "spec/result_representer_spec.rb".freeze, "spec/spec_helper.rb".freeze]
21
21
 
22
22
  if s.respond_to? :specification_version then
23
23
  s.specification_version = 4
24
24
 
25
25
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
26
- s.add_development_dependency(%q<gem_hadar>, ["~> 1.7.1"])
27
- s.add_development_dependency(%q<simplecov>, [">= 0"])
28
- s.add_development_dependency(%q<rspec>, [">= 0"])
29
- s.add_runtime_dependency(%q<tins>, [">= 1.3.5", "~> 1.3"])
30
- s.add_runtime_dependency(%q<rails>, ["< 5", ">= 3"])
31
- s.add_runtime_dependency(%q<term-ansicolor>, ["~> 1.3"])
32
- s.add_runtime_dependency(%q<complex_config>, ["~> 0.5"])
26
+ s.add_development_dependency(%q<gem_hadar>.freeze, ["~> 1.9.1"])
27
+ s.add_development_dependency(%q<simplecov>.freeze, [">= 0"])
28
+ s.add_development_dependency(%q<rspec>.freeze, [">= 0"])
29
+ s.add_runtime_dependency(%q<tins>.freeze, [">= 1.3.5", "~> 1.3"])
30
+ s.add_runtime_dependency(%q<rails>.freeze, ["< 6", ">= 3"])
31
+ s.add_runtime_dependency(%q<term-ansicolor>.freeze, ["~> 1.3"])
32
+ s.add_runtime_dependency(%q<complex_config>.freeze, ["~> 0.5"])
33
33
  else
34
- s.add_dependency(%q<gem_hadar>, ["~> 1.7.1"])
35
- s.add_dependency(%q<simplecov>, [">= 0"])
36
- s.add_dependency(%q<rspec>, [">= 0"])
37
- s.add_dependency(%q<tins>, [">= 1.3.5", "~> 1.3"])
38
- s.add_dependency(%q<rails>, ["< 5", ">= 3"])
39
- s.add_dependency(%q<term-ansicolor>, ["~> 1.3"])
40
- s.add_dependency(%q<complex_config>, ["~> 0.5"])
34
+ s.add_dependency(%q<gem_hadar>.freeze, ["~> 1.9.1"])
35
+ s.add_dependency(%q<simplecov>.freeze, [">= 0"])
36
+ s.add_dependency(%q<rspec>.freeze, [">= 0"])
37
+ s.add_dependency(%q<tins>.freeze, [">= 1.3.5", "~> 1.3"])
38
+ s.add_dependency(%q<rails>.freeze, ["< 6", ">= 3"])
39
+ s.add_dependency(%q<term-ansicolor>.freeze, ["~> 1.3"])
40
+ s.add_dependency(%q<complex_config>.freeze, ["~> 0.5"])
41
41
  end
42
42
  else
43
- s.add_dependency(%q<gem_hadar>, ["~> 1.7.1"])
44
- s.add_dependency(%q<simplecov>, [">= 0"])
45
- s.add_dependency(%q<rspec>, [">= 0"])
46
- s.add_dependency(%q<tins>, [">= 1.3.5", "~> 1.3"])
47
- s.add_dependency(%q<rails>, ["< 5", ">= 3"])
48
- s.add_dependency(%q<term-ansicolor>, ["~> 1.3"])
49
- s.add_dependency(%q<complex_config>, ["~> 0.5"])
43
+ s.add_dependency(%q<gem_hadar>.freeze, ["~> 1.9.1"])
44
+ s.add_dependency(%q<simplecov>.freeze, [">= 0"])
45
+ s.add_dependency(%q<rspec>.freeze, [">= 0"])
46
+ s.add_dependency(%q<tins>.freeze, [">= 1.3.5", "~> 1.3"])
47
+ s.add_dependency(%q<rails>.freeze, ["< 6", ">= 3"])
48
+ s.add_dependency(%q<term-ansicolor>.freeze, ["~> 1.3"])
49
+ s.add_dependency(%q<complex_config>.freeze, ["~> 0.5"])
50
50
  end
51
51
  end
@@ -126,7 +126,7 @@ are optional.
126
126
  ## Response Example
127
127
 
128
128
  ```json
129
- <%= JSON.pretty_generate(action.response) %>
129
+ <%= JSON.pretty_generate(action.response, quirks_mode: true) %>
130
130
  ```
131
131
 
132
132
  <%- end -%>
@@ -4,7 +4,7 @@ module Betterdocs::JsonParamsRepresenter
4
4
 
5
5
  module ClassMethods
6
6
  def build_result_object
7
- ActionController::Parameters.new
7
+ {}.with_indifferent_access
8
8
  end
9
9
 
10
10
  def hashify(object)
@@ -1,6 +1,6 @@
1
1
  module Betterdocs
2
2
  # Betterdocs version
3
- VERSION = '0.3.0'
3
+ VERSION = '0.4.0'
4
4
  VERSION_ARRAY = VERSION.split('.').map(&:to_i) # :nodoc:
5
5
  VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
6
6
  VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
@@ -39,7 +39,7 @@ RSpec.describe Betterdocs::JsonParamsRepresenter do
39
39
  end
40
40
 
41
41
  it 'can be converted into a ActionController::Parameters instance' do
42
- expect(object.as_json).to be_a ActionController::Parameters
42
+ expect(object.as_json).to be_a HashWithIndifferentAccess
43
43
  end
44
44
 
45
45
  it 'it can be turned into a hash' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: betterdocs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - betterplace Developers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-13 00:00:00.000000000 Z
11
+ date: 2016-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gem_hadar
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.7.1
19
+ version: 1.9.1
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.7.1
26
+ version: 1.9.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: simplecov
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -81,7 +81,7 @@ dependencies:
81
81
  version: '3'
82
82
  - - "<"
83
83
  - !ruby/object:Gem::Version
84
- version: '5'
84
+ version: '6'
85
85
  type: :runtime
86
86
  prerelease: false
87
87
  version_requirements: !ruby/object:Gem::Requirement
@@ -91,7 +91,7 @@ dependencies:
91
91
  version: '3'
92
92
  - - "<"
93
93
  - !ruby/object:Gem::Version
94
- version: '5'
94
+ version: '6'
95
95
  - !ruby/object:Gem::Dependency
96
96
  name: term-ansicolor
97
97
  requirement: !ruby/object:Gem::Requirement
@@ -241,7 +241,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
241
241
  version: '0'
242
242
  requirements: []
243
243
  rubyforge_project:
244
- rubygems_version: 2.5.1
244
+ rubygems_version: 2.6.8
245
245
  signing_key:
246
246
  specification_version: 4
247
247
  summary: Betterplace API documentation library