byld-cli 0.0.9 → 0.0.10
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/Dockerfile +18 -0
- data/Gemfile.lock +10 -2
- data/Guardfile.block +13 -0
- data/Guardfile.gate +9 -0
- data/lib/blocks/run_migration.rb +2 -2
- data/lib/blocks/start_block.rb +1 -1
- data/lib/common/access_console.rb +1 -1
- data/lib/constants.rb +1 -1
- data/lib/gates/expose.rb +1 -1
- data/lib/generators/migration.rb +3 -3
- data/lib/generators/templates/active_record_model.tt +1 -1
- data/lib/templates/block/Gemfile +1 -1
- data/lib/templates/block/config.yml.tt +9 -0
- data/lib/templates/block/models/migrations/.empty_directory +1 -0
- data/lib/templates/gate/Gemfile +1 -1
- data/lib/templates/gate/config.yml.tt +9 -0
- metadata +14 -9
- data/lib/templates/block/.byld/migrations/.empty_directory +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f54dcaf0f049e530ed6e87ee51716fb2e1ca0c43a65e45312a54917917d7c9f0
|
4
|
+
data.tar.gz: d2ef0b741afef1d26914b5ed7375c2532f8fa8b5e56b25c3c7fc576366ffaf12
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ce0b15f358b8963bd50ad9c3812a999cfda080c44b372de5c91f9ef20060b3baf71550e26de22bf2c4e8a6098d2b7fa2aa99ad821d4b0478df812131a5154d8
|
7
|
+
data.tar.gz: 6b45b3fc3f0699a0b717aed44fbd41708569f8e6dc8654d62a5f2181ae3323900105eea3856987b8be2cec8a48246e9ea730cacc77a3624a440ec85d1ed6eba2
|
data/Dockerfile
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
FROM ruby:2.6.6
|
2
|
+
ENV APP_HOME /cli
|
3
|
+
RUN mkdir $APP_HOME
|
4
|
+
WORKDIR $APP_HOME
|
5
|
+
|
6
|
+
RUN gem install guard guard-process guard-shell
|
7
|
+
|
8
|
+
ADD *.gemspec $APP_HOME/
|
9
|
+
ADD Gemfile* $APP_HOME/
|
10
|
+
ADD ./lib/constants.rb $APP_HOME/lib/
|
11
|
+
RUN bundle install
|
12
|
+
|
13
|
+
ARG project_type
|
14
|
+
ADD .irbrc /root/
|
15
|
+
ADD Guardfile.$project_type /root/.Guardfile
|
16
|
+
|
17
|
+
ADD . $APP_HOME
|
18
|
+
RUN rake install
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
byld-cli (0.0.
|
4
|
+
byld-cli (0.0.10)
|
5
|
+
activerecord (= 5.2.3)
|
5
6
|
activesupport (= 5.2.3)
|
6
7
|
archive-zip (= 0.12)
|
7
8
|
faye-websocket (= 0.10.9)
|
@@ -12,6 +13,12 @@ PATH
|
|
12
13
|
GEM
|
13
14
|
remote: https://rubygems.org/
|
14
15
|
specs:
|
16
|
+
activemodel (5.2.3)
|
17
|
+
activesupport (= 5.2.3)
|
18
|
+
activerecord (5.2.3)
|
19
|
+
activemodel (= 5.2.3)
|
20
|
+
activesupport (= 5.2.3)
|
21
|
+
arel (>= 9.0)
|
15
22
|
activesupport (5.2.3)
|
16
23
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
17
24
|
i18n (>= 0.7, < 2)
|
@@ -19,6 +26,7 @@ GEM
|
|
19
26
|
tzinfo (~> 1.1)
|
20
27
|
archive-zip (0.12.0)
|
21
28
|
io-like (~> 0.3.0)
|
29
|
+
arel (9.0.0)
|
22
30
|
concurrent-ruby (1.1.6)
|
23
31
|
eventmachine (1.2.7)
|
24
32
|
faye-websocket (0.10.9)
|
@@ -42,7 +50,7 @@ GEM
|
|
42
50
|
tzinfo (1.2.7)
|
43
51
|
thread_safe (~> 0.1)
|
44
52
|
unicode-display_width (1.7.0)
|
45
|
-
websocket-driver (0.7.
|
53
|
+
websocket-driver (0.7.3)
|
46
54
|
websocket-extensions (>= 0.1.0)
|
47
55
|
websocket-extensions (0.1.5)
|
48
56
|
|
data/Guardfile.block
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
guard :shell do
|
2
|
+
watch('Gemfile') do
|
3
|
+
`bundle install`
|
4
|
+
end
|
5
|
+
watch /.byld\/migrations\/.*.rb/ do
|
6
|
+
`byld block migrate`
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
guard :process, command: ['bundle', 'exec', 'ruby', '-e', "require('byld/block/server')"], stop_signal: 'KILL' do
|
11
|
+
watch /.*/
|
12
|
+
ignore /.*\.sqlite/
|
13
|
+
end
|
data/Guardfile.gate
ADDED
data/lib/blocks/run_migration.rb
CHANGED
@@ -9,11 +9,11 @@ class RunMigration < Thor::Group
|
|
9
9
|
def run_migrations
|
10
10
|
db_config = Config.load(".byld/config.yml")['storage']
|
11
11
|
ActiveRecord::Base.establish_connection(db_config)
|
12
|
-
ActiveRecord::MigrationContext.new("
|
12
|
+
ActiveRecord::MigrationContext.new("models/migrations/").migrate
|
13
13
|
end
|
14
14
|
|
15
15
|
def update_schema
|
16
|
-
filename = "
|
16
|
+
filename = "models/schema.rb"
|
17
17
|
File.open(filename, "w:utf-8") do |file|
|
18
18
|
ActiveRecord::SchemaDumper.dump(ActiveRecord::Base.connection, file)
|
19
19
|
end
|
data/lib/blocks/start_block.rb
CHANGED
@@ -32,7 +32,7 @@ class AccessConsole < Thor::Group
|
|
32
32
|
ws = Faye::WebSocket::Client.new("ws://#{BIFROST_HOST}?namespace=#{res['namespace_name']}&pod=#{res['pod_name']}")
|
33
33
|
|
34
34
|
ws.on :open do |event|
|
35
|
-
puts "🌐 Connecting to
|
35
|
+
puts "🌐 Connecting to Byld Console..."
|
36
36
|
end
|
37
37
|
|
38
38
|
command = ""
|
data/lib/constants.rb
CHANGED
data/lib/gates/expose.rb
CHANGED
data/lib/generators/migration.rb
CHANGED
@@ -18,10 +18,10 @@ class MigrationGenerator
|
|
18
18
|
private
|
19
19
|
def create_migration_file(name, template)
|
20
20
|
timestamp = Time.now.strftime("%Y%m%d%H%M%S")
|
21
|
-
path = "
|
22
|
-
|
21
|
+
path = "models/migrations/#{timestamp}_#{name}.rb"
|
22
|
+
|
23
23
|
template("./templates/#{template}", path)
|
24
24
|
puts "Migration #{path} created!"
|
25
25
|
end
|
26
|
-
|
26
|
+
|
27
27
|
end
|
data/lib/templates/block/Gemfile
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
.empty_directory
|
data/lib/templates/gate/Gemfile
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: byld-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- the fellowhip co
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -109,7 +109,7 @@ dependencies:
|
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: 5.2.3
|
111
111
|
description: cli for byld
|
112
|
-
email:
|
112
|
+
email:
|
113
113
|
executables:
|
114
114
|
- byld
|
115
115
|
extensions: []
|
@@ -120,8 +120,11 @@ files:
|
|
120
120
|
- ".irbrc"
|
121
121
|
- ".ruby-gemset"
|
122
122
|
- ".ruby-version"
|
123
|
+
- Dockerfile
|
123
124
|
- Gemfile
|
124
125
|
- Gemfile.lock
|
126
|
+
- Guardfile.block
|
127
|
+
- Guardfile.gate
|
125
128
|
- README.md
|
126
129
|
- Rakefile
|
127
130
|
- byld-cli.gemspec
|
@@ -155,17 +158,19 @@ files:
|
|
155
158
|
- lib/helpers/config_helper.rb
|
156
159
|
- lib/templates/block/.byld/config.yml.tt
|
157
160
|
- lib/templates/block/.byld/gen/.empty_directory
|
158
|
-
- lib/templates/block/.byld/migrations/.empty_directory
|
159
161
|
- lib/templates/block/Gemfile
|
162
|
+
- lib/templates/block/config.yml.tt
|
160
163
|
- lib/templates/block/models/.empty_directory
|
161
164
|
- lib/templates/block/models/messages/.empty_directory
|
165
|
+
- lib/templates/block/models/migrations/.empty_directory
|
162
166
|
- lib/templates/gate/.byld/config.yml.tt
|
163
167
|
- lib/templates/gate/Gemfile
|
168
|
+
- lib/templates/gate/config.yml.tt
|
164
169
|
- lib/templates/gate/edges/.empty_directory
|
165
|
-
homepage:
|
170
|
+
homepage:
|
166
171
|
licenses: []
|
167
172
|
metadata: {}
|
168
|
-
post_install_message:
|
173
|
+
post_install_message:
|
169
174
|
rdoc_options: []
|
170
175
|
require_paths:
|
171
176
|
- lib
|
@@ -180,8 +185,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
180
185
|
- !ruby/object:Gem::Version
|
181
186
|
version: '0'
|
182
187
|
requirements: []
|
183
|
-
rubygems_version: 3.0.
|
184
|
-
signing_key:
|
188
|
+
rubygems_version: 3.0.8
|
189
|
+
signing_key:
|
185
190
|
specification_version: 4
|
186
191
|
summary: cli for byld
|
187
192
|
test_files: []
|
File without changes
|