Skip to content

Commit

Permalink
Merge pull request #44 from blocknotes/docs/update-extra-contents
Browse files Browse the repository at this point in the history
docs: update extra contents
  • Loading branch information
blocknotes authored Apr 20, 2024
2 parents 1dc2f26 + 07547d7 commit 5ad645e
Show file tree
Hide file tree
Showing 10 changed files with 65 additions and 64 deletions.
11 changes: 0 additions & 11 deletions extra/hanami_app/Gemfile

This file was deleted.

14 changes: 0 additions & 14 deletions extra/hanami_app/app.rb

This file was deleted.

26 changes: 26 additions & 0 deletions extra/hanami_app/config.ru
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# frozen_string_literal: true

# => rackup -p 3000

require 'bundler/inline'

gemfile(true) do
source 'https://rubygems.org'

gem 'hanami-router'
gem 'webrick'

gem 'tiny_admin', path: '../../'
end

require 'hanami/router'

require_relative '../tiny_admin_settings'

app = Hanami::Router.new do
root to: ->(_env) { [200, {}, ['Root page - go to /admin for TinyAdmin']] }

mount TinyAdmin::Router, at: '/admin'
end

run app
9 changes: 0 additions & 9 deletions extra/rails_app/Gemfile

This file was deleted.

17 changes: 14 additions & 3 deletions extra/rails_app/app.rb
Original file line number Diff line number Diff line change
@@ -1,18 +1,29 @@
# frozen_string_literal: true

require 'bundler'
Bundler.require
# => ruby app.rb

require 'bundler/inline'

gemfile(true) do
source 'https://rubygems.org'

gem 'rails', '~> 7'
gem 'tiny_admin', path: '../../'
end

require 'action_controller/railtie'
require_relative '../tiny_admin_settings'

class RailsApp < Rails::Application
routes.append do
root to: proc { [200, {}, ['Root page']] }
root to: proc { [200, {}, ['Root page - go to /admin for TinyAdmin']] }

mount TinyAdmin::Router => '/admin'
end

config.action_dispatch.show_exceptions = :none
config.active_support.cache_format_version = 7.1
config.consider_all_requests_local = false
config.eager_load = false
end

Expand Down
12 changes: 0 additions & 12 deletions extra/roda_app/Gemfile

This file was deleted.

15 changes: 12 additions & 3 deletions extra/roda_app/app.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
# frozen_string_literal: true

require 'bundler'
Bundler.require
# => ruby app.rb

require 'bundler/inline'

gemfile(true) do
source 'https://rubygems.org'

gem 'rackup'
gem 'roda'
gem 'tiny_admin', path: '../../'
end

require_relative '../tiny_admin_settings'

class RodaApp < Roda
route do |r|
r.root do
'Root page'
'Root page - go to /admin for TinyAdmin'
end

r.on 'admin' do
Expand Down
2 changes: 2 additions & 0 deletions extra/sample_features_app/app.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# frozen_string_literal: true

# => bundle exec ruby app.rb

require 'bundler'
Bundler.require

Expand Down
10 changes: 0 additions & 10 deletions extra/standalone_app/Gemfile

This file was deleted.

13 changes: 11 additions & 2 deletions extra/standalone_app/app.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
# frozen_string_literal: true

require 'bundler'
Bundler.require
# => ruby app.rb

require 'bundler/inline'

gemfile(true) do
source 'https://rubygems.org'

gem 'rackup'

gem 'tiny_admin', path: '../../'
end

require_relative '../tiny_admin_settings'

Expand Down

0 comments on commit 5ad645e

Please sign in to comment.