Skip to content

Commit

Permalink
chore: Working on getting this thing to work
Browse files Browse the repository at this point in the history
  • Loading branch information
joshsadam committed Oct 18, 2024
1 parent ffd5f3c commit e8564ad
Show file tree
Hide file tree
Showing 6 changed files with 294 additions and 1 deletion.
3 changes: 3 additions & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,6 @@ class Application < Rails::Application
ActiveRecord::SessionStore::Session.serializer = :json
end
end

require 'view_component'
require 'flowbite/view_components'
7 changes: 7 additions & 0 deletions embedded_gems/flowbite/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
source 'https://rubygems.org'

Check warning on line 1 in embedded_gems/flowbite/Gemfile

View workflow job for this annotation

GitHub Actions / runner / rubocop

[rubocop] reported by reviewdog 🐶 Missing frozen string literal comment. Raw Output: embedded_gems/flowbite/Gemfile:1:1: C: Style/FrozenStringLiteralComment: Missing frozen string literal comment.

gemspec

gem 'rails', '~> 7.1.3.2'
gem 'stimulus-rails'
gem 'turbo-rails'
216 changes: 216 additions & 0 deletions embedded_gems/flowbite/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,216 @@
PATH
remote: .
specs:
flowbite_view_components (0.0.1)
view_component (~> 3.15)

GEM
remote: https://rubygems.org/
specs:
actioncable (7.1.3.4)
actionpack (= 7.1.3.4)
activesupport (= 7.1.3.4)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
zeitwerk (~> 2.6)
actionmailbox (7.1.3.4)
actionpack (= 7.1.3.4)
activejob (= 7.1.3.4)
activerecord (= 7.1.3.4)
activestorage (= 7.1.3.4)
activesupport (= 7.1.3.4)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.1.3.4)
actionpack (= 7.1.3.4)
actionview (= 7.1.3.4)
activejob (= 7.1.3.4)
activesupport (= 7.1.3.4)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.2)
actionpack (7.1.3.4)
actionview (= 7.1.3.4)
activesupport (= 7.1.3.4)
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4)
rack-session (>= 1.0.1)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
actiontext (7.1.3.4)
actionpack (= 7.1.3.4)
activerecord (= 7.1.3.4)
activestorage (= 7.1.3.4)
activesupport (= 7.1.3.4)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.1.3.4)
activesupport (= 7.1.3.4)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
activejob (7.1.3.4)
activesupport (= 7.1.3.4)
globalid (>= 0.3.6)
activemodel (7.1.3.4)
activesupport (= 7.1.3.4)
activerecord (7.1.3.4)
activemodel (= 7.1.3.4)
activesupport (= 7.1.3.4)
timeout (>= 0.4.0)
activestorage (7.1.3.4)
actionpack (= 7.1.3.4)
activejob (= 7.1.3.4)
activerecord (= 7.1.3.4)
activesupport (= 7.1.3.4)
marcel (~> 1.0)
activesupport (7.1.3.4)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
base64 (0.2.0)
bigdecimal (3.1.8)
builder (3.3.0)
concurrent-ruby (1.3.4)
connection_pool (2.4.1)
crass (1.0.6)
date (3.3.4)
drb (2.2.1)
erubi (1.13.0)
globalid (1.2.1)
activesupport (>= 6.1)
i18n (1.14.6)
concurrent-ruby (~> 1.0)
io-console (0.7.2)
irb (1.14.1)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
loofah (2.22.0)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
mail (2.8.1)
mini_mime (>= 0.1.1)
net-imap
net-pop
net-smtp
marcel (1.0.4)
method_source (1.1.0)
mini_mime (1.1.5)
minitest (5.25.1)
mutex_m (0.2.0)
net-imap (0.5.0)
date
net-protocol
net-pop (0.1.2)
net-protocol
net-protocol (0.2.2)
timeout
net-smtp (0.5.0)
net-protocol
nio4r (2.7.3)
nokogiri (1.16.7-aarch64-linux)
racc (~> 1.4)
nokogiri (1.16.7-arm-linux)
racc (~> 1.4)
nokogiri (1.16.7-arm64-darwin)
racc (~> 1.4)
nokogiri (1.16.7-x86-linux)
racc (~> 1.4)
nokogiri (1.16.7-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.16.7-x86_64-linux)
racc (~> 1.4)
psych (5.1.2)
stringio
racc (1.8.1)
rack (3.1.8)
rack-session (2.0.0)
rack (>= 3.0.0)
rack-test (2.1.0)
rack (>= 1.3)
rackup (2.1.0)
rack (>= 3)
webrick (~> 1.8)
rails (7.1.3.4)
actioncable (= 7.1.3.4)
actionmailbox (= 7.1.3.4)
actionmailer (= 7.1.3.4)
actionpack (= 7.1.3.4)
actiontext (= 7.1.3.4)
actionview (= 7.1.3.4)
activejob (= 7.1.3.4)
activemodel (= 7.1.3.4)
activerecord (= 7.1.3.4)
activestorage (= 7.1.3.4)
activesupport (= 7.1.3.4)
bundler (>= 1.15.0)
railties (= 7.1.3.4)
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
railties (7.1.3.4)
actionpack (= 7.1.3.4)
activesupport (= 7.1.3.4)
irb
rackup (>= 1.0.0)
rake (>= 12.2)
thor (~> 1.0, >= 1.2.2)
zeitwerk (~> 2.6)
rake (13.2.1)
rdoc (6.7.0)
psych (>= 4.0.0)
reline (0.5.10)
io-console (~> 0.5)
stimulus-rails (1.3.4)
railties (>= 6.0.0)
stringio (3.1.1)
thor (1.3.2)
timeout (0.4.1)
turbo-rails (2.0.11)
actionpack (>= 6.0.0)
railties (>= 6.0.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
view_component (3.18.0)
activesupport (>= 5.2.0, < 8.0)
concurrent-ruby (~> 1.0)
method_source (~> 1.0)
webrick (1.8.2)
websocket-driver (0.7.6)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
zeitwerk (2.7.0)

PLATFORMS
aarch64-linux
arm-linux
arm64-darwin
x86-linux
x86_64-darwin
x86_64-linux

DEPENDENCIES
flowbite_view_components!
rails (~> 7.1.3.2)
stimulus-rails
turbo-rails

BUNDLED WITH
2.5.21
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
spec.version = Flowbite::ViewComponents::Version::STRING
spec.summary = 'Flowbite View Components'
spec.license = 'MIT'
spec.files = Dir['lib/**/*', 'app/**/*']
spec.files = Dir['lib/**/*']
spec.require_paths = ['lib']
spec.required_ruby_version = Gem::Requirement.new('>= 3.2.0')
spec.add_dependency 'view_component', '~> 3.15'
Expand Down
30 changes: 30 additions & 0 deletions embedded_gems/flowbite/lib/flowbite/ view_components.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
require 'flowbite/view_components/version'

Check warning on line 1 in embedded_gems/flowbite/lib/flowbite/ view_components.rb

View workflow job for this annotation

GitHub Actions / runner / rubocop

[rubocop] reported by reviewdog 🐶 Missing frozen string literal comment. Raw Output: embedded_gems/flowbite/lib/flowbite/ view_components.rb:1:1: C: Style/FrozenStringLiteralComment: Missing frozen string literal comment.
require 'flowbite/view_components/engine'

module Flowbite
# :nodoc:
module ViewComponents
DEPRECATION_HORIZON = '1.0'.freeze

# flowbit/view_components root directorey
def self.root
Pathname(File.expand_path(File.join('..', '..'), __dir__))
end

# Skip coverage here because only one branch will execute depending on what
# Rails version you're running.

# :nocov:
def self.deprecation
@deprecation ||=
if Rails.application.respond_to?(:deprecators)
Rails.application.deprecators[:primer_view_components] ||= ActiveSupport::Deprecation.new(
DEPRECATION_HORIZON, 'flowbite_view_components'
)
else
ActiveSupport::Deprecation.instance
end
end
# :nocov:
end
end
37 changes: 37 additions & 0 deletions embedded_gems/flowbite/lib/flowbite/view_components/engine.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
require 'rails/engine'

Check warning on line 1 in embedded_gems/flowbite/lib/flowbite/view_components/engine.rb

View workflow job for this annotation

GitHub Actions / runner / rubocop

[rubocop] reported by reviewdog 🐶 Missing frozen string literal comment. Raw Output: embedded_gems/flowbite/lib/flowbite/view_components/engine.rb:1:1: C: Style/FrozenStringLiteralComment: Missing frozen string literal comment.
require 'view_component'
require 'view_component/version'

module Flowbite
module ViewComponents
# :nodoc:
class Engine < ::Rails::Engine
isolate_namespace Flowbite::ViewComponents

config.autoload_paths = %W[
#{root}/lib
]

config.eager_load_paths = %W[
#{root}/app/components
#{root}/app/helpers
#{root}/app/lib
]

config.flowbite_view_components = ActiveSupport::OrderedOptions.new

config.flowbite_view_components.raise_on_invalid_options = false
config.flowbite_view_components.silence_deprecations = false
config.flowbite_view_components.validate_class_names = !Rails.env.production?
config.flowbite_view_components.raise_on_invalide_aria = false

initializer 'flowbite_view_components.assets' do |app|
if app.config.respond_to?(:assets)
app.config.assets.precompile += %w[
flowbite_view_components
]
end
end
end
end
end

0 comments on commit e8564ad

Please sign in to comment.