mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-22 22:06:50 +00:00
207 lines
6.6 KiB
HTML
207 lines
6.6 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
|
<title>
|
|
File: CONTRIBUTING
|
|
|
|
— Documentation by YARD 0.8.7.6
|
|
|
|
</title>
|
|
|
|
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
|
|
|
|
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
|
|
|
|
<script type="text/javascript" charset="utf-8">
|
|
hasFrames = window.top.frames.main ? true : false;
|
|
relpath = '';
|
|
framesUrl = "frames.html#!file.CONTRIBUTING.html";
|
|
</script>
|
|
|
|
|
|
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
|
|
|
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
|
|
|
|
|
</head>
|
|
<body>
|
|
<div id="header">
|
|
<div id="menu">
|
|
|
|
<a href="_index.html">Index</a> »
|
|
<span class="title">File: CONTRIBUTING</span>
|
|
|
|
|
|
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
|
</div>
|
|
|
|
<div id="search">
|
|
|
|
<a class="full_list_link" id="class_list_link"
|
|
href="class_list.html">
|
|
Class List
|
|
</a>
|
|
|
|
<a class="full_list_link" id="method_list_link"
|
|
href="method_list.html">
|
|
Method List
|
|
</a>
|
|
|
|
<a class="full_list_link" id="file_list_link"
|
|
href="file_list.html">
|
|
File List
|
|
</a>
|
|
|
|
</div>
|
|
<div class="clear"></div>
|
|
</div>
|
|
|
|
<iframe id="search_frame"></iframe>
|
|
|
|
<div id="content"><div id='filecontents'>
|
|
<h2 id="label-Have+an+issue-3F">Have an issue?</h2>
|
|
|
|
<p>Before opening an issue, try the following:</p>
|
|
|
|
<h5 id="label-Consult+the+documentation">Consult the documentation</h5>
|
|
|
|
<p>See if your issue can be resolved by information in the documentation.</p>
|
|
<ul><li>
|
|
<p><a
|
|
href="https://github.com/rails-api/active_model_serializers/tree/master/docs">0.10
|
|
(master) Documentation</a></p>
|
|
</li><li>
|
|
<p><a
|
|
href="http://www.rubydoc.info/github/rails-api/active_model_serializers/v0.10.0"><img
|
|
src="http://img.shields.io/badge/yard-docs-blue.svg"></a></p>
|
|
</li><li>
|
|
<p><a href="docs">Guides</a></p>
|
|
</li><li>
|
|
<p><a
|
|
href="https://github.com/rails-api/active_model_serializers/tree/0-9-stable">0.9
|
|
(0-9-stable) Documentation</a></p>
|
|
</li><li>
|
|
<p><a
|
|
href="https://github.com/rails-api/active_model_serializers/tree/0-8-stable">0.8
|
|
(0-8-stable) Documentation</a></p>
|
|
</li></ul>
|
|
|
|
<h5 id="label-Check+for+an+existing+issue">Check for an existing issue</h5>
|
|
|
|
<p>Take a look at the issues to see if a similar one has already been created.
|
|
If one exists, please add any additional information that might expedite
|
|
resolution.</p>
|
|
|
|
<h4 id="label-Open+an+issue">Open an issue</h4>
|
|
|
|
<p>If the documentation wasn't able to help resolve the issue and no issue
|
|
already exists, please open a new issue with the following in mind:</p>
|
|
<ul><li>
|
|
<p>Please make sure only to include one issue per report. If you encounter
|
|
multiple, unrelated issues, please report them as such.</p>
|
|
</li><li>
|
|
<p>Be detailed. Provide backtraces and example code when possible. Provide
|
|
information about your environment. e.g., Ruby version, rails version, etc.</p>
|
|
</li><li>
|
|
<p>Own your issue. Actively participate in the discussion and help drive the
|
|
issue to closure.</p>
|
|
</li><li>
|
|
<p>If you resolve your own issue, please share the details on the issue and
|
|
close it out. Others might have the same issue and sharing solutions is
|
|
helpful.</p>
|
|
</li></ul>
|
|
|
|
<h2 id="label-Contributing">Contributing</h2>
|
|
|
|
<p>Contributing can be done in many ways and is not exclusive to code. If you
|
|
have thoughts on a particular issue or feature, we encourage you to open
|
|
new issues for discussion or add your comments to existing ones.</p>
|
|
|
|
<h4 id="label-Pull+requests">Pull requests</h4>
|
|
|
|
<p>We also gladly welcome pull requests. When preparing to work on pull
|
|
request, please adhere to these standards:</p>
|
|
<ul><li>
|
|
<p>Base work on the master branch unless fixing an issue with <a
|
|
href="https://github.com/rails-api/active_model_serializers/tree/0-9-stable">0.9-stable</a>
|
|
or <a
|
|
href="https://github.com/rails-api/active_model_serializers/tree/0-8-stable">0.8-stable</a></p>
|
|
</li><li>
|
|
<p>Squash your commits and regularly rebase off master.</p>
|
|
</li><li>
|
|
<p>Provide a description of the changes contained in the pull request.</p>
|
|
</li><li>
|
|
<p>Note any specific areas that should be reviewed.</p>
|
|
</li><li>
|
|
<p>Include tests.</p>
|
|
</li><li>
|
|
<p>The test suite must pass on <a href=".travis.yml">supported Ruby
|
|
versions</a></p>
|
|
</li><li>
|
|
<p>Include updates to the <a
|
|
href="https://github.com/rails-api/active_model_serializers/tree/master/docs">documentation</a>
|
|
where applicable.</p>
|
|
</li><li>
|
|
<p>Update the <a
|
|
href="https://github.com/rails-api/active_model_serializers/blob/master/CHANGELOG.md">CHANGELOG</a>
|
|
to the appropriate sections with a brief description of the changes.</p>
|
|
</li><li>
|
|
<p>Do not change the VERSION file.</p>
|
|
</li></ul>
|
|
|
|
<h4 id="label-Running+tests">Running tests</h4>
|
|
|
|
<p>Run all tests</p>
|
|
|
|
<p><code>$ rake test</code></p>
|
|
|
|
<p>Run a single test suite</p>
|
|
|
|
<p><code>$ rake test TEST=path/to/test.rb</code></p>
|
|
|
|
<p>Run a single test</p>
|
|
|
|
<p><code>$ rake test TEST=path/to/test.rb
|
|
TESTOPTS="--name=test_something"</code></p>
|
|
|
|
<p>Run tests against different Rails versions by setting the RAILS_VERSION
|
|
variable and bundling gems. (save this script somewhere executable and run
|
|
from top of AMS repository)</p>
|
|
|
|
<pre class="code ruby"><code class="ruby">#!/usr/bin/env bash
|
|
|
|
rcommand='puts YAML.load_file("./.travis.yml")["env"]["matrix"].join(" ").gsub("RAILS_VERSION=", "")'
|
|
versions=$(ruby -ryaml -e "$rcommand")
|
|
|
|
for version in ${versions[@]}; do
|
|
export RAILS_VERSION="$version"
|
|
rm -f Gemfile.lock
|
|
bundle check || bundle --local || bundle
|
|
bundle exec rake test
|
|
if [ "$?" -eq 0 ]; then
|
|
# green in ANSI
|
|
echo -e "\033[32m **** Tests passed against Rails ${RAILS_VERSION} **** \033[0m"
|
|
else
|
|
# red in ANSI
|
|
echo -e "\033[31m **** Tests failed against Rails ${RAILS_VERSION} **** \033[0m"
|
|
read -p '[Enter] any key to continue, [q] to quit...' prompt
|
|
if [ "$prompt" = 'q' ]; then
|
|
unset RAILS_VERSION
|
|
exit 1
|
|
fi
|
|
fi
|
|
unset RAILS_VERSION
|
|
done</code></pre>
|
|
</div></div>
|
|
|
|
<div id="footer">
|
|
Generated on Wed Jun 15 10:25:09 2016 by
|
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
0.8.7.6 (ruby-2.2.4).
|
|
</div>
|
|
|
|
</body>
|
|
</html> |