tapioca 0.11.7 → 0.11.8
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 +4 -4
- data/lib/tapioca/bundler_ext/auto_require_hook.rb +1 -1
- data/lib/tapioca/commands/annotations.rb +6 -6
- data/lib/tapioca/dsl/compilers/protobuf.rb +2 -8
- data/lib/tapioca/helpers/cli_helper.rb +2 -2
- data/lib/tapioca/helpers/test/isolation.rb +7 -2
- data/lib/tapioca/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2e1d35be8426874dde08ba495772d5076d85167f24fa5cfa16b59f424ca3c820
|
4
|
+
data.tar.gz: ce7b53d0399658d9ecfdcda6e42f030b2316bfcd75c3c02ee018dbab966bce30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6dd882c66362cc1666f9e89a9634c38b3131fba7a10b0c5fabe19f5675e98adf308132b07c09b3f62d3035f4fc7ab05f36693de13cb74701324aee3933c43234
|
7
|
+
data.tar.gz: 74f78ab7a8d5f284b4a1efbcb7eaf098d609294b3c201e227890d3f1276a5c689ee528b5a610a8a4039eaf549c1e0655c71da04631d62b174a16baf23e312bf4
|
@@ -98,7 +98,7 @@ module Tapioca
|
|
98
98
|
def fetch_index(repo_uri, repo_number:)
|
99
99
|
say("Retrieving index from central repository#{repo_number ? " ##{repo_number}" : ""}... ", [:blue, :bold])
|
100
100
|
content = fetch_file(repo_uri, CENTRAL_REPO_INDEX_PATH)
|
101
|
-
return
|
101
|
+
return unless content
|
102
102
|
|
103
103
|
index = RepoIndex.from_json(content)
|
104
104
|
say("Done", :green)
|
@@ -221,7 +221,7 @@ module Tapioca
|
|
221
221
|
|
222
222
|
sig { params(gem_name: String, contents: T::Array[String]).returns(T.nilable(String)) }
|
223
223
|
def merge_files(gem_name, contents)
|
224
|
-
return
|
224
|
+
return if contents.empty?
|
225
225
|
|
226
226
|
rewriter = RBI::Rewriters::Merge.new(keep: RBI::Rewriters::Merge::Keep::NONE)
|
227
227
|
|
@@ -260,16 +260,16 @@ module Tapioca
|
|
260
260
|
|
261
261
|
sig { params(repo_uri: String).returns(T.nilable(String)) }
|
262
262
|
def token_for(repo_uri)
|
263
|
-
return
|
263
|
+
return unless @netrc_info
|
264
264
|
|
265
265
|
host = URI(repo_uri).host
|
266
|
-
return
|
266
|
+
return unless host
|
267
267
|
|
268
268
|
creds = @netrc_info[host]
|
269
|
-
return
|
269
|
+
return unless creds
|
270
270
|
|
271
271
|
token = creds.to_a.last
|
272
|
-
return
|
272
|
+
return unless token
|
273
273
|
|
274
274
|
"token #{token}"
|
275
275
|
end
|
@@ -250,27 +250,21 @@ module Tapioca
|
|
250
250
|
value_type = type_of(value)
|
251
251
|
type = "Google::Protobuf::Map[#{key_type}, #{value_type}]"
|
252
252
|
|
253
|
-
default_args = [key.type.inspect, value.type.inspect]
|
254
|
-
default_args << value_type if [:enum, :message].include?(value.type)
|
255
|
-
|
256
253
|
Field.new(
|
257
254
|
name: descriptor.name,
|
258
255
|
type: type,
|
259
256
|
init_type: "T.nilable(T.any(#{type}, T::Hash[#{key_type}, #{value_type}]))",
|
260
|
-
default: "
|
257
|
+
default: "T.unsafe(nil)",
|
261
258
|
)
|
262
259
|
else
|
263
260
|
elem_type = type_of(descriptor)
|
264
261
|
type = "Google::Protobuf::RepeatedField[#{elem_type}]"
|
265
262
|
|
266
|
-
default_args = [descriptor.type.inspect]
|
267
|
-
default_args << elem_type if [:enum, :message].include?(descriptor.type)
|
268
|
-
|
269
263
|
Field.new(
|
270
264
|
name: descriptor.name,
|
271
265
|
type: type,
|
272
266
|
init_type: "T.nilable(T.any(#{type}, T::Array[#{elem_type}]))",
|
273
|
-
default: "
|
267
|
+
default: "T.unsafe(nil)",
|
274
268
|
)
|
275
269
|
end
|
276
270
|
else
|
@@ -31,8 +31,8 @@ module Tapioca
|
|
31
31
|
|
32
32
|
sig { params(options: T::Hash[Symbol, T.untyped]).returns(T.nilable(String)) }
|
33
33
|
def netrc_file(options)
|
34
|
-
return
|
35
|
-
return
|
34
|
+
return if options[:auth]
|
35
|
+
return unless options[:netrc]
|
36
36
|
|
37
37
|
options[:netrc_file] || ENV["TAPIOCA_NETRC_FILE"] || File.join(ENV["HOME"].to_s, ".netrc")
|
38
38
|
end
|
@@ -29,7 +29,9 @@ module Tapioca
|
|
29
29
|
|
30
30
|
module Forking
|
31
31
|
extend T::Sig
|
32
|
-
|
32
|
+
extend T::Helpers
|
33
|
+
|
34
|
+
requires_ancestor { Kernel }
|
33
35
|
|
34
36
|
sig { params(_blk: T.untyped).returns(String) }
|
35
37
|
def run_in_isolation(&_blk)
|
@@ -72,7 +74,10 @@ module Tapioca
|
|
72
74
|
|
73
75
|
module Subprocess
|
74
76
|
extend T::Sig
|
75
|
-
|
77
|
+
extend T::Helpers
|
78
|
+
|
79
|
+
requires_ancestor { Kernel }
|
80
|
+
|
76
81
|
ORIG_ARGV = T.let(ARGV.dup, T::Array[T.untyped]) unless defined?(ORIG_ARGV)
|
77
82
|
|
78
83
|
# Crazy H4X to get this working in windows / jruby with
|
data/lib/tapioca/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tapioca
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ufuk Kayserilioglu
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: exe
|
13
13
|
cert_chain: []
|
14
|
-
date: 2023-
|
14
|
+
date: 2023-07-12 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: bundler
|
@@ -283,7 +283,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
283
283
|
- !ruby/object:Gem::Version
|
284
284
|
version: '0'
|
285
285
|
requirements: []
|
286
|
-
rubygems_version: 3.4.
|
286
|
+
rubygems_version: 3.4.16
|
287
287
|
signing_key:
|
288
288
|
specification_version: 4
|
289
289
|
summary: A Ruby Interface file generator for gems, core types and the Ruby standard
|