byld-cli 0.0.9 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0d850ce35811255d939c37b62814d57d6178ca0cf9853e5f565160602fe2e325
4
- data.tar.gz: 4b3029fcb988bb369161ffe3499801699d12e3c90b0f5fe7ff3e8821495cb039
3
+ metadata.gz: f54dcaf0f049e530ed6e87ee51716fb2e1ca0c43a65e45312a54917917d7c9f0
4
+ data.tar.gz: d2ef0b741afef1d26914b5ed7375c2532f8fa8b5e56b25c3c7fc576366ffaf12
5
5
  SHA512:
6
- metadata.gz: 6a949f660056c52fc4892de02cfb748127340bdad3c54ca862f4c61958137f082c22b11297bc7cd3b0413415b5ce88c902fb544767e2af504f2221c04eb732ea
7
- data.tar.gz: 1c4fcf318a0896e369b21ce45d06028e49e263ac9cd1b08c1ddd5eba166e5536a56010dbf2415237e0ec344e663c6b34138c6305f401d61136e7d974cb328c0a
6
+ metadata.gz: 4ce0b15f358b8963bd50ad9c3812a999cfda080c44b372de5c91f9ef20060b3baf71550e26de22bf2c4e8a6098d2b7fa2aa99ad821d4b0478df812131a5154d8
7
+ data.tar.gz: 6b45b3fc3f0699a0b717aed44fbd41708569f8e6dc8654d62a5f2181ae3323900105eea3856987b8be2cec8a48246e9ea730cacc77a3624a440ec85d1ed6eba2
@@ -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
@@ -1,7 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- byld-cli (0.0.1)
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.2)
53
+ websocket-driver (0.7.3)
46
54
  websocket-extensions (>= 0.1.0)
47
55
  websocket-extensions (0.1.5)
48
56
 
@@ -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
@@ -0,0 +1,9 @@
1
+ guard :shell do
2
+ watch('Gemfile') do
3
+ `bundle install`
4
+ end
5
+ end
6
+
7
+ guard :process, command: ['bundle', 'exec', 'ruby', '-e', "require('byld/gate/server')"], stop_signal: 'KILL' do
8
+ watch /.*/
9
+ end
@@ -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(".byld/migrations/").migrate
12
+ ActiveRecord::MigrationContext.new("models/migrations/").migrate
13
13
  end
14
14
 
15
15
  def update_schema
16
- filename = ".byld/schema.rb"
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
@@ -8,6 +8,6 @@ class StartBlock < Thor::Group
8
8
  end
9
9
 
10
10
  def start_block
11
- Kernel.exec("bundle exec ruby -e \"require 'byld/block/server'\"")
11
+ Kernel.exec("bundle exec ruby -e \"require('byld/block/server')\"")
12
12
  end
13
13
  end
@@ -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 IRB Console..."
35
+ puts "🌐 Connecting to Byld Console..."
36
36
  end
37
37
 
38
38
  command = ""
@@ -1,4 +1,4 @@
1
1
  BYLD_CONF = "#{Dir.home}/.byld.yaml"
2
2
  BYLD_HOST = ENV['BYLD_HOST'] || 'api.letsbyld.com'
3
3
  BIFROST_HOST = ENV['BIFROST_HOST'] || 'sockets.letsbyld.com'
4
- BYLD_VERSION = '0.0.9'
4
+ BYLD_VERSION = '0.0.10'
@@ -32,7 +32,7 @@ class Expose < Thor::Group
32
32
  puts "🌐 #{name} exposed successfully!"
33
33
  end
34
34
  else
35
- puts "⚠️ Error exposing block. Reason: #{res}"
35
+ puts "⚠️ Error exposing block. Reason: #{res['error']}"
36
36
  end
37
37
  end
38
38
 
@@ -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 = ".byld/migrations/#{timestamp}_#{name}.rb"
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
@@ -1,3 +1,3 @@
1
1
  class <%= @model_camel %> < Byld::Model
2
- expose allow: [:get, :create, :update, :delete]
2
+ enable_builtins
3
3
  end
@@ -3,5 +3,5 @@ source "https://rubygems.org"
3
3
  gem 'sqlite3'
4
4
 
5
5
  source "https://rubygems.pkg.github.com/the-fellowship-co/" do
6
- gem "byld-framework", "0.1.28"
6
+ gem "byld-framework", "0.1.38"
7
7
  end
@@ -0,0 +1,9 @@
1
+ # Add your configs in this file. You can access them in your code using
2
+ # `Settings`.
3
+ # Ex:
4
+ # key1: val1
5
+ # key2:
6
+ # nestedKey: val
7
+ # To access the config data,
8
+ # Settings.key1, Settings.key2, Settings.key2.nestedKey
9
+
@@ -1,5 +1,5 @@
1
1
  source "https://rubygems.org"
2
2
 
3
3
  source "https://rubygems.pkg.github.com/the-fellowship-co/" do
4
- gem "byld-framework", "0.1.28"
4
+ gem "byld-framework", "0.1.38"
5
5
  end
@@ -0,0 +1,9 @@
1
+ # Add your configs in this file. You can access them in your code using
2
+ # `Settings`.
3
+ # Ex:
4
+ # key1: val1
5
+ # key2:
6
+ # nestedKey: val
7
+ # To access the config data,
8
+ # Settings.key1, Settings.key2, Settings.key2.nestedKey
9
+
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.9
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-07-11 00:00:00.000000000 Z
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.3
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: []