Vibe Report is a free weekly check-in and employee recognition tool that is easily customizable, providing an engaging, user-friendly experience that your team will be thankful for. Check-in, elicit feedback, and retain your team with actionable insights. Allow your team members to share, express themselves creatively, and recognize each other no matter where they are for a thriving, collaborative, and supportive culture.
The Vibe Report App is built on:
- Ruby 3.2.6
- Rails 7.1.5.1
- postgresql 10.0 or higher
New Development Machine Install (Mac)
How to Add Your Own Logo and Favicon to the Vibe Report App
NOTE: After installing something new, if something doesn't work like you expect, try quitting and restarting terminal.
- Install the latest version of XCode from the App store, run
$ xcode-select --install
- Install the latest version of Homebrew: http://brew.sh
- Install Git on Mac using homebrew:
$ brew install git
- Set your GIT username from terminal:
$ git config --global user.name "YOUR NAME"
- Set your GIT email address from terminal:
$ git config --global user.email "YOUR EMAIL ADDRESS"
- Generate and add SSH keys your Github account by following the instructions at https://help.github.com/articles/generating-ssh-keys/
- Install GPG using homebrew:
$ brew install gpg
(May be needed for RVM in next step) - Install the latest version of RVM: https://rvm.io, but instead of
gpg2
Usegpg
in the command that adds the GPG keys. If this doesn't work check out the security page for a workaround. - Install Ruby from terminal using RVM:
$ rvm install 3.2.6
- Install posgtresql from terminal:
$ brew install postgresql
and follow on screen instructions (very important) - Create postgresql superuser postgres:
$ createuser postgres -s
- Change your directory to where you want your work projects in terminal and clone the git repo:
$ [email protected]:wahanegi/vibereport.git
- Go into the directory
$ cd vibereport
. Confirm that when you run$ rvm gemset list
it lists "vibereport" as your gemset. - Run
$ gem install bundler
- Run
$ gem update --system
- Run bundler:
$ bundle
- Install Yarn
$ brew install yarn
- Install Webpack dependencies
yarn install
- Create a new database:
$ rails db:create
- Install the new Heroku CLI:
$ brew tap heroku/brew && brew install heroku
. - Log into your Heroku account:
$ heroku login
- Should be ready to roll:
$ rake assets:precompile
to start the Rails server use:$ ./bin/dev
- In Rubymine it's necessary to enable appropriate version of Javascript to make sure correct syntax highlighting.
Rubymine
->Preferences
->Languages & Frameworks
->Javascript
: Then setJavascript language version
to "ECMA Script 6"
-
For pretty and customizable command line info, including branch and whether you have uncommited changes or not:
$ brew install zsh-git-prompt
Then update
~/.zshrc
with the following code:source "/usr/local/opt/zsh-git-prompt/zshrc.sh" PROMPT='%~%b$(git_super_status)\$ ' clean_branches() { git remote prune origin git branch -vv | grep "origin/.*: gone]" | awk '{print $1}' | xargs git branch -D }
NOTE: The source "..."
might be different than what is above. Copy/paste it from the brew installation output.
- For a fast command line way to browse the most recent git commits:
$ brew install tig
. Then run$ tig
at the command prompt. - For Code Editing: RubyMine from JetBrains
Code Linting gives formatting and syntax suggestions to make your code more readable.
In Rubymine go to Rubymine
-> Preferences
-> Editor
-> Inspections
-> Ruby
-> Gems and gems management
-> Rubocop
: Make sure that the checkbox is checked.
Every time you are ready to start work, do the following terminal commands in the vibereport directory:
$ git smart-pull
$ bundle
$ rails db:migrate
Then if your server isn't started yet:
At this point you can point your browser to http://localhost:3000/ and start development work.
To stop the server click CNTL-C
in all three tabs.
To check to make sure your code changes didn't break anything critical:
$ rspec
Green dots are good, red F's are bad. Note that sometimes other people may have broken the build, so use your best judgement if the automated test errors were caused by your code or not (for example if you undo changes and re-run the test).
To push your code changes to the repo:
$ git add .
$ git commit -m "CI-XXX: Message describing what changes you made"
$ git push origin branch_name
Note: replace XXX with the Jira story ID (very important).
Switching between master and a private branch:
$ git checkout branch_name
$ git checkout master
If you need to copy over a commit from one branch to another without merging:
-
Copy the SHA of the commit you want to copy over (the program "tig" is good for this which can be installed via brew on a Mac).
-
Go to the branch you want to copy the commit to ($ git checkout [BRANCHNAME])
-
Use cherry-pick to copy over the commit:
$ git cherry-pick [SHA]
NOTE: If you have more than one commit to copy over, do the cherry-pick commands in the same order as they were commited. Also be careful about doing this if there is a high possibility of there being a conflict. See https://ariejan.net/2010/06/10/cherry-picking-specific-commits-from-another-branch/
-
Any significant feature should be done in a separate branch.
$ git checkout -b CI-XXX
-
When a feature is complete and tests pass, push to github.
$ git push origin CI-XXX
-
If you want to update your new branch with changes from master (very recommended), do the following:
$ git checkout master $ git pull origin master $ git checkout CI-XXX $ git merge master
Then resolve conflicts manually and push to your new_branch_name again
$ git push origin CI-XXX
-
When all work in branch is done, create a pull request:
- Go to https://github.com/wahanegi/vibereport
- Click "Pull Requests" -> "New Pull Request"
- Set base branch to master and compare-to branch to the
CI-XXX
branch where you've done your work - Click "Create pull request"
- Add a description of the pull request and start the pull request description with the story or epic ID,
CI-XXX
To start a Rails server with React, you need to use the command every time you start the server:
rake assets:precompile
To start the Rails server use: ./bin/dev
otherwise you won't be able to see your updated CSS and JavaScript
NOTE: rails s
- is not used
Follow these steps to set up the database with the required data for the application:
Run the Rails console using the following command:
rails c
Use the command below to create an admin user:
AdminUser.create!(email: '[email protected]', password: '1234qwer')
- Open your browser and navigate to http://localhost:3000/admin/login.
- Enter the email and password you used to create the admin user.
Once logged in, complete the following steps in the Admin Dashboard:
- Navigate to the Users tab.
- Fill out all required fields to create a user.
- Navigate to the Emotions tab.
- Create approximately 10 emotions (both positive and negative).
- Navigate to the Teams tab.
- Add a new team.
- Navigate to the Time Periods tab.
- Create a new time period with the following details:
- Start Date: Set to today.
- End Date: Set to a future date.
- Due Date: Set to a future date.
- Open your browser and go to http://localhost:3000/users/sign_in.
- Enter the name and password you provided when creating the user.
- After signing in, you should see the message: Check your inbox!
- The Letter Opener gem will open a new tab displaying the email.
- Click on the Access Site link in the email to log into the application.
When you create encrypted credentials in Rails 7, the contents of the config/credentials.yml.enc
file are encrypted using a master key that is stored in the config/master.key
file. This encryption process uses the OpenSSL library
, and if there is a problem with OpenSSL
, you might see the OpenSSL::Cipher::CipherError
error.
To address the OpenSSL::Cipher::CipherError
error in Rails application, you can follow these steps:
-
Remove
config/credentials.yml
orconfig/credentials.yml.enc
if present from the project directory. -
Open a terminal and navigate to the project directory.
-
Run the following command to open the Rails credentials file for editing:
EDITOR="code --wait" bin/rails credentials:edit
- just replace “code” with whatever editor you use. -
Save the file and exit the editor.
Test the application to make sure the error no longer occurs.
In your application's source code, navigate to the assets folder. This folder should contain all the visual assets used by your app, including the current logo and favicon files.
Save your company logo as logo.svg, and then copy over the current image in app/assets/images/logo.svg. The maximum height to width ratio of your logo should be set to 1:4.
Copy your company's favicon (in SVG format) to app/assets/images/favicon.svg. It should be a square image (1:1 ratio).
Once you've replaced the logo and favicon files, save your changes to the assets folder.
The MIT License (MIT)
Copyright (c) 2023 Clearbox Decisions Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.