byld-cli 0.0.3
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 +7 -0
- data/.DS_Store +0 -0
- data/.gitignore +13 -0
- data/.irbrc +8 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +56 -0
- data/README.md +11 -0
- data/Rakefile +2 -0
- data/byld-cli.gemspec +28 -0
- data/exe/byld +5 -0
- data/lib/api/infra.rb +63 -0
- data/lib/blocks/block.rb +29 -0
- data/lib/blocks/connect.rb +26 -0
- data/lib/blocks/create_block.rb +28 -0
- data/lib/blocks/create_migration.rb +15 -0
- data/lib/blocks/create_model.rb +17 -0
- data/lib/blocks/run_migration.rb +21 -0
- data/lib/blocks/start_block.rb +13 -0
- data/lib/byld_cli.rb +41 -0
- data/lib/common/access_console.rb +60 -0
- data/lib/common/access_logs.rb +34 -0
- data/lib/common/create_project.rb +28 -0
- data/lib/common/deploy.rb +21 -0
- data/lib/common/login_user.rb +23 -0
- data/lib/common/status.rb +42 -0
- data/lib/config.rb +33 -0
- data/lib/constants.rb +3 -0
- data/lib/gates/create_gate.rb +27 -0
- data/lib/gates/expose.rb +39 -0
- data/lib/gates/gate.rb +15 -0
- data/lib/gates/start_gate.rb +13 -0
- data/lib/generators/migration.rb +27 -0
- data/lib/generators/model.rb +14 -0
- data/lib/generators/templates/active_record_model.tt +3 -0
- data/lib/generators/templates/create_migration.tt +10 -0
- data/lib/generators/templates/migration.tt +5 -0
- data/lib/helpers/config_helper.rb +19 -0
- data/lib/templates/block/.byld/config.yml.tt +7 -0
- data/lib/templates/block/.byld/gen/.empty_directory +0 -0
- data/lib/templates/block/.byld/migrations/.empty_directory +0 -0
- data/lib/templates/block/Gemfile +7 -0
- data/lib/templates/block/models/.empty_directory +0 -0
- data/lib/templates/block/models/messages/.empty_directory +1 -0
- data/lib/templates/gate/.byld/config.yml.tt +4 -0
- data/lib/templates/gate/Gemfile +5 -0
- data/lib/templates/gate/edges/.empty_directory +0 -0
- metadata +187 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: decef90cffd5ac17e6fcfcace023d5d6038c749bca10460c919578821c07761b
|
|
4
|
+
data.tar.gz: b9557430faa77e52e94693f60db46bf5ac1f0637fea6dbc0373e06462e24a923
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 89d433f57987ceecd95d27f9b67e29dfd8b4e0c2d95c7604ce857812940d9fa256fc44e484acc73db06827c4c54238ecf98d649a90462905c2409991a46b59a2
|
|
7
|
+
data.tar.gz: 37b7a69725a6f56fe6df57ddc4eef115dd9d38b4164d8a1bd91aa831ed71015f8a4169665a81a65220ca4e1faf8d7f6110838d16dedad04021bf39af93b9bab5
|
data/.DS_Store
ADDED
|
Binary file
|
data/.gitignore
ADDED
data/.irbrc
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
IRB.conf[:PROMPT][:MY_PROMPT] = { # name of prompt mode
|
|
2
|
+
:PROMPT_I => "# ", # normal prompt
|
|
3
|
+
:PROMPT_S => "# ", # prompt for continuing strings
|
|
4
|
+
:PROMPT_C => "# ", # prompt for continuing statement
|
|
5
|
+
:RETURN => "%s\n" # format to return value
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
IRB.conf[:PROMPT_MODE] = :MY_PROMPT
|
data/.ruby-gemset
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
byld-cli
|
data/.ruby-version
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2.6.6
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: .
|
|
3
|
+
specs:
|
|
4
|
+
byld-cli (0.0.1)
|
|
5
|
+
activesupport (= 5.2.3)
|
|
6
|
+
archive-zip (= 0.12)
|
|
7
|
+
faye-websocket (= 0.10.9)
|
|
8
|
+
httparty (= 0.18)
|
|
9
|
+
terminal-table (= 1.8)
|
|
10
|
+
thor (= 1.0.1)
|
|
11
|
+
|
|
12
|
+
GEM
|
|
13
|
+
remote: https://rubygems.org/
|
|
14
|
+
specs:
|
|
15
|
+
activesupport (5.2.3)
|
|
16
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
17
|
+
i18n (>= 0.7, < 2)
|
|
18
|
+
minitest (~> 5.1)
|
|
19
|
+
tzinfo (~> 1.1)
|
|
20
|
+
archive-zip (0.12.0)
|
|
21
|
+
io-like (~> 0.3.0)
|
|
22
|
+
concurrent-ruby (1.1.6)
|
|
23
|
+
eventmachine (1.2.7)
|
|
24
|
+
faye-websocket (0.10.9)
|
|
25
|
+
eventmachine (>= 0.12.0)
|
|
26
|
+
websocket-driver (>= 0.5.1)
|
|
27
|
+
httparty (0.18.0)
|
|
28
|
+
mime-types (~> 3.0)
|
|
29
|
+
multi_xml (>= 0.5.2)
|
|
30
|
+
i18n (1.8.3)
|
|
31
|
+
concurrent-ruby (~> 1.0)
|
|
32
|
+
io-like (0.3.1)
|
|
33
|
+
mime-types (3.3.1)
|
|
34
|
+
mime-types-data (~> 3.2015)
|
|
35
|
+
mime-types-data (3.2020.0512)
|
|
36
|
+
minitest (5.14.1)
|
|
37
|
+
multi_xml (0.6.0)
|
|
38
|
+
terminal-table (1.8.0)
|
|
39
|
+
unicode-display_width (~> 1.1, >= 1.1.1)
|
|
40
|
+
thor (1.0.1)
|
|
41
|
+
thread_safe (0.3.6)
|
|
42
|
+
tzinfo (1.2.7)
|
|
43
|
+
thread_safe (~> 0.1)
|
|
44
|
+
unicode-display_width (1.7.0)
|
|
45
|
+
websocket-driver (0.7.2)
|
|
46
|
+
websocket-extensions (>= 0.1.0)
|
|
47
|
+
websocket-extensions (0.1.5)
|
|
48
|
+
|
|
49
|
+
PLATFORMS
|
|
50
|
+
ruby
|
|
51
|
+
|
|
52
|
+
DEPENDENCIES
|
|
53
|
+
byld-cli!
|
|
54
|
+
|
|
55
|
+
BUNDLED WITH
|
|
56
|
+
1.17.3
|
data/README.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# cli
|
|
2
|
+
|
|
3
|
+
### installation
|
|
4
|
+
|
|
5
|
+
Ensure your token is configured with [repo, read:packages, write:packages] access at https://github.com/settings/tokens
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
bundle config https://rubygems.pkg.github.com/the-fellowship-co USER:TOKEN
|
|
9
|
+
bundle install
|
|
10
|
+
rake install
|
|
11
|
+
```
|
data/Rakefile
ADDED
data/byld-cli.gemspec
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
lib = File.expand_path("../lib", __FILE__)
|
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
3
|
+
|
|
4
|
+
Gem::Specification.new do |spec|
|
|
5
|
+
spec.name = 'byld-cli'
|
|
6
|
+
spec.version = '0.0.3'
|
|
7
|
+
|
|
8
|
+
spec.authors = ['the fellowhip co']
|
|
9
|
+
spec.summary = 'cli for byld'
|
|
10
|
+
spec.description = 'cli for byld'
|
|
11
|
+
|
|
12
|
+
# Specify which files should be added to the gem when it is released.
|
|
13
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
14
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
|
15
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features|Dockerfile)/}) }
|
|
16
|
+
end
|
|
17
|
+
spec.bindir = 'exe'
|
|
18
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
19
|
+
spec.require_paths = ['lib']
|
|
20
|
+
|
|
21
|
+
spec.add_dependency 'thor', '1.0.1'
|
|
22
|
+
spec.add_dependency 'activesupport', '5.2.3'
|
|
23
|
+
spec.add_dependency 'httparty', '0.18'
|
|
24
|
+
spec.add_dependency 'archive-zip', '0.12'
|
|
25
|
+
spec.add_dependency 'faye-websocket', '0.10.9'
|
|
26
|
+
spec.add_dependency 'terminal-table', '1.8'
|
|
27
|
+
spec.add_dependency 'activerecord', '5.2.3'
|
|
28
|
+
end
|
data/exe/byld
ADDED
data/lib/api/infra.rb
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
require 'httparty'
|
|
2
|
+
require 'securerandom'
|
|
3
|
+
|
|
4
|
+
class Infra
|
|
5
|
+
include HTTParty
|
|
6
|
+
base_uri BYLD_HOST
|
|
7
|
+
headers 'X-User-Email': Config.instance['email'], 'X-User-Token': Config.instance['authenticationToken'], 'Accept' => 'application/json'
|
|
8
|
+
|
|
9
|
+
def self.validate_user(email, token)
|
|
10
|
+
res = get('/users/current', headers: { 'X-User-Email': email, 'X-User-Token': token })
|
|
11
|
+
[res.success?, res.parsed_response]
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def self.create_namespace(user, namespace)
|
|
15
|
+
res = post('/namespaces', { body: { namespace: { name: namespace, user_id: user } } })
|
|
16
|
+
[res.success?, res.parsed_response]
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def self.get_namespace(id)
|
|
20
|
+
res = get("/namespaces/#{id}")
|
|
21
|
+
[res.success?, res.parsed_response]
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def self.create_project(namespace, project, type)
|
|
25
|
+
res = post('/projects', { body: { project: { name: project, namespace_id: namespace, project_type: type} } })
|
|
26
|
+
[res.success?, res.parsed_response]
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def self.deploy(project)
|
|
30
|
+
zip_path = "/tmp/#{project}_" + SecureRandom.alphanumeric(5) + '.zip'
|
|
31
|
+
Archive::Zip.archive(zip_path, Dir.getwd + '/.')
|
|
32
|
+
|
|
33
|
+
path = File.expand_path(zip_path)
|
|
34
|
+
res = post("/projects/#{project}/deploy", { body: { content: File.open(path) }})
|
|
35
|
+
|
|
36
|
+
[res.success?, res.parsed_response]
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def self.generate_client(project, namespace)
|
|
40
|
+
res = post("/projects/#{project}/client", { body: { name: project, namespace_id: namespace }})
|
|
41
|
+
|
|
42
|
+
[res.success?, res.parsed_response]
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def self.generate_edges(project, namespace)
|
|
46
|
+
res = post("/projects/#{project}/edges", { body: { name: project, namespace_id: namespace }})
|
|
47
|
+
|
|
48
|
+
[res.success?, res.parsed_response]
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def self.get_logs(project, namespace, since_time)
|
|
52
|
+
since_time_param = since_time ? "?since_time=#{since_time}" : ''
|
|
53
|
+
res = get("/namespaces/#{namespace}/projects/#{project}/logs" + since_time_param)
|
|
54
|
+
|
|
55
|
+
[res.success?, res.parsed_response]
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
def self.get_pod_name(project, namespace)
|
|
59
|
+
res = post("/namespaces/#{namespace}/projects/#{project}/pod_name", { body: { name: project, namespace_id: namespace }})
|
|
60
|
+
|
|
61
|
+
[res.success?, res.parsed_response]
|
|
62
|
+
end
|
|
63
|
+
end
|
data/lib/blocks/block.rb
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
require_relative 'create_block'
|
|
2
|
+
require_relative 'connect'
|
|
3
|
+
require_relative 'create_migration'
|
|
4
|
+
require_relative 'create_model'
|
|
5
|
+
require_relative 'run_migration'
|
|
6
|
+
require_relative 'start_block'
|
|
7
|
+
|
|
8
|
+
require_relative '../common/deploy'
|
|
9
|
+
require_relative '../common/access_console'
|
|
10
|
+
require_relative '../common/access_logs'
|
|
11
|
+
|
|
12
|
+
require 'archive/zip'
|
|
13
|
+
|
|
14
|
+
class Block < Thor
|
|
15
|
+
register(CreateBlock, 'new', 'new [NAME]', 'Creates a new block')
|
|
16
|
+
register(Connect, 'connect', 'connect [BLOCK]', 'Connects a new block')
|
|
17
|
+
register(Deploy, 'deploy', 'deploy', 'Deploys the current block or gate')
|
|
18
|
+
register(AccessConsole, 'console', 'console', 'Access the console')
|
|
19
|
+
register(AccessLogs, 'logs', 'logs', 'Access logs')
|
|
20
|
+
|
|
21
|
+
register(CreateModel, 'g:model', 'g:model [MODEL]', 'Creates a new model')
|
|
22
|
+
register(CreateMigration, 'g:migration', 'g:migration [MIGRATION]', 'Creates a new migration')
|
|
23
|
+
|
|
24
|
+
# Internal Commands
|
|
25
|
+
if ENV['INTERNAL']
|
|
26
|
+
register(StartBlock, 'start', 'start', 'Starts the block')
|
|
27
|
+
register(RunMigration, 'migrate', 'migrate', 'Runs pending migration')
|
|
28
|
+
end
|
|
29
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
require "fileutils"
|
|
2
|
+
|
|
3
|
+
class Connect < Thor::Group
|
|
4
|
+
include Thor::Actions
|
|
5
|
+
|
|
6
|
+
argument :name
|
|
7
|
+
class_option :url
|
|
8
|
+
|
|
9
|
+
def self.source_root
|
|
10
|
+
File.dirname(__FILE__)
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def create_client
|
|
14
|
+
puts "☝️ Connecting #{name}..."
|
|
15
|
+
namespace_config = Config.load(".byld/config.yml")
|
|
16
|
+
|
|
17
|
+
success, res = Infra.generate_client(name, namespace_config['namespace']['id'])
|
|
18
|
+
if success
|
|
19
|
+
create_file ".byld/gen/#{name.underscore}.rb", res.first['content']
|
|
20
|
+
puts "🔗 #{name} connected successfully!"
|
|
21
|
+
else
|
|
22
|
+
say "⚠️ Error connecting block. Reason: #{res}" unless success
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
class CreateBlock < Thor::Group
|
|
2
|
+
include Thor::Actions
|
|
3
|
+
|
|
4
|
+
argument :name
|
|
5
|
+
|
|
6
|
+
def self.source_root
|
|
7
|
+
File.dirname(__FILE__)
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def create_directory
|
|
11
|
+
say "✍️ Setting up #{name}..."
|
|
12
|
+
directory '../templates/block', name
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def create_infra
|
|
16
|
+
namespace_config = Config.load(".byld/config.yml")
|
|
17
|
+
success, res = Infra.create_project(namespace_config['namespace']['id'], name, 'domain')
|
|
18
|
+
|
|
19
|
+
if success
|
|
20
|
+
block_config = Config.load("#{name}/.byld/config.yml")
|
|
21
|
+
block_config.merge!(project: res)
|
|
22
|
+
say "👍 Block created successfully!"
|
|
23
|
+
else
|
|
24
|
+
say "⚠️ Error creating block. Reason: #{res}" unless success
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
require_relative '../generators/migration'
|
|
2
|
+
|
|
3
|
+
class CreateMigration < Thor::Group
|
|
4
|
+
include Thor::Actions
|
|
5
|
+
|
|
6
|
+
argument :name
|
|
7
|
+
|
|
8
|
+
def self.source_root
|
|
9
|
+
File.dirname(__FILE__)
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def create
|
|
13
|
+
MigrationGenerator.new.generic(name)
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
require_relative '../generators/model'
|
|
2
|
+
require_relative '../generators/migration'
|
|
3
|
+
|
|
4
|
+
class CreateModel < Thor::Group
|
|
5
|
+
include Thor::Actions
|
|
6
|
+
|
|
7
|
+
argument :name
|
|
8
|
+
|
|
9
|
+
def self.source_root
|
|
10
|
+
File.dirname(__FILE__)
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def create
|
|
14
|
+
ModelGenerator.new.create(name)
|
|
15
|
+
MigrationGenerator.new.create(name)
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
require 'active_record'
|
|
2
|
+
require 'active_record/schema_dumper'
|
|
3
|
+
|
|
4
|
+
class RunMigration < Thor::Group
|
|
5
|
+
include Thor::Actions
|
|
6
|
+
|
|
7
|
+
class_option :env, :default => 'dev'
|
|
8
|
+
|
|
9
|
+
def run_migrations
|
|
10
|
+
db_config = YAML::load(File.open(".byld/config.yml"))['storage']
|
|
11
|
+
ActiveRecord::Base.establish_connection(db_config)
|
|
12
|
+
ActiveRecord::MigrationContext.new(".byld/migrations/").migrate
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def update_schema
|
|
16
|
+
filename = ".byld/schema.rb"
|
|
17
|
+
File.open(filename, "w:utf-8") do |file|
|
|
18
|
+
ActiveRecord::SchemaDumper.dump(ActiveRecord::Base.connection, file)
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
class StartBlock < Thor::Group
|
|
2
|
+
include Thor::Actions
|
|
3
|
+
|
|
4
|
+
class_option :env, :default => 'dev'
|
|
5
|
+
|
|
6
|
+
def self.source_root
|
|
7
|
+
File.dirname(__FILE__)
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def start_block
|
|
11
|
+
Kernel.exec("bundle exec ruby -e \"require 'byld/block/server'\"")
|
|
12
|
+
end
|
|
13
|
+
end
|
data/lib/byld_cli.rb
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
require 'thor'
|
|
4
|
+
require 'active_support/all'
|
|
5
|
+
|
|
6
|
+
require_relative 'constants'
|
|
7
|
+
require_relative 'config'
|
|
8
|
+
|
|
9
|
+
require_relative 'helpers/config_helper'
|
|
10
|
+
require_relative 'api/infra'
|
|
11
|
+
|
|
12
|
+
require_relative 'common/create_project'
|
|
13
|
+
require_relative 'common/login_user'
|
|
14
|
+
require_relative 'common/deploy'
|
|
15
|
+
require_relative 'common/status'
|
|
16
|
+
require_relative 'common/access_console'
|
|
17
|
+
require_relative 'common/access_logs'
|
|
18
|
+
|
|
19
|
+
require_relative 'blocks/block'
|
|
20
|
+
require_relative 'blocks/connect'
|
|
21
|
+
require_relative 'gates/gate'
|
|
22
|
+
require_relative 'gates/expose'
|
|
23
|
+
|
|
24
|
+
class ByldCli < Thor
|
|
25
|
+
register(LoginUser, 'login', 'login', 'Logins into your account')
|
|
26
|
+
register(CreateProject, 'new', 'new [NAME]', 'Creates a new project')
|
|
27
|
+
register(Deploy, 'deploy', 'deploy', 'Deploys the current block or gate')
|
|
28
|
+
register(Status, 'status', 'status', 'Displays the status of the current project')
|
|
29
|
+
|
|
30
|
+
register(Connect, 'connect', 'connect [BLOCK]', 'Connects a new block')
|
|
31
|
+
register(Expose, 'expose', 'expose [BLOCK]', 'Exposes a existing block')
|
|
32
|
+
register(AccessConsole, 'console', 'console', 'Access the console')
|
|
33
|
+
register(AccessLogs, 'logs', 'logs', 'Access logs')
|
|
34
|
+
|
|
35
|
+
desc 'block [COMMAND]', 'Block commands'
|
|
36
|
+
subcommand 'block', Block
|
|
37
|
+
|
|
38
|
+
desc 'gate [COMMAND]', 'Gate commands'
|
|
39
|
+
subcommand 'gate', Gate
|
|
40
|
+
end
|
|
41
|
+
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
require 'eventmachine'
|
|
2
|
+
require 'faye/websocket'
|
|
3
|
+
require 'io/console'
|
|
4
|
+
require 'readline'
|
|
5
|
+
require 'base64'
|
|
6
|
+
|
|
7
|
+
class AccessConsole < Thor::Group
|
|
8
|
+
include Thor::Actions
|
|
9
|
+
|
|
10
|
+
class_option :env, :default => 'dev'
|
|
11
|
+
|
|
12
|
+
def self.source_root
|
|
13
|
+
File.dirname(__FILE__)
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def access_console
|
|
17
|
+
if ENV['INTERNAL'].present?
|
|
18
|
+
Kernel.exec("bundle exec ruby -e \"require 'byld/block/console'\"")
|
|
19
|
+
return
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
Signal.trap("INT") {
|
|
23
|
+
puts "\n\nBye bye! 🙏\n\n"
|
|
24
|
+
exit
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
namespace, project = ConfigHelper.get_namespace_and_project
|
|
28
|
+
success, res = Infra.get_pod_name(project, namespace)
|
|
29
|
+
|
|
30
|
+
if success
|
|
31
|
+
EM.run {
|
|
32
|
+
ws = Faye::WebSocket::Client.new("ws://#{BIFROST_HOST}?namespace=#{res['namespace_name']}&pod=#{res['pod_name']}")
|
|
33
|
+
|
|
34
|
+
ws.on :open do |event|
|
|
35
|
+
puts "🟢 Connected!"
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
command = ""
|
|
39
|
+
ws.on :message do |event|
|
|
40
|
+
data = Base64.strict_decode64(event.data)
|
|
41
|
+
if (data.strip.end_with?("#"))
|
|
42
|
+
command = ask(data)
|
|
43
|
+
ws.send(command)
|
|
44
|
+
else
|
|
45
|
+
if(command != data.gsub("\r\n",""))
|
|
46
|
+
print data
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
ws.on :close do |event|
|
|
52
|
+
# p [:close, event.code, event.reason]
|
|
53
|
+
ws = nil
|
|
54
|
+
end
|
|
55
|
+
}
|
|
56
|
+
else
|
|
57
|
+
say "⚠️ Error connecting to the console. Reason: #{res}" unless success
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
class AccessLogs < Thor::Group
|
|
2
|
+
include Thor::Actions
|
|
3
|
+
|
|
4
|
+
class_option :env, :default => 'dev'
|
|
5
|
+
|
|
6
|
+
def self.source_root
|
|
7
|
+
File.dirname(__FILE__)
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def get_logs
|
|
11
|
+
namespace, project = ConfigHelper.get_namespace_and_project
|
|
12
|
+
|
|
13
|
+
Signal.trap("INT") {
|
|
14
|
+
puts "\n\nBye bye! 🙏\n\n"
|
|
15
|
+
exit
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
last_since_time = nil
|
|
19
|
+
|
|
20
|
+
while true do
|
|
21
|
+
success, res = Infra.get_logs(project, namespace, last_since_time)
|
|
22
|
+
if success
|
|
23
|
+
last_log_line = res['logs'].split("\n").last
|
|
24
|
+
since_time = last_log_line ? last_log_line.split.first : nil
|
|
25
|
+
has_new_logs = last_since_time != since_time
|
|
26
|
+
last_since_time = has_new_logs ? since_time : last_since_time
|
|
27
|
+
say res['logs'] if has_new_logs
|
|
28
|
+
else
|
|
29
|
+
say "⚠️ Error getting logs. Reason: #{res}" unless success
|
|
30
|
+
end
|
|
31
|
+
sleep 2
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
class CreateProject < Thor::Group
|
|
2
|
+
include Thor::Actions
|
|
3
|
+
|
|
4
|
+
argument :name
|
|
5
|
+
|
|
6
|
+
def self.source_root
|
|
7
|
+
File.dirname(__FILE__)
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def create_directory
|
|
11
|
+
say "✍️ Setting up your project..."
|
|
12
|
+
empty_directory name
|
|
13
|
+
create_file "#{name}/.byld/config.yml"
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def create_project
|
|
17
|
+
success, res = Infra.create_namespace(Config.instance['id'], name)
|
|
18
|
+
|
|
19
|
+
if success
|
|
20
|
+
namespace_config = Config.load("#{name}/.byld/config.yml")
|
|
21
|
+
namespace_config.merge!(namespace: res)
|
|
22
|
+
|
|
23
|
+
say "👍 Project created successfully!"
|
|
24
|
+
else
|
|
25
|
+
say "⚠️ Error creating project. Reason: #{res}" unless success
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
class Deploy < Thor::Group
|
|
2
|
+
include Thor::Actions
|
|
3
|
+
|
|
4
|
+
def self.source_root
|
|
5
|
+
File.dirname(__FILE__)
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
def deploy
|
|
9
|
+
name = File.basename(Dir.getwd)
|
|
10
|
+
project_config = Config.load(".byld/config.yml")
|
|
11
|
+
|
|
12
|
+
say "☝️ Deploying #{name}..."
|
|
13
|
+
success, res = Infra.deploy(project_config['project']['id'])
|
|
14
|
+
if success
|
|
15
|
+
say "👌 Deployment triggered!"
|
|
16
|
+
else
|
|
17
|
+
say "⚠️ Error deploying block or gate. Reason: #{res}" unless success
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
class LoginUser < Thor::Group
|
|
2
|
+
include Thor::Actions
|
|
3
|
+
|
|
4
|
+
def self.source_root
|
|
5
|
+
File.dirname(__FILE__)
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
def login
|
|
9
|
+
email = ask 'Your email:'
|
|
10
|
+
token = ask 'Your token:'
|
|
11
|
+
|
|
12
|
+
say "\n🤞Trying to login..."
|
|
13
|
+
success, res = Infra.validate_user(email, token)
|
|
14
|
+
|
|
15
|
+
if success
|
|
16
|
+
Config.instance.merge!(res)
|
|
17
|
+
|
|
18
|
+
say "👋 You're logged in!"
|
|
19
|
+
else
|
|
20
|
+
say "⚠️ Error signing in. Reason: #{res}" unless success
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
require 'terminal-table'
|
|
2
|
+
|
|
3
|
+
class Status < Thor::Group
|
|
4
|
+
include Thor::Actions
|
|
5
|
+
|
|
6
|
+
def self.source_root
|
|
7
|
+
File.dirname(__FILE__)
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def print_status
|
|
11
|
+
success, res = Infra.get_namespace(namespace_id)
|
|
12
|
+
|
|
13
|
+
say "⚠️ Error fetching project status. Reason: #{res}" unless success
|
|
14
|
+
|
|
15
|
+
say set_color("\n#{res['name']}\n", :bold)
|
|
16
|
+
say set_color("gate\n", :bold)
|
|
17
|
+
|
|
18
|
+
gates = res['projects']
|
|
19
|
+
.filter { |project| project['projectType'] == 'graph' }
|
|
20
|
+
.map { |project| [project['name'], project['status'], project['url'], project['docsUrl']] }
|
|
21
|
+
|
|
22
|
+
say Terminal::Table.new headings: ['name', 'status', 'url', 'docs'], rows: gates
|
|
23
|
+
|
|
24
|
+
say set_color("\nblocks\n", :bold)
|
|
25
|
+
blocks = res['projects']
|
|
26
|
+
.filter { |project| project['projectType'] == 'domain' }
|
|
27
|
+
.map { |project| [project['name'], project['status']] }
|
|
28
|
+
|
|
29
|
+
say Terminal::Table.new headings: ['name', 'status'], rows: blocks
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def namespace_id
|
|
33
|
+
config = Config.load(".byld/config.yml")
|
|
34
|
+
|
|
35
|
+
if config['namespace'].present?
|
|
36
|
+
config['namespace']['id']
|
|
37
|
+
elsif config['project'].present?
|
|
38
|
+
config['project']['namespaceId']
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
end
|
data/lib/config.rb
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
require 'yaml'
|
|
2
|
+
|
|
3
|
+
class Config
|
|
4
|
+
include Singleton
|
|
5
|
+
|
|
6
|
+
def initialize(file = BYLD_CONF)
|
|
7
|
+
File.write(file, '') unless File.exists? file
|
|
8
|
+
|
|
9
|
+
@config = YAML.load(File.open(file)) || {}
|
|
10
|
+
@file = file
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def self.load(file)
|
|
14
|
+
new(file)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def [](key)
|
|
18
|
+
@config[key]
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def merge!(hash)
|
|
22
|
+
@config.merge!(hash.transform_keys(&:to_s))
|
|
23
|
+
save!
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def save!
|
|
27
|
+
f = File.open(@file, 'w')
|
|
28
|
+
f.write @config.to_yaml
|
|
29
|
+
f.close
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
end
|
|
33
|
+
|
data/lib/constants.rb
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
class CreateGate < Thor::Group
|
|
2
|
+
include Thor::Actions
|
|
3
|
+
|
|
4
|
+
def self.source_root
|
|
5
|
+
File.dirname(__FILE__)
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
def create_directory
|
|
9
|
+
say "✍️ Setting up your gate..."
|
|
10
|
+
|
|
11
|
+
directory "../templates/gate", 'gate'
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def create_infra
|
|
15
|
+
namespace_config = Config.load(".byld/config.yml")
|
|
16
|
+
sucess, res = Infra.create_project(namespace_config['namespace']['id'], 'gate', 'graph')
|
|
17
|
+
|
|
18
|
+
if sucess
|
|
19
|
+
say "👍 Gate created successfully!"
|
|
20
|
+
gate_config = Config.load("gate/.byld/config.yml")
|
|
21
|
+
gate_config.merge!(project: res)
|
|
22
|
+
else
|
|
23
|
+
say "⚠️ Error creating gate. Reason: #{res}"
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
end
|
data/lib/gates/expose.rb
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
require "fileutils"
|
|
2
|
+
|
|
3
|
+
class Expose < Thor::Group
|
|
4
|
+
include Thor::Actions
|
|
5
|
+
|
|
6
|
+
argument :name
|
|
7
|
+
|
|
8
|
+
def self.source_root
|
|
9
|
+
File.dirname(__FILE__)
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def create_client
|
|
13
|
+
puts "☝️ Connecting #{name}..."
|
|
14
|
+
|
|
15
|
+
gate_config = Config.load(".byld/config.yml")
|
|
16
|
+
success, res = Infra.generate_client(name, gate_config['project']['namespaceId'])
|
|
17
|
+
if success
|
|
18
|
+
create_file ".byld/gen/#{name.underscore}.rb", res.first['content']
|
|
19
|
+
puts "🔗 #{name} connected successfully!"
|
|
20
|
+
else
|
|
21
|
+
puts "⚠️ Error connecting block. Reason: #{res}"
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def create_edge
|
|
26
|
+
puts "☝️ Exposing #{name}..."
|
|
27
|
+
gate_config = Config.load(".byld/config.yml")
|
|
28
|
+
success, res = Infra.generate_edges(name, gate_config['project']['namespaceId'])
|
|
29
|
+
if success
|
|
30
|
+
res.each do |edge|
|
|
31
|
+
create_file "./edges/#{edge['name']}", edge['content']
|
|
32
|
+
puts "🌐 #{name} exposed successfully!"
|
|
33
|
+
end
|
|
34
|
+
else
|
|
35
|
+
puts "⚠️ Error exposing block. Reason: #{res}"
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
end
|
data/lib/gates/gate.rb
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
require_relative 'create_gate'
|
|
2
|
+
require_relative 'expose'
|
|
3
|
+
require_relative 'start_gate'
|
|
4
|
+
require_relative '../common/deploy'
|
|
5
|
+
|
|
6
|
+
class Gate < Thor
|
|
7
|
+
register(CreateGate, 'new', 'new', 'Creates a new gate')
|
|
8
|
+
register(Expose, 'expose', 'expose [BLOCK]', 'Exposes a existing block')
|
|
9
|
+
register(Deploy, 'deploy', 'deploy', 'Deploys the gate')
|
|
10
|
+
|
|
11
|
+
# Internal Commands
|
|
12
|
+
if ENV['INTERNAL']
|
|
13
|
+
register(StartGate, 'start', 'start', 'Starts the gate')
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
class MigrationGenerator
|
|
2
|
+
include Thor::Base
|
|
3
|
+
include Thor::Actions
|
|
4
|
+
source_root File.dirname(__FILE__)
|
|
5
|
+
|
|
6
|
+
def create(name)
|
|
7
|
+
@migration_class = 'Create' + name.pluralize.camelcase
|
|
8
|
+
@table_name = name.pluralize.underscore
|
|
9
|
+
create_migration_file(@migration_class.underscore, 'create_migration.tt')
|
|
10
|
+
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def generic(name)
|
|
14
|
+
@migration_class = name.camelcase
|
|
15
|
+
create_migration_file(name.underscore, 'migration.tt')
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
private
|
|
19
|
+
def create_migration_file(name, template)
|
|
20
|
+
timestamp = Time.now.strftime("%Y%m%d%H%M%S")
|
|
21
|
+
path = ".byld/migrations/#{timestamp}_#{name}.rb"
|
|
22
|
+
|
|
23
|
+
template("./templates/#{template}", path)
|
|
24
|
+
puts "Migration #{path} created!"
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
class ModelGenerator
|
|
2
|
+
include Thor::Base
|
|
3
|
+
include Thor::Actions
|
|
4
|
+
source_root File.dirname(__FILE__)
|
|
5
|
+
|
|
6
|
+
def create(name)
|
|
7
|
+
@model_camel = name.camelcase
|
|
8
|
+
@model_snake = name.underscore
|
|
9
|
+
path = "models/#{name.underscore}.rb"
|
|
10
|
+
template('./templates/active_record_model.tt', path)
|
|
11
|
+
puts "Model class #{name} created in #{path}"
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
module ConfigHelper
|
|
2
|
+
def self.get_namespace_and_project
|
|
3
|
+
namespace_path = "../.byld/config.yml"
|
|
4
|
+
project_path = ".byld/config.yml"
|
|
5
|
+
|
|
6
|
+
namespace_config = Config.load("../.byld/config.yml") if File.exist?(namespace_path)
|
|
7
|
+
project_config = Config.load(".byld/config.yml") if File.exist?(project_path)
|
|
8
|
+
|
|
9
|
+
if namespace_config.nil? or project_config.nil?
|
|
10
|
+
puts "\n 🚫Config is missing! Note: command is valid only within block or gate root folder \n\n"
|
|
11
|
+
exit
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
namespace_id = namespace_config['namespace']['id']
|
|
15
|
+
project_id = project_config['project']['id']
|
|
16
|
+
|
|
17
|
+
[namespace_id, project_id]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.empty_directory
|
|
File without changes
|
metadata
ADDED
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: byld-cli
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.0.3
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- the fellowhip co
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: exe
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2020-06-26 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: thor
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - '='
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: 1.0.1
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - '='
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: 1.0.1
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: activesupport
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - '='
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: 5.2.3
|
|
34
|
+
type: :runtime
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - '='
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: 5.2.3
|
|
41
|
+
- !ruby/object:Gem::Dependency
|
|
42
|
+
name: httparty
|
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
|
44
|
+
requirements:
|
|
45
|
+
- - '='
|
|
46
|
+
- !ruby/object:Gem::Version
|
|
47
|
+
version: '0.18'
|
|
48
|
+
type: :runtime
|
|
49
|
+
prerelease: false
|
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - '='
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: '0.18'
|
|
55
|
+
- !ruby/object:Gem::Dependency
|
|
56
|
+
name: archive-zip
|
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
|
58
|
+
requirements:
|
|
59
|
+
- - '='
|
|
60
|
+
- !ruby/object:Gem::Version
|
|
61
|
+
version: '0.12'
|
|
62
|
+
type: :runtime
|
|
63
|
+
prerelease: false
|
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
+
requirements:
|
|
66
|
+
- - '='
|
|
67
|
+
- !ruby/object:Gem::Version
|
|
68
|
+
version: '0.12'
|
|
69
|
+
- !ruby/object:Gem::Dependency
|
|
70
|
+
name: faye-websocket
|
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
|
72
|
+
requirements:
|
|
73
|
+
- - '='
|
|
74
|
+
- !ruby/object:Gem::Version
|
|
75
|
+
version: 0.10.9
|
|
76
|
+
type: :runtime
|
|
77
|
+
prerelease: false
|
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
79
|
+
requirements:
|
|
80
|
+
- - '='
|
|
81
|
+
- !ruby/object:Gem::Version
|
|
82
|
+
version: 0.10.9
|
|
83
|
+
- !ruby/object:Gem::Dependency
|
|
84
|
+
name: terminal-table
|
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
|
86
|
+
requirements:
|
|
87
|
+
- - '='
|
|
88
|
+
- !ruby/object:Gem::Version
|
|
89
|
+
version: '1.8'
|
|
90
|
+
type: :runtime
|
|
91
|
+
prerelease: false
|
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
93
|
+
requirements:
|
|
94
|
+
- - '='
|
|
95
|
+
- !ruby/object:Gem::Version
|
|
96
|
+
version: '1.8'
|
|
97
|
+
- !ruby/object:Gem::Dependency
|
|
98
|
+
name: activerecord
|
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
|
100
|
+
requirements:
|
|
101
|
+
- - '='
|
|
102
|
+
- !ruby/object:Gem::Version
|
|
103
|
+
version: 5.2.3
|
|
104
|
+
type: :runtime
|
|
105
|
+
prerelease: false
|
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
107
|
+
requirements:
|
|
108
|
+
- - '='
|
|
109
|
+
- !ruby/object:Gem::Version
|
|
110
|
+
version: 5.2.3
|
|
111
|
+
description: cli for byld
|
|
112
|
+
email:
|
|
113
|
+
executables:
|
|
114
|
+
- byld
|
|
115
|
+
extensions: []
|
|
116
|
+
extra_rdoc_files: []
|
|
117
|
+
files:
|
|
118
|
+
- ".DS_Store"
|
|
119
|
+
- ".gitignore"
|
|
120
|
+
- ".irbrc"
|
|
121
|
+
- ".ruby-gemset"
|
|
122
|
+
- ".ruby-version"
|
|
123
|
+
- Gemfile
|
|
124
|
+
- Gemfile.lock
|
|
125
|
+
- README.md
|
|
126
|
+
- Rakefile
|
|
127
|
+
- byld-cli.gemspec
|
|
128
|
+
- exe/byld
|
|
129
|
+
- lib/api/infra.rb
|
|
130
|
+
- lib/blocks/block.rb
|
|
131
|
+
- lib/blocks/connect.rb
|
|
132
|
+
- lib/blocks/create_block.rb
|
|
133
|
+
- lib/blocks/create_migration.rb
|
|
134
|
+
- lib/blocks/create_model.rb
|
|
135
|
+
- lib/blocks/run_migration.rb
|
|
136
|
+
- lib/blocks/start_block.rb
|
|
137
|
+
- lib/byld_cli.rb
|
|
138
|
+
- lib/common/access_console.rb
|
|
139
|
+
- lib/common/access_logs.rb
|
|
140
|
+
- lib/common/create_project.rb
|
|
141
|
+
- lib/common/deploy.rb
|
|
142
|
+
- lib/common/login_user.rb
|
|
143
|
+
- lib/common/status.rb
|
|
144
|
+
- lib/config.rb
|
|
145
|
+
- lib/constants.rb
|
|
146
|
+
- lib/gates/create_gate.rb
|
|
147
|
+
- lib/gates/expose.rb
|
|
148
|
+
- lib/gates/gate.rb
|
|
149
|
+
- lib/gates/start_gate.rb
|
|
150
|
+
- lib/generators/migration.rb
|
|
151
|
+
- lib/generators/model.rb
|
|
152
|
+
- lib/generators/templates/active_record_model.tt
|
|
153
|
+
- lib/generators/templates/create_migration.tt
|
|
154
|
+
- lib/generators/templates/migration.tt
|
|
155
|
+
- lib/helpers/config_helper.rb
|
|
156
|
+
- lib/templates/block/.byld/config.yml.tt
|
|
157
|
+
- lib/templates/block/.byld/gen/.empty_directory
|
|
158
|
+
- lib/templates/block/.byld/migrations/.empty_directory
|
|
159
|
+
- lib/templates/block/Gemfile
|
|
160
|
+
- lib/templates/block/models/.empty_directory
|
|
161
|
+
- lib/templates/block/models/messages/.empty_directory
|
|
162
|
+
- lib/templates/gate/.byld/config.yml.tt
|
|
163
|
+
- lib/templates/gate/Gemfile
|
|
164
|
+
- lib/templates/gate/edges/.empty_directory
|
|
165
|
+
homepage:
|
|
166
|
+
licenses: []
|
|
167
|
+
metadata: {}
|
|
168
|
+
post_install_message:
|
|
169
|
+
rdoc_options: []
|
|
170
|
+
require_paths:
|
|
171
|
+
- lib
|
|
172
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
173
|
+
requirements:
|
|
174
|
+
- - ">="
|
|
175
|
+
- !ruby/object:Gem::Version
|
|
176
|
+
version: '0'
|
|
177
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
178
|
+
requirements:
|
|
179
|
+
- - ">="
|
|
180
|
+
- !ruby/object:Gem::Version
|
|
181
|
+
version: '0'
|
|
182
|
+
requirements: []
|
|
183
|
+
rubygems_version: 3.0.3
|
|
184
|
+
signing_key:
|
|
185
|
+
specification_version: 4
|
|
186
|
+
summary: cli for byld
|
|
187
|
+
test_files: []
|