typedruby 0.0.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +21 -0
- data/bin/typedruby +22 -0
- data/definitions/core.rb +2308 -0
- data/definitions/lib/bigdecimal.rb +12 -0
- data/definitions/lib/cgi.rb +0 -0
- data/definitions/lib/csv.rb +5 -0
- data/definitions/lib/date.rb +5 -0
- data/definitions/lib/delegate.rb +2 -0
- data/definitions/lib/digest.rb +0 -0
- data/definitions/lib/digest/sha1.rb +7 -0
- data/definitions/lib/enumerator.rb +0 -0
- data/definitions/lib/erb.rb +5 -0
- data/definitions/lib/etc.rb +0 -0
- data/definitions/lib/fileutils.rb +3 -0
- data/definitions/lib/json.rb +13 -0
- data/definitions/lib/net/http.rb +6 -0
- data/definitions/lib/openssl.rb +36 -0
- data/definitions/lib/optparse.rb +2 -0
- data/definitions/lib/ostruct.rb +3 -0
- data/definitions/lib/pathname.rb +3 -0
- data/definitions/lib/psych.rb +7 -0
- data/definitions/lib/rbconfig.rb +0 -0
- data/definitions/lib/resolv.rb +0 -0
- data/definitions/lib/rubygems.rb +0 -0
- data/definitions/lib/securerandom.rb +15 -0
- data/definitions/lib/set.rb +26 -0
- data/definitions/lib/shellwords.rb +4 -0
- data/definitions/lib/socket.rb +0 -0
- data/definitions/lib/stringio.rb +3 -0
- data/definitions/lib/tempfile.rb +4 -0
- data/definitions/lib/thread.rb +0 -0
- data/definitions/lib/timeout.rb +6 -0
- data/definitions/lib/tmpdir.rb +7 -0
- data/definitions/lib/uri.rb +17 -0
- data/definitions/lib/zlib.rb +17 -0
- data/typedruby-x86_64-darwin +0 -0
- data/typedruby-x86_64-linux +0 -0
- data/typedruby.gemspec +14 -0
- metadata +49 -8
@@ -0,0 +1,12 @@
|
|
1
|
+
class BigDecimal < Numeric
|
2
|
+
def initialize((Integer|Float|Rational|BigDecimal|String) initial, Integer digits = 0) => nil; end
|
3
|
+
|
4
|
+
def +(Numeric other) => BigDecimal; end
|
5
|
+
def -(Numeric other) => BigDecimal; end
|
6
|
+
def /(Numeric other) => BigDecimal; end
|
7
|
+
def *(Numeric other) => BigDecimal; end
|
8
|
+
|
9
|
+
def round(Integer n = 0, (Integer|Symbol) mode = 0) => BigDecimal; end
|
10
|
+
|
11
|
+
def to_r => Rational; end
|
12
|
+
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,36 @@
|
|
1
|
+
module OpenSSL
|
2
|
+
OPENSSL_VERSION_NUMBER = (nil : Integer)
|
3
|
+
|
4
|
+
class HMAC
|
5
|
+
# TODO - this doesn't work if we just say 'Digest digest'
|
6
|
+
# constant scoping is obviously busted
|
7
|
+
def self.hexdigest(OpenSSL::Digest digest, String secret, String message) => String; end
|
8
|
+
end
|
9
|
+
|
10
|
+
class Digest
|
11
|
+
def initialize(String algorithm) => nil; end
|
12
|
+
|
13
|
+
class MD5 < Digest
|
14
|
+
end
|
15
|
+
|
16
|
+
class SHA1 < Digest
|
17
|
+
end
|
18
|
+
|
19
|
+
class SHA256 < Digest
|
20
|
+
end
|
21
|
+
|
22
|
+
class SHA512 < Digest
|
23
|
+
end
|
24
|
+
|
25
|
+
class RIPEMD160 < Digest
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
module PKey
|
30
|
+
class PKey
|
31
|
+
end
|
32
|
+
|
33
|
+
class EC < PKey
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module SecureRandom
|
2
|
+
def self.bytes(Integer n) => String; end
|
3
|
+
end
|
4
|
+
|
5
|
+
module Random::Formatter
|
6
|
+
def random_bytes(~Integer n = nil) => String; end
|
7
|
+
def hex(~Integer n = nil) => String; end
|
8
|
+
def base64(~Integer n = nil) => String; end
|
9
|
+
def urlsafe_base64(~Integer n = nil, Boolean padding = false) => String; end
|
10
|
+
def uuid => String; end
|
11
|
+
end
|
12
|
+
|
13
|
+
class << SecureRandom
|
14
|
+
include Random::Formatter
|
15
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
class Set::[ElementType]
|
2
|
+
include Enumerable::[ElementType]
|
3
|
+
|
4
|
+
def initialize(Enumerable::[ElementType] enum = nil) => nil; end
|
5
|
+
|
6
|
+
def self.[][ElementType](ElementType *elements) => Set::[ElementType]; end
|
7
|
+
|
8
|
+
def <<(ElementType element) => :self; end
|
9
|
+
|
10
|
+
def +(Enumerable::[ElementType] other) => :self; end
|
11
|
+
|
12
|
+
def include?(ElementType element) => Boolean; end
|
13
|
+
|
14
|
+
def |(Enumerable::[ElementType] other) => :self; end
|
15
|
+
|
16
|
+
def &(Enumerable::[ElementType] other) => :self; end
|
17
|
+
|
18
|
+
def to_a => [ElementType]; end
|
19
|
+
end
|
20
|
+
|
21
|
+
class SortedSet < Set
|
22
|
+
end
|
23
|
+
|
24
|
+
module Enumerable::[EnumType]
|
25
|
+
def to_set => Set::[EnumType]; end
|
26
|
+
end
|
File without changes
|
File without changes
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'uri/common'
|
2
|
+
require 'uri/generic'
|
3
|
+
require 'uri/ftp'
|
4
|
+
require 'uri/http'
|
5
|
+
require 'uri/https'
|
6
|
+
require 'uri/ldap'
|
7
|
+
require 'uri/ldaps'
|
8
|
+
require 'uri/mailto'
|
9
|
+
|
10
|
+
module URI
|
11
|
+
def self.parse(String uri) => URI::Generic; end
|
12
|
+
end
|
13
|
+
|
14
|
+
class URI::Generic
|
15
|
+
def @host : ~String
|
16
|
+
def @port : ~Integer
|
17
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'stringio'
|
2
|
+
|
3
|
+
module Zlib
|
4
|
+
class GzipFile
|
5
|
+
end
|
6
|
+
|
7
|
+
class GzipWriter < GzipFile
|
8
|
+
def initialize(
|
9
|
+
(IO | StringIO) io,
|
10
|
+
~Integer level = nil,
|
11
|
+
~Integer strategy = nil,
|
12
|
+
~Encoding external_encoding: nil,
|
13
|
+
~Encoding internal_encoding: nil,
|
14
|
+
~Encoding encoding: nil
|
15
|
+
) => nil; end
|
16
|
+
end
|
17
|
+
end
|
Binary file
|
Binary file
|
data/typedruby.gemspec
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
Gem::Specification.new do |s|
|
2
|
+
s.name = "typedruby"
|
3
|
+
s.version = ENV.fetch("TYPEDRUBY_VERSION")
|
4
|
+
s.summary = "Gradual static typing for Ruby"
|
5
|
+
s.description = "Gradual static typing for Ruby."
|
6
|
+
s.authors = ["Charlie Somerville"]
|
7
|
+
s.email = ["charlie@github.com", "opensource+typedruby@github.com"]
|
8
|
+
s.homepage = "https://github.com/typedruby/typedruby"
|
9
|
+
s.license = "MIT"
|
10
|
+
|
11
|
+
s.files = Dir["**/*"]
|
12
|
+
|
13
|
+
s.executables << "typedruby"
|
14
|
+
end
|
metadata
CHANGED
@@ -1,24 +1,65 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: typedruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Charlie Somerville
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-06-14 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
|
-
description:
|
13
|
+
description: Gradual static typing for Ruby.
|
14
14
|
email:
|
15
15
|
- charlie@github.com
|
16
|
-
|
16
|
+
- opensource+typedruby@github.com
|
17
|
+
executables:
|
18
|
+
- typedruby
|
17
19
|
extensions: []
|
18
20
|
extra_rdoc_files: []
|
19
|
-
files:
|
20
|
-
|
21
|
-
|
21
|
+
files:
|
22
|
+
- LICENSE
|
23
|
+
- bin/typedruby
|
24
|
+
- definitions/core.rb
|
25
|
+
- definitions/lib/bigdecimal.rb
|
26
|
+
- definitions/lib/cgi.rb
|
27
|
+
- definitions/lib/csv.rb
|
28
|
+
- definitions/lib/date.rb
|
29
|
+
- definitions/lib/delegate.rb
|
30
|
+
- definitions/lib/digest.rb
|
31
|
+
- definitions/lib/digest/sha1.rb
|
32
|
+
- definitions/lib/enumerator.rb
|
33
|
+
- definitions/lib/erb.rb
|
34
|
+
- definitions/lib/etc.rb
|
35
|
+
- definitions/lib/fileutils.rb
|
36
|
+
- definitions/lib/json.rb
|
37
|
+
- definitions/lib/net/http.rb
|
38
|
+
- definitions/lib/openssl.rb
|
39
|
+
- definitions/lib/optparse.rb
|
40
|
+
- definitions/lib/ostruct.rb
|
41
|
+
- definitions/lib/pathname.rb
|
42
|
+
- definitions/lib/psych.rb
|
43
|
+
- definitions/lib/rbconfig.rb
|
44
|
+
- definitions/lib/resolv.rb
|
45
|
+
- definitions/lib/rubygems.rb
|
46
|
+
- definitions/lib/securerandom.rb
|
47
|
+
- definitions/lib/set.rb
|
48
|
+
- definitions/lib/shellwords.rb
|
49
|
+
- definitions/lib/socket.rb
|
50
|
+
- definitions/lib/stringio.rb
|
51
|
+
- definitions/lib/tempfile.rb
|
52
|
+
- definitions/lib/thread.rb
|
53
|
+
- definitions/lib/timeout.rb
|
54
|
+
- definitions/lib/tmpdir.rb
|
55
|
+
- definitions/lib/uri.rb
|
56
|
+
- definitions/lib/zlib.rb
|
57
|
+
- typedruby-x86_64-darwin
|
58
|
+
- typedruby-x86_64-linux
|
59
|
+
- typedruby.gemspec
|
60
|
+
homepage: https://github.com/typedruby/typedruby
|
61
|
+
licenses:
|
62
|
+
- MIT
|
22
63
|
metadata: {}
|
23
64
|
post_install_message:
|
24
65
|
rdoc_options: []
|
@@ -39,5 +80,5 @@ rubyforge_project:
|
|
39
80
|
rubygems_version: 2.6.8
|
40
81
|
signing_key:
|
41
82
|
specification_version: 4
|
42
|
-
summary:
|
83
|
+
summary: Gradual static typing for Ruby
|
43
84
|
test_files: []
|