fastruby / rails-template Goto Github PK
View Code? Open in Web Editor NEWRails Application Template for Ombulabs projects
Rails Application Template for Ombulabs projects
IMPORTANT: please make sure you ask yourself all intro questions and fill all sections of the template.
Before we start...:
Expected behavior:
Create a Rails app using this template.
Add ENV to the .env.sample file.
And be able to run the app with foreman or docker.
Actual behavior:
Running a newly created app (based on this template) does not run in docker or foreman.
Steps to reproduce:
Context and environment:
From this issue: fastruby/dotenv_validator#46
And this PR: fastruby/dotenv_validator#51
The issue was that foreman and docker-compose would automatically parse any .env files present in the project and populate the environment variables before the Rails app could run, but with no treatment of comments and blank spaces. As a result, when dotenv parsed the file, since the variables would already be populated by docker, it would not change them and, because of this, dotenv_validator validated environment variables that included any blank spaces or comments present in the .env files.
This caused dotenv_validator to fail even for environment variables that should pass.
More details can be found in the changes to the README of dotenv_validator here. After this change we can now successfully run the app in docker and locally with foreman without dotenv_validator failing.
We want to make these changes:
Add this to .gitignore
.env.local
.env.test
Add to bin/setup
unless File.exist?(".env.local")
cp ".env.sample", ".env.local"
system! "ln -s .env.local .env.test"
end
I will abide by the [code of conduct] (CODE_OF_CONDUCT.md)
As a developer
I want to be able to pick the style guide
So that I can save time implementing it in my project
Scenario:
Given that we have three style guides (no style guide (Rails's default), OmbuLabs, or FastRuby.io)
When I start creating a new Rails project
Then I want to be able to pick the style guide for my project
Notes:
It would be great if there is a little dialogue that is presented to the user or an option to pick the style guide.
For example:
rails new foo
> Which style guide do you want to use? (rails/fastruby/ombulabs -- default: ombulabs)
> fastruby
> Cool, using fastruby style guide for project foo.
Or:
rails new foo --styleguide=fastruby
> Cool, using fastruby style guide for project foo.
README missing the sponsorship section
Version, Branch, or Commit:
Main branch
Expected behavior:
The template shouldn't add gems that are already in the Gemfile
Actual behavior:
The generation of the app fails because Capybara is defined twice (one by default and one added by the remplate)
Steps to reproduce:
Using rails 6.1.4.1
Run rails new PROJECT_NAME -m https://raw.githubusercontent.com/fastruby/rails-template/main/template.rb
and you should see this error
[!] There was an error parsing `Gemfile`: You cannot specify the same gem twice with different version requirements.
You specified: capybara (>= 3.26) and capybara (>= 2.15). Bundler cannot continue.
# from ../PROJECT_NAME/Gemfile:64
# -------------------------------------------
# group :test do
> gem "capybara", ">= 2.15"
# gem "selenium-webdriver"
# -------------------------------------------
I will abide by the [code of conduct] (CODE_OF_CONDUCT.md)
IMPORTANT: please make sure you ask yourself all intro questions and fill all sections of the template.
Before we start...:
Version, Branch, or Commit:
main @ ef2dd6b
Expected behavior:
I run bin/setup
after creating a new rails app and expect it to run smoothly.
Actual behavior:
Please include a detailed description of the actual behavior of the application.
I run bin/setup
and see an error related to the .env.sample file.
I think the bin/setup
file needs to be updated to create an empty .env.sample
file if it does not exist.
Steps to reproduce:
How do I achieve this behavior? Use the following format to provide a step-by-step guide:
rails new projectname
: No such file or directory @ rb_sysopen - .env.sample (Errno::ENOENT)
I will abide by the [code of conduct] (CODE_OF_CONDUCT.md)
Version, Branch, or Commit:
Main branch
Expected behavior:
The generator should complete execution with the app with correct dual booting setup.
Actual behavior:
The generator fails when running next bundle install
with this error:
run next bundle install from "."
The git source https://github.com/rails/rails.git is not yet checked out. Please run `bundle install` before trying to start your application
Steps to reproduce:
Create a new rails app using the template.
I will abide by the [code of conduct] (CODE_OF_CONDUCT.md)
IMPORTANT: please make sure you ask yourself all intro questions and fill all sections of the template.
Before we start...:
Version, Branch, or Commit:
Inform what version, branch, commit of the project you are using.
Expected behavior:
Actual behavior:
When I try to commit after running the bin/setup script I see an error message:
reek key 'Attribute:' is undefined.
According to the documentation over here:
https://github.com/troessner/reek/blob/master/docs/Reek-4-to-Reek-5-migration.md#reek-4-to-reek-5-migration
Reek 5 now requires a detectors
key for standalone detectors.
So I think we just need to update the .reek.yml file.
Steps to reproduce:
How do I achieve this behavior? Use the following format to provide a step-by-step guide:
reek key 'Attribute:' is undefined.
Context and environment:
Provide any relevant information about your setup (Customize the list accordingly based on what info is relevant to this project)
I will abide by the [code of conduct] (CODE_OF_CONDUCT.md)
IMPORTANT: please make sure you ask yourself all intro questions and fill all sections of the template.
Before we start...:
Version, Branch, or Commit:
25026e8
Expected behavior:
It should terminate all the related processes.
Actual behavior:
We have lingering process from the newly generated Rails app.
Steps to reproduce:
1: Run rails new test-app --rc=./rails-template/.railsrc -m ./rails-template/template.rb
from the parent directory of rails-template
2. ps aux | grep ruby
lists few running processes
I will abide by the [code of conduct] (CODE_OF_CONDUCT.md)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.