Git Product home page Git Product logo

henryvw / stoic_penknife Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 1.0 86.19 MB

Stoic Penknife - A Rails web application to practice ancient Greek and Roman Stoic philosophical technologies of the soul

Home Page: http://www.stoicpenknife.com/

Ruby 59.11% JavaScript 0.34% HTML 1.57% SCSS 2.07% Haml 36.85% Shell 0.06%
philosophy stoicism ancient-greek ancient-rome cbt cognitive-behavioral-therapy rails ruby ruby-on-rails stoic

stoic_penknife's Introduction

Stoic Penknife

Stoic Penknife BUILD_STATUS TEST_COVERAGE

What is Stoic Penknife?

Stoic Penknife (https://www.stoicpenknife.com) is a web application to practice ancient Stoic philosophical 'think-exercises' to question your perceptions about yourself and your life. Marcus Aurelius, Seneca, Epictetus and other ancient Greek + Roman philosophers once practiced these exercises on paper - now you can do it with an app! Amazing.

For Philosophers

How Can I Use the App?

To practice ancient Stoic philosophical 'think-exercises' and to create your own custom 'think-exercises', visit the production instance at https://www.stoicpenknife.com.

ReadMe Screenshot

How Can I Contribute?

We would love to hear about your experiences using the application and in particular the 'think-exercises.' Are there 'think-exercises' that you find particularly helpful or meaningful?

Are there any problems that you encountered? You can open an Issue or write to me, Henry, at [email protected].

For Programmers

How Can I Contribute?

Stoic Penknife is an open source project. If you are interested in contributing, feel free to create an issue or a task in the Project tab: We have a list of tasks in the Project tab. Alternatively or in addition, feel free to write to me, Henry, at [email protected]. We would also love to hear about additional improvement ideas. You are also free to fork the project and to make your own version (perhaps an Epicurean, Platonic-Academic, Aristotlean-Peripatetic, Pyrrho-Skeptic, Eclectic, Diogenes-Cynic or Heraklitean version?!)

How is the Application Organized?

  • Rails Active Record Backend
  • Bootstrap Views with HAML + JQuery
  • 2 Admins - Custom Admin (Managed with CanCanCan Gem) plus an Active Admin

The Custom CanCanCan Admin is for managing exercises, doctrines and quotations. The Active Record Admin is for managing users. In the future I would love to combine them. There is no reason to have two separate Admins.

Test Coverage

Stoic Penknife uses RSpec's new System Specs to test all key integrated user actions. I also have controller specs for the Exercise controller, the most important controller. All the key models are covered.

I use CodeCov to monitor Test Coverage: https://codecov.io/gh/Henryvw/stoic_penknife

The exception to Stoic Penknife's test coverage (the reason it is not 100% covered) is the Active Admin backend. This Admin is not relevant to the user experience and I have not written tests for it. Again, should I combine the two Admins into one, I would start by writing a new 'Admin' test suite.

Hosting + Deployment

I use CircleCI to run the Rubocop linter and the full test suite, push to CodeCov and and manage deployment to the production Heroku instance: https://github.com/Henryvw/stoic_penknife/blob/master/.circleci/config.yml

Play with the App Locally / Have a Dev Environment

If you want to play around, simply download the app and make sure you have Rails 7.0.2 and Ruby 3.1.1 installed and spin her up - bin/dev.

I still have not written a seed file for the database. You will need to manually create a User with admin=true in Rails Console in order to administer global exercises.

The second, ActiveAdmin back-end you can access at /admin. At the present time this also requires a Rails Console-manually-created separate, Active Admin user created using the AdminUser model.

Note about Selenium Web Driver and Chrome RSpec Tests

In order to run the test suite, you will need to install the chromedriver utility. On Mac OS X, this is managed by homebrew. Every time Chrome releases a new version of itself, for example going from Version 74 to Version 76, on your local machine to run the test suite you will need to update the chromedriver utility.

On Mac OS X, chromedriver is managed by homebrew. You can update it via the command:

brew cask reinstall chromedriver

License

Creative Common License

Stoic Penknife is licensed under the Creative Commons Attribution-ShareAlike CC BY-SA License. This license lets you remix, tweak, and build upon Stoic Penknife even for commercial purposes, as long as you credit me and license your new creations under the identical terms. Read more at the Creative Commons page for this license.

stoic_penknife's People

Contributors

henryvw avatar will-sommers avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

will-sommers

stoic_penknife's Issues

Advanced Patterns - Service/Action Objects: Controllers - Introduce form or action models

Create "action objects" also called "service objects"... if the save method gets really complicated.

Google / research "form objects", "action objects", "service objects", "repository pattern"

Create folder structure:

models/forms/
models/views/
models/actions/or models/services/

Create classes that basically manage the forms, put all the logic there instead of in the views. These also have the advantage of being able to write unit tests.

The app doesn't really need this stuff right now, but where can I use it to practice these patterns?

  • Look for accepts_nested_attributes - that would be a place to refactor into a form object

Write helpful, well-written ReadMe

  • What is important to write here?
  • How do other well-written ReadMes explain their projects? What are ReadMes that I like that can give me inspiration?

Fix Exercise Controller Specs

Even though I won't write any more Controller Specs and will write Feature / Integration Specs, I want just one Controller Spec for Exercises.

(It's still useful to have some knowledge of Controller Specs for legacy applications)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.