gregordimi / packages

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

latana

It's a simple web server application in Ruby that use CRAN server to extract all the required information for each package and save in database.

And background is running to make sure we are getting up to date information about that package.

Key files

app
├── controller
│      └── packages controller                             
│
├── models                    
│      └── packages
├── clients
│      ├── cran 
│      │     └── packages               
│      └── cran
│             └── package list(with description)
├── jobs                    
│      └── update package list
├── task                    
│      └── update package list

Workflow - How does it work?

The following diagram show the process/workflow of the application.

│    1. Background job get all packges      │ 
├────────────────────────────────────────────>│     
│                                             ├ 2. and get description
│                                             │ of each package
│    3. save package information              │               
│<────────────────────────────────────────────│
│                                             │
│    4. show package information on web page  │
├────────────────────────────────────────────>│ 
│                                             ├ 5. create  URL    
│    6. show description                      │ 
│<────────────────────────────────────────────│

Setup

  • first clone the directory git clone git@github.com:sajjadmurtaza/latana.git'
  • cd latana
  • bundle install
  • rake db:migrate
  • rails s

on Next tab

run bundle exec sidekiq -C config/sidekiq.yml

For now job will run after 20 minute(to check that it's working, can change it)

Rake task rake db:update_packages_list

to update manually package list

Main files Sidekiq config

Service:

Job:

rake task:

Web outcome

alt text

About


Languages

Language:Ruby 79.1%Language:HTML 15.7%Language:JavaScript 3.2%Language:CSS 1.9%