tybo 0.4.0 → 0.4.1

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: 8ab4cdfff13cd95e094c1f514ea158ac7864300189aafc8a7311f1d5e93841d8
4
- data.tar.gz: e45e09cc3cedc966946edf94fa6719d23d4a25fc24a1b2a40e6f5ea9228e5124
3
+ metadata.gz: a4ce3d25216a414e0297531f8df01f18a84a85fa6524a0afe9870593638bd8a8
4
+ data.tar.gz: 790ae5fab45c4ebc681f5bcfb098b5f0fcf729792198a8f7d1e24f9f6aefc1e6
5
5
  SHA512:
6
- metadata.gz: 18a5116fbef742f8d9d43562e5c2b0b486953a9db59695b805bb8053ee0727df37a3c7c2c1d6f613211f09a6816d71ccb3b452dcbe4090c1213f79feb3bf5cbc
7
- data.tar.gz: 8c4e0f30ef10f8a2d495ad9c034d41285afcd4ff677fd1111f6cb6b11c0e57448f9ab1f588d63e374c14fdb74706302acd45f552584b097dbe31aca90d1925d4
6
+ metadata.gz: dc06cdbe9bd43d986aae83338f864c83f82ebfd6e5b6623ab6d019474119b00ced0e4a93b1d7f0a40da2827293b977cc42db3e7cdc6da2f817fe7b7026e4e0ca
7
+ data.tar.gz: 396dc2d7a54ae8eb1dd7dd7b881b02d47131b7ec7bf4fc697da18f12c9a8131455fdda83e1a2455c6872f8da74ce3b6a3076d6a69b1a34f0560b5b4ee0e17804
@@ -18,7 +18,7 @@
18
18
  <main class="py-10">
19
19
  <div class="px-4 sm:px-6 lg:px-8">
20
20
  <%%= render('layouts/flash') %>
21
- <%= yield %>
21
+ <%%= yield %>
22
22
  </div>
23
23
  </main>
24
24
  </div>
@@ -3,13 +3,28 @@ require 'csv'
3
3
 
4
4
  class <%= class_name %>Controller < ApplicationController
5
5
  include Pagy::Backend
6
- layout '<%= class_name.underscore %>'
7
- before_action :authenticate_<%= class_name.underscore %>!
8
- authorize :user, through: :current_<%= class_name.underscore %>
6
+ layout 'administrator'
7
+ before_action :authenticate_administrator!, :set_default_locale
8
+ authorize :user, through: :current_administrator
9
9
 
10
10
  private
11
11
 
12
12
  def namespace
13
- @namespace ||= Bo::<%= class_name.pluralize %>
13
+ @namespace ||= Bo::Administrators
14
+ end
15
+
16
+ def set_default_locale
17
+ I18n.default_locale = :fr
18
+ end
19
+
20
+ protected
21
+
22
+ # Devise routing overwrite for multiples resources
23
+ def after_sign_in_path_for(resource)
24
+ send(:"#{resource.class.name.underscore.pluralize}_root_path")
25
+ end
26
+
27
+ def after_sign_out_path_for(resource)
28
+ send(:"new_#{resource}_session_path")
14
29
  end
15
30
  end
@@ -17,7 +17,7 @@ module.exports = {
17
17
  sans: ['Inter var', ...defaultTheme.fontFamily.sans],
18
18
  },
19
19
  screens: {
20
- sm: '480px',
20
+ sm: '0px',
21
21
  md: '768px',
22
22
  lg: '976px',
23
23
  xl: '1440px',
@@ -3,7 +3,7 @@
3
3
  class TyboInstallGenerator < Rails::Generators::Base
4
4
  source_root File.expand_path("templates", __dir__)
5
5
  require_relative "./utils/translations.rb"
6
-
6
+
7
7
  def install_dependencies
8
8
  run './bin/bundle add tailwindcss-rails' unless Bundler.locked_gems.specs.any? { |gem| gem.name == 'tailwindcss-rails' }
9
9
  gem 'simple_form' unless Bundler.locked_gems.specs.any? { |gem| gem.name == 'simple_form' }
@@ -55,4 +55,3 @@ class TyboInstallGenerator < Rails::Generators::Base
55
55
  end
56
56
  end
57
57
  end
58
-
data/lib/tybo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Tybo
2
- VERSION = '0.4.0'
2
+ VERSION = '0.4.1'
3
3
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tybo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michel Delpierre
8
8
  - Julien Camblan
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-09-30 00:00:00.000000000 Z
12
+ date: 2024-11-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -285,7 +285,7 @@ licenses:
285
285
  - MIT
286
286
  metadata:
287
287
  homepage_uri: https://rubygems.org/gems/tybo
288
- post_install_message:
288
+ post_install_message:
289
289
  rdoc_options: []
290
290
  require_paths:
291
291
  - lib
@@ -300,8 +300,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
300
300
  - !ruby/object:Gem::Version
301
301
  version: '0'
302
302
  requirements: []
303
- rubygems_version: 3.5.16
304
- signing_key:
303
+ rubygems_version: 3.0.3.1
304
+ signing_key:
305
305
  specification_version: 4
306
306
  summary: A tailwind custom admin engine for Ruby on Rails
307
307
  test_files: []