fastrb 0.1.0 → 0.2.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 13e1e2010580def947129c3b9c5185d2a8ef6286fb1d507c80f330d8f8d796da
4
- data.tar.gz: 9b9e53ad61201f2c3521f62bf551926c1dd2039d94153314d8e415bf9ee7d73e
3
+ metadata.gz: ce89fe84dc5bc70621df9c2c44072026bc1867d1fc4952475d346494fb1cacf3
4
+ data.tar.gz: 977ed08389135d00c6ab06cdca556e84aef755a198d25524b7feb3071e4364b4
5
5
  SHA512:
6
- metadata.gz: 5f23bede7eb0a07968893f19eaf2d32326638d1bb6be94f87337f3090c63be615aa46de939a8fc4149b91f6c2fc467d9377038d825bf454755fb0eb379447f6c
7
- data.tar.gz: 9a18768236867b0e470ed56adc2a09e9021656230648c9b01eaa52e9c1c58b1c77b5024de4229dcc2845536f04ef805aff8136e49e3cf4b652853afe48678f7f
6
+ metadata.gz: ac725e6b10b3779626847d519956445152e7e54d48d6650d7e0b19872759b32969c2c27aefbddf27e5442d9ee752af4d38a5cf3abd1179ffb826d4b92f34a5f6
7
+ data.tar.gz: 1e3362553127c08f15c5b96435ce475a58eba740e4962f5ff776875b8f56f2601052d54bcd9d912b05f8a3142d1bb1b12b08459518fb3ac1ee97e194a86716ab
data/bin/fastrb ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require_relative "../lib/fastrb/cli"
3
+ RubyAPI::CLI.invoke(ARGV)
@@ -13,12 +13,12 @@ module RubyAPI
13
13
  when "server"
14
14
  start_server
15
15
  when "version"
16
- puts "rubyapi #{VERSION}"
16
+ puts "fastrb #{VERSION}"
17
17
  else
18
- puts "Usage: rubyapi <command> [options]"
18
+ puts "Usage: fastrb <command> [options]"
19
19
  puts ""
20
20
  puts "Commands:"
21
- puts " new <name> Create a new RubyAPI project"
21
+ puts " new <name> Create a new FastRb project"
22
22
  puts " server Start the server (Falcon/Puma)"
23
23
  puts " version Show version"
24
24
  exit 1
@@ -26,7 +26,7 @@ module RubyAPI
26
26
  end
27
27
 
28
28
  def self.new_project(name)
29
- puts "Creating new RubyAPI project: #{name}"
29
+ puts "Creating new FastRb project: #{name}"
30
30
 
31
31
  FileUtils.mkdir_p(name)
32
32
  FileUtils.mkdir_p("#{name}/app")
@@ -44,7 +44,7 @@ module RubyAPI
44
44
  File.write("#{name}/spec/requests/hello_spec.rb", hello_spec_content)
45
45
  File.write("#{name}/README.md", readme_content(name))
46
46
 
47
- puts "Done! cd #{name} && bundle install && rubyapi server"
47
+ puts "Done! cd #{name} && bundle install && fastrb server"
48
48
  end
49
49
 
50
50
  def self.start_server
@@ -74,7 +74,7 @@ module RubyAPI
74
74
 
75
75
  def self.main_rb_content
76
76
  <<~RUBY
77
- require "rubyapi"
77
+ require "fastrb"
78
78
 
79
79
  class App < RubyAPI::App
80
80
  def initialize
@@ -104,7 +104,7 @@ module RubyAPI
104
104
 
105
105
  def self.spec_helper_content
106
106
  <<~RUBY
107
- require "rubyapi"
107
+ require "fastrb"
108
108
  require "rack/test"
109
109
 
110
110
  RSpec.configure do |config|
@@ -143,7 +143,7 @@ module RubyAPI
143
143
  <<~MARKDOWN
144
144
  # #{name}
145
145
 
146
- A RubyAPI application.
146
+ A FastRb application.
147
147
 
148
148
  ## Setup
149
149
 
@@ -151,7 +151,7 @@ module RubyAPI
151
151
 
152
152
  ## Running
153
153
 
154
- rubyapi server
154
+ fastrb server
155
155
 
156
156
  ## Testing
157
157
 
@@ -3,7 +3,7 @@ module RubyAPI
3
3
  attr_accessor :environment, :settings
4
4
 
5
5
  def initialize
6
- @environment = ENV.fetch("RUBYAPI_ENV", "development")
6
+ @environment = ENV.fetch("FASTRB_ENV", "development")
7
7
  @settings = default_settings
8
8
  end
9
9
 
@@ -10,7 +10,7 @@ module RubyAPI
10
10
  {
11
11
  openapi: "3.0.0",
12
12
  info: {
13
- title: "RubyAPI App",
13
+ title: "FastRb App",
14
14
  version: "0.1.0"
15
15
  },
16
16
  paths: generate_paths
@@ -5,11 +5,11 @@ require "openssl"
5
5
 
6
6
  module RubyAPI
7
7
  class Session
8
- SESSION_COOKIE = "_rubyapi_session".freeze
8
+ SESSION_COOKIE = "_fastrb_session".freeze
9
9
 
10
10
  def initialize(request, secret_key: nil)
11
11
  @request = request
12
- @secret_key = secret_key || "rubyapi_default_secret"
12
+ @secret_key = secret_key || "fastrb_default_secret"
13
13
  @data = load_session
14
14
  end
15
15
 
@@ -0,0 +1,3 @@
1
+ module RubyAPI
2
+ VERSION = "0.2.0"
3
+ end
@@ -1,24 +1,24 @@
1
- require_relative "rubyapi/version"
2
- require_relative "rubyapi/router"
3
- require_relative "rubyapi/context"
4
- require_relative "rubyapi/param_converters"
5
- require_relative "rubyapi/serializer"
6
- require_relative "rubyapi/openapi"
7
- require_relative "rubyapi/schema"
8
- require_relative "rubyapi/session"
9
- require_relative "rubyapi/error_handler"
10
- require_relative "rubyapi/config"
11
- require_relative "rubyapi/di"
12
- require_relative "rubyapi/plugin"
13
- require_relative "rubyapi/websocket"
14
- require_relative "rubyapi/sse"
15
- require_relative "rubyapi/streaming"
16
- require_relative "rubyapi/job"
17
- require_relative "rubyapi/middleware/logging"
18
- require_relative "rubyapi/plugins/cors"
19
- require_relative "rubyapi/plugins/jwt"
20
- require_relative "rubyapi/plugins/auth"
21
- require_relative "rubyapi/plugins/cache"
1
+ require_relative "fastrb/version"
2
+ require_relative "fastrb/router"
3
+ require_relative "fastrb/context"
4
+ require_relative "fastrb/param_converters"
5
+ require_relative "fastrb/serializer"
6
+ require_relative "fastrb/openapi"
7
+ require_relative "fastrb/schema"
8
+ require_relative "fastrb/session"
9
+ require_relative "fastrb/error_handler"
10
+ require_relative "fastrb/config"
11
+ require_relative "fastrb/di"
12
+ require_relative "fastrb/plugin"
13
+ require_relative "fastrb/websocket"
14
+ require_relative "fastrb/sse"
15
+ require_relative "fastrb/streaming"
16
+ require_relative "fastrb/job"
17
+ require_relative "fastrb/middleware/logging"
18
+ require_relative "fastrb/plugins/cors"
19
+ require_relative "fastrb/plugins/jwt"
20
+ require_relative "fastrb/plugins/auth"
21
+ require_relative "fastrb/plugins/cache"
22
22
 
23
23
  module RubyAPI
24
24
  class App
@@ -288,7 +288,7 @@ module RubyAPI
288
288
  <!DOCTYPE html>
289
289
  <html>
290
290
  <head>
291
- <title>RubyAPI Docs</title>
291
+ <title>FastRb Docs</title>
292
292
  <link rel="stylesheet" href="https://unpkg.com/swagger-ui-dist/swagger-ui.css">
293
293
  </head>
294
294
  <body>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastrb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bruno Queiroz
@@ -96,35 +96,35 @@ dependencies:
96
96
  description: FastRb is a modern web framework for Ruby, inspired by FastAPI, with
97
97
  optional typing, automatic validation, and OpenAPI documentation.
98
98
  executables:
99
- - rubyapi
99
+ - fastrb
100
100
  extensions: []
101
101
  extra_rdoc_files: []
102
102
  files:
103
- - bin/rubyapi
104
- - lib/rubyapi.rb
105
- - lib/rubyapi/cli.rb
106
- - lib/rubyapi/config.rb
107
- - lib/rubyapi/context.rb
108
- - lib/rubyapi/di.rb
109
- - lib/rubyapi/error_handler.rb
110
- - lib/rubyapi/job.rb
111
- - lib/rubyapi/middleware/logging.rb
112
- - lib/rubyapi/openapi.rb
113
- - lib/rubyapi/param_converters.rb
114
- - lib/rubyapi/plugin.rb
115
- - lib/rubyapi/plugins/auth.rb
116
- - lib/rubyapi/plugins/cache.rb
117
- - lib/rubyapi/plugins/cors.rb
118
- - lib/rubyapi/plugins/jwt.rb
119
- - lib/rubyapi/router.rb
120
- - lib/rubyapi/schema.rb
121
- - lib/rubyapi/serializer.rb
122
- - lib/rubyapi/session.rb
123
- - lib/rubyapi/sse.rb
124
- - lib/rubyapi/streaming.rb
125
- - lib/rubyapi/version.rb
126
- - lib/rubyapi/websocket.rb
127
- homepage: https://github.com/bruno/rubyapi
103
+ - bin/fastrb
104
+ - lib/fastrb.rb
105
+ - lib/fastrb/cli.rb
106
+ - lib/fastrb/config.rb
107
+ - lib/fastrb/context.rb
108
+ - lib/fastrb/di.rb
109
+ - lib/fastrb/error_handler.rb
110
+ - lib/fastrb/job.rb
111
+ - lib/fastrb/middleware/logging.rb
112
+ - lib/fastrb/openapi.rb
113
+ - lib/fastrb/param_converters.rb
114
+ - lib/fastrb/plugin.rb
115
+ - lib/fastrb/plugins/auth.rb
116
+ - lib/fastrb/plugins/cache.rb
117
+ - lib/fastrb/plugins/cors.rb
118
+ - lib/fastrb/plugins/jwt.rb
119
+ - lib/fastrb/router.rb
120
+ - lib/fastrb/schema.rb
121
+ - lib/fastrb/serializer.rb
122
+ - lib/fastrb/session.rb
123
+ - lib/fastrb/sse.rb
124
+ - lib/fastrb/streaming.rb
125
+ - lib/fastrb/version.rb
126
+ - lib/fastrb/websocket.rb
127
+ homepage: https://github.com/BrunoMoreno/FastRb
128
128
  licenses:
129
129
  - MIT
130
130
  metadata: {}
data/bin/rubyapi DELETED
@@ -1,2 +0,0 @@
1
- require_relative "../lib/rubyapi/cli"
2
- RubyAPI::CLI.invoke(ARGV)
@@ -1,3 +0,0 @@
1
- module RubyAPI
2
- VERSION = "0.1.0"
3
- end
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes