rspec-rails-api 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RSpec
4
+ module Rails
5
+ module Api
6
+ VERSION = '0.1.0'
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'rspec/rails/api/dsl/example_group'
4
+ require 'rspec/rails/api/dsl/example'
5
+ require 'rspec/rails/api/entity_config'
6
+ require 'rspec/rails/api/field_config'
7
+ require 'rspec/rails/api/matchers'
8
+ require 'rspec/rails/api/metadata'
9
+ require 'rspec/rails/api/open_api_renderer'
10
+ require 'rspec/rails/api/version'
11
+
12
+ module RSpec
13
+ module Rails
14
+ module Api
15
+ class Error < StandardError
16
+ end
17
+
18
+ PARAM_TYPES = {
19
+ int32: { type: 'integer', format: 'int32', class: Integer },
20
+ int64: { type: 'integer', format: 'int64', class: Integer },
21
+ float: { type: 'number', format: 'float', class: Float },
22
+ double: { type: 'number', format: 'double', class: Float },
23
+ byte: { type: 'string', format: 'byte', class: String },
24
+ binary: { type: 'string', format: 'binary', class: String },
25
+ date: { type: 'string', format: 'date', class: String },
26
+ datetime: { type: 'string', format: 'date-time', class: String },
27
+ password: { type: 'string', format: 'password', class: String },
28
+ boolean: { type: 'boolean', format: nil },
29
+ string: { type: 'string', format: nil, class: String },
30
+ integer: { type: 'integer', format: nil, class: Integer },
31
+ number: { type: 'number', format: nil, class: Float },
32
+ array: { type: 'array', format: nil, class: Array },
33
+ object: { type: 'object', format: nil, class: Hash },
34
+ }.freeze
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ lib = File.expand_path('lib', __dir__)
4
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
+ require 'rspec/rails/api/version'
6
+
7
+ Gem::Specification.new do |spec|
8
+ spec.name = 'rspec-rails-api'
9
+ spec.version = RSpec::Rails::Api::VERSION
10
+ spec.authors = ['Manuel Tancoigne']
11
+ spec.email = ['m.tancoigne@gmail.com']
12
+
13
+ spec.summary = 'Tests standard Rails API responses and generate doc'
14
+ spec.description = <<~TXT
15
+ Create acceptance tests to check the Rails API responses and generate
16
+ documentation from it.
17
+ TXT
18
+ spec.homepage = 'https://gitlab.com/experimentslabs/rspec-rails-api'
19
+ spec.license = 'MIT'
20
+
21
+ # Specify which files should be added to the gem when it is released.
22
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
23
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
24
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
25
+ end
26
+ spec.bindir = 'exe'
27
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28
+ spec.require_paths = ['lib']
29
+
30
+ spec.add_development_dependency 'activesupport', '>= 5.2'
31
+ spec.add_development_dependency 'bundler', '~> 1.17'
32
+ spec.add_development_dependency 'rake', '~> 10.0'
33
+ spec.add_development_dependency 'rspec', '~> 3.0'
34
+ spec.add_development_dependency 'rubocop'
35
+ spec.add_development_dependency 'rubocop-performance'
36
+ spec.add_development_dependency 'simplecov'
37
+ end
metadata ADDED
@@ -0,0 +1,168 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rspec-rails-api
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Manuel Tancoigne
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2019-10-21 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: activesupport
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '5.2'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '5.2'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.17'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.17'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '10.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '10.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '3.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '3.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rubocop
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: rubocop-performance
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: simplecov
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
+ description: |
112
+ Create acceptance tests to check the Rails API responses and generate
113
+ documentation from it.
114
+ email:
115
+ - m.tancoigne@gmail.com
116
+ executables: []
117
+ extensions: []
118
+ extra_rdoc_files: []
119
+ files:
120
+ - ".gitignore"
121
+ - ".gitlab-ci.yml"
122
+ - ".rspec"
123
+ - ".rubocop.yml"
124
+ - ".travis.yml"
125
+ - CODE_OF_CONDUCT.md
126
+ - Gemfile
127
+ - LICENSE.txt
128
+ - README.md
129
+ - Rakefile
130
+ - bin/console
131
+ - bin/setup
132
+ - examples/commented.rb
133
+ - lib/rspec/rails/api/dsl/example.rb
134
+ - lib/rspec/rails/api/dsl/example_group.rb
135
+ - lib/rspec/rails/api/entity_config.rb
136
+ - lib/rspec/rails/api/field_config.rb
137
+ - lib/rspec/rails/api/matchers.rb
138
+ - lib/rspec/rails/api/metadata.rb
139
+ - lib/rspec/rails/api/open_api_renderer.rb
140
+ - lib/rspec/rails/api/utils.rb
141
+ - lib/rspec/rails/api/version.rb
142
+ - lib/rspec_rails_api.rb
143
+ - rspec-rails-api.gemspec
144
+ homepage: https://gitlab.com/experimentslabs/rspec-rails-api
145
+ licenses:
146
+ - MIT
147
+ metadata: {}
148
+ post_install_message:
149
+ rdoc_options: []
150
+ require_paths:
151
+ - lib
152
+ required_ruby_version: !ruby/object:Gem::Requirement
153
+ requirements:
154
+ - - ">="
155
+ - !ruby/object:Gem::Version
156
+ version: '0'
157
+ required_rubygems_version: !ruby/object:Gem::Requirement
158
+ requirements:
159
+ - - ">="
160
+ - !ruby/object:Gem::Version
161
+ version: '0'
162
+ requirements: []
163
+ rubyforge_project:
164
+ rubygems_version: 2.7.6
165
+ signing_key:
166
+ specification_version: 4
167
+ summary: Tests standard Rails API responses and generate doc
168
+ test_files: []