fue 0.4.0 → 0.5.0

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: 54dab7602f55078312dd06a2c78433c39729ba220c639cd8bf01f620a08777e8
4
- data.tar.gz: aa7a4aa7462e4d830c17f62dd08c6c2895a0e36b887b93307d6d9bd70407bc97
3
+ metadata.gz: e5c3f2023a6442f02c444f06b56ad83fc2a56be8efb26cf4dc8fccc78588024f
4
+ data.tar.gz: f3b4c832901ecb0f24b88b61da78e46b7e6fd283c550a790b829597b9ee7b088
5
5
  SHA512:
6
- metadata.gz: 23dd2b6150e44ce49a3a6a9b5ad7f478a155836e04a173daa09761c1c56cee1d3b510ac81f11e580bb48bfef16cc60a52490d87c18592c281c4a8e582a28d9a0
7
- data.tar.gz: 62474f917d54a8a7e4b9448db53db1e920d282bbed501f6d55016704779995607f2e6ae75775c1302fee1703d48f99ae8f4ecca764d7bfefdfd37705f9660d65
6
+ metadata.gz: 4741da6ec6c69b1c6a4c974a6f7afb8205fbd08889b98cb69e235968dbc65a48859f6a10977d8c3284f8778aefa744e354911e3c7d7267266b5b32ad005eb654
7
+ data.tar.gz: 2dfee6994be50fd5be14a1930e9397640414b4532ca96d7ac2e3c5a76b2d19158df556db0f12d4dcfadd6bebc5d866fc5280df1dc420dc5500d3d15d81e6abbb
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ### 0.5.0 (2024-11-15)
2
+
3
+ * [#33](https://github.com/dblock/fue/pull/33): Fix: shell escape command lines - [@dblock](https://github.com/dblock).
4
+ * [#32](https://github.com/dblock/fue/pull/32): Upgraded to ruby 3.3 - [@dblock](https://github.com/dblock).
5
+
1
6
  ### 0.4.0 (2022/12/31)
2
7
 
3
8
  * [#31](https://github.com/dblock/fue/pull/31): Use Danger - [@dblock](https://github.com/dblock).
data/lib/fue/auth.rb CHANGED
@@ -28,7 +28,7 @@ module Fue
28
28
  private
29
29
 
30
30
  def github_token(_code = nil)
31
- puts 'Create a personal access token on https://github.com/settings/tokens: '
31
+ puts 'Create a personal access token on https://github.com/settings/tokens and paste it here: '
32
32
  get_secure
33
33
  end
34
34
 
data/lib/fue/finder.rb CHANGED
@@ -140,7 +140,7 @@ module Fue
140
140
  logins.map do |login|
141
141
  [login, emails(options.merge(username: login))]
142
142
  rescue StandardError => e
143
- warn e.to_s
143
+ warn e
144
144
  end.compact.to_h
145
145
  end
146
146
 
data/lib/fue/security.rb CHANGED
@@ -18,12 +18,12 @@ module Fue
18
18
  def security(command = nil, options = nil)
19
19
  run = [security_path]
20
20
  run << "#{command}-internet-password"
21
- run << "-a #{options[:username]}"
22
- run << "-s #{options[:server]}"
21
+ run << "-a #{Shellwords.escape(options[:username])}"
22
+ run << "-s #{Shellwords.escape(options[:server])}"
23
23
  if command == 'add'
24
- run << "-l #{options[:label]}"
24
+ run << "-l #{Shellwords.escape(options[:label])}"
25
25
  run << '-U'
26
- run << "-w #{options[:password]}" if options.key?(:password)
26
+ run << "-w #{Shellwords.escape(options[:password])}" if options.key?(:password)
27
27
  else
28
28
  run << '-w'
29
29
  end
@@ -32,7 +32,8 @@ module Fue
32
32
 
33
33
  def security_path
34
34
  @security_path ||= begin
35
- `which security`.chomp
35
+ path = `which security`.chomp
36
+ path.empty? ? 'security' : path
36
37
  rescue StandardError
37
38
  'security'
38
39
  end
data/lib/fue/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Fue
4
- VERSION = '0.4.0'
4
+ VERSION = '0.5.0'
5
5
  end
data/lib/fue.rb CHANGED
@@ -4,6 +4,7 @@ require 'graphlient'
4
4
  require 'github_api'
5
5
  require 'open3'
6
6
  require 'English'
7
+ require 'shellwords'
7
8
 
8
9
  require 'fue/version'
9
10
  require 'fue/shell'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fue
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Doubrovkine
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-31 00:00:00.000000000 Z
11
+ date: 2024-11-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: 0.6.0
69
+ - !ruby/object:Gem::Dependency
70
+ name: command_line
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
69
83
  description:
70
84
  email: dblock@dblock.org
71
85
  executables:
@@ -97,14 +111,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
97
111
  requirements:
98
112
  - - ">="
99
113
  - !ruby/object:Gem::Version
100
- version: '2.7'
114
+ version: '3.0'
101
115
  required_rubygems_version: !ruby/object:Gem::Requirement
102
116
  requirements:
103
117
  - - ">="
104
118
  - !ruby/object:Gem::Version
105
119
  version: 1.3.6
106
120
  requirements: []
107
- rubygems_version: 3.3.7
121
+ rubygems_version: 3.5.22
108
122
  signing_key:
109
123
  specification_version: 4
110
124
  summary: Find an e-mail address of a GitHub user.