Coder Social home page Coder Social logo

znamenica / dneslov Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 4.0 6.62 MB

dneslov is a diary calendar containing the name of orthodox christian feasts and saints celebs

Home Page: http://dneslov.org

Ruby 46.34% JavaScript 36.16% CSS 1.28% HTML 2.70% Gherkin 7.94% SCSS 5.55% Slim 0.03%
ruby calendar church church-encoding calendar-events orthodox church-website orthodoxy slavic-languages church-sermons

dneslov's Introduction

README

This README would normally document whatever steps are necessary to get the application up and running.

Status

Homepage Website dneslov.org GitHub GitHub tag Open Source? Yes! GPLv2 license Build Status Build Status Codacy Badge Code Climate Test Coverage PRs Welcome Telegram

Installation

Requirements

List of the requirements (packages are named as in ALT conventions) are the following: 0. gcc-c++

  1. libhiredis-devel
  2. libsnappy-devel
  3. libruby-devel
  4. redis
  5. xclip
  6. sidekiq
  7. postgresql15-server-devel
  8. postgresql15-server
  9. postgresql15-contrib
  10. libwebp-tools
  11. libImageMagick-devel
  12. curl
  13. git
  14. sudo
  15. node
  16. yarn
  17. gostsum

If you have an ALT installation, just install requirements by single line:

apt-get install libhiredis-devel libsnappy-devel redis xclip sidekiq postgresql15-server-devel postgresql15-server postgresql15-contrib libwebp-tools curl git sudo node yarn gostsum libImageMagick-devel

It any others, just correlate them for each of packages to your system's ones, and then install as usually.

Prerequisites

  1. Setup RVM: 1.1. Import gpg records if required:
command curl -sSL https://rvm.io/mpapis.asc | gpg --import -
command curl -sSL https://rvm.io/pkuczynski.asc | gpg --import -

1.2. Install rvm itself as follows:

\curl -sSL https://get.rvm.io | bash -s stable

1.3. Make sure taht .bashrc has rvm setup lines:

grep rvm ~/.bashrc
export PATH="$PATH:$HOME/.rvm/bin"

1.4. Relogin into the shell.

  1. Install required ruby

Get into the projects folder, then run:

rvm install ruby-$(cat Gemfile|grep ^ruby|sed "s,.*'\([0-9.]\+\)'.*,\1,")

This will install projects ruby into the system.

  1. Create required config files secrets.yml, and database.yml, and .env

dneslov/shared/config/database.yml

development:
  adapter: postgresql
  encoding: unicode
  database: dneslov_development
  pool: 5
  username: dneslov
  password: 

dneslov/shared/config/secrets.yml

production:
   secret_key_base: <secret hash>

dneslov/shared/.env

---
github:
   client:
      id: "..."
      secret: "..."
   access_token_url: "https://github.com/login/oauth/access_token"
   user_info_url: "https://api.github.com/user"
   client_url: "https://dneslov.org/dashboard"
   redirect_url: "https://dneslov.org/auth/github"
secret_key_base: '...'
jwt_secret: "..."
sentry:
   dsn: "https://[email protected]/..."
rails:
   resque:
      redis: "localhost:6379"
redis:
   url: "redis://localhost:6379"

Deployment

Sudo

Setup sudo for deployment if required.

Setup

Setup deployment, and remote restart can be done for production or staging environment, it is no meaning to do this for development. So these three steps can be skipped.

Run capistrano setup task:

$ cap production setup

Deploy

$ cap production deploy

Deploy with a server restart

$ cap production deploy deploy:restart

Remote server restart

$ cap production deploy:restart

Development server start

In development mode:

Run server and file watcher with:

RAILS_ENV=development foreman start -f config/procfiles/development.rb -d .

Tasks

Image Synchronisation

On client side proceed images into to upload-ready format, so do:

rake dneslov:image:proceed[~/Документы/Изображения/dneslov_pin1/,~/Документы/днеслов/upimages]

Then rsync them with the upload server(s):

rake dneslov:image:rsync[~/Документы/днеслов/upimages,~/git/dneslov/public/images:~/git/dneslov/public/images1]

Then on server side from mouted upstream server load images as resources, and then converts them into icon or thumb links, as:

rake dneslov:load:resources[/mnt/mail] dneslov:load:images[/images]

API

Request for all licit calendaries:

curl -k "https://dneslov.org/api/v1/calendaries.json"

Paged version with 10 records per page:

curl -k "https://dneslov.org/api/v1/calendaries.json?page=1&per=10"

Request for all licit calendaries with ones unlicit, which are specified by slug:

curl -k "https://dneslov.org/api/v1/calendaries.json?c=гпц&page=1&per=10"

Tasks

PDF Generation

To generate PDF calendary with a first record per day, use the following:

rake book:pdf[днеслов.pdf,днеслов]

dneslov's People

Contributors

dependabot[bot] avatar eakarpov avatar majioa avatar snyk-bot avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

dneslov's Issues

Setup Airbrake for your Ruby application

Installing with the CLI

The Airbrake CLI installs the Airbrake Ruby notifier automatically in your Ruby project. To install the gem directly without using the CLI, please scroll down to the Installing manually section.

Install the CLI via Homebrew

brew install airbrake/airbrake-cli/airbrake

Authenticate via config command

Authenticate by setting your user-key with the config command:

airbrake config set user-key YOUR_USER_KEY_HERE

You can find your user key in your profile settings page.

Install command

Invoke the following to have the Airbrake CLI install the Airbrake notifier for your project:

airbrake install --project-id YOUR_PROJECT_ID_HERE

You can find your project ID in your project's settings.

After this, you are set! Check out the Testing your installation section to send a test error to Airbrake.

Installing manually

Option 1: Bundler

Add the Airbrake Ruby gem to your Gemfile:

gem 'airbrake-ruby'

Option 2: Manual

Invoke the following command from your terminal:

gem install airbrake-ruby

Configuration

Just require the library and copy this configuration snippet into your Ruby project:

(You can find your project ID and API key in your project's settings)

require 'airbrake-ruby'

Airbrake.configure do |c|
  c.project_id = <Your project ID>
  c.project_key = '<Your project API KEY>'
end

Testing your installation

To test your installation, send a test error to Airbrake as shown in the example below. Uncaught errors are automatically sent to Airbrake. Caught errors can be sent to Airbrake using the notify method:

begin
  1/0
rescue ZeroDivisionError => ex
  Airbrake.notify(ex)
end

Full documentation

For in depth examples and advanced configuration options like error filtering or custom parameters, please visit our official GitHub repo.

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.