request_handler 2.2.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +8 -2
- data/.rubocop.yml +13 -14
- data/.rubocop_todo.yml +105 -0
- data/CHANGELOG.md +10 -1
- data/Gemfile +1 -10
- data/Guardfile +4 -4
- data/Rakefile +7 -6
- data/bin/console +3 -3
- data/lib/request_handler/base.rb +42 -38
- data/lib/request_handler/body_parser.rb +5 -4
- data/lib/request_handler/builder/base.rb +1 -1
- data/lib/request_handler/builder/body_builder.rb +1 -1
- data/lib/request_handler/builder/fieldsets_builder.rb +2 -2
- data/lib/request_handler/builder/fieldsets_resource_builder.rb +1 -1
- data/lib/request_handler/builder/filter_builder.rb +1 -1
- data/lib/request_handler/builder/headers_builder.rb +1 -1
- data/lib/request_handler/builder/include_options_builder.rb +1 -1
- data/lib/request_handler/builder/multipart_builder.rb +2 -2
- data/lib/request_handler/builder/multipart_resource_builder.rb +1 -1
- data/lib/request_handler/builder/options_builder.rb +12 -10
- data/lib/request_handler/builder/page_builder.rb +2 -2
- data/lib/request_handler/builder/page_resource_builder.rb +1 -1
- data/lib/request_handler/builder/query_builder.rb +1 -1
- data/lib/request_handler/builder/sort_options_builder.rb +1 -1
- data/lib/request_handler/concerns/config_helper.rb +2 -2
- data/lib/request_handler/config.rb +3 -3
- data/lib/request_handler/document_parser.rb +6 -6
- data/lib/request_handler/error.rb +17 -1
- data/lib/request_handler/fieldsets_parser.rb +28 -24
- data/lib/request_handler/filter_parser.rb +15 -13
- data/lib/request_handler/header_parser.rb +10 -9
- data/lib/request_handler/include_option_parser.rb +18 -17
- data/lib/request_handler/json_api_document_parser.rb +31 -15
- data/lib/request_handler/json_parser.rb +4 -3
- data/lib/request_handler/multipart_parser.rb +20 -15
- data/lib/request_handler/option_parser.rb +3 -3
- data/lib/request_handler/page_parser.rb +33 -25
- data/lib/request_handler/query_parser.rb +6 -6
- data/lib/request_handler/schema_parser.rb +20 -17
- data/lib/request_handler/sort_option_parser.rb +19 -15
- data/lib/request_handler/validation/definition_engine.rb +8 -6
- data/lib/request_handler/validation/dry_engine.rb +9 -7
- data/lib/request_handler/validation/engine.rb +4 -3
- data/lib/request_handler/validation/errors.rb +2 -0
- data/lib/request_handler/validation/result.rb +1 -0
- data/lib/request_handler/version.rb +1 -1
- data/lib/request_handler.rb +8 -8
- data/request_handler.gemspec +42 -36
- metadata +179 -52
- data/lib/request_handler/base_parser.rb +0 -9
@@ -1,23 +1,28 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
4
|
-
require
|
3
|
+
require "request_handler/concerns/config_helper"
|
4
|
+
require "request_handler/error"
|
5
5
|
|
6
6
|
module RequestHandler
|
7
|
-
class PageParser
|
7
|
+
class PageParser
|
8
|
+
include RequestHandler::Concerns::ConfigHelper
|
9
|
+
|
8
10
|
def initialize(params:, page_config:)
|
9
11
|
missing_arguments = []
|
10
|
-
missing_arguments << { params:
|
11
|
-
missing_arguments << { page_config:
|
12
|
-
raise MissingArgumentError
|
13
|
-
|
14
|
-
|
12
|
+
missing_arguments << { params: "is missing" } if params.nil?
|
13
|
+
missing_arguments << { page_config: "is missing" } if page_config.nil?
|
14
|
+
raise MissingArgumentError.new(missing_arguments) unless missing_arguments.empty?
|
15
|
+
|
16
|
+
@page_options = params.fetch("page") { {} }
|
17
|
+
raise PageParamsError.new(page: "must be a Hash") unless @page_options.is_a?(Hash)
|
18
|
+
|
15
19
|
@config = page_config
|
16
20
|
end
|
17
21
|
|
18
22
|
def run
|
19
23
|
cfg = deep_to_h(config).keys.reduce(base_page) do |memo, key|
|
20
24
|
next memo if TOP_LEVEL_PAGE_KEYS.include?(key)
|
25
|
+
|
21
26
|
memo.merge!("#{key}#{separator}number".to_sym => extract_number(prefix: key),
|
22
27
|
"#{key}#{separator}size".to_sym => extract_size(prefix: key))
|
23
28
|
end
|
@@ -37,12 +42,13 @@ module RequestHandler
|
|
37
42
|
def check_for_missing_options(config)
|
38
43
|
missing_arguments = page_options.keys - config.keys.map(&:to_s)
|
39
44
|
return if missing_arguments.empty?
|
40
|
-
|
41
|
-
|
45
|
+
|
46
|
+
missing_arguments.map! { |e| e.gsub(separator, ".") }
|
47
|
+
warn "client sent unknown option #{missing_arguments}" unless missing_arguments.empty?
|
42
48
|
end
|
43
49
|
|
44
50
|
def extract_number(prefix: nil)
|
45
|
-
number_string = lookup_nested_params_key(
|
51
|
+
number_string = lookup_nested_params_key("number", prefix) || 1
|
46
52
|
check_int(string: number_string, param: "#{prefix}.number")
|
47
53
|
end
|
48
54
|
|
@@ -50,41 +56,43 @@ module RequestHandler
|
|
50
56
|
size = fetch_and_check_size(prefix)
|
51
57
|
default_size = fetch_and_check_default_size(prefix)
|
52
58
|
return default_size if size.nil?
|
59
|
+
|
53
60
|
apply_max_size_constraint(size, prefix)
|
54
61
|
end
|
55
62
|
|
56
63
|
def fetch_and_check_default_size(prefix)
|
57
|
-
default_size = lookup_nested_config_key(
|
64
|
+
default_size = lookup_nested_config_key("default_size", prefix)
|
58
65
|
raise_no_default_size(prefix) if default_size.nil?
|
59
|
-
raise_not_positive(prefix,
|
66
|
+
raise_not_positive(prefix, "size") unless default_size.is_a?(Integer) && default_size.positive?
|
60
67
|
default_size
|
61
68
|
end
|
62
69
|
|
63
70
|
def fetch_and_check_size(prefix)
|
64
|
-
size_string = lookup_nested_params_key(
|
71
|
+
size_string = lookup_nested_params_key("size", prefix)
|
65
72
|
return nil if size_string.nil?
|
73
|
+
|
66
74
|
check_int(string: size_string, param: "#{prefix}.size") unless size_string.nil?
|
67
75
|
end
|
68
76
|
|
69
77
|
def check_int(string:, param:)
|
70
78
|
output = Integer(string)
|
71
|
-
raise_page_param_error!(param) unless output
|
79
|
+
raise_page_param_error!(param) unless output.positive?
|
72
80
|
output
|
73
81
|
rescue ArgumentError
|
74
82
|
raise_page_param_error!(param)
|
75
83
|
end
|
76
84
|
|
77
85
|
def raise_page_param_error!(param)
|
78
|
-
raise PageParamsError
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
86
|
+
raise PageParamsError.new([{
|
87
|
+
code: "INVALID_QUERY_PARAMETER",
|
88
|
+
status: "400",
|
89
|
+
detail: "must be a positive integer",
|
90
|
+
source: { parameter: "page[#{param}]" }
|
91
|
+
}])
|
84
92
|
end
|
85
93
|
|
86
94
|
def apply_max_size_constraint(size, prefix)
|
87
|
-
max_size = lookup_nested_config_key(
|
95
|
+
max_size = lookup_nested_config_key("max_size", prefix)
|
88
96
|
case max_size
|
89
97
|
when Integer
|
90
98
|
[max_size, size].min
|
@@ -92,7 +100,7 @@ module RequestHandler
|
|
92
100
|
warn "#{prefix} max_size config not set"
|
93
101
|
size
|
94
102
|
else
|
95
|
-
raise_not_positive(prefix,
|
103
|
+
raise_not_positive(prefix, "max_size", " ")
|
96
104
|
end
|
97
105
|
end
|
98
106
|
|
@@ -111,11 +119,11 @@ module RequestHandler
|
|
111
119
|
end
|
112
120
|
|
113
121
|
def raise_no_default_size(prefix, sep = separator)
|
114
|
-
raise NoConfigAvailableError
|
122
|
+
raise NoConfigAvailableError.new("#{prefix}#{sep}size": "has no default_size")
|
115
123
|
end
|
116
124
|
|
117
125
|
def raise_not_positive(prefix, key, sep = separator)
|
118
|
-
raise InternalArgumentError
|
126
|
+
raise InternalArgumentError.new("#{prefix}#{sep}#{key}": "must be a positive Integer")
|
119
127
|
end
|
120
128
|
|
121
129
|
def separator
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
4
|
-
require
|
3
|
+
require "request_handler/schema_parser"
|
4
|
+
require "request_handler/error"
|
5
5
|
module RequestHandler
|
6
6
|
class QueryParser < SchemaParser
|
7
7
|
RESERVED_KEYS = %w[fields filter include page sort].freeze
|
@@ -15,13 +15,13 @@ module RequestHandler
|
|
15
15
|
def run
|
16
16
|
validate_schema(query)
|
17
17
|
rescue SchemaValidationError => e
|
18
|
-
raise ExternalArgumentError
|
18
|
+
raise ExternalArgumentError.new((e.errors.map do |schema_error|
|
19
19
|
param = schema_error[:source][:pointer]
|
20
|
-
{ status:
|
21
|
-
code:
|
20
|
+
{ status: "400",
|
21
|
+
code: "#{query[param] ? 'INVALID' : 'MISSING'}_QUERY_PARAMETER",
|
22
22
|
detail: schema_error[:detail],
|
23
23
|
source: { parameter: param } }
|
24
|
-
end)
|
24
|
+
end))
|
25
25
|
end
|
26
26
|
|
27
27
|
private
|
@@ -1,14 +1,15 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
3
|
+
require "request_handler/error"
|
4
4
|
module RequestHandler
|
5
5
|
class SchemaParser
|
6
6
|
def initialize(schema:, schema_options: {})
|
7
7
|
missing_arguments = []
|
8
|
-
missing_arguments << { schema:
|
9
|
-
missing_arguments << { schema_options:
|
10
|
-
raise MissingArgumentError
|
11
|
-
raise InternalArgumentError
|
8
|
+
missing_arguments << { schema: "is missing" } if schema.nil?
|
9
|
+
missing_arguments << { schema_options: "is missing" } if schema_options.nil?
|
10
|
+
raise MissingArgumentError.new(missing_arguments) unless missing_arguments.empty?
|
11
|
+
raise InternalArgumentError.new(schema: "must be a Schema") unless validation_engine.valid_schema?(schema)
|
12
|
+
|
12
13
|
@schema = schema
|
13
14
|
@schema_options = schema_options
|
14
15
|
end
|
@@ -16,7 +17,8 @@ module RequestHandler
|
|
16
17
|
private
|
17
18
|
|
18
19
|
def validate_schema(data, with: schema)
|
19
|
-
raise MissingArgumentError
|
20
|
+
raise MissingArgumentError.new(data: "is missing") if data.nil?
|
21
|
+
|
20
22
|
validator = validate(data, schema: with)
|
21
23
|
validation_failure?(validator)
|
22
24
|
validator.output
|
@@ -32,7 +34,7 @@ module RequestHandler
|
|
32
34
|
errors = build_errors(validator.errors).map do |error|
|
33
35
|
jsonapi_error(error)
|
34
36
|
end
|
35
|
-
raise SchemaValidationError
|
37
|
+
raise SchemaValidationError.new(errors)
|
36
38
|
end
|
37
39
|
|
38
40
|
def build_errors(error_hash, path = [])
|
@@ -46,19 +48,19 @@ module RequestHandler
|
|
46
48
|
end
|
47
49
|
|
48
50
|
def error(path, element, failure)
|
49
|
-
schema_pointer = validation_engine.error_pointer(failure) || (path + [element]).join(
|
51
|
+
schema_pointer = validation_engine.error_pointer(failure) || (path + [element]).join("/")
|
50
52
|
{
|
51
|
-
schema_pointer:
|
52
|
-
element:
|
53
|
-
message:
|
53
|
+
schema_pointer: schema_pointer,
|
54
|
+
element: element,
|
55
|
+
message: validation_engine.error_message(failure)
|
54
56
|
}
|
55
57
|
end
|
56
58
|
|
57
59
|
def jsonapi_error(error)
|
58
60
|
{
|
59
|
-
status:
|
60
|
-
code:
|
61
|
-
title:
|
61
|
+
status: "422",
|
62
|
+
code: "INVALID_RESOURCE_SCHEMA",
|
63
|
+
title: "Invalid resource",
|
62
64
|
detail: error[:message],
|
63
65
|
source: { pointer: build_pointer(error) }
|
64
66
|
}
|
@@ -69,9 +71,10 @@ module RequestHandler
|
|
69
71
|
end
|
70
72
|
|
71
73
|
def add_note(v, k, memo)
|
72
|
-
memo[k] =
|
73
|
-
|
74
|
-
|
74
|
+
memo[k] = case v
|
75
|
+
when Array
|
76
|
+
v.join(" ")
|
77
|
+
when Hash
|
75
78
|
v.each { |(val, key)| add_note(val, key, memo) }
|
76
79
|
end
|
77
80
|
memo
|
@@ -1,35 +1,39 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
4
|
-
require
|
5
|
-
require
|
3
|
+
require "request_handler/option_parser"
|
4
|
+
require "request_handler/error"
|
5
|
+
require "request_handler/sort_option"
|
6
6
|
module RequestHandler
|
7
7
|
class SortOptionParser < OptionParser
|
8
8
|
def run
|
9
|
-
return [] unless params.key?(
|
9
|
+
return [] unless params.key?("sort")
|
10
|
+
|
10
11
|
sort_options = parse_options(fetch_options)
|
11
|
-
raise SortParamsError
|
12
|
+
raise SortParamsError.new([jsonapi_error("sort options must be unique")]) if duplicates?(sort_options)
|
13
|
+
|
12
14
|
sort_options
|
13
15
|
end
|
14
16
|
|
15
17
|
def fetch_options
|
16
|
-
raise SortParamsError
|
17
|
-
|
18
|
+
raise SortParamsError.new([jsonapi_error("must not be empty")]) if empty_param?("sort")
|
19
|
+
|
20
|
+
params.fetch("sort", "").split(",")
|
18
21
|
end
|
19
22
|
|
20
23
|
def parse_options(options)
|
21
24
|
options.map do |option|
|
22
25
|
name, order = parse_option(option)
|
23
|
-
name.gsub!(
|
26
|
+
name.gsub!(".", ::RequestHandler.configuration.separator)
|
24
27
|
allowed_option(name)
|
25
28
|
SortOption.new(name, order)
|
26
29
|
end
|
27
30
|
end
|
28
31
|
|
29
32
|
def parse_option(option)
|
30
|
-
raise SortParamsError
|
31
|
-
|
32
|
-
|
33
|
+
raise SortParamsError.new([jsonapi_error("must not contain spaces")]) if option.include? " "
|
34
|
+
|
35
|
+
if option.start_with?("-")
|
36
|
+
[option[1..], :desc]
|
33
37
|
else
|
34
38
|
[option, :asc]
|
35
39
|
end
|
@@ -38,7 +42,7 @@ module RequestHandler
|
|
38
42
|
def allowed_option(name)
|
39
43
|
RequestHandler.configuration.validation_engine.validate!(name, allowed_options_type).output
|
40
44
|
rescue Validation::Error
|
41
|
-
raise OptionNotAllowedError
|
45
|
+
raise OptionNotAllowedError.new([jsonapi_error("#{name} is not an allowed sort option")])
|
42
46
|
end
|
43
47
|
|
44
48
|
def duplicates?(options)
|
@@ -49,9 +53,9 @@ module RequestHandler
|
|
49
53
|
|
50
54
|
def jsonapi_error(detail)
|
51
55
|
{
|
52
|
-
code:
|
53
|
-
status:
|
54
|
-
source: { parameter:
|
56
|
+
code: "INVALID_QUERY_PARAMETER",
|
57
|
+
status: "400",
|
58
|
+
source: { parameter: "sort" },
|
55
59
|
detail: detail
|
56
60
|
}
|
57
61
|
end
|
@@ -1,7 +1,9 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
require_relative
|
4
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "errors"
|
4
|
+
require_relative "engine"
|
5
|
+
require_relative "result"
|
6
|
+
require "active_support/core_ext/hash/keys"
|
5
7
|
|
6
8
|
module RequestHandler
|
7
9
|
module Validation
|
@@ -17,7 +19,7 @@ module RequestHandler
|
|
17
19
|
end
|
18
20
|
|
19
21
|
def self.validate!(value, schema, options: {})
|
20
|
-
validate(value, schema, options).tap do |result|
|
22
|
+
validate(value, schema, options: options).tap do |result|
|
21
23
|
valid = result.respond_to?(:valid?) ? result.valid? : result.success?
|
22
24
|
raise Validation::Error unless valid
|
23
25
|
end
|
@@ -28,7 +30,7 @@ module RequestHandler
|
|
28
30
|
end
|
29
31
|
|
30
32
|
def self.error_pointer(validation_error)
|
31
|
-
validation_error.error_path.join(
|
33
|
+
validation_error.error_path.join("/")
|
32
34
|
end
|
33
35
|
end
|
34
36
|
end
|
@@ -1,7 +1,9 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
require_relative
|
4
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "errors"
|
4
|
+
require_relative "engine"
|
5
|
+
require_relative "result"
|
6
|
+
require "active_support/core_ext/hash/keys"
|
5
7
|
|
6
8
|
module RequestHandler
|
7
9
|
module Validation
|
@@ -14,14 +16,14 @@ module RequestHandler
|
|
14
16
|
value = value.deep_symbolize_keys if value.is_a?(Hash)
|
15
17
|
to_result(call_schema(value, schema, options))
|
16
18
|
rescue Dry::Types::ConstraintError => e
|
17
|
-
Result.new(output: nil, errors: {
|
19
|
+
Result.new(output: nil, errors: { "" => e })
|
18
20
|
end
|
19
21
|
|
20
22
|
def self.call_schema(value, schema, options)
|
21
23
|
if options.empty?
|
22
24
|
schema_instance?(schema) ? schema.call(value) : schema.new.call(value)
|
23
25
|
else
|
24
|
-
schema_instance?(schema) ? schema.with(options).call(value) : schema.new(options).call(value)
|
26
|
+
schema_instance?(schema) ? schema.with(**options).call(value) : schema.new(**options).call(value)
|
25
27
|
end
|
26
28
|
end
|
27
29
|
|
@@ -34,7 +36,7 @@ module RequestHandler
|
|
34
36
|
end
|
35
37
|
|
36
38
|
def self.validate!(value, schema, options: {})
|
37
|
-
validate(value, schema, options).tap do |result|
|
39
|
+
validate(value, schema, options: options).tap do |result|
|
38
40
|
valid = result.respond_to?(:valid?) ? result.valid? : result.success?
|
39
41
|
raise Validation::Error unless valid
|
40
42
|
end
|
@@ -1,5 +1,6 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
|
2
|
-
require_relative
|
3
|
+
require_relative "errors"
|
3
4
|
|
4
5
|
module RequestHandler
|
5
6
|
module Validation
|
@@ -8,11 +9,11 @@ module RequestHandler
|
|
8
9
|
raise NotImplementedError
|
9
10
|
end
|
10
11
|
|
11
|
-
def self.validate(_value, _schema, options: {})
|
12
|
+
def self.validate(_value, _schema, options: {})
|
12
13
|
raise NotImplementedError
|
13
14
|
end
|
14
15
|
|
15
|
-
def self.validate!(_value, _schema, options: {})
|
16
|
+
def self.validate!(_value, _schema, options: {})
|
16
17
|
raise NotImplementedError
|
17
18
|
end
|
18
19
|
|
data/lib/request_handler.rb
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
4
|
-
require
|
5
|
-
require
|
6
|
-
require
|
7
|
-
require
|
8
|
-
require
|
3
|
+
require "request_handler/version"
|
4
|
+
require "request_handler/base"
|
5
|
+
require "request_handler/validation/dry_engine"
|
6
|
+
require "multi_json"
|
7
|
+
require "logger"
|
8
|
+
require "gem_config"
|
9
9
|
|
10
10
|
module RequestHandler
|
11
11
|
include GemConfig::Base
|
12
12
|
|
13
13
|
with_configuration do
|
14
14
|
has :validation_engine
|
15
|
-
has :logger, default: Logger.new(
|
16
|
-
has :separator, classes: [String], default:
|
15
|
+
has :logger, default: Logger.new($stdout)
|
16
|
+
has :separator, classes: [String], default: "__"
|
17
17
|
has :raise_jsonapi_errors, default: false
|
18
18
|
end
|
19
19
|
end
|
data/request_handler.gemspec
CHANGED
@@ -1,48 +1,54 @@
|
|
1
|
-
# coding: utf-8
|
2
1
|
# frozen_string_literal: true
|
3
2
|
|
4
|
-
lib = File.expand_path(
|
3
|
+
lib = File.expand_path("lib", __dir__)
|
5
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
6
|
-
require
|
5
|
+
require "request_handler/version"
|
7
6
|
Gem::Specification.new do |spec|
|
8
|
-
spec.name =
|
7
|
+
spec.name = "request_handler"
|
9
8
|
spec.version = RequestHandler::VERSION
|
10
|
-
spec.authors = [
|
11
|
-
spec.email = [
|
9
|
+
spec.authors = ["Andreas Eger", "Dominik Goltermann"]
|
10
|
+
spec.email = ["andreas.eger@runtastic.com", "dominik.goltermann@runtastic.com"]
|
12
11
|
|
13
|
-
spec.summary =
|
14
|
-
spec.description =
|
15
|
-
spec.homepage =
|
16
|
-
spec.license =
|
17
|
-
spec.required_ruby_version =
|
12
|
+
spec.summary = "shared base for request_handler using dry-* gems"
|
13
|
+
spec.description = "shared base for request_handler using dry-* gems"
|
14
|
+
spec.homepage = "https://github.com/runtastic/request_handler"
|
15
|
+
spec.license = "MIT"
|
16
|
+
spec.required_ruby_version = ">= 2.6"
|
18
17
|
|
19
18
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
20
19
|
f.match(%r{^(test|spec|features)/})
|
21
20
|
end
|
22
|
-
spec.bindir =
|
21
|
+
spec.bindir = "exe"
|
23
22
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
|
-
spec.require_paths = [
|
25
|
-
|
26
|
-
spec.
|
27
|
-
spec.
|
28
|
-
spec.
|
29
|
-
spec.
|
30
|
-
|
31
|
-
spec.add_development_dependency
|
32
|
-
spec.add_development_dependency
|
33
|
-
spec.add_development_dependency
|
34
|
-
spec.add_development_dependency
|
35
|
-
spec.add_development_dependency
|
36
|
-
spec.add_development_dependency
|
37
|
-
|
38
|
-
spec.add_development_dependency
|
39
|
-
spec.add_development_dependency
|
40
|
-
|
41
|
-
spec.add_development_dependency
|
42
|
-
spec.add_development_dependency
|
43
|
-
spec.add_development_dependency
|
44
|
-
|
45
|
-
spec.add_development_dependency
|
46
|
-
|
47
|
-
spec.add_development_dependency
|
23
|
+
spec.require_paths = ["lib"]
|
24
|
+
|
25
|
+
spec.add_runtime_dependency "activesupport", "> 4.0"
|
26
|
+
spec.add_runtime_dependency "docile", "~> 1.3"
|
27
|
+
spec.add_runtime_dependency "gem_config", "~> 0.3 "
|
28
|
+
spec.add_runtime_dependency "multi_json", "~> 1.12"
|
29
|
+
|
30
|
+
spec.add_development_dependency "bundler"
|
31
|
+
spec.add_development_dependency "codecov"
|
32
|
+
spec.add_development_dependency "danger"
|
33
|
+
spec.add_development_dependency "danger-commit_lint"
|
34
|
+
spec.add_development_dependency "danger-rubocop"
|
35
|
+
spec.add_development_dependency "definition", "~> 0.7"
|
36
|
+
spec.add_development_dependency "dry-types", "~> 1.0"
|
37
|
+
spec.add_development_dependency "dry-validation", "~> 1.0"
|
38
|
+
spec.add_development_dependency "fuubar", "~> 2.2"
|
39
|
+
spec.add_development_dependency "guard"
|
40
|
+
spec.add_development_dependency "guard-rspec"
|
41
|
+
spec.add_development_dependency "guard-rubocop"
|
42
|
+
spec.add_development_dependency "rack"
|
43
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
44
|
+
spec.add_development_dependency "rspec", "~> 3.5"
|
45
|
+
spec.add_development_dependency "rspec_junit_formatter"
|
46
|
+
spec.add_development_dependency "rt_rubocop_defaults", "~> 2.5"
|
47
|
+
spec.add_development_dependency "rubocop", "~> 1.44"
|
48
|
+
spec.add_development_dependency "rubocop-rake", "~> 0.6"
|
49
|
+
spec.add_development_dependency "rubocop-rspec", "~> 2.18"
|
50
|
+
spec.add_development_dependency "rubocop_runner", "~> 2.0"
|
51
|
+
spec.add_development_dependency "simplecov"
|
52
|
+
|
53
|
+
spec.metadata["rubygems_mfa_required"] = "true"
|
48
54
|
end
|