brain_freeze 1.0.0
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 +7 -0
- data/exe/brain_freeze +41 -0
- metadata +62 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: b900cbb059ede40007f3b87487c3fb96f79d90719adf60815462ebb1b04c8244
|
4
|
+
data.tar.gz: 21d63bab19631da2959551253ae49e079f82f36c035b7bc91552f88663640e23
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 2106bc752d328b52d50f904616b8ab07f4e4edb5b09854dde52631ae50d2e6b5068a5896f654392e878079abe0c62c410c2b3c2e626d3283a4f41db606c40de5
|
7
|
+
data.tar.gz: bd93db79f8fb0e92e30c277a6fb4da57029d37e79121d82b78d1ab2b0cdae3c6c53da546ce620e75d02ef71fb81c360d06e9fadc59c9fd7e2a1acbec69b3f1d7
|
data/exe/brain_freeze
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'parlour'
|
4
|
+
|
5
|
+
# Grab given output file name
|
6
|
+
OUTPUT_FILE = ARGV[0]
|
7
|
+
unless OUTPUT_FILE
|
8
|
+
puts "Usage: brain_freeze <output-file> [filter ...]"
|
9
|
+
exit
|
10
|
+
end
|
11
|
+
|
12
|
+
# Warn if the output file already exists
|
13
|
+
if File.exist?(OUTPUT_FILE)
|
14
|
+
puts "Warning: #{OUTPUT_FILE} already exists and will be included in the generated RBI."
|
15
|
+
puts " This is VERY LIKELY to cause problems. Consider deleting it first!"
|
16
|
+
end
|
17
|
+
|
18
|
+
# Load objects
|
19
|
+
objects = Parlour::TypeLoader.load_project('.')
|
20
|
+
|
21
|
+
# Filter to only given objects, if any were given
|
22
|
+
if ARGV.length > 1
|
23
|
+
_, objects_to_include = ARGV
|
24
|
+
|
25
|
+
# TODO: support namespacing
|
26
|
+
objects.children.delete_if do |child|
|
27
|
+
!objects_to_include.include?(child.name)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
# Generate RBI using some default settings
|
32
|
+
rbi = objects.generate_rbi(
|
33
|
+
0,
|
34
|
+
Parlour::RbiGenerator::Options.new(
|
35
|
+
break_params: 4,
|
36
|
+
tab_size: 2,
|
37
|
+
sort_namespaces: false,
|
38
|
+
)
|
39
|
+
)
|
40
|
+
|
41
|
+
File.write(OUTPUT_FILE, ["# typed: true", "", rbi].join("\n"))
|
metadata
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: brain_freeze
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Aaron Christiansen
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-02-20 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: parlour
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '2.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '2.0'
|
27
|
+
description:
|
28
|
+
email:
|
29
|
+
- aaronc20000@gmail.com
|
30
|
+
executables:
|
31
|
+
- brain_freeze
|
32
|
+
extensions: []
|
33
|
+
extra_rdoc_files: []
|
34
|
+
files:
|
35
|
+
- exe/brain_freeze
|
36
|
+
homepage: https://github.com/AaronC81/brain_freeze
|
37
|
+
licenses:
|
38
|
+
- MIT
|
39
|
+
metadata:
|
40
|
+
homepage_uri: https://github.com/AaronC81/brain_freeze
|
41
|
+
source_code_uri: https://github.com/AaronC81/brain_freeze
|
42
|
+
changelog_uri: https://github.com/AaronC81/brain_freeze/CHANGELOG.md
|
43
|
+
post_install_message:
|
44
|
+
rdoc_options: []
|
45
|
+
require_paths:
|
46
|
+
- lib
|
47
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
48
|
+
requirements:
|
49
|
+
- - ">="
|
50
|
+
- !ruby/object:Gem::Version
|
51
|
+
version: '0'
|
52
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
53
|
+
requirements:
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: '0'
|
57
|
+
requirements: []
|
58
|
+
rubygems_version: 3.0.3
|
59
|
+
signing_key:
|
60
|
+
specification_version: 4
|
61
|
+
summary: Generate a Sorbet RBI for a gem with inline types
|
62
|
+
test_files: []
|