From 7121cb60bac4e5f6e1f5a381c845117c0a28225e Mon Sep 17 00:00:00 2001 From: Nebojsa Zoric Date: Sun, 4 Dec 2022 07:47:15 +0100 Subject: [PATCH 1/5] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 7db80e4c..adcfb8e2 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ Things you may want to cover: * Database initialization * How to run the test suite + $ bundle exec rspec spec/ * Services (job queues, cache servers, search engines, etc.) From f3b1f45935fcf81df05df11f64b3dc28289696fd Mon Sep 17 00:00:00 2001 From: Nebojsa Zoric Date: Fri, 9 Dec 2022 00:11:39 +0100 Subject: [PATCH 2/5] Create site.yml --- ansible/site.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 ansible/site.yml diff --git a/ansible/site.yml b/ansible/site.yml new file mode 100644 index 00000000..78afbeb0 --- /dev/null +++ b/ansible/site.yml @@ -0,0 +1,35 @@ +--- +- hosts: rails + remote_user: ubuntu + become: yes + tasks: + - name: Update all packages to the latest version + apt: + upgrade: dist + - name: Add deploy user + user: + name: ubuntu + shell: /bin/bash +# - name: Add SSH key to server for deploy user +# authorized_key: +# user: deploy +# key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDJwoq7YlVfGFAYlwPSAV4tFINsExdlhfDN/wNOL2r8r4OKDwNRjUHH0DunaMgm+zGezmjnPXypNk7uu8Vpji2CPoLuvmu6Dvc3u0fmhbPxOmUCP7bPD65MhbAl/yjiEyP31HK0LBPOix29ihXXbVGHy5rGNpqDmYH0g+7gHoS5lbegp04p+HV+N/L2oXvPJcrQTpNb6+GTof93pCaCMh31GKIflUnFnzkYETlJBZ1Jtqpf68lWIbSad3Bvho3tjSa2ISRKEmUz9EpMM+9JSBxSkuxlXkqAE94Vy16dpOvg4azFkTcrMjZ6Oiq++j4ZKizpC+VuemuNAa3OIX7jzgal heidar@cloud" + - name: Install Ruby dependencies + apt: + name: "{{ item }}" + with_items: + - gcc + - autoconf + - bison + - build-essential + - libssl-dev + - libyaml-dev + - libreadline6-dev + - zlib1g-dev + - libncurses5-dev + - libffi-dev + - libgdbm3 + - libgdbm-dev + - sqlite3 + - libsqlite3-dev + - nodejs From a8b70486674f11a8b31b2dfc5d1a3c369379c9e1 Mon Sep 17 00:00:00 2001 From: Nebojsa Zoric Date: Sun, 26 Feb 2023 17:58:03 +0100 Subject: [PATCH 3/5] Create sonar-project.properties --- sonar-project.properties | 1 + 1 file changed, 1 insertion(+) create mode 100644 sonar-project.properties diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 00000000..b55af0a5 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1 @@ +sonar.projectKey=kolosek_basic-app_AYaOpVsIMgR-17T6TcOZ From b2abdf07dd04cd199394ebbba1eb617a5eed16df Mon Sep 17 00:00:00 2001 From: Nebojsa Zoric Date: Sun, 26 Feb 2023 17:58:26 +0100 Subject: [PATCH 4/5] Create build.yml --- .github/workflows/build.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..4625a019 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,26 @@ +name: Build + +on: + push: + branches: + - main + + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - uses: sonarsource/sonarqube-scan-action@master + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} + # If you wish to fail your job when the Quality Gate is red, uncomment the + # following lines. This would typically be used to fail a deployment. + # - uses: sonarsource/sonarqube-quality-gate-action@master + # timeout-minutes: 5 + # env: + # SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} From c0e8a443a0638ac92bd6be619eae8dc46d13b670 Mon Sep 17 00:00:00 2001 From: Nebojsa Zoric Date: Thu, 18 May 2023 11:00:39 +0200 Subject: [PATCH 5/5] Update items_controller.rb --- app/controllers/items_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/items_controller.rb b/app/controllers/items_controller.rb index cab14057..21eab1ba 100644 --- a/app/controllers/items_controller.rb +++ b/app/controllers/items_controller.rb @@ -4,6 +4,7 @@ class ItemsController < ApplicationController # GET /items or /items.json def index @items = Item.all + @items = Item.all end # GET /items/1 or /items/1.json