musictree 0.2.0 → 0.2.1

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: bd59dc4bc498d58c9a1e273b457b013b70feee855ebee133c4e20f5efd82029b
4
- data.tar.gz: d5049f7642cb825da1edabf7a0ee6e5c57cffab0d284d24b5883ea1129683464
3
+ metadata.gz: 1c4ae2d14cb182c1f34a62b95ec57a76a38f4552248b8a44a8c30137de124d7f
4
+ data.tar.gz: 26dfaca9216f36d4b5bad2d8caa030f8b2a016432f5d53cf33121d43b13fb499
5
5
  SHA512:
6
- metadata.gz: 1f74519fff7dff3daa045b28131040714854c6c98564be4bd9d56f163ccbf79500ab7f49accc4c916da83fdd271edc81bcb52c0cd508a4add0064a06af57eced
7
- data.tar.gz: 8a9819a18e2eae0bf5d911a626b5a6c3526fd3e01b77a9d0a71f202352647a46333592713ca06643a23bc819e7958e0de68c6684dcc4a53a43c6ed953cd35d19
6
+ metadata.gz: c7086c0e64e9b511bb2c607cd36e2baa41bd4af65cf71ab2eda933a09cabf98e00d978e261c1d8af75d226d236d066b96c744846b020ffa8a3999d778bd70513
7
+ data.tar.gz: 7f6402fb7aa26e5521d3d77fb49d6777e0842592c83f260b968e15c030aa6ecc33792a0736e6f33d2e9e341a4f32920e1bfdc3379acb6e4dc8a587df644f12e7
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.2.1] - 2025-07-21
4
+
5
+ - Expose path in all objects (silly me)
6
+
3
7
  ## [0.2.0] - 2025-07-21
4
8
 
5
9
  - Big Refactoring, Trees in trees, uniform interface
@@ -0,0 +1 @@
1
+ f1701fbd7ac3641f637b5685ce118d09dec9beed2af6ef739c8793ac6a366d103c83aef737cea8e30302547eb38942785d054525ef5b70910cf17daf07af6898
@@ -7,7 +7,7 @@ module Musictree
7
7
  class Album
8
8
  include Enumerable
9
9
 
10
- attr_reader :title
10
+ attr_reader :title, :path
11
11
 
12
12
  # Scans in the music files that sit in the album path. (No subdirs)
13
13
  # @param path [String] The path to the album
@@ -6,7 +6,7 @@ require "wahwah"
6
6
  module Musictree
7
7
  # A track holds the meta information for one music file
8
8
  class Track
9
- attr_reader :title, :artist, :track, :album
9
+ attr_reader :title, :artist, :track, :album, :path
10
10
  # Scan a music file for metadata
11
11
  # (The method name is consistent to the other classes but a bit shit)
12
12
  # @param path [String] path to the source music file
@@ -1,13 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "pathname"
4
3
  # @author Jan "half/byte" Krutisch
5
4
  module Musictree
6
5
  # Tree is the base entry class for Musictree.
7
6
  # Use Tree.scan(path) to scan in a full tree for a given file path
8
7
  # Tree is enumerable and contains either other trees (subdirectories) or albums.
9
8
  class Tree
10
- attr_reader :title
9
+ attr_reader :title, :path
11
10
  include Enumerable
12
11
 
13
12
  # Scan in a file tree
@@ -46,7 +45,6 @@ module Musictree
46
45
  @title = File.basename(@path)
47
46
  Dir[File.join(@path, "/*")].each do |file_or_dir|
48
47
  if File.directory?(file_or_dir)
49
- # rel = Pathname.new(file_or_dir).relative_path_from(@path)
50
48
  @children << Album.scan(file_or_dir)
51
49
  else
52
50
  raise Error.new("Only Directories expected here")
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Musictree
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: musictree
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Krutisch
@@ -50,6 +50,7 @@ files:
50
50
  - README.md
51
51
  - Rakefile
52
52
  - checksums/musictree-0.2.0.gem.sha512
53
+ - checksums/musictree-0.2.1.gem.sha512
53
54
  - lib/musictree.rb
54
55
  - lib/musictree/album.rb
55
56
  - lib/musictree/ff_prober.rb