met 0.0.1 → 0.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 465d41d51ae43d5378226c9504fb2b264f54f113225c91b5a68b607cb41887d7
4
- data.tar.gz: 8aacc31409f1fbdc8c9128ee0fb7cd33494c9a4016e0f9d3b12147edcb21be37
3
+ metadata.gz: c39ac76578ab301945d9f7709266c27f5db3fcc62fd7d672c729af5c2c66c4b9
4
+ data.tar.gz: 2f20a65039fbaa227c04fb869aa56ba5c64757ecfdf936860eb9c0479e65e1f0
5
5
  SHA512:
6
- metadata.gz: b02786635c4f9e113cc42132b3eb410a6a5b5ee6dd5d3d3ed2bf082d33835a8f7f43a1fa7c15d116a356c08b90d3e8088d99f67982eab5e860b2588b4aa6b033
7
- data.tar.gz: b6bcb7d7197b14f33c3800ad459efac6376035b470d4dafe946498060be6a53e6a8df26b2cbfca35c970f587a10c6b6ce22d4c1c0ffabac96095e79ff621aa87
6
+ metadata.gz: 3386bf04531b5ff815e5f16c942560b6f1fa78cdaabd52ec9dd1e7fa76d7b88021fc377e7b3ec41fd7f1d974213775f341a67ead286d564ff1cd566b6661a872
7
+ data.tar.gz: dc51611d328cabef9131134d6bf560ffa05ac68878ea4a01ea59e26fdecdd262ea7932f062c2e6fe6f87276ea1d002e1d1da3ef225b8da69e6af7da07137c7d4
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.1.0] - 2026-09-02
4
+
5
+ - Add `artist`, `bio`, `date`, `medium`, `dimensions`, `credit`, `accession` and `gallery` to `Met::Artwork`
6
+ - Print a museum wall label from the CLI, and draw the artwork inline on terminals that support it
7
+ - Accept an object ID: `met 436535`
8
+ - Retry the random draw until it finds an artwork with an image, instead of printing a blank line
9
+ - Fix wrapping silently dropping the start of any unbroken run longer than the wrap width
10
+ - Return `nil` from `Met.artwork` for an unknown or non-numeric id, and raise `Met::Error` on an unreachable API, a non-success status or a body that is not JSON
11
+ - Time out Met API requests instead of hanging, and fall back to printing the preview URL when the image cannot be downloaded
12
+ - Stop shipping development files (`Gemfile`, `Rakefile`, `bin/`, `CLAUDE.md`) in the published gem
13
+ - Require Ruby 3.4, matching the versions CI tests
14
+
15
+ ## [0.0.2] - 2021-11-25
16
+
17
+ - Add `met` CLI
18
+
3
19
  ## [0.0.1] - 2021-11-25
4
20
 
5
21
  - Initial release
data/README.md CHANGED
@@ -1,15 +1,13 @@
1
1
  # Met
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/met`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ Fetch artwork data from the [Metropolitan Museum of Art's public collection API](https://metmuseum.github.io). No runtime dependencies just `net/http` and `json` from the standard library.
6
4
 
7
5
  ## Installation
8
6
 
9
7
  Add this line to your application's Gemfile:
10
8
 
11
9
  ```ruby
12
- gem 'met'
10
+ gem "met"
13
11
  ```
14
12
 
15
13
  And then execute:
@@ -22,22 +20,73 @@ Or install it yourself as:
22
20
 
23
21
  ## Usage
24
22
 
25
- TODO: Write usage instructions here
23
+ Look up an artwork by its object ID:
24
+
25
+ ```ruby
26
+ artwork = Met.artwork(436535)
27
+
28
+ artwork.title # => "Wheat Field with Cypresses"
29
+ artwork.artist # => "Vincent van Gogh"
30
+ artwork.bio # => "Dutch, Zundert 1853–1890 Auvers-sur-Oise"
31
+ artwork.date # => "1889"
32
+ artwork.medium # => "Oil on canvas"
33
+ artwork.dimensions # => "28 13/16 × 36 3/4 in. (73.2 × 93.4 cm)"
34
+ artwork.credit # => "Purchase, The Annenberg Foundation Gift, 1993"
35
+ artwork.accession # => "1993.132"
36
+ artwork.gallery # => "822"
37
+ artwork.department # => "European Paintings"
38
+ artwork.name # => "Painting"
39
+ artwork.id # => 436535
40
+ artwork.preview # => "https://images.metmuseum.org/CRDImages/ep/web-large/DP-42549-001.jpg"
41
+ artwork.image # => "https://images.metmuseum.org/CRDImages/ep/original/DP-42549-001.jpg"
42
+ ```
43
+
44
+ `image` is the full-size file; `preview` is the smaller web-sized version of the same photograph. `date` is the Met's own display string, so it holds things like `"ca. 1615–20"` as often as a bare year.
45
+
46
+ Not every object in the collection has every field — many have no photograph at all. Where the API returns a blank value, the attribute is `nil` rather than an empty string, so `artwork.image` is safe to test for truthiness.
47
+
48
+ `Met.artwork` returns `nil` when the collection has no object with that id, and raises `Met::Error` when the API cannot be reached, times out, or answers with something other than the JSON it promises.
49
+
50
+ ### Command line
51
+
52
+ The gem ships a `met` executable. Pass an object ID to see a particular artwork:
53
+
54
+ $ met 436535
55
+ Vincent van Gogh
56
+ Dutch, Zundert 1853–1890 Auvers-sur-Oise
57
+
58
+ Wheat Field with Cypresses
59
+ 1889
60
+
61
+ Oil on canvas
62
+ 28 13/16 × 36 3/4 in. (73.2 × 93.4 cm)
63
+
64
+ Purchase, The Annenberg Foundation Gift, 1993
65
+ 1993.132 · Gallery 822
66
+
67
+ The card follows the order and grouping the Met uses on its own wall labels. Fields the
68
+ object doesn't have are left out rather than printed empty, so an anonymous or undated work
69
+ simply has a shorter card.
70
+
71
+ Called with no arguments `met` picks an artwork at random, retrying until it lands on one
72
+ that has a photograph. It exits non-zero and explains itself if the ID doesn't exist.
73
+
74
+ In a terminal that supports the [iTerm2 inline image protocol](https://iterm2.com/documentation-images.html),
75
+ the artwork is drawn above the card and the card is styled. iTerm2, WezTerm, Konsole, VS
76
+ Code's built-in terminal and Hyper all qualify; anywhere else the preview URL is printed
77
+ instead, as it is whenever output is piped to another command. Styling also respects
78
+ [`NO_COLOR`](https://no-color.org).
26
79
 
27
80
  ## Development
28
81
 
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
82
+ After checking out the repo, run `bin/setup` to install dependencies. Then run `bundle exec rake` to run the tests and the linter. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
83
 
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
84
+ To install this gem onto your local machine, run `bundle exec rake install`.
32
85
 
33
86
  ## Contributing
34
87
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/met. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/met/blob/main/CODE_OF_CONDUCT.md).
88
+ Bug reports and pull requests are welcome on GitHub at https://github.com/arzezak/met.
36
89
 
37
90
  ## License
38
91
 
39
92
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
40
-
41
- ## Code of Conduct
42
-
43
- Everyone interacting in the Met project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/met/blob/main/CODE_OF_CONDUCT.md).
data/exe/met ADDED
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ $LOAD_PATH.unshift("#{__dir__}/../lib")
4
+
5
+ require "met"
6
+
7
+ exit Met::CLI.new(ARGV).run
data/lib/met/artwork.rb CHANGED
@@ -2,7 +2,8 @@
2
2
 
3
3
  module Met
4
4
  class Artwork
5
- attr_reader :id, :image, :preview, :department, :name, :title
5
+ attr_reader :id, :image, :preview, :department, :name, :title, :artist,
6
+ :bio, :date, :medium, :dimensions, :credit, :accession, :gallery
6
7
 
7
8
  def initialize(attributes)
8
9
  attributes.each do |key, value|
data/lib/met/cli.rb ADDED
@@ -0,0 +1,126 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "net/http"
4
+
5
+ module Met
6
+ class CLI
7
+ INLINE_IMAGE_TERMINALS = ["iTerm.app", "WezTerm", "vscode", "Hyper"].freeze
8
+ IMAGE_WIDTH = 60
9
+ MAX_OBJECT_ID = 600_000
10
+ ATTEMPTS = 12
11
+ WRAP_WIDTH = 56
12
+ WRAP_PATTERN = /\S.{0,#{WRAP_WIDTH - 1}}(?=\s|\z)|\S{1,#{WRAP_WIDTH}}/
13
+ BOLD = "\e[1m"
14
+ DIM = "\e[2m"
15
+ ITALIC = "\e[3m"
16
+ RESET = "\e[0m"
17
+
18
+ def initialize(argv, out: $stdout, err: $stderr, env: ENV)
19
+ @argv = argv
20
+ @out = out
21
+ @err = err
22
+ @env = env
23
+ end
24
+
25
+ def run
26
+ artwork = argv.empty? ? random_artwork : Met.artwork(argv.first)
27
+
28
+ if artwork
29
+ render artwork
30
+ return true
31
+ end
32
+
33
+ if argv.empty?
34
+ err.puts "Gave up looking for an artwork with an image. Try again."
35
+ else
36
+ err.puts "No artwork found for #{argv.first}."
37
+ end
38
+
39
+ false
40
+ rescue Error => e
41
+ err.puts e.message
42
+ false
43
+ end
44
+
45
+ def render(artwork)
46
+ image = inline_image(artwork.preview) if artwork.preview && inline_images?
47
+
48
+ if image
49
+ out.print image
50
+ out.puts label(artwork)
51
+ else
52
+ out.puts label(artwork)
53
+ out.puts artwork.preview if artwork.preview
54
+ end
55
+ end
56
+
57
+ def label(artwork)
58
+ blocks = [
59
+ [style(BOLD, artwork.artist), *wrap(DIM, artwork.bio)],
60
+ [style(ITALIC, artwork.title), artwork.date],
61
+ [artwork.medium, *wrap(DIM, artwork.dimensions)],
62
+ [*wrap(DIM, artwork.credit), style(DIM, catalogue(artwork))]
63
+ ]
64
+
65
+ blocks.map(&:compact).reject(&:empty?).inject { |card, block| card + [""] + block } || []
66
+ end
67
+
68
+ private
69
+
70
+ attr_reader :argv, :out, :err, :env
71
+
72
+ def random_artwork
73
+ ATTEMPTS.times do
74
+ artwork = Met.artwork(rand(1..MAX_OBJECT_ID))
75
+ return artwork if artwork&.preview
76
+ end
77
+
78
+ nil
79
+ end
80
+
81
+ def catalogue(artwork)
82
+ parts = [artwork.accession, ("Gallery #{artwork.gallery}" if artwork.gallery)].compact
83
+
84
+ parts.join(" · ") unless parts.empty?
85
+ end
86
+
87
+ def style(code, text)
88
+ return nil if text.nil?
89
+
90
+ styles? ? "#{code}#{text}#{RESET}" : text
91
+ end
92
+
93
+ def wrap(code, text)
94
+ return [] if text.nil?
95
+
96
+ text.scan(WRAP_PATTERN).map { |line| style(code, line.strip) }
97
+ end
98
+
99
+ # Returns nil when the picture cannot be fetched, so render falls back to
100
+ # printing the preview URL instead of failing the whole command.
101
+ def inline_image(url)
102
+ response = Met.get(url)
103
+ return nil unless response.is_a?(Net::HTTPSuccess)
104
+
105
+ "\e]1337;File=inline=1;width=#{IMAGE_WIDTH};preserveAspectRatio=1:#{[response.body].pack("m0")}\a\n"
106
+ rescue Error
107
+ nil
108
+ end
109
+
110
+ def styles?
111
+ terminal? && String(env["NO_COLOR"]).empty?
112
+ end
113
+
114
+ def inline_images?
115
+ return false unless terminal?
116
+
117
+ INLINE_IMAGE_TERMINALS.include?(env["TERM_PROGRAM"]) ||
118
+ env["LC_TERMINAL"] == "iTerm2" ||
119
+ !String(env["KONSOLE_VERSION"]).empty?
120
+ end
121
+
122
+ def terminal?
123
+ out.tty?
124
+ end
125
+ end
126
+ end
data/lib/met/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Met
4
- VERSION = "0.0.1"
4
+ VERSION = "0.1.0"
5
5
  end
data/lib/met.rb CHANGED
@@ -3,14 +3,26 @@
3
3
  require "net/http"
4
4
  require "json"
5
5
  require_relative "met/artwork"
6
+ require_relative "met/cli"
6
7
  require_relative "met/version"
7
8
 
8
9
  module Met
9
10
  class Error < StandardError; end
10
11
 
12
+ API = "https://collectionapi.metmuseum.org/public/collection/v1/objects"
13
+ TIMEOUT = 10
14
+
15
+ # Returns nil when nothing in the collection has that id. Raises Met::Error
16
+ # when the API cannot be reached or answers with something unexpected.
11
17
  def self.artwork(id)
12
- uri = URI("https://collectionapi.metmuseum.org/public/collection/v1/objects/#{id}")
13
- json = JSON.parse(Net::HTTP.get(uri))
18
+ id = Integer(id.to_s, 10, exception: false)
19
+ return nil if id.nil?
20
+
21
+ response = get("#{API}/#{id}")
22
+ return nil if response.is_a?(Net::HTTPNotFound)
23
+ raise Error, "The Met API answered #{response.code} for object #{id}." unless response.is_a?(Net::HTTPSuccess)
24
+
25
+ json = JSON.parse(response.body)
14
26
 
15
27
  Artwork.new(
16
28
  id: json["objectID"],
@@ -18,7 +30,29 @@ module Met
18
30
  preview: json["primaryImageSmall"],
19
31
  department: json["department"],
20
32
  name: json["objectName"],
21
- title: json["title"]
33
+ title: json["title"],
34
+ artist: json["artistDisplayName"],
35
+ bio: json["artistDisplayBio"],
36
+ date: json["objectDate"],
37
+ medium: json["medium"],
38
+ dimensions: json["dimensions"],
39
+ credit: json["creditLine"],
40
+ accession: json["accessionNumber"],
41
+ gallery: json["GalleryNumber"]
22
42
  )
43
+ rescue JSON::ParserError
44
+ raise Error, "The Met API answered with something that is not JSON."
45
+ end
46
+
47
+ def self.get(url)
48
+ uri = URI(url)
49
+
50
+ Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https", open_timeout: TIMEOUT, read_timeout: TIMEOUT) do |http|
51
+ http.get(uri.request_uri)
52
+ end
53
+ rescue URI::InvalidURIError
54
+ raise Error, "#{url} is not a valid URL."
55
+ rescue IOError, SocketError, SystemCallError, Timeout::Error, OpenSSL::SSL::SSLError => e
56
+ raise Error, "Could not reach #{uri.host}: #{e.message}"
23
57
  end
24
58
  end
metadata CHANGED
@@ -1,36 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: met
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ariel Rzezak
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2021-11-25 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies: []
13
- description:
14
12
  email:
15
13
  - arzezak@gmail.com
16
- executables: []
14
+ executables:
15
+ - met
17
16
  extensions: []
18
17
  extra_rdoc_files: []
19
18
  files:
20
- - ".standard.yml"
21
19
  - CHANGELOG.md
22
- - CODE_OF_CONDUCT.md
23
- - Gemfile
24
- - Gemfile.lock
25
20
  - LICENSE.txt
26
21
  - README.md
27
- - Rakefile
28
- - bin/console
29
- - bin/setup
22
+ - exe/met
30
23
  - lib/met.rb
31
24
  - lib/met/artwork.rb
25
+ - lib/met/cli.rb
32
26
  - lib/met/version.rb
33
- - met.gemspec
34
27
  homepage: https://github.com/arzezak/met
35
28
  licenses:
36
29
  - MIT
@@ -38,7 +31,6 @@ metadata:
38
31
  homepage_uri: https://github.com/arzezak/met
39
32
  source_code_uri: https://github.com/arzezak/met
40
33
  changelog_uri: https://github.com/arzezak/met/blob/main/CHANGELOG.md
41
- post_install_message:
42
34
  rdoc_options: []
43
35
  require_paths:
44
36
  - lib
@@ -46,15 +38,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
46
38
  requirements:
47
39
  - - ">="
48
40
  - !ruby/object:Gem::Version
49
- version: 2.6.0
41
+ version: 3.4.0
50
42
  required_rubygems_version: !ruby/object:Gem::Requirement
51
43
  requirements:
52
44
  - - ">="
53
45
  - !ruby/object:Gem::Version
54
46
  version: '0'
55
47
  requirements: []
56
- rubygems_version: 3.2.32
57
- signing_key:
48
+ rubygems_version: 4.0.16
58
49
  specification_version: 4
59
50
  summary: Draws artworks from the Met collection.
60
51
  test_files: []
data/.standard.yml DELETED
@@ -1,2 +0,0 @@
1
- # For available configuration options, see:
2
- # https://github.com/testdouble/standard
data/CODE_OF_CONDUCT.md DELETED
@@ -1,84 +0,0 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
-
7
- We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
-
9
- ## Our Standards
10
-
11
- Examples of behavior that contributes to a positive environment for our community include:
12
-
13
- * Demonstrating empathy and kindness toward other people
14
- * Being respectful of differing opinions, viewpoints, and experiences
15
- * Giving and gracefully accepting constructive feedback
16
- * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
- * Focusing on what is best not just for us as individuals, but for the overall community
18
-
19
- Examples of unacceptable behavior include:
20
-
21
- * The use of sexualized language or imagery, and sexual attention or
22
- advances of any kind
23
- * Trolling, insulting or derogatory comments, and personal or political attacks
24
- * Public or private harassment
25
- * Publishing others' private information, such as a physical or email
26
- address, without their explicit permission
27
- * Other conduct which could reasonably be considered inappropriate in a
28
- professional setting
29
-
30
- ## Enforcement Responsibilities
31
-
32
- Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
-
34
- Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
-
36
- ## Scope
37
-
38
- This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
-
40
- ## Enforcement
41
-
42
- Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at arzezak@gmail.com. All complaints will be reviewed and investigated promptly and fairly.
43
-
44
- All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
-
46
- ## Enforcement Guidelines
47
-
48
- Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
-
50
- ### 1. Correction
51
-
52
- **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
-
54
- **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
-
56
- ### 2. Warning
57
-
58
- **Community Impact**: A violation through a single incident or series of actions.
59
-
60
- **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
-
62
- ### 3. Temporary Ban
63
-
64
- **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
-
66
- **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
-
68
- ### 4. Permanent Ban
69
-
70
- **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
-
72
- **Consequence**: A permanent ban from any sort of public interaction within the community.
73
-
74
- ## Attribution
75
-
76
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
- available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
-
79
- Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
-
81
- [homepage]: https://www.contributor-covenant.org
82
-
83
- For answers to common questions about this code of conduct, see the FAQ at
84
- https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/Gemfile DELETED
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source "https://rubygems.org"
4
-
5
- gemspec
6
-
7
- gem "rake", "~> 13.0"
8
- gem "minitest", "~> 5.0"
9
- gem "standard", "~> 1.3"
data/Gemfile.lock DELETED
@@ -1,48 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- met (0.0.1)
5
-
6
- GEM
7
- remote: https://rubygems.org/
8
- specs:
9
- ast (2.4.2)
10
- minitest (5.14.4)
11
- parallel (1.21.0)
12
- parser (3.0.2.0)
13
- ast (~> 2.4.1)
14
- rainbow (3.0.0)
15
- rake (13.0.6)
16
- regexp_parser (2.1.1)
17
- rexml (3.2.5)
18
- rubocop (1.22.3)
19
- parallel (~> 1.10)
20
- parser (>= 3.0.0.0)
21
- rainbow (>= 2.2.2, < 4.0)
22
- regexp_parser (>= 1.8, < 3.0)
23
- rexml
24
- rubocop-ast (>= 1.12.0, < 2.0)
25
- ruby-progressbar (~> 1.7)
26
- unicode-display_width (>= 1.4.0, < 3.0)
27
- rubocop-ast (1.13.0)
28
- parser (>= 3.0.1.1)
29
- rubocop-performance (1.11.5)
30
- rubocop (>= 1.7.0, < 2.0)
31
- rubocop-ast (>= 0.4.0)
32
- ruby-progressbar (1.11.0)
33
- standard (1.4.0)
34
- rubocop (= 1.22.3)
35
- rubocop-performance (= 1.11.5)
36
- unicode-display_width (2.1.0)
37
-
38
- PLATFORMS
39
- arm64-darwin-21
40
-
41
- DEPENDENCIES
42
- met!
43
- minitest (~> 5.0)
44
- rake (~> 13.0)
45
- standard (~> 1.3)
46
-
47
- BUNDLED WITH
48
- 2.2.32
data/Rakefile DELETED
@@ -1,14 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "bundler/gem_tasks"
4
- require "rake/testtask"
5
-
6
- Rake::TestTask.new(:test) do |t|
7
- t.libs << "test"
8
- t.libs << "lib"
9
- t.test_files = FileList["test/**/*_test.rb"]
10
- end
11
-
12
- require "standard/rake"
13
-
14
- task default: %i[test standard]
data/bin/console DELETED
@@ -1,15 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- require "bundler/setup"
5
- require "met"
6
-
7
- # You can add fixtures and/or initialization code here to make experimenting
8
- # with your gem easier. You can also use a different console, if you like.
9
-
10
- # (If you use this, don't forget to add pry to your Gemfile!)
11
- # require "pry"
12
- # Pry.start
13
-
14
- require "irb"
15
- IRB.start(__FILE__)
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
data/met.gemspec DELETED
@@ -1,36 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative "lib/met/version"
4
-
5
- Gem::Specification.new do |spec|
6
- spec.name = "met"
7
- spec.version = Met::VERSION
8
- spec.authors = ["Ariel Rzezak"]
9
- spec.email = ["arzezak@gmail.com"]
10
-
11
- spec.summary = "Draws artworks from the Met collection."
12
- spec.homepage = "https://github.com/arzezak/met"
13
- spec.license = "MIT"
14
- spec.required_ruby_version = ">= 2.6.0"
15
-
16
- spec.metadata["homepage_uri"] = spec.homepage
17
- spec.metadata["source_code_uri"] = spec.homepage
18
- spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/main/CHANGELOG.md"
19
-
20
- # Specify which files should be added to the gem when it is released.
21
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
22
- spec.files = Dir.chdir(File.expand_path(__dir__)) do
23
- `git ls-files -z`.split("\x0").reject do |f|
24
- (f == __FILE__) || f.match(%r{\A(?:(?:test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
25
- end
26
- end
27
- spec.bindir = "exe"
28
- spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
29
- spec.require_paths = ["lib"]
30
-
31
- # Uncomment to register a new dependency of your gem
32
- # spec.add_dependency "example-gem", "~> 1.0"
33
-
34
- # For more information and examples about making a new gem, checkout our
35
- # guide at: https://bundler.io/guides/creating_gem.html
36
- end