Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
132 commits
Select commit Hold shift + click to select a range
379211b
just create README for PR
Leenday Sep 9, 2020
bfbcd4a
added docker-compose.yml to the app
Leenday Sep 10, 2020
fc381e5
added db
Leenday Sep 11, 2020
37c7dad
set up gems and tests with linter
Leenday Sep 28, 2020
b9b73dd
generate models and write tests with factories
Leenday Oct 10, 2020
b0a3270
add associations and validations
Leenday Oct 11, 2020
2ade999
add a state_machine gem and states to task
Leenday Oct 13, 2020
a5cbc73
described all states
Leenday Oct 22, 2020
20b09a0
Merge pull request #2 from Leenday/feature/docker-compose
Leenday Oct 25, 2020
d9b21db
Merge branch 'develop' into feature/pg
Leenday Oct 25, 2020
ce8229f
Merge pull request #3 from Leenday/feature/pg
Leenday Oct 25, 2020
4488fc2
Merge pull request #5 from Leenday/feature/models
Leenday Oct 25, 2020
7be77d9
Merge branch 'develop' into feature/gemfile
Leenday Oct 25, 2020
676906b
Merge pull request #4 from Leenday/feature/gemfile
Leenday Oct 25, 2020
916f274
take out state-machine gem
Leenday Nov 16, 2020
5fdca4f
Merge pull request #7 from Leenday/feature/state-machine
Leenday Nov 16, 2020
a992a76
generates controllers, add tests and add string sequence
Leenday Oct 25, 2020
9315dff
resolve conflicts
Leenday Oct 25, 2020
8e8d34a
add layout to task manager project
Leenday Oct 25, 2020
0c3d828
took out slim-rails
Leenday Nov 17, 2020
4a8fb8e
Merge pull request #8 from Leenday/feature/controllers
Leenday Nov 17, 2020
8179888
resolve conflicts
Leenday Oct 25, 2020
de31b04
fix error while rails console start: uninitialized constant SimpleFor…
Leenday Oct 26, 2020
029f07d
session form, test and controller
Leenday Oct 26, 2020
0732511
took out gem simple-form and rebase develop branch
Leenday Nov 17, 2020
82a2b3f
deleted commented line and fix rubocop warnings
Leenday Nov 19, 2020
bd2fc16
Merge pull request #9 from Leenday/feature/session
Leenday Nov 19, 2020
7263ed5
resolve conflicts
Leenday Oct 25, 2020
a6e5e8f
session form, test and controller
Leenday Oct 26, 2020
3ebdf93
add developers test, layout, controller and module
Leenday Oct 26, 2020
cc0e6fa
session form, test and controller
Leenday Oct 26, 2020
49b80ea
deletes session route and run bundle install
Leenday Nov 22, 2020
09500cc
Merge pull request #10 from Leenday/feature/user
Leenday Nov 23, 2020
86eca71
resolve conflicts
Leenday Oct 25, 2020
396f873
add sign in/up
Leenday Oct 26, 2020
d69b2cc
session form, test and controller
Leenday Oct 26, 2020
4514f58
add developers test, layout, controller and module
Leenday Oct 26, 2020
2b3f8b9
fix TaskTest#test_create failure
Leenday Oct 27, 2020
1bdebf2
Merge pull request #11 from Leenday/feature/links
Leenday Nov 25, 2020
8f9744a
resolve conflicts
Leenday Oct 25, 2020
eef89d0
session form, test and controller
Leenday Oct 26, 2020
0668640
session form, test and controller
Leenday Oct 26, 2020
9356f1f
add developers test, layout, controller and module
Leenday Oct 26, 2020
d3999f6
adds gems
Leenday Oct 27, 2020
b6b0de6
adds users page
Leenday Oct 28, 2020
e346bbe
adds authorization
Leenday Oct 28, 2020
b837f05
users list
Leenday Oct 28, 2020
8ea99b8
adds CRU for users
Leenday Oct 28, 2020
172eb4a
add (D)elete for users
Leenday Oct 28, 2020
4ab704c
403 and current user
Leenday Oct 28, 2020
d1bb711
add authentication for user
Leenday Oct 28, 2020
6c1aff2
refactor step
Leenday Oct 29, 2020
df6d48c
add seed
Leenday Oct 29, 2020
4743397
rearrange gems and took out tests
Leenday Nov 27, 2020
431df0c
Merge pull request #12 from Leenday/feature/admin_panel
Leenday Nov 29, 2020
8e5fd4c
Add a Dockerfile
Leenday Nov 30, 2022
86af1f8
Add a Dockerfile
Leenday Nov 30, 2022
f610bad
Merge pull request #13 from Leenday/feature/docker
Leenday Dec 5, 2022
6954b95
add sign in/up
Leenday Oct 26, 2020
a692063
session form, test and controller
Leenday Oct 26, 2020
5ed32e5
add developers test, layout, controller and module
Leenday Oct 26, 2020
906e29c
adds gems
Leenday Oct 27, 2020
71829eb
adds a routes
Leenday Dec 7, 2022
fa7d233
adds a tests for tasks controller
Leenday Dec 7, 2022
9566281
adds a controllers with actions
Leenday Dec 7, 2022
ff9fbc9
adds a responder and serializer
Leenday Dec 7, 2022
58aadc2
edit ports and build process for docker
Leenday Dec 7, 2022
e423502
edit sequence and rubocop warning
Leenday Dec 7, 2022
d58824e
edit gemfiles after rebase and rebult containers
Leenday Dec 7, 2022
3f94649
edit database.yml because of warning
Leenday Dec 7, 2022
95f3bdf
environment preps for frontend
Leenday Dec 7, 2022
e2ad650
adds packages and rules for eslint
Leenday Dec 7, 2022
6247ad8
adds an uffizzi
Leenday Dec 8, 2022
f0f2341
Merge pull request #16 from Leenday/feature/uffizzi
Leenday Dec 8, 2022
fa5f2ef
add a Makefile
Leenday Dec 7, 2022
a0f0cbd
delete unused tests and moved "#respond_to" method
Leenday Dec 12, 2022
e0b0cf0
Merge pull request #15 from Leenday/feature/js
Leenday Dec 12, 2022
ba7a836
Merge pull request #14 from Leenday/feature/api
Leenday Dec 12, 2022
f3161c6
adds an uffizzi`s config and edit dockerfile and docker-compose files
Leenday Dec 8, 2022
9c621b9
add webpacker-react gem
Leenday Dec 12, 2022
69c6a3a
install react-kanban and styled-components
Leenday Dec 12, 2022
caa61f0
add a TaskBoard component
Leenday Dec 12, 2022
5443bf0
env settings for webpack
Leenday Dec 12, 2022
ac28636
Merge pull request #17 from Leenday/feature/kanban
Leenday Dec 15, 2022
ac2625e
setup for exercise
Leenday Dec 13, 2022
b5e821c
adds a js_routes
Leenday Dec 15, 2022
7dbd67e
display tasks
Leenday Dec 15, 2022
ca9a390
Add a component ColumnHeader, disable rule in propTypes and create ra…
Leenday Dec 16, 2022
af5b2ab
Add an dragging feature cards and update
Leenday Dec 16, 2022
90f129c
Add a popup window, rework sort for tasks and add a feature to add tasks
Leenday Dec 17, 2022
98ba6b9
Add a edit popup window, destroy/edit features for cards
Leenday Dec 17, 2022
cab0328
changes after review
Leenday Dec 19, 2022
8f1e1c1
Merge pull request #18 from Leenday/feature/tasks
Leenday Dec 22, 2022
d518cef
add a github with badge and docker-compose
Leenday Dec 24, 2022
13fb8d9
adds a simplecov setup and gem
Leenday Dec 25, 2022
b2e87b1
reset uffizzi
Leenday Dec 26, 2022
43195e8
Merge branch 'develop' into feature/uffizzi
Leenday Dec 26, 2022
826ab9d
Merge pull request #24 from Leenday/feature/uffizzi
Leenday Dec 26, 2022
6404856
add a react-select package
Leenday Dec 20, 2022
5f9c72d
add a routes, test, controller and serializer
Leenday Dec 20, 2022
e98102b
add a select for addPopup and EditPopup, add js_routes and styles
Leenday Dec 20, 2022
09301c5
add presenters and propTypes
Leenday Dec 20, 2022
21aba08
fix author if no author was chosen in select, when task was created
Leenday Dec 20, 2022
3a2d0f0
adds a presenters to all tasks
Leenday Dec 26, 2022
f3e2d5e
Merge pull request #19 from Leenday/feature/assignee
Leenday Dec 26, 2022
88f4200
merge after rebase feature/redux on develop
Leenday Dec 23, 2022
e39fc67
rebasing feature/redux on develop
Leenday Dec 23, 2022
5bd8676
add a redux, redux-toolkit and react-redux packages
Leenday Dec 24, 2022
4fb78a8
rebasing feature/redux on develop
Leenday Dec 24, 2022
3df6cf5
fixes after rebase
Leenday Dec 26, 2022
4c6153f
fix errors and delete components
Leenday Dec 26, 2022
b332610
Merge pull request #22 from Leenday/feature/devops/actions
Leenday Dec 27, 2022
d539b65
add a statement to run tests
Leenday Dec 27, 2022
c954adf
adds bullet gem and config for it. And include in quiery
Leenday Dec 27, 2022
aed7d6e
add bullet to test env too
Leenday Dec 27, 2022
56284ea
adds a rollbar to rails
Leenday Dec 28, 2022
c7044a7
add a newrelic
Leenday Dec 28, 2022
5309569
change env access_token usage to rails credentials
Leenday Dec 28, 2022
42cbf5b
Merge pull request #20 from Leenday/feature/redux
Leenday Jan 2, 2023
3fc76f8
Merge branch 'develop' into feature/devops/simplecov
Leenday Jan 2, 2023
7c72350
Merge pull request #23 from Leenday/feature/devops/simplecov
Leenday Jan 2, 2023
1ffdc3c
add a render to project for deploy
Leenday Dec 25, 2022
9c848b9
Resolve rebasing conflicts
Leenday Dec 26, 2022
bf1b3a3
fix seeds and tasks width
Leenday Dec 27, 2022
6e38a41
fix empty columns width
Leenday Dec 27, 2022
0ffad23
Merge pull request #26 from Leenday/feature/devops/bullet
Leenday Jan 2, 2023
29d454d
add a fake keys to docker-compose and rollbar_access_token from env v…
Leenday Jan 2, 2023
0afda6e
adds a env variable for newrelic
Leenday Jan 2, 2023
9f0f0ad
Merge pull request #27 from Leenday/feature/devops/rollbar
Leenday Jan 10, 2023
88b4f73
Merge branch 'develop' into feature/devops/newrelic
Leenday Jan 10, 2023
1056711
Merge pull request #28 from Leenday/feature/devops/newrelic
Leenday Jan 10, 2023
e4ee73a
Merge pull request #25 from Leenday/feature/devops/production
Leenday Jan 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/.git
/.vscode
node_modules
app/javascript/routes/ApiRoutes.js
55 changes: 55 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"parser": "@babel/eslint-parser",
"extends": ["airbnb", "prettier"],

"env": {
"browser": true,
"node": true,
"es6": true
},

"plugins": ["react", "filenames", "prettier"],

"globals": {
"gon": true,
"__CLIENT__": true,
"__SERVER__": true
},

"settings": {
"import/extensions": [".js", ".jsx"],
},

"rules": {
"prettier/prettier": [ 2 , {
"singleQuote": true,
"trailingComma": "all",
"printWidth": 128
}],
"max-len": [
"error",
{
"code": 120
}
],
"no-param-reassign": ["error", { "props": true, "ignorePropertyModificationsFor": ["state"] }],
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
"react/require-default-props": "off",
"import/no-unresolved": ["off"],
"import/no-absolute-path": ["off"],
"import/order": ["off"],
"import/no-duplicates": ["off"],
"import/no-extraneous-dependencies": ["off"],
"import/first": ["off"],
"import/no-named-as-default-member": ["off"],
"import/no-named-as-default": ["off"],
"import/prefer-default-export": ["off"],
"import/extensions": ["off"],
"react/no-array-index-key": ["off"],
"filenames/match-exported": 2,
"react/prop-types": [2, { "ignore": ["classes", "match", "dictionaries", "errors", "history", "children", "location"] }],
"no-debugger": 1,
"react/destructuring-assignment": 0,
"react/static-property-placement": 0
}
}
20 changes: 20 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Main

on:
pull_request:
branches:
- "develop"
push:
branches:
- "develop"

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run tests
env:
COVERAGE: true
RAILS_ENV: test
run: docker-compose --file docker-compose.ci.yml run ci
100 changes: 100 additions & 0 deletions .github/workflows/uffizzi-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: Build Images and Deploy Preview Environment

on:
pull_request:
types: [opened, reopened, synchronize, closed]

jobs:
build-app:
name: Build and Push `app`
runs-on: ubuntu-latest
if: ${{ github.event_name != 'pull_request' || github.event.action != 'closed' }}
outputs:
tags: ${{ steps.meta.outputs.tags }}
steps:
- name: Checkout git repo
uses: actions/checkout@v3
- name: Generate UUID image name
id: uuid
run: echo "::set-output name=uuid::$(uuidgen)"
- name: Docker metadata
id: meta
uses: docker/metadata-action@v3
with:
# An anonymous, emphemeral registry built on ttl.sh
images: registry.uffizzi.com/${{ steps.uuid.outputs.uuid }}
tags: type=raw,value=24h
- name: Build and Push Image to Uffizzi Ephemeral Registry
uses: docker/build-push-action@v2
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
context: .

render-compose-file:
name: Render Docker Compose File
runs-on: ubuntu-latest
needs:
- build-app
outputs:
compose-file-cache-key: ${{ steps.hash.outputs.hash }}
compose-file-cache-path: docker-compose.rendered.yml
steps:
- name: Checkout git repo
uses: actions/checkout@v3
- name: Render Compose File
run: |
APP_IMAGE=$(echo ${{ needs.build-app.outputs.tags }})
export APP_IMAGE
DATABASE_USERNAME=postgres
DATABASE_PASSWORD=postgres
RAILS_PORT=3000
ROLLBAR_ACCESS_TOKEN=fake
NEWRELIC_LICENSE_KEY=fake
export DATABASE_USERNAME
export DATABASE_PASSWORD
export RAILS_PORT
export ROLLBAR_ACCESS_TOKEN
export NEWRELIC_LICENSE_KEY
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
export POSTGRES_USER
export POSTGRES_PASSWORD
# Render simple template from environment variables.
envsubst < docker-compose.uffizzi.yml > docker-compose.rendered.yml
cat docker-compose.rendered.yml
- name: Hash Rendered Compose File
id: hash
run: echo "::set-output name=hash::$(md5sum docker-compose.rendered.yml | awk '{ print $1 }')"
- name: Cache Rendered Compose File
uses: actions/cache@v3
with:
path: docker-compose.rendered.yml
key: ${{ steps.hash.outputs.hash }}

deploy-uffizzi-preview:
name: Use Remote Workflow to Preview on Uffizzi
needs: render-compose-file
uses: UffizziCloud/preview-action/.github/workflows/reusable.yaml@v2
with:
compose-file-cache-key: ${{ needs.render-compose-file.outputs.compose-file-cache-key }}
compose-file-cache-path: ${{ needs.render-compose-file.outputs.compose-file-cache-path }}
server: https://app.uffizzi.com/
permissions:
contents: read
pull-requests: write
id-token: write

delete-uffizzi-preview:
name: Use Remote Workflow to Delete an Existing Preview
uses: UffizziCloud/preview-action/.github/workflows/reusable.yaml@v2
if: ${{ github.event_name == 'pull_request' && github.event.action == 'closed' }}
with:
compose-file-cache-key: ""
compose-file-cache-path: docker-compose.rendered.yml
server: https://app.uffizzi.com/
permissions:
contents: read
pull-requests: write
id-token: write
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@
/yarn-error.log
yarn-debug.log*
.yarn-integrity
coverage
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM ruby:2.7.1-alpine

ARG RAILS_ROOT=/app
ARG PACKAGES="vim openssl-dev postgresql-dev build-base curl nodejs yarn less tzdata git postgresql-client bash screen"
ARG RAILS_ROOT=/task_manager
ARG PACKAGES="vim openssl-dev postgresql-dev build-base curl nodejs yarn less tzdata git postgresql-client bash screen gcompat python2"

RUN apk update \
&& apk upgrade \
Expand All @@ -21,5 +21,5 @@ RUN yarn install --frozen-lockfile
ADD . $RAILS_ROOT
ENV PATH=$RAILS_ROOT/bin:${PATH}

EXPOSE 3000
CMD bundle exec rails s -b '0.0.0.0' -p 3000:
EXPOSE 3330
CMD bundle exec rails s -b '0.0.0.0' -p 3330
25 changes: 21 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,32 +18,49 @@ gem 'jbuilder', '~> 2.7'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 4.0'
# Use Active Model has_secure_password
# gem 'bcrypt', '~> 3.1.7'
gem 'bcrypt', '~> 3.1.7'

# Use Active Storage variant
# gem 'image_processing', '~> 1.2'

# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.4.2', require: false

gem 'active_model_serializers'
gem 'js-routes'
gem 'kaminari'
gem 'newrelic-infinite_tracing'
gem 'newrelic_rpm'
gem 'ransack'
gem 'responders'
gem 'rollbar'
gem 'simple_form'
gem 'slim-rails'
gem 'state_machines-activerecord'
gem 'webpacker-react'

group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
gem 'bullet'
gem 'byebug', platforms: %i[mri mingw x64_mingw]
gem 'factory_bot_rails'
gem 'rubocop'
end

group :development do
# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
gem 'web-console', '>= 3.3.0'
gem 'listen', '~> 3.2'
gem 'web-console', '>= 3.3.0'
end

group :test do
# Adds support for Capybara system testing and selenium driver
gem 'capybara', '>= 2.15'
gem 'selenium-webdriver'
# Easy installation and use of web drivers to run system tests with browsers
gem 'simplecov', require: false
gem 'webdrivers'
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
# gem 'tzinfo-data', platforms: %i[mingw mswin x64_mingw jruby]
Loading