Skip to content
This repository has been archived by the owner on Nov 7, 2024. It is now read-only.

Desafio Técnico #134

Open
wants to merge 34 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
a1deec4
Update README.md
Feb 4, 2021
5415f19
Merge branch 'master' of https://github.com/bihellzin/github-search
bihellzin Jan 11, 2023
43f3ec5
scaffold language
bihellzin Jan 12, 2023
07a621f
scaffold repository
bihellzin Jan 12, 2023
a0caeac
adds association to language
bihellzin Jan 12, 2023
77c0bbc
fix mistyped attribute
bihellzin Jan 12, 2023
38cf8c9
gets data from github api and save in database
bihellzin Jan 13, 2023
d74ae54
adds more data to results page
bihellzin Jan 13, 2023
1019465
removes bracket notation and change api url
bihellzin Jan 13, 2023
b04a5a7
removes unecessary code and files
bihellzin Jan 14, 2023
b14b56b
adds tailwindcss
bihellzin Jan 14, 2023
7c59638
set app root route
bihellzin Jan 14, 2023
ae162d5
adds not null constraint to language name column
bihellzin Jan 14, 2023
1e4276d
adds rspec and language model test
bihellzin Jan 14, 2023
141d71a
adds style to languages index and link to repo details
bihellzin Jan 14, 2023
5bbccc5
finish styling application
bihellzin Jan 14, 2023
bfdb0da
removes unnecessaryy code and change routes
bihellzin Jan 14, 2023
e5e5583
adds languages controller test
bihellzin Jan 14, 2023
9586e3b
adds tests to repositories#show
bihellzin Jan 14, 2023
086290e
removes http call from controller to apimodel
bihellzin Jan 14, 2023
71bbbe6
adds tests to results and refactor results controller
bihellzin Jan 15, 2023
7fc929e
adds test do GithubApiModel
bihellzin Jan 15, 2023
b36889d
changes repository columns constraints
bihellzin Jan 15, 2023
b55c2a4
adds tests to results controller
bihellzin Jan 15, 2023
093cc17
fix repositories controller tests
bihellzin Jan 15, 2023
288c921
adds tests to githubmodelapi
bihellzin Jan 15, 2023
a48de5f
adds model tests to repository
bihellzin Jan 15, 2023
5cb8194
finishes styling in both dark mode and light mode
bihellzin Jan 15, 2023
4a19c4a
update gemfile.lock
bihellzin Jan 15, 2023
4d40ceb
update .env.example
bihellzin Jan 15, 2023
27d0636
update readme file
bihellzin Jan 15, 2023
2886a40
turns language name column unique
bihellzin Jan 15, 2023
fc539dc
adds test to ensure uniqueness of languages and repositories
bihellzin Jan 15, 2023
2b8e08e
removes unnecessary files
bihellzin Jan 15, 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 .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
DATABASE_USERNAME=username
DATABASE_PASSWORD=password
DATABASE_HOST=host
GITHUB_TOKEN=token
7 changes: 7 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# See https://git-scm.com/docs/gitattributes for more about git attribute files.

# Mark the database schema as having been generated.
db/schema.rb linguist-generated

# Mark any vendored files as having been vendored.
vendor/* linguist-vendored
37 changes: 37 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
#
# If you find yourself ignoring temporary files generated by your text editor
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile '~/.gitignore_global'

# Ignore bundler config.
/.bundle

# Ignore all logfiles and tempfiles.
/log/*
/tmp/*
!/log/.keep
!/tmp/.keep

# Ignore pidfiles, but keep the directory.
/tmp/pids/*
!/tmp/pids/
!/tmp/pids/.keep

# Ignore uploaded files in development.
/storage/*
!/storage/.keep
/tmp/storage/*
!/tmp/storage/
!/tmp/storage/.keep

/public/assets

# Ignore master key for decrypting credentials and more.
/config/master.key

# Ignore .env file
.env

/app/assets/builds/*
!/app/assets/builds/.keep
1 change: 1 addition & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--require spec_helper
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ruby-3.1.2
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM ruby:3.1.2

RUN apt-get update -qq && apt-get install -y nodejs postgresql-client
WORKDIR /github-search
COPY Gemfile /github-search/Gemfile
COPY Gemfile.lock /github-search/Gemfile.lock
RUN bundle install

# Add a script to be executed every time the container starts.
COPY entrypoint.sh /usr/bin/
RUN chmod +x /usr/bin/entrypoint.sh
ENTRYPOINT ["entrypoint.sh"]
EXPOSE 3000

# Configure the main process to run when running the image
CMD ["rails", "server", "-b", "0.0.0.0"]
78 changes: 78 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby "3.1.2"

# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
gem "rails", "~> 7.0.4"

# The original asset pipeline for Rails [https://github.com/rails/sprockets-rails]
gem "sprockets-rails"

# Use postgresql as the database for Active Record
gem "pg", "~> 1.1"

# Use the Puma web server [https://github.com/puma/puma]
gem "puma", "~> 5.0"

# Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails]
gem "importmap-rails"

# Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev]
gem "turbo-rails"

# Hotwire's modest JavaScript framework [https://stimulus.hotwired.dev]
gem "stimulus-rails"

# Build JSON APIs with ease [https://github.com/rails/jbuilder]
gem "jbuilder"

# Use Redis adapter to run Action Cable in production
# gem "redis", "~> 4.0"

# Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis]
# gem "kredis"

# Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword]
# gem "bcrypt", "~> 3.1.7"

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

# Reduces boot times through caching; required in config/boot.rb
gem "bootsnap", require: false

# Use Sass to process CSS
# gem "sassc-rails"

# Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images]
# gem "image_processing", "~> 1.2"

group :development, :test do
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
gem "debug", platforms: %i[ mri mingw x64_mingw ]
gem "dotenv-rails"
gem 'rspec-rails', '~> 6.0.0'
end

group :development do
# Use console on exceptions pages [https://github.com/rails/web-console]
gem "web-console"

# Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler]
# gem "rack-mini-profiler"

# Speed up commands on slow machines / big apps [https://github.com/rails/spring]
# gem "spring"
end

group :test do
# Use system testing [https://guides.rubyonrails.org/testing.html#system-testing]
gem "capybara"
gem "selenium-webdriver"
gem "webdrivers"
end

gem "tailwindcss-rails", "~> 2.0"
gem 'rails-controller-testing'
gem 'rest-client'
Loading