From 0c37362a8a476d7df4e1be47496ed5b89decccf6 Mon Sep 17 00:00:00 2001 From: Dan Milne Date: Tue, 21 Jan 2025 08:40:10 +1100 Subject: [PATCH] Missed some renamings --- CHANGELOG.md | 4 ++++ Gemfile.lock | 4 ++-- README.md | 4 ++-- lib/picopackage.rb | 14 ++++++++++++++ lib/picopackage/fetch.rb | 2 +- lib/picopackage/provider.rb | 2 +- lib/picopackage/scanner.rb | 2 +- lib/picopackage/source_file.rb | 2 +- lib/picopackage/version.rb | 4 ++-- picopackage.gemspec | 14 +++++++------- 10 files changed, 35 insertions(+), 17 deletions(-) create mode 100644 lib/picopackage.rb diff --git a/CHANGELOG.md b/CHANGELOG.md index fbb713b..2283a4b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## [Unreleased] +## [0.2.0] - 2025-01-21 + +- Rename to from Picop to Picopackage + ## [0.1.0] - 2025-01-19 - Initial release diff --git a/Gemfile.lock b/Gemfile.lock index 4fe3f98..4281ee6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - picop (0.1.0) + picopackage (0.1.0) digest open-uri (~> 0.5) yaml (~> 0.4) @@ -70,7 +70,7 @@ PLATFORMS DEPENDENCIES debug minitest (~> 5.16) - picop! + picopackage! rake (~> 13.0) rubocop (~> 1.21) diff --git a/README.md b/README.md index f9555a2..3af7ed4 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# Picop +# Picopackage TODO: Delete this and the text below, and describe your gem -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/picop`. To experiment with that code, run `bin/console` for an interactive prompt. +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/picopackge`. To experiment with that code, run `bin/console` for an interactive prompt. ## Installation diff --git a/lib/picopackage.rb b/lib/picopackage.rb new file mode 100644 index 0000000..c1e3587 --- /dev/null +++ b/lib/picopackage.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +require_relative "picopackage/version" +require_relative "picopackage/provider" +require_relative "picopackage/source_file" +require_relative "picopackage/scanner" +require_relative "picopackage/fetch" +require_relative "picopackage/cli" + +module Picopackage + class Error < StandardError; end + class FileTooLargeError < StandardError; end + class LocalModificationError < StandardError; end +end diff --git a/lib/picopackage/fetch.rb b/lib/picopackage/fetch.rb index 9299cbd..b1aacaa 100644 --- a/lib/picopackage/fetch.rb +++ b/lib/picopackage/fetch.rb @@ -4,7 +4,7 @@ require 'tempfile' require 'json' require 'debug' -module Picop +module Picopackage class Fetch def self.fetch(url, destination, force: false) raise ArgumentError, "Destination directory does not exist: #{destination}" unless Dir.exist?(destination) diff --git a/lib/picopackage/provider.rb b/lib/picopackage/provider.rb index 47a08fc..0470338 100644 --- a/lib/picopackage/provider.rb +++ b/lib/picopackage/provider.rb @@ -1,4 +1,4 @@ -module Picop +module Picopackage class Provider def self.for(url) PROVIDERS.each do |provider| diff --git a/lib/picopackage/scanner.rb b/lib/picopackage/scanner.rb index 75b57b7..72a8219 100644 --- a/lib/picopackage/scanner.rb +++ b/lib/picopackage/scanner.rb @@ -1,4 +1,4 @@ -module Picop +module Picopackage module Scanner def self.scan(directory, pattern: "**/*") Dir.glob(File.join(directory, pattern)).select do |file| diff --git a/lib/picopackage/source_file.rb b/lib/picopackage/source_file.rb index 4d0acb6..174ddc1 100644 --- a/lib/picopackage/source_file.rb +++ b/lib/picopackage/source_file.rb @@ -1,7 +1,7 @@ require "yaml" require "digest" -module Picop +module Picopackage class SourceFile attr_reader :content, :metadata, :code, :original_path diff --git a/lib/picopackage/version.rb b/lib/picopackage/version.rb index b2d091a..bdb3b56 100644 --- a/lib/picopackage/version.rb +++ b/lib/picopackage/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -module Picop - VERSION = "0.1.0" +module Picopackage + VERSION = "0.2.0" end diff --git a/picopackage.gemspec b/picopackage.gemspec index 3ce61a1..edc3c33 100644 --- a/picopackage.gemspec +++ b/picopackage.gemspec @@ -8,17 +8,17 @@ Gem::Specification.new do |spec| spec.authors = ["Dan Milne"] spec.email = ["d@nmilne.com"] - spec.summary = "TODO: Write a short summary, because RubyGems requires one." - spec.description = "TODO: Write a longer description or delete this line." - spec.homepage = "TODO: Put your gem's website or public repo URL here." + spec.summary = "Picopackage Tool." + spec.description = "Picopackage Tool for managing Picopackages." + spec.homepage = "https://picopackage.org" spec.license = "MIT" spec.required_ruby_version = ">= 3.1.0" - spec.metadata["allowed_push_host"] = "TODO: Set to your gem server 'https://example.com'" + #spec.metadata["allowed_push_host"] = "TODO: Set to your gem server 'https://example.com'" - spec.metadata["homepage_uri"] = spec.homepage - spec.metadata["source_code_uri"] = "TODO: Put your gem's public repo URL here." - spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here." + #spec.metadata["homepage_uri"] = spec.homepage + #spec.metadata["source_code_uri"] = "TODO: Put your gem's public repo URL here." + #spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here." # Specify which files should be added to the gem when it is released. # The `git ls-files -z` loads the files in the RubyGem that have been added into git.