├── .browserslistrc ├── .circleci └── config.yml ├── .gitignore ├── .rspec ├── .ruby-version ├── CODE_OF_CONDUCT.md ├── Gemfile ├── Gemfile.lock ├── LICENSE ├── Procfile.dev ├── README.md ├── Rakefile ├── app ├── assets │ ├── builds │ │ └── .keep │ ├── config │ │ └── manifest.js │ ├── images │ │ └── logo.png │ └── stylesheets │ │ └── application.sass.scss ├── channels │ └── application_cable │ │ ├── channel.rb │ │ └── connection.rb ├── controllers │ ├── application_controller.rb │ ├── concerns │ │ └── .keep │ └── locations_controller.rb ├── helpers │ ├── application_helper.rb │ ├── locations_helper.rb │ └── organizations_helper.rb ├── javascript │ ├── application.js │ └── map.js ├── jobs │ └── application_job.rb ├── mailers │ └── application_mailer.rb ├── models │ ├── application_record.rb │ ├── concerns │ │ └── .keep │ ├── location.rb │ ├── organization.rb │ └── seeds │ │ └── organization.rb └── views │ ├── layouts │ ├── application.html.erb │ ├── mailer.html.erb │ └── mailer.text.erb │ └── locations │ ├── _description.html.erb │ ├── _location.json.jbuilder │ ├── index.html.erb │ └── index.json.jbuilder ├── babel.config.js ├── bin ├── bundle ├── dev ├── importmap ├── rails ├── rake ├── render-build.sh ├── setup ├── sort-orgs ├── update └── yarn ├── config.ru ├── config ├── application.rb ├── boot.rb ├── cable.yml ├── credentials.yml.enc ├── database.yml ├── environment.rb ├── environments │ ├── development.rb │ ├── production.rb │ └── test.rb ├── importmap.rb ├── initializers │ ├── application_controller_renderer.rb │ ├── assets.rb │ ├── backtrace_silencers.rb │ ├── content_security_policy.rb │ ├── cookies_serializer.rb │ ├── filter_parameter_logging.rb │ ├── geocoder.rb │ ├── inflections.rb │ ├── mime_types.rb │ ├── new_framework_defaults_6_1.rb │ ├── new_framework_defaults_7_0.rb │ ├── permissions_policy.rb │ └── wrap_parameters.rb ├── locales │ └── en.yml ├── puma.rb ├── routes.rb ├── spring.rb └── storage.yml ├── data └── seeds │ └── organizations.yml ├── db ├── migrate │ ├── 20190324164417_create_organizations.rb │ ├── 20190324164516_enable_postgis.rb │ ├── 20190324164517_create_locations.rb │ ├── 20190420081021_add_org_type_and_url_to_organization.rb │ └── 20190502144412_add_twitter_handle_to_organizations.rb ├── schema.rb └── seeds.rb ├── lib ├── assets │ └── .keep └── tasks │ ├── .keep │ ├── release.rake │ └── yamllint.rake ├── log └── .keep ├── package.json ├── postcss.config.js ├── public ├── 404.html ├── 422.html ├── 500.html ├── apple-touch-icon-precomposed.png ├── apple-touch-icon.png ├── favicon.ico └── robots.txt ├── render.yaml ├── spec ├── controllers │ └── locations_controller_spec.rb ├── factories │ ├── location_factory.rb │ └── organization_factory.rb ├── models │ ├── location_spec.rb │ └── seeds │ │ └── organization_spec.rb ├── rails_helper.rb ├── requests │ └── locations_spec.rb ├── spec_helper.rb └── support │ ├── factory_bot.rb │ └── utensils.rb ├── storage └── .keep ├── test ├── application_system_test_case.rb ├── controllers │ └── .keep ├── fixtures │ ├── .keep │ └── files │ │ └── .keep ├── helpers │ └── .keep ├── integration │ └── .keep ├── mailers │ └── .keep ├── models │ └── .keep ├── system │ └── .keep └── test_helper.rb ├── tmp └── .keep ├── vendor ├── .keep └── javascript │ └── .keep └── yarn.lock /.browserslistrc: -------------------------------------------------------------------------------- 1 | defaults 2 | -------------------------------------------------------------------------------- /.circleci/config.yml: -------------------------------------------------------------------------------- 1 | # Ruby CircleCI 2.0 configuration file 2 | # 3 | # Check https://circleci.com/docs/2.0/language-ruby/ for more details 4 | # 5 | version: 2 6 | jobs: 7 | build: 8 | docker: 9 | # specify the version you desire here 10 | - image: cimg/ruby:3.0.4 11 | environment: 12 | PGHOST: 127.0.0.1 13 | PGUSER: postgres 14 | RAILS_ENV: test 15 | GOOGLE_MAPS_API_KEY: XXXXXXXXXXXXX 16 | - image: mdillon/postgis:9.5 17 | env: 18 | - POSTGRES_USER=postgres 19 | - POSTGRES_DB=rubymap_test 20 | - POSTGRES_PASSWORD= 21 | 22 | working_directory: ~/repo 23 | 24 | steps: 25 | - checkout 26 | 27 | # Download and cache dependencies 28 | - restore_cache: 29 | keys: 30 | - v1-dependencies-{{ checksum "Gemfile.lock" }} 31 | # fallback to using the latest cache if no exact match is found 32 | - v1-dependencies- 33 | - run: 34 | name: Configure Bundler 35 | command: | 36 | echo 'export BUNDLER_VERSION=$(cat Gemfile.lock | tail -1 | tr -d " ")' >> $BASH_ENV 37 | source $BASH_ENV 38 | gem install bundler 39 | 40 | - run: 41 | name: install dependencies 42 | command: | 43 | bundle install --jobs=4 --retry=3 --path vendor/bundle 44 | 45 | - save_cache: 46 | paths: 47 | - ./vendor/bundle 48 | key: v1-dependencies-{{ checksum "Gemfile.lock" }} 49 | 50 | # Database setup 51 | - run: bundle exec rails db:create 52 | - run: bundle exec rails db:schema:load 53 | 54 | - run: 55 | name: run yaml lint 56 | command: bundle exec rake yamllint 57 | 58 | # run tests! 59 | - run: 60 | name: run tests 61 | command: | 62 | mkdir /tmp/test-results 63 | TEST_FILES="$(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)" 64 | 65 | bundle exec rspec --format progress \ 66 | --format RspecJunitFormatter \ 67 | --out /tmp/test-results/rspec.xml \ 68 | --format progress \ 69 | $TEST_FILES 70 | 71 | # collect reports 72 | - store_test_results: 73 | path: /tmp/test-results 74 | - store_artifacts: 75 | path: /tmp/test-results 76 | destination: test-results 77 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 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-journal 13 | 14 | # Ignore all logfiles and tempfiles. 15 | /log/* 16 | /tmp/* 17 | !/log/.keep 18 | !/tmp/.keep 19 | 20 | # Ignore uploaded files in development 21 | /storage/* 22 | !/storage/.keep 23 | 24 | /node_modules 25 | /yarn-error.log 26 | 27 | /public/assets 28 | .byebug_history 29 | 30 | # Ignore master key for decrypting credentials and more. 31 | /config/master.key 32 | 33 | /public/packs 34 | /public/packs-test 35 | /node_modules 36 | /yarn-error.log 37 | yarn-debug.log* 38 | .yarn-integrity 39 | 40 | .env* 41 | 42 | /app/assets/builds/* 43 | !/app/assets/builds/.keep 44 | -------------------------------------------------------------------------------- /.rspec: -------------------------------------------------------------------------------- 1 | --require spec_helper 2 | -------------------------------------------------------------------------------- /.ruby-version: -------------------------------------------------------------------------------- 1 | 3.1.3 2 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, sex characteristics, gender identity and expression, 9 | level of experience, education, socio-economic status, nationality, personal 10 | appearance, race, religion, or sexual identity and orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies within all project spaces, and it also applies when 49 | an individual is representing the project or its community in public spaces. 50 | Examples of representing a project or community include using an official 51 | project e-mail address, posting via an official social media account, or acting 52 | as an appointed representative at an online or offline event. Representation of 53 | a project may be further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at lewis@lewisbuckley.co.uk. All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 71 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html 72 | 73 | [homepage]: https://www.contributor-covenant.org 74 | 75 | For answers to common questions about this code of conduct, see 76 | https://www.contributor-covenant.org/faq 77 | 78 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | git_source(:github) { |repo| "https://github.com/#{repo}.git" } 3 | 4 | ruby "3.1.3" 5 | 6 | gem "rails", "~> 7" 7 | 8 | gem "active_hash" 9 | gem "activerecord-postgis-adapter" 10 | gem "geocoder" 11 | gem "jbuilder" 12 | gem "pg" 13 | gem "puma" 14 | gem "redis" 15 | gem "sentry-raven" 16 | gem "turbolinks", "~> 5" 17 | gem "yamllint" 18 | 19 | gem "importmap-rails" 20 | gem "cssbundling-rails" 21 | gem "sprockets-rails" 22 | 23 | group :development, :test do 24 | gem "byebug", platforms: [:mri, :mingw, :x64_mingw] 25 | gem "dotenv-rails" 26 | gem "factory_bot_rails" 27 | gem "rspec-rails" 28 | gem "standard" 29 | gem "listen" 30 | end 31 | 32 | group :development do 33 | gem "web-console", ">= 3.3.0" 34 | end 35 | 36 | group :test do 37 | gem "capybara", ">= 2.15" 38 | gem "launchy" 39 | gem "rails-controller-testing" 40 | gem "rspec_junit_formatter" 41 | gem "utensils", github: "balvig/utensils" 42 | end 43 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GIT 2 | remote: https://github.com/balvig/utensils.git 3 | revision: e56ba6ca0170f7ee29e84673ae40d2ea696ecbb7 4 | specs: 5 | utensils (5.0.0) 6 | launchy 7 | multi_json 8 | 9 | GEM 10 | remote: https://rubygems.org/ 11 | specs: 12 | actioncable (7.1.3) 13 | actionpack (= 7.1.3) 14 | activesupport (= 7.1.3) 15 | nio4r (~> 2.0) 16 | websocket-driver (>= 0.6.1) 17 | zeitwerk (~> 2.6) 18 | actionmailbox (7.1.3) 19 | actionpack (= 7.1.3) 20 | activejob (= 7.1.3) 21 | activerecord (= 7.1.3) 22 | activestorage (= 7.1.3) 23 | activesupport (= 7.1.3) 24 | mail (>= 2.7.1) 25 | net-imap 26 | net-pop 27 | net-smtp 28 | actionmailer (7.1.3) 29 | actionpack (= 7.1.3) 30 | actionview (= 7.1.3) 31 | activejob (= 7.1.3) 32 | activesupport (= 7.1.3) 33 | mail (~> 2.5, >= 2.5.4) 34 | net-imap 35 | net-pop 36 | net-smtp 37 | rails-dom-testing (~> 2.2) 38 | actionpack (7.1.3) 39 | actionview (= 7.1.3) 40 | activesupport (= 7.1.3) 41 | nokogiri (>= 1.8.5) 42 | racc 43 | rack (>= 2.2.4) 44 | rack-session (>= 1.0.1) 45 | rack-test (>= 0.6.3) 46 | rails-dom-testing (~> 2.2) 47 | rails-html-sanitizer (~> 1.6) 48 | actiontext (7.1.3) 49 | actionpack (= 7.1.3) 50 | activerecord (= 7.1.3) 51 | activestorage (= 7.1.3) 52 | activesupport (= 7.1.3) 53 | globalid (>= 0.6.0) 54 | nokogiri (>= 1.8.5) 55 | actionview (7.1.3) 56 | activesupport (= 7.1.3) 57 | builder (~> 3.1) 58 | erubi (~> 1.11) 59 | rails-dom-testing (~> 2.2) 60 | rails-html-sanitizer (~> 1.6) 61 | active_hash (3.2.1) 62 | activesupport (>= 5.0.0) 63 | activejob (7.1.3) 64 | activesupport (= 7.1.3) 65 | globalid (>= 0.3.6) 66 | activemodel (7.1.3) 67 | activesupport (= 7.1.3) 68 | activerecord (7.1.3) 69 | activemodel (= 7.1.3) 70 | activesupport (= 7.1.3) 71 | timeout (>= 0.4.0) 72 | activerecord-postgis-adapter (9.0.1) 73 | activerecord (~> 7.1.0) 74 | rgeo-activerecord (~> 7.0.0) 75 | activestorage (7.1.3) 76 | actionpack (= 7.1.3) 77 | activejob (= 7.1.3) 78 | activerecord (= 7.1.3) 79 | activesupport (= 7.1.3) 80 | marcel (~> 1.0) 81 | activesupport (7.1.3) 82 | base64 83 | bigdecimal 84 | concurrent-ruby (~> 1.0, >= 1.0.2) 85 | connection_pool (>= 2.2.5) 86 | drb 87 | i18n (>= 1.6, < 2) 88 | minitest (>= 5.1) 89 | mutex_m 90 | tzinfo (~> 2.0) 91 | addressable (2.8.6) 92 | public_suffix (>= 2.0.2, < 6.0) 93 | ast (2.4.2) 94 | base64 (0.2.0) 95 | bigdecimal (3.1.6) 96 | bindex (0.8.1) 97 | builder (3.2.4) 98 | byebug (11.1.3) 99 | capybara (3.40.0) 100 | addressable 101 | matrix 102 | mini_mime (>= 0.1.3) 103 | nokogiri (~> 1.11) 104 | rack (>= 1.6.0) 105 | rack-test (>= 0.6.3) 106 | regexp_parser (>= 1.5, < 3.0) 107 | xpath (~> 3.2) 108 | concurrent-ruby (1.2.3) 109 | connection_pool (2.4.1) 110 | crass (1.0.6) 111 | cssbundling-rails (1.4.0) 112 | railties (>= 6.0.0) 113 | date (3.3.4) 114 | diff-lcs (1.5.1) 115 | dotenv (2.8.1) 116 | dotenv-rails (2.8.1) 117 | dotenv (= 2.8.1) 118 | railties (>= 3.2) 119 | drb (2.2.0) 120 | ruby2_keywords 121 | erubi (1.12.0) 122 | factory_bot (6.4.6) 123 | activesupport (>= 5.0.0) 124 | factory_bot_rails (6.4.3) 125 | factory_bot (~> 6.4) 126 | railties (>= 5.0.0) 127 | faraday (2.9.0) 128 | faraday-net_http (>= 2.0, < 3.2) 129 | faraday-net_http (3.1.0) 130 | net-http 131 | ffi (1.16.3) 132 | geocoder (1.8.2) 133 | globalid (1.2.1) 134 | activesupport (>= 6.1) 135 | i18n (1.14.1) 136 | concurrent-ruby (~> 1.0) 137 | importmap-rails (2.0.1) 138 | actionpack (>= 6.0.0) 139 | activesupport (>= 6.0.0) 140 | railties (>= 6.0.0) 141 | io-console (0.7.2) 142 | irb (1.11.1) 143 | rdoc 144 | reline (>= 0.4.2) 145 | jbuilder (2.11.5) 146 | actionview (>= 5.0.0) 147 | activesupport (>= 5.0.0) 148 | json (2.7.1) 149 | language_server-protocol (3.17.0.3) 150 | launchy (2.5.2) 151 | addressable (~> 2.8) 152 | lint_roller (1.1.0) 153 | listen (3.8.0) 154 | rb-fsevent (~> 0.10, >= 0.10.3) 155 | rb-inotify (~> 0.9, >= 0.9.10) 156 | loofah (2.22.0) 157 | crass (~> 1.0.2) 158 | nokogiri (>= 1.12.0) 159 | mail (2.8.1) 160 | mini_mime (>= 0.1.1) 161 | net-imap 162 | net-pop 163 | net-smtp 164 | marcel (1.0.2) 165 | matrix (0.4.2) 166 | mini_mime (1.1.5) 167 | mini_portile2 (2.8.5) 168 | minitest (5.21.2) 169 | multi_json (1.15.0) 170 | mutex_m (0.2.0) 171 | net-http (0.4.1) 172 | uri 173 | net-imap (0.4.9.1) 174 | date 175 | net-protocol 176 | net-pop (0.1.2) 177 | net-protocol 178 | net-protocol (0.2.2) 179 | timeout 180 | net-smtp (0.4.0.1) 181 | net-protocol 182 | nio4r (2.7.0) 183 | nokogiri (1.16.1) 184 | mini_portile2 (~> 2.8.2) 185 | racc (~> 1.4) 186 | parallel (1.24.0) 187 | parser (3.3.0.5) 188 | ast (~> 2.4.1) 189 | racc 190 | pg (1.5.4) 191 | psych (5.1.2) 192 | stringio 193 | public_suffix (5.0.4) 194 | puma (6.4.2) 195 | nio4r (~> 2.0) 196 | racc (1.7.3) 197 | rack (3.0.9) 198 | rack-session (2.0.0) 199 | rack (>= 3.0.0) 200 | rack-test (2.1.0) 201 | rack (>= 1.3) 202 | rackup (2.1.0) 203 | rack (>= 3) 204 | webrick (~> 1.8) 205 | rails (7.1.3) 206 | actioncable (= 7.1.3) 207 | actionmailbox (= 7.1.3) 208 | actionmailer (= 7.1.3) 209 | actionpack (= 7.1.3) 210 | actiontext (= 7.1.3) 211 | actionview (= 7.1.3) 212 | activejob (= 7.1.3) 213 | activemodel (= 7.1.3) 214 | activerecord (= 7.1.3) 215 | activestorage (= 7.1.3) 216 | activesupport (= 7.1.3) 217 | bundler (>= 1.15.0) 218 | railties (= 7.1.3) 219 | rails-controller-testing (1.0.5) 220 | actionpack (>= 5.0.1.rc1) 221 | actionview (>= 5.0.1.rc1) 222 | activesupport (>= 5.0.1.rc1) 223 | rails-dom-testing (2.2.0) 224 | activesupport (>= 5.0.0) 225 | minitest 226 | nokogiri (>= 1.6) 227 | rails-html-sanitizer (1.6.0) 228 | loofah (~> 2.21) 229 | nokogiri (~> 1.14) 230 | railties (7.1.3) 231 | actionpack (= 7.1.3) 232 | activesupport (= 7.1.3) 233 | irb 234 | rackup (>= 1.0.0) 235 | rake (>= 12.2) 236 | thor (~> 1.0, >= 1.2.2) 237 | zeitwerk (~> 2.6) 238 | rainbow (3.1.1) 239 | rake (13.1.0) 240 | rb-fsevent (0.11.2) 241 | rb-inotify (0.10.1) 242 | ffi (~> 1.0) 243 | rdoc (6.6.2) 244 | psych (>= 4.0.0) 245 | redis (5.0.8) 246 | redis-client (>= 0.17.0) 247 | redis-client (0.19.1) 248 | connection_pool 249 | regexp_parser (2.9.0) 250 | reline (0.4.2) 251 | io-console (~> 0.5) 252 | rexml (3.2.6) 253 | rgeo (3.0.1) 254 | rgeo-activerecord (7.0.1) 255 | activerecord (>= 5.0) 256 | rgeo (>= 1.0.0) 257 | rspec-core (3.12.2) 258 | rspec-support (~> 3.12.0) 259 | rspec-expectations (3.12.3) 260 | diff-lcs (>= 1.2.0, < 2.0) 261 | rspec-support (~> 3.12.0) 262 | rspec-mocks (3.12.6) 263 | diff-lcs (>= 1.2.0, < 2.0) 264 | rspec-support (~> 3.12.0) 265 | rspec-rails (6.1.1) 266 | actionpack (>= 6.1) 267 | activesupport (>= 6.1) 268 | railties (>= 6.1) 269 | rspec-core (~> 3.12) 270 | rspec-expectations (~> 3.12) 271 | rspec-mocks (~> 3.12) 272 | rspec-support (~> 3.12) 273 | rspec-support (3.12.1) 274 | rspec_junit_formatter (0.6.0) 275 | rspec-core (>= 2, < 4, != 2.12.0) 276 | rubocop (1.59.0) 277 | json (~> 2.3) 278 | language_server-protocol (>= 3.17.0) 279 | parallel (~> 1.10) 280 | parser (>= 3.2.2.4) 281 | rainbow (>= 2.2.2, < 4.0) 282 | regexp_parser (>= 1.8, < 3.0) 283 | rexml (>= 3.2.5, < 4.0) 284 | rubocop-ast (>= 1.30.0, < 2.0) 285 | ruby-progressbar (~> 1.7) 286 | unicode-display_width (>= 2.4.0, < 3.0) 287 | rubocop-ast (1.30.0) 288 | parser (>= 3.2.1.0) 289 | rubocop-performance (1.20.2) 290 | rubocop (>= 1.48.1, < 2.0) 291 | rubocop-ast (>= 1.30.0, < 2.0) 292 | ruby-progressbar (1.13.0) 293 | ruby2_keywords (0.0.5) 294 | sentry-raven (3.1.2) 295 | faraday (>= 1.0) 296 | sprockets (4.2.1) 297 | concurrent-ruby (~> 1.0) 298 | rack (>= 2.2.4, < 4) 299 | sprockets-rails (3.4.2) 300 | actionpack (>= 5.2) 301 | activesupport (>= 5.2) 302 | sprockets (>= 3.0.0) 303 | standard (1.33.0) 304 | language_server-protocol (~> 3.17.0.2) 305 | lint_roller (~> 1.0) 306 | rubocop (~> 1.59.0) 307 | standard-custom (~> 1.0.0) 308 | standard-performance (~> 1.3) 309 | standard-custom (1.0.2) 310 | lint_roller (~> 1.0) 311 | rubocop (~> 1.50) 312 | standard-performance (1.3.1) 313 | lint_roller (~> 1.1) 314 | rubocop-performance (~> 1.20.2) 315 | stringio (3.1.0) 316 | thor (1.3.0) 317 | timeout (0.4.1) 318 | trollop (2.9.10) 319 | turbolinks (5.2.1) 320 | turbolinks-source (~> 5.2) 321 | turbolinks-source (5.2.0) 322 | tzinfo (2.0.6) 323 | concurrent-ruby (~> 1.0) 324 | unicode-display_width (2.5.0) 325 | uri (0.13.0) 326 | web-console (4.2.1) 327 | actionview (>= 6.0.0) 328 | activemodel (>= 6.0.0) 329 | bindex (>= 0.4.0) 330 | railties (>= 6.0.0) 331 | webrick (1.8.1) 332 | websocket-driver (0.7.6) 333 | websocket-extensions (>= 0.1.0) 334 | websocket-extensions (0.1.5) 335 | xpath (3.2.0) 336 | nokogiri (~> 1.8) 337 | yamllint (0.0.9) 338 | trollop (~> 2) 339 | zeitwerk (2.6.12) 340 | 341 | PLATFORMS 342 | ruby 343 | 344 | DEPENDENCIES 345 | active_hash 346 | activerecord-postgis-adapter 347 | byebug 348 | capybara (>= 2.15) 349 | cssbundling-rails 350 | dotenv-rails 351 | factory_bot_rails 352 | geocoder 353 | importmap-rails 354 | jbuilder 355 | launchy 356 | listen 357 | pg 358 | puma 359 | rails (~> 7) 360 | rails-controller-testing 361 | redis 362 | rspec-rails 363 | rspec_junit_formatter 364 | sentry-raven 365 | sprockets-rails 366 | standard 367 | turbolinks (~> 5) 368 | utensils! 369 | web-console (>= 3.3.0) 370 | yamllint 371 | 372 | RUBY VERSION 373 | ruby 3.1.3p185 374 | 375 | BUNDLED WITH 376 | 2.3.26 377 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Lewis Buckley 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Procfile.dev: -------------------------------------------------------------------------------- 1 | web: bin/rails server -p 3001 2 | css: yarn build:css --watch 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Ruby Map 2 | 3 | [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v1.4%20adopted-ff69b4.svg)](CODE_OF_CONDUCT.md) 4 | 5 | Whilst travelling to other cities I've often wondered: "What's going on in the local Ruby community?" 6 | To answer this question, hopefully fellow Rubyists will share their organization / meetup / events and anyone interested will be able to discover the Ruby world around them! 7 | Sometimes folks are interested in finding a new gig, in a new location. Ruby Map might be useful for that too, if companies share if they are hiring. 8 | 9 | ## Your company / meetup / event is missing? 10 | 11 | What if your company / meetup / event is missing on the map? No problem, just send us a PR and it will get added asap. 12 | An example PR can be found [here](https://github.com/lewispb/rubymap/pull/1). 13 | 14 | Please try to maintain the order-by-name of the yaml file, to prevent merge conflicts. 15 | 16 | ## Prerequisites 17 | 18 | ```bash 19 | brew install redis 20 | brew install postgres 21 | brew install postgis 22 | brew install geos 23 | ``` 24 | 25 | Add PostGIS to postgres 26 | 27 | ``` 28 | rake db:gis:setup 29 | ``` 30 | 31 | ### Development server 32 | 33 | ``` 34 | bin/dev 35 | ``` 36 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 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 7 | -------------------------------------------------------------------------------- /app/assets/builds/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lewispb/rubymap/80eec6e630542abe8b951041ee285cc8044d6296/app/assets/builds/.keep -------------------------------------------------------------------------------- /app/assets/config/manifest.js: -------------------------------------------------------------------------------- 1 | //= link_tree ../images 2 | //= link_tree ../builds 3 | //= link_tree ../../javascript .js 4 | //= link_tree ../../../vendor/javascript .js 5 | -------------------------------------------------------------------------------- /app/assets/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lewispb/rubymap/80eec6e630542abe8b951041ee285cc8044d6296/app/assets/images/logo.png -------------------------------------------------------------------------------- /app/assets/stylesheets/application.sass.scss: -------------------------------------------------------------------------------- 1 | $dark-red: #7a3130; 2 | 3 | html, body { 4 | height: 100%; 5 | margin: 0; 6 | padding: 0; 7 | } 8 | 9 | a { 10 | color: $dark-red; 11 | &:hover { 12 | text-decoration-style: dashed; 13 | } 14 | } 15 | 16 | .navigation { 17 | height: 50px; 18 | width: 100%; 19 | display: block; 20 | background: $dark-red; 21 | img { 22 | max-height: 50px; 23 | padding: 0 10px; 24 | } 25 | #about { 26 | float: right; 27 | color: #fff; 28 | padding: 1rem; 29 | font-family: sans-serif; 30 | } 31 | } 32 | 33 | .map-container { 34 | position: absolute; 35 | top: 50px; 36 | bottom: 0; 37 | width: 100%; 38 | .map { 39 | height: 100%; 40 | 41 | .location-description { 42 | min-height: 100px; 43 | h1 { 44 | line-height: 1.3rem; 45 | } 46 | a { 47 | font-weight: normal; 48 | font-size: 1rem; 49 | word-break: break-all; 50 | } 51 | } 52 | } 53 | } 54 | 55 | // Modal 56 | 57 | .modal { 58 | font-family: -apple-system,BlinkMacSystemFont,avenir next,avenir,helvetica neue,helvetica,ubuntu,roboto,noto,segoe ui,arial,sans-serif; 59 | } 60 | 61 | .modal__overlay { 62 | position: fixed; 63 | top: 0; 64 | left: 0; 65 | right: 0; 66 | bottom: 0; 67 | background: rgba(0,0,0,0.6); 68 | display: flex; 69 | justify-content: center; 70 | align-items: center; 71 | } 72 | 73 | .modal__container { 74 | background-color: #fff; 75 | padding: 30px; 76 | max-width: 500px; 77 | max-height: 100vh; 78 | border-radius: 4px; 79 | overflow-y: auto; 80 | box-sizing: border-box; 81 | } 82 | 83 | .modal__header { 84 | display: flex; 85 | justify-content: space-between; 86 | align-items: center; 87 | } 88 | 89 | .modal__title { 90 | margin-top: 0; 91 | margin-bottom: 0; 92 | font-weight: 600; 93 | font-size: 1.25rem; 94 | line-height: 1.25; 95 | color: $dark-red; 96 | box-sizing: border-box; 97 | } 98 | 99 | .modal__close { 100 | background: transparent; 101 | border: 0; 102 | } 103 | 104 | .modal__header .modal__close:before { content: "\2715"; } 105 | 106 | .modal__content { 107 | margin-top: 2rem; 108 | margin-bottom: 2rem; 109 | line-height: 1.5; 110 | color: rgba(0,0,0,.8); 111 | } 112 | 113 | .modal__btn { 114 | font-size: .875rem; 115 | padding-left: 1rem; 116 | padding-right: 1rem; 117 | padding-top: .5rem; 118 | padding-bottom: .5rem; 119 | background-color: #e6e6e6; 120 | color: rgba(0,0,0,.8); 121 | border-radius: .25rem; 122 | border-style: none; 123 | border-width: 0; 124 | cursor: pointer; 125 | -webkit-appearance: button; 126 | text-transform: none; 127 | overflow: visible; 128 | line-height: 1.15; 129 | margin: 0; 130 | will-change: transform; 131 | -moz-osx-font-smoothing: grayscale; 132 | -webkit-backface-visibility: hidden; 133 | backface-visibility: hidden; 134 | -webkit-transform: translateZ(0); 135 | transform: translateZ(0); 136 | transition: -webkit-transform .25s ease-out; 137 | transition: transform .25s ease-out; 138 | transition: transform .25s ease-out,-webkit-transform .25s ease-out; 139 | } 140 | 141 | .modal__btn:focus, .modal__btn:hover { 142 | -webkit-transform: scale(1.05); 143 | transform: scale(1.05); 144 | } 145 | 146 | .modal__btn-primary { 147 | background-color: #00449e; 148 | color: #fff; 149 | } 150 | 151 | 152 | 153 | /**************************\ 154 | Demo Animation Style 155 | \**************************/ 156 | @keyframes mmfadeIn { 157 | from { opacity: 0; } 158 | to { opacity: 1; } 159 | } 160 | 161 | @keyframes mmfadeOut { 162 | from { opacity: 1; } 163 | to { opacity: 0; } 164 | } 165 | 166 | @keyframes mmslideIn { 167 | from { transform: translateY(15%); } 168 | to { transform: translateY(0); } 169 | } 170 | 171 | @keyframes mmslideOut { 172 | from { transform: translateY(0); } 173 | to { transform: translateY(-10%); } 174 | } 175 | 176 | .micromodal-slide { 177 | display: none; 178 | } 179 | 180 | .micromodal-slide.is-open { 181 | display: block; 182 | } 183 | 184 | .micromodal-slide[aria-hidden="false"] .modal__overlay { 185 | animation: mmfadeIn .3s cubic-bezier(0.0, 0.0, 0.2, 1); 186 | } 187 | 188 | .micromodal-slide[aria-hidden="false"] .modal__container { 189 | animation: mmslideIn .3s cubic-bezier(0, 0, .2, 1); 190 | } 191 | 192 | .micromodal-slide[aria-hidden="true"] .modal__overlay { 193 | animation: mmfadeOut .3s cubic-bezier(0.0, 0.0, 0.2, 1); 194 | } 195 | 196 | .micromodal-slide[aria-hidden="true"] .modal__container { 197 | animation: mmslideOut .3s cubic-bezier(0, 0, .2, 1); 198 | } 199 | 200 | .micromodal-slide .modal__container, 201 | .micromodal-slide .modal__overlay { 202 | will-change: transform; 203 | } 204 | -------------------------------------------------------------------------------- /app/channels/application_cable/channel.rb: -------------------------------------------------------------------------------- 1 | module ApplicationCable 2 | class Channel < ActionCable::Channel::Base 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /app/channels/application_cable/connection.rb: -------------------------------------------------------------------------------- 1 | module ApplicationCable 2 | class Connection < ActionCable::Connection::Base 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /app/controllers/application_controller.rb: -------------------------------------------------------------------------------- 1 | class ApplicationController < ActionController::Base 2 | end 3 | -------------------------------------------------------------------------------- /app/controllers/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lewispb/rubymap/80eec6e630542abe8b951041ee285cc8044d6296/app/controllers/concerns/.keep -------------------------------------------------------------------------------- /app/controllers/locations_controller.rb: -------------------------------------------------------------------------------- 1 | class LocationsController < ApplicationController 2 | def index 3 | @locations = Location.includes(:organization).all 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /app/helpers/application_helper.rb: -------------------------------------------------------------------------------- 1 | module ApplicationHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/locations_helper.rb: -------------------------------------------------------------------------------- 1 | module LocationsHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/organizations_helper.rb: -------------------------------------------------------------------------------- 1 | module OrganizationsHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/javascript/application.js: -------------------------------------------------------------------------------- 1 | import MicroModal from "micromodal" 2 | 3 | MicroModal.init(); 4 | -------------------------------------------------------------------------------- /app/javascript/map.js: -------------------------------------------------------------------------------- 1 | function initMap() { 2 | map = new google.maps.Map(document.querySelector('.map'), { 3 | center: { 4 | lat: 51.454514, 5 | lng: -2.587910 6 | }, 7 | zoom: 6 8 | }) 9 | 10 | var infowindow = new google.maps.InfoWindow(); 11 | 12 | // Try HTML5 geolocation. 13 | if (navigator.geolocation) { 14 | navigator.geolocation.getCurrentPosition(function(position) { 15 | var pos = { 16 | lat: position.coords.latitude, 17 | lng: position.coords.longitude 18 | }; 19 | map.setCenter(pos); 20 | }, function(e) { 21 | console.log(e); 22 | }); 23 | } else { 24 | // Browser doesn't support Geolocation 25 | } 26 | 27 | map.data.loadGeoJson("locations.json"); 28 | map.data.addListener("click", function(event) { 29 | var descriptionHtml = event.feature.getProperty("description"); 30 | infowindow.setContent(descriptionHtml); 31 | infowindow.setPosition(event.feature.getGeometry().get()); 32 | infowindow.setOptions({pixelOffset: new google.maps.Size(0,-30)}); 33 | infowindow.open(map); 34 | }); 35 | } 36 | -------------------------------------------------------------------------------- /app/jobs/application_job.rb: -------------------------------------------------------------------------------- 1 | class ApplicationJob < ActiveJob::Base 2 | end 3 | -------------------------------------------------------------------------------- /app/mailers/application_mailer.rb: -------------------------------------------------------------------------------- 1 | class ApplicationMailer < ActionMailer::Base 2 | default from: "from@example.com" 3 | layout "mailer" 4 | end 5 | -------------------------------------------------------------------------------- /app/models/application_record.rb: -------------------------------------------------------------------------------- 1 | class ApplicationRecord < ActiveRecord::Base 2 | self.abstract_class = true 3 | end 4 | -------------------------------------------------------------------------------- /app/models/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lewispb/rubymap/80eec6e630542abe8b951041ee285cc8044d6296/app/models/concerns/.keep -------------------------------------------------------------------------------- /app/models/location.rb: -------------------------------------------------------------------------------- 1 | class Location < ApplicationRecord 2 | belongs_to :organization 3 | validates :coords, presence: true 4 | 5 | before_validation :geocode_address 6 | 7 | def self.import(organization:, address:) 8 | new(organization: organization, address: address).save! 9 | end 10 | 11 | private 12 | 13 | def geocode_address 14 | return if geocoded_coords.blank? 15 | 16 | self.coords = "SRID=4326;POINT(#{geocoded_coords_with_entropy.join(" ")})" 17 | end 18 | 19 | def geocoded_coords_with_entropy 20 | [geocoded_coords[0].round(5) + rand(0.0001..0.0009), geocoded_coords[1]] 21 | end 22 | 23 | def geocoded_coords 24 | @_geocoded_coords ||= Geocoder.search(address).first&.coordinates&.reverse 25 | end 26 | end 27 | -------------------------------------------------------------------------------- /app/models/organization.rb: -------------------------------------------------------------------------------- 1 | class Organization < ApplicationRecord 2 | validates :name, presence: true 3 | enum org_type: { business: :business, meetup: :meetup, event: :event } 4 | end 5 | -------------------------------------------------------------------------------- /app/models/seeds/organization.rb: -------------------------------------------------------------------------------- 1 | module Seeds 2 | class Organization < ActiveYaml::Base 3 | set_root_path "data" 4 | 5 | def self.import 6 | all.each(&:import) 7 | end 8 | 9 | def import 10 | locations.each do |location| 11 | Location.import(organization: organization, address: location["address"]) 12 | end 13 | end 14 | 15 | private 16 | 17 | def organization 18 | @_organization ||= ::Organization.create!(name: name) do |organization| 19 | organization.org_type = type 20 | organization.url = url 21 | organization.twitter_handle = twitter_handle 22 | end 23 | end 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /app/views/layouts/application.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Ruby Map 5 | <%= csrf_meta_tags %> 6 | <%= csp_meta_tag %> 7 | 8 | <%= stylesheet_link_tag "application" %> 9 | <%= javascript_include_tag "map" %> 10 | 11 | 12 | <%= javascript_importmap_tags %> 13 | 14 | 15 | 16 | 22 | 23 | <%= yield %> 24 | 25 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /app/views/layouts/mailer.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | <%= yield %> 12 | 13 | 14 | -------------------------------------------------------------------------------- /app/views/layouts/mailer.text.erb: -------------------------------------------------------------------------------- 1 | <%= yield %> 2 | -------------------------------------------------------------------------------- /app/views/locations/_description.html.erb: -------------------------------------------------------------------------------- 1 |
2 |

<%= link_to location.organization.name, location.organization.url %>

3 |

<%= location.address %>

4 |
-------------------------------------------------------------------------------- /app/views/locations/_location.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.type "Feature" 2 | json.geometry do 3 | json.type "Point" 4 | json.coordinates location.coords.coordinates 5 | end 6 | json.properties do 7 | json.description render partial: 'description', formats: [:html], locals: { location: location } 8 | end 9 | -------------------------------------------------------------------------------- /app/views/locations/index.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 |
-------------------------------------------------------------------------------- /app/views/locations/index.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.type -"FeatureCollection" 2 | json.features @locations do |location| 3 | json.cache! location do 4 | json.partial! "location", location: location 5 | end 6 | end -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = function(api) { 2 | var validEnv = ['development', 'test', 'production'] 3 | var currentEnv = api.env() 4 | var isDevelopmentEnv = api.env('development') 5 | var isProductionEnv = api.env('production') 6 | var isTestEnv = api.env('test') 7 | 8 | if (!validEnv.includes(currentEnv)) { 9 | throw new Error( 10 | 'Please specify a valid `NODE_ENV` or ' + 11 | '`BABEL_ENV` environment variables. Valid values are "development", ' + 12 | '"test", and "production". Instead, received: ' + 13 | JSON.stringify(currentEnv) + 14 | '.' 15 | ) 16 | } 17 | 18 | return { 19 | presets: [ 20 | isTestEnv && [ 21 | '@babel/preset-env', 22 | { 23 | targets: { 24 | node: 'current' 25 | } 26 | } 27 | ], 28 | (isProductionEnv || isDevelopmentEnv) && [ 29 | '@babel/preset-env', 30 | { 31 | forceAllTransforms: true, 32 | useBuiltIns: 'entry', 33 | corejs: 3, 34 | modules: false, 35 | exclude: ['transform-typeof-symbol'] 36 | } 37 | ] 38 | ].filter(Boolean), 39 | plugins: [ 40 | 'babel-plugin-macros', 41 | '@babel/plugin-syntax-dynamic-import', 42 | isTestEnv && 'babel-plugin-dynamic-import-node', 43 | '@babel/plugin-transform-destructuring', 44 | [ 45 | '@babel/plugin-proposal-class-properties', 46 | { 47 | loose: true 48 | } 49 | ], 50 | [ 51 | '@babel/plugin-proposal-object-rest-spread', 52 | { 53 | useBuiltIns: true 54 | } 55 | ], 56 | [ 57 | '@babel/plugin-transform-runtime', 58 | { 59 | helpers: false, 60 | regenerator: true, 61 | corejs: false 62 | } 63 | ], 64 | [ 65 | '@babel/plugin-transform-regenerator', 66 | { 67 | async: false 68 | } 69 | ] 70 | ].filter(Boolean) 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /bin/bundle: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) 3 | load Gem.bin_path('bundler', 'bundle') 4 | -------------------------------------------------------------------------------- /bin/dev: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | if ! foreman version &> /dev/null 4 | then 5 | echo "Installing foreman..." 6 | gem install foreman 7 | fi 8 | 9 | foreman start -f Procfile.dev "$@" 10 | -------------------------------------------------------------------------------- /bin/importmap: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | require_relative "../config/application" 4 | require "importmap/commands" 5 | -------------------------------------------------------------------------------- /bin/rails: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | APP_PATH = File.expand_path("../config/application", __dir__) 3 | require_relative "../config/boot" 4 | require "rails/commands" 5 | -------------------------------------------------------------------------------- /bin/rake: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require_relative "../config/boot" 3 | require "rake" 4 | Rake.application.run 5 | -------------------------------------------------------------------------------- /bin/render-build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # exit on error 3 | set -o errexit 4 | 5 | bundle install 6 | bundle exec rake assets:precompile 7 | bundle exec rake assets:clean 8 | bundle exec rake db:migrate 9 | bundle exec rake db:seed 10 | -------------------------------------------------------------------------------- /bin/setup: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require "fileutils" 3 | 4 | # path to your application root. 5 | APP_ROOT = File.expand_path("..", __dir__) 6 | 7 | def system!(*args) 8 | system(*args) || abort("\n== Command #{args} failed ==") 9 | end 10 | 11 | FileUtils.chdir APP_ROOT do 12 | # This script is a way to set up or update your development environment automatically. 13 | # This script is idempotent, so that you can run it at any time and get an expectable outcome. 14 | # Add necessary setup steps to this file. 15 | 16 | puts "== Installing dependencies ==" 17 | system! "gem install bundler --conservative" 18 | system("bundle check") || system!("bundle install") 19 | 20 | # puts "\n== Copying sample files ==" 21 | # unless File.exist?("config/database.yml") 22 | # FileUtils.cp "config/database.yml.sample", "config/database.yml" 23 | # end 24 | 25 | puts "\n== Preparing database ==" 26 | system! "bin/rails db:prepare" 27 | 28 | puts "\n== Removing old logs and tempfiles ==" 29 | system! "bin/rails log:clear tmp:clear" 30 | 31 | puts "\n== Restarting application server ==" 32 | system! "bin/rails restart" 33 | end 34 | -------------------------------------------------------------------------------- /bin/sort-orgs: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | # Replaces the organizations.yml file with its data sorted by name, case insensitively. 4 | # Before overwriting the file, tests that the unsorted and sorted data, 5 | # converted to sets, are equal. 6 | 7 | require 'set' 8 | require 'yaml' 9 | 10 | def orgs_filespec 11 | @orgs_filespec ||= begin 12 | project_root = File.expand_path(File.join(File.dirname(__FILE__), '..')) 13 | File.join(project_root, 'data', 'seeds', 'organizations.yml') 14 | end 15 | end 16 | 17 | 18 | def test(unsorted, sorted) 19 | if Set.new(unsorted) != Set.new(sorted) 20 | raise "Sort corrupted the data." 21 | end 22 | end 23 | 24 | 25 | def sort_orgs_case_insensitively(orgs) 26 | orgs.sort { |org1, org2| org1['name'].casecmp(org2['name']) } 27 | end 28 | 29 | 30 | def main 31 | orgs = YAML.load_file(orgs_filespec) 32 | sorted_orgs = sort_orgs_case_insensitively(orgs) 33 | 34 | if orgs == sorted_orgs 35 | puts "File was already sorted. No need to overwrite." 36 | exit(0) 37 | else 38 | 39 | # Enable this line to verify that the test that tests for data corruption works: 40 | # sorted_orgs.pop 41 | 42 | test(orgs, sorted_orgs) 43 | File.write(orgs_filespec, sorted_orgs.to_yaml) 44 | puts "Organizations file sort successful." 45 | end 46 | end 47 | 48 | 49 | main 50 | -------------------------------------------------------------------------------- /bin/update: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require 'fileutils' 3 | include FileUtils 4 | 5 | # path to your application root. 6 | APP_ROOT = File.expand_path('..', __dir__) 7 | 8 | def system!(*args) 9 | system(*args) || abort("\n== Command #{args} failed ==") 10 | end 11 | 12 | chdir APP_ROOT do 13 | # This script is a way to update your development environment automatically. 14 | # Add necessary update steps to this file. 15 | 16 | puts '== Installing dependencies ==' 17 | system! 'gem install bundler --conservative' 18 | system('bundle check') || system!('bundle install') 19 | 20 | # Install JavaScript dependencies if using Yarn 21 | # system('bin/yarn') 22 | 23 | puts "\n== Updating database ==" 24 | system! 'bin/rails db:migrate' 25 | 26 | puts "\n== Removing old logs and tempfiles ==" 27 | system! 'bin/rails log:clear tmp:clear' 28 | 29 | puts "\n== Restarting application server ==" 30 | system! 'bin/rails restart' 31 | end 32 | -------------------------------------------------------------------------------- /bin/yarn: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | APP_ROOT = File.expand_path('..', __dir__) 3 | Dir.chdir(APP_ROOT) do 4 | yarn = ENV["PATH"].split(File::PATH_SEPARATOR). 5 | select { |dir| File.expand_path(dir) != __dir__ }. 6 | product(["yarn", "yarn.cmd", "yarn.ps1"]). 7 | map { |dir, file| File.expand_path(file, dir) }. 8 | find { |file| File.executable?(file) } 9 | 10 | if yarn 11 | exec yarn, *ARGV 12 | else 13 | $stderr.puts "Yarn executable was not detected in the system." 14 | $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install" 15 | exit 1 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /config.ru: -------------------------------------------------------------------------------- 1 | # This file is used by Rack-based servers to start the application. 2 | 3 | require_relative "config/environment" 4 | 5 | run Rails.application 6 | Rails.application.load_server 7 | -------------------------------------------------------------------------------- /config/application.rb: -------------------------------------------------------------------------------- 1 | require_relative "boot" 2 | 3 | require "rails/all" 4 | 5 | # Require the gems listed in Gemfile, including any gems 6 | # you've limited to :test, :development, or :production. 7 | Bundler.require(*Rails.groups) 8 | 9 | module Rubymap 10 | class Application < Rails::Application 11 | # Initialize configuration defaults for originally generated Rails version. 12 | config.load_defaults 7.0 13 | 14 | config.legacy_connection_handling = false 15 | # Configuration for the application, engines, and railties goes here. 16 | # 17 | # These settings can be overridden in specific environments using the files 18 | # in config/environments, which are processed later. 19 | # 20 | # config.time_zone = "Central Time (US & Canada)" 21 | # config.eager_load_paths << Rails.root.join("extras") 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /config/boot.rb: -------------------------------------------------------------------------------- 1 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) 2 | 3 | require "bundler/setup" # Set up gems listed in the Gemfile. 4 | -------------------------------------------------------------------------------- /config/cable.yml: -------------------------------------------------------------------------------- 1 | development: 2 | adapter: async 3 | 4 | test: 5 | adapter: test 6 | 7 | production: 8 | adapter: redis 9 | url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %> 10 | channel_prefix: rubymap_production 11 | -------------------------------------------------------------------------------- /config/credentials.yml.enc: -------------------------------------------------------------------------------- 1 | UbnbIH9HvtzZNyL1i5rEnUhqlv3S1yXQCxa41C2lXYR2DCaFBIe11t+LR243E8e1+9GhO3M0GHholBfaopqd2RbPEf+UIz6hrDk7sUK/S4Upow2zYZv4qHCgyvNVV1K0EK2j93ZKQohM8s8OKYDT2litA7yU3Y0gK4+NX/+sb5kj2+fAHM7y3wrJCHu/e/l0k7qiKmxh2u7bAL+uf6vNCB2sDbwUy8Nv5bqXgJY12RERVKQyrOVg37t0zlJZRh9sT8OfoVYAK7eHSeC61NOqek3Opy41b5/XD6smAGcT8RNzs13ombQmEU6VoYgsc1p/Ax8mtxwSeSaiaASMEdFcDAv5askd3wbgrsFPLoe8J+XmzSewblAmiuMxML1bzHNuLnwJs+EEN2a4+pKqVw4+ZlCfwNTfg7eCGXDm--+t6XL7ZuuqOH3IMP--APwtaEl6CaTf9tA+GSENkw== -------------------------------------------------------------------------------- /config/database.yml: -------------------------------------------------------------------------------- 1 | # SQLite version 3.x 2 | # gem install sqlite3 3 | # 4 | # Ensure the SQLite 3 gem is defined in your Gemfile 5 | # gem 'sqlite3' 6 | # 7 | default: &default 8 | adapter: postgis 9 | pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> 10 | timeout: 5000 11 | 12 | development: 13 | <<: *default 14 | database: rubymap_development 15 | 16 | test: 17 | <<: *default 18 | database: rubymap_test 19 | user: <%= ENV.fetch("PGUSER") { "" } %> 20 | 21 | production: 22 | url: <%= ENV['DATABASE_URL']&.sub(/^postgres/, "postgis") %> 23 | -------------------------------------------------------------------------------- /config/environment.rb: -------------------------------------------------------------------------------- 1 | # Load the Rails application. 2 | require_relative "application" 3 | 4 | # Initialize the Rails application. 5 | Rails.application.initialize! 6 | -------------------------------------------------------------------------------- /config/environments/development.rb: -------------------------------------------------------------------------------- 1 | Rails.application.configure do 2 | # Settings specified here will take precedence over those in config/application.rb. 3 | 4 | # In the development environment your application's code is reloaded on 5 | # every request. This slows down response time but is perfect for development 6 | # since you don't have to restart the web server when you make code changes. 7 | config.cache_classes = false 8 | 9 | # Do not eager load code on boot. 10 | config.eager_load = false 11 | 12 | # Show full error reports. 13 | config.consider_all_requests_local = true 14 | 15 | # Enable/disable caching. By default caching is disabled. 16 | # Run rails dev:cache to toggle caching. 17 | if Rails.root.join("tmp", "caching-dev.txt").exist? 18 | config.action_controller.perform_caching = true 19 | 20 | config.cache_store = :redis_cache_store 21 | config.public_file_server.headers = { 22 | "Cache-Control" => "public, max-age=#{2.days.to_i}", 23 | } 24 | else 25 | config.action_controller.perform_caching = false 26 | 27 | config.cache_store = :null_store 28 | end 29 | 30 | # Store uploaded files on the local file system (see config/storage.yml for options) 31 | config.active_storage.service = :local 32 | 33 | # Don't care if the mailer can't send. 34 | config.action_mailer.raise_delivery_errors = false 35 | 36 | config.action_mailer.perform_caching = false 37 | 38 | # Print deprecation notices to the Rails logger. 39 | config.active_support.deprecation = :log 40 | 41 | # Raise an error on page load if there are pending migrations. 42 | config.active_record.migration_error = :page_load 43 | 44 | # Highlight code that triggered database queries in logs. 45 | config.active_record.verbose_query_logs = true 46 | 47 | # Debug mode disables concatenation and preprocessing of assets. 48 | # This option may cause significant delays in view rendering with a large 49 | # number of complex assets. 50 | config.assets.debug = true 51 | 52 | # Suppress logger output for asset requests. 53 | config.assets.quiet = true 54 | 55 | # Raises error for missing translations 56 | # config.action_view.raise_on_missing_translations = true 57 | 58 | # Use an evented file watcher to asynchronously detect changes in source code, 59 | # routes, locales, etc. This feature depends on the listen gem. 60 | config.file_watcher = ActiveSupport::EventedFileUpdateChecker 61 | end 62 | -------------------------------------------------------------------------------- /config/environments/production.rb: -------------------------------------------------------------------------------- 1 | Rails.application.configure do 2 | # Settings specified here will take precedence over those in config/application.rb. 3 | 4 | # Code is not reloaded between requests. 5 | config.cache_classes = true 6 | 7 | # Eager load code on boot. This eager loads most of Rails and 8 | # your application in memory, allowing both threaded web servers 9 | # and those relying on copy on write to perform better. 10 | # Rake tasks automatically ignore this option for performance. 11 | config.eager_load = true 12 | 13 | # Full error reports are disabled and caching is turned on. 14 | config.consider_all_requests_local = false 15 | config.action_controller.perform_caching = true 16 | 17 | # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"] 18 | # or in config/master.key. This key is used to decrypt credentials (and other encrypted files). 19 | # config.require_master_key = true 20 | 21 | # Disable serving static files from the `/public` folder by default since 22 | # Apache or NGINX already handles this. 23 | config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present? 24 | 25 | # Compress JavaScripts and CSS. 26 | # config.assets.js_compressor = :uglifier 27 | # config.assets.css_compressor = :sass 28 | 29 | # Do not fallback to assets pipeline if a precompiled asset is missed. 30 | config.assets.compile = false 31 | 32 | # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb 33 | 34 | # Enable serving of images, stylesheets, and JavaScripts from an asset server. 35 | # config.action_controller.asset_host = 'http://assets.example.com' 36 | 37 | # Specifies the header that your server uses for sending files. 38 | # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache 39 | # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX 40 | 41 | # Store uploaded files on the local file system (see config/storage.yml for options) 42 | config.active_storage.service = :local 43 | 44 | # Mount Action Cable outside main process or domain 45 | # config.action_cable.mount_path = nil 46 | # config.action_cable.url = 'wss://example.com/cable' 47 | # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ] 48 | 49 | # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. 50 | # config.force_ssl = true 51 | 52 | config.cache_store = :redis_cache_store 53 | 54 | # Use a real queuing backend for Active Job (and separate queues per environment) 55 | # config.active_job.queue_adapter = :resque 56 | # config.active_job.queue_name_prefix = "rubymap_#{Rails.env}" 57 | 58 | config.action_mailer.perform_caching = false 59 | 60 | # Ignore bad email addresses and do not raise email delivery errors. 61 | # Set this to true and configure the email server for immediate delivery to raise delivery errors. 62 | # config.action_mailer.raise_delivery_errors = false 63 | 64 | # Enable locale fallbacks for I18n (makes lookups for any locale fall back to 65 | # the I18n.default_locale when a translation cannot be found). 66 | config.i18n.fallbacks = true 67 | 68 | # Send deprecation notices to registered listeners. 69 | config.active_support.deprecation = :notify 70 | 71 | 72 | # Use a different logger for distributed setups. 73 | # require 'syslog/logger' 74 | # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name') 75 | 76 | $stdout.sync = true 77 | # Use default logging formatter so that PID and timestamp are not suppressed. 78 | config.log_formatter = ::Logger::Formatter.new 79 | config.log_level = :debug 80 | config.logger = ActiveSupport::TaggedLogging.new(Logger.new($stdout)) 81 | 82 | # Do not dump schema after migrations. 83 | config.active_record.dump_schema_after_migration = false 84 | end 85 | -------------------------------------------------------------------------------- /config/environments/test.rb: -------------------------------------------------------------------------------- 1 | Rails.application.configure do 2 | # Settings specified here will take precedence over those in config/application.rb. 3 | 4 | # The test environment is used exclusively to run your application's 5 | # test suite. You never need to work with it otherwise. Remember that 6 | # your test database is "scratch space" for the test suite and is wiped 7 | # and recreated between test runs. Don't rely on the data there! 8 | config.cache_classes = true 9 | 10 | # Do not eager load code on boot. This avoids loading your whole application 11 | # just for the purpose of running a single test. If you are using a tool that 12 | # preloads Rails for running tests, you may have to set it to true. 13 | config.eager_load = false 14 | 15 | # Configure public file server for tests with Cache-Control for performance. 16 | config.public_file_server.enabled = true 17 | config.public_file_server.headers = { 18 | "Cache-Control" => "public, max-age=#{1.hour.to_i}", 19 | } 20 | 21 | # Show full error reports and disable caching. 22 | config.consider_all_requests_local = true 23 | config.action_controller.perform_caching = false 24 | 25 | # Raise exceptions instead of rendering exception templates. 26 | config.action_dispatch.show_exceptions = false 27 | 28 | # Disable request forgery protection in test environment. 29 | config.action_controller.allow_forgery_protection = false 30 | 31 | # Store uploaded files on the local file system in a temporary directory 32 | config.active_storage.service = :test 33 | 34 | config.action_mailer.perform_caching = false 35 | 36 | # Tell Action Mailer not to deliver emails to the real world. 37 | # The :test delivery method accumulates sent emails in the 38 | # ActionMailer::Base.deliveries array. 39 | config.action_mailer.delivery_method = :test 40 | 41 | # Print deprecation notices to the stderr. 42 | config.active_support.deprecation = :stderr 43 | 44 | # Raises error for missing translations 45 | # config.action_view.raise_on_missing_translations = true 46 | end 47 | -------------------------------------------------------------------------------- /config/importmap.rb: -------------------------------------------------------------------------------- 1 | # Pin npm packages by running ./bin/importmap 2 | 3 | pin "application", preload: true 4 | pin "micromodal", to: "https://cdn.jsdelivr.net/gh/ghosh/Micromodal/lib/src/index.js" 5 | -------------------------------------------------------------------------------- /config/initializers/application_controller_renderer.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # ActiveSupport::Reloader.to_prepare do 4 | # ApplicationController.renderer.defaults.merge!( 5 | # http_host: 'example.org', 6 | # https: false 7 | # ) 8 | # end 9 | -------------------------------------------------------------------------------- /config/initializers/assets.rb: -------------------------------------------------------------------------------- 1 | module Rubymap 2 | Application.configure do 3 | #config.assets.version = "1" 4 | # 5 | #config.assets.excluded_paths << Rails.root.join("app/assets/stylesheets") 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /config/initializers/backtrace_silencers.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. 4 | # Rails.backtrace_cleaner.add_silencer { |line| /my_noisy_library/.match?(line) } 5 | 6 | # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code 7 | # by setting BACKTRACE=1 before calling your invocation, like "BACKTRACE=1 ./bin/rails runner 'MyClass.perform'". 8 | Rails.backtrace_cleaner.remove_silencers! if ENV["BACKTRACE"] 9 | -------------------------------------------------------------------------------- /config/initializers/content_security_policy.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Define an application-wide content security policy. 4 | # See the Securing Rails Applications Guide for more information: 5 | # https://guides.rubyonrails.org/security.html#content-security-policy-header 6 | 7 | # Rails.application.configure do 8 | # config.content_security_policy do |policy| 9 | # policy.default_src :self, :https 10 | # policy.font_src :self, :https, :data 11 | # policy.img_src :self, :https, :data 12 | # policy.object_src :none 13 | # policy.script_src :self, :https 14 | # policy.style_src :self, :https 15 | # # Specify URI for violation reports 16 | # # policy.report_uri "/csp-violation-report-endpoint" 17 | # end 18 | # 19 | # # Generate session nonces for permitted importmap and inline scripts 20 | # config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s } 21 | # config.content_security_policy_nonce_directives = %w(script-src) 22 | # 23 | # # Report violations without enforcing the policy. 24 | # # config.content_security_policy_report_only = true 25 | # end 26 | -------------------------------------------------------------------------------- /config/initializers/cookies_serializer.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Specify a serializer for the signed and encrypted cookie jars. 4 | # Valid options are :json, :marshal, and :hybrid. 5 | Rails.application.config.action_dispatch.cookies_serializer = :json 6 | -------------------------------------------------------------------------------- /config/initializers/filter_parameter_logging.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Configure parameters to be filtered from the log file. Use this to limit dissemination of 4 | # sensitive information. See the ActiveSupport::ParameterFilter documentation for supported 5 | # notations and behaviors. 6 | Rails.application.config.filter_parameters += [ 7 | :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn 8 | ] 9 | -------------------------------------------------------------------------------- /config/initializers/geocoder.rb: -------------------------------------------------------------------------------- 1 | Geocoder.configure( 2 | # Geocoding options 3 | # timeout: 3, # geocoding service timeout (secs) 4 | lookup: :google, # name of geocoding service (symbol) 5 | # ip_lookup: :ipinfo_io, # name of IP address geocoding service (symbol) 6 | # language: :en, # ISO-639 language code 7 | # use_https: false, # use HTTPS for lookup requests? (if supported) 8 | # http_proxy: nil, # HTTP proxy server (user:pass@host:port) 9 | # https_proxy: nil, # HTTPS proxy server (user:pass@host:port) 10 | api_key: ENV.fetch("GOOGLE_MAPS_API_KEY"), # API key for geocoding service 11 | cache: Rails.cache, # cache object (must respond to #[], #[]=, and #del) 12 | cache_prefix: 'geocoder:', # prefix (string) to use for all cache keys 13 | 14 | # Exceptions that should not be rescued by default 15 | # (if you want to implement custom error handling); 16 | # supports SocketError and Timeout::Error 17 | # always_raise: [], 18 | 19 | # Calculation options 20 | # units: :mi, # :km for kilometers or :mi for miles 21 | # distances: :linear # :spherical or :linear 22 | ) -------------------------------------------------------------------------------- /config/initializers/inflections.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new inflection rules using the following format. Inflections 4 | # are locale specific, and you may define rules for as many different 5 | # locales as you wish. All of these examples are active by default: 6 | # ActiveSupport::Inflector.inflections(:en) do |inflect| 7 | # inflect.plural /^(ox)$/i, "\\1en" 8 | # inflect.singular /^(ox)en/i, "\\1" 9 | # inflect.irregular "person", "people" 10 | # inflect.uncountable %w( fish sheep ) 11 | # end 12 | 13 | # These inflection rules are supported but not enabled by default: 14 | # ActiveSupport::Inflector.inflections(:en) do |inflect| 15 | # inflect.acronym "RESTful" 16 | # end 17 | -------------------------------------------------------------------------------- /config/initializers/mime_types.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new mime types for use in respond_to blocks: 4 | # Mime::Type.register "text/richtext", :rtf 5 | -------------------------------------------------------------------------------- /config/initializers/new_framework_defaults_6_1.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | # 3 | # This file contains migration options to ease your Rails 6.1 upgrade. 4 | # 5 | # Once upgraded flip defaults one by one to migrate to the new default. 6 | # 7 | # Read the Guide for Upgrading Ruby on Rails for more info on each option. 8 | 9 | # Support for inversing belongs_to -> has_many Active Record associations. 10 | # Rails.application.config.active_record.has_many_inversing = true 11 | 12 | # Track Active Storage variants in the database. 13 | # Rails.application.config.active_storage.track_variants = true 14 | 15 | # Apply random variation to the delay when retrying failed jobs. 16 | # Rails.application.config.active_job.retry_jitter = 0.15 17 | 18 | # Stop executing `after_enqueue`/`after_perform` callbacks if 19 | # `before_enqueue`/`before_perform` respectively halts with `throw :abort`. 20 | # Rails.application.config.active_job.skip_after_callbacks_if_terminated = true 21 | 22 | # Specify cookies SameSite protection level: either :none, :lax, or :strict. 23 | # 24 | # This change is not backwards compatible with earlier Rails versions. 25 | # It's best enabled when your entire app is migrated and stable on 6.1. 26 | # Rails.application.config.action_dispatch.cookies_same_site_protection = :lax 27 | 28 | # Generate CSRF tokens that are encoded in URL-safe Base64. 29 | # 30 | # This change is not backwards compatible with earlier Rails versions. 31 | # It's best enabled when your entire app is migrated and stable on 6.1. 32 | # Rails.application.config.action_controller.urlsafe_csrf_tokens = true 33 | 34 | # Specify whether `ActiveSupport::TimeZone.utc_to_local` returns a time with an 35 | # UTC offset or a UTC time. 36 | # ActiveSupport.utc_to_local_returns_utc_offset_times = true 37 | 38 | # Change the default HTTP status code to `308` when redirecting non-GET/HEAD 39 | # requests to HTTPS in `ActionDispatch::SSL` middleware. 40 | # Rails.application.config.action_dispatch.ssl_default_redirect_status = 308 41 | 42 | # Use new connection handling API. For most applications this won't have any 43 | # effect. For applications using multiple databases, this new API provides 44 | # support for granular connection swapping. 45 | # Rails.application.config.active_record.legacy_connection_handling = false 46 | 47 | # Make `form_with` generate non-remote forms by default. 48 | # Rails.application.config.action_view.form_with_generates_remote_forms = false 49 | 50 | # Set the default queue name for the analysis job to the queue adapter default. 51 | # Rails.application.config.active_storage.queues.analysis = nil 52 | 53 | # Set the default queue name for the purge job to the queue adapter default. 54 | # Rails.application.config.active_storage.queues.purge = nil 55 | 56 | # Set the default queue name for the incineration job to the queue adapter default. 57 | # Rails.application.config.action_mailbox.queues.incineration = nil 58 | 59 | # Set the default queue name for the routing job to the queue adapter default. 60 | # Rails.application.config.action_mailbox.queues.routing = nil 61 | 62 | # Set the default queue name for the mail deliver job to the queue adapter default. 63 | # Rails.application.config.action_mailer.deliver_later_queue_name = nil 64 | 65 | # Generate a `Link` header that gives a hint to modern browsers about 66 | # preloading assets when using `javascript_include_tag` and `stylesheet_link_tag`. 67 | # Rails.application.config.action_view.preload_links_header = true 68 | -------------------------------------------------------------------------------- /config/initializers/new_framework_defaults_7_0.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | # 3 | # This file eases your Rails 7.0 framework defaults upgrade. 4 | # 5 | # Uncomment each configuration one by one to switch to the new default. 6 | # Once your application is ready to run with all new defaults, you can remove 7 | # this file and set the `config.load_defaults` to `7.0`. 8 | # 9 | # Read the Guide for Upgrading Ruby on Rails for more info on each option. 10 | # https://guides.rubyonrails.org/upgrading_ruby_on_rails.html 11 | 12 | # `button_to` view helper will render `