ton-client-ruby 1.1.1 → 1.1.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -46,7 +46,8 @@ class CodeGenerator
46
46
  content = %{
47
47
  # Ruby Client for Free TON SDK
48
48
 
49
- [![GEM](https://img.shields.io/badge/ruby-gem-green)]()
49
+ [![GEM](https://img.shields.io/badge/ruby-gem-orange)](https://rubygems.org/gems/ton-client-ruby)
50
+ [![SPM](https://img.shields.io/badge/SDK%20VERSION-#{types.version}-green)](https://github.com/tonlabs/TON-SDK)
50
51
 
51
52
  ## Install
52
53
 
@@ -0,0 +1,48 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ script_file_path = File.expand_path(File.dirname(__FILE__))
4
+
5
+ require "#{script_file_path}/api_converter.rb"
6
+ require "#{script_file_path}/code_generator.rb"
7
+ GEM_DIR = "#{script_file_path}/../.."
8
+
9
+
10
+ `cd #{script_file_path} && curl https://raw.githubusercontent.com/tonlabs/TON-SDK/master/tools/api.json > api.json`
11
+ api_json_path = "#{script_file_path}/../../api.json"
12
+ json = ''
13
+ if File.exists?(api_json_path)
14
+ json = File.read(api_json_path)
15
+ else
16
+ p "File #{api_json_path} is not exist"
17
+ exit 0
18
+ end
19
+ converter = ApiConverter.new(json)
20
+ types = converter.convert
21
+ generator = CodeGenerator.new(types, GEM_DIR)
22
+ generator.generate_self_code
23
+
24
+ version_file = "#{script_file_path}/../ton-client-ruby/version.rb"
25
+ file = File.read(version_file)
26
+
27
+ p 'check version'
28
+ if file[/VERSION = "(\d+)\.(\d+)\.(\d+)"/]
29
+ major = $1
30
+ minor = $2
31
+ current = $3
32
+ version = "#{major}.#{minor}.#{current.to_i + 1}"
33
+ p version
34
+ data = "module TonClient\n VERSION = \"#{version}\"\nend\n\n"
35
+ p data
36
+ p version_file
37
+ File.open(version_file, 'wb') { |f| f.write(data) }
38
+ p 'update version'
39
+
40
+ puts "make release? Y/N"
41
+ option = gets
42
+ if option.strip.downcase == 'y'
43
+ system(%{cd #{GEM_DIR} && git add .})
44
+ system(%{cd #{GEM_DIR} && git commit -m 'version #{version}'})
45
+ system(%{cd #{GEM_DIR} && bash -lc 'rake release'})
46
+ end
47
+ end
48
+
@@ -1,4 +1,4 @@
1
1
  module TonClient
2
- VERSION = "1.1.1"
2
+ VERSION = "1.1.7"
3
3
  end
4
4
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ton-client-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - nerzh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-25 00:00:00.000000000 Z
11
+ date: 2021-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi
@@ -117,9 +117,11 @@ extensions: []
117
117
  extra_rdoc_files: []
118
118
  files:
119
119
  - bin/ton-client-ruby
120
+ - lib/code_generator/api.json
120
121
  - lib/code_generator/api_converter.rb
121
122
  - lib/code_generator/code_generator.rb
122
123
  - lib/code_generator/helpers.rb
124
+ - lib/code_generator/release.rb
123
125
  - lib/ton-client-ruby.rb
124
126
  - lib/ton-client-ruby/Binding/binding.rb
125
127
  - lib/ton-client-ruby/Binding/struct.rb
@@ -154,7 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
154
156
  - !ruby/object:Gem::Version
155
157
  version: '0'
156
158
  requirements: []
157
- rubygems_version: 3.0.9
159
+ rubygems_version: 3.1.6
158
160
  signing_key:
159
161
  specification_version: 4
160
162
  summary: This is gem ton-client-ruby