gem_hadar 2.4.0 → 2.6.0

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: 39502841eb210a03ac0cc4bd23daa71ecf89767a155d767c4d38bce9be0cc549
4
- data.tar.gz: 17fa80cf6cf4ed8150a1a2e712df7cb6a6f3e379aac013865fe1356df604e316
3
+ metadata.gz: 9afac6aeee2cdaadc1ec6e896ba72deee0517321e2afb05258bce1c45b83c595
4
+ data.tar.gz: 7dcf1fa960040119aeea393e8ca9e82105f4ce72adde095ff050a4e518fdc93f
5
5
  SHA512:
6
- metadata.gz: 70ce75b7be6a35c32c2545784d64a9dfcac98c0c0ca00ee81d7f596aa3f66371820a0de9d292d4b1d3b00d33751ae388ea70ab34a732ba415f69f2a0b5eac673
7
- data.tar.gz: 368c29f2ad39ee6a10c1c68ef05389348bed13846f26a778fae509cf32cb606d7c7b9d5ad2e9168cdb36159e8f77e6af48eaa25e35866ee762d059a6fa0cbafa
6
+ metadata.gz: 2d7c1f2ec16839cc1dd2bb18950214bdd3513734e114868f085797860773e9bb09d42f43a24ae908237de12d45ed6eabd9e920e26be5832d171531606f0b7654
7
+ data.tar.gz: 9a678a6c007c88ae4c8b3ca06cede7a27ddf8bdaa741aefbd50cf7d0bc8adf60b78e09f66d4798241904991d5c4a656fde26b28b09f5a4be3c1af5fcb09a05d4
data/Rakefile CHANGED
@@ -11,7 +11,8 @@ GemHadar do
11
11
  summary 'Library for the development of Ruby Gems'
12
12
  description 'This library contains some useful functionality to support the development of Ruby Gems'
13
13
  test_dir 'spec'
14
- ignore '.*.sw[pon]', 'pkg', 'Gemfile.lock', '.AppleDouble', '.bundle', '.yardoc', 'tags'
14
+ ignore '.*.sw[pon]', 'pkg', 'Gemfile.lock', '.AppleDouble',
15
+ '.bundle', '.yardoc', 'doc', 'tags'
15
16
  package_ignore '.gitignore', 'VERSION'
16
17
  readme 'README.md'
17
18
 
data/gem_hadar.gemspec CHANGED
@@ -1,9 +1,9 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: gem_hadar 2.4.0 ruby lib
2
+ # stub: gem_hadar 2.6.0 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "gem_hadar".freeze
6
- s.version = "2.4.0".freeze
6
+ s.version = "2.6.0".freeze
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
9
9
  s.require_paths = ["lib".freeze]
@@ -23,7 +23,7 @@ Gem::Specification.new do |s|
23
23
 
24
24
  s.specification_version = 4
25
25
 
26
- s.add_development_dependency(%q<gem_hadar>.freeze, ["~> 2.3".freeze])
26
+ s.add_development_dependency(%q<gem_hadar>.freeze, ["~> 2.5".freeze])
27
27
  s.add_development_dependency(%q<rspec>.freeze, ["~> 3.13".freeze])
28
28
  s.add_runtime_dependency(%q<tins>.freeze, ["~> 1".freeze])
29
29
  s.add_runtime_dependency(%q<term-ansicolor>.freeze, ["~> 1.0".freeze])
@@ -1,6 +1,6 @@
1
1
  class GemHadar
2
2
  # GemHadar version
3
- VERSION = '2.4.0'
3
+ VERSION = '2.6.0'
4
4
  VERSION_ARRAY = VERSION.split('.').map(&:to_i) # :nodoc:
5
5
  VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
6
6
  VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
data/lib/gem_hadar.rb CHANGED
@@ -140,11 +140,14 @@ class GemHadar
140
140
  [ name, version ] * '-'
141
141
  end
142
142
 
143
- # The module_type attribute accessor for configuring the type of Ruby construct to generate for version code.
143
+ # The module_type attribute accessor for configuring the type of Ruby
144
+ # construct to generate for version code.
144
145
  #
145
- # This method sets up a DSL accessor for the module_type attribute, which determines whether the generated code
146
- # structure for the version module should be a :module or :class. This controls the type of Ruby construct
147
- # created when generating code skeletons and version files. The value can be set to either:
146
+ # This method sets up a DSL accessor for the module_type attribute, which
147
+ # determines whether the generated code structure for the version module
148
+ # should be a :module or :class. This controls the type of Ruby construct
149
+ # created when generating code skeletons and version files. The value can be
150
+ # set to either:
148
151
  #
149
152
  # - :module (default) - Generates module-based structure
150
153
  # - :class - Generates class-based structure
@@ -342,10 +345,10 @@ class GemHadar
342
345
 
343
346
  # The test_dir attribute accessor for configuring the test directory.
344
347
  #
345
- # This method sets up a DSL accessor for the test_dir attribute, which specifies
346
- # the directory where test files are located. It provides a way to define the
347
- # location of the test directory that will be used by various testing tasks and
348
- # configurations within the gem project.
348
+ # This method sets up a DSL accessor for the test_dir attribute, which
349
+ # specifies the directory where test files are located. It provides a way to
350
+ # define the location of the test directory that will be used by various
351
+ # testing tasks and configurations within the gem project.
349
352
  #
350
353
  # @return [ String, nil ] the path to the test directory or nil if not set
351
354
  dsl_accessor :test_dir
@@ -398,6 +401,21 @@ class GemHadar
398
401
  end
399
402
  end
400
403
 
404
+ # The doc_code_files method manages the list of code files to be included in
405
+ # documentation generation.
406
+ #
407
+ # This method sets up a DSL accessor for the doc_code_files attribute, which
408
+ # specifies the Ruby source files that should be processed when generating
409
+ # YARD documentation. It defaults to using the files attribute and provides a
410
+ # way to customize which code files are included in the documentation build
411
+ # process.
412
+ #
413
+ # @return [ FileList ] a list of file paths to be included in YARD documentation generation
414
+ # @see GemHadar#files
415
+ dsl_accessor :doc_code_files do
416
+ files
417
+ end
418
+
401
419
  # The doc_files attribute accessor for configuring additional documentation
402
420
  # files.
403
421
  #
@@ -463,7 +481,7 @@ class GemHadar
463
481
  #
464
482
  # @return [ Array<String> ] an array of file paths to be included in the gem package
465
483
  dsl_accessor :files do
466
- `git ls-files`.split("\n")
484
+ FileList[`git ls-files`.split("\n")]
467
485
  end
468
486
 
469
487
  # The package_ignore_files attribute accessor for configuring files to be
@@ -537,9 +555,9 @@ class GemHadar
537
555
  # display after gem installation.
538
556
  #
539
557
  # This method sets up a DSL accessor for the post_install_message attribute,
540
- # which specifies a message to be displayed to users after the gem is installed.
541
- # This can be useful for providing additional information, usage instructions,
542
- # or important warnings to users of the gem.
558
+ # which specifies a message to be displayed to users after the gem is
559
+ # installed. This can be useful for providing additional information, usage
560
+ # instructions, or important warnings to users of the gem.
543
561
  #
544
562
  # @return [ String, nil ] the post-installation message or nil if not set
545
563
  dsl_accessor :post_install_message
@@ -761,7 +779,13 @@ class GemHadar
761
779
  if args.empty?
762
780
  package_ignore_files
763
781
  else
764
- args.each { |a| package_ignore_files << a }
782
+ args.each do |arg|
783
+ if File.directory?(arg)
784
+ package_ignore_files.merge FileList['%s/**/*' % arg]
785
+ else
786
+ package_ignore_files << arg
787
+ end
788
+ end
765
789
  end
766
790
  end
767
791
 
@@ -1229,9 +1253,9 @@ class GemHadar
1229
1253
  #
1230
1254
  # - It creates subtasks in the :master:push namespace for each configured Git
1231
1255
  # remote, allowing individual pushes to specific remotes.
1232
- # - It also defines a top-level :master:push task that depends on all the individual
1233
- # remote push tasks, enabling a single command to push the master branch to
1234
- # all remotes.
1256
+ # - It also defines a top-level :master:push task that depends on all the
1257
+ # individual remote push tasks, enabling a single command to push the master
1258
+ # branch to all remotes.
1235
1259
  #
1236
1260
  # The tasks utilize the git_remotes method to determine which remotes are
1237
1261
  # configured and generate appropriate push commands for each one.
@@ -1464,9 +1488,20 @@ class GemHadar
1464
1488
  end
1465
1489
  end
1466
1490
 
1491
+ # The yard_doc_task method configures and sets up a YARD documentation
1492
+ # generation task.
1493
+ #
1494
+ # This method initializes a YARD::Rake::YardocTask that processes Ruby source
1495
+ # files and generates comprehensive documentation including private and
1496
+ # protected methods. It configures the output directory, handles README
1497
+ # files, includes additional documentation files, and sets up a pre-execution
1498
+ # cleanup routine.
1499
+ #
1500
+ # @return [ void ] This method does not return a value but defines a Rake task
1501
+ # named :yard_doc with specific configuration options.
1467
1502
  def yard_doc_task
1468
1503
  YARD::Rake::YardocTask.new(:yard_doc) do |t|
1469
- t.files = files.select { _1 =~ /\.rb\z/ }
1504
+ t.files = doc_code_files.grep(%r(\.rb\z))
1470
1505
 
1471
1506
  output_dir = yard_dir
1472
1507
  t.options = [ "--output-dir=#{output_dir}" ]
@@ -1497,8 +1532,8 @@ class GemHadar
1497
1532
  #
1498
1533
  # It creates multiple subtasks under the :yard namespace, including tasks for
1499
1534
  # creating private documentation, viewing the generated documentation,
1500
- # cleaning up documentation files, and listing undocumented elements.
1501
- # If YARD is not available, the method returns early without defining any tasks.
1535
+ # cleaning up documentation files, and listing undocumented elements. If YARD
1536
+ # is not available, the method returns early without defining any tasks.
1502
1537
  def yard_task
1503
1538
  defined? YARD or return
1504
1539
  yard_doc_task
@@ -1536,6 +1571,14 @@ class GemHadar
1536
1571
  task :yard => %i[ yard:private yard:view ]
1537
1572
  end
1538
1573
 
1574
+ # The config_task method creates a Rake task that displays the current
1575
+ # GemHadar configuration.
1576
+ #
1577
+ # This method sets up a :gem_hadar:config task under the Rake namespace that
1578
+ # outputs detailed information about the gem's configuration, including
1579
+ # environment variables, API keys, Ollama settings, XDG configuration
1580
+ # directory, general gem properties, build and development parameters, Git
1581
+ # remotes, and AI prompt defaults.
1539
1582
  def config_task
1540
1583
  namespace :gem_hadar do
1541
1584
  desc "Display current gem_hadar configuration"
@@ -1705,7 +1748,8 @@ class GemHadar
1705
1748
  # set. The method then constructs the full base URL and initializes an
1706
1749
  # Ollama::Client with appropriate timeouts for read and connect operations.
1707
1750
  #
1708
- # @return [Ollama::Client, nil] An initialized Ollama::Client instance if a valid base URL is present, otherwise nil.
1751
+ # @return [Ollama::Client, nil] An initialized Ollama::Client instance if a
1752
+ # valid base URL is present, otherwise nil.
1709
1753
  def ollama_client
1710
1754
  base_url = ENV['OLLAMA_URL']
1711
1755
  if base_url.blank?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gem_hadar
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0
4
+ version: 2.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank
@@ -15,14 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - "~>"
17
17
  - !ruby/object:Gem::Version
18
- version: '2.3'
18
+ version: '2.5'
19
19
  type: :development
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - "~>"
24
24
  - !ruby/object:Gem::Version
25
- version: '2.3'
25
+ version: '2.5'
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: rspec
28
28
  requirement: !ruby/object:Gem::Requirement