在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):Hacktoberfest/hacktoberfest-2020开源软件地址(OpenSource Url):https://github.com/Hacktoberfest/hacktoberfest-2020开源编程语言(OpenSource Language):Ruby 60.5%开源软件介绍(OpenSource Introduction):HacktoberfestFeatures
ComponentsThere are three major components that are entirely separate from one another:
Getting StartedThese instructions will get you a copy of the project up and running on your local machine for development and testing purposes. Prerequisites
Application Setup
InstallingClone the repo:
In your local repository, run script/setup, which will install all necessary dependencies for you:
Local Setup With DockerIf you would like to use Docker to work with the application, first make sure that you have Docker and Docker Compose on your local machine. Next clone the repo as described in Step 1. From there, create a local
Note: Use the following values when setting up your Oauth token:
The local Docker setup uses a webserver, in the same way that the application does in staging and production, so it will be reachable on port Run the startup script, Note: You do not need to use the other startup scripts in the repo if you are using Docker to run the application locally. When using Docker, follow the steps in this section of the README. Inspecting and Troubleshooting You can inspect whether or not your services have started successfully by running the
In cases where you need to investigate an exit status, you can get the logs of the service with To check that the application is ready to accept traffic, run
Once the app is running, you can connect to it by navigating to Testing If you would like to run commands against your app service, you can do that with the following command (using rubocop as an example):
Or to run a particular spec:
Running migrations In cases where you want to create a migration in the context of your current development, you can use the following command:
To run the migration, type:
In both cases, the relevant files and changes will be available on your host, as well as on your container. If the app is currently stopped and you need to run migrations, you can use the Reloading the server There are cases where you will need to stop and restart the Rails server, in order for things like configuration changes to take effect. To do this, run the following script to stop and restart the app: This will restart the app and run any pending migrations. Adding a new gem to the project Another task you may need to accomplish is adding a new gem to the project. Because this local Docker setup depends on a gem volume (to speed up development and boot times), you need to both stop the application and remove this volume for your changes to take effect. To do this, run the following script: Taking the setup down To stop your services and remove the network, you can run Or, if you would like to remove your build cache and volumes, you can use the Setup Oauth TokenHacktoberfest uses This allows users to be authorized for Hacktoberfest via Github. For this, you will have to create a Github OAuth App (https://developer.github.com/apps/building-oauth-apps) Be sure your OAuth app is configured with the following URLs
The Client ID and Client Secret are right above this configuration. Use them to set the following ENV variables:
ENV VariablesStart Date & End DateHacktoberfest is officially active from October 1st - October 31st (in any timezone) The app can be in three different states:
So your dates can look something like this if you're developing in October 2019 and you want the app in the Active state. START_DATE="2019-09-30 10:00:00 UTC"
END_DATE="2019-11-01 12:00:00 UTC" (These timestamps account for the furthest positive UTC offset (+14 in Kiribati), where they’ll see 1st Oct 00:00 on 30th Sept 10:00 UTC and the furthest negative UTC offset (-12 in the US Outlying Islands), where they’ll see 1st Nov 00:00 on 1st Nov 12:00 UTC). If you want to work on the app in the Airtable API Key & Airtable App IDHacktoberfest uses Airtable as a CMS to hold useful data such as:
For your convenience we have created two options: Create an Airtable Database:We created a read-only copy of what the Airtable database should look like. With this you can create your own schema by following this format: (https://airtable.com/shrqM142bVC1Gj2t8) After you’ve created and configured the schema of an Airtable base from the graphical interface, your Airtable base will provide its own API to create, read, update, and destroy records. You should update these variables accordingly in your Use Placeholder Airtable ServiceIf configuring your own Airtable schema does not sound like your cup of tea - don't fret. We have created placeholder service objects that will render test data if your Airtable keys are not set. This service will be used as default. You can find this service in Create First User
Import ProjectsThis task imports repositories to the hacktoberfest app(these are displayed on the homepage). If you don't run the task, there simply won't be any repositories on the homepage aside from the hard-coded climate change repos.
bin/rails github:fetch_popular_languages_projects Running the projectThere are two commands you will need for running the project. First, spin up the rails server locally:
If you will be running any background jobs through sidekiq, run the following command in a separate terminal window from
ContributingHacktoberfest is open source and we welcome contributions. See CONTRIBUTING.md for more info. Code of ConductThis project uses the Contributor Covenant Code of Conduct. See CODE_OF_CONDUCT.md for more info. CreditsThe Hacktoberfest app is built and maintained for DigitalOcean by developers from Raise.dev. LicenseLicensed under the MIT License. The full license text is available in LICENSE.md. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论