Skip to content

Commit

Permalink
Merge branch 'release/0.1.0' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
demir committed Jun 4, 2021
2 parents 51a4edf + 1f7f067 commit 272238e
Show file tree
Hide file tree
Showing 134 changed files with 3,298 additions and 525 deletions.
44 changes: 44 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
name: Hata raporu
about: Tespit edilen hataları ve beklenenin dışında çalışan özellikleri bildir
---

#### Hatayı açıklayın

<!--
Problemi tek bir paragrafla açıklayın
-->

#### Beklenen davranış

<!--
Beklenen davranışı kısa şekilde açıklayın
-->

#### Mevcut davranış

<!--
Mevcut davranışı kısa şekilde açıklayın. Gereğinden uzun hata çıktılarını lütfen Gist olarak paylaşın
-->

#### Ekran görüntüleri

<!--
Varsa, hatayı görmeyi kolaylaştırılacak ekran görüntüleri
-->

#### Muhtemel çözüm

<!--
Eğer bir çözüm öneriniz varsa tek bir paragrafla açıklayın. Gereğinden fazla uzun kod bloklarını lütfen Gist olarak paylaşın
-->

#### Hatayı tekrarlamak için takip edilmesi gereken adımlar

<!--
Problemi yeniden üretmek için gerekli adımları aşağıda belirtin
(1. X adresinde bulunan Y sayfasına git)
(2. Z butonuna tıkla)
(3. Sayfayı en alta kaydır)
(4. Görünmesi gereken metin K iken L görünüyor)
-->
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/design-proposal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Tasarım önerisi
about: Uygulamanın varolan UI/UX'i ile ilgili değişiklik önerisi. Varolan sayfalardaki sorunlar için 'hata raporu', varolmayan sayfalar için 'özellik önerisi' template'ini kullanın
---

#### Bu tasarım önerisi bir problemle mi ilgili? Lütfen detaylıca açıklayınız

<!--
Tasarım önerinizi detaylıca açıklayınız. Mevcut tasarımdaki sorun ne, bu tasarıma neden ihtiyaç var, tasarım neleri iyileştirecek gibi sorunların tanımı açıkça yapılmalıdır
-->

#### Sizin çözümünüz

<!--
Kısa ve net bir şekilde konuyla ilişkili olarak sizin önerileriniz neler, sizin öneriniz kabul edilirse neler olacak, uygulamada neler iyileşecek açıklayınız
-->

#### Ekran görüntüleri

<!--
Mevcut tasarım ve sizin önerinizi karşılaştırabileceğimiz ekran görüntüleri
-->
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-proposal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: Özellik talebi
about: Projeye yeni bir özellik talebinde bulun
---

#### Açıklama

<!--
Eklenmesini istediğiniz özelliği tek bir paragrafla açıklayın
-->
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/other.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: Diğer
about: Açacağınız kayıt diğer şablonlardan birine uymuyorsa bu şablonu kullanın
---

#### Açıklama

<!--
Kayıt ile ilgili açıklama yapın
-->
41 changes: 41 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#### Bu PR'in yaptığı işi/değişikliği ve bu işi/değişikliği neden yaptığını açıklayın

<!--
- Kısa ve net bir şekilde bu PR'e neden ihtiyaç var?
- Ne iş/değişiklik yapıyor?
-->

#### İlgili/kapatılacak iş kaydı

<!--
- PR merge edildiğinde hangi iş kayıtları kapatılacak ise `Closes`, `Fixes` gibi anahtar kelimeler ile birlikte ID numaralarını listele
- Kapatılmayan ancak referans verilecek iş kayıtları için `References` anahtar kelimesini kullan
Örnekler:
- Closes #ID
- Fixes #ID
- References #ID
-->

#### Veritabanına etkileri

<!--
PR merge edildiğinde veritabanını etkiliyorsa bu etkileri açıklayın
-->

#### Sistem etkileri

<!--
PR merge edildiğinde sunucular üzerinde herhangi bir düzenleme gerekecek mi?
Örnek: yeni paket kurulması, buildpack eklenmesi
-->

#### Ek içerik

<!--
Aşağıdaki gibi ek içerikler gerek görülürse eklenebilir
- Kaynaklar
- Dış bağlantılar
- Ekran görüntüleri
- Örnek çözümler
-->
23 changes: 23 additions & 0 deletions .github/workflows/brakeman.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: brakeman

on:
pull_request:
branches:
- '*'
push:
branches:
- main
- develop

jobs:
brakeman:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Ruby version specified in `.ruby-version`
uses: ruby/setup-ruby@v1
with:
bundler-cache: true

- name: Run brakeman
run: bundle exec brakeman
107 changes: 107 additions & 0 deletions .github/workflows/rspec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
name: rspec

on:
pull_request:
branches:
- '*'
push:
branches:
- main
- develop

jobs:
rspec:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:alpine
env:
POSTGRES_USER: pinmapper
POSTGRES_PASSWORD: pinmapper
POSTGRES_DB: pinmapper_test
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: redis:alpine
ports: ["6379:6379"]
options: --entrypoint redis-server
steps:
- uses: actions/checkout@v2
- name: Install Ruby version specified in `.ruby-version`
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Install required system packages
run: sudo apt-get update -y && sudo apt-get install openssh-client rsync libpq-dev cmake -y
- name: Install node
uses: actions/setup-node@v2
with:
node-version: 15.x
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache yarn cache
uses: actions/cache@v2
id: cache-yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Cache node_modules
id: cache-node-modules
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-${{ matrix.node-version }}-nodemodules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.node-version }}-nodemodules-
- name: Install yarn
run: yarn install
if: |
steps.cache-yarn-cache.outputs.cache-hit != 'true' ||
steps.cache-node-modules.outputs.cache-hit != 'true'
- name: Create database
env:
DATABASE_URL: postgres://pinmapper:pinmapper@localhost:5432/pinmapper_test
REDIS_URL: redis://localhost:6379/0
RAILS_ENV: test
RAILS_MASTER_KEY: ${{ secrets.RAILS_TEST_KEY }}
run: bundle exec rails db:prepare
- name: Run specs without system
env:
DATABASE_URL: postgres://pinmapper:pinmapper@localhost:5432/pinmapper_test
REDIS_URL: redis://localhost:6379/0
RAILS_ENV: test
RAILS_MASTER_KEY: ${{ secrets.RAILS_TEST_KEY }}
run: bundle exec rspec --exclude-pattern "**/system/*_spec.rb"
- name: Install ChromeDriver
run: |
CHROME_VERSION=$(google-chrome --version | cut -f 3 -d ' ' | cut -d '.' -f 1) \
&& CHROMEDRIVER_RELEASE=$(curl --location --fail --retry 3 http://chromedriver.storage.googleapis.com/LATEST_RELEASE_${CHROME_VERSION}) \
&& curl --silent --show-error --location --fail --retry 3 --output /tmp/chromedriver_linux64.zip "http://chromedriver.storage.googleapis.com/$CHROMEDRIVER_RELEASE/chromedriver_linux64.zip" \
&& cd /tmp \
&& unzip chromedriver_linux64.zip \
&& rm -rf chromedriver_linux64.zip \
&& sudo mv chromedriver /usr/local/bin/chromedriver \
&& sudo chmod +x /usr/local/bin/chromedriver \
&& chromedriver --version
- name: Run only system specs
env:
DATABASE_URL: postgres://pinmapper:pinmapper@localhost:5432/pinmapper_test
REDIS_URL: redis://localhost:6379/0
RAILS_ENV: test
RAILS_MASTER_KEY: ${{ secrets.RAILS_TEST_KEY }}
HEADLESS: true
run: bundle exec rspec spec/system
- name: Upload failure screenshots
uses: actions/upload-artifact@v2
if: failure()
with:
name: Failure screenshots
path: /home/runner/work/pinmapper/pinmapper/tmp/screenshots
23 changes: 23 additions & 0 deletions .github/workflows/rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: rubocop

on:
pull_request:
branches:
- '*'
push:
branches:
- main
- develop

jobs:
rubocop:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Ruby version specified in `.ruby-version`
uses: ruby/setup-ruby@v1
with:
bundler-cache: true

- name: Lint
run: bundle exec rubocop
26 changes: 24 additions & 2 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
require: rubocop-rails
require: rubocop-rspec
require:
- rubocop-rails
- rubocop-rspec

inherit_from:
- .rubocop_common.yml
Expand All @@ -12,8 +13,29 @@ RSpec/ContextWording:

Metrics/BlockLength:
IgnoredMethods: ['describe', 'context']
Exclude:
- 'spec/rails_helper.rb'

Lint/MissingSuper:
Exclude:
- 'app/components/**/*.rb'

RSpec/ExampleLength:
Max: 12

RSpec/MultipleExpectations:
Exclude:
- 'spec/system/**/*.rb'

RSpec/NestedGroups:
Max: 4

RSpec/RepeatedExample:
Exclude:
- 'spec/policies/**/*.rb'

AllCops:
NewCops: enable
Exclude:
- 'db/schema.rb'
- 'vendor/bundle/**/*'
Expand Down
11 changes: 11 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,26 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby File.read('.ruby-version')

gem 'acts-as-taggable-on'
gem 'acts_as_votable'
gem 'aws-sdk-s3', require: false
gem 'bootsnap', require: false
gem 'devise'
gem 'draper'
gem 'geocoder'
gem 'hotwire-rails'
gem 'image_processing'
gem 'inline_svg'
gem 'jbuilder'
gem 'pg'
gem 'puma'
gem 'pundit'
gem 'rails'
gem 'redis'
gem 'sass-rails'
gem 'simple_form'
gem 'translate_enum'
gem 'view_component', require: 'view_component/engine'
gem 'webpacker'

group :development, :test do
Expand All @@ -33,6 +43,7 @@ end
group :development do
gem 'better_errors'
gem 'binding_of_caller'
gem 'brakeman'
gem 'listen'
gem 'rack-mini-profiler'
gem 'spring'
Expand Down
Loading

0 comments on commit 272238e

Please sign in to comment.