rbcli 0.3.1 → 0.3.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: 2b09f31e66da303b96ae807e17c69e324485ad53f8c9fde04ed525f766e9a79b
4
- data.tar.gz: 76002def4a6b65dc5de898ce50e4a1c307999d4170560c7267d89289d3bc4dff
3
+ metadata.gz: 4e63232bea903fe35c860d5eef3b5f19424820b09957d18bb95638b2b5eef778
4
+ data.tar.gz: f37cdad7606d66c155d6ae919b28848d5befd8189d3bb35c0172845aa1682d51
5
5
  SHA512:
6
- metadata.gz: 660f735a38b1e19d1123a98f48b907a2c3a51a8b181787d5967f98a0e30abe6573bb331aea652630ad65972e979ca4bc0566062308f52a027cc789b7e2eff60c
7
- data.tar.gz: 80f40fc851e6dd94b1422db62590824d0e7cc4151172d4f35ccacebd03f5515cd2c1207520d4bfd9c7535d862c3a6db2fd92caaaf2526e3da160addba5f4d413
6
+ metadata.gz: 40558b218de343ed24b9779f27bea6e7f664ebe9188e51f017717aa20742ec485feca02c5d3ba4ab49fa1b1de6614a593faaa95a76c47dce8a605bf7ff0cd999
7
+ data.tar.gz: ba19e64a351e1960343c50210d6e3190ff9fcfe2e5f9e49fbeab23e008de14d1d423a8b2f02c389a970bb83678248660b708acc548bb15c7d0c8b05fa41e55cd
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.2 (October 28, 2023)
4
+
5
+ ### Bugfixes
6
+
7
+ * Replaced several calls to the deprecated `.exists?` method with `.exist?` for compatibility with Ruby 3.2.0
8
+ * Updated dependencies to latest versions
9
+ * Standardized on version locking to the latest Major version of dependencies rather than the latest Minor ones
10
+
3
11
  ## 0.3.1 (October 19, 2021)
4
12
 
5
13
  ### Bugfixes
data/Gemfile.lock CHANGED
@@ -1,92 +1,78 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rbcli (0.3.1)
5
- aws-sdk-dynamodb (~> 1.64)
6
- colorize (~> 0.8)
7
- deep_merge (~> 1.2)
8
- macaddr (~> 1.7)
9
- mdless (~> 1.0)
10
- net-scp (~> 3.0)
11
- net-ssh (~> 6.1)
12
- octokit (~> 4.21)
13
- rufus-scheduler (~> 3.8)
4
+ rbcli (0.3.2)
5
+ aws-sdk-dynamodb (~> 1)
6
+ colorize (~> 1)
7
+ deep_merge (~> 1)
8
+ macaddr (~> 1)
9
+ mdless (~> 1)
10
+ net-scp (~> 4)
11
+ net-ssh (~> 7)
12
+ octokit (~> 7)
13
+ rufus-scheduler (~> 3)
14
14
 
15
15
  GEM
16
16
  remote: https://rubygems.org/
17
17
  specs:
18
- addressable (2.8.0)
19
- public_suffix (>= 2.0.2, < 5.0)
18
+ addressable (2.8.5)
19
+ public_suffix (>= 2.0.2, < 6.0)
20
20
  aws-eventstream (1.2.0)
21
- aws-partitions (1.516.0)
22
- aws-sdk-core (3.121.2)
21
+ aws-partitions (1.843.0)
22
+ aws-sdk-core (3.185.1)
23
23
  aws-eventstream (~> 1, >= 1.0.2)
24
- aws-partitions (~> 1, >= 1.239.0)
24
+ aws-partitions (~> 1, >= 1.651.0)
25
+ aws-sigv4 (~> 1.5)
26
+ jmespath (~> 1, >= 1.6.1)
27
+ aws-sdk-dynamodb (1.96.0)
28
+ aws-sdk-core (~> 3, >= 3.184.0)
25
29
  aws-sigv4 (~> 1.1)
26
- jmespath (~> 1.0)
27
- aws-sdk-dynamodb (1.64.0)
28
- aws-sdk-core (~> 3, >= 3.121.2)
29
- aws-sigv4 (~> 1.1)
30
- aws-sigv4 (1.4.0)
30
+ aws-sigv4 (1.6.1)
31
31
  aws-eventstream (~> 1, >= 1.0.2)
32
- colorize (0.8.1)
33
- concurrent-ruby (1.1.9)
34
- deep_merge (1.2.1)
35
- et-orbi (1.2.5)
32
+ base64 (0.1.1)
33
+ colorize (1.1.0)
34
+ concurrent-ruby (1.2.2)
35
+ deep_merge (1.2.2)
36
+ et-orbi (1.2.7)
36
37
  tzinfo
37
- faraday (1.8.0)
38
- faraday-em_http (~> 1.0)
39
- faraday-em_synchrony (~> 1.0)
40
- faraday-excon (~> 1.1)
41
- faraday-httpclient (~> 1.0.1)
42
- faraday-net_http (~> 1.0)
43
- faraday-net_http_persistent (~> 1.1)
44
- faraday-patron (~> 1.0)
45
- faraday-rack (~> 1.0)
46
- multipart-post (>= 1.2, < 3)
38
+ faraday (2.7.11)
39
+ base64
40
+ faraday-net_http (>= 2.0, < 3.1)
47
41
  ruby2_keywords (>= 0.0.4)
48
- faraday-em_http (1.0.0)
49
- faraday-em_synchrony (1.0.0)
50
- faraday-excon (1.1.0)
51
- faraday-httpclient (1.0.1)
52
- faraday-net_http (1.0.1)
53
- faraday-net_http_persistent (1.2.0)
54
- faraday-patron (1.0.0)
55
- faraday-rack (1.0.0)
56
- fugit (1.5.2)
57
- et-orbi (~> 1.1, >= 1.1.8)
42
+ faraday-net_http (3.0.2)
43
+ fugit (1.9.0)
44
+ et-orbi (~> 1, >= 1.2.7)
58
45
  raabro (~> 1.4)
59
- jmespath (1.4.0)
46
+ jmespath (1.6.2)
60
47
  macaddr (1.7.2)
61
48
  systemu (~> 2.6.5)
62
- mdless (1.0.27)
63
- multipart-post (2.1.1)
64
- net-scp (3.0.0)
65
- net-ssh (>= 2.6.5, < 7.0.0)
66
- net-ssh (6.1.0)
67
- octokit (4.21.0)
68
- faraday (>= 0.9)
69
- sawyer (~> 0.8.0, >= 0.5.3)
70
- public_suffix (4.0.6)
49
+ mdless (1.0.37)
50
+ net-scp (4.0.0)
51
+ net-ssh (>= 2.6.5, < 8.0.0)
52
+ net-ssh (7.2.0)
53
+ octokit (7.2.0)
54
+ faraday (>= 1, < 3)
55
+ sawyer (~> 0.9)
56
+ public_suffix (5.0.3)
71
57
  raabro (1.4.0)
72
- rake (13.0.1)
58
+ rake (13.0.6)
73
59
  ruby2_keywords (0.0.5)
74
- rufus-scheduler (3.8.0)
60
+ rufus-scheduler (3.9.1)
75
61
  fugit (~> 1.1, >= 1.1.6)
76
- sawyer (0.8.2)
62
+ sawyer (0.9.2)
77
63
  addressable (>= 2.3.5)
78
- faraday (> 0.8, < 2.0)
64
+ faraday (>= 0.17.3, < 3)
79
65
  systemu (2.6.5)
80
- tzinfo (2.0.4)
66
+ tzinfo (2.0.6)
81
67
  concurrent-ruby (~> 1.0)
82
68
 
83
69
  PLATFORMS
84
- ruby
70
+ x86_64-darwin-23
85
71
 
86
72
  DEPENDENCIES
87
- bundler (~> 2.2)
88
- rake (~> 13.0)
73
+ bundler (>= 2)
74
+ rake (>= 13)
89
75
  rbcli!
90
76
 
91
77
  BUNDLED WITH
92
- 2.2.29
78
+ 2.4.21
data/exe/rbcli CHANGED
@@ -96,7 +96,7 @@ EOF
96
96
 
97
97
  proj = RBCliTool::Project.new(dest, template_vars)
98
98
 
99
- # if proj.exists?
99
+ # if proj.exist?
100
100
  # RBCliTool.continue_confirmation "The project or file #{params[:name]} already exists; contents will be overwritten."
101
101
  # FileUtils.rm_rf dest
102
102
  # end
@@ -30,7 +30,7 @@ module Rbcli::Configurate
30
30
  ##
31
31
  def self.method_missing(method, *args, &block)
32
32
  filename = "#{File.dirname(__FILE__)}/configurate_blocks/#{method.to_s.downcase}.rb"
33
- if File.exists? filename
33
+ if File.exist? filename
34
34
  require filename
35
35
  self.send method, *args, &block
36
36
  else
@@ -32,7 +32,7 @@ module Rbcli
32
32
  dirpath = "#{project_root}/#{dir}"
33
33
  Dir.glob "#{dirpath}/*.rb" do |file|
34
34
  require file
35
- end if Dir.exists? dirpath
35
+ end if Dir.exist? dirpath
36
36
  end
37
37
 
38
38
  # We automatically pull in default user configs
@@ -98,7 +98,7 @@ module Rbcli::Config
98
98
 
99
99
  def self.add_defaults filename=nil, text: nil
100
100
  filename = File.expand_path filename
101
- return unless filename and File.exists? filename
101
+ return unless filename and File.exist? filename
102
102
  @config_text ||= ''
103
103
  @config_text += "\n" unless @config_text.empty?
104
104
  File.readlines(filename).each do |line|
@@ -107,7 +107,7 @@ module Rbcli::Config
107
107
  else
108
108
  @config_text << line unless @config_text.include? line
109
109
  end
110
- end if filename and File.exists? filename
110
+ end if filename and File.exist? filename
111
111
  @config_text << "\n\n" << text if text
112
112
 
113
113
  @config_defaults ||= {}
@@ -116,7 +116,7 @@ module Rbcli::Config
116
116
  end
117
117
 
118
118
  def self.load
119
- if (! @config_file.nil?) and File.exists? @config_file
119
+ if (! @config_file.nil?) and File.exist? @config_file
120
120
  @config = YAML.safe_load(File.read(@config_file), [], [], true).deep_symbolize!
121
121
  @config.deep_merge! @config_defaults if @merge_defaults
122
122
  elsif @userfile_required
@@ -39,7 +39,7 @@ module Rbcli::State
39
39
  end
40
40
 
41
41
  def state_exists?
42
- File.exists? @path
42
+ File.exist? @path
43
43
  end
44
44
 
45
45
  def create_state
data/lib/rbcli/version.rb CHANGED
@@ -19,5 +19,5 @@
19
19
  ##################################################################################
20
20
 
21
21
  module Rbcli
22
- VERSION = '0.3.1'
22
+ VERSION = '0.3.2'
23
23
  end
@@ -42,7 +42,7 @@ module RBCliTool
42
42
  end
43
43
 
44
44
  def run
45
- if File.exists? @dest
45
+ if File.exist? @dest
46
46
  RBCliTool.continue_confirmation "The command #{@template_vars[:name]} already exists; contents will be overwritten."
47
47
  FileUtils.rm_rf @dest
48
48
  end
@@ -70,7 +70,7 @@ module RBCliTool
70
70
  confirmed = false
71
71
  @filepaths.each do |file|
72
72
  next if file[:dest].end_with? '.sh' and @template_vars[:no_script]
73
- if File.exists? file[:dest]
73
+ if File.exist? file[:dest]
74
74
  RBCliTool.continue_confirmation "The script command #{@template_vars[:name]} already exists; contents will be overwritten." unless confirmed
75
75
  confirmed = true
76
76
  FileUtils.rm_rf file[:dest]
@@ -94,7 +94,7 @@ module RBCliTool
94
94
  end
95
95
 
96
96
  def run
97
- if File.exists? @dest
97
+ if File.exist? @dest
98
98
  RBCliTool.continue_confirmation "The #{@typename} hook already exists; contents will be overwritten."
99
99
  FileUtils.rm_rf @dest
100
100
  end
@@ -378,7 +378,7 @@ module CLIMarkdown
378
378
  base = File.expand_path(File.dirname(@file))
379
379
  img_path = File.join(base,img_path)
380
380
  end
381
- if File.exists?(img_path)
381
+ if File.exist?(img_path)
382
382
  pre = match[2].size > 0 ? " #{c([:d,:blue])}[#{match[2].strip}]\n" : ''
383
383
  post = tail.size > 0 ? "\n #{c([:b,:blue])}-- #{tail} --" : ''
384
384
  img = %x{imgcat "#{img_path}"}
@@ -91,7 +91,7 @@ module RBCliTool
91
91
  RBCliTool.cp_file @micropath, "#{@dest}/#{@template_vars[:cmdname]}", @template_vars
92
92
  end
93
93
 
94
- def exists?
94
+ def exist?
95
95
  project_exists?
96
96
  end
97
97
 
@@ -99,7 +99,7 @@ module RBCliTool
99
99
  # We look for the .rbcli file in the current tree and return the root path
100
100
  searchpath = path
101
101
  while !searchpath.empty?
102
- return searchpath if File.directory? searchpath and File.exists? "#{searchpath}/.rbcli"
102
+ return searchpath if File.directory? searchpath and File.exist? "#{searchpath}/.rbcli"
103
103
  spath = searchpath.split('/')
104
104
  searchpath = (spath.length == 2) ? '/' : spath[0..-2].join('/')
105
105
  end
@@ -110,7 +110,7 @@ module RBCliTool
110
110
 
111
111
  def project_exists?
112
112
  # If the specified file already exists...
113
- #return true if File.exists? @dest
113
+ #return true if File.exist? @dest
114
114
 
115
115
  # Or if the .rbcli file exists anywhere in the tree, we know that we are in a subdirectory of a project
116
116
  Project::find_root(@dest)
@@ -34,7 +34,7 @@ module RBCliTool
34
34
 
35
35
  def self.cp_file src, dest, template_vars = nil
36
36
  dest = "#{dest}#{src.split('/')[-1]}" if dest.end_with? '/'
37
- if File.exists? dest
37
+ if File.exist? dest
38
38
  puts "File #{dest} already exists. Please delete it and try again."
39
39
  false
40
40
  else
@@ -47,7 +47,7 @@ module RBCliTool
47
47
  FileUtils.cp src, dest
48
48
  end
49
49
 
50
- FileUtils.rm_f "#{File.dirname(dest)}/.keep" if File.exists? "#{File.dirname(dest)}/.keep"
50
+ FileUtils.rm_f "#{File.dirname(dest)}/.keep" if File.exist? "#{File.dirname(dest)}/.keep"
51
51
  puts "Done!"
52
52
  true
53
53
  end
data/rbcli.gemspec CHANGED
@@ -53,19 +53,17 @@ Gem::Specification.new do |spec|
53
53
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
54
54
  spec.require_paths = ['lib']
55
55
 
56
- spec.add_development_dependency 'bundler', '~> 2.2'
57
- spec.add_development_dependency 'rake', '~> 13.0'
58
- # spec.add_development_dependency 'rspec', '~> 3.8'
59
- # spec.add_development_dependency 'minitest', '~> 5.0'
56
+ spec.add_development_dependency 'bundler', '>= 2'
57
+ spec.add_development_dependency 'rake', '>= 13'
60
58
 
61
- spec.add_dependency 'colorize', '~> 0.8'
62
- spec.add_dependency 'deep_merge', '~> 1.2'
63
- spec.add_dependency 'aws-sdk-dynamodb', '~> 1.64'
64
- spec.add_dependency 'macaddr', '~> 1.7'
65
- spec.add_dependency 'rufus-scheduler', '~> 3.8'
66
- spec.add_dependency 'octokit', '~> 4.21'
67
- spec.add_dependency 'mdless', '~> 1.0'
68
- spec.add_dependency 'net-ssh', '~> 6.1'
69
- spec.add_dependency 'net-scp', '~> 3.0'
59
+ spec.add_dependency 'colorize', '~> 1'
60
+ spec.add_dependency 'deep_merge', '~> 1'
61
+ spec.add_dependency 'aws-sdk-dynamodb', '~> 1'
62
+ spec.add_dependency 'macaddr', '~> 1'
63
+ spec.add_dependency 'rufus-scheduler', '~> 3'
64
+ spec.add_dependency 'octokit', '~> 7'
65
+ spec.add_dependency 'mdless', '~> 1'
66
+ spec.add_dependency 'net-ssh', '~> 7'
67
+ spec.add_dependency 'net-scp', '~> 4'
70
68
  # spec.add_dependency 'trollop', '~> 2.1'
71
69
  end
metadata CHANGED
@@ -1,169 +1,169 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbcli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Khoury
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-10-20 00:00:00.000000000 Z
11
+ date: 2023-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '2.2'
19
+ version: '2'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '2.2'
26
+ version: '2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '13.0'
33
+ version: '13'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '13.0'
40
+ version: '13'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: colorize
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0.8'
47
+ version: '1'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0.8'
54
+ version: '1'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: deep_merge
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '1.2'
61
+ version: '1'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '1.2'
68
+ version: '1'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: aws-sdk-dynamodb
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '1.64'
75
+ version: '1'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '1.64'
82
+ version: '1'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: macaddr
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '1.7'
89
+ version: '1'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '1.7'
96
+ version: '1'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rufus-scheduler
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '3.8'
103
+ version: '3'
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '3.8'
110
+ version: '3'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: octokit
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: '4.21'
117
+ version: '7'
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: '4.21'
124
+ version: '7'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: mdless
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: '1.0'
131
+ version: '1'
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: '1.0'
138
+ version: '1'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: net-ssh
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: '6.1'
145
+ version: '7'
146
146
  type: :runtime
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: '6.1'
152
+ version: '7'
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: net-scp
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
157
  - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: '3.0'
159
+ version: '4'
160
160
  type: :runtime
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: '3.0'
166
+ version: '4'
167
167
  description: RBCli is a framework to quickly develop command-line tools and applications.
168
168
  email:
169
169
  - akhoury@live.com
@@ -649,7 +649,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
649
649
  - !ruby/object:Gem::Version
650
650
  version: '0'
651
651
  requirements: []
652
- rubygems_version: 3.2.3
652
+ rubygems_version: 3.4.21
653
653
  signing_key:
654
654
  specification_version: 4
655
655
  summary: A CLI Application/Tooling Framework for Ruby