File: file.CONTRIBUTING.html

package info (click to toggle)
ruby-rspec-stubbed-env 1.0.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,004 kB
  • sloc: ruby: 932; javascript: 529; sh: 4; makefile: 4
file content (200 lines) | stat: -rw-r--r-- 8,154 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
  File: CONTRIBUTING
  
    &mdash; Documentation by YARD 0.9.37
  
</title>

  <link rel="stylesheet" href="css/style.css" type="text/css" />

  <link rel="stylesheet" href="css/common.css" type="text/css" />

<script type="text/javascript">
  pathId = "CONTRIBUTING";
  relpath = '';
</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 class="nav_wrap">
      <iframe id="nav" src="file_list.html?1"></iframe>
      <div id="resizer"></div>
    </div>

    <div id="main" tabindex="-1">
      <div id="header">
        <div id="menu">
  
    <a href="_index.html">Index</a> &raquo; 
    <span class="title">File: CONTRIBUTING</span>
  
</div>

        <div id="search">
  
    <a class="full_list_link" id="class_list_link"
        href="class_list.html">

        <svg width="24" height="24">
          <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
          <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
          <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
        </svg>
    </a>
  
</div>
        <div class="clear"></div>
      </div>

      <div id="content"><div id='filecontents'><h1 id="contributing">Contributing</h1>

<p>Bug reports and pull requests are welcome on GitHub, CodeBerg, or <a href="https://gitlab.com/galtzo-floss/rspec-stubbed_env">GitLab</a>.<br>
This project should be a safe, welcoming space for collaboration, so contributors agree to adhere to<br>
the <a href="https://gitlab.com/galtzo-floss/rspec-stubbed_env/-/blob/main/CODE_OF_CONDUCT.md">code of conduct</a>.</p>

<p>To submit a patch, please fork the project, create a patch with tests, and send a pull request.</p>

<p>Remember to <a href="https://keepachangelog.com/en/1.0.0/"><img src="https://img.shields.io/badge/keep--a--changelog-1.0.0-FFDD67.svg?style=flat" alt="Keep A Changelog"></a>.</p>

<h2 id="help-out">Help out!</h2>

<p>Take a look at the <code>reek</code> list which is the file called <code>REEK</code> and find something to improve.</p>

<p>Follow these instructions:</p>

<ol>
  <li>Fork the repository</li>
  <li>Create a feature branch (<code>git checkout -b my-new-feature</code>)</li>
  <li>Make some fixes.</li>
  <li>Commit changes (<code>git commit -am 'Added some feature'</code>)</li>
  <li>Push to the branch (<code>git push origin my-new-feature</code>)</li>
  <li>Make sure to add tests for it. This is important, so it doesn’t break in a future release.</li>
  <li>Create new Pull Request.</li>
</ol>

<h2 id="appraisals">Appraisals</h2>

<p>From time to time the Appraisal2 gemfiles in <code>gemfiles/</code> will need to be updated.<br>
They are created and updated with the commands:</p>

<pre class="code language-console"><code class="language-console">BUNDLE_GEMFILE=Appraisal.root.gemfile bundle
BUNDLE_GEMFILE=Appraisal.root.gemfile bundle exec appraisal update
bundle exec rake rubocop_gradual:autocorrect
</code></pre>

<p>When adding an appraisal to CI check the <a href="https://github.com/ruby/ruby-builder/releases/tag/toolcache">runner tool cache</a> to see which runner to use.</p>

<h2 id="the-reek-list">The Reek List</h2>

<p>Take a look at the <code>reek</code> list which is the file called <code>REEK</code> and find something to improve.</p>

<p>To refresh the <code>reek</code> list:</p>

<pre class="code language-console"><code class="language-console">bundle exec reek &gt; REEK
</code></pre>

<h2 id="run-tests">Run Tests</h2>

<p>To run all tests</p>

<pre class="code language-console"><code class="language-console">bundle exec rake test
</code></pre>

<h2 id="lint-it">Lint It</h2>

<p>Run all the default tasks, which includes running the gradually autocorrecting linter, <code>rubocop-gradual</code>.</p>

<pre class="code language-console"><code class="language-console">bundle exec rake
</code></pre>

<p>Or just run the linter.</p>

<pre class="code language-console"><code class="language-console">bundle exec rake rubocop_gradual:autocorrect
</code></pre>

<h2 id="contributors">Contributors</h2>

<p>Your picture could be here!</p>

<p><a href="https://github.com/galtzo-floss/rspec-stubbed_env/graphs/contributors"><img src="https://contrib.rocks/image?repo=galtzo-floss/rspec-stubbed_env" alt="Contributors"></a></p>

<p>Made with <a href="https://contrib.rocks">contributors-img</a>.</p>

<p>Also see GitLab Contributors: <a href="https://gitlab.com/galtzo-floss/rspec-stubbed_env/-/graphs/main">https://gitlab.com/galtzo-floss/rspec-stubbed_env/-/graphs/main</a></p>

<h2 id="for-maintainers">For Maintainers</h2>

<h3 id="one-time-per-maintainer-setup">One-time, Per-maintainer, Setup</h3>

<p><strong>IMPORTANT</strong>: If you want to sign the build you create,<br>
your public key for signing gems will need to be picked up by the line in the<br>
<code>gemspec</code> defining the <code>spec.cert_chain</code> (check the relevant ENV variables there).<br>
All releases to RubyGems.org will be signed.<br>
See: <a href="https://guides.rubygems.org/security/#building-gems">RubyGems Security Guide</a></p>

<p>NOTE: To build without signing the gem you must set <code>SKIP_GEM_SIGNING</code> to some value in your environment.</p>

<h3 id="to-release-a-new-version">To release a new version:</h3>

<ol>
  <li>Run <code>bin/setup &amp;&amp; bin/rake</code> as a “test, coverage, &amp; linting” sanity check</li>
  <li>Update the version number in <code>version.rb</code>, and ensure <code>CHANGELOG.md</code> reflects changes</li>
  <li>Run <code>bin/setup &amp;&amp; bin/rake</code> again as a secondary check, and to update <code>Gemfile.lock</code>
</li>
  <li>Run <code>git commit -am "🔖 Prepare release v&lt;VERSION&gt;"</code> to commit the changes</li>
  <li>Run <code>git push</code> to trigger the final CI pipeline before release, and merge PRs
    <ul>
      <li>NOTE: Remember to <a href="https://github.com/galtzo-floss/rspec-stubbed_env/actions">check the build</a>.</li>
    </ul>
  </li>
  <li>Run <code>export GIT_TRUNK_BRANCH_NAME="$(git remote show origin | grep 'HEAD branch' | cut -d ' ' -f5)" &amp;&amp; echo $GIT_TRUNK_BRANCH_NAME</code>
</li>
  <li>Run <code>git checkout $GIT_TRUNK_BRANCH_NAME</code>
</li>
  <li>Run <code>git pull origin $GIT_TRUNK_BRANCH_NAME</code> to ensure latest trunk code</li>
  <li>Set <code>SOURCE_DATE_EPOCH</code> so <code>rake build</code> and <code>rake release</code> use same timestamp, and generate same checksums
    <ul>
      <li>Run <code>export SOURCE_DATE_EPOCH=$EPOCHSECONDS &amp;&amp; echo $SOURCE_DATE_EPOCH</code>
</li>
      <li>If the echo above has no output, then it didn’t work.</li>
      <li>Note: <code>zsh/datetime</code> module is needed, if running <code>zsh</code>.</li>
      <li>In older versions of <code>bash</code> you can use <code>date +%s</code> instead, i.e. <code>export SOURCE_DATE_EPOCH=$(date +%s) &amp;&amp; echo $SOURCE_DATE_EPOCH</code>
</li>
    </ul>
  </li>
  <li>Run <code>bundle exec rake build</code>
</li>
  <li>Run <code>bin/gem_checksums</code> (more context <a href="https://github.com/rubygems/rubygems/pull/6022">1</a>, <a href="https://github.com/rubygems/guides/pull/325">2</a>)<br>
to create SHA-256 and SHA-512 checksums. This functionality is provided by the <code>stone_checksums</code><br>
<a href="https://github.com/galtzo-floss/stone_checksums">gem</a>.
    <ul>
      <li>The script automatically commits but does not push the checksums</li>
    </ul>
  </li>
  <li>Run <code>bundle exec rake release</code> which will create a git tag for the version,<br>
push git commits and tags, and push the <code>.gem</code> file to <a href="https://rubygems.org">rubygems.org</a>
</li>
</ol>

</div></div>

      <div id="footer">
  Generated on Mon Aug  4 22:57:10 2025 by
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
  0.9.37 (ruby-3.4.5).
</div>

    </div>
  </body>
</html>