faastruby 0.4.18 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -3
  3. data/Gemfile.lock +28 -4
  4. data/README.md +63 -5
  5. data/faastruby.gemspec +5 -1
  6. data/lib/faastruby.rb +1 -0
  7. data/lib/faastruby/api.rb +154 -6
  8. data/lib/faastruby/base.rb +3 -9
  9. data/lib/faastruby/cli.rb +39 -12
  10. data/lib/faastruby/cli/base_command.rb +66 -0
  11. data/lib/faastruby/cli/commands.rb +122 -59
  12. data/lib/faastruby/cli/commands/account/base_command.rb +10 -0
  13. data/lib/faastruby/cli/commands/account/confirm.rb +94 -0
  14. data/lib/faastruby/cli/commands/account/login.rb +86 -0
  15. data/lib/faastruby/cli/commands/account/logout.rb +59 -0
  16. data/lib/faastruby/cli/commands/account/signup.rb +76 -0
  17. data/lib/faastruby/cli/commands/{function.rb → function/base_command.rb} +2 -11
  18. data/lib/faastruby/cli/commands/function/build.rb +18 -11
  19. data/lib/faastruby/cli/commands/function/deploy_to.rb +100 -37
  20. data/lib/faastruby/cli/commands/function/new.rb +89 -36
  21. data/lib/faastruby/cli/commands/function/remove_from.rb +21 -6
  22. data/lib/faastruby/cli/commands/function/run.rb +15 -15
  23. data/lib/faastruby/cli/commands/function/test.rb +5 -4
  24. data/lib/faastruby/cli/commands/function/update_context.rb +10 -3
  25. data/lib/faastruby/cli/commands/function/upgrade.rb +62 -61
  26. data/lib/faastruby/cli/commands/help.rb +33 -20
  27. data/lib/faastruby/cli/commands/project/base_command.rb +14 -0
  28. data/lib/faastruby/cli/commands/project/deploy.rb +114 -0
  29. data/lib/faastruby/cli/commands/project/down.rb +58 -0
  30. data/lib/faastruby/cli/commands/project/new.rb +237 -0
  31. data/lib/faastruby/cli/commands/workspace/cp.rb +107 -0
  32. data/lib/faastruby/cli/commands/workspace/create.rb +35 -27
  33. data/lib/faastruby/cli/commands/workspace/destroy.rb +14 -7
  34. data/lib/faastruby/cli/commands/workspace/list.rb +15 -6
  35. data/lib/faastruby/cli/commands/workspace/migrate.rb +93 -0
  36. data/lib/faastruby/cli/commands/workspace/rm.rb +81 -0
  37. data/lib/faastruby/cli/commands/workspace/update.rb +62 -0
  38. data/lib/faastruby/cli/credentials.rb +58 -57
  39. data/lib/faastruby/cli/new_credentials.rb +63 -0
  40. data/lib/faastruby/cli/package.rb +1 -0
  41. data/lib/faastruby/cli/template.rb +7 -7
  42. data/lib/faastruby/local.rb +188 -0
  43. data/lib/faastruby/local/crystal_runtime.cr +170 -0
  44. data/lib/faastruby/local/functions.rb +7 -0
  45. data/lib/faastruby/local/functions/crystal.rb +64 -0
  46. data/lib/faastruby/local/functions/function.rb +173 -0
  47. data/lib/faastruby/local/functions/ruby.rb +28 -0
  48. data/lib/faastruby/local/listeners.rb +5 -0
  49. data/lib/faastruby/local/listeners/listener.rb +104 -0
  50. data/lib/faastruby/local/logger.rb +37 -0
  51. data/lib/faastruby/local/monkey_patch.rb +38 -0
  52. data/lib/faastruby/local/processors.rb +7 -0
  53. data/lib/faastruby/local/processors/function.rb +151 -0
  54. data/lib/faastruby/local/processors/processor.rb +116 -0
  55. data/lib/faastruby/local/processors/static_file.rb +48 -0
  56. data/lib/faastruby/local/static_files.rb +5 -0
  57. data/lib/faastruby/local/static_files/static_file.rb +59 -0
  58. data/lib/faastruby/server.rb +44 -3
  59. data/lib/faastruby/server/app.rb +107 -0
  60. data/lib/faastruby/server/concurrency_controller.rb +50 -50
  61. data/lib/faastruby/server/config.ru +2 -0
  62. data/lib/faastruby/server/event.rb +3 -0
  63. data/lib/faastruby/server/event_hub.rb +7 -6
  64. data/lib/faastruby/server/local.rb +22 -0
  65. data/lib/faastruby/server/logger.rb +50 -0
  66. data/lib/faastruby/server/project_config.rb +44 -0
  67. data/lib/faastruby/server/puma.rb +4 -0
  68. data/lib/faastruby/server/response.rb +40 -0
  69. data/lib/faastruby/server/runner.rb +116 -21
  70. data/lib/faastruby/server/runner_methods.rb +17 -16
  71. data/lib/faastruby/server/sentinel.rb +496 -0
  72. data/lib/faastruby/supported_runtimes.rb +8 -0
  73. data/lib/faastruby/user.rb +77 -0
  74. data/lib/faastruby/version.rb +1 -1
  75. data/lib/faastruby/workspace.rb +36 -3
  76. data/templates/crystal/example-blank/handler.cr +3 -0
  77. data/templates/crystal/example/spec/handler_spec.cr +11 -6
  78. data/templates/public-web/assets/images/background.png +0 -0
  79. data/templates/public-web/assets/images/ruby.png +0 -0
  80. data/templates/public-web/assets/javascripts/main.js +1 -0
  81. data/templates/public-web/assets/stylesheets/main.css +70 -0
  82. data/templates/public-web/favicon.ico +0 -0
  83. data/templates/ruby/api-404/handler.rb +6 -0
  84. data/templates/ruby/api-root/handler.rb +6 -0
  85. data/templates/ruby/example-blank/handler.rb +0 -23
  86. data/templates/ruby/web-404/404.html +36 -0
  87. data/templates/ruby/web-404/handler.rb +3 -0
  88. data/templates/ruby/web-root/handler.rb +10 -0
  89. data/templates/ruby/web-root/index.html.erb +37 -0
  90. data/templates/ruby/web-root/template.rb +13 -0
  91. metadata +102 -21
  92. data/exe/faastruby-server +0 -76
  93. data/lib/faastruby/cli/commands/credentials.rb +0 -11
  94. data/lib/faastruby/cli/commands/credentials/add.rb +0 -58
  95. data/lib/faastruby/cli/commands/credentials/list.rb +0 -58
  96. data/lib/faastruby/cli/commands/workspace.rb +0 -13
  97. data/lib/faastruby/cli/commands/workspace/deploy.rb +0 -50
  98. data/templates/crystal/example-blank/README.md +0 -22
  99. data/templates/crystal/example-blank/spec/handler_spec.cr +0 -8
  100. data/templates/crystal/example-blank/spec/spec_helper.cr +0 -4
  101. data/templates/crystal/example-blank/src/handler.cr +0 -25
  102. data/templates/ruby/example-blank/Gemfile +0 -7
  103. data/templates/ruby/example-blank/README.md +0 -22
  104. data/templates/ruby/example-blank/spec/handler_spec.rb +0 -16
  105. data/templates/ruby/example-blank/spec/spec_helper.rb +0 -3
@@ -0,0 +1,8 @@
1
+ module FaaStRuby
2
+ # It is important that they are sorted in version order!
3
+ SUPPORTED_RUBY = ['2.5.3', '2.6.0', '2.6.1']
4
+ SUPPORTED_CRYSTAL = ['0.27.0', '0.27.2']
5
+ CRYSTAL_LATEST = SUPPORTED_CRYSTAL.last
6
+ RUBY_LATEST = SUPPORTED_RUBY.last
7
+ SUPPORTED_RUNTIMES = SUPPORTED_RUBY.map{|version| "ruby:#{version}"} + SUPPORTED_CRYSTAL.map{|version| "crystal:#{version}"}
8
+ end
@@ -0,0 +1,77 @@
1
+ module FaaStRuby
2
+ class User < BaseObject
3
+ def self.create(email:, password:)
4
+ api = API.new
5
+ user = User.new(email: email)
6
+ response = api.signup(email: email, password: password)
7
+ user.status_code = response.code
8
+ if response.errors.any?
9
+ user.errors += response.errors
10
+ return user
11
+ end
12
+ case response.code
13
+ when 422
14
+ user.errors += ['(422) Unprocessable Entity', response.body]
15
+ when 200, 201
16
+ true
17
+ else
18
+ user.errors << "(#{response.code}) Error"
19
+ end
20
+ return user
21
+ end
22
+
23
+ attr_accessor :email, :password, :status_code, :errors, :api_key, :api_secret, :confirmation_token
24
+
25
+ def logout(all: false)
26
+ response = @api.logout(api_key: @api_key, api_secret: @api_secret, all: all)
27
+ @status_code = response.code
28
+ @errors += response.errors if response.errors.any?
29
+ self
30
+ end
31
+
32
+ def login
33
+ response = @api.login(email: @email, password: @password)
34
+ @status_code = response.code
35
+ if response.errors.any?
36
+ @errors += response.errors
37
+ return self
38
+ end
39
+ if response.body['credentials']
40
+ @api_key = response.body['credentials']['api_key']
41
+ @api_secret = response.body['credentials']['api_secret']
42
+ end
43
+ self
44
+ end
45
+
46
+ def has_credentials?
47
+ @api_key && @api_secret
48
+ end
49
+
50
+ def confirm_account!
51
+ response = @api.confirm_account(@confirmation_token)
52
+ @status_code = response.code
53
+ if response.errors.any?
54
+ @errors += response.errors
55
+ return self
56
+ end
57
+ if response.body['credentials']
58
+ @api_key = response.body['credentials']['api_key']
59
+ @api_secret = response.body['credentials']['api_secret']
60
+ end
61
+ self
62
+ end
63
+
64
+ def send_confirmation_code
65
+ response = @api.send_confirmation_code(@email)
66
+ @status_code = response.code
67
+ @errors += response.errors if response.errors.any?
68
+ self
69
+ end
70
+
71
+ def save_credentials
72
+ credentials_file = NewCredentials::CredentialsFile.new
73
+ credentials_file.save(email: @email, api_key: @api_key, api_secret: @api_secret)
74
+ end
75
+
76
+ end
77
+ end
@@ -1,3 +1,3 @@
1
1
  module FaaStRuby
2
- VERSION = '0.4.18'
2
+ VERSION = '0.5.0'
3
3
  end
@@ -18,6 +18,7 @@ module FaaStRuby
18
18
  workspace.errors += ['(422) Unprocessable Entity', response.body]
19
19
  when 200, 201
20
20
  workspace.credentials = response.body['credentials']
21
+ workspace.runners_max = response.body['runners_max'].to_i if response.body['runners_max']
21
22
  else
22
23
  workspace.errors << "(#{response.code}) Error"
23
24
  end
@@ -26,7 +27,7 @@ module FaaStRuby
26
27
  ###################
27
28
 
28
29
  ##### Instance methods
29
- attr_accessor :name, :errors, :functions, :email, :object, :credentials, :updated_at, :created_at, :status_code, :provider
30
+ attr_accessor :name, :errors, :functions, :email, :object, :credentials, :updated_at, :created_at, :status_code, :provider, :runners_max, :runners_current, :static_metadata
30
31
 
31
32
  def destroy
32
33
  response = @api.destroy_workspace(@name)
@@ -34,8 +35,8 @@ module FaaStRuby
34
35
  @errors += response.errors if response.errors.any?
35
36
  end
36
37
 
37
- def deploy(package_file_name)
38
- response = @api.deploy(workspace_name: @name, package: package_file_name)
38
+ def deploy(package_file_name, root_to: false, catch_all: false, context: false)
39
+ response = @api.deploy(workspace_name: @name, package: package_file_name, root_to: root_to, catch_all: catch_all, context: context)
39
40
  @status_code = response.code
40
41
  @errors += response.errors if response.errors.any?
41
42
  self
@@ -49,6 +50,14 @@ module FaaStRuby
49
50
  self
50
51
  end
51
52
 
53
+ def update_runners(value)
54
+ response = @api.update_runners(workspace_name: @name, runners_max: value)
55
+ @runners_max = response.body['runners_max'].to_i if response.body['runners_max'] rescue nil
56
+ @status_code = response.code
57
+ @errors += response.errors if response.errors.any?
58
+ self
59
+ end
60
+
52
61
  def fetch
53
62
  response = @api.get_workspace_info(@name)
54
63
  @status_code = response.code
@@ -60,6 +69,28 @@ module FaaStRuby
60
69
  self
61
70
  end
62
71
 
72
+ def upload_file(package_file_name, relative_path:)
73
+ response = @api.upload_file(workspace_name: @name, package: package_file_name, relative_path: relative_path)
74
+ @status_code = response.code
75
+ @errors += response.errors if response.errors.any?
76
+ self
77
+ end
78
+
79
+ def delete_file(relative_path:)
80
+ response = @api.delele_file(workspace_name: @name, relative_path: relative_path)
81
+ @status_code = response.code
82
+ @errors += response.errors if response.errors.any?
83
+ self
84
+ end
85
+
86
+ def static_metadata
87
+ response = @api.get_static_metadata(@name)
88
+ @status_code = response.code
89
+ @errors += response.errors if response.errors.any?
90
+ @static_metadata = response.body['metadata']
91
+ self
92
+ end
93
+
63
94
  def parse_attributes(attributes)
64
95
  @functions = attributes['functions']
65
96
  @email = attributes['email']
@@ -67,6 +98,8 @@ module FaaStRuby
67
98
  @updated_at = attributes['updated_at']
68
99
  @created_at = attributes['created_at']
69
100
  @provider = attributes['provider']
101
+ @runners_max = attributes['runners_max'].to_i if attributes['runners_max'] rescue nil
102
+ @runners_current = attributes['runners_current'].to_i rescue nil
70
103
  end
71
104
  end
72
105
  end
@@ -0,0 +1,3 @@
1
+ def handler(event : FaaStRuby::Event) : FaaStRuby::Response
2
+ # TODO: Write code here.
3
+ end
@@ -1,22 +1,27 @@
1
1
  require "./spec_helper"
2
2
 
3
- describe "handler(event)" do
4
- event_hash = {
3
+ private def event_hash
4
+ {
5
5
  "body" => nil,
6
6
  "context" => nil,
7
7
  "headers" => {"Content-Type" => "application/json"},
8
8
  "query_params" => {} of String => String
9
9
  }
10
- event = Event.from_json(event_hash.to_json)
10
+ end
11
+
12
+ private def event
13
+ Event.from_json(event_hash.to_json)
14
+ end
11
15
 
16
+ describe "handler(event)" do
12
17
  it "should return String" do
13
18
  body = handler(event).body
14
- body.class.should eq(String)
19
+ body.should be_a String
15
20
  end
21
+
16
22
  it "should say Hello, World!" do
17
- event_hash["body"] = nil
18
23
  event = Event.from_json(event_hash.to_json)
19
24
  body = handler(event).body
20
25
  body.should eq("Hello, World!\n")
21
26
  end
22
- end
27
+ end
@@ -0,0 +1 @@
1
+ console.log('Welcome to FaaStRuby Local!');
@@ -0,0 +1,70 @@
1
+ * {
2
+ -webkit-font-smoothing: antialiased;
3
+ -moz-osx-font-smoothing: grayscale;
4
+ }
5
+
6
+ html {
7
+ height: 100%;
8
+ margin: 0px;
9
+ background-image: url('/assets/images/background.png');
10
+ background-repeat: no-repeat;
11
+ background-size: cover;
12
+ }
13
+
14
+ body {
15
+ margin: 0px;
16
+ padding-left: 30px;
17
+ padding-right: 30px;
18
+ font-family: 'Open Sans';
19
+ color: #ffffff;
20
+ height: 100%;
21
+ }
22
+
23
+ h1,h2,h3,h4,h5,h6 {
24
+ font-family: 'Source Code Pro';
25
+ letter-spacing: -1px;
26
+ }
27
+
28
+ .paragraph {
29
+ font-family: 'Open Sans';
30
+ letter-spacing: 0px;
31
+ }
32
+
33
+ .text-center {
34
+ text-align: center;
35
+ }
36
+
37
+ .header {
38
+ height: 60px;
39
+ width: 100%;
40
+ display:table;
41
+ padding: 0px;
42
+ }
43
+
44
+ .logo-image-div {
45
+ vertical-align:middle;
46
+ display:table-cell;
47
+ width: 60px;
48
+ padding: 0px;
49
+ }
50
+
51
+ .logo-image {
52
+ width: 60px;
53
+ padding: 0px;
54
+ }
55
+
56
+ .logo-name-div {
57
+ vertical-align:middle;
58
+ display:table-cell;
59
+ padding-left: 5px;
60
+ padding-bottom: 6px;
61
+ }
62
+
63
+ .logo-name {
64
+ font-size: 45px;
65
+ }
66
+
67
+ .content {
68
+ width: 100%;
69
+ margin: 0px;
70
+ }
@@ -0,0 +1,6 @@
1
+ def handler event
2
+ response = {
3
+ 'message' => "Page Not Found. Edit the function 'catch-all' to customize this response."
4
+ }
5
+ render json: response, status: 404
6
+ end
@@ -0,0 +1,6 @@
1
+ def handler event
2
+ response = {
3
+ 'message' => "Welcome to FaaStRuby Local! Edit the function 'root' to customize this response."
4
+ }
5
+ render json: response
6
+ end
@@ -1,26 +1,3 @@
1
- # To deploy this function, cd into its folder and run:
2
- # faastruby deploy-to WORKSPACE_NAME
3
1
  def handler event
4
- # The 'event' argument has the following attributes
5
- # event.body - The request body
6
- # event.context - The execution context
7
- # event.headers - The request headers
8
- # event.query_params - The query params
9
-
10
- # FUNCTION RESPONSE
11
- #
12
- # You can render text, json, yaml, html or js. Example:
13
- # render html: '<p>Hello World!</p>'
14
- # render yaml: {hello: 'world!'}
15
- #
16
- # Status:
17
- # The default status is 200. You can set a custom status like this:
18
- # render json: {error: 'Could not perform the action'}, status: 422
19
- #
20
- # Headers:
21
- # The 'Content-Type' header is automatically set when you use 'render'.
22
- # You can set custom headers using a hash with string keys. Example:
23
- # render text: 'It Works!', headers: {'TransactionId' => 23928}
24
-
25
2
  # TODO: Write code here
26
3
  end
@@ -0,0 +1,36 @@
1
+
2
+ <!DOCTYPE html>
3
+ <html lang="en">
4
+
5
+ <head>
6
+
7
+ <meta charset="utf-8">
8
+ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
9
+ <meta name="description" content="">
10
+ <meta name="author" content="">
11
+
12
+ <title>Page Not Found - FaaStRuby Local</title>
13
+
14
+ <link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700|Source+Code+Pro:400,700" rel="stylesheet">
15
+ <link href="/assets/stylesheets/main.css" rel="stylesheet">
16
+
17
+ </head>
18
+
19
+ <body>
20
+ <header class="header">
21
+ <div class="logo-image-div">
22
+ <img src="/assets/images/ruby.png" class="logo-image">
23
+ </div>
24
+ <div class="logo-name-div">
25
+ <h1 class="logo-name">FaaStRuby</h1>
26
+ </div>
27
+ </header>
28
+ <div class="content">
29
+ <h1 class="text-center">Page Not Found</h1>
30
+ <p class="text-center">To customize this page, edit the function 'catch-all'.</p>
31
+ </div>
32
+ <!-- JavaScript -->
33
+ <script src="/assets/javascripts/main.js"></script>
34
+ </body>
35
+
36
+ </html>
@@ -0,0 +1,3 @@
1
+ def handler event
2
+ render html: File.read('404.html')
3
+ end
@@ -0,0 +1,10 @@
1
+ require './template'
2
+
3
+ def handler event
4
+ greeting = "Welcome to FaaStRuby Local!"
5
+ render html: template('index.html.erb', variables: {greeting: greeting})
6
+ end
7
+
8
+ def template(file, variables: {})
9
+ Template.new(variables: variables).render(file)
10
+ end
@@ -0,0 +1,37 @@
1
+
2
+ <!DOCTYPE html>
3
+ <html lang="en">
4
+
5
+ <head>
6
+
7
+ <meta charset="utf-8">
8
+ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
9
+ <meta name="description" content="">
10
+ <meta name="author" content="">
11
+
12
+ <title>Welcome! - FaaStRuby Local</title>
13
+
14
+ <link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700|Source+Code+Pro:400,700" rel="stylesheet">
15
+ <link href="/assets/stylesheets/main.css" rel="stylesheet">
16
+
17
+ </head>
18
+
19
+ <body>
20
+ <header class="header">
21
+ <div class="logo-image-div">
22
+ <img src="/assets/images/ruby.png" class="logo-image">
23
+ </div>
24
+ <div class="logo-name-div">
25
+ <h1 class="logo-name">FaaStRuby</h1>
26
+ </div>
27
+ </header>
28
+ <div class="content">
29
+ <h1 class="text-center"><%= @greeting %></h1>
30
+ <p class="text-center">To customize this page, edit the function 'root'.</p>
31
+ </div>
32
+
33
+ <!-- JavaScript -->
34
+ <script src="/assets/javascripts/main.js"></script>
35
+ </body>
36
+
37
+ </html>
@@ -0,0 +1,13 @@
1
+ require 'erb'
2
+
3
+ class Template
4
+ def initialize(variables: {})
5
+ variables.each do |var, value|
6
+ instance_variable_set("@#{var}", value)
7
+ end
8
+ end
9
+
10
+ def render(file)
11
+ ERB.new(File.read(file)).result(binding)
12
+ end
13
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: faastruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.18
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paulo Arruda
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-02-06 00:00:00.000000000 Z
11
+ date: 2019-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -142,14 +142,56 @@ dependencies:
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: 0.2.1
145
+ version: '0.2'
146
146
  type: :runtime
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: 0.2.1
152
+ version: '0.2'
153
+ - !ruby/object:Gem::Dependency
154
+ name: tmuxinator
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: '0.15'
160
+ type: :runtime
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - "~>"
165
+ - !ruby/object:Gem::Version
166
+ version: '0.15'
167
+ - !ruby/object:Gem::Dependency
168
+ name: rouge
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - "~>"
172
+ - !ruby/object:Gem::Version
173
+ version: '3.3'
174
+ type: :runtime
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - "~>"
179
+ - !ruby/object:Gem::Version
180
+ version: '3.3'
181
+ - !ruby/object:Gem::Dependency
182
+ name: listen
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - "~>"
186
+ - !ruby/object:Gem::Version
187
+ version: '3.1'
188
+ type: :runtime
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - "~>"
193
+ - !ruby/object:Gem::Version
194
+ version: '3.1'
153
195
  - !ruby/object:Gem::Dependency
154
196
  name: bundler
155
197
  requirement: !ruby/object:Gem::Requirement
@@ -211,7 +253,6 @@ email:
211
253
  - parrudaj@gmail.com
212
254
  executables:
213
255
  - faastruby
214
- - faastruby-server
215
256
  extensions: []
216
257
  extra_rdoc_files: []
217
258
  files:
@@ -227,17 +268,19 @@ files:
227
268
  - bin/console
228
269
  - bin/setup
229
270
  - exe/faastruby
230
- - exe/faastruby-server
231
271
  - faastruby.gemspec
232
272
  - lib/faastruby.rb
233
273
  - lib/faastruby/api.rb
234
274
  - lib/faastruby/base.rb
235
275
  - lib/faastruby/cli.rb
276
+ - lib/faastruby/cli/base_command.rb
236
277
  - lib/faastruby/cli/commands.rb
237
- - lib/faastruby/cli/commands/credentials.rb
238
- - lib/faastruby/cli/commands/credentials/add.rb
239
- - lib/faastruby/cli/commands/credentials/list.rb
240
- - lib/faastruby/cli/commands/function.rb
278
+ - lib/faastruby/cli/commands/account/base_command.rb
279
+ - lib/faastruby/cli/commands/account/confirm.rb
280
+ - lib/faastruby/cli/commands/account/login.rb
281
+ - lib/faastruby/cli/commands/account/logout.rb
282
+ - lib/faastruby/cli/commands/account/signup.rb
283
+ - lib/faastruby/cli/commands/function/base_command.rb
241
284
  - lib/faastruby/cli/commands/function/build.rb
242
285
  - lib/faastruby/cli/commands/function/deploy_to.rb
243
286
  - lib/faastruby/cli/commands/function/new.rb
@@ -247,48 +290,85 @@ files:
247
290
  - lib/faastruby/cli/commands/function/update_context.rb
248
291
  - lib/faastruby/cli/commands/function/upgrade.rb
249
292
  - lib/faastruby/cli/commands/help.rb
293
+ - lib/faastruby/cli/commands/project/base_command.rb
294
+ - lib/faastruby/cli/commands/project/deploy.rb
295
+ - lib/faastruby/cli/commands/project/down.rb
296
+ - lib/faastruby/cli/commands/project/new.rb
250
297
  - lib/faastruby/cli/commands/version.rb
251
- - lib/faastruby/cli/commands/workspace.rb
298
+ - lib/faastruby/cli/commands/workspace/cp.rb
252
299
  - lib/faastruby/cli/commands/workspace/create.rb
253
- - lib/faastruby/cli/commands/workspace/deploy.rb
254
300
  - lib/faastruby/cli/commands/workspace/destroy.rb
255
301
  - lib/faastruby/cli/commands/workspace/list.rb
302
+ - lib/faastruby/cli/commands/workspace/migrate.rb
303
+ - lib/faastruby/cli/commands/workspace/rm.rb
304
+ - lib/faastruby/cli/commands/workspace/update.rb
256
305
  - lib/faastruby/cli/credentials.rb
306
+ - lib/faastruby/cli/new_credentials.rb
257
307
  - lib/faastruby/cli/package.rb
258
308
  - lib/faastruby/cli/template.rb
259
309
  - lib/faastruby/function.rb
310
+ - lib/faastruby/local.rb
311
+ - lib/faastruby/local/crystal_runtime.cr
312
+ - lib/faastruby/local/functions.rb
313
+ - lib/faastruby/local/functions/crystal.rb
314
+ - lib/faastruby/local/functions/function.rb
315
+ - lib/faastruby/local/functions/ruby.rb
316
+ - lib/faastruby/local/listeners.rb
317
+ - lib/faastruby/local/listeners/listener.rb
318
+ - lib/faastruby/local/logger.rb
319
+ - lib/faastruby/local/monkey_patch.rb
320
+ - lib/faastruby/local/processors.rb
321
+ - lib/faastruby/local/processors/function.rb
322
+ - lib/faastruby/local/processors/processor.rb
323
+ - lib/faastruby/local/processors/static_file.rb
324
+ - lib/faastruby/local/static_files.rb
325
+ - lib/faastruby/local/static_files/static_file.rb
260
326
  - lib/faastruby/server.rb
327
+ - lib/faastruby/server/app.rb
261
328
  - lib/faastruby/server/concurrency_controller.rb
329
+ - lib/faastruby/server/config.ru
262
330
  - lib/faastruby/server/errors.rb
263
331
  - lib/faastruby/server/event.rb
264
332
  - lib/faastruby/server/event_channel.rb
265
333
  - lib/faastruby/server/event_hub.rb
266
334
  - lib/faastruby/server/function_object.rb
335
+ - lib/faastruby/server/local.rb
336
+ - lib/faastruby/server/logger.rb
337
+ - lib/faastruby/server/project_config.rb
338
+ - lib/faastruby/server/puma.rb
267
339
  - lib/faastruby/server/response.rb
268
340
  - lib/faastruby/server/runner.rb
269
341
  - lib/faastruby/server/runner_methods.rb
342
+ - lib/faastruby/server/sentinel.rb
270
343
  - lib/faastruby/server/subscriber.rb
271
344
  - lib/faastruby/spec_helper.rb
345
+ - lib/faastruby/supported_runtimes.rb
346
+ - lib/faastruby/user.rb
272
347
  - lib/faastruby/version.rb
273
348
  - lib/faastruby/workspace.rb
274
- - templates/crystal/example-blank/README.md
275
- - templates/crystal/example-blank/spec/handler_spec.cr
276
- - templates/crystal/example-blank/spec/spec_helper.cr
277
- - templates/crystal/example-blank/src/handler.cr
349
+ - templates/crystal/example-blank/handler.cr
278
350
  - templates/crystal/example/README.md
279
351
  - templates/crystal/example/spec/handler_spec.cr
280
352
  - templates/crystal/example/spec/spec_helper.cr
281
353
  - templates/crystal/example/src/handler.cr
282
- - templates/ruby/example-blank/Gemfile
283
- - templates/ruby/example-blank/README.md
354
+ - templates/public-web/assets/images/background.png
355
+ - templates/public-web/assets/images/ruby.png
356
+ - templates/public-web/assets/javascripts/main.js
357
+ - templates/public-web/assets/stylesheets/main.css
358
+ - templates/public-web/favicon.ico
359
+ - templates/ruby/api-404/handler.rb
360
+ - templates/ruby/api-root/handler.rb
284
361
  - templates/ruby/example-blank/handler.rb
285
- - templates/ruby/example-blank/spec/handler_spec.rb
286
- - templates/ruby/example-blank/spec/spec_helper.rb
287
362
  - templates/ruby/example/Gemfile
288
363
  - templates/ruby/example/README.md
289
364
  - templates/ruby/example/handler.rb
290
365
  - templates/ruby/example/spec/handler_spec.rb
291
366
  - templates/ruby/example/spec/spec_helper.rb
367
+ - templates/ruby/web-404/404.html
368
+ - templates/ruby/web-404/handler.rb
369
+ - templates/ruby/web-root/handler.rb
370
+ - templates/ruby/web-root/index.html.erb
371
+ - templates/ruby/web-root/template.rb
292
372
  homepage: https://faastruby.io
293
373
  licenses:
294
374
  - MIT
@@ -308,7 +388,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
308
388
  - !ruby/object:Gem::Version
309
389
  version: '0'
310
390
  requirements: []
311
- rubygems_version: 3.0.2
391
+ rubyforge_project:
392
+ rubygems_version: 2.7.8
312
393
  signing_key:
313
394
  specification_version: 4
314
395
  summary: FaaStRuby CLI - Manage workspaces and functions hosted at faastruby.io.