coaster 1.3.34 → 1.3.35

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: 7b74632abeea191ac11160939d23c3bd946cb48880bcf0d804513d4a1571cacd
4
- data.tar.gz: cac164004edff9cd0454714e60cf4f896a2d96f61fa51ac16e1b3f1cd1ac0cfd
3
+ metadata.gz: d90387f0828b0ece5fec61d33b6dd1458da6944816a877f8f222d0c732b3737e
4
+ data.tar.gz: 64d540a0623b059d65789d58118c668640dd9679595eb2b3582aa5708c639480
5
5
  SHA512:
6
- metadata.gz: 5ec894acd59493e72c0e644461ff9b6d607dff5b6b13131fe28141e7a48922a703488345ba326d6bc5b2a86729c1f1b35117fd553e5d887fb3e1698016fb8e37
7
- data.tar.gz: 6cd29ad2fd087537de3b366bd11d8da6f0aee6ac7c81f1d42f71324ebbd6c729f8989c9fdf7ee3debce018a7fef2880309116a48ec7ae560b5d726e87f1d1427
6
+ metadata.gz: 6aa3bc61db4b538553799902876097e555fcc508ee7c7c8b86d19fca60f8d19e6c7dadf74812fa79bac75b7863ce0e3052b47d70e3e682555e8394f790465f3c
7
+ data.tar.gz: 0a9a86bf0baef2c0c07eb2bf3bc7c6a284eb201139c61b2536d04e00db7c0339f6a7062fdd604a39fa74c660c9cdda4eb323c2747c13825fee562cfcddca416e
@@ -1,3 +1,5 @@
1
+ require 'optparse'
2
+
1
3
  module Coaster
2
4
  class CmdOptions
3
5
  class << self
@@ -9,36 +11,6 @@ module Coaster
9
11
  end
10
12
  end
11
13
 
12
- def options_s_to_h(options)
13
- opts = {}
14
- options = " #{options}"
15
- options_indexes = options.enum_for(:scan, / -\w| --\w+| -- /).map { Regexp.last_match.begin(0) }
16
- options_indexes << 0
17
- options_indexes.each_cons(2) do |a, b|
18
- option = options[a+1..b-1]
19
- h = option_s_to_h(option)
20
- options_h_merger(h, base: opts)
21
- end
22
- opts
23
- end
24
-
25
- def option_s_to_h(option)
26
- if option.start_with?(/--\w/)
27
- opt = option.split('=', 2)
28
- opt << '' if opt.length == 1
29
- elsif option.start_with?(/-\w/)
30
- opt = option.split(' ', 2)
31
- opt << '' if opt.length == 1
32
- elsif option.start_with?('-- ')
33
- opt = ['--', option[3..-1].split(' ')]
34
- else
35
- return {}
36
- end
37
- opt[1] = opt[1].split(',') if opt[1].include?(',')
38
- opt[1] = opt[1].map{|s| s.include?('=') ? Hash[s.split('=', 2)] : s}.to_h if opt[1].is_a?(Array)
39
- [opt].to_h
40
- end
41
-
42
14
  def option_v_to_s(option_v)
43
15
  case option_v
44
16
  when Hash then option_v.map{|vk,vv| Set[vk, vv]}.to_set
data/lib/coaster/git.rb CHANGED
@@ -1,4 +1,6 @@
1
1
  require 'open3'
2
+ require 'active_support'
3
+ require 'active_support/core_ext'
2
4
 
3
5
  module Coaster
4
6
  module Git
@@ -1,3 +1,3 @@
1
1
  module Coaster
2
- VERSION = '1.3.34'
2
+ VERSION = '1.3.35'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coaster
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.34
4
+ version: 1.3.35
5
5
  platform: ruby
6
6
  authors:
7
7
  - buzz jung
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-09 00:00:00.000000000 Z
11
+ date: 2023-07-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oj