Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release - 0.1.0 #34

Merged
merged 33 commits into from
Jun 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
588bee5
Configure test GitHub Action
malparty Jun 4, 2021
2597e34
Configure test GitHub Action
malparty Jun 4, 2021
8991277
Add Test status image into Readme.md
malparty Jun 4, 2021
448a2fb
Add GITHUB_TOKEN into heroku deploy GitHub Action
malparty Jun 4, 2021
bfb22a3
Fix Heroku App Name in Deploy GitHub Action
malparty Jun 4, 2021
f5db902
[#21] Reset repository to start again with PR convention
malparty Jun 7, 2021
82bb04c
[#21] Reset repository to start again with PR convention
malparty Jun 7, 2021
a2ad7ad
[#21] Reset repository to start again with PR convention
malparty Jun 7, 2021
d7eabc3
[#1] Deploy Nimble rails template with Devise and Bootstrap options
malparty Jun 7, 2021
2d8c333
[#1] Add app introduction to the README.md
malparty Jun 8, 2021
fd66c40
[#1] Fix warnings from git-action with rubocop auto-fix
malparty Jun 8, 2021
39a95ba
[#1] Remove trailing whitespaces from git-action comments
malparty Jun 8, 2021
75c0451
[#1] Add explicit node version to prevent issues
malparty Jun 8, 2021
6ee39d3
[#1] Add new line at the end of Procfiles and .rspec files following …
malparty Jun 8, 2021
5552287
Merge pull request #30 from malparty/chore/project-init
malparty Jun 8, 2021
86cff45
[#2] Configure Github Token for Docker Registery
malparty Jun 8, 2021
7043772
Merge pull request #31 from malparty/chore/setup-unit-tests
malparty Jun 8, 2021
c2aa3e5
[#4] Fix name of Heroku app and use GitHub token for Docker Registry
malparty Jun 8, 2021
6977569
[#4] Fix develop branch name for production test workflow
malparty Jun 8, 2021
9478cca
[#4] Update precompiled ENV variable to fix app crash on Heroku
malparty Jun 8, 2021
565cea9
[#4] Reset SECRET_KEY_BASE and add defaults for docker_build in datab…
malparty Jun 8, 2021
5e4c4b1
[#4] Add default route and empty controller-view to test deployment
malparty Jun 9, 2021
5962a2e
[#4] Remove unused tests and helpers
malparty Jun 9, 2021
f310bfd
[#4] Rename keyword controller to plural and use resources base route
malparty Jun 9, 2021
5699040
[#4] Re-add root route
malparty Jun 9, 2021
95ba16a
Merge branch 'develop' into chore/setup-deployment
malparty Jun 10, 2021
8d72780
[#4] Add new line after root route
malparty Jun 10, 2021
158b80a
[#4] Remove new line after root route
malparty Jun 10, 2021
5047a67
[#4] Remove trailing space
malparty Jun 10, 2021
ce4f855
[#4] Pull from GitHub
malparty Jun 10, 2021
6854d81
[#4] Add staging/prod url in Readme.me
malparty Jun 10, 2021
b010fbd
[#4] Add aboud at the end of Readme.md
malparty Jun 10, 2021
98a6af2
Merge pull request #32 from malparty/chore/setup-deployment
malparty Jun 10, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/deploy_heroku.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ on:
branches:
- master
- main
- development
- develop
types:
- completed
workflow_dispatch:

env:
DOCKER_REGISTRY_HOST: ${{ secrets.DOCKER_REGISTRY_HOST }}
DOCKER_REGISTRY_USERNAME: ${{ github.repository_owner }}
DOCKER_REGISTRY_TOKEN: ${{ secrets.DOCKER_REGISTRY_TOKEN }}
DOCKER_REGISTRY_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCKER_IMAGE: ${{ github.repository }}
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}

Expand All @@ -42,9 +42,9 @@ jobs:
run: |
if [[ $BRANCH_TAG = "latest" ]]
then
echo "HEROKU_APP=google_search_ruby" >> $GITHUB_ENV
echo "HEROKU_APP=google-search-ruby" >> $GITHUB_ENV
else
echo "HEROKU_APP=google_search_ruby-staging" >> $GITHUB_ENV
echo "HEROKU_APP=google-search-ruby-staging" >> $GITHUB_ENV
fi

- name: Login to Docker registry
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/review_code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '14.15.4'
node-version: '14.17.0'

- name: Get yarn cache directory path
id: yarn-cache-dir-path
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on: push
env:
DOCKER_REGISTRY_HOST: ${{ secrets.DOCKER_REGISTRY_HOST }}
DOCKER_REGISTRY_USERNAME: ${{ github.repository_owner }}
DOCKER_REGISTRY_TOKEN: ${{ secrets.DOCKER_REGISTRY_TOKEN }}
DOCKER_REGISTRY_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCKER_IMAGE: ${{ github.repository }}

# Set the default docker-compose file
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_production_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches-ignore:
- master
- main
- development
- develop

env:
DOCKER_REGISTRY_HOST: ${{ secrets.DOCKER_REGISTRY_HOST }}
Expand Down
2 changes: 1 addition & 1 deletion .rspec
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
--color
--require spec_helper
--format documentation
--format documentation
3 changes: 0 additions & 3 deletions Dangerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ suggester.suggest
# Runs ESLint on modified and added files in the PR
eslint.lint

# Runs slim-lint on modified and added files in the PR
slim_lint.lint

# Report your Ruby app test suite code coverage in Danger.
simplecov.report 'coverage/coverage.json'

Expand Down
4 changes: 0 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ gem 'pundit' # Minimal authorization through OO design and pure Ruby classes
gem 'webpacker', '~>5.2.0' # Transpile app-like JavaScript
gem 'sass-rails' # SASS

# Templating
gem 'slim' # light weight template engine

# Translations
# gem 'devise-i18n' # Translations for Devise
# gem 'rails-i18n', '~> 6.0.0' # Translations for Rails
Expand Down Expand Up @@ -58,7 +55,6 @@ group :development, :test do

gem 'undercover' # Report missing test coverage in new changes
gem 'danger' # Automated code review.
gem 'danger-slim_lint' # Lint slim files.
gem 'danger-eslint' # ESLint
gem 'scss_lint' # SCSS lint
gem 'danger-rubocop' # A Danger plugin for Rubocop.
Expand Down
18 changes: 3 additions & 15 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ GEM
sexp_processor
coderay (1.1.3)
colored2 (3.1.2)
concurrent-ruby (1.1.8)
concurrent-ruby (1.1.9)
connection_pool (2.2.5)
cork (0.3.0)
colored2 (~> 3.1)
Expand Down Expand Up @@ -132,14 +132,11 @@ GEM
danger-reek (0.3.0)
danger-plugin-api (~> 1.0)
reek (>= 3.6, < 7.0)
danger-rubocop (0.9.4)
danger-rubocop (0.9.5)
danger
rubocop (~> 1.0)
danger-simplecov_json (0.3.0)
danger-plugin-api (~> 1.0)
danger-slim_lint (0.1.2)
danger-plugin-api (~> 1.0)
slim_lint (~> 0.11)
danger-suggester (0.1.0)
danger
git_diff
Expand Down Expand Up @@ -212,7 +209,7 @@ GEM
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
loofah (2.9.1)
loofah (2.10.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.1)
Expand Down Expand Up @@ -412,12 +409,6 @@ GEM
simplecov
simplecov-lcov (0.8.0)
simplecov_json_formatter (0.1.3)
slim (4.1.0)
temple (>= 0.7.6, < 0.9)
tilt (>= 2.0.6, < 2.1)
slim_lint (0.21.1)
rubocop (>= 0.78.0)
slim (>= 3.0, < 5.0)
spring (2.1.1)
spring-commands-rspec (1.0.4)
spring (>= 0.9.1)
Expand All @@ -431,7 +422,6 @@ GEM
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
temple (0.8.2)
terminal-table (3.0.1)
unicode-display_width (>= 1.1.1, < 3)
thor (1.1.0)
Expand Down Expand Up @@ -486,7 +476,6 @@ DEPENDENCIES
danger-reek
danger-rubocop
danger-simplecov_json
danger-slim_lint
danger-suggester
danger-undercover
database_cleaner
Expand Down Expand Up @@ -525,7 +514,6 @@ DEPENDENCIES
simplecov
simplecov-json
simplecov-lcov
slim
spring
spring-commands-rspec
spring-watcher-listen (= 2.0.1)
Expand Down
2 changes: 1 addition & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
web: bin/rails server -p $PORT -e $RAILS_ENV
worker: bundle exec sidekiq -C config/sidekiq.yml
worker: bundle exec sidekiq -C config/sidekiq.yml
2 changes: 1 addition & 1 deletion Procfile.dev
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
web: rails s -p 3000 -b '0.0.0.0'
worker: bundle exec sidekiq -C config/sidekiq.yml
webpack: yarn && bin/webpack-dev-server
webpack: yarn && bin/webpack-dev-server
29 changes: 18 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
[![Build Status](CI_BADGE_URL goes here)](REPO_URL goes here)

[![Build Status](https://img.shields.io/github/workflow/status/malparty/google-search-ruby/Test)](https://github.com/malparty/google-search-ruby)
## Introduction

> *App introduction goes here ...*
> Google Search Ruby is a Web app that extract large amounts of data from the Google search results page.
> Feed it with a CSV File containing your keywords, and the app will do the rest for you!

## Web Application

[Staging](https://google-search-ruby-staging.herokuapp.com/)

[Production](https://google-search-ruby.herokuapp.com/)

## Project Setup

### Prerequisites

- Ruby version: 2.7.2
- Node version: 14.15.4
- Node version: 14.17.0

### Docker

Expand Down Expand Up @@ -86,13 +92,6 @@ docker push $DOCKER_IMAGE:$BRANCH_TAG
docker-compose -f docker-compose.test.yml run test bin/bundle exec rake db:test:prepare
```

#### Semaphore CI 2.0

To setup the semaphore CI 2.0 for the project, please follow [this guideline](.semaphore/README.md)

#### Github actions

To setup Github actions for the project, please follow [this guideline](.github/README.md)

### Test

Expand Down Expand Up @@ -121,3 +120,11 @@ rspec [rspec-params]

- Create a [Personal Access Token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token)
from bot account with `public_repo` scope, and set it as `DANGER_GITHUB_API_TOKEN` secret on the CI Environment Settings.


## About
![Nimble](https://assets.nimblehq.co/logo/dark/logo-dark-text-160.png)

This project is created to complete **Web Certification Path** using **Ruby** at [Nimble][nimble]

[nimble]: https://nimblehq.co
5 changes: 5 additions & 0 deletions app/controllers/keywords_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# frozen_string_literal: true

class KeywordsController < ApplicationController
def index; end
end
1 change: 0 additions & 1 deletion app/javascript/packs/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import 'core-js/stable';
import 'regenerator-runtime/runtime';

import 'vendor/bootstrap';
import 'translations/translations';

import 'initializers/';
import 'screens/';
Expand Down
2 changes: 2 additions & 0 deletions app/views/keywords/index.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<h1>Keywords#index</h1>
<p>Find me in app/views/keyword/index.html.erb</p>
6 changes: 3 additions & 3 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@ class Application < Rails::Application
#
# config.time_zone = "Central Time (US & Canada)"
# config.eager_load_paths << Rails.root.join("extras")

# Set the queuing backend to `Sidekiq`
#
#
# Be sure to have the adapter's gem in your Gemfile
# and follow the adapter's specific installation
# and deployment instructions.
config.active_job.queue_adapter = :sidekiq

# Prefix the queue name of all jobs with Rails ENV
config.active_job.queue_name_prefix = Rails.env

# Compress the responses to reduce the size of html/json controller responses.
config.middleware.use Rack::Deflater

Expand Down
2 changes: 1 addition & 1 deletion config/credentials.yml.enc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
C7fTW22V6bxJ54gTa64UMQHZ+la6UAVfrhg1Ggs+Af3kwt1XI26hUBelqZGad2aHYIR2jzAB2HRo0i8VONdzYepaHC8eVKvCzYDIlmUaAzfQcPRpH3uE9SBp2rL7GgGUzPV2Q4nA6LrInyaCiz0nubDqzIkysCiBpJyxBMhOWkTYx6477p7Zwa1klliHhUnr6YLugjU8yMdoXXfSE/z5uHFZCNf/Hq9/fI2rKJfxVPtelSJARBUp7Avnrr6Yx+2qAlqjXOoY+nhrFg/zVnt0xAuH4LHrTRmbJbqptWfmiAXk3veLOk8Qx84GOSvvL85Q+yw1G2UNDvbsHONoc0opsotAFTEZqCb2lJkJFkyXifbjWsymd/afOazQbCzqjjlRlvBfZr0LMo3+hQeH64mabxWo84Yj28DCOuhR--15KkkbtGriL11HNE--EHzTlWUM16LAK1b3Y221Xg==
0WQWQZQTrp7dqRMxvLcMEkgakpnKTJH0P5XKfsCI+yRBHZbkgqkd8jNc/k5IExdxHh4tPZ0AV75KH/0I5hNIBL2t/5WCbQvQ+h13J2oKu7Dsc0SlT/fzb85NNyoilHLyUyE8+tXVVukWo8YhEX4Ju3B0zAscvP/vaihSvnuq2eKFSucMuKxDW6dGbBXDEXxBWlKmzQFhkYwcMN1kR8HcfH/vmZ2IljbA9KtaFHJIFV8nAuITyMk4GcYDKHhepM4WUIC+X0+RYpyO2cp1X90LbOb/DhOFAfk2Atnnn+A8i+r1hPL0qbo9sB4knkUinm9KdE9Z9KhFygO4M0nGZO73gevIpnk1qRYy6oQav+amwGvtpac5tvY4PJACtWoapk7wk/4Js/rmFc89kPEtMrTkTT2BeaOVEstBHvXs--1iGITiedGODyuw/L--Apk0Kyh8rabSqGkggVvwYQ==
1 change: 1 addition & 0 deletions config/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ test:
database: <%= ENV['DB_NAME'] %>_test

production:
<<: *default
url: <%= ENV['DATABASE_URL'] %>
6 changes: 3 additions & 3 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@

config.action_mailer.asset_host = ENV.fetch('MAILER_DEFAULT_HOST')

config.action_mailer.default_url_options = {
host: ENV.fetch('MAILER_DEFAULT_HOST'),
config.action_mailer.default_url_options = {
host: ENV.fetch('MAILER_DEFAULT_HOST'),
port: ENV.fetch('MAILER_DEFAULT_PORT')
}

Expand Down Expand Up @@ -82,7 +82,7 @@

# Uncomment if you wish to allow Action Cable access from any origin.
# config.action_cable.disable_request_forgery_protection = true

# Configure Bullet gem to detect N+1 queries
config.after_initialize do
Bullet.enable = true
Expand Down
6 changes: 3 additions & 3 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@

config.action_mailer.asset_host = ENV.fetch('MAILER_DEFAULT_HOST')

config.action_mailer.default_url_options = {
host: ENV.fetch('MAILER_DEFAULT_HOST'),
config.action_mailer.default_url_options = {
host: ENV.fetch('MAILER_DEFAULT_HOST'),
port: ENV.fetch('MAILER_DEFAULT_PORT')
}

Expand All @@ -77,7 +77,7 @@

# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
# the I18n.default_locale when a translation cannot be found).


# Send deprecation notices to registered listeners.
config.active_support.deprecation = :notify
Expand Down
6 changes: 3 additions & 3 deletions config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@

config.action_mailer.perform_caching = false

config.action_mailer.default_url_options = {
host: ENV.fetch('MAILER_DEFAULT_HOST'),
config.action_mailer.default_url_options = {
host: ENV.fetch('MAILER_DEFAULT_HOST'),
port: ENV.fetch('MAILER_DEFAULT_PORT')
}

Expand All @@ -64,7 +64,7 @@

# Annotate rendered view with file names.
# config.action_view.annotate_rendered_view_with_filenames = true

# Configure Bullet gem to detect N+1 queries
config.after_initialize do
Bullet.enable = true
Expand Down
4 changes: 2 additions & 2 deletions config/initializers/devise.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# confirmation, reset password and unlock tokens in the database.
# Devise will use the `secret_key_base` as its `secret_key`
# by default. You can change it below and use your own secret key.
# config.secret_key = 'c1e531f02718530779407895b22a4755c891ffeb5356f16d722c0f1556717e7c0bd6b55639943aaa97ee83fcc57d2516250ae5a3bdec6499452f94e531cc2aaf'
# config.secret_key = 'f348bbe918c76de800c29954f5487163583040a9f5adc22632d22ee01fac0f32e232f846f70376ab57da0bf090c73d7a038043ca7efabcee312b9d4f3cf59c1c'

# ==> Controller configuration
# Configure the parent class to the devise controllers.
Expand Down Expand Up @@ -126,7 +126,7 @@
config.stretches = Rails.env.test? ? 1 : 12

# Set up a pepper to generate the hashed password.
# config.pepper = '4d08248e377aff977ddba0ec8a11a6c519b4ff0082cd93ca59235fe00551803d9bc83ac8012869777af1d9313574b495209dc8603e1e1bc066587fe5b7b00cc4'
# config.pepper = '55e0e1c6e6e8574066550c2b3bad10b302b7066ce62b3cb92f452fdbdfdc508883147f86562f92413292ec7b60d252c47534d0573cc4964029f3094d2ab32167'

# Send a notification to the original email when the user's email is changed.
# config.send_email_changed_notification = false
Expand Down
3 changes: 3 additions & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
Rails.application.routes.draw do
root to: 'keywords#index'

resources :keywords, only: :index
# For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html
end
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
"lint": "eslint . --color",
"lint:fix": "eslint . --color --fix"
},
"engines": {
"node": ">=14.17.0 <15"
},
"dependencies": {
"@babel/preset-typescript": "7.13.0",
"@rails/actioncable": "^6.0.0",
Expand Down
Empty file added spec/helpers/.keep
Empty file.
Empty file added spec/views/.keep
Empty file.