organize_files 1.1.0 → 1.1.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: be274b8e715cec0eeebd8fd07dc882d86a3c7ce3576b4be5ffbbdb873581b929
4
- data.tar.gz: 28ccb608bd713032fa209bb9b301bbd6bcf4bc99b383f179bc7b963fe4d4cdbb
3
+ metadata.gz: 423b385e662072ba24906140c76d00b8ee2bf1c782b84e1eb54fcb3971049017
4
+ data.tar.gz: d64f1c10aa79af48758da287679721a644a46804e94a14ad783fc59d4a916c41
5
5
  SHA512:
6
- metadata.gz: dcbab96c30fcc3be8e4b9db3bb6b125647e3b9798bb45faa8c1bbcfeaf3c6ec11c6dfed0e47279ffb03797ebc9489534ea9517bf1e8cdd58346af5b021cd0c36
7
- data.tar.gz: 98106cd82b28ed14543d6e3b098883effb9af21c67f478aed3cdf0c563b21308fd045c45e31bbc489453e16ddf02393252ff455a467df90314e7f14a66c0bb90
6
+ metadata.gz: 6de2a007e0c69634c8e348bd5ecd40fc59710037e8636e7113973e9475b65b29a1abcc0db7c0bcb61c284b3badb623b9f79ce741eccdcee644a6add4f4c1da9a
7
+ data.tar.gz: 56c40d0c6f0d304b26e7c99ab26b5b2e9a3f74cfdd4ad260f6ed56eda634bbf5e66de3eb6cdd7d0ce9304462c0454cd54aad76f0a07ac94593c7cecc8b811870
@@ -0,0 +1,36 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # frozen_string_literal: true
4
+
5
+ require_relative "../lib/organize_files"
6
+ require "optparse"
7
+
8
+ options = {}
9
+ options[:directory] = ARGV[0]
10
+
11
+ OptionParser.new do |opts|
12
+ opts.banner = "Usage: organize_files [options]"
13
+
14
+ opts.on("-i", "--ignore-empty-directories", "Ignore Empty Directories") do
15
+ options[:ignore_empty_directory] = true
16
+ end
17
+
18
+ opts.on("-c", "--config CONFIG_FILE", "Specify config file (default: .organize_config.yml)") do |config|
19
+ options[:config] = config
20
+ end
21
+
22
+ opts.on("-h", "--help", "Prints this help") do
23
+ puts opts
24
+ exit
25
+ end
26
+ end.parse!
27
+
28
+ if options[:directory].nil?
29
+ puts "You must specify a directory to organize"
30
+ exit 1
31
+ end
32
+
33
+ sorter = OrganizeFiles::Organizer.new(options)
34
+ sorter.organize
35
+
36
+ puts "Files in '#{options[:directory]}' have been organized"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OrganizeFiles
4
- VERSION = "1.1.0"
4
+ VERSION = "1.1.1"
5
5
  end
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
7
7
  s.authors = ["Mayank Agnihotri"]
8
8
  s.version = OrganizeFiles::VERSION
9
9
  s.files = Dir["README.md", "LICENSE", "CHANGELOG.md", "lib/**/*.rb", "lib/**/*.rake", "organize_files.gemspec",
10
- ".github/*.md", "Gemfile", "Rakefile", "CONTRIBUTING.md"]
10
+ ".github/*.md", "Gemfile", "Rakefile", "CONTRIBUTING.md", "exe/*"]
11
11
  s.licenses = ["MIT"]
12
12
  s.summary = "Organize files into their own separate folders"
13
13
  s.platform = Gem::Platform::RUBY
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: organize_files
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mayank Agnihotri
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2025-01-09 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: zeitwerk
@@ -52,9 +51,8 @@ dependencies:
52
51
  - - "~>"
53
52
  - !ruby/object:Gem::Version
54
53
  version: '1.68'
55
- description:
56
- email:
57
- executables: []
54
+ executables:
55
+ - organize_files
58
56
  extensions: []
59
57
  extra_rdoc_files:
60
58
  - README.md
@@ -63,6 +61,7 @@ files:
63
61
  - Gemfile
64
62
  - LICENSE
65
63
  - README.md
64
+ - exe/organize_files
66
65
  - lib/organize_files.rb
67
66
  - lib/organize_files/file_handler.rb
68
67
  - lib/organize_files/file_order.rb
@@ -74,7 +73,6 @@ licenses:
74
73
  - MIT
75
74
  metadata:
76
75
  source_code_uri: https://github.com/mayankagnihotri7/file-organizer
77
- post_install_message:
78
76
  rdoc_options: []
79
77
  require_paths:
80
78
  - lib
@@ -89,8 +87,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
89
87
  - !ruby/object:Gem::Version
90
88
  version: '0'
91
89
  requirements: []
92
- rubygems_version: 3.4.1
93
- signing_key:
90
+ rubygems_version: 3.6.8
94
91
  specification_version: 4
95
92
  summary: Organize files into their own separate folders
96
93
  test_files: []