Skip to content

Commit ee1cf06

Browse files
authored
Rails 7 example (#1694)
* Use Rails 7 as default development version * Add new Rails 7 example app * Copy application logic from Rails 6 example
1 parent 9380fbc commit ee1cf06

File tree

93 files changed

+1574
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+1574
-1
lines changed

sentry-rails/Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ gemspec
55
gem "sentry-ruby", path: "../sentry-ruby"
66

77
rails_version = ENV["RAILS_VERSION"]
8-
rails_version = "6.1.0" if rails_version.nil?
8+
rails_version = "7.0.0" if rails_version.nil?
99
rails_version = Gem::Version.new(rails_version)
1010

1111
gem 'activerecord-jdbcmysql-adapter', platform: :jruby
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# See https://git-scm.com/docs/gitattributes for more about git attribute files.
2+
3+
# Mark the database schema as having been generated.
4+
db/schema.rb linguist-generated
5+
6+
# Mark any vendored files as having been vendored.
7+
vendor/* linguist-vendored
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
2+
#
3+
# If you find yourself ignoring temporary files generated by your text editor
4+
# or operating system, you probably want to add a global ignore instead:
5+
# git config --global core.excludesfile '~/.gitignore_global'
6+
7+
# Ignore bundler config.
8+
/.bundle
9+
10+
# Ignore the default SQLite database.
11+
/db/*.sqlite3
12+
/db/*.sqlite3-*
13+
14+
# Ignore all logfiles and tempfiles.
15+
/log/*
16+
/tmp/*
17+
!/log/.keep
18+
!/tmp/.keep
19+
20+
# Ignore pidfiles, but keep the directory.
21+
/tmp/pids/*
22+
!/tmp/pids/
23+
!/tmp/pids/.keep
24+
25+
# Ignore uploaded files in development.
26+
/storage/*
27+
!/storage/.keep
28+
/tmp/storage/*
29+
!/tmp/storage/
30+
!/tmp/storage/.keep
31+
32+
/public/assets
33+
34+
# Ignore master key for decrypting credentials and more.
35+
/config/master.key
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
source "https://rubygems.org"
2+
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
3+
4+
ruby "3.1.0"
5+
6+
# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
7+
gem "rails", "~> 7.0.1"
8+
9+
# The original asset pipeline for Rails [https://github.com/rails/sprockets-rails]
10+
gem "sprockets-rails"
11+
12+
# Use sqlite3 as the database for Active Record
13+
gem "sqlite3", "~> 1.4"
14+
15+
# Use the Puma web server [https://github.com/puma/puma]
16+
gem "puma", "~> 5.0"
17+
18+
# Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails]
19+
gem "importmap-rails"
20+
21+
# Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev]
22+
gem "turbo-rails"
23+
24+
# Hotwire's modest JavaScript framework [https://stimulus.hotwired.dev]
25+
gem "stimulus-rails"
26+
27+
# Build JSON APIs with ease [https://github.com/rails/jbuilder]
28+
gem "jbuilder"
29+
30+
# Use Redis adapter to run Action Cable in production
31+
# gem "redis", "~> 4.0"
32+
33+
# Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis]
34+
# gem "kredis"
35+
36+
# Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword]
37+
# gem "bcrypt", "~> 3.1.7"
38+
39+
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
40+
gem "tzinfo-data", platforms: %i[ mingw mswin x64_mingw jruby ]
41+
42+
# Reduces boot times through caching; required in config/boot.rb
43+
gem "bootsnap", require: false
44+
45+
gem 'sentry-ruby', path: "../../../sentry-ruby"
46+
gem 'sentry-sidekiq', path: "../../../sentry-sidekiq"
47+
gem 'sentry-resque', path: "../../../sentry-resque"
48+
gem 'sentry-delayed_job', path: "../../../sentry-delayed_job"
49+
gem 'sentry-rails', path: "../../"
50+
51+
gem "resque"
52+
gem "sidekiq"
53+
gem 'delayed_job_active_record'
54+
gem "daemons"
55+
56+
group :development, :test do
57+
gem 'pry'
58+
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
59+
gem "debug", platforms: %i[ mri mingw x64_mingw ]
60+
end
61+
62+
group :development do
63+
# Use console on exceptions pages [https://github.com/rails/web-console]
64+
gem "web-console"
65+
66+
# Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler]
67+
# gem "rack-mini-profiler"
68+
69+
# Speed up commands on slow machines / big apps [https://github.com/rails/spring]
70+
# gem "spring"
71+
end
72+
73+
group :test do
74+
# Use system testing [https://guides.rubyonrails.org/testing.html#system-testing]
75+
gem "capybara"
76+
gem "selenium-webdriver"
77+
gem "webdrivers"
78+
end
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# README
2+
3+
This README would normally document whatever steps are necessary to get the
4+
application up and running.
5+
6+
Things you may want to cover:
7+
8+
* Ruby version
9+
10+
* System dependencies
11+
12+
* Configuration
13+
14+
* Database creation
15+
16+
* Database initialization
17+
18+
* How to run the test suite
19+
20+
* Services (job queues, cache servers, search engines, etc.)
21+
22+
* Deployment instructions
23+
24+
* ...
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Add your own tasks in files placed in lib/tasks ending in .rake,
2+
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3+
4+
require_relative "config/application"
5+
6+
Rails.application.load_tasks
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
//= link_tree ../images
2+
//= link_directory ../stylesheets .css

sentry-rails/examples/rails-7.0/app/assets/images/.keep

Whitespace-only changes.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/*
2+
* This is a manifest file that'll be compiled into application.css, which will include all the files
3+
* listed below.
4+
*
5+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, or any plugin's
6+
* vendor/assets/stylesheets directory can be referenced here using a relative path.
7+
*
8+
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
9+
* compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
10+
* files in this directory. Styles in this file should be added after the last require_* statement.
11+
* It is generally better to create a new file per style scope.
12+
*
13+
*= require_tree .
14+
*= require_self
15+
*/
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// Place all the styles related to the posts controller here.
2+
// They will automatically be included in application.css.
3+
// You can use Sass (SCSS) here: http://sass-lang.com/

0 commit comments

Comments
 (0)