gem_hadar 2.5.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 +4 -4
- data/gem_hadar.gemspec +3 -3
- data/lib/gem_hadar/version.rb +1 -1
- data/lib/gem_hadar.rb +48 -19
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9afac6aeee2cdaadc1ec6e896ba72deee0517321e2afb05258bce1c45b83c595
|
4
|
+
data.tar.gz: 7dcf1fa960040119aeea393e8ca9e82105f4ce72adde095ff050a4e518fdc93f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d7c1f2ec16839cc1dd2bb18950214bdd3513734e114868f085797860773e9bb09d42f43a24ae908237de12d45ed6eabd9e920e26be5832d171531606f0b7654
|
7
|
+
data.tar.gz: 9a678a6c007c88ae4c8b3ca06cede7a27ddf8bdaa741aefbd50cf7d0bc8adf60b78e09f66d4798241904991d5c4a656fde26b28b09f5a4be3c1af5fcb09a05d4
|
data/gem_hadar.gemspec
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: gem_hadar 2.
|
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.
|
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.
|
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])
|
data/lib/gem_hadar/version.rb
CHANGED
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
|
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
|
146
|
-
#
|
147
|
-
#
|
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
|
346
|
-
# the directory where test files are located. It provides a way to
|
347
|
-
# location of the test directory that will be used by various
|
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
|
@@ -552,9 +555,9 @@ class GemHadar
|
|
552
555
|
# display after gem installation.
|
553
556
|
#
|
554
557
|
# This method sets up a DSL accessor for the post_install_message attribute,
|
555
|
-
# which specifies a message to be displayed to users after the gem is
|
556
|
-
# This can be useful for providing additional information, usage
|
557
|
-
# 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.
|
558
561
|
#
|
559
562
|
# @return [ String, nil ] the post-installation message or nil if not set
|
560
563
|
dsl_accessor :post_install_message
|
@@ -776,7 +779,13 @@ class GemHadar
|
|
776
779
|
if args.empty?
|
777
780
|
package_ignore_files
|
778
781
|
else
|
779
|
-
args.each
|
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
|
780
789
|
end
|
781
790
|
end
|
782
791
|
|
@@ -1244,9 +1253,9 @@ class GemHadar
|
|
1244
1253
|
#
|
1245
1254
|
# - It creates subtasks in the :master:push namespace for each configured Git
|
1246
1255
|
# remote, allowing individual pushes to specific remotes.
|
1247
|
-
# - It also defines a top-level :master:push task that depends on all the
|
1248
|
-
# remote push tasks, enabling a single command to push the master
|
1249
|
-
# 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.
|
1250
1259
|
#
|
1251
1260
|
# The tasks utilize the git_remotes method to determine which remotes are
|
1252
1261
|
# configured and generate appropriate push commands for each one.
|
@@ -1479,9 +1488,20 @@ class GemHadar
|
|
1479
1488
|
end
|
1480
1489
|
end
|
1481
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.
|
1482
1502
|
def yard_doc_task
|
1483
1503
|
YARD::Rake::YardocTask.new(:yard_doc) do |t|
|
1484
|
-
t.files = doc_code_files.
|
1504
|
+
t.files = doc_code_files.grep(%r(\.rb\z))
|
1485
1505
|
|
1486
1506
|
output_dir = yard_dir
|
1487
1507
|
t.options = [ "--output-dir=#{output_dir}" ]
|
@@ -1512,8 +1532,8 @@ class GemHadar
|
|
1512
1532
|
#
|
1513
1533
|
# It creates multiple subtasks under the :yard namespace, including tasks for
|
1514
1534
|
# creating private documentation, viewing the generated documentation,
|
1515
|
-
# cleaning up documentation files, and listing undocumented elements.
|
1516
|
-
#
|
1535
|
+
# cleaning up documentation files, and listing undocumented elements. If YARD
|
1536
|
+
# is not available, the method returns early without defining any tasks.
|
1517
1537
|
def yard_task
|
1518
1538
|
defined? YARD or return
|
1519
1539
|
yard_doc_task
|
@@ -1551,6 +1571,14 @@ class GemHadar
|
|
1551
1571
|
task :yard => %i[ yard:private yard:view ]
|
1552
1572
|
end
|
1553
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.
|
1554
1582
|
def config_task
|
1555
1583
|
namespace :gem_hadar do
|
1556
1584
|
desc "Display current gem_hadar configuration"
|
@@ -1720,7 +1748,8 @@ class GemHadar
|
|
1720
1748
|
# set. The method then constructs the full base URL and initializes an
|
1721
1749
|
# Ollama::Client with appropriate timeouts for read and connect operations.
|
1722
1750
|
#
|
1723
|
-
# @return [Ollama::Client, nil] An initialized Ollama::Client instance if a
|
1751
|
+
# @return [Ollama::Client, nil] An initialized Ollama::Client instance if a
|
1752
|
+
# valid base URL is present, otherwise nil.
|
1724
1753
|
def ollama_client
|
1725
1754
|
base_url = ENV['OLLAMA_URL']
|
1726
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
|
+
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.
|
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.
|
25
|
+
version: '2.5'
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: rspec
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|