-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathholotype.gemspec
More file actions
62 lines (56 loc) · 1.98 KB
/
holotype.gemspec
File metadata and controls
62 lines (56 loc) · 1.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
require File.expand_path '../lib/holotype/version', __FILE__
Gem::Specification.new do |gemspec|
# Basic Attributes
Hash[
author: 'Robert Lude',
date: '2017-05-01',
email: 'rob@ertlu.de',
homepage: 'https://www.github.com/robertlude/holotype',
license: 'MIT',
name: 'holotype',
required_ruby_version: '>= 2.7.0',
summary: 'Simple models',
version: Holotype::VERSION,
].each { |attribute, value| gemspec.public_send "#{attribute}=", value }
# File List
%w[
attribute
attribute/definition
attribute/definition/default_conflict_error
attribute/definition/no_collection_class_error
attribute/definition/no_value_class_error
attribute/definition/required_conflict_error
attribute/frozen_modification_error
attribute/immutable_value_error
attribute/read_only_error
attributes_already_defined_error
collection_normalizer
collection_normalizer/expected_array_like_collection_error
collection_normalizer/expected_hash_like_collection_error
inheritance_disallowed_error
missing_required_attributes_error
value_normalizer
version
] .map { |file| "/#{file}" } # prepend each with '/'
.unshift('') # add a blank entry with no '/'
.map { |file| "lib/holotype#{file}.rb" } # concatenate the final name
.tap { |files| gemspec.files = files } # set the file list
# Dependencies
Hash[
development: Hash[
byebug: '~> 11.0',
:'pry-byebug' => '~> 3.9.0',
rspec: '~> 3.0',
:'rspec-junklet' => '~> 2.0',
],
runtime: Hash[
memorandum: '~> 2.1',
],
].each do |environment, dependencies|
dependencies.each do |gem_name, version|
gemspec.public_send "add_#{environment}_dependency",
gem_name,
version
end
end
end