bundler-exec-shell-export 0.0.1.pre.iteration.1 → 0.0.1.pre.iteration.2

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: ed0b22f61f496f5fcf0a32d3abf1f05454fa82b1de985601d3558d4ad694c14d
4
- data.tar.gz: 3deafe0120eb500a9fc12d17fdddfbf6bd0ffa8c26c141b38819947902bb5f07
3
+ metadata.gz: a7d1327555b092460d0a639735e41d7283fef5eeef1800dfd95100c7e07462f3
4
+ data.tar.gz: 66b4c336affcbbe44b4d6998f95582533578f7721f84578fd0a7b9a57546f83f
5
5
  SHA512:
6
- metadata.gz: 4d51f872317fa1a0c9b7390f83056ee50af1aac3a2f508facd62beec599cfee1b1e32da31a2b7e3d636350c5e69eeb75cedff79f4971bfd4c78e5c740a9640d0
7
- data.tar.gz: 91df7f61a0eccb32c7427e143c3fede0bb68b60a17d2c68a5b3d983f011d1e8ae2391086b9e6f4453a64842b8fa384fb72c74698df53482ddb1c708fe8d7b7fc
6
+ metadata.gz: 04d724b82ede0616ad9247f4fbb02ba1e219a80d4660a5512ff7f64fa213ef224d594bd8d0f3c574db44b4335a8521200938867fba62666f3d3a2315982272de
7
+ data.tar.gz: 6e2d6385b15d0c90bad358b528cca466cdcf0177591e194e3e34700fc200593fa40e9325299682bb7e873e7c1e62c86ff01aaff5d20744723777913f50a60c23
data/CHANGELOG.md ADDED
@@ -0,0 +1,11 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.0.1-iteration.2] - 2024-10-08
4
+
5
+ - Add executable script for use when not installed as a plugin.
6
+ - Fix bug where the bundle was not actually loaded before export.
7
+ - Fix friendly error status code.
8
+
9
+ ## [0.0.1-iteration.1] - 2024-10-07
10
+
11
+ Initial release.
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2024 Amir Yalon
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,35 @@
1
+ # A Bundler plugin for exporting the bundle execution environment to a POSIX shell
2
+
3
+ Adds a `bundle exec-shell-export` command that outputs the script to source from a POSIX shell.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application’s Gemfile:
8
+
9
+ ```ruby
10
+ plugin 'bundler-exec-shell-export'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ ```console
16
+ $ bundle install
17
+ ```
18
+
19
+ ## Usage
20
+
21
+ ```console
22
+ $ eval "$(bundle exec-shell-export)"
23
+ ```
24
+
25
+ ## Development
26
+
27
+ TODO: TBD
28
+
29
+ ## Contributing
30
+
31
+ Bug reports and pull requests may or may not be welcome at https://github.com/amiryal/bundler-exec-shell-export.
32
+
33
+ ## License
34
+
35
+ The plugin is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -0,0 +1,5 @@
1
+ require "bundler/friendly_errors"
2
+ Bundler.with_friendly_errors do
3
+ require "bundler/plugin"
4
+ Bundler::Plugin.exec_command("exec-shell-export", ARGV)
5
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class BundlerExecShellExport
4
- VERSION = "0.0.1-iteration.1" unless defined?(VERSION)
4
+ VERSION = "0.0.1-iteration.2" unless defined?(VERSION)
5
5
  end
@@ -3,12 +3,25 @@
3
3
  require_relative "bundler_exec_shell_export/version"
4
4
 
5
5
  class BundlerExecShellExport
6
- class Error < Bundler::BundlerError; end
7
6
  Bundler::Plugin::API.command("exec-shell-export", self)
7
+
8
+ class Error < Bundler::BundlerError
9
+ def to_int
10
+ 1
11
+ end
12
+
13
+ def ==(*)
14
+ false
15
+ end
16
+
17
+ status_code(new)
18
+ end
19
+
8
20
  def exec(command_name, args)
9
21
  raise Error, "#{command_name}: called with redundant arguments" if args.any?
10
22
 
11
23
  require "shellwords"
24
+ require "bundler/setup"
12
25
  Bundler::EnvironmentPreserver::BUNDLER_KEYS.each do |key|
13
26
  [key, "#{Bundler::EnvironmentPreserver::BUNDLER_PREFIX}#{key}"].each do |name|
14
27
  next unless (value = ENV[name])
metadata CHANGED
@@ -1,12 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bundler-exec-shell-export
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.pre.iteration.1
4
+ version: 0.0.1.pre.iteration.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amir Yalon
8
8
  autorequire:
9
- bindir: bin
9
+ bindir: exe
10
10
  cert_chain: []
11
11
  date: 1970-01-01 00:00:00.000000000 Z
12
12
  dependencies: []
@@ -14,10 +14,15 @@ description: Adds a `bundle exec-shell-export` command that outputs the script t
14
14
  source from a POSIX shell.
15
15
  email:
16
16
  - git@please.nospammail.net
17
- executables: []
17
+ executables:
18
+ - bundler-exec-shell-export
18
19
  extensions: []
19
20
  extra_rdoc_files: []
20
21
  files:
22
+ - CHANGELOG.md
23
+ - LICENSE.txt
24
+ - README.md
25
+ - exe/bundler-exec-shell-export
21
26
  - lib/bundler_exec_shell_export.rb
22
27
  - lib/bundler_exec_shell_export/version.rb
23
28
  - plugins.rb