Skip to content

Commit

Permalink
README + CODE OF CONDUCT
Browse files Browse the repository at this point in the history
  • Loading branch information
forsbergplustwo committed Aug 28, 2023
1 parent 7161d8d commit 9dd19a8
Show file tree
Hide file tree
Showing 2 changed files with 174 additions and 13 deletions.
73 changes: 73 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
education, socio-economic status, nationality, personal appearance, race,
religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at {{ email }}. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org
114 changes: 101 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,112 @@
# README
# Partner Metrics

This README would normally document whatever steps are necessary to get the
application up and running.
Partner Metrics is an open-source project providing you with metrics of your app, theme and affiliate revenue from the Shopify Partner program. Currently it calculates metrics based on the Payouts data from Shopify.

Things you may want to cover:
This project is not officially related to Shopify in any way.

* Ruby version
*Disclaimer: IThis project was created over about a week in 2015 when I was new to programming. We've added a few features over the years and kept it running, but other than that it's kind of a time capsule. I am proud that it's proved so useful to so many over the years, but be warned.. there is still code in this repo that could be better organized and structured.*

* System dependencies
## Usage

* Configuration
Partner Metrics was created by [@forsbergplustwo](@forsbergplustwo), and will remain free to use at:

* Database creation
##### https://partnermetrics.io

* Database initialization
## Development

* How to run the test suite
To get started:

* Services (job queues, cache servers, search engines, etc.)
1. Setup dependencies, environment & database: `bin/setup`
2. Create and add credentials `bin/rails credentials:edit`
3. Start servers and sidekiq workers: `bin/dev`

* Deployment instructions
Visit `localhost:4000`

* ...
To run tests:

```bash
bin/rails test

# including system tests

bin/rails test:all
```

## S3 - Minimum setup guide

### 1. Sign up for or login to [Amazon AWS](https://aws.amazon.com)
### 2. Create an S3 Bucket:
* In the AWS console, search for S3 and click the offering in the drop down menu.
* In the S3 Management Console, click the "Create Bucket" button.
* In the bucket creation wizard - name it something cool. (eg... "ice-bucket")
* Take note of the region your bucket is in. In my case I used the default presented ("us-east-2").
* Leave all other default settings alone. Click create to finalize the creation of the bucket.

### 2b. Allow CORS
* While looking at the individual bucket overview of the bucket you just created, click into the "Permissions" tab. Scroll down to "Cross-origin resource sharing (CORS)" and paste in the following:
```
[
{
"AllowedHeaders": [
"*"
],
"AllowedMethods": [
"GET",
"HEAD",
"POST",
"PUT"
],
"AllowedOrigins": [
"*"
],
"ExposeHeaders": [],
"MaxAgeSeconds": 3000
}
]
```
Note: *Make sure to update the `AllowedOrigins` details above with your production app details, if your app is being made public.*

### 3. Create a user in IAM:
* Go back to the AWS console. This time search for IAM (Identity access management) and click it in the dropdown.
* Click "Add User"
* Name your user `Partner Metrics S3 User` (or something else if you'd like) and give it only programmatic access.
* On the next screen you'll set the permissions. Click the tab for "Attach Existing Policies Directly". Next, search for S3 and click the checkbox next to AmazonS3FullAccess.
* Leave all the other settings alone and create the new user.
* Take note of the access key ID and secret access key.


### 4. Add credentials to .env
* Go to your .env file and adjust the 4 AWS relevant definitions
```
S3_BUCKET=[aws bucket handle from step 2]
AWS_REGION=[aws bucket region from step 2]
AWS_ACCESS_KEY_ID=[access key id from step 3]
AWS_SECRET_ACCESS_KEY=[secret access key from step 3]
```
* Restart your server if running just to be safe.


## Contributing
We'd love for you to contribute join us in making it better!

The codebase could use some updates, so small PRs improving small things like code structure, readability and test of simple scenarios are more than welcome. It would be great to build up the test suite to make future development easier for everyone.

In general, please follow the "fork-and-pull" Git workflow.

1. Check out the Issues page, feel free to pick an existing issue or add a new one with clear title and description.
2. Fork and clone the repo on GitHub
3. Create a new branch for your fix or code improvement
4. Run `standardrb --fix` to safely-autofix any linter or formatter corrections
5. Commit changes to your own branch
6. Push your work back up to your fork
7. Submit a Pull request so that @forsbergplustwo can review your changes. Please link your PR to the existing issue if you are solving one.

## Testing
We have a handful of MiniTests and Fixtures in the codebase, and welcome more. Please write MiniTests for new code you create.

## Code of Conduct
Everyone interacting in Partner Metrics repository is expected to follow the [Code of Conduct](https://github.com/forsbergplustwo/partner-metrics-saas/blob/main/CODE_OF_CONDUCT.md).

## License

Partner Metrics is released under the [GPLv3 License](https://github.com/forsbergplustwo/partner-metrics-saas/blob/main/LICENSE.md).

0 comments on commit 9dd19a8

Please sign in to comment.