omniauth-sourceforge 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.github/CONTRIBUTING.md +191 -0
- data/.github/ISSUE_TEMPLATE.md +18 -0
- data/.github/PULL_REQUEST_TEMPLATE.md +10 -0
- data/.gitignore +18 -0
- data/.rspec +1 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +37 -0
- data/Rakefile +7 -0
- data/lib/omniauth-sourceforge.rb +2 -0
- data/lib/omniauth-sourceforge/version.rb +5 -0
- data/lib/omniauth/strategies/sourceforge.rb +37 -0
- data/omniauth-sourceforge.gemspec +29 -0
- data/spec/omniauth/strategies/sourceforge_spec.rb +34 -0
- data/spec/spec_helper.rb +16 -0
- metadata +173 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: bbff112c6ca9b6c26fe26f0632038c7ba909f673
|
4
|
+
data.tar.gz: d078009725bff1ece48bc88af94d7f29ac0d10bd
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: d10ea8f64dccb8df663203006dd2f7120f8400c01fd28d72b97843b528c6a94bae3f77a52ac11e3bd80194a6ffd7a84f06563b1fa18a4188d3c7c628a51b52e5
|
7
|
+
data.tar.gz: a6a1f7a007a2cc353d2cd4353de784fe28317c657f807d0b6596d38f12058c299aa2a9b258d9680dacef44f4e9eccc9fb00468f20855b0ec709234caf27b62cf
|
@@ -0,0 +1,191 @@
|
|
1
|
+
## Contributing to Libraries.io :heart:
|
2
|
+
Thanks for considering contributing. These guidelines outline how to contribute to the [Libraries.io](http://github.com/librariesio) project.
|
3
|
+
|
4
|
+
## Table of Contents
|
5
|
+
[What is Libraries.io all about?](#whats-librariesio-about)
|
6
|
+
|
7
|
+
[What should I know Before I get started?](#what-should-i-know-before-i-get-started)
|
8
|
+
* [Code of conduct](#code-of-conduct)
|
9
|
+
* [Langauge](#langauge)
|
10
|
+
* [Installation and setup](#setup)
|
11
|
+
|
12
|
+
[How can I contribute?](#how-can-i-contribute)
|
13
|
+
* [Reporting bugs](#reporting-bugs)
|
14
|
+
* [Suggesting enhancements](#suggesting-enhancements)
|
15
|
+
* [Suggesting a new feature](#suggesting-new-features)
|
16
|
+
* [Your first contribution](#your-first-contribution)
|
17
|
+
* [Tackling something meatier](#tackling-something-meatier)
|
18
|
+
|
19
|
+
[How can I talk to other contributors?](#how-can-i-talk-to-other-contributors)
|
20
|
+
* [Chat](#chat)
|
21
|
+
* [Video](#video)
|
22
|
+
* [Social media](#twitter)
|
23
|
+
|
24
|
+
[Who Are Libraries.io's Users?](#who-are-librariesios-users)
|
25
|
+
|
26
|
+
[Our workflow](#workflow)
|
27
|
+
|
28
|
+
|
29
|
+
## What's Libraries.io About?
|
30
|
+
_Our goal is to raise the quality of all software._
|
31
|
+
|
32
|
+
By outlining our [mission and strategy](/strategy.md) we hope to give you more power to make decisions and determine how best to spend your time. Specifically we tackle three distinct problems:
|
33
|
+
|
34
|
+
* Discovery: _Helping developers make faster, more informed decisions about the software that they use._
|
35
|
+
* Maintainability: _Helping maintainers understand more about the software they depend upon and the consumers of their software._
|
36
|
+
* Sustainability: _Supporting undervalued software by highlighting shortfalls in contribution and funneling support to them._
|
37
|
+
|
38
|
+
## What Should I Know Before I Get Started?
|
39
|
+
|
40
|
+
### Code of Conduct
|
41
|
+
Libraries.io is an open and inclusive [community of people](https://github.com/orgs/librariesio/people) working together. We expect contributors to abide by our [contributor code of conduct](CODE_OF_CONDUCT.md) which basically say 'be excellent to each other'. Please report unacceptable behavior to conduct@libraries.io
|
42
|
+
|
43
|
+
### Language
|
44
|
+
We communicate predominately in English. Contributions to the project should be made with English as the first language. We are happy for members of the community to communicate in a language other than English in chat, email and video but be aware that this might be considered exclusive by other members of the community.
|
45
|
+
|
46
|
+
### Documentation
|
47
|
+
Documentation for the project as a whole is available at [docs.libraries.io](https://docs.libraries.io). These pages are generated from the [documentation](https://github.com/librariesio/documentation) repo. Documentation that needs to be in every repo is replicated in [required-files](https://github.com/librariesio/required-files) (currently limited to [GitHub templates](https://github.com/blog/2111-issue-and-pull-request-templates)). Otherwise documentation will be specific to that repo. For example the main [Libraries.io](https://github.com/librariesio/libraries.io) `README.md` contains information about installing and running the main rails application.
|
48
|
+
|
49
|
+
### Setup
|
50
|
+
If you wish to make contributions to Libraries.io then you'll need a local version of the site to test. You can find instructions to install the correct Ruby version, Postgres, and to set up the database in our [README](https://github.com/librariesio/libraries.io/blob/master/README.md#getting-started).
|
51
|
+
|
52
|
+
## How Can I Contribute?
|
53
|
+
|
54
|
+
### Reporting Bugs
|
55
|
+
|
56
|
+
The simplest thing that you can do to help us is by filing good bug reports, so here we go:
|
57
|
+
|
58
|
+
#### Before Submitting a Bug Report
|
59
|
+
|
60
|
+
* Double-check that the bug is persistent. The site is still in it's infancy and sometimes artifacts may appear and disappear.
|
61
|
+
* Double-check the bug hasn't already been reported [on our issue tracker](https://github.com/issues?utf8=%E2%9C%93&q=is%3Aopen+is%3Aissue+org%3Alibrariesio), they *should* be labelled `bug` or `bugsnag`.
|
62
|
+
|
63
|
+
If something hasn't been raised, you can go ahead and create a new issue using [the template](/issue_template.md). If you'd like to help investigate further or fix the bug just mention it in your issue and check out our [workflow](#workflow).
|
64
|
+
|
65
|
+
### Suggesting Enhancements
|
66
|
+
|
67
|
+
The next simplest thing you can do to help us is by telling us how we can improve the features we already support, here we go:
|
68
|
+
|
69
|
+
#### Before Submitting an Enhancement
|
70
|
+
|
71
|
+
* Check that the enhancement is not already [in our issue tracker](https://github.com/issues?utf8=%E2%9C%93&q=is%3Aopen+is%3Aissue+org%3Alibrariesio), they should be labelled 'enhancement'.
|
72
|
+
|
73
|
+
If there isn't already an issue for feature then go ahead and create a new issue for it using the [template](/issue_template.md). If you'd like to work on the enhancement then just mention it in a comment and check out our [workflow](#workflow).
|
74
|
+
|
75
|
+
### Suggesting New Features
|
76
|
+
|
77
|
+
If you're into this zone then you need to understand a little more about what we're trying to achieve:
|
78
|
+
|
79
|
+
#### Before Suggesting a Feature
|
80
|
+
|
81
|
+
* Check that it aligns with [our strategy](strategy.md) and is specifically not in line with something we have said we will not do (for the moment this is anything to do with ranking *people*).
|
82
|
+
* Check that the feature is not already [in our issue tracker](https://github.com/issues?utf8=%E2%9C%93&q=is%3Aopen+is%3Aissue+org%3Alibrariesio), they should be tagged 'feature'.
|
83
|
+
* Specifically check that it is not already a [funded commitment](https://github.com/librariesio/supporters/issues).
|
84
|
+
|
85
|
+
If you're still thinking about that killer feature that no one else is thinking about then *please* create an issue for it using the [template](/issue_template.md).
|
86
|
+
|
87
|
+
### Your First Contribution
|
88
|
+
You're in luck! We label issues that are ideal for first time contributors with [`first-pr`](https://github.com/issues?utf8=%E2%9C%93&q=is%3Aopen+is%3Aissue+user%3Alibrariesio+label%3A%22first-pr%22). For someone who wants something a little more meaty you might find an issue that needs some assistance with [`help wanted`](https://github.com/issues?utf8=%E2%9C%93&q=is%3Aopen+is%3Aissue+user%3Alibrariesio+label%3A%22help+wanted%22). Next you'll want to read our [workflow](#workflow).
|
89
|
+
|
90
|
+
### Tackling Something Meatier
|
91
|
+
|
92
|
+
Tickets are labeled by size, skills required and to indicate workflow. Details can be found in our [labelling policy](/labelling.md).
|
93
|
+
|
94
|
+
To get you started you might want to check out issues concerning [documentation](https://github.com/librariesio/documentation/issues/), [user experience](https://github.com/librariesio/libraries.io/labels/ux), [visual design](https://github.com/librariesio/libraries.io/issues/labels/visual%20design) or perhaps something already [awaiting help](https://github.com/librariesio/libraries.io/labels/help%20wanted). You may find the following useful:
|
95
|
+
|
96
|
+
* Our [strategy](/strategy.md) which outlines what our goals are, how we are going to achieve those goals and what we are specifically going to avoid.
|
97
|
+
* A [techncial overview](/overview.md) of the components that make up the Libraries.io project and run the [https://libraries.io](https://libraries.io) site.
|
98
|
+
|
99
|
+
## How Can I Talk To Other Contributors?
|
100
|
+
|
101
|
+
### Chat
|
102
|
+
We use [Slack](http://slack.io) for chat. There's an open invitation available to anyone who wishes to join the conversation at [http://slack.libraries.io](http://slack.libraries.io).
|
103
|
+
|
104
|
+
We try to use the following channels accordingly:
|
105
|
+
|
106
|
+
* `#general` channel is used for general, water cooler-type conversation, contributor updates and issue discussion.
|
107
|
+
* `#events` is used to share and discuss events that may be of interest to or attended by members of the community
|
108
|
+
* `#activity` contains notifications from the various platforms that we use to keep the Libraries.io project turning. Including notifications from GitHub, Twitter and our servers.
|
109
|
+
|
110
|
+
Members are encouraged to openly discuss their work, their lives, share views and ask for help using chat. It should be considered a *safe space* in which there is *no such thing as a stupid question*. Conversely no one contributor should ever be expected to have read something said in a chat. If someone should know something then it should be written down as an issue and/or documented in an obvious place for others to find.
|
111
|
+
|
112
|
+
### Video
|
113
|
+
[Google Hangouts](http://hangouts.google.com) is our preferred tool for video chat. We operate an [open hangout](http://bit.ly/2kWtYak) for anyone to jump into at any time to discuss issues face to face.
|
114
|
+
|
115
|
+
### Regular updates
|
116
|
+
Contributors are encouraged to share what they're working on. We do this through daily or weekly updates in the `#general` channel on Slack. Updates should take the format 'currently working on X, expecting to move onto Y, blocked on Z' where x, y and z are issues in our [issue tracker](https://github.com/issues?utf8=%E2%9C%93&q=is%3Aopen+is%3Aissue+org%3Alibrariesio).
|
117
|
+
|
118
|
+
Additionally we host an [open hangout](http://bit.ly/2kWtYak) for any contributor to join at *5pm UTC on a Tuesday* to discuss their work, the next week's priorities and to ask questions of other contributors regarding any aspect of the project. Again this is considered a *safe space* in which *there is no such thing as a stupid question*.
|
119
|
+
|
120
|
+
### Mail
|
121
|
+
The [core team](https://github.com/orgs/librariesio/teams/core) operate a mailing list for project updates. If you'd like to subscribe you'll find a form in the footer on [Libraries.io](http://libraries.io).
|
122
|
+
|
123
|
+
### Twitter
|
124
|
+
We have an account on Twitter at [@librariesio](http://twitter.com/librariesio). This is predominately used to retweet news, events and musings by contributors rather than as a direct method of communication. Contributors are encouraged to use @librariesio in a tweet when talking about the project, so that we may retweet if appropriate. The account is moderated and protected by the [core team](https://github.com/orgs/librariesio/teams/core).
|
125
|
+
|
126
|
+
### Facebook
|
127
|
+
We have a Facebook page at [@libraries.io](https://www.facebook.com/libraries.io). Again this is predominantly used to gather and reflect news, events and musings by contributors rather than as a direct method of communication. Contributors are encouraged to reference Libraries.io in a post when talking about the project, so that we may reflect this if appropriate. Again the account is moderated and protected by the [core team](https://github.com/orgs/librariesio/teams/core).
|
128
|
+
|
129
|
+
### Medium
|
130
|
+
We have a Medium account at [@librariesio](https://medium.com/@librariesio) and once again it is used to reflect news, events and musings by contributors rather than a direct method of communication. Contributors are encouraged to reference @librariesio in a post when talking about the project, so that we may recommend it if appropriate. Again the account is moderated and protected by the [core team](https://github.com/orgs/librariesio/teams/core).
|
131
|
+
|
132
|
+
## Who Are Libraries.io's Users?
|
133
|
+
Libraries.io focusses on the following personas:
|
134
|
+
|
135
|
+
### Google
|
136
|
+
_Is hungry for linked data so she can serve you up search traffic_
|
137
|
+
|
138
|
+
### 'Searcher'
|
139
|
+
_Is a developer with a problem, she is looking for something to help solve it._
|
140
|
+
|
141
|
+
### 'Producer'
|
142
|
+
_Has a product or products that incorporates some free/open source dependencies. She needs to ensure the product(s) are well maintained, free of vulnerabilities and licence compatible._
|
143
|
+
|
144
|
+
### 'Maintainer'
|
145
|
+
_Is a developer with a successful free/open source project. She's looking to understand more about those who use her project, attract more contributors and manage their contributions well._
|
146
|
+
|
147
|
+
### 'Extender'
|
148
|
+
_Has her own ideas. She wants access to the raw data so that she can mash up her own service and offer it to the world._
|
149
|
+
|
150
|
+
### 'Overlord'
|
151
|
+
_Has a vast empire of people, products and projects. Some of which she publishes as open source, some are proprietary. She wants to ensure that her policies regarding the use of dependencies are adhered to and that her team are as efficient as possible._
|
152
|
+
|
153
|
+
## Workflow
|
154
|
+
In general we use [GitHub](https://help.github.com/) and [Git](https://git-scm.com/docs/gittutorial) to support our workflow. If you are unfamiliar with those tools then you should check them out until you feel you have a basic understanding of GitHub and a working understanding of Git. Specifically you should understand how forking, branching, committing, PRing and merging works.
|
155
|
+
|
156
|
+
#### Forking
|
157
|
+
We prefer that contributors fork the project in order to contribute.
|
158
|
+
|
159
|
+
#### Branching
|
160
|
+
We *try* to use principles of [GitHub-flow](https://lucamezzalira.com/2014/03/10/git-flow-vs-github-flow/) in our branching model. That is the `master` branch will always be deployable to the live site, and that every branch from that will be used to add a feature, fix a bug, improve something or otherwise represent an atomic unit of work.
|
161
|
+
|
162
|
+
#### Ticketing
|
163
|
+
We *try* to create an issue for everything. That is any bug, feature or enhancement that is worth an open, focussed and documented discussion.
|
164
|
+
|
165
|
+
#### Labelling
|
166
|
+
We constrain labels as they are a key part of our workflow. Tickets will be labeled according to our [labelling policy](/labelling.md).
|
167
|
+
|
168
|
+
#### Templates
|
169
|
+
We use templates to guide contributors toward good practice in [filing bugs, requesting enhancements and features](/issue_template.md) and in [issuing pull-requests](/pull_request_template.md).
|
170
|
+
|
171
|
+
#### Commenting
|
172
|
+
If it possible to comment your contribution — for instance if you are contributing code — then do so in a way that is simple, clear, concise and lowers the level of understanding necessary for others to comprehend what comes afterward does or achieves. If you are contributing code it is very likely it will be rejected if it does not contain sufficient comments.
|
173
|
+
|
174
|
+
#### Committing
|
175
|
+
When committing to a branch be sure to use plain, simple language that describes the incremental changes made on the branch toward the overall goal. Avoid unnecessary complexity. Simplify whenever possible. Assume a reasonable but not comprehensive knowledge of the tools, techniques and context of your work.
|
176
|
+
|
177
|
+
#### Testing
|
178
|
+
When adding or fixing functionality, tests should be added to help reduce future regressions and breakage. All tests are ran automatically when new commits are pushed to a branch. Pull requests with broken/missing tests are not likely to be merged.
|
179
|
+
|
180
|
+
#### Submitting for Review
|
181
|
+
Once a piece of work (in a branch) is complete it should be readied for review. This is your last chance to ensure that your contribution is [properly tested](#testing). If you are contributing code it is likely your contribution will be rejected if it would lower the test-coverage. Once this is done you can submit a pull-request following the [template](/pull_request_template.md).
|
182
|
+
|
183
|
+
It is likely that your contributions will need to be checked by at least one member of the [core team](https://github.com/orgs/librariesio/teams/core) prior to merging. It is also incredibly likely that your contribution may need some re-work in order to be accepted. Particularly if it lacks an appropriate level of comments, tests or it is difficult to understand your commits. Please do not take offense if this is the case. We understand that contributors give their time because they want to improve the project but please understand it is another's responsibility to ensure that the project is maintainable, and good practices like these are key to ensuring that is possible.
|
184
|
+
|
185
|
+
#### Reviewing a PR
|
186
|
+
We appreciate that it may be difficult to offer constructive criticism, but it is a necessary part of ensuring the project is maintainable and successful. If it is difficult to understand something, request it is better commented. If you do not feel assured of the robustness of a contribution, request it is better tested. If it is unclear what the goal of the piece of work is and how it relates to the [strategy](/strategy.md), request a clarification in the corresponding issue. If a pull-request has no corresponding issue, decreases code coverage or otherwise decreases the quality of the project. Reject it. Otherwise, merge it.
|
187
|
+
|
188
|
+
#### Merging
|
189
|
+
As we keep the `master` branch in a permanent state of 'deployment ready' once-merged your contribution will be live on the next deployment.
|
190
|
+
#### Deploying
|
191
|
+
Any member of the [deployers](https://github.com/orgs/librariesio/teams/deployers) team are able to redeploy the site. If you require a deployment then you might find one of them in our `#general` [chat channel on Slack](slack.libraries.io).
|
@@ -0,0 +1,18 @@
|
|
1
|
+
Thanks for taking the time to raise an issue. This template should guide you through the process of submitting a bug, enhancement or feature request. Please erase any part of this template that is not relevant to your issue.
|
2
|
+
|
3
|
+
## Bugs
|
4
|
+
Before submitting a bug report:
|
5
|
+
|
6
|
+
- [ ] Double-check that the bug is persistent,
|
7
|
+
- [ ] Double-check the bug hasn't already been reported [on our issue tracker](https://github.com/issues?utf8=%E2%9C%93&q=is%3Aopen+is%3Aissue+org%3Alibrariesio), they *should* be labelled `bug` or `bugsnag`.
|
8
|
+
|
9
|
+
If you have completed those steps then please replace this section with a description of the steps taken to recreate the bug, the expected behavior and the observed behavior.
|
10
|
+
|
11
|
+
## Enhancements and Features
|
12
|
+
|
13
|
+
Before submitting an enhancement or feature request:
|
14
|
+
|
15
|
+
- [ ] Check that the enhancement is not already [in our issue tracker](https://github.com/issues?utf8=%E2%9C%93&q=is%3Aopen+is%3Aissue+org%3Alibrariesio), they should be labelled 'enhancement'.,
|
16
|
+
- [ ] For large feature requests, check that your request aligns with our strategy http://docs.libraries.io/strategy.
|
17
|
+
|
18
|
+
If you have complete the above step then please replace this section with a description of your proposed enhancement or feature, the motivation for it, an approach and any alternative approaches considered, and whether you are willing and able to create a pull request for it. Note that we may close this issue if it's not something we're planning on working on.
|
@@ -0,0 +1,10 @@
|
|
1
|
+
Thanks taking the time to contribute. This template should help guide you through the process of creating a pull request for review. Please erase any part of this template that is not relevant to your pull request:
|
2
|
+
|
3
|
+
|
4
|
+
- [ ] Have you followed the guidelines for [contributors](http://docs.libraries.io/contributorshandbook)?
|
5
|
+
- [ ] Have you checked to ensure there aren't other open pull requests on the repository for a similar change?
|
6
|
+
- [ ] Is there a corresponding ticket for your pull request?
|
7
|
+
- [ ] Have you written new tests for your changes?
|
8
|
+
- [ ] Have you successfully run the project with your changes locally?
|
9
|
+
|
10
|
+
If so then please replace this section with a link to the ticket(s) it addressed, an explanation of your change and why you think we should include it. Thanks again!
|
data/.gitignore
ADDED
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--colour
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at andrew@libraries.io. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 ssein
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
# Omniauth::Sourceforge
|
2
|
+
|
3
|
+
An Omniauth strategy for authenticating to Sourceforge.net
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'omniauth-sourceforge'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install omniauth-sourceforge
|
18
|
+
|
19
|
+
## Basic Usage
|
20
|
+
|
21
|
+
use OmniAuth::Builder do
|
22
|
+
provider :sourceforge, ENV['SOURCEFORGE_KEY'], ENV['SOURCEFORGE_SECRET']
|
23
|
+
end
|
24
|
+
|
25
|
+
## Standalone Usage
|
26
|
+
|
27
|
+
use OmniAuth::Builder do
|
28
|
+
provider :sourceforge, ENV['SOURCEFORGE_KEY'], ENV['SOURCEFORGE_SECRET']
|
29
|
+
end
|
30
|
+
|
31
|
+
## Contributing
|
32
|
+
|
33
|
+
1. Fork it
|
34
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
35
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
36
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
37
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
require 'omniauth-oauth'
|
2
|
+
|
3
|
+
module OmniAuth
|
4
|
+
module Strategies
|
5
|
+
class Sourceforge < OmniAuth::Strategies::OAuth
|
6
|
+
|
7
|
+
option :client_options, {
|
8
|
+
site: 'https://sourceforge.net',
|
9
|
+
request_token_path: '/rest/oauth/request_token',
|
10
|
+
authorize_path: '/rest/oauth/authorize',
|
11
|
+
access_token_path: '/rest/oauth/access_token'
|
12
|
+
}
|
13
|
+
|
14
|
+
uid { raw_info['id'].to_s }
|
15
|
+
|
16
|
+
info do
|
17
|
+
{
|
18
|
+
name: raw_info['name'],
|
19
|
+
username: raw_info['username'],
|
20
|
+
email: raw_info['email'],
|
21
|
+
image: raw_info['avatar_url']
|
22
|
+
}
|
23
|
+
end
|
24
|
+
|
25
|
+
extra do
|
26
|
+
{ raw_info: raw_info }
|
27
|
+
end
|
28
|
+
|
29
|
+
def raw_info
|
30
|
+
@raw_info ||= access_token.get('/rest/u').parsed
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
|
37
|
+
OmniAuth.config.add_camelization 'sourceforge', 'Sourceforge'
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'omniauth-sourceforge/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |gem|
|
7
|
+
gem.name = 'omniauth-sourceforge'
|
8
|
+
gem.version = Omniauth::Sourceforge::VERSION
|
9
|
+
gem.authors = ['Andrew Nesbitt']
|
10
|
+
gem.email = ['andrew@libraries.io']
|
11
|
+
gem.description = %q{Omniauth strategy for authenticating to Sourceforge.net}
|
12
|
+
gem.summary = %q{Omniauth strategy for authenticating to Sourceforge.net}
|
13
|
+
gem.homepage = 'https://github.com/librariesio/omniauth-sourceforge'
|
14
|
+
|
15
|
+
gem.files = `git ls-files`.split($/)
|
16
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
17
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
18
|
+
gem.require_paths = ['lib']
|
19
|
+
|
20
|
+
gem.add_dependency 'omniauth', '~> 1.0'
|
21
|
+
gem.add_dependency 'omniauth-oauth', '~> 1.0'
|
22
|
+
|
23
|
+
gem.add_development_dependency 'rspec', '~> 3.1'
|
24
|
+
gem.add_development_dependency 'rspec-its', '~> 1.0'
|
25
|
+
gem.add_development_dependency 'rack-test'
|
26
|
+
gem.add_development_dependency 'simplecov'
|
27
|
+
gem.add_development_dependency 'webmock'
|
28
|
+
gem.add_development_dependency 'rake'
|
29
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe OmniAuth::Strategies::Sourceforge do
|
4
|
+
|
5
|
+
let(:access_token) { double('AccessToken') }
|
6
|
+
let(:parsed_response) { double('ParsedResponse') }
|
7
|
+
let(:response) { double('Response', parsed: parsed_response) }
|
8
|
+
|
9
|
+
let(:sourceforge_service) { OmniAuth::Strategies::Sourceforge.new({}) }
|
10
|
+
|
11
|
+
subject { sourceforge_service }
|
12
|
+
|
13
|
+
before(:each) do
|
14
|
+
allow(subject).to receive(:access_token).and_return(access_token)
|
15
|
+
end
|
16
|
+
|
17
|
+
describe 'client options' do
|
18
|
+
context 'with defaults' do
|
19
|
+
subject { sourceforge_service.options.client_options }
|
20
|
+
|
21
|
+
its(:site) { is_expected.to eq 'https://sourceforge.net' }
|
22
|
+
its(:authorize_url) { is_expected.to eq '/oauth/authorize' }
|
23
|
+
its(:token_url) { is_expected.to eq '/oauth/token' }
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
27
|
+
|
28
|
+
describe 'redirect_url' do
|
29
|
+
context 'with defaults' do
|
30
|
+
subject { sourceforge_service.options }
|
31
|
+
its(:redirect_url) { is_expected.to be_nil }
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
$:.unshift File.expand_path('..', __FILE__)
|
2
|
+
$:.unshift File.expand_path('../../lib', __FILE__)
|
3
|
+
require 'simplecov'
|
4
|
+
SimpleCov.start
|
5
|
+
require 'rspec'
|
6
|
+
require 'rspec/its'
|
7
|
+
require 'rack/test'
|
8
|
+
require 'webmock/rspec'
|
9
|
+
require 'omniauth'
|
10
|
+
require 'omniauth-sourceforge'
|
11
|
+
|
12
|
+
RSpec.configure do |config|
|
13
|
+
config.include WebMock::API
|
14
|
+
config.include Rack::Test::Methods
|
15
|
+
config.extend OmniAuth::Test::StrategyMacros, :type => :strategy
|
16
|
+
end
|
metadata
ADDED
@@ -0,0 +1,173 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: omniauth-sourceforge
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Andrew Nesbitt
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-07-19 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: omniauth
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: omniauth-oauth
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.1'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.1'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec-its
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rack-test
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: simplecov
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: webmock
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rake
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
description: Omniauth strategy for authenticating to Sourceforge.net
|
126
|
+
email:
|
127
|
+
- andrew@libraries.io
|
128
|
+
executables: []
|
129
|
+
extensions: []
|
130
|
+
extra_rdoc_files: []
|
131
|
+
files:
|
132
|
+
- ".github/CONTRIBUTING.md"
|
133
|
+
- ".github/ISSUE_TEMPLATE.md"
|
134
|
+
- ".github/PULL_REQUEST_TEMPLATE.md"
|
135
|
+
- ".gitignore"
|
136
|
+
- ".rspec"
|
137
|
+
- CODE_OF_CONDUCT.md
|
138
|
+
- Gemfile
|
139
|
+
- LICENSE.txt
|
140
|
+
- README.md
|
141
|
+
- Rakefile
|
142
|
+
- lib/omniauth-sourceforge.rb
|
143
|
+
- lib/omniauth-sourceforge/version.rb
|
144
|
+
- lib/omniauth/strategies/sourceforge.rb
|
145
|
+
- omniauth-sourceforge.gemspec
|
146
|
+
- spec/omniauth/strategies/sourceforge_spec.rb
|
147
|
+
- spec/spec_helper.rb
|
148
|
+
homepage: https://github.com/librariesio/omniauth-sourceforge
|
149
|
+
licenses: []
|
150
|
+
metadata: {}
|
151
|
+
post_install_message:
|
152
|
+
rdoc_options: []
|
153
|
+
require_paths:
|
154
|
+
- lib
|
155
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
161
|
+
requirements:
|
162
|
+
- - ">="
|
163
|
+
- !ruby/object:Gem::Version
|
164
|
+
version: '0'
|
165
|
+
requirements: []
|
166
|
+
rubyforge_project:
|
167
|
+
rubygems_version: 2.6.4
|
168
|
+
signing_key:
|
169
|
+
specification_version: 4
|
170
|
+
summary: Omniauth strategy for authenticating to Sourceforge.net
|
171
|
+
test_files:
|
172
|
+
- spec/omniauth/strategies/sourceforge_spec.rb
|
173
|
+
- spec/spec_helper.rb
|