The intention of this repository is to be used as a project for developers of all skill levels to improve their skills by contributing code and by assisting junior developers with their code contributions. The founder encourages women entrepreneurs to be the primary mentors, mentees, and leaders in this project and advocates for women's voices to be heard and heeded in the software development community.
RoleModel Enterprises, LLC, owns the copyright to all code, design, and graphics contributed to this repository. Contributors grant copyright of any code, design, and graphics they contribute to this repository to RoleModel Enterprises, LLC. Contributors may reuse their code contributions and the knowledge gained from working on this project, provided it meets the following criteria:
-
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-
Redistributions in binary form are not permitted.
-
Redistribution of the entire code repository is not permitted. Use of the entire code repository is encouraged, but only for developers and their mentees who are using it for the specific educational purposes endorsed by RoleModel Enterprises, LLC.
-
Neither the name of ThinQ.tv, RoleModel Enterprises, LLC, nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
This software is provided by the copyright holders and contributors "as is" and any express or implied warranties, including, but not limited to the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the copyright owner of contributors be liable for any direct, indirect, incidental, special, exemplary or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.
This README file may change at any time.
To determine current skill level -
Refer to http://github.com/ece106/tomatocan and use tutorials, Google, etc. to help you figure out the answers.
-
Copy schema.rb and save it as schema.txt. Describe each field of the events, merchandises, purchases, rsvpqs, and users tables. e.g. "created_at" - Time and date at which each record was created "twitter" - user's twitter handle
-
Which file/view is the users' profile page? What information can users display on their page?
-
Where is the users' profile page information stored in the Tomatocan database?
-
What files does Rails autogenerate when you generate scaffolding for a table?
-
User pages are found by their permalink rather than record id number. What are the routes that were added to the Tomatocan app so the views for user pages could be displayed?
-
What are the methods that were added to the Tomatocan app so the user views could be displayed?
-
What gem is used for signin/signout? How many times is it mentioned in the Tomatocan repository?
-
To set up Ruby on Rails on Mac or Linux, go to https://gorails.com/setup/osx/10.13-high-sierra Make sure you install the Postresql database, not sqlite. No need to create the myapp example since you'll be using the ThinQ.tv code.
-
Fork tomatocan to your local machine
Fork the tomatocan code by clicking the fork button at http://github.com/ece106/tomatocan. Forking will allow you to have a copy of the tomatocan code in your personal github.
Clone the fork you have created.
a. On GitHub, navigate to your fork of the tomatocan repository.
b. Under the repository name, click Clone or download
. Do NOT download.
c. To CLONE the repository: In a terminal, in the directory you would like to store your code:
git clone https://github.com/YOUR-GITHUB_USERNAME/tomatocan
- Files To Check/Change/Create:
- gemfile:
If you're using sqlite3: Comment out
#gem 'pg'
and uncomment
gem 'sqlite3'
If you're using postgresql, leave the gemfile as is.
- config/initializers/aakeys.rb: Create this file DO NOT CHANGE THE NAME (note that it is listed in .gitignore) & paste the following into it:
DEVISE_SECRET_KEY = 'fake'
AWS_KEY = 'morefake'
AWS_SECRET_KEY = 'pretend'
AWS_BUCKET = 'yourawsbucketname'
STRIPE_SECRET_KEY = "madeup"
STRIPE_PUBLIC_KEY = "allfake"
GMAIL_PWD = "superfake"
Stripe.api_key = STRIPE_SECRET_KEY
STRIPE_CONNECT_CLIENT_ID = "superfake"
Of course, with the fake keys, you will not be able to use AWS (upload files to user profiles), Devise (logins), or Stripe (purchase items from users). If you have your own AWS, Devise, or Stripe accounts, you may replace the keys in config/initializers/aakeys.rb with your accounts' keys.
*config/database.yml
Create this file DO NOT CHANGE THE NAME (note that it is listed in .gitignore) & paste the following into it:
For postgresql:
default: &default
adapter: postgresql
pool: 5
timeout: 5000
development:
<<: *default
encoding: unicode
database: YOUR_DEVELOPMENT_DATABASE_NAME
username: YOUR_USERNAME
test:
<<: *default
encoding: unicode
database: YOUR_TEST_DATABASE_NAME
username: YOUR_USERNAME
production:
<<: *default
For sqlite3:
default: &default
adapter: sqlite3
pool: 5
timeout: 5000
development:
<<: *default
database: db/development.sqlite3
test:
<<: *default
database: db/test.sqlite3
DO NOT NAME YOUR DEVELOPMENT DATABASE THE SAME AS YOUR TEST DATABASE!!!
- config/environments/development.rb:
Create this file DO NOT CHANGE THE NAME (note that it is listed in .gitignore) & paste the following into it:
Rails.application.configure do
config.action_mailer.raise_delivery_errors = true
config.action_mailer.delivery_method = :smtp
config.action_mailer.perform_deliveries = true
config.action_mailer.smtp_settings = {
:address => "smtp.gmail.com",
:port => 587,
:user_name => "[email protected]",
:password => 'fake',
:authentication => 'plain',
:enable_starttls_auto => true
}
config.action_mailer.default_url_options = {
host: "localhost:3000", protocol: "http"
}
config.cache_classes = false
config.eager_load = false
config.consider_all_requests_local = true
if Rails.root.join('tmp/caching-dev.txt').exist?
config.action_controller.perform_caching = true
config.cache_store = :memory_store
config.public_file_server.headers = {
'Cache-Control' => "public, max-age=#{2.days.seconds.to_i}"
}
else
config.action_controller.perform_caching = false
config.cache_store = :null_store
end
config.active_support.deprecation = :log
config.active_record.migration_error = :page_load
config.assets.debug = true
config.assets.quiet = true
config.file_watcher = ActiveSupport::EventedFileUpdateChecker
end
- Then type
>gem install bundler
at the command line so you can install all the gems.
Then type
>bundle install
at the command line to install all the necessary gems.
- Then type
>rake db:migrate
at the command line to build the database with the correct schema.
Then type
>rails s
at the command line from the tomatocan directory to start the server.
*. Saving your changes to your repository
To add modified and new files that are not in .gitignore:
git add * :/
To commit your current files:
git commit -a -m "Useful Comment of Your Changes/Additions"
Push comitted changes to your repository:
git push origin master
or
git push https://github.com/YOUR-GITHUB_USERNAME/YOUR-TOMATOCAN-REPOSITORY master
*. Pulling changes from tomatocan master into your local machine
When changes have been made to the http://github.com/ece106/tomatocan master repo, your own github repo will be behind. Pull the changes to your local machine, then push them to your repository. To pull changes from tomatocan master:
git pull https://github.com/ece106/tomatocan.git master
*. Getting your code into tomatocan test branch
Once you have made changes to your personal repository you can request to pull your changes into the a test branch. Go to http:/github.com/YOUR-GITHUB-USERNAME/YOUR-TOMATOCAN-REPOSITORY. Click the "New Pull Request" button. After creating a pull request your changes have to be reviewed and then either accepted or denied.
We'll allow most appropriately-skilled college students the opportunity to earn great knowledge in the Thinq.tv internship program. However after the first three weeks, we have minimum requirements to continued access to our time and resources:
- You must spend at least 10 hours per week on helping Thinq.tv grow. This is an internship at a business. It is not your toy app.
- Push to github 5 times per week.
- Attend at least one of the Faith or International Conversations per week. If you are not willing to be a part of why we exist, you do not belong here.
- Contribute enough to justify a pull request every 3 weeks.
- Share conversations on your social media accounts every week: LinkedIn, Twitter, Facebook, Instagram. Tag Lisa's or Thinq.TV's account on the post to prove that the Conversation was shared.
- Invite parents and friends to participate on live conversations - and prove it by their appearance.
- Cell phones off. We must not see your cell phone at all while you are in our offices.
- Keep your hours updated on the in/out google calendar. Otherwise we'll assume you will not be fulfilling your 10 hours/week.
Add the following columns to your Goals & Accomplishments sheet:
- Conversations attended
- Person you brought into the conversation with you
- Dates & social media accounts where you Shared conversations
- The days you pushed to github
- Summary of your pull request
Refer to Michael Hartl's tutorial for great Rails knowledge http://railstutorial.org/book
For a list of helpful git commands use the git cheatsheet: https://services.github.com/on-demand/downloads/github-git-cheat-sheet/
For minitest methods https://guides.rubyonrails.org/testing.html
- ThinQ.tv is not your toy app for your professor to give you a smiley face. ThinQ.tv is a business. If you do not believe in what we are accomplishing, you shouldn't work here.
- If you do not make a pull request every 2 or 3 weeks, you are wasting your time in your own corner with your own toy app.
- NEVER delete your .gitignore
- NEVER push secret keys to the internet. People get fired for this!
- ALWAYS look at your github pushes to make sure you didn't break everything with typos or merge errors.
- NEVER make a pull request that has broken stuff you're leaving for everyone else to clean up.
- NEVER use the same database for test and development. You will lose ALL your date in your development database. This was mentioned already, but people still keep doing it.
- Never put spaces in filenames. Do you ever put spaces in your variable names? No.
- Never call anything on ThinQ.tv an event. These are Conversations.
Copyright © 2019, RoleModel Enterprises, LLC. All rights reserved.