media_types 2.2.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/debian.yml +43 -43
- data/.github/workflows/publish-bookworm.yml +33 -0
- data/.github/workflows/publish-sid.yml +33 -0
- data/.github/workflows/ruby.yml +22 -22
- data/.gitignore +20 -10
- data/.rubocop.yml +29 -29
- data/CHANGELOG.md +175 -164
- data/Gemfile +6 -6
- data/LICENSE +21 -21
- data/README.md +666 -664
- data/Rakefile +12 -12
- data/bin/console +15 -15
- data/bin/setup +8 -8
- data/lib/media_types/constructable.rb +161 -160
- data/lib/media_types/dsl/errors.rb +18 -18
- data/lib/media_types/dsl.rb +172 -172
- data/lib/media_types/errors.rb +25 -19
- data/lib/media_types/formatter.rb +56 -56
- data/lib/media_types/hash.rb +21 -21
- data/lib/media_types/object.rb +35 -35
- data/lib/media_types/scheme/allow_nil.rb +30 -30
- data/lib/media_types/scheme/any_of.rb +41 -41
- data/lib/media_types/scheme/attribute.rb +46 -46
- data/lib/media_types/scheme/enumeration_context.rb +18 -18
- data/lib/media_types/scheme/enumeration_of_type.rb +80 -80
- data/lib/media_types/scheme/errors.rb +87 -87
- data/lib/media_types/scheme/links.rb +54 -54
- data/lib/media_types/scheme/missing_validation.rb +41 -41
- data/lib/media_types/scheme/not_strict.rb +15 -15
- data/lib/media_types/scheme/output_empty_guard.rb +45 -45
- data/lib/media_types/scheme/output_iterator_with_predicate.rb +66 -66
- data/lib/media_types/scheme/output_type_guard.rb +39 -39
- data/lib/media_types/scheme/rules.rb +186 -173
- data/lib/media_types/scheme/rules_exhausted_guard.rb +73 -73
- data/lib/media_types/scheme/validation_options.rb +44 -43
- data/lib/media_types/scheme.rb +535 -513
- data/lib/media_types/testing/assertions.rb +20 -20
- data/lib/media_types/validations.rb +118 -105
- data/lib/media_types/version.rb +5 -5
- data/lib/media_types/views.rb +12 -12
- data/lib/media_types.rb +73 -73
- data/media_types.gemspec +33 -33
- metadata +8 -6
@@ -1,20 +1,20 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module MediaTypes
|
4
|
-
module Testing
|
5
|
-
module Assertions
|
6
|
-
def assert_media_type_format(media_type, output, **opts)
|
7
|
-
return pass unless media_type.validatable?
|
8
|
-
|
9
|
-
assert media_type.validate!(output, **opts)
|
10
|
-
end
|
11
|
-
|
12
|
-
def assert_mediatype(mediatype)
|
13
|
-
mediatype.assert_sane!
|
14
|
-
assert mediatype.media_type_validations.scheme.asserted_sane?
|
15
|
-
rescue MediaTypes::AssertionError => e
|
16
|
-
flunk e.message
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module MediaTypes
|
4
|
+
module Testing
|
5
|
+
module Assertions
|
6
|
+
def assert_media_type_format(media_type, output, **opts)
|
7
|
+
return pass unless media_type.validatable?
|
8
|
+
|
9
|
+
assert media_type.validate!(output, **opts)
|
10
|
+
end
|
11
|
+
|
12
|
+
def assert_mediatype(mediatype)
|
13
|
+
mediatype.assert_sane!
|
14
|
+
assert mediatype.media_type_validations.scheme.asserted_sane?
|
15
|
+
rescue MediaTypes::AssertionError => e
|
16
|
+
flunk e.message
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -1,105 +1,118 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'media_types/scheme'
|
4
|
-
|
5
|
-
module MediaTypes
|
6
|
-
##
|
7
|
-
# Takes care of registering validations for a media type. It allows for nested schemes and registers each one so it
|
8
|
-
# can be looked up at a later time.
|
9
|
-
#
|
10
|
-
# @see MediaType::Dsl
|
11
|
-
# @see Scheme
|
12
|
-
#
|
13
|
-
class Validations
|
14
|
-
|
15
|
-
attr_reader :scheme
|
16
|
-
|
17
|
-
##
|
18
|
-
# Creates a new stack of validations
|
19
|
-
#
|
20
|
-
# @param [Constructable] media_type a Constructable media type
|
21
|
-
# @param [Hash] registry the registry reference, or nil if top level
|
22
|
-
# @param [Scheme] scheme the current scheme or nil if top level
|
23
|
-
#
|
24
|
-
# @see MediaTypes::Dsl
|
25
|
-
# @see Constructable
|
26
|
-
# @see Scheme
|
27
|
-
#
|
28
|
-
def initialize(media_type, registry = {}, scheme = Scheme.new, &block)
|
29
|
-
self.media_type = media_type
|
30
|
-
self.registry = registry.merge!(media_type.as_key => scheme)
|
31
|
-
self.scheme = scheme
|
32
|
-
|
33
|
-
instance_exec(&block) if block_given?
|
34
|
-
end
|
35
|
-
|
36
|
-
##
|
37
|
-
# Looks up the validations for Constructable
|
38
|
-
#
|
39
|
-
# @param [String, Constructable] media_type
|
40
|
-
# @param [lambda] default the lambda if nothing can be found
|
41
|
-
# @return [Scheme] the scheme for the given +media_type+
|
42
|
-
#
|
43
|
-
def find(media_type, default = -> { Scheme.new(allow_empty: true) { not_strict } })
|
44
|
-
registry.fetch(media_type.as_key) do
|
45
|
-
default.call
|
46
|
-
end
|
47
|
-
end
|
48
|
-
|
49
|
-
|
50
|
-
if Gem::Version.new(RUBY_VERSION) > Gem::Version.new('2.7.0')
|
51
|
-
def method_missing(method_name, *arguments, **kwargs, &block)
|
52
|
-
if scheme.respond_to?(method_name)
|
53
|
-
media_type.__getobj__.media_type_combinations ||= Set.new
|
54
|
-
media_type.__getobj__.media_type_combinations.add(media_type.as_key)
|
55
|
-
|
56
|
-
return scheme.send(method_name, *arguments, **kwargs, &block)
|
57
|
-
end
|
58
|
-
|
59
|
-
super
|
60
|
-
end
|
61
|
-
else
|
62
|
-
def method_missing(method_name, *arguments, &block)
|
63
|
-
if scheme.respond_to?(method_name)
|
64
|
-
media_type.__getobj__.media_type_combinations ||= Set.new
|
65
|
-
media_type.__getobj__.media_type_combinations.add(media_type.as_key)
|
66
|
-
|
67
|
-
return scheme.send(method_name, *arguments, &block)
|
68
|
-
end
|
69
|
-
|
70
|
-
super
|
71
|
-
end
|
72
|
-
end
|
73
|
-
|
74
|
-
def respond_to_missing?(method_name, include_private = false)
|
75
|
-
scheme.respond_to?(method_name) || super
|
76
|
-
end
|
77
|
-
|
78
|
-
private
|
79
|
-
|
80
|
-
attr_accessor :media_type, :registry
|
81
|
-
attr_writer :scheme
|
82
|
-
|
83
|
-
##
|
84
|
-
# Switches the inner block to a specific version
|
85
|
-
#
|
86
|
-
# @param [Numeric] version the version to switch to
|
87
|
-
#
|
88
|
-
def version(version, &block)
|
89
|
-
Validations.new(media_type.version(version), registry, &block)
|
90
|
-
end
|
91
|
-
|
92
|
-
##
|
93
|
-
#
|
94
|
-
#
|
95
|
-
# @param [
|
96
|
-
#
|
97
|
-
def
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
end
|
104
|
-
|
105
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'media_types/scheme'
|
4
|
+
|
5
|
+
module MediaTypes
|
6
|
+
##
|
7
|
+
# Takes care of registering validations for a media type. It allows for nested schemes and registers each one so it
|
8
|
+
# can be looked up at a later time.
|
9
|
+
#
|
10
|
+
# @see MediaType::Dsl
|
11
|
+
# @see Scheme
|
12
|
+
#
|
13
|
+
class Validations
|
14
|
+
|
15
|
+
attr_reader :scheme
|
16
|
+
|
17
|
+
##
|
18
|
+
# Creates a new stack of validations
|
19
|
+
#
|
20
|
+
# @param [Constructable] media_type a Constructable media type
|
21
|
+
# @param [Hash] registry the registry reference, or nil if top level
|
22
|
+
# @param [Scheme] scheme the current scheme or nil if top level
|
23
|
+
#
|
24
|
+
# @see MediaTypes::Dsl
|
25
|
+
# @see Constructable
|
26
|
+
# @see Scheme
|
27
|
+
#
|
28
|
+
def initialize(media_type, registry = {}, scheme = Scheme.new(registry: registry, current_type: media_type), &block)
|
29
|
+
self.media_type = media_type
|
30
|
+
self.registry = registry.merge!(media_type.as_key => scheme)
|
31
|
+
self.scheme = scheme
|
32
|
+
|
33
|
+
instance_exec(&block) if block_given?
|
34
|
+
end
|
35
|
+
|
36
|
+
##
|
37
|
+
# Looks up the validations for Constructable
|
38
|
+
#
|
39
|
+
# @param [String, Constructable] media_type
|
40
|
+
# @param [lambda] default the lambda if nothing can be found
|
41
|
+
# @return [Scheme] the scheme for the given +media_type+
|
42
|
+
#
|
43
|
+
def find(media_type, default = -> { Scheme.new(allow_empty: true) { not_strict } })
|
44
|
+
registry.fetch(media_type.as_key) do
|
45
|
+
default.call
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
|
50
|
+
if Gem::Version.new(RUBY_VERSION) > Gem::Version.new('2.7.0')
|
51
|
+
def method_missing(method_name, *arguments, **kwargs, &block)
|
52
|
+
if scheme.respond_to?(method_name)
|
53
|
+
media_type.__getobj__.media_type_combinations ||= Set.new
|
54
|
+
media_type.__getobj__.media_type_combinations.add(media_type.as_key)
|
55
|
+
|
56
|
+
return scheme.send(method_name, *arguments, **kwargs, &block)
|
57
|
+
end
|
58
|
+
|
59
|
+
super
|
60
|
+
end
|
61
|
+
else
|
62
|
+
def method_missing(method_name, *arguments, &block)
|
63
|
+
if scheme.respond_to?(method_name)
|
64
|
+
media_type.__getobj__.media_type_combinations ||= Set.new
|
65
|
+
media_type.__getobj__.media_type_combinations.add(media_type.as_key)
|
66
|
+
|
67
|
+
return scheme.send(method_name, *arguments, &block)
|
68
|
+
end
|
69
|
+
|
70
|
+
super
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
def respond_to_missing?(method_name, include_private = false)
|
75
|
+
scheme.respond_to?(method_name) || super
|
76
|
+
end
|
77
|
+
|
78
|
+
private
|
79
|
+
|
80
|
+
attr_accessor :media_type, :registry
|
81
|
+
attr_writer :scheme
|
82
|
+
|
83
|
+
##
|
84
|
+
# Switches the inner block to a specific version
|
85
|
+
#
|
86
|
+
# @param [Numeric] version the version to switch to
|
87
|
+
#
|
88
|
+
def version(version, &block)
|
89
|
+
Validations.new(media_type.version(version), registry, &block)
|
90
|
+
end
|
91
|
+
|
92
|
+
##
|
93
|
+
# Runs the block for multiple versions
|
94
|
+
#
|
95
|
+
# @param [Array] list of versions to run this on
|
96
|
+
#
|
97
|
+
def versions(versions, &block)
|
98
|
+
versions.each do |v|
|
99
|
+
Validations.new(media_type.version(v), registry) do
|
100
|
+
block(v)
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
##
|
106
|
+
# Switches the inner block to a specific view
|
107
|
+
#
|
108
|
+
# @param [String, Symbol] view the view to switch to
|
109
|
+
#
|
110
|
+
def view(view, &block)
|
111
|
+
Validations.new(media_type.view(view), registry, &block)
|
112
|
+
end
|
113
|
+
|
114
|
+
def suffix(name)
|
115
|
+
scheme.type_attributes[:suffix] = name
|
116
|
+
end
|
117
|
+
end
|
118
|
+
end
|
data/lib/media_types/version.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module MediaTypes
|
4
|
-
VERSION = '2.
|
5
|
-
end
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module MediaTypes
|
4
|
+
VERSION = '2.3.0'
|
5
|
+
end
|
data/lib/media_types/views.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module MediaTypes
|
4
|
-
# Shortcut used by #collection to #view('collection')
|
5
|
-
COLLECTION_VIEW = 'collection'
|
6
|
-
|
7
|
-
# Shortcut used by #index to #view('index')
|
8
|
-
INDEX_VIEW = 'index'
|
9
|
-
|
10
|
-
# Shortcut used by #create to #view('create')
|
11
|
-
CREATE_VIEW = 'create'
|
12
|
-
end
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module MediaTypes
|
4
|
+
# Shortcut used by #collection to #view('collection')
|
5
|
+
COLLECTION_VIEW = 'collection'
|
6
|
+
|
7
|
+
# Shortcut used by #index to #view('index')
|
8
|
+
INDEX_VIEW = 'index'
|
9
|
+
|
10
|
+
# Shortcut used by #create to #view('create')
|
11
|
+
CREATE_VIEW = 'create'
|
12
|
+
end
|
data/lib/media_types.rb
CHANGED
@@ -1,73 +1,73 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'delegate'
|
4
|
-
|
5
|
-
require 'media_types/version'
|
6
|
-
require 'media_types/hash'
|
7
|
-
require 'media_types/object'
|
8
|
-
require 'media_types/scheme'
|
9
|
-
require 'media_types/dsl'
|
10
|
-
require 'media_types/errors'
|
11
|
-
|
12
|
-
require 'media_types/views'
|
13
|
-
|
14
|
-
module MediaTypes
|
15
|
-
def self.set_organisation(mod, organisation)
|
16
|
-
@organisation_prefixes ||= {}
|
17
|
-
@organisation_prefixes[mod.name] = organisation
|
18
|
-
end
|
19
|
-
|
20
|
-
def self.expect_string_keys(mod)
|
21
|
-
set_key_expectation(mod, false)
|
22
|
-
end
|
23
|
-
|
24
|
-
def self.expect_symbol_keys(mod)
|
25
|
-
set_key_expectation(mod, true)
|
26
|
-
end
|
27
|
-
|
28
|
-
# Keep track of modules setting their key expectations
|
29
|
-
def self.set_key_expectation(mod, expect_symbol_keys)
|
30
|
-
@key_expectations ||= {}
|
31
|
-
@key_expectations_used ||= {}
|
32
|
-
|
33
|
-
raise KeyExpectationSetError.new(mod: mod) unless @key_expectations[mod.name].nil?
|
34
|
-
raise KeyExpectationUsedError.new(mod: mod) if @key_expectations_used[mod.name]
|
35
|
-
|
36
|
-
@key_expectations[mod.name] = expect_symbol_keys
|
37
|
-
end
|
38
|
-
|
39
|
-
SYMBOL_KEYS_DEFAULT = true
|
40
|
-
|
41
|
-
def self.get_key_expectation(mod)
|
42
|
-
@key_expectations ||= {}
|
43
|
-
@key_expectations_used ||= {}
|
44
|
-
|
45
|
-
expect_symbol = find_key_expectation(mod)
|
46
|
-
|
47
|
-
expect_symbol.nil? ? SYMBOL_KEYS_DEFAULT : expect_symbol
|
48
|
-
end
|
49
|
-
|
50
|
-
def self.find_key_expectation(mod)
|
51
|
-
modules = mod.name.split('::')
|
52
|
-
expect_symbol = nil
|
53
|
-
|
54
|
-
while modules.any? && expect_symbol.nil?
|
55
|
-
current_module = modules.join('::')
|
56
|
-
expect_symbol = @key_expectations[current_module]
|
57
|
-
@key_expectations_used[current_module] = true
|
58
|
-
modules.pop
|
59
|
-
end
|
60
|
-
|
61
|
-
expect_symbol
|
62
|
-
end
|
63
|
-
|
64
|
-
def self.get_organisation(mod)
|
65
|
-
name = mod.name
|
66
|
-
prefixes = @organisation_prefixes.keys.select { |p| name.start_with? p }
|
67
|
-
return nil unless prefixes.any?
|
68
|
-
|
69
|
-
best = prefixes.max_by { |p| p.length }
|
70
|
-
|
71
|
-
@organisation_prefixes[best]
|
72
|
-
end
|
73
|
-
end
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'delegate'
|
4
|
+
|
5
|
+
require 'media_types/version'
|
6
|
+
require 'media_types/hash'
|
7
|
+
require 'media_types/object'
|
8
|
+
require 'media_types/scheme'
|
9
|
+
require 'media_types/dsl'
|
10
|
+
require 'media_types/errors'
|
11
|
+
|
12
|
+
require 'media_types/views'
|
13
|
+
|
14
|
+
module MediaTypes
|
15
|
+
def self.set_organisation(mod, organisation)
|
16
|
+
@organisation_prefixes ||= {}
|
17
|
+
@organisation_prefixes[mod.name] = organisation
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.expect_string_keys(mod)
|
21
|
+
set_key_expectation(mod, false)
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.expect_symbol_keys(mod)
|
25
|
+
set_key_expectation(mod, true)
|
26
|
+
end
|
27
|
+
|
28
|
+
# Keep track of modules setting their key expectations
|
29
|
+
def self.set_key_expectation(mod, expect_symbol_keys)
|
30
|
+
@key_expectations ||= {}
|
31
|
+
@key_expectations_used ||= {}
|
32
|
+
|
33
|
+
raise KeyExpectationSetError.new(mod: mod) unless @key_expectations[mod.name].nil?
|
34
|
+
raise KeyExpectationUsedError.new(mod: mod) if @key_expectations_used[mod.name]
|
35
|
+
|
36
|
+
@key_expectations[mod.name] = expect_symbol_keys
|
37
|
+
end
|
38
|
+
|
39
|
+
SYMBOL_KEYS_DEFAULT = true
|
40
|
+
|
41
|
+
def self.get_key_expectation(mod)
|
42
|
+
@key_expectations ||= {}
|
43
|
+
@key_expectations_used ||= {}
|
44
|
+
|
45
|
+
expect_symbol = find_key_expectation(mod)
|
46
|
+
|
47
|
+
expect_symbol.nil? ? SYMBOL_KEYS_DEFAULT : expect_symbol
|
48
|
+
end
|
49
|
+
|
50
|
+
def self.find_key_expectation(mod)
|
51
|
+
modules = mod.name.split('::')
|
52
|
+
expect_symbol = nil
|
53
|
+
|
54
|
+
while modules.any? && expect_symbol.nil?
|
55
|
+
current_module = modules.join('::')
|
56
|
+
expect_symbol = @key_expectations[current_module]
|
57
|
+
@key_expectations_used[current_module] = true
|
58
|
+
modules.pop
|
59
|
+
end
|
60
|
+
|
61
|
+
expect_symbol
|
62
|
+
end
|
63
|
+
|
64
|
+
def self.get_organisation(mod)
|
65
|
+
name = mod.name
|
66
|
+
prefixes = @organisation_prefixes.keys.select { |p| name.start_with? p }
|
67
|
+
return nil unless prefixes.any?
|
68
|
+
|
69
|
+
best = prefixes.max_by { |p| p.length }
|
70
|
+
|
71
|
+
@organisation_prefixes[best]
|
72
|
+
end
|
73
|
+
end
|
data/media_types.gemspec
CHANGED
@@ -1,33 +1,33 @@
|
|
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 'media_types/version'
|
6
|
-
|
7
|
-
Gem::Specification.new do |spec|
|
8
|
-
spec.name = 'media_types'
|
9
|
-
spec.version = MediaTypes::VERSION
|
10
|
-
spec.authors = ['Derk-Jan Karrenbeld', 'Max Maton']
|
11
|
-
spec.email = ['derk-jan+github@karrenbeld.info', 'info@maxmaton.nl']
|
12
|
-
|
13
|
-
spec.summary = 'Library to create media type definitions, schemes and validations'
|
14
|
-
spec.description = 'Media Types as mime types are not easily supported by frameworks such as rails. '
|
15
|
-
spec.homepage = 'https://github.com/SleeplessByte/media-types-ruby'
|
16
|
-
|
17
|
-
# Specify which files should be added to the gem when it is released.
|
18
|
-
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
19
|
-
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
20
|
-
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
21
|
-
end
|
22
|
-
spec.bindir = 'exe'
|
23
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
|
-
spec.require_paths = ['lib']
|
25
|
-
|
26
|
-
spec.add_development_dependency 'awesome_print'
|
27
|
-
spec.add_development_dependency 'bundler', '>= 2'
|
28
|
-
spec.add_development_dependency 'minitest'
|
29
|
-
spec.add_development_dependency 'minitest-reporters'
|
30
|
-
spec.add_development_dependency 'oj'
|
31
|
-
spec.add_development_dependency 'rake'
|
32
|
-
spec.add_development_dependency 'simplecov'
|
33
|
-
end
|
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 'media_types/version'
|
6
|
+
|
7
|
+
Gem::Specification.new do |spec|
|
8
|
+
spec.name = 'media_types'
|
9
|
+
spec.version = MediaTypes::VERSION
|
10
|
+
spec.authors = ['Derk-Jan Karrenbeld', 'Max Maton']
|
11
|
+
spec.email = ['derk-jan+github@karrenbeld.info', 'info@maxmaton.nl']
|
12
|
+
|
13
|
+
spec.summary = 'Library to create media type definitions, schemes and validations'
|
14
|
+
spec.description = 'Media Types as mime types are not easily supported by frameworks such as rails. '
|
15
|
+
spec.homepage = 'https://github.com/SleeplessByte/media-types-ruby'
|
16
|
+
|
17
|
+
# Specify which files should be added to the gem when it is released.
|
18
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
19
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
20
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
21
|
+
end
|
22
|
+
spec.bindir = 'exe'
|
23
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
|
+
spec.require_paths = ['lib']
|
25
|
+
|
26
|
+
spec.add_development_dependency 'awesome_print'
|
27
|
+
spec.add_development_dependency 'bundler', '>= 2'
|
28
|
+
spec.add_development_dependency 'minitest'
|
29
|
+
spec.add_development_dependency 'minitest-reporters'
|
30
|
+
spec.add_development_dependency 'oj'
|
31
|
+
spec.add_development_dependency 'rake'
|
32
|
+
spec.add_development_dependency 'simplecov'
|
33
|
+
end
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: media_types
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Derk-Jan Karrenbeld
|
8
8
|
- Max Maton
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-
|
12
|
+
date: 2023-08-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: awesome_print
|
@@ -119,6 +119,8 @@ extensions: []
|
|
119
119
|
extra_rdoc_files: []
|
120
120
|
files:
|
121
121
|
- ".github/workflows/debian.yml"
|
122
|
+
- ".github/workflows/publish-bookworm.yml"
|
123
|
+
- ".github/workflows/publish-sid.yml"
|
122
124
|
- ".github/workflows/ruby.yml"
|
123
125
|
- ".gitignore"
|
124
126
|
- ".rubocop.yml"
|
@@ -162,7 +164,7 @@ files:
|
|
162
164
|
homepage: https://github.com/SleeplessByte/media-types-ruby
|
163
165
|
licenses: []
|
164
166
|
metadata: {}
|
165
|
-
post_install_message:
|
167
|
+
post_install_message:
|
166
168
|
rdoc_options: []
|
167
169
|
require_paths:
|
168
170
|
- lib
|
@@ -177,8 +179,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
177
179
|
- !ruby/object:Gem::Version
|
178
180
|
version: '0'
|
179
181
|
requirements: []
|
180
|
-
rubygems_version: 3.
|
181
|
-
signing_key:
|
182
|
+
rubygems_version: 3.2.5
|
183
|
+
signing_key:
|
182
184
|
specification_version: 4
|
183
185
|
summary: Library to create media type definitions, schemes and validations
|
184
186
|
test_files: []
|