git_swap 1.1.3 → 1.1.4

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: 14e3a56f38c6ebe871a9e86ad054002bf11069f32966c9f9b61b133450644676
4
- data.tar.gz: ff7aea19f7b05bcfe3c4edb7c856330b3fd620a66bd9fa8229e426dc66a98c9d
3
+ metadata.gz: e65c6f7a891ea8dfd0b79979f1a1343cb227d6c19e1a08e32828b162c2db5806
4
+ data.tar.gz: 24a37f131056d2b52066d2c7851cec0e2d99ad18de2f4e4d510c7cf24f5ad16d
5
5
  SHA512:
6
- metadata.gz: c593ebf136a376e28c75f834b5c20e374229695a0d2ef460df6f22879333a18cd5d614ad24a462f255faf3b1d2b1ad93e51bb5b725784bf29f2c1af9429885a0
7
- data.tar.gz: 25f2a3060e9ff5930773c9be8423ca03f14b88e5149ead159a44aaf237b89513d39c282af7413403c3d0a727a48bf174199c1bf97a63f009c513f423f749f34a
6
+ metadata.gz: 529142e77aae3ab241d4e30e108390bd8a8685f82314424b51089ccdbf087a4baec818db6771c62d9e333c2f16f92c821be7cef1d0e805baaec9dac8938565bf
7
+ data.tar.gz: a8a3ba2294c2d7c413bd8b310535f7f2bcd196785a244d2db42a349cbbb334352dcf523fde9463a738e027089119d38c1378e7d47aafde19960a728c346cfc4b
@@ -1,11 +1,8 @@
1
1
  require_relative './version'
2
- require 'active_support/core_ext/module/delegation'
3
2
 
4
3
  module GitSwap
5
4
  class Swapper
6
5
  attr_reader :config, :options
7
- delegate :usage?, :config?, :edit?, :list?, :version?, :global?, to: :options
8
- delegate :profile, :name, :username, :email, :ssh, :ssh_command, :print_list, :configure!, :edit!, :valid_profile?, to: :config
9
6
 
10
7
  def initialize(args)
11
8
  raise ArgumentError unless args.is_a? Array
@@ -66,6 +63,20 @@ module GitSwap
66
63
  end
67
64
  end
68
65
 
66
+ # Use method_missing for delegation
67
+ # Original ActiveSupport version
68
+ # delegate :usage?, :config?, :edit?, :list?, :version?, :global?, to: :options
69
+ # delegate :profile, :name, :username, :email, :ssh, :ssh_command, :print_list, :configure!, :edit!, :valid_profile?, to: :config
70
+ def method_missing(method, *args)
71
+ if @options.respond_to?(method)
72
+ @options.send(method, *args)
73
+ elsif @config.respond_to?(method)
74
+ @config.send(method, *args)
75
+ else
76
+ super
77
+ end
78
+ end
79
+
69
80
  private
70
81
 
71
82
  def git_config_flag
@@ -1,3 +1,3 @@
1
1
  module GitSwap
2
- VERSION = "1.1.3" unless defined? VERSION
2
+ VERSION = "1.1.4" unless defined? VERSION
3
3
  end
metadata CHANGED
@@ -1,43 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git_swap
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Randall Reed, Jr.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-09 00:00:00.000000000 Z
11
+ date: 2022-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: activesupport
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '5.2'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '5.2'
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: bundler
29
15
  requirement: !ruby/object:Gem::Requirement
30
16
  requirements:
31
17
  - - "~>"
32
18
  - !ruby/object:Gem::Version
33
- version: 2.2.10
19
+ version: 2.3.7
34
20
  type: :development
35
21
  prerelease: false
36
22
  version_requirements: !ruby/object:Gem::Requirement
37
23
  requirements:
38
24
  - - "~>"
39
25
  - !ruby/object:Gem::Version
40
- version: 2.2.10
26
+ version: 2.3.7
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: rake
43
29
  requirement: !ruby/object:Gem::Requirement