Skip to content

Commit

Permalink
still working to deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasConnolly committed Nov 27, 2023
1 parent 2c010d6 commit bcb343b
Show file tree
Hide file tree
Showing 19 changed files with 447 additions and 115 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
3 changes: 2 additions & 1 deletion Procfile.dev
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
web: bundle exec puma -C config/puma.rb

css: yarn build:css --watch
js: yarn build --watch
Empty file added app/assets/builds/.keep
Empty file.
5 changes: 1 addition & 4 deletions app/assets/config/manifest.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
//= link_tree ../images
//= link_tree ../builds
//= link application.css
//= link actiontext.css
//= link application.js
//= link_directory ../stylesheets .css

6 changes: 4 additions & 2 deletions app/javascript/application.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Entry point for the build script in your package.json
import "bootstrap";
import { Application } from "./application";
import "@hotwired/turbo-rails"
//import "./controllers"
import * as bootstrap from "bootstrap"

1 change: 1 addition & 0 deletions app/javascript/controllers/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import { application } from "./application"
7 changes: 1 addition & 6 deletions app/models/agenda.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,10 @@
# draft :boolean
#
class Agenda < ApplicationRecord
has_many :agenda_items, inverse_of: :agenda, -> { order(position: :asc) },dependent: :destroy
has_many :agenda_items, inverse_of: :agenda, dependent: :destroy
accepts_nested_attributes_for :agenda_items, allow_destroy: true,
reject_if: :all_blank
belongs_to :user
validates :meeting_date, presence: true
validates :draft, inclusion: { in: [true, false] }

# def agenda_items_attributes=(attributes)
# agenda_items.build(attributes) if attributes['title'].present?
# super
# end
end
3 changes: 0 additions & 3 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@
<%= csp_meta_tag %>
<script src="https://js.stripe.com/v3/"></script>
<%= stylesheet_link_tag "application.css", "data-turbo-track": "reload" %>
<%= stylesheet_link_tag "actiontext", "data-turbo-track": "reload" %>
<%= javascript_include_tag "application", type: "module", "data-turbo-track": "reload", defer: true %>
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
<%= javascript_include_tag "application", "data-turbo-track": "reload", defer: true %>
</head>

<body class="<%= controller_name %> <%= action_name %>">
Expand Down
3 changes: 3 additions & 0 deletions bin/dev
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ if ! gem list foreman -i --silent; then
gem install foreman
fi

# Default to port 3000 if not specified
export PORT="${PORT:-3000}"

exec foreman start -f Procfile.dev "$@"
2 changes: 1 addition & 1 deletion config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Application < Rails::Application
config.assets.configure do |env|
env.export_concurrent = false
end
Rails.application.config.default_url_options = { host: "localhost", port: 5000 }
Rails.application.config.default_url_options = { host: "localhost", port: 3000 }
# Rails.application.default_url_options = { host: "localhost", port: 5000 }
# Configuration for the application, engines, and railties goes here.
# config/application.rb
Expand Down
2 changes: 1 addition & 1 deletion config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
config.sass.inline_source_maps = true

####
Rails.application.config.default_url_options = { host: 'localhost', port: 5000 }
Rails.application.config.default_url_options = { host: 'localhost', port: 3000 }
Rails.application.default_url_options = { host: 'localhost', port: 5000 }
# Print deprecation notices to the Rails logger.
config.active_support.deprecation = :log
Expand Down
2 changes: 1 addition & 1 deletion config/initializers/assets.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Rails.application.config.assets.version = '1.0'

# Add additional assets to the asset load path

Rails.application.config.assets.paths << Rails.root.join('node_modules/bootstrap-icons/font')
# Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in the app/assets
# folder are already added.
Expand Down
2 changes: 1 addition & 1 deletion config/puma.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

# Specifies the `port` that Puma will listen on to receive requests; default is 3000.
#
port ENV.fetch('PORT', 5000)
port ENV.fetch('PORT', 3000)

# Specifies the `environment` that Puma will run in.
#
Expand Down
336 changes: 336 additions & 0 deletions log/development.log

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
"@hotwired/turbo-rails": "^8.0.0-beta.1",
"@popperjs/core": "^2.11.8",
"bootstrap": "^5.3.2",
"esbuild": "^0.19.7"
"esbuild": "^0.19.8"
},
"scripts": {
"build:css": "sass app/javascript/stylesheets/application.scss app/assets/builds/application.css --no-source-map --load-path=node_modules",
"build": "esbuild app/javascript/*.* --bundle --sourcemap --outdir=app/assets/builds"
"build": "esbuild app/javascript/*.* --bundle --sourcemap --outdir=app/assets/builds --public-path=/assets"
}
}
Loading

0 comments on commit bcb343b

Please sign in to comment.