poepod 0.1.1 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e77209b86f75c10688257dfe4a79d1c1265c7be3a501d815d759fb92e1363d9a
4
- data.tar.gz: 9c9d9535212835b3bc7ddb75f0cbc8737b8660e1432c3b5f43f96c12c530c800
3
+ metadata.gz: c54370c2df957654eb4ae1fea362455f862164a7f96fd1b8fd538b86464f57d1
4
+ data.tar.gz: 98719e8e94e7da6010cd468c5dcb6c695ae0a4700f35a4436c99ba060265d2ae
5
5
  SHA512:
6
- metadata.gz: ad6419f6b2eeee7283457ca3ddfe15bc8ac1ef3993394bb4c886829408966f13a633f3d06423ecf6f28f15c333be379c7050fba5153658d408f97f6929a7c347
7
- data.tar.gz: 331b8822d8667efbf4c2c01b77d7bcf9825e6b110122d90100e8a5dcad0378e1cf1b9e7c20eb4977b1c2f69993577c76a43f7b69e6b78a3f7e3c7d392099831d
6
+ metadata.gz: 3d81a22b7571bbb1212b43089c4ca8e6e60cfe0a32228fce9116cab97c0b347ac9d3a2b8ccfb752a4b409537f6ce4841f535266c9a7b69e25a27a82d5139691a
7
+ data.tar.gz: a96111a90ab4583e043ba316dd08ccf1b3e5530e4ad68f883c9b4626a612adb0ff5e890ab5e688062ff84d4fa26c0fd7619d3210f2d3cea8ddcc9eba99f4ca5e
data/lib/poepod/cli.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "thor"
4
- require "poepod/processor"
4
+ require_relative "processor"
5
5
 
6
6
  module Poepod
7
7
  class Cli < Thor
@@ -12,6 +12,12 @@ module Poepod
12
12
  def concat(directory, output_file = nil)
13
13
  dir_path = Pathname.new(directory)
14
14
 
15
+ # Check if the directory exists
16
+ unless dir_path.directory?
17
+ puts "Error: Directory '#{directory}' does not exist."
18
+ exit(1)
19
+ end
20
+
15
21
  dir_path = dir_path.expand_path unless dir_path.absolute?
16
22
 
17
23
  output_file ||= "#{dir_path.basename}.txt"
@@ -7,9 +7,10 @@ require "pathname"
7
7
  module Poepod
8
8
  class Processor
9
9
  EXCLUDE_DEFAULT = [
10
- "node_modules/", ".git/", ".gitignore", ".DS_Store",
11
- "*.jpg", "*.jpeg", "*.png", "*.svg", "*.gif",
12
- "*.exe", "*.dll", "*.so", "*.bin", "*.o", "*.a"
10
+ /node_modules\//, /.git\//, /.gitignore$/, /.DS_Store$/,
11
+ /.jpg$/, /.jpeg$/, /.png/, /.svg$/, /.gif$/,
12
+ /.exe$/, /.dll$/, /.so$/, /.bin$/, /.o$/, /.a$/, /.gem$/, /.cap$/,
13
+ /.zip$/,
13
14
  ].freeze
14
15
 
15
16
  def initialize(config_file = nil)
@@ -35,7 +36,7 @@ module Poepod
35
36
 
36
37
  def gather_files(directory_path, exclude)
37
38
  exclude += @config["exclude"] if @config["exclude"]
38
- exclude_pattern = Regexp.union(exclude.map { |ex| Regexp.escape(ex) })
39
+ exclude_pattern = Regexp.union(exclude.map { |ex| Regexp.new(ex) })
39
40
 
40
41
  Dir.glob("#{directory_path}/**/*").reject do |file_path|
41
42
  File.directory?(file_path) || file_path.match?(exclude_pattern)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Poepod
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.3"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: poepod
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
@@ -139,7 +139,6 @@ files:
139
139
  - ".rubocop.yml"
140
140
  - CODE_OF_CONDUCT.md
141
141
  - Gemfile
142
- - Gemfile.lock
143
142
  - README.adoc
144
143
  - Rakefile
145
144
  - bin/console
data/Gemfile.lock DELETED
@@ -1,101 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- poepod (0.1.0)
5
- parallel (~> 1.20)
6
- thor (~> 1.0)
7
- tqdm
8
-
9
- GEM
10
- remote: https://rubygems.org/
11
- specs:
12
- activesupport (7.1.3.4)
13
- base64
14
- bigdecimal
15
- concurrent-ruby (~> 1.0, >= 1.0.2)
16
- connection_pool (>= 2.2.5)
17
- drb
18
- i18n (>= 1.6, < 2)
19
- minitest (>= 5.1)
20
- mutex_m
21
- tzinfo (~> 2.0)
22
- ast (2.4.2)
23
- base64 (0.2.0)
24
- bigdecimal (3.1.8)
25
- concurrent-ruby (1.3.3)
26
- connection_pool (2.4.1)
27
- diff-lcs (1.5.1)
28
- drb (2.2.1)
29
- i18n (1.14.5)
30
- concurrent-ruby (~> 1.0)
31
- json (2.7.2)
32
- language_server-protocol (3.17.0.3)
33
- minitest (5.23.1)
34
- mutex_m (0.2.0)
35
- parallel (1.25.1)
36
- parser (3.3.2.0)
37
- ast (~> 2.4.1)
38
- racc
39
- racc (1.8.0)
40
- rack (3.1.3)
41
- rainbow (3.1.1)
42
- rake (13.2.1)
43
- regexp_parser (2.9.2)
44
- rexml (3.3.0)
45
- strscan
46
- rspec (3.13.0)
47
- rspec-core (~> 3.13.0)
48
- rspec-expectations (~> 3.13.0)
49
- rspec-mocks (~> 3.13.0)
50
- rspec-core (3.13.0)
51
- rspec-support (~> 3.13.0)
52
- rspec-expectations (3.13.0)
53
- diff-lcs (>= 1.2.0, < 2.0)
54
- rspec-support (~> 3.13.0)
55
- rspec-mocks (3.13.1)
56
- diff-lcs (>= 1.2.0, < 2.0)
57
- rspec-support (~> 3.13.0)
58
- rspec-support (3.13.1)
59
- rubocop (1.64.1)
60
- json (~> 2.3)
61
- language_server-protocol (>= 3.17.0)
62
- parallel (~> 1.10)
63
- parser (>= 3.3.0.2)
64
- rainbow (>= 2.2.2, < 4.0)
65
- regexp_parser (>= 1.8, < 3.0)
66
- rexml (>= 3.2.5, < 4.0)
67
- rubocop-ast (>= 1.31.1, < 2.0)
68
- ruby-progressbar (~> 1.7)
69
- unicode-display_width (>= 2.4.0, < 3.0)
70
- rubocop-ast (1.31.3)
71
- parser (>= 3.3.1.0)
72
- rubocop-performance (1.21.0)
73
- rubocop (>= 1.48.1, < 2.0)
74
- rubocop-ast (>= 1.31.1, < 2.0)
75
- rubocop-rails (2.25.0)
76
- activesupport (>= 4.2.0)
77
- rack (>= 1.1)
78
- rubocop (>= 1.33.0, < 2.0)
79
- rubocop-ast (>= 1.31.1, < 2.0)
80
- ruby-progressbar (1.13.0)
81
- strscan (3.1.0)
82
- thor (1.3.1)
83
- tqdm (0.4.1)
84
- tzinfo (2.0.6)
85
- concurrent-ruby (~> 1.0)
86
- unicode-display_width (2.5.0)
87
-
88
- PLATFORMS
89
- arm64-darwin-23
90
- ruby
91
-
92
- DEPENDENCIES
93
- poepod!
94
- rake
95
- rspec
96
- rubocop
97
- rubocop-performance
98
- rubocop-rails
99
-
100
- BUNDLED WITH
101
- 2.5.11