Commit graph

40 commits

Author SHA1 Message Date
Mac Siri
463af8fd27
Update .gitignore (#17057) 2022-03-30 13:44:56 -05:00
Jeremy Friesen
8724a3724f
Improving Solargraph options (#16899)
I'm following the guidance of https://solargraph.org/guides/rails as
well as https://github.com/iftheshoefritz/solargraph-rails

The goal is to improve the [Language Server Protocol (LSP)][1] support
for Ruby in this repository.  For Emacs this means I get intellisense
type support (e.g. meaningful auto-completion based on symbols).  For
those using VSCode or Vim, there are Solargraph plugins available,
scroll to the [Supported Editors section of Solargraph's homepage][2].

[1]:https://microsoft.github.io/language-server-protocol/specifications/specification-current/
[2]:https://solargraph.org
2022-03-17 16:47:55 -04:00
rhymes
dd02f60bc2
Add .pryrc to gitignore (#14844) 2021-09-28 18:03:02 +02:00
Daniel Uber
bad23b153c
ignore dump.rdb redis backup file (#14586)
* ignore dump.rdb redis backup file

* Update .gitignore

Co-authored-by: rhymes <github@rhymes.dev>

Co-authored-by: rhymes <github@rhymes.dev>
2021-08-27 12:36:04 -05:00
Andy Zhao
3b81172c56
Remove docs from repo ✂✂✂ (#14579)
* Remove docs ✂✂✂✂

* Remove all references to docs and gitdocs

* Update docs.forem.com to developers.forem.com

* Remove .gitdocs_build/

* Update yarn.lock
2021-08-23 17:23:42 -04:00
Suzanne Aitchison
bd1b15d6b3
add cypress-failed-log (#14224)
* add cypress-failed-log

* Trigger Travis CI

* ignore logs folder
2021-07-16 14:20:06 +01:00
Jamie Gaskins
f17d808cec
Fix sitemap for self host, including memory leak (#14036)
* Only load Rake tasks once

* Use local sitemap if AWS credentials are not set

* Leave generated sitemaps out of git
2021-06-22 11:11:08 -04:00
Michael Kohl
6dfabd578f
Rename SiteConfig to Settings::General (#13573)
* Rename SiteConfig

* More renaming

* Update spec

* Update mandatory settings mapping

* More renaming

* e2e test fixes

* You have a rename, and you have a rename

* Spec fix

* More changes

* Temporarily disable specs

* After-merge update

* Undo rename for migration

* undo rename of DUS

* Fix DUS

* Fix merge problem

* Remove redundant DUS

* Fix specs

* Remove unused code

* Change wrong class name

* More cleanup

* Re-add missing values to constant

* Fix constant

* Fix spec

* Remove obsolete fields

* Add accidentally removed field

* Update spec

* Move methods from Settings::General to ForemInstance

* Remove unneeded model

* Change mentions of 'site config'
2021-05-21 14:45:37 +02:00
Fernando Valverde
cf3bde4259
Add mobile push notifications to Forem (#12419)
* First commit with iOS PN working

* RPush cleanup worker + unique jobs config

* Remove rpush tables from schema.rb

* PR feedback

* Feature flag and test for route

* Tests and feature flag PushNotification ::Send

* Update app/controllers/devices_controller.rb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Update spec/routing/devices_routes_spec.rb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Update spec/services/push_notifications/send_spec.rb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* PR feedback

* Set Rpush driver and url

* More PR feedback

* Apply suggestions from code review

Co-authored-by: Jamie Gaskins <jgaskins@gmail.com>

* PR feedback from Rhymes

* Don’t double render

* Sure

Co-authored-by: Josh Puetz <hi@joshpuetz.com>
Co-authored-by: Josh Puetz <josh@dev.to>
Co-authored-by: Michael Kohl <citizen428@dev.to>
Co-authored-by: Jamie Gaskins <jgaskins@gmail.com>
2021-03-12 14:08:18 -06:00
dependabot[bot]
a63ba17b6a
Bump liquid from 4.0.3 to 5.0.0 (#12150)
* Bump liquid from 4.0.3 to 5.0.0

Bumps [liquid](https://github.com/Shopify/liquid) from 4.0.3 to 5.0.0.
- [Release notes](https://github.com/Shopify/liquid/releases)
- [Changelog](https://github.com/Shopify/liquid/blob/master/History.md)
- [Commits](https://github.com/Shopify/liquid/compare/v4.0.3...v5.0.0)

Signed-off-by: dependabot[bot] <support@github.com>

* Convert ActiveSupport::SafeBuffer to string

* Disable echo and render tags

* Disable liquid tag

* Add issue link

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: rhymes <rhymes@hey.com>
2021-01-15 15:37:42 -06:00
rhymes
3764cd67d5
Use Travis builtin caching (#12045) 2020-12-28 14:41:31 +01:00
Nick Taylor
f6278a9106
Add Cypress to Travis (#11867)
* Added test run artifacts to git ignore.

* Added Cypress run to Travis.

* Added the start-server-and-test package.

* Added e2e ci scripts.

* Split up commands.

* Testing e2e after rspecs on same build node.

* Move Cypress back to node 0 for Knapsack.

* Added folders for build artifacts for failed E2E tests.

* Simplified e2e for CI

* Using knapsack-pro-cypress now.

* Added data-testid to sign up form for tests.

* Added forem secret for CI

* Updated initial admin fixture.

* Reworked test to be a signup test. wip.

* Added cypress file upload package.

* added fixture for admin profile image.

* Updated forem secret for tests.

* Added Cypress file upload to Cypress commands.

* Changed test to initial sign up for the first admin user.

* Fixed test to ensure there are no signup errors.

* Added some logging to see what's up.

* Added some comments to the test.

* Set Chrome web security to false to prevent CORS errors.

Co-authored-by: rhymes <rhymes@hey.com>
2020-12-15 21:26:34 -05:00
Joe Doss
44569605d2
Fix container composes w/r/t multistage container builds (#11531)
* Use premade development image.

* Use prebuilt container for podman-compose too!

* Fix bundle bundle_finished path.

* Fix docker-compose to work with the Multistage Containerfile

Add root user for Forem containers, fix bundle_finished path and make
webpacker wait for the bundle to finish.

Switch Redis to redis:6.0.9-alpine

* Remove build steps and fix bundle path.

* Merge dev entrypoint into the main one.

* Use merged entrypoint.sh, remove old entrypoint directives, and fix a dockerize bug.

* Make sure unset BUNDLE_WITHOUT and remove without in bundle config.

* Unset BUNDLE_WITHOUT="development:test" as a global ENV.

Also ensure that we remove the without directives for development and testing.
This will make sure that the right gems are installed for each environment.

Removed some unneeded COPYs and remove a commented out RUN.

* Fix ENTRYPOINT on development and testing containers.

* Fix entrypoint and command on rails container.

* Ignore bundle_finished file.

* Fix REDIS_ env vars and adjust podman-compose file.

* Change bundle_finished path and update Yarn docker-compose command.
2020-11-23 15:15:21 -06:00
Molly Struve
a5553cf296
Warning Fix: Rename Unused application.yml File to Prevent Warnings (#9860) 2020-08-18 16:49:34 -05:00
Molly Struve
0a64ac067b
[deploy] Remove ENVied Gem, Use dotenv Take 2 (#9767) 2020-08-14 12:20:47 -05:00
rhymes
e727956640
Revert "[deploy] Refactor:Remove ENVied Gem, Use dotenv Instead for Test and Development (#9621)" (#9757)
This reverts commit 1be8c72206.
2020-08-12 13:28:38 -04:00
Molly Struve
1be8c72206
[deploy] Refactor:Remove ENVied Gem, Use dotenv Instead for Test and Development (#9621)
* Refactor:Remove ENVied Gem in Favor of Default application.yml

* Copy sample_application.yml for Travis

* Create .env_sample file, Warn of missing ENV variables, ignore .env file

* Use dotenv For ENV variables and create Rake Task to Populate

* Update docs to copy .env_sample file

* make application config a bit more resilient

* update more documentation and only initialize dotenv in dev and test

* Update doc code snippet types and refactor rake task and app config

* remove push defaults

* Make initializers more resilient, remove unused ENV from travis

* Exit new rake task if application.yml does not exist, include dotenv in docs
2020-08-12 11:01:38 -04:00
Nick Taylor
b733a7c753
Auto-generate CSS utility classes documentation in Storybook (#9633)
Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
2020-08-11 23:32:14 -04:00
Joe Doss
aa49cb1cfe
Bugfix for #7663 and refactor of container setup (#7747)
* Move from Alpine Linux to Fedora Linux.

This changes the base container image away from Alpine Linux to
Fedora Linux to address some musl libc issues with some of our gems.

It also moved the main file to a Containerfile and symlinks the Dockerfile
to it. This makes our container setup less Docker-centric as Linux users
most likely will be using Podman as their container runtime.

Lastly, it moves the WORKDIR from /usr/src/app to /opt/apps/devto.
The Linux FHS states that /opt is the spot for Optional application
software packages and /usr/src is for kernel source code.

https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard

/opt Optional application software packages
/usr/src Source code, e.g., the kernel source code with its header files.

Also, if SELinux becomes a thing in our future, moving this makes it
easier to manage contexts out of /opt rather than /usr/src.

* Adjust the Containerfile a bit to add some missing packages, make it
more generic and move env vars to the docker-compose.

* Move the Dockerfile to a symlink to the Containerfile.

We need to be able to support more than just Docker for a container
runtime. Moving everything to a Containerfile and symlinking the
Dockerfile helps users run runtimes such as Podman.

* Add in new entrypoint files and fix the app path in docker-entrypoint.sh

* Refactor the docker-compose.yml file so it doesn't build the main
application container three times in a row. We can use the same
container for web, webpacker, and sidekiq.

Also make the volume names very explicit on what their contents and add
in SELinux context support with :Z

* Fix ELASTICSEARCH_URL.

* Remove the absolute path on ip binary and add in iproute to Containerfile.

* Symlink the Dockerfile to Containerfile and add in a container-compose.yml file
for usage with podman-compose. We are waiting for this issue to get resolved

https://github.com/containers/libpod/issues/6153

and for podman-compose to mature a bit more. A user using podman-compose can use

podman-compose -f container-compose.yml

to launch the DEV container stack with Podman.

* Update the .gitignore file to reflect the new container volumes.

* Fix the entrypoint script on the Containerfile and clean up a bunch of things.

* Rework the Containerfile to prep it to run as a non-root user. We have to wait
for this issue to get fixed:

https://github.com/containers/libpod/issues/6153

for Linux users and then we can uncomment the USER line so we are running Rails
as a non-root user. :toot:

* This reworks the compose files so each task that is needed to start the app has
a correct wait command with dockerize. It also adds in containers for doing
yarn and bundle things for development. Since we mount the code directory inside
the container we lose our pre-containerized gems and node_modules.

This means users can run:

Linux
podman-compose -f container-compose.yml up

Mac
docker-compose up

and it should correctly build the app stack with containers!

* Clean up old container related things.

* Add in some container pre-reqs and my name to the "Core team" section! :toot:

* Adjust the seed and sidekiq compose entries so they do not use the web entrypoint
and set the REDIS_URL and REDIS_SESSIONS_URL env vars for seed.

Add in some echos to the entrypoint.sh.

Also set docker-compose to use :delegated on mount points to speed things up.

https://docs.docker.com/storage/bind-mounts/#configure-mount-consistency-for-macos

* Just call yarn install --dev on the yarn container.

* Update documentation to support Docker and Podman as Container Engines and
move the page from docker to containers to reflect the fact not all users run
their containers via Docker.

There are dozens of us... DOZENS!

* Set --local on bundle config so it just impacts this Ruby app.

* Renamed bin/docker-setup to bin/container-setup to reflect the fact that that
we can use Podman as a container engine. I also refactored it so it does some
basic pre-flight checks for docker and docker-compose or podman and
podman-compose to make sure users have a container engine installed.

* Set cache_all_platforms true for bundler.

* Bump docker-compose dockerize -timeout to 45min for slower macOS hardware.

* Move to the consolidated app_initializer:setup rake task for bootstrapping the
app.

* Update docs/installation/readme.md
2020-05-28 12:11:51 -05:00
Nick Taylor
26c66b34d2
Fixed configuration to build Storybook on Netlify. (#8088) 2020-05-27 12:44:30 -04:00
rhymes
1112cbf316
[deploy] Update webpacker configuration (#8004) 2020-05-25 12:03:18 -04:00
Anna Buianova
e9f0891577
Improved the podcasts seeds (#6565) 2020-03-10 14:23:48 -04:00
Michael Kohl
38e980917d
Add Elasticsearch to Docker Compose (#5978)
* Copy .ruby-version into Dockerfile
* Add Elasticsearch to Docker Compose
2020-02-11 11:45:16 -05:00
Jacob Herrington
6337293f54 Ignore .tool-versions file (#4508) [ci skip] 2019-10-21 16:22:54 -04:00
Araslanov Evgeny
b7668f2518 Add test markdown parse snake case (#4188) [ci skip] 2019-10-02 13:26:22 -04:00
Robin
880655b388 Add AWS install error to FAQ & update gitignore(#3871) [ci skip] 2019-08-29 10:28:13 -04:00
rhymes
35526bef9b API: OpenAPI 3 spec and auto generated docs (#3650) 2019-08-12 11:36:04 -04:00
rhymes
fb9a407b21 Adds Ruby source code documentation to docs.dev.to (#2656)
* Add YARD and plugins to generate source code doc

* Expose yard Ruby doc in gitdocs

* Add yard doc step to Travis

* Tell netlify to build the docs before deploying

* Add Gemfile for Ruby prerequisites and Makefile

* Makefile uses tabs, not spaces

* Build ruby-doc and then gitdocs

* Add recent Ruby version to make sure yard plugins work

* Switch Ruby to a pre-built version inside Netlify

* Add ActiveRecord for the yard-activerecord plugin

* Add Ruby doc header link and info to build it locally
2019-05-02 13:50:58 -04:00
Abraham Williams
fdd18e6bb1 Simplify development setup (#2143) 2019-03-25 12:53:39 -04:00
Eugene Cheah
3104c480c5 Implement docker-run.sh script + docker container build (#1844) [ci skip] 2019-03-18 18:31:39 -04:00
Ben Halpern
98b68fa15c
Add sitemap generation (#1465) 2019-01-05 19:43:24 -05:00
Anna Buyanova
48dbe55d05 Remove database.yml from the repo (#1162)
* Remove database.yml file from the repo, fixes #478

* Update dev.to docs

* Switch to the bullet list for the database.yml docs
2018-11-27 16:42:10 -05:00
Nick Karnik
a3649b8d09 Added the ability to press Ctrl+Enter Or Command+Enter to submit comments. (#885)
* Resolves #245
    * This is applied to root level comments as well as nested replies.
    * We are ensuring that user has commented at least once which means
      they have accepted the code of conduct before

Style changes as per suggestions in code review
2018-10-13 14:24:53 -04:00
Ali Spittel
6ae540cafd add alt text to sidebar images (#842)
* add alt text to sidebar images

* add alt text to emoji heart

* add alt text to sponsor logos

* add aria-label to search bar

* update snapshot for Search
2018-10-07 10:39:57 -04:00
Mac Siri
954efd3cab
Implement Liquid::CaptureTag (#565)
* Remove package-lock.json

* Remove phantom schema row

* Add better_errors gem

* Implement Liquid::CaptureTag

* Update .gitignore
2018-08-31 13:14:00 -04:00
Mac Siri
243c44e23d Update Docs [ci skip] (#656)
* Move frontend doc [ci skip]

* Fix DEV styling [ci skip]

* Update table of contents [ci skip]

* Move stuffs around [ci skip]

* Move stuffs around [ci skip]

* Add gitdocs integration

* Mess with title again [ci-skip]

* Add root readme back in

* Update docs/readme as a new readme

* Messing with title again

* Add where to get help [ci skip]

* Fix dev connect link [ci skip]

* Move how to get help [ci skip]

* Add TODO to empty headers

* Add more TODOs and clean up a link

* Add sloan

* Update prereqs to specify we use macOS

* Add gitdocs build to test on Netlify

* Update README [ci skip]

* Add .gitdocs_build/ to .gitignore [ci skip]

* Create netlify.toml

* Update docs with logo and more docs

* Update gitdocs name

* Add redirects for netlify

* Remove extraneous redirects from netlify

* Add more README TODOs [ci skip]

* Update root directory of gitdocs

* Move ISSUE_TEMPLATE to .github/ [ci skip]

* Testing new base for netlify

* Update README [ci skip]

* Rename index.md to readme.md for GitHub

* Move gitdocs.json to docs folder

* Add GPL LICENSE [ci skip]

* tweak readme

* update license language

* Update FAQ with some Q and A

* Add some traffic control for docs readme

* add license faq and core team members

* Add new line to fix list

* Add AGPL-3

Adding the GNU AFFERO GENERAL PUBLIC LICENSE.

* Update GPL License

* Additional documentation for PostgreSQL setup
2018-08-08 10:36:32 -04:00
Mac Siri
0f3342bcec [WIP] Implement non front-matter editor (#415)
* Create alternate editor

* Install linkstate (?)

Not sure how it disappear in the first place

* Run yarn install

* Modulize ArticleForm component

* Refactor

* Isolating css WIP

* Implement simplified frontmatter-less editor

* Modulize individual form element

* Ajust props names

* Transform json params to snakecase

* Remove codes

* Update /new, almost there for release

* Fix editor resize issues

* Change defaultvalue to value in article form tag element

* Modify html buttons in article form
2018-07-27 20:12:33 -07:00
Mac Siri
40f488d991 Migrate to Travis CI (part 2) (#591)
* Update Travis.yml

* Update README

* Update README

* Adjust test to not rely on env vars

* Update encryption

* Refactor

* Update env key

* Stub AWS calls

* Create ApplicationConfig

* Fix specs

* Fix lint

* Update ApplicationConfig

* Remove travis env vars

* Fix lint

* Extend character limit to 100

* Add env to travis

* Take out auto-restart after deploy

* Immediately discarded test cache

* Stub GA in request specs

* Stub Pusher

* Fix broken specs

* Update fixture

* Add CodeClimate id

* Change CodeClimate key

* Remove merge mistakes

* WIP

* Add Envied gem & Change README

* Add missing keys

* Add missing key

* Update fixture

* Fix broken spec

* Add Slack Notification for Travis

* Fix wording

* Fix typo
2018-07-20 20:17:18 -04:00
Nick Taylor
6a8df8c8dd Add (P)react Storybook. (#142) 2018-03-26 11:56:32 -04:00
Mac Siri
301c6080e3 Initial commit 2018-02-28 16:11:08 -05:00