remote_ruby 0.1 → 0.2
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 +4 -4
- data/.github/workflows/main.yml +28 -0
- data/.rubocop.yml +10 -1
- data/Gemfile +8 -7
- data/LICENSE.txt +1 -1
- data/README.md +15 -4
- data/lib/remote_ruby/compiler.rb +5 -0
- data/lib/remote_ruby/connection_adapter/cache_adapter.rb +3 -0
- data/lib/remote_ruby/connection_adapter/caching_adapter.rb +3 -0
- data/lib/remote_ruby/connection_adapter/eval_adapter.rb +6 -7
- data/lib/remote_ruby/connection_adapter/local_stdin_adapter.rb +3 -0
- data/lib/remote_ruby/connection_adapter/ssh_stdin_adapter.rb +3 -0
- data/lib/remote_ruby/connection_adapter/stdin_process_adapter.rb +2 -0
- data/lib/remote_ruby/connection_adapter.rb +3 -1
- data/lib/remote_ruby/execution_context.rb +4 -3
- data/lib/remote_ruby/flavour/rails_flavour.rb +3 -0
- data/lib/remote_ruby/flavour.rb +5 -3
- data/lib/remote_ruby/locals_extractor.rb +4 -13
- data/lib/remote_ruby/runner.rb +2 -0
- data/lib/remote_ruby/source_extractor.rb +12 -0
- data/lib/remote_ruby/stream_cacher.rb +2 -0
- data/lib/remote_ruby/unmarshaler.rb +4 -3
- data/lib/remote_ruby/version.rb +3 -1
- data/lib/remote_ruby.rb +2 -0
- data/remote_ruby.gemspec +11 -5
- metadata +17 -21
- data/.travis.yml +0 -12
- data/bin/console +0 -14
- data/bin/setup +0 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3cedd66138541336a6fbb5518c94c1b8bae4baa005f8326bb08958c5e87f669e
|
|
4
|
+
data.tar.gz: d93ac29bf86d2cb44c94fb6c9dcea8cfb82fa5d7a24bcfa2d831077a8b26f6f9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d7ad4224cfcb7e1659c72b4022be4f2b50b08be8e2e7339bef855a46c04d9b5a40fd9ff929a2576c4bea69026b51e375ede8155a8816fd96f30e0fa9bcf0cd5f
|
|
7
|
+
data.tar.gz: 99177a9d0e62197a65f986be84154f26bb7be6b32a9538af515614ffe3f1575770ad7b836cd0fdd0b19f9c3e6383e34fe4b53c10c4adc0c4ca073d405ec74db9
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: "Lint & Test"
|
|
2
|
+
on: [push, pull_request]
|
|
3
|
+
jobs:
|
|
4
|
+
rubocop:
|
|
5
|
+
runs-on: ubuntu-latest
|
|
6
|
+
steps:
|
|
7
|
+
- uses: actions/checkout@v2
|
|
8
|
+
- uses: ruby/setup-ruby@v1
|
|
9
|
+
with:
|
|
10
|
+
ruby-version: 3.0.2
|
|
11
|
+
bundler-cache: true
|
|
12
|
+
- run: bundle exec rubocop
|
|
13
|
+
rspec:
|
|
14
|
+
strategy:
|
|
15
|
+
matrix:
|
|
16
|
+
os: [ubuntu-latest, macos-latest]
|
|
17
|
+
ruby: [2.6, 2.7, '3.0', head]
|
|
18
|
+
runs-on: ${{ matrix.os }}
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v2
|
|
21
|
+
- uses: ruby/setup-ruby@v1
|
|
22
|
+
with:
|
|
23
|
+
ruby-version: ${{ matrix.ruby }}
|
|
24
|
+
bundler-cache: true
|
|
25
|
+
- run: bundle exec rspec
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
data/.rubocop.yml
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
AllCops:
|
|
2
|
+
NewCops: enable
|
|
3
|
+
|
|
1
4
|
Metrics/BlockLength:
|
|
2
|
-
|
|
5
|
+
IgnoredMethods: ['describe', 'context', 'shared_context']
|
|
6
|
+
|
|
7
|
+
Style/GlobalStdStream:
|
|
8
|
+
Exclude:
|
|
9
|
+
- spec/remote_ruby/connection_adapter/eval_adapter_spec.rb
|
|
3
10
|
|
|
11
|
+
Style/DocumentDynamicEvalDefinition:
|
|
12
|
+
Enabled: false
|
data/Gemfile
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
source 'https://rubygems.org'
|
|
2
4
|
|
|
3
5
|
git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
|
|
@@ -5,17 +7,16 @@ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
|
|
|
5
7
|
gemspec
|
|
6
8
|
|
|
7
9
|
group :development do
|
|
8
|
-
gem 'rubocop'
|
|
9
|
-
gem 'yard'
|
|
10
|
+
gem 'rubocop', '~> 1.23'
|
|
11
|
+
gem 'yard', '~> 0.9'
|
|
10
12
|
end
|
|
11
13
|
|
|
12
14
|
group :development, :test do
|
|
13
|
-
gem '
|
|
14
|
-
gem 'byebug', '
|
|
15
|
-
gem '
|
|
16
|
-
gem 'rspec', '~> 3.0'
|
|
15
|
+
gem 'byebug', '~> 11.1'
|
|
16
|
+
gem 'pry-byebug', '~> 3.9'
|
|
17
|
+
gem 'rspec', '~> 3.10'
|
|
17
18
|
end
|
|
18
19
|
|
|
19
20
|
group :test do
|
|
20
|
-
gem 'coveralls', require: false
|
|
21
|
+
gem 'coveralls', '~> 0.8', require: false
|
|
21
22
|
end
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
# remote_ruby
|
|
2
|
-
|
|
3
|
-
[](https://travis-ci.org/Nu-hin/remote_ruby)
|
|
2
|
+

|
|
4
3
|
[](https://coveralls.io/github/Nu-hin/remote_ruby?branch=master)
|
|
5
4
|
[](https://codeclimate.com/github/Nu-hin/remote_ruby/maintainability)
|
|
5
|
+
[](https://badge.fury.io/rb/remote_ruby)
|
|
6
6
|
|
|
7
7
|
RemoteRuby allows you to execute Ruby code on remote servers via SSH right from the Ruby script running on your local machine, as if it was executed locally.
|
|
8
8
|
|
|
9
9
|
## Contents
|
|
10
|
+
* [Requirements](#requirements)
|
|
10
11
|
* [Overview](#overview)
|
|
11
12
|
* [How it works](#how-it-works)
|
|
12
13
|
* [Key features](#key-features)
|
|
@@ -26,6 +27,10 @@ RemoteRuby allows you to execute Ruby code on remote servers via SSH right from
|
|
|
26
27
|
* [Contributing](#contributing)
|
|
27
28
|
* [License](#license)
|
|
28
29
|
|
|
30
|
+
## Requirements
|
|
31
|
+
|
|
32
|
+
RemoteRuby requires at least Ruby 2.6 to run.
|
|
33
|
+
|
|
29
34
|
## Overview
|
|
30
35
|
|
|
31
36
|
Here is a short example on how you can run your code remotely.
|
|
@@ -95,12 +100,18 @@ puts a # => 100
|
|
|
95
100
|
Add this line to your application's Gemfile:
|
|
96
101
|
|
|
97
102
|
```ruby
|
|
98
|
-
gem 'remote_ruby'
|
|
103
|
+
gem 'remote_ruby'
|
|
99
104
|
```
|
|
100
105
|
|
|
101
106
|
And then execute:
|
|
107
|
+
```bash
|
|
108
|
+
bundle
|
|
109
|
+
```
|
|
102
110
|
|
|
103
|
-
|
|
111
|
+
Alternatively, install RemoteRuby in your gemset with the following command:
|
|
112
|
+
```bash
|
|
113
|
+
gem install remote_ruby
|
|
114
|
+
```
|
|
104
115
|
|
|
105
116
|
## Usage
|
|
106
117
|
|
data/lib/remote_ruby/compiler.rb
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
require 'base64'
|
|
2
4
|
require 'digest'
|
|
3
5
|
require 'erb'
|
|
@@ -18,6 +20,7 @@ module RemoteRuby
|
|
|
18
20
|
|
|
19
21
|
def compiled_code
|
|
20
22
|
return @compiled_code if @compiled_code
|
|
23
|
+
|
|
21
24
|
template_file =
|
|
22
25
|
::RemoteRuby.lib_path('remote_ruby/code_templates/compiler/main.rb.erb')
|
|
23
26
|
template = ERB.new(File.read(template_file))
|
|
@@ -26,11 +29,13 @@ module RemoteRuby
|
|
|
26
29
|
|
|
27
30
|
def client_locals_base64
|
|
28
31
|
return @client_locals_base64 if @client_locals_base64
|
|
32
|
+
|
|
29
33
|
@client_locals_base64 = {}
|
|
30
34
|
|
|
31
35
|
client_locals.each do |name, data|
|
|
32
36
|
base64_data = process_local(name, data)
|
|
33
37
|
next if base64_data.nil?
|
|
38
|
+
|
|
34
39
|
@client_locals_base64[name] = base64_data
|
|
35
40
|
end
|
|
36
41
|
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module RemoteRuby
|
|
2
4
|
# An adapter which takes stdout and stderr from files and ignores
|
|
3
5
|
# all stdin. Only used to read from cache.
|
|
4
6
|
class CacheAdapter < ConnectionAdapter
|
|
5
7
|
def initialize(connection_name:, cache_path:)
|
|
8
|
+
super
|
|
6
9
|
@cache_path = cache_path
|
|
7
10
|
@connection_name = connection_name
|
|
8
11
|
end
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
require 'remote_ruby/stream_cacher'
|
|
2
4
|
|
|
3
5
|
module RemoteRuby
|
|
@@ -5,6 +7,7 @@ module RemoteRuby
|
|
|
5
7
|
# initializer to cache stdout and stderr to local filesystem
|
|
6
8
|
class CachingAdapter < ConnectionAdapter
|
|
7
9
|
def initialize(cache_path:, adapter:)
|
|
10
|
+
super
|
|
8
11
|
@cache_path = cache_path
|
|
9
12
|
@adapter = adapter
|
|
10
13
|
end
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module RemoteRuby
|
|
2
4
|
# An adapter to expecute Ruby code in the current process in an isolated
|
|
3
5
|
# scope
|
|
@@ -5,6 +7,7 @@ module RemoteRuby
|
|
|
5
7
|
attr_reader :async, :working_dir
|
|
6
8
|
|
|
7
9
|
def initialize(working_dir: Dir.pwd, async: false)
|
|
10
|
+
super
|
|
8
11
|
@async = async
|
|
9
12
|
@working_dir = working_dir
|
|
10
13
|
end
|
|
@@ -13,15 +16,11 @@ module RemoteRuby
|
|
|
13
16
|
''
|
|
14
17
|
end
|
|
15
18
|
|
|
16
|
-
def open(code)
|
|
19
|
+
def open(code, &block)
|
|
17
20
|
if async
|
|
18
|
-
run_async(code
|
|
19
|
-
yield out, err
|
|
20
|
-
end
|
|
21
|
+
run_async(code, &block)
|
|
21
22
|
else
|
|
22
|
-
run_sync(code
|
|
23
|
-
yield out, err
|
|
24
|
-
end
|
|
23
|
+
run_sync(code, &block)
|
|
25
24
|
end
|
|
26
25
|
end
|
|
27
26
|
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module RemoteRuby
|
|
2
4
|
# An adapter to expecute Ruby code on the local macine
|
|
3
5
|
# inside a specified directory
|
|
@@ -5,6 +7,7 @@ module RemoteRuby
|
|
|
5
7
|
attr_reader :working_dir
|
|
6
8
|
|
|
7
9
|
def initialize(working_dir: '.')
|
|
10
|
+
super
|
|
8
11
|
@working_dir = working_dir
|
|
9
12
|
end
|
|
10
13
|
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module RemoteRuby
|
|
2
4
|
# An adapter to execute Ruby code on the remote server via SSH
|
|
3
5
|
class SSHStdinAdapter < StdinProcessAdapter
|
|
4
6
|
attr_reader :server, :working_dir, :user, :key_file
|
|
5
7
|
|
|
6
8
|
def initialize(server:, working_dir: '~', user: nil, key_file: nil)
|
|
9
|
+
super
|
|
7
10
|
@working_dir = working_dir
|
|
8
11
|
@server = user.nil? ? server : "#{user}@#{server}"
|
|
9
12
|
@user = user
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module RemoteRuby
|
|
2
4
|
# Base class for other connection adapters.
|
|
3
5
|
class ConnectionAdapter
|
|
@@ -20,7 +22,7 @@ module RemoteRuby
|
|
|
20
22
|
end
|
|
21
23
|
end
|
|
22
24
|
|
|
23
|
-
require 'remote_ruby/connection_adapter/eval_adapter
|
|
25
|
+
require 'remote_ruby/connection_adapter/eval_adapter'
|
|
24
26
|
require 'remote_ruby/connection_adapter/stdin_process_adapter'
|
|
25
27
|
require 'remote_ruby/connection_adapter/ssh_stdin_adapter'
|
|
26
28
|
require 'remote_ruby/connection_adapter/local_stdin_adapter'
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
require 'digest'
|
|
2
4
|
require 'fileutils'
|
|
3
5
|
|
|
@@ -12,7 +14,6 @@ module RemoteRuby
|
|
|
12
14
|
# This class is responsible for executing blocks on the remote host with the
|
|
13
15
|
# specified adapters. This is the entrypoint to RemoteRuby logic.
|
|
14
16
|
class ExecutionContext
|
|
15
|
-
# rubocop:disable Metrics/CyclomaticComplexity
|
|
16
17
|
def initialize(**params)
|
|
17
18
|
add_flavours(params)
|
|
18
19
|
@use_cache = params.delete(:use_cache) || false
|
|
@@ -25,7 +26,6 @@ module RemoteRuby
|
|
|
25
26
|
|
|
26
27
|
FileUtils.mkdir_p(@cache_dir)
|
|
27
28
|
end
|
|
28
|
-
# rubocop:enable Metrics/CyclomaticComplexity
|
|
29
29
|
|
|
30
30
|
def execute(locals = nil, &block)
|
|
31
31
|
source = code_source(block)
|
|
@@ -46,6 +46,7 @@ module RemoteRuby
|
|
|
46
46
|
def assign_locals(local_names, values, block)
|
|
47
47
|
local_names.each do |local|
|
|
48
48
|
next unless values.key?(local)
|
|
49
|
+
|
|
49
50
|
block.binding.local_variable_set(local, values[local])
|
|
50
51
|
end
|
|
51
52
|
end
|
|
@@ -102,7 +103,7 @@ module RemoteRuby
|
|
|
102
103
|
end
|
|
103
104
|
|
|
104
105
|
def adapter(code_hash)
|
|
105
|
-
actual_adapter = adapter_klass.new(params)
|
|
106
|
+
actual_adapter = adapter_klass.new(**params)
|
|
106
107
|
|
|
107
108
|
if use_cache && cache_exists?(code_hash)
|
|
108
109
|
cache_adapter(actual_adapter, code_hash)
|
data/lib/remote_ruby/flavour.rb
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module RemoteRuby
|
|
2
4
|
# Base class for Flavours: addons to execution context to insert additonal
|
|
3
5
|
# code to the generated remote code.
|
|
4
6
|
class Flavour
|
|
5
|
-
def self.build_flavours(
|
|
7
|
+
def self.build_flavours(args = {})
|
|
6
8
|
res = []
|
|
7
9
|
|
|
8
10
|
{
|
|
9
11
|
rails: RemoteRuby::RailsFlavour
|
|
10
12
|
}.each do |name, klass|
|
|
11
|
-
options =
|
|
13
|
+
options = args.delete(name)
|
|
12
14
|
|
|
13
15
|
res << klass.new(**options) if options
|
|
14
16
|
end
|
|
@@ -16,7 +18,7 @@ module RemoteRuby
|
|
|
16
18
|
res
|
|
17
19
|
end
|
|
18
20
|
|
|
19
|
-
def initialize(
|
|
21
|
+
def initialize(**args); end
|
|
20
22
|
|
|
21
23
|
def code_header; end
|
|
22
24
|
end
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module RemoteRuby
|
|
2
4
|
# Extracts local variable from given context
|
|
3
5
|
class LocalsExtractor
|
|
@@ -11,9 +13,10 @@ module RemoteRuby
|
|
|
11
13
|
def locals
|
|
12
14
|
locals = {}
|
|
13
15
|
|
|
14
|
-
|
|
16
|
+
block.binding.local_variables.each do |name|
|
|
15
17
|
value = block.binding.eval(name.to_s)
|
|
16
18
|
next if ignored_type?(value)
|
|
19
|
+
|
|
17
20
|
locals[name] = value
|
|
18
21
|
end
|
|
19
22
|
|
|
@@ -22,18 +25,6 @@ module RemoteRuby
|
|
|
22
25
|
|
|
23
26
|
private
|
|
24
27
|
|
|
25
|
-
def local_variable_names
|
|
26
|
-
if RUBY_VERSION >= '2.2'
|
|
27
|
-
block.binding.local_variables
|
|
28
|
-
else
|
|
29
|
-
# A hack to support Ruby 2.1 due to the absence
|
|
30
|
-
# of Binding#local_variables method. For some reason
|
|
31
|
-
# just calling `block.binding.send(:local_variables)`
|
|
32
|
-
# returns variables of the current context.
|
|
33
|
-
block.binding.eval('binding.send(:local_variables)')
|
|
34
|
-
end
|
|
35
|
-
end
|
|
36
|
-
|
|
37
28
|
def ignored_type?(var)
|
|
38
29
|
ignore_types.any? { |klass| var.is_a? klass }
|
|
39
30
|
end
|
data/lib/remote_ruby/runner.rb
CHANGED
|
@@ -1,7 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
require 'method_source'
|
|
2
4
|
require 'parser/current'
|
|
3
5
|
require 'unparser'
|
|
4
6
|
|
|
7
|
+
# Opt-in to most recent AST format
|
|
8
|
+
Parser::Builders::Default.emit_lambda = true
|
|
9
|
+
Parser::Builders::Default.emit_procarg0 = true
|
|
10
|
+
Parser::Builders::Default.emit_encoding = true
|
|
11
|
+
Parser::Builders::Default.emit_index = true
|
|
12
|
+
Parser::Builders::Default.emit_arg_inside_procarg0 = true
|
|
13
|
+
Parser::Builders::Default.emit_forward_arg = true
|
|
14
|
+
Parser::Builders::Default.emit_kwargs = true
|
|
15
|
+
Parser::Builders::Default.emit_match_pattern = true
|
|
16
|
+
|
|
5
17
|
module RemoteRuby
|
|
6
18
|
# Receives a block and extracts Ruby code (as a string) with this block's
|
|
7
19
|
# source
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module RemoteRuby
|
|
2
4
|
# Unmarshals variables from given stream
|
|
3
5
|
class Unmarshaler
|
|
@@ -41,9 +43,8 @@ module RemoteRuby
|
|
|
41
43
|
def read_var_header(line)
|
|
42
44
|
varname, length = line.split(':')
|
|
43
45
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
end
|
|
46
|
+
raise UnmarshalError, "Incorrect header '#{line}'" \
|
|
47
|
+
if varname.nil? || length.nil?
|
|
47
48
|
|
|
48
49
|
[varname, length]
|
|
49
50
|
end
|
data/lib/remote_ruby/version.rb
CHANGED
data/lib/remote_ruby.rb
CHANGED
data/remote_ruby.gemspec
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
lib = File.expand_path('lib', __dir__)
|
|
2
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
3
5
|
require 'remote_ruby/version'
|
|
@@ -8,6 +10,12 @@ Gem::Specification.new do |spec|
|
|
|
8
10
|
spec.authors = ['Nikita Chernukhin']
|
|
9
11
|
spec.email = ['nuinuhin@gmail.com']
|
|
10
12
|
|
|
13
|
+
spec.metadata = {
|
|
14
|
+
'rubygems_mfa_required' => 'true'
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
spec.required_ruby_version = '>= 2.6'
|
|
18
|
+
|
|
11
19
|
spec.summary = 'Execute Ruby code on the remote servers.'
|
|
12
20
|
spec.description =
|
|
13
21
|
'Execute Ruby code on the remote servers from local Ruby script.'
|
|
@@ -18,12 +26,10 @@ Gem::Specification.new do |spec|
|
|
|
18
26
|
f.match(%r{^(test|spec|features)/})
|
|
19
27
|
end
|
|
20
28
|
|
|
21
|
-
spec.bindir = 'bin'
|
|
22
|
-
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
|
23
29
|
spec.require_paths = ['lib']
|
|
24
30
|
|
|
25
31
|
spec.add_runtime_dependency 'colorize', '~> 0.8'
|
|
26
|
-
spec.add_runtime_dependency 'method_source', '~> 0
|
|
27
|
-
spec.add_runtime_dependency 'parser', '~>
|
|
28
|
-
spec.add_runtime_dependency 'unparser', '~> 0.
|
|
32
|
+
spec.add_runtime_dependency 'method_source', '~> 1.0'
|
|
33
|
+
spec.add_runtime_dependency 'parser', '~> 3.0'
|
|
34
|
+
spec.add_runtime_dependency 'unparser', '~> 0.6'
|
|
29
35
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: remote_ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: '0.
|
|
4
|
+
version: '0.2'
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nikita Chernukhin
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2021-11-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: colorize
|
|
@@ -30,60 +30,56 @@ dependencies:
|
|
|
30
30
|
requirements:
|
|
31
31
|
- - "~>"
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: '0
|
|
33
|
+
version: '1.0'
|
|
34
34
|
type: :runtime
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
38
|
- - "~>"
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: '0
|
|
40
|
+
version: '1.0'
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
42
|
name: parser
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
44
44
|
requirements:
|
|
45
45
|
- - "~>"
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
|
-
version: '
|
|
47
|
+
version: '3.0'
|
|
48
48
|
type: :runtime
|
|
49
49
|
prerelease: false
|
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
51
|
requirements:
|
|
52
52
|
- - "~>"
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
|
-
version: '
|
|
54
|
+
version: '3.0'
|
|
55
55
|
- !ruby/object:Gem::Dependency
|
|
56
56
|
name: unparser
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
|
58
58
|
requirements:
|
|
59
59
|
- - "~>"
|
|
60
60
|
- !ruby/object:Gem::Version
|
|
61
|
-
version: '0.
|
|
61
|
+
version: '0.6'
|
|
62
62
|
type: :runtime
|
|
63
63
|
prerelease: false
|
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
65
|
requirements:
|
|
66
66
|
- - "~>"
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
|
-
version: '0.
|
|
68
|
+
version: '0.6'
|
|
69
69
|
description: Execute Ruby code on the remote servers from local Ruby script.
|
|
70
70
|
email:
|
|
71
71
|
- nuinuhin@gmail.com
|
|
72
|
-
executables:
|
|
73
|
-
- console
|
|
74
|
-
- setup
|
|
72
|
+
executables: []
|
|
75
73
|
extensions: []
|
|
76
74
|
extra_rdoc_files: []
|
|
77
75
|
files:
|
|
76
|
+
- ".github/workflows/main.yml"
|
|
78
77
|
- ".gitignore"
|
|
79
78
|
- ".rspec"
|
|
80
79
|
- ".rubocop.yml"
|
|
81
|
-
- ".travis.yml"
|
|
82
80
|
- Gemfile
|
|
83
81
|
- LICENSE.txt
|
|
84
82
|
- README.md
|
|
85
|
-
- bin/console
|
|
86
|
-
- bin/setup
|
|
87
83
|
- lib/remote_ruby.rb
|
|
88
84
|
- lib/remote_ruby/code_templates/compiler/main.rb.erb
|
|
89
85
|
- lib/remote_ruby/compiler.rb
|
|
@@ -107,8 +103,9 @@ files:
|
|
|
107
103
|
homepage: https://github.com/nu-hin/remote_ruby
|
|
108
104
|
licenses:
|
|
109
105
|
- MIT
|
|
110
|
-
metadata:
|
|
111
|
-
|
|
106
|
+
metadata:
|
|
107
|
+
rubygems_mfa_required: 'true'
|
|
108
|
+
post_install_message:
|
|
112
109
|
rdoc_options: []
|
|
113
110
|
require_paths:
|
|
114
111
|
- lib
|
|
@@ -116,16 +113,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
116
113
|
requirements:
|
|
117
114
|
- - ">="
|
|
118
115
|
- !ruby/object:Gem::Version
|
|
119
|
-
version: '
|
|
116
|
+
version: '2.6'
|
|
120
117
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
121
118
|
requirements:
|
|
122
119
|
- - ">="
|
|
123
120
|
- !ruby/object:Gem::Version
|
|
124
121
|
version: '0'
|
|
125
122
|
requirements: []
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
signing_key:
|
|
123
|
+
rubygems_version: 3.2.22
|
|
124
|
+
signing_key:
|
|
129
125
|
specification_version: 4
|
|
130
126
|
summary: Execute Ruby code on the remote servers.
|
|
131
127
|
test_files: []
|
data/.travis.yml
DELETED
data/bin/console
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ruby
|
|
2
|
-
|
|
3
|
-
require 'bundler/setup'
|
|
4
|
-
require 'remote_ruby'
|
|
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__)
|