tdlib 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: edc437daafbab53cd91f1511a4e231c32724e0ee
4
+ data.tar.gz: '087ffb11bf793b7c3f02a8c8bedc12225366db09'
5
+ SHA512:
6
+ metadata.gz: 6a27470a6a03f74127aab75fd5c8471a5dc23b7731955d33d54909d78b7ff3d19c9beb4b3a669bd54c579e5aa412cf08ec9da49d89c3af5f2dcc44bfdb1cc531
7
+ data.tar.gz: 4eef8fb3b71f2c2fb3c36a280c11300f2f0bc137f4d4d4b9d61c17c718300aeb33f30aeea1584e1c0cde9d1c472feb94234c6cea0154d683c2ba87e04d195baa
@@ -0,0 +1,8 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
File without changes
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source "https://rubygems.org"
2
+
3
+ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
+
5
+ # Specify your gem's dependencies in tdlib.gemspec
6
+ gemspec
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2018 isopen
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,32 @@
1
+ # TDLib
2
+
3
+ Integrating TDLib into Ruby or Ruby on Rails
4
+
5
+ ## Installation
6
+
7
+ gem install tdlib
8
+
9
+ gem 'tdlib'
10
+
11
+ ## Usage
12
+
13
+ require 'tdlib'
14
+
15
+ TDLib.loadLibrary(path)
16
+
17
+ Read about library features:
18
+ https://github.com/isopen/tdlib/blob/master/index.rb
19
+ https://core.telegram.org/tdlib/docs/
20
+ https://github.com/tdlib/td/issues?q=is%3Aissue+is%3Aclosed
21
+
22
+ ### Examples
23
+
24
+ https://github.com/isopen/tdlib/blob/master/index.rb
25
+
26
+ ## License
27
+
28
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
29
+
30
+ ## Issues
31
+
32
+ [send issue](https://github.com/isopen/tdlib/issues).
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+ task :default => :spec
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "tdlib"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,18 @@
1
+ require 'tdlib/version'
2
+ require 'ffi'
3
+ require 'json'
4
+
5
+ module TDLib
6
+ extend FFI::Library
7
+ def TDLib.loadLibrary(path = 'libtdjson.so')
8
+ ffi_lib path
9
+ attach_function :td_json_client_create, [], :pointer
10
+ attach_function :td_json_client_receive, [:pointer, :double], :string
11
+ attach_function :td_json_client_send, [:pointer, :string], :pointer
12
+ attach_function :td_json_client_execute, [:pointer, :string], :string
13
+ attach_function :td_json_client_destroy, [:pointer], :void
14
+ attach_function :td_set_log_file_path, [:string], :int
15
+ attach_function :td_set_log_max_file_size, [:long_long], :void
16
+ attach_function :td_set_log_verbosity_level, [:int], :void
17
+ end
18
+ end
@@ -0,0 +1,3 @@
1
+ module TDLib
2
+ VERSION = "1.0.4"
3
+ end
@@ -0,0 +1,36 @@
1
+
2
+ lib = File.expand_path("../lib", __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require "tdlib/version"
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "tdlib"
8
+ spec.version = TDLib::VERSION
9
+ spec.authors = ["isopen"]
10
+ spec.email = ["mr_makss@mail.ru"]
11
+
12
+ spec.summary = %q{tdlib}
13
+ spec.description = %q{Integrating TDLib into Ruby or Ruby on Rails.}
14
+ spec.homepage = "https://github.com/isopen/tdlib/blob/master/index.rb"
15
+ spec.license = "MIT"
16
+
17
+ # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
18
+ # to allow pushing to a single host or delete this section to allow pushing to any host.
19
+ if spec.respond_to?(:metadata)
20
+ spec.metadata["allowed_push_host"] = "https://rubygems.org"
21
+ else
22
+ raise "RubyGems 2.0 or newer is required to protect against " \
23
+ "public gem pushes."
24
+ end
25
+
26
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
27
+ f.match(%r{^(test|spec|features)/})
28
+ end
29
+ spec.bindir = "exe"
30
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
31
+ spec.require_paths = ["lib"]
32
+
33
+ spec.add_development_dependency "bundler", "~> 1.16"
34
+ spec.add_development_dependency "rake", "~> 10.0"
35
+ spec.add_development_dependency "ffi", "~> 1.9", ">= 1.9.10"
36
+ end
metadata ADDED
@@ -0,0 +1,104 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: tdlib
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.4
5
+ platform: ruby
6
+ authors:
7
+ - isopen
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2018-02-08 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.16'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.16'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: ffi
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.9'
48
+ - - ">="
49
+ - !ruby/object:Gem::Version
50
+ version: 1.9.10
51
+ type: :development
52
+ prerelease: false
53
+ version_requirements: !ruby/object:Gem::Requirement
54
+ requirements:
55
+ - - "~>"
56
+ - !ruby/object:Gem::Version
57
+ version: '1.9'
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: 1.9.10
61
+ description: Integrating TDLib into Ruby or Ruby on Rails.
62
+ email:
63
+ - mr_makss@mail.ru
64
+ executables: []
65
+ extensions: []
66
+ extra_rdoc_files: []
67
+ files:
68
+ - ".gitignore"
69
+ - CODE_OF_CONDUCT.md
70
+ - Gemfile
71
+ - LICENSE.txt
72
+ - README.md
73
+ - Rakefile
74
+ - bin/console
75
+ - bin/setup
76
+ - lib/tdlib.rb
77
+ - lib/tdlib/version.rb
78
+ - tdlib.gemspec
79
+ homepage: https://github.com/isopen/tdlib/blob/master/index.rb
80
+ licenses:
81
+ - MIT
82
+ metadata:
83
+ allowed_push_host: https://rubygems.org
84
+ post_install_message:
85
+ rdoc_options: []
86
+ require_paths:
87
+ - lib
88
+ required_ruby_version: !ruby/object:Gem::Requirement
89
+ requirements:
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ version: '0'
93
+ required_rubygems_version: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ">="
96
+ - !ruby/object:Gem::Version
97
+ version: '0'
98
+ requirements: []
99
+ rubyforge_project:
100
+ rubygems_version: 2.6.14
101
+ signing_key:
102
+ specification_version: 4
103
+ summary: tdlib
104
+ test_files: []