bundler-gem_bytes 0.1.0 → 0.2.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.
@@ -1,36 +1,56 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # require 'pp'
4
3
  require 'thor'
5
- require 'uri'
4
+ require_relative 'actions'
6
5
 
7
6
  module Bundler
8
7
  module GemBytes
9
- # ScriptExecutor is responsible for executing scripts using Thor actions
8
+ # Responsible for executing scripts using Thor and GemBytes actions
10
9
  #
11
- # @api public
10
+ # This class enables the execution of scripts from a file or URI, integrating
11
+ # with `Thor::Actions` to allow advanced file manipulation and action chaining.
12
+ # This can be particularly useful for tasks like creating or modifying files,
13
+ # managing dependencies, and implementing workflows for gem development.
12
14
  #
13
15
  # @example Executing a script from a file or URI
14
16
  # executor = Bundler::GemBytes::ScriptExecutor.new
15
17
  # executor.execute('path_or_uri_to_script')
16
- class ScriptExecutor < Thor::Group
17
- include Thor::Actions
18
+ # @api public
19
+ class ScriptExecutor < ::Thor::Group
20
+ include ::Thor::Actions
21
+ include Bundler::GemBytes::Actions
18
22
 
19
- # Set the source paths for Thor to use
20
- # @return [Array<String>] the source paths
23
+ # Sets the source paths for `Thor::Actions`
24
+ #
25
+ # This determines where action scripts will be sourced from.
26
+ #
27
+ # By default, the source path is set to the current working directory, which
28
+ # allows scripts to access files from the local file system during execution.
29
+ #
30
+ # @return [Array<String>] the list of source paths
31
+ #
21
32
  # @api private
22
33
  def self.source_paths
23
- # Add the current working directory or the directory of the script
24
34
  [Dir.pwd]
25
35
  end
26
36
 
27
- # Executes the script from a URI or file path
37
+ # Executes a script from a given URI or file path
38
+ #
39
+ # This method loads the script located at the specified `path_or_uri` and
40
+ # executes it within the context of this class which includes `Thor::Actions`
41
+ # and `Bundler::GemBytes::ScriptExecutor`. This allows the script to perform
42
+ # tasks such as modifying files, creating directories, and other common file
43
+ # system operations.
28
44
  #
29
45
  # @param path_or_uri [String] the URI or file path to the script
46
+ #
30
47
  # @return [void]
48
+ #
31
49
  # @raise [RuntimeError] if the script cannot be loaded
50
+ #
32
51
  # @example Execute a script from a path
33
52
  # execute('path/to/script.rb')
53
+ #
34
54
  def execute(path_or_uri)
35
55
  apply(path_or_uri)
36
56
  rescue StandardError => e
@@ -3,6 +3,6 @@
3
3
  module Bundler
4
4
  module GemBytes
5
5
  # The version of this gem
6
- VERSION = '0.1.0'
6
+ VERSION = '0.2.2'
7
7
  end
8
8
  end
@@ -13,6 +13,10 @@ module Bundler
13
13
  end
14
14
  end
15
15
 
16
+ require 'active_support'
17
+ require 'thor'
18
+
19
+ require_relative 'gem_bytes/actions'
16
20
  require_relative 'gem_bytes/bundler_command'
17
21
  require_relative 'gem_bytes/script_executor'
18
22
  require_relative 'gem_bytes/version'
@@ -0,0 +1,22 @@
1
+ {
2
+ "bootstrap-sha": "28bcb17c41c9f9888c79c353731f557478f400f6",
3
+ "packages": {
4
+ ".": {
5
+ "release-type": "ruby",
6
+ "package-name": "bundler-gem_bytes",
7
+ "changelog-path": "CHANGELOG.md",
8
+ "version-file": "lib/bundler/gem_bytes/version.rb",
9
+ "bump-minor-pre-major": true,
10
+ "bump-patch-for-minor-pre-major": true,
11
+ "draft": false,
12
+ "prerelease": false,
13
+ "include-component-in-tag": false
14
+ }
15
+ },
16
+ "plugins": [
17
+ {
18
+ "type": "sentence-case"
19
+ }
20
+ ],
21
+ "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
22
+ }
metadata CHANGED
@@ -1,15 +1,56 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bundler-gem_bytes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Couball
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2024-10-17 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
12
+ - !ruby/object:Gem::Dependency
13
+ name: activesupport
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - ">="
17
+ - !ruby/object:Gem::Version
18
+ version: '0'
19
+ type: :runtime
20
+ prerelease: false
21
+ version_requirements: !ruby/object:Gem::Requirement
22
+ requirements:
23
+ - - ">="
24
+ - !ruby/object:Gem::Version
25
+ version: '0'
26
+ - !ruby/object:Gem::Dependency
27
+ name: parser
28
+ requirement: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - "~>"
31
+ - !ruby/object:Gem::Version
32
+ version: '3.3'
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '3.3'
40
+ - !ruby/object:Gem::Dependency
41
+ name: rubocop-ast
42
+ requirement: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: '1.32'
47
+ type: :runtime
48
+ prerelease: false
49
+ version_requirements: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '1.32'
13
54
  - !ruby/object:Gem::Dependency
14
55
  name: thor
15
56
  requirement: !ruby/object:Gem::Requirement
@@ -52,6 +93,20 @@ dependencies:
52
93
  - - ">="
53
94
  - !ruby/object:Gem::Version
54
95
  version: '0'
96
+ - !ruby/object:Gem::Dependency
97
+ name: process_executer
98
+ requirement: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - "~>"
101
+ - !ruby/object:Gem::Version
102
+ version: '1.2'
103
+ type: :development
104
+ prerelease: false
105
+ version_requirements: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - "~>"
108
+ - !ruby/object:Gem::Version
109
+ version: '1.2'
55
110
  - !ruby/object:Gem::Dependency
56
111
  name: rake
57
112
  requirement: !ruby/object:Gem::Requirement
@@ -108,6 +163,20 @@ dependencies:
108
163
  - - "~>"
109
164
  - !ruby/object:Gem::Version
110
165
  version: '0.22'
166
+ - !ruby/object:Gem::Dependency
167
+ name: simplecov-lcov
168
+ requirement: !ruby/object:Gem::Requirement
169
+ requirements:
170
+ - - "~>"
171
+ - !ruby/object:Gem::Version
172
+ version: '0.8'
173
+ type: :development
174
+ prerelease: false
175
+ version_requirements: !ruby/object:Gem::Requirement
176
+ requirements:
177
+ - - "~>"
178
+ - !ruby/object:Gem::Version
179
+ version: '0.8'
111
180
  - !ruby/object:Gem::Dependency
112
181
  name: simplecov-rspec
113
182
  requirement: !ruby/object:Gem::Requirement
@@ -122,6 +191,20 @@ dependencies:
122
191
  - - "~>"
123
192
  - !ruby/object:Gem::Version
124
193
  version: '0.4'
194
+ - !ruby/object:Gem::Dependency
195
+ name: turnip
196
+ requirement: !ruby/object:Gem::Requirement
197
+ requirements:
198
+ - - "~>"
199
+ - !ruby/object:Gem::Version
200
+ version: '4.4'
201
+ type: :development
202
+ prerelease: false
203
+ version_requirements: !ruby/object:Gem::Requirement
204
+ requirements:
205
+ - - "~>"
206
+ - !ruby/object:Gem::Version
207
+ version: '4.4'
125
208
  - !ruby/object:Gem::Dependency
126
209
  name: redcarpet
127
210
  requirement: !ruby/object:Gem::Requirement
@@ -177,6 +260,7 @@ extra_rdoc_files: []
177
260
  files:
178
261
  - ".commitlintrc.yml"
179
262
  - ".husky/commit-msg"
263
+ - ".release-please-manifest.json"
180
264
  - ".rspec"
181
265
  - ".rubocop.yml"
182
266
  - CHANGELOG.md
@@ -185,11 +269,21 @@ files:
185
269
  - README.md
186
270
  - Rakefile
187
271
  - lib/bundler/gem_bytes.rb
272
+ - lib/bundler/gem_bytes/actions.rb
273
+ - lib/bundler/gem_bytes/actions/gemspec.rb
274
+ - lib/bundler/gem_bytes/actions/gemspec/attribute.rb
275
+ - lib/bundler/gem_bytes/actions/gemspec/attribute_node.rb
276
+ - lib/bundler/gem_bytes/actions/gemspec/delete_dependency.rb
277
+ - lib/bundler/gem_bytes/actions/gemspec/dependency.rb
278
+ - lib/bundler/gem_bytes/actions/gemspec/dependency_node.rb
279
+ - lib/bundler/gem_bytes/actions/gemspec/gem_specification.rb
280
+ - lib/bundler/gem_bytes/actions/gemspec/upsert_dependency.rb
188
281
  - lib/bundler/gem_bytes/bundler_command.rb
189
282
  - lib/bundler/gem_bytes/script_executor.rb
190
283
  - lib/bundler/gem_bytes/version.rb
191
284
  - package.json
192
285
  - plugins.rb
286
+ - release-please-config.json
193
287
  homepage: https://github.com/main-branch/bundler-gem_bytes
194
288
  licenses:
195
289
  - MIT
@@ -197,11 +291,10 @@ metadata:
197
291
  allowed_push_host: https://rubygems.org
198
292
  homepage_uri: https://github.com/main-branch/bundler-gem_bytes
199
293
  source_code_uri: https://github.com/main-branch/bundler-gem_bytes
200
- documentation_uri: https://rubydoc.info/gems/bundler-gem_bytes/0.1.0
201
- changelog_uri: https://rubydoc.info/gems/bundler-gem_bytes/0.1.0/file/CHANGELOG.md
294
+ documentation_uri: https://rubydoc.info/gems/bundler-gem_bytes/0.2.2
295
+ changelog_uri: https://rubydoc.info/gems/bundler-gem_bytes/0.2.2/file/CHANGELOG.md
202
296
  bug_tracker_uri: https://github.com/main-branch/bundler-gem_bytes/issues
203
297
  rubygems_mfa_required: 'true'
204
- post_install_message:
205
298
  rdoc_options: []
206
299
  require_paths:
207
300
  - lib
@@ -216,8 +309,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
216
309
  - !ruby/object:Gem::Version
217
310
  version: '0'
218
311
  requirements: []
219
- rubygems_version: 3.5.16
220
- signing_key:
312
+ rubygems_version: 3.6.7
221
313
  specification_version: 4
222
314
  summary: A bundler plugin that adds features to your existing Ruby Gems project
223
315
  test_files: []