From 7121cb60bac4e5f6e1f5a381c845117c0a28225e Mon Sep 17 00:00:00 2001 From: Nebojsa Zoric Date: Sun, 4 Dec 2022 07:47:15 +0100 Subject: [PATCH 1/7] 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/7] 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/7] 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/7] 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 9321e9ceec86c97b0553b746656826490cafcedd Mon Sep 17 00:00:00 2001 From: Nebojsa Zoric Date: Mon, 13 Mar 2023 18:00:44 +0100 Subject: [PATCH 5/7] Update items_controller.rb --- app/controllers/items_controller.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/items_controller.rb b/app/controllers/items_controller.rb index cab14057..05866460 100644 --- a/app/controllers/items_controller.rb +++ b/app/controllers/items_controller.rb @@ -13,6 +13,8 @@ def show # GET /items/new def new @item = Item.new + @item = Item.new + @item = Item.new end # GET /items/1/edit From 55b491c0fb75ac2f29ef1d0e6d8248396701a93c Mon Sep 17 00:00:00 2001 From: Nebojsa Zoric Date: Mon, 13 Mar 2023 18:01:02 +0100 Subject: [PATCH 6/7] Update application_mailer.rb --- app/mailers/application_mailer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/mailers/application_mailer.rb b/app/mailers/application_mailer.rb index 3c34c814..f68d4d3c 100644 --- a/app/mailers/application_mailer.rb +++ b/app/mailers/application_mailer.rb @@ -1,4 +1,4 @@ class ApplicationMailer < ActionMailer::Base - default from: "from@example.com" + default from: "from@example.com" layout "mailer" end From a388480c7e7ac6ad19be9e41ed711eb250f01d8b Mon Sep 17 00:00:00 2001 From: Nebojsa Zoric Date: Mon, 13 Mar 2023 18:01:31 +0100 Subject: [PATCH 7/7] Update _form.html.erb --- app/views/items/_form.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/items/_form.html.erb b/app/views/items/_form.html.erb index 6d3d9252..d026d06e 100644 --- a/app/views/items/_form.html.erb +++ b/app/views/items/_form.html.erb @@ -12,7 +12,7 @@ <% end %>
- <%= form.label :name, style: "display: block" %> + <%= form.label :name, style: "display: block" %> <%= form.text_field :name %>