organo 0.3.1 → 0.3.2

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: ce74a150b3bd7be118c17318edaf064c0a3a7e49b7a71775f347123279d7bfcb
4
- data.tar.gz: 05d621c3fe3e5adefb79abd9bfe8f26a8ba4579967f914360ef56e40323f984f
3
+ metadata.gz: 8691436aa9cdcb12c5de1da33b147103bcfa5d2459a3ad6b0ad868b4b49b2b44
4
+ data.tar.gz: 3f1b7419aaee87053d5b74f0227e6b9c5e4c36d783b672dafebbd6f3d1c07091
5
5
  SHA512:
6
- metadata.gz: b369b8ba6b07283b6843614b17739fe6601760251d4abaa5f01ffdd54ddbccbe1adb0bdcd26c52a70165c19c33893d530a1580a94f122c7cbb74dfea77d8458b
7
- data.tar.gz: ec68ad34f619d0e003f2d1910c1706ba643f837a3b09b3295822ebf811a8aecd82dc9b7563755e5e71287eb4a9e7d32fbc2ca9f143c27a24e5ddab78a0f7a113
6
+ metadata.gz: 7e3e5e6c5e8898ab4552bd2b9cf108aef4de0075f13e5e1731cf4bda3917534cc19c88ecfc545ac41396d7f33e01311408d600b33e2331bbbfcd28a2f4decdad
7
+ data.tar.gz: 14046ec16b3a0986312e78567e226089346d1bba28a0d05b0c10996d7916e7c5a9787f9312ce567dcbf0f588f43485b17a57df2d0b526eb4ddacde29b9810bb7
@@ -16,9 +16,9 @@ module Organo
16
16
  json_obj = Query.get_anime_by_id(mal_id)
17
17
  show = SearchShow.new(json_obj['mal_id'], json_obj['title'], json_obj['images']['jpg']['image_url'])
18
18
  show_type = json_obj['type']
19
- file_name = (show_type == 'TV' ? "#{json_obj['year']}-#{json_obj['season']}" : show_type.downcase)
19
+ file_name = (show_type == 'TV' ? "#{json_obj['year']}_#{json_obj['season']}" : show_type.downcase)
20
20
  file_path = "#{Config::DEFAULT_DIR}/#{file_name}.json"
21
- show_list = File.exist?(file_path) ? Reader.read_file(file_path) : Array.new
21
+ show_list = File.exist?(file_path) ? Reader.read_file(file_path) : []
22
22
  if show_list.find_index { |s| s.id.to_s == mal_id.to_s }.nil?
23
23
  Writer.to_file(show_list.push(show).sort_by(&:title), file_path)
24
24
  puts "Added anime \"#{show.title}\" (#{mal_id})"
@@ -9,7 +9,7 @@ module Organo
9
9
  module Add
10
10
 
11
11
  class SequelEntry < Dry::CLI::Command
12
- desc 'Add anime entry to files'
12
+ desc 'Add anime sequel entry to anime in file'
13
13
  argument :anime_mal_id, type: :integer, required: true, desc: 'Anime MyAnimeList ID'
14
14
  argument :sequel_mal_id, type: :integer, required: true, desc: 'Sequel MyAnimeList ID'
15
15
  argument :season_num, type: :integer, required: false, default: 0, desc: 'Season number'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Organo
4
- VERSION = '0.3.1'
4
+ VERSION = '0.3.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: organo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Louis-Philippe Fortin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-03-07 00:00:00.000000000 Z
11
+ date: 2023-03-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-cli