Skip to content

Commit 33a5fff

Browse files
committed
Add CONTRIBUTING.md [ci skip]
1 parent 01cb69b commit 33a5fff

File tree

3 files changed

+111
-11
lines changed

3 files changed

+111
-11
lines changed

CONTRIBUTING.md

Lines changed: 103 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,53 @@
1-
Thanks for taking the time to contribute to jquery-rails! Please
2-
take a moment to read the following brief guidelines to help streamline
3-
the merging process.
1+
Contributing to jquery-rails
2+
=====================
43

5-
## Updating jQuery
4+
[![Build Status](https://travis-ci.org/rails/jquery-rails.svg?branch=master)](https://travis-ci.org/rails/jquery-rails)
5+
6+
jquery-rails is work of [many contributors](https://github.com/rails/jquery-rails/graphs/contributors). You're encouraged to submit [pull requests](https://github.com/rails/jquery-rails/pulls), [propose features and discuss issues](https://github.com/rails/jquery-rails/issues).
7+
8+
#### Updating jQuery
69

710
If the jquery or jquery-ui scripts are outdated (i.e. maybe a new version of jquery was released yesterday), feel free to open an issue and prod us to get that thing updated. However, for security reasons, we won't be accepting pull requests with updated jquery or jquery-ui scripts.
811

9-
## Changes to jquery_ujs.js
12+
#### Changes to jquery_ujs.js
1013

1114
**If it's an issue pertaining to the jquery-ujs javascript, please
1215
report it to the [rails/jquery-ujs project](https://github.com/rails/jquery-ujs/issues).**
1316

14-
## Tests
17+
#### Fork the Project
18+
19+
Fork the [project on Github](https://github.com/rails/jquery-rails) and check out your copy.
20+
21+
```
22+
git clone https://github.com/contributor/jquery-rails.git
23+
cd jquery-rails
24+
git remote add upstream https://github.com/rails/jquery-rails.git
25+
```
26+
27+
#### Create a Topic Branch
28+
29+
Make sure your fork is up-to-date and create a topic branch for your feature or bug fix.
30+
31+
```
32+
git checkout master
33+
git pull upstream master
34+
git checkout -b my-feature-branch
35+
```
36+
37+
#### Bundle Install and Test
38+
39+
Ensure that you can build the project and run tests.
40+
41+
```
42+
bundle install
43+
bundle exec rake test
44+
```
45+
46+
#### Write Tests
47+
48+
Try to write a test that reproduces the problem you're trying to fix or describes a feature that you want to build. Add to [test](test).
49+
50+
#### Testing
1551

1652
This is a gem that simply includes jQuery and jQuery UJS into the Rails
1753
asset pipeline. The asset pipeline functionality is well tested within the
@@ -29,8 +65,68 @@ If you're making changes to the actual gem, run the tests as follows:
2965
2. Install the gems: `bundle install`
3066

3167
3. Change the jquery-rails gem in the Gemfile to use your local
32-
version of the gem with your updates: `gem 'rspec-rails', :path => '../path/to/jquery-rails'`
68+
version of the gem with your updates: `gem 'jquery-rails', :path => '../path/to/jquery-rails'`
3369

3470
4. Update your bundled jquery-rails gem: `bundle update jquery-rails`
3571

3672
5. Run the tests: `bundle exec rspec spec/`
73+
74+
We definitely appreciate pull requests that highlight or reproduce a problem, even without a fix.
75+
76+
#### Write Code
77+
78+
Implement your feature or bug fix.
79+
80+
Make sure that `bundle exec rake test` completes without errors.
81+
82+
#### Write Documentation
83+
84+
Document any external behavior in the [README](README.md).
85+
86+
#### Commit Changes
87+
88+
Make sure git knows your name and email address:
89+
90+
```
91+
git config --global user.name "Your Name"
92+
git config --global user.email "[email protected]"
93+
```
94+
95+
Writing good commit logs is important. A commit log should describe what changed and why.
96+
97+
```
98+
git add ...
99+
git commit
100+
```
101+
102+
#### Push
103+
104+
```
105+
git push origin my-feature-branch
106+
```
107+
108+
#### Make a Pull Request
109+
110+
Go to https://github.com/contributor/jquery-rails and select your feature branch. Click the 'Pull Request' button and fill out the form. Pull requests are usually reviewed within a few days.
111+
112+
#### Rebase
113+
114+
If you've been working on a change for a while, rebase with upstream/master.
115+
116+
```
117+
git fetch upstream
118+
git rebase upstream/master
119+
git push origin my-feature-branch -f
120+
```
121+
122+
#### Check on Your Pull Request
123+
124+
Go back to your pull request after a few minutes and see whether it passed muster with Travis-CI. Everything should look green, otherwise fix issues and amend your commit as described above.
125+
126+
#### Be Patient
127+
128+
It's likely that your change will not be merged and that the nitpicky maintainers will ask you to do more, or fix seemingly benign problems. Hang on there!
129+
130+
#### Thank You
131+
132+
Please do know that we really appreciate and value your time and work. We love you, really.

LICENSE renamed to MIT-LICENSE

File renamed without changes.

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,20 @@ For jQuery UI, we recommend the [jquery-ui-rails](https://github.com/joliss/jque
4343
*As of v3.0, jquery-rails no longer includes jQuery UI. Use the
4444
jquery-ui-rails gem above.*
4545

46-
## Contributing
46+
## Contributing to jquery-rails
4747

48-
Feel free to open an issue ticket if you find something that could be improved. A couple notes:
48+
jquery-rails is work of many contributors. You're encouraged to submit pull requests, propose
49+
features and discuss issues.
4950

5051
* If it's an issue pertaining to the jquery-ujs javascript, please report it to the [jquery-ujs project](https://github.com/rails/jquery-ujs).
5152

5253
* If the jQuery scripts are outdated (i.e. maybe a new version of jquery was released yesterday), feel free to open an issue and prod us to get that thing updated. However, for security reasons, we won't be accepting pull requests with updated jQuery scripts.
5354

55+
See [CONTRIBUTING](CONTRIBUTING.md).
56+
57+
## License
58+
jquery-rails is released under the [MIT License](MIT-LICENSE).
59+
5460
## Acknowledgements
5561

5662
Many thanks are due to all of [the jquery-rails contributors](https://github.com/rails/jquery-rails/graphs/contributors). Special thanks to [JangoSteve](http://github.com/JangoSteve) for tirelessly answering questions and accepting patches, and the [Rails Core Team](https://github.com/organizations/rails/teams/617) for making jquery-rails an official part of Rails 3.1.
57-
58-
Copyright [André Arko](http://arko.net), released under the MIT License.

0 commit comments

Comments
 (0)