typedruby 0.0.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
@@ -0,0 +1,5 @@
1
+ class CSV
2
+ def self.read(String path) => [[String]]; end
3
+
4
+ def self.generate(String str = "") => String; end
5
+ end
@@ -0,0 +1,5 @@
1
+ class Date
2
+ end
3
+
4
+ class DateTime
5
+ end
@@ -0,0 +1,2 @@
1
+ class Delegator < BasicObject
2
+ end
File without changes
@@ -0,0 +1,7 @@
1
+ module Digest
2
+ module SHA1
3
+ def self.hexdigest(String buffer) => String
4
+ ""
5
+ end
6
+ end
7
+ end
File without changes
@@ -0,0 +1,5 @@
1
+ class ERB
2
+ def initialize(String src, ~Integer safe_level = nil, ~String trim_mode = nil, String eoutvar = "_erbout") => nil; end
3
+
4
+ def result(Binding binding = TOPLEVEL_BINDING) => String; end
5
+ end
File without changes
@@ -0,0 +1,3 @@
1
+ module FileUtils
2
+ def self.mkdir_p(String path, ~Integer mode: nil, ~Boolean noop: nil, ~Boolean verbose: nil) => [String]; end
3
+ end
@@ -0,0 +1,13 @@
1
+ module JSON
2
+ def self.dump(:any object) => String
3
+ end
4
+
5
+ def self.generate(:any object, (nil | JSON::State | Hash::[Symbol, :any]) options = nil) => String
6
+ end
7
+
8
+ def self.parse(String json) => :any
9
+ end
10
+
11
+ class State
12
+ end
13
+ end
@@ -0,0 +1,6 @@
1
+ require "net/protocol"
2
+
3
+ module Net
4
+ class HTTP < Protocol
5
+ end
6
+ end
@@ -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
@@ -0,0 +1,2 @@
1
+ class OptionParser
2
+ end
@@ -0,0 +1,3 @@
1
+ class OpenStruct
2
+ def self.new(:any opts = nil) => :any; end
3
+ end
@@ -0,0 +1,3 @@
1
+ class Pathname
2
+ def join((Pathname | String) *args) => Pathname; end
3
+ end
@@ -0,0 +1,7 @@
1
+ module Psych
2
+ def self.load(String s) => :any; end
3
+
4
+ def self.load_file(String filename) => :any; end
5
+
6
+ def self.dump(:any o) => String; end
7
+ 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
@@ -0,0 +1,4 @@
1
+ module Shellwords
2
+ def self.shellescape(String s) => String
3
+ end
4
+ end
File without changes
@@ -0,0 +1,3 @@
1
+ class StringIO < Data
2
+ def string => String; end
3
+ end
@@ -0,0 +1,4 @@
1
+ require "tmpdir"
2
+
3
+ class Tempfile
4
+ end
File without changes
@@ -0,0 +1,6 @@
1
+ module Timeout
2
+ class Error < RuntimeError
3
+ end
4
+
5
+ def self.timeout[T](Numeric sec, ~Class::[Exception] klass = nil, ~String message = nil, { || => T } &) => T; end
6
+ end
@@ -0,0 +1,7 @@
1
+ require "fileutils"
2
+
3
+ class Dir
4
+ def self.tmpdir => String; end
5
+
6
+ def self.mktmpdir(~String prefix_suffix = nil) => String; end
7
+ end
@@ -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
@@ -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.0.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: 2017-06-22 00:00:00.000000000 Z
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
- executables: []
16
+ - opensource+typedruby@github.com
17
+ executables:
18
+ - typedruby
17
19
  extensions: []
18
20
  extra_rdoc_files: []
19
- files: []
20
- homepage:
21
- licenses: []
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: []