uni_rails 0.4.1 → 0.5.0.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/assets/templates/default.txt +4 -3
- data/examples/hello-world.rb +1 -1
- data/examples/server-falcon-app.rb +1 -1
- data/examples/server-puma-app.rb +1 -1
- data/examples/stimulus-app.rb +1 -1
- data/examples/todos-api.rb +1 -1
- data/examples/todos-hotwire.rb +1 -1
- data/examples/todos-scaffold.rb +1 -1
- data/lib/uni_rails/app/javascript.rb +1 -1
- data/lib/uni_rails/app.rb +7 -3
- data/lib/uni_rails/version.rb +1 -1
- data/lib/uni_rails.rb +9 -0
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '09bc97fa186f6e6762d25eb082edfae37a8bd78b494e6f74df1bb6511699848f'
|
4
|
+
data.tar.gz: b5091a90c8cfb8d4a58b962b0faab6530919eb61d7105ef1d8611e9eebcf3a46
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f14573fbfdb135eb107f10d764b154fd4ade4eb1435e6d0fb63b283025fdf47ff34954afd80ece74618f258ab03a272c96e6df6d1d6f5d91ade63435e266d7d0
|
7
|
+
data.tar.gz: cee9a854957769827e3ccb8c72a44a8fa3cabc5481a51effbb947ce096c84b3c67f16cfca3f389b0339f8acf4ecc726dda4032198dc79f27b667a3a81ee887e0
|
@@ -5,7 +5,7 @@ require "bundler/inline"
|
|
5
5
|
|
6
6
|
gemfile do
|
7
7
|
source "https://www.rubygems.org"
|
8
|
-
gem "uni_rails"
|
8
|
+
gem "uni_rails", "~> 0.4.0"
|
9
9
|
gem "sqlite3", "~> 1.7"
|
10
10
|
gem "byebug"
|
11
11
|
end
|
@@ -15,7 +15,7 @@ require "sqlite3"
|
|
15
15
|
require "byebug"
|
16
16
|
|
17
17
|
# ==== ROUTES ====
|
18
|
-
UniRails
|
18
|
+
UniRails.routes do
|
19
19
|
root "resource_names#new"
|
20
20
|
resources :resource_names
|
21
21
|
end
|
@@ -85,4 +85,5 @@ HTML
|
|
85
85
|
UniRails.register_view "resource_names/show.html.erb", <<~HTML
|
86
86
|
HTML
|
87
87
|
|
88
|
-
UniRails.run(Port: 3000)
|
88
|
+
UniRails.run(Port: 3000)
|
89
|
+
# UniRails.run(Host: '0.0.0.0', Port: 3000) # when run in a docker container
|
data/examples/hello-world.rb
CHANGED
data/examples/server-puma-app.rb
CHANGED
data/examples/stimulus-app.rb
CHANGED
data/examples/todos-api.rb
CHANGED
data/examples/todos-hotwire.rb
CHANGED
data/examples/todos-scaffold.rb
CHANGED
data/lib/uni_rails/app.rb
CHANGED
@@ -8,20 +8,24 @@ require "action_controller/railtie"
|
|
8
8
|
# require "action_mailer/railtie"
|
9
9
|
# require "action_mailbox/engine"
|
10
10
|
# require "action_text/engine"
|
11
|
-
|
11
|
+
require "action_view/railtie"
|
12
12
|
# require "action_cable/engine"
|
13
13
|
# require "rails/test_unit/railtie"
|
14
14
|
require "action_view/testing/resolvers"
|
15
15
|
|
16
16
|
module UniRails
|
17
17
|
class App < Rails::Application
|
18
|
-
config.load_defaults 7.
|
18
|
+
config.load_defaults 7.2
|
19
19
|
|
20
|
-
config.eager_load = true
|
20
|
+
# config.eager_load = true
|
21
21
|
config.logger = Logger.new(STDOUT)
|
22
22
|
config.log_level = :debug
|
23
23
|
config.secret_key_base = ENV.fetch('SECRET_KEY_BASE')
|
24
24
|
|
25
|
+
routes.draw do
|
26
|
+
resources :users
|
27
|
+
end
|
28
|
+
|
25
29
|
config.after_initialize do
|
26
30
|
ActionController::Base.view_paths = Views.view_paths
|
27
31
|
ActionController::Base.include App.routes.url_helpers
|
data/lib/uni_rails/version.rb
CHANGED
data/lib/uni_rails.rb
CHANGED
@@ -42,6 +42,15 @@ module UniRails
|
|
42
42
|
)
|
43
43
|
end
|
44
44
|
|
45
|
+
def self.routes(&block)
|
46
|
+
App.initializer :add_uni_routes, before: :add_internal_routes do |app|
|
47
|
+
app.routes.prepend do
|
48
|
+
get "/rails/info/routes" => "rails/info#routes", internal: true
|
49
|
+
end
|
50
|
+
app.routes.prepend(&block)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
45
54
|
def self.rackup_handler=(handler)
|
46
55
|
@@rackup_handler = handler
|
47
56
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uni_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexandre Barret
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-09-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 7.
|
19
|
+
version: 7.2.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 7.
|
26
|
+
version: 7.2.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rackup
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -97,14 +97,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
97
97
|
requirements:
|
98
98
|
- - ">="
|
99
99
|
- !ruby/object:Gem::Version
|
100
|
-
version: 2.
|
100
|
+
version: 3.2.0
|
101
101
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
102
102
|
requirements:
|
103
|
-
- - "
|
103
|
+
- - ">"
|
104
104
|
- !ruby/object:Gem::Version
|
105
|
-
version:
|
105
|
+
version: 1.3.1
|
106
106
|
requirements: []
|
107
|
-
rubygems_version: 3.4.
|
107
|
+
rubygems_version: 3.4.19
|
108
108
|
signing_key:
|
109
109
|
specification_version: 4
|
110
110
|
summary: A Ruby library to create single-file Rails application
|