hoboken 0.9.0 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (98) hide show
  1. checksums.yaml +4 -4
  2. data/.github/ISSUE_TEMPLATE/bug_report.md +33 -0
  3. data/.github/ISSUE_TEMPLATE/code_change.md +11 -0
  4. data/.github/PULL_REQUEST_TEMPLATE.md +25 -0
  5. data/.gitignore +3 -0
  6. data/.rubocop.yml +13 -5
  7. data/.tool-versions +1 -0
  8. data/CHANGELOG.md +131 -0
  9. data/CODE_OF_CONDUCT.md +8 -0
  10. data/CONTRIBUTING.md +16 -0
  11. data/README.md +10 -14
  12. data/Rakefile +7 -16
  13. data/hoboken.gemspec +18 -8
  14. data/lib/hoboken/add_ons/active_record.rb +142 -0
  15. data/lib/hoboken/add_ons/airbrake.rb +64 -0
  16. data/lib/hoboken/add_ons/heroku.rb +5 -1
  17. data/lib/hoboken/add_ons/internationalization.rb +2 -2
  18. data/lib/hoboken/add_ons/metrics.rb +3 -2
  19. data/lib/hoboken/add_ons/omniauth.rb +9 -8
  20. data/lib/hoboken/add_ons/rubocop.rb +10 -4
  21. data/lib/hoboken/add_ons/sequel.rb +55 -29
  22. data/lib/hoboken/add_ons/sidekiq.rb +137 -0
  23. data/lib/hoboken/add_ons/turnip.rb +109 -0
  24. data/lib/hoboken/add_ons/twbs.rb +5 -35
  25. data/lib/hoboken/add_ons/vcr.rb +54 -0
  26. data/lib/hoboken/generate.rb +18 -10
  27. data/lib/hoboken/templates/Gemfile.erb.tt +13 -3
  28. data/lib/hoboken/templates/README.md.tt +18 -6
  29. data/lib/hoboken/templates/Rakefile.tt +11 -0
  30. data/lib/hoboken/templates/active_record.rake +11 -0
  31. data/lib/hoboken/templates/airbrake.rb.tt +13 -0
  32. data/lib/hoboken/templates/classic.rb.tt +6 -20
  33. data/lib/hoboken/templates/classic_environment.rb.tt +51 -0
  34. data/lib/hoboken/templates/config.ru.tt +2 -4
  35. data/lib/hoboken/templates/console +19 -0
  36. data/lib/hoboken/templates/example_worker.rb.tt +14 -0
  37. data/lib/hoboken/templates/metrics.rake.tt +3 -1
  38. data/lib/hoboken/templates/modular.rb.tt +8 -25
  39. data/lib/hoboken/templates/modular_environment.rb.tt +62 -0
  40. data/lib/hoboken/templates/rspec.rake.tt +7 -3
  41. data/lib/hoboken/templates/rubocop.yml.tt +23 -3
  42. data/lib/hoboken/templates/seeds.rb +12 -0
  43. data/lib/hoboken/templates/server +15 -0
  44. data/lib/hoboken/templates/setup +28 -0
  45. data/lib/hoboken/templates/sidekiq.rb.tt +21 -0
  46. data/lib/hoboken/templates/spec/app_spec.rb.tt +0 -2
  47. data/lib/hoboken/templates/spec/example_worker_spec.rb.tt +16 -0
  48. data/lib/hoboken/templates/spec/rack_matchers.rb.tt +8 -6
  49. data/lib/hoboken/templates/spec/spec_helper.rb.tt +2 -6
  50. data/lib/hoboken/templates/spec/turnip_helper.rb.tt +10 -0
  51. data/lib/hoboken/templates/styles.css.tt +1 -1
  52. data/lib/hoboken/templates/support/rack_test_assertions.rb.tt +5 -3
  53. data/lib/hoboken/templates/test/test_helper.rb.tt +2 -5
  54. data/lib/hoboken/templates/test/unit/example_worker_test.rb.tt +20 -0
  55. data/lib/hoboken/templates/vcr_setup.rb.tt +15 -0
  56. data/lib/hoboken/templates/views/index.erb.tt +1 -1
  57. data/lib/hoboken/templates/views/layout.erb.tt +3 -3
  58. data/lib/hoboken/version.rb +1 -1
  59. data/lib/hoboken.rb +54 -10
  60. data/test/integration/active_record_test.rb +66 -0
  61. data/test/integration/airbrake_test.rb +31 -0
  62. data/test/integration/generate_classic_test.rb +75 -0
  63. data/test/integration/generate_modular_test.rb +83 -0
  64. data/test/integration/github_action_test.rb +13 -0
  65. data/test/integration/heroku_test.rb +14 -0
  66. data/test/integration/internationalization_test.rb +26 -0
  67. data/test/integration/metrics_test.rb +54 -0
  68. data/test/integration/omniauth_test.rb +143 -0
  69. data/test/integration/rubocop_test.rb +39 -0
  70. data/test/integration/sequel_test.rb +64 -0
  71. data/test/integration/sidekiq_test.rb +105 -0
  72. data/test/integration/travis_test.rb +13 -0
  73. data/test/integration/turnip_test.rb +51 -0
  74. data/test/integration/twitter_bootstrap_test.rb +39 -0
  75. data/test/integration/vcr_test.rb +54 -0
  76. data/test/test_helper.rb +21 -10
  77. data/www/Gemfile +4 -0
  78. data/www/README.md +2 -0
  79. data/www/config.rb +11 -0
  80. data/www/source/documentation.html.erb +274 -0
  81. data/www/source/images/hoboken-running.png +0 -0
  82. data/www/source/images/hoboken.png +0 -0
  83. data/www/source/images/sinatra.png +0 -0
  84. data/www/source/index.html.erb +44 -0
  85. data/www/source/javascripts/all.js +1 -0
  86. data/www/source/layouts/layout.erb +38 -0
  87. data/www/source/stylesheets/all.css.scss +116 -0
  88. data/www/source/stylesheets/normalize.css +375 -0
  89. metadata +230 -44
  90. data/lib/hoboken/add_ons/sprockets.rb +0 -99
  91. data/lib/hoboken/templates/console.sh +0 -5
  92. data/lib/hoboken/templates/server.sh +0 -12
  93. data/lib/hoboken/templates/setup.sh +0 -7
  94. data/lib/hoboken/templates/sprockets.rake +0 -39
  95. data/lib/hoboken/templates/sprockets_chain.rb +0 -30
  96. data/lib/hoboken/templates/sprockets_helper.rb +0 -17
  97. data/test/integration/add_on_test.rb +0 -505
  98. data/test/integration/generate_test.rb +0 -203
@@ -0,0 +1,274 @@
1
+ <section>
2
+ <h2 id="basic-features">Basic Features</h2>
3
+ <p>All projects generated with Hoboken have the following common features:</p>
4
+ <ul class="features">
5
+ <li>sets up <a href="https://github.com/kalasjocke/sinatra-asset-pipeline">sinatra-asset-pipeline</a> (non-API projects only)</li>
6
+ <li>a <code>Rakefile</code> with tasks for running tests or specs</li>
7
+ <li>scripts for common tasks: installing dependencies, starting the development server, and starting a console (with <a href="https://github.com/sickill/racksh">racksh</a> support)</li>
8
+ <li>uses <a href="https://github.com/puma/puma">Puma</a> as the default web server</li>
9
+ <li><a href="https://github.com/jeremyevans/erubi">erubi</a> templating; HTML escaping is on by default</li>
10
+ <li>uses <a href="https://test-unit.github.io/">test-unit</a> by default (<a href="https://rspec.info/">RSpec</a> can also be used, see the <code>--test-framework</code> option under the <a href="#generate">generate command</a>)</li>
11
+ <li><a href="http://rubygems.org/gems/rack_csrf">Rack::Csrf</a> is turned on by default</li>
12
+ <li>environment variable support via the <a href="http://rubygems.org/gems/dotenv">dotenv</a> gem</li>
13
+ <li>Procfile for <a href="https://github.com/ddollar/foreman">foreman</a> support; if foreman is not installed uses rackup instead</li>
14
+ <li>code reloading via the <a href="https://github.com/alexch/rerun">rerun gem</a> is enabled for the development environment</li>
15
+ <li><a href="https://github.com/deivid-rodriguez/pry-byebug">pry-byebug</a> for debugging</li>
16
+ <li>custom Rack::Test <a href="https://github.com/bnadlerjr/hoboken/blob/main/lib/hoboken/templates/support/rack_helpers.rb.tt">helpers</a> and <a href="https://github.com/bnadlerjr/hoboken/blob/main/lib/hoboken/templates/support/rack_test_assertions.rb.tt">assertions</a> (or <a href="https://github.com/bnadlerjr/hoboken/blob/main/lib/hoboken/templates/spec/rack_matchers.rb.tt">matchers</a> for RSpec)</li>
17
+ </ul>
18
+
19
+ <h2 id="project-structure">Project Structure</h2>
20
+ <p>Projects are generated with the following structure:</p>
21
+ <table>
22
+ <tr>
23
+ <td>Gemfile</td>
24
+ <th>Your app's dependencies</th>
25
+ </tr>
26
+ <tr>
27
+ <td>Procfile</td>
28
+ <th>Specifies the commands that are executed by the app on startup (foreman must be installed separately)</th>
29
+ </tr>
30
+ <tr>
31
+ <td>README.md</td>
32
+ <th>A sample README</th>
33
+ </tr>
34
+ <tr>
35
+ <td>Rakefile</td>
36
+ <th>Basic app tasks</th>
37
+ </tr>
38
+ <tr>
39
+ <td>app.rb</td>
40
+ <th>The main application file</th>
41
+ </tr>
42
+ <tr>
43
+ <td>config.ru</td>
44
+ <th>Rackup file</th>
45
+ </tr>
46
+ <tr>
47
+ <td>/bin</td>
48
+ <th>Helper scripts for installing dependencies, starting the development server, etc.</th>
49
+ </tr>
50
+ <tr>
51
+ <td>/config</td>
52
+ <th>Application configuration (Puma, etc.)</th>
53
+ </tr>
54
+ <tr>
55
+ <td>/public</td>
56
+ <th>Static assets (i.e. css, js, images)</th>
57
+ </tr>
58
+ <tr>
59
+ <td>/tasks</td>
60
+ <th>Various Rake task definitions</th>
61
+ </tr>
62
+ <tr>
63
+ <td>/test or /spec</td>
64
+ <th>Basic unit test and test helper support</th>
65
+ </tr>
66
+ <tr>
67
+ <td>/views</td>
68
+ <th>Your app's views (not present if --tiny option was used)</th>
69
+ </tr>
70
+ </table>
71
+ <p>The <code>app.rb</code> file contains the main Sinatra application. If the <code>--modular</code> option is used, the application will inherit from Sinatra::Base. Refer to the Sinatra documentation on <a href="http://www.sinatrarb.com/intro.html#Modular%20vs.%20Classic%20Style">classic vs. modular</a> applications for more information.</p>
72
+
73
+ <h2 id="general-command-reference">General Command Reference</h2>
74
+
75
+ <h3 id="generate">generate</h3>
76
+ <p>Generate a new Sinatra app</p>
77
+ <p><pre class="command">$ hoboken generate [APP_NAME]</pre></p>
78
+ <h4>Options</h4>
79
+ <dl>
80
+ <dt><pre>[--ruby-version=RUBY_VERSION]</pre></dt>
81
+ <dd>Specify a Ruby version for the Gemfile. By default it will use the currently installed version.</dd>
82
+ <dt><pre>[--tiny], [--no-tiny]</pre></dt>
83
+ <dd>Generate views inline; do not create /public folder.</dd>
84
+ <dt><pre>[--type=TYPE]</pre></dt>
85
+ <dd>Architecture type (classic or modular). Default is classic.</dd>
86
+ <dt><pre>[--git], [--no-git]</pre></dt>
87
+ <dd>Create a Git repository and make initial commit.</dd>
88
+ <dt><pre>[--api-only], [--no-api-only]</pre></dt>
89
+ <dd>API only, no views, public folder, etc.</dd>
90
+ <dt><pre>[--test-framework]</pre></dt>
91
+ <dd>Testing framework; can be either test-unit or rspec. Default is test-unit.</dd>
92
+ </dl>
93
+
94
+ <h4>Rake Tasks</h4>
95
+ <p>By default all newly generated projects will have the following Rake tasks available.</p>
96
+ <dl>
97
+ <dt><pre class="command">$ rake ci</pre></dt>
98
+ <dd>Runs tests (or specs) and any configured linting add-ons</dd>
99
+ <dt><pre class="command">$ rake test:all</pre></dt>
100
+ <dd>Run all tests (test-unit only)</dd>
101
+ <dt><pre class="command">$ rake test:integration</pre></dt>
102
+ <dd>Run tests for integration (test-unit only)</dd>
103
+ <dt><pre class="command">$ rake test:unit</pre></dt>
104
+ <dd>Run tests for unit (test-unit only)</dd>
105
+ <dt><pre class="command">$ rake spec</pre></dt>
106
+ <dd>Run all specs (RSpec only)</dd>
107
+ </dl>
108
+
109
+ <hr />
110
+
111
+ <h3 id="help">help</h3>
112
+ <p>Describe available commands. If COMMAND is given, describe the specific COMMAND.</p>
113
+ <p><pre class="command">$ hoboken help [COMMAND]</pre></p>
114
+
115
+ <hr />
116
+
117
+ <h3 id="version">version</h3>
118
+ <p>Print version and quit.</p>
119
+ <p><pre class="command">$ hoboken version</pre></p>
120
+
121
+ <hr />
122
+
123
+ <h2 id="add-on-command-reference">Add On Command Reference</h2>
124
+
125
+ <h3 id="airbrake">Airbrake</h3>
126
+ <p>Support for <a href="https://github.com/airbrake/airbrake">Airbrake</a> error reporting.</p>
127
+ <p><pre class="command">$ hoboken add:airbrake</pre></p>
128
+ <p>Sets up Airbrake middleware.</p>
129
+
130
+ <hr />
131
+
132
+ <h3 id="github_action">GitHub Action</h3>
133
+ <p>Github action that runs CI task</p>
134
+ <p><pre class="command">$ hoboken add:github_action</pre></p>
135
+ <p>Adds a <a href="https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby">GitHub Action</a> workflow that runs the <code>ci</code> Rake task.</p>
136
+
137
+ <hr />
138
+
139
+ <h3 id="heroku">Heroku</h3>
140
+ <p>Heroku deployment support.</p>
141
+ <p><pre class="command">$ hoboken add:heroku</pre></p>
142
+ <p>Createa a <code>.slugignore</code> file and configures <code>$stdout</code> for Heroku logging. All Hoboken projects contain a <code>Procfile</code> by default, which Heroku will use to start the application.</p>
143
+
144
+ <hr />
145
+
146
+ <h3 id="internationalization">Internationalization</h3>
147
+ <p>Internationalization support using sinatra-r18n.</p>
148
+ <p><pre class="command">$ hoboken add:i18n</pre></p>
149
+ <p>Adds the <a href="http://rubygems.org/gems/sinatra-r18n">sinatra-r18n gem</a> to the project's dependencies and creates an <code>i18n</code> folder with a sample translation file.</p>
150
+
151
+ <hr />
152
+
153
+ <h3 id="metrics">Metrics</h3>
154
+ <p>Adds metrics utilities to project (flog, flay, simplecov).</p>
155
+ <p><pre class="command">$ hoboken add:metrics</pre></p>
156
+ <p>Adds <a href="http://rubygems.org/gems/flog">flog</a>, <a href="http://rubygems.org/gems/flay">flay</a>, and <a href="http://rubygems.org/gems/simplecov">simplecov</a> to the project dependencies. Adds two rake tasks for running flog and flay. Modifies the test (or spec) rake tasks to run with simplecov. The coverage report is generated in the <code>tmp/coverage</code> folder.</p>
157
+
158
+ <hr />
159
+
160
+ <h3 id="omniauth">Omniauth</h3>
161
+ <p>Authentication capability via the <a href="http://rubygems.org/gems/omniauth">Omniauth</a> gem.</p>
162
+ <p><pre class="command">$ hoboken add:omniauth</pre></p>
163
+ <p>Running this command will prompt you to select an Omniauth provider and version. It will stub out 3 new handlers for Omniauth in <code>app.rb</code>. In addition, it will create unit tests (or specs) for the stubbed out handlers.</p>
164
+
165
+ <hr />
166
+
167
+ <h3 id="rubocop">Rubocop</h3>
168
+ <p>Adds <a href="https://rubocop.org/">Rubocop</a> support.</p>
169
+ <p><pre class="command">$ hoboken add:rubocop</pre></p>
170
+ <p><Rubocop support with a basic <code>.rubocop.yml</code> and Rake task. The default <code>ci</code> task is also modified to run Rubocop after tests/specs.</p>
171
+
172
+ <hr />
173
+
174
+ <h3 id="sequel">Sequel</h3>
175
+ <p>Provides database support via the <a href="http://rubygems.org/gems/sequel">Sequel</a> gem.</p>
176
+ <p><pre class="command">$ hoboken add:sequel</pre></p>
177
+ <p>Adds the Sequel gem as a dependency. Also adds the sqlite3 gem for dev and test environments. You will need to specify your own database provider for production. Access to the database is handled via <code>DATABASE_URL</code> which either needs to be exported as an environment variable or added to the project's <code>.env</code> file. A <code>config/db.rb</code> file is added to set up the database.</p>
178
+ <p>A <code>db/migrate</code> folder is created for <a href="http://sequel.jeremyevans.net/rdoc/files/doc/migration_rdoc.html">migrations</a>. Two rake tasks for migrations are also created:</p>
179
+ <dl>
180
+ <dt><pre class="command">$ rake db:migrate</pre></dt>
181
+ <dd>Migrate the database to the latest version.</dd>
182
+ <dt><pre class="command">$ rake db:reset</pre></dt>
183
+ <dd>Perform migration reset (full erase and migration up).</dd>
184
+ </dl>
185
+ <p>The project's <code>test_helper.rb</code> is adjusted to include a helper class for unit tests that touch the database. When a unit test class inherits from this, it will set up a test database and apply any migrations. Each test is run in the context of a transaction that will be rolled back after each test is run.</p>
186
+ <p>If RSpec is used, the project's <code>spec_helper.rb</code> is adjusted instead. Any spec tagged with <code>database: true</code> will be ran inside a database transaction that will be rolled back when the spec completes. Specs that use the <code>rack: true</code> tag will also have this database rollback functionality.</p>
187
+
188
+ <hr />
189
+
190
+ <h3 id="sidekiq">Sidekiq</h3>
191
+ <p>Adds <a href="https://github.com/mperham/sidekiq">Sidekiq</a> support.</p>
192
+ <p><pre class="command">$ hoboken add:sidekiq</pre></p>
193
+ <p>Sets up Sidekiq via a <code>config/sidekiq.rb</code> file. Adjusts <code>config.ru</code> to mount the Sidekiq UI. In production, the Sidekiq UI is protected via Basic Auth. Also adds a Sidekiq entry to the <code>Procfile</code>.</p>
194
+
195
+ <hr />
196
+
197
+ <h3 id="sinatra-activerecord">Sinatra ActiveRecord</h3>
198
+ <p>Provides database support via the <a href="https://github.com/sinatra-activerecord/sinatra-activerecord">Sinatra ActiveRecord</a> gem.</p>
199
+ <p><pre class="command">$ hoboken add:active_record</pre></p>
200
+ <p>Adds the <code>sinatra-activerecord</code> gem as a dependency. Also adds the sqlite3 gem for dev and test environments. You will need to specify your own database provider for production. Access to the database is handled via <code>DATABASE_URL</code> which either needs to be exported as an environment variable or added to the project's <code>.env</code> file.</p>
201
+ <p>A <code>db/migrate</code> folder is created for migrations. Rake tasks are also provided. Refer to the <a href="https://github.com/sinatra-activerecord/sinatra-activerecord"><code>sinatra-activerecord</code> gem</a> for more information.</p>
202
+ <p>The project's <code>test_helper.rb</code> is adjusted to include a helper method for unit tests that touch the database. When a unit test class inherits from this, it will set up a test database and apply any migrations. Each test is run in the context of a transaction that will be rolled back after each test is run.</p>
203
+ <p>If RSpec is used, the project's <code>spec_helper.rb</code> is adjusted instead. An <code>around</code> block is added that handles the roll back for each spec example.</p>
204
+
205
+ <hr />
206
+
207
+ <h3 id="travis-ci">Travis CI</h3>
208
+ <p>Basic Travis-CI YAML config.</p>
209
+ <p><pre class="command">$ hoboken add:travis</pre></p>
210
+ <p>Sets up a minimal <code>.travis.yml</code> file.</p>
211
+
212
+ <hr />
213
+
214
+ <h3 id="turnip">Turnip</h3>
215
+ <p>Support for writing <a href="https://github.com/jnicklas/turnip">Turnip</a> acceptance specs.</p>
216
+ <p><pre class="command">$ hoboken add:turnip</pre></p>
217
+ <p>Sets up Turnip specs. Adds a Rake task to run them; also adds the task to the <code>CI</code> task.</p>
218
+ <p>This add-on requires the use of RSpec.</p>
219
+
220
+ <hr />
221
+
222
+ <h3 id="twitter-bootstrap">Twitter Bootstrap</h3>
223
+ <p>Twitter Bootstrap via the <a href="https://github.com/twbs/bootstrap-rubygem">bootstrap gem</a>.</p>
224
+ <p><pre class="command">$ hoboken add:twbs</pre></p>
225
+ <p>Twitter Bootstrap support via the <code>bootstrap</code> gem. Adjusts <code>styles.scss</code> and <code>app.js</code> to include bootstrap directives.</p>
226
+
227
+ <hr />
228
+
229
+ <h3 id="vcr">VCR</h3>
230
+ <p>Support for the <a href="https://github.com/vcr/vcr">VCR gem</a>.</p>
231
+ <p><pre class="command">$ hoboken add:vcr</pre></p>
232
+ <p>Sets up VCR configured with <a href="https://github.com/bblimke/webmock">webmock</a>.</p>
233
+ </section>
234
+
235
+ <% content_for :docs_menu do %>
236
+ <aside>
237
+ <h4>On This Page</h4>
238
+ <ul>
239
+ <li>
240
+ <%= link_to 'Basic Features', '/documentation.html#basic-features' %>
241
+ </li>
242
+ <li>
243
+ <%= link_to 'Project Structure', '/documentation.html#project-structure' %>
244
+ </li>
245
+ <li>
246
+ <%= link_to 'General Commands', '/documentation.html#general-command-reference' %>
247
+ <ul>
248
+ <li><%= link_to 'generate', '#generate' %></li>
249
+ <li><%= link_to 'help', '#help' %></li>
250
+ <li><%= link_to 'version', '#version' %></li>
251
+ </ul>
252
+ </li>
253
+ <li>
254
+ <%= link_to 'Add On Commands', '/documentation.html#add-on-command-reference' %>
255
+ <ul>
256
+ <li><%= link_to 'airbrake', '#airbrake' %></li>
257
+ <li><%= link_to 'github action', '#github_action' %></li>
258
+ <li><%= link_to 'heroku', '#heroku' %></li>
259
+ <li><%= link_to 'internationalization', '#internationalization' %></li>
260
+ <li><%= link_to 'metrics', '#metrics' %></li>
261
+ <li><%= link_to 'omniauth', '#omniauth' %></li>
262
+ <li><%= link_to 'rubocop', '#rubocop' %></li>
263
+ <li><%= link_to 'sequel', '#sequel' %></li>
264
+ <li><%= link_to 'sidekiq', '#sidekiq' %></li>
265
+ <li><%= link_to 'sinatra activerecord', '#sinatra-activerecord' %></li>
266
+ <li><%= link_to 'travis ci', '#travis-ci' %></li>
267
+ <li><%= link_to 'turnip', '#turnip' %></li>
268
+ <li><%= link_to 'twitter bootstrap', '#twitter-bootstrap' %></li>
269
+ <li><%= link_to 'vcr', '#vcr' %></li>
270
+ </ul>
271
+ </li>
272
+ </ul>
273
+ </aside>
274
+ <% end %>
Binary file
Binary file
@@ -0,0 +1,44 @@
1
+ <section>
2
+ <p>Hoboken is a Ruby gem that generates Sinatra projects. It keeps the folder structure simple and gets out of your way.</p>
3
+
4
+ <h2 id="getting-started">Getting Started</h2>
5
+
6
+ <h3>Installation</h3>
7
+ <p><pre class="command">$ gem install hoboken</pre></p>
8
+
9
+ <h3>Generate a new Project</h3>
10
+ <p><pre class="command">
11
+ $ hoboken generate my_project
12
+ create my_project
13
+ create my_project/app.rb
14
+ create my_project/Gemfile
15
+ ...
16
+
17
+ Successfully created my_project. Don't forget to `bundle install`
18
+ </pre></p>
19
+
20
+ <h3>Install Dependencies</h3>
21
+ <p><pre class="command">
22
+ $ ./bin/setup
23
+ </pre></p>
24
+
25
+ <h3>Start the Server</h3>
26
+ <p><pre class="command">
27
+ $ ./bin/server
28
+ Foreman detected... starting server with Procfile
29
+ 22:16:46 web.1 | started with pid 18585
30
+ 22:16:47 web.1 | Puma starting in single mode...
31
+ 22:16:47 web.1 | * Puma version: 5.2.2 (ruby 2.5.3-p105) ("Fettisdagsbulle")
32
+ 22:16:47 web.1 | * Min threads: 5
33
+ 22:16:47 web.1 | * Max threads: 5
34
+ 22:16:47 web.1 | * Environment: development
35
+ 22:16:47 web.1 | * PID: 18585
36
+ 22:16:47 web.1 | * Listening on http://0.0.0.0:9292
37
+ 22:16:47 web.1 | Use Ctrl-C to stop
38
+ </pre></p>
39
+ <p>Your app is now running on localhost on port 9292. Check it out in a browser!</p>
40
+ <img src="./images/hoboken-running.png" width="640px" />
41
+
42
+ <h2>Next Steps</h2>
43
+ <p>Read the <%= link_to 'documentation', '/documentation.html' %> to learn more about generation options, project structure, and add ons.</p>
44
+ </section>
@@ -0,0 +1 @@
1
+ //= require_tree .
@@ -0,0 +1,38 @@
1
+ <!doctype html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
6
+ <title>Hoboken</title>
7
+ <%= stylesheet_link_tag 'normalize', 'all' %>
8
+ <%= javascript_include_tag 'all' %>
9
+ </head>
10
+
11
+ <body>
12
+ <div class="wrapper">
13
+ <div class="content">
14
+ <h1>Hoboken</h1>
15
+ <img src="images/hoboken.png" />
16
+ <%= yield %>
17
+ </div>
18
+ <div class="sidebar">
19
+ <aside>
20
+ <h4>What would you like to do?</h4>
21
+ <ul>
22
+ <li><%= link_to 'Get started', '/index.html' %></li>
23
+ <li><%= link_to 'Report a bug', 'https://github.com/bnadlerjr/hoboken/issues' %></li>
24
+ <li><%= link_to 'Read documentation', '/documentation.html' %></li>
25
+ <li><%= link_to 'View source code', 'https://github.com/bnadlerjr/hoboken' %></li>
26
+ </ul>
27
+ </aside>
28
+ <%= yield_content :docs_menu %>
29
+ </div>
30
+ <footer>
31
+ <hr />
32
+ <small>
33
+ <a href="https://github.com/bnadlerjr/hoboken">Hoboken<a/>, a project generator for the Ruby <a href="http://www.sinatrarb.com/">Sinatra</a> library, written by <a href="http://bobnadler.com">Bob Nadler</a>.
34
+ </small>
35
+ </footer>
36
+ </div>
37
+ </body>
38
+ </html>
@@ -0,0 +1,116 @@
1
+ @charset "utf-8";
2
+
3
+ $wrapper-width: 960px;
4
+ $content-width: 640px;
5
+
6
+ $base-color: #262626;
7
+ $accent-color: #324d0e;
8
+
9
+ $body-fonts: 'lucida console', monaco, 'andale mono', 'bitstream vera sans mono', monospace;
10
+ $headline-fonts: Georgia, 'bitstream vera serif', serif;
11
+
12
+ @mixin border-radius($radius) {
13
+ -webkit-border-radius: $radius;
14
+ -moz-border-radius: $radius;
15
+ border-radius: $radius;
16
+ }
17
+
18
+ body {
19
+ font-family: $body-fonts;
20
+ font-size: 18px;
21
+ color: $base-color;
22
+ margin: 2em;
23
+ }
24
+
25
+ h1, h2, h3, h4 {
26
+ font-family: $headline-fonts;
27
+ }
28
+
29
+ h1 {
30
+ text-indent: 100%;
31
+ white-space: nowrap;
32
+ overflow: hidden;
33
+ line-height: 0;
34
+ margin: 0;
35
+ }
36
+
37
+ h3 {
38
+ color: $accent-color;
39
+ }
40
+
41
+ dd {
42
+ padding-bottom: 1em;
43
+ }
44
+
45
+ pre.command {
46
+ background-color: lighten($base-color, 80%);
47
+ padding: 1em;
48
+ display: block;
49
+ }
50
+
51
+ ul {
52
+ &.features {
53
+ list-style: square;
54
+ padding-left: 1.5em;
55
+ }
56
+
57
+ list-style: none;
58
+ padding: 0;
59
+ li {
60
+ padding-top: 0.25em;
61
+ ul {
62
+ padding-left: 1.5em;
63
+ }
64
+ }
65
+ }
66
+
67
+ a {
68
+ font-weight: bold;
69
+ color: $accent-color;
70
+ }
71
+
72
+ table {
73
+ td {
74
+ padding-right: 1.5em;
75
+ }
76
+ th {
77
+ text-align: left;
78
+ padding: 0.5em;
79
+ }
80
+ }
81
+
82
+ footer {
83
+ clear: both;
84
+ margin-top: 2em;
85
+ text-align: center;
86
+ }
87
+
88
+ .wrapper {
89
+ width: $wrapper-width;
90
+ margin: 0 auto;
91
+ }
92
+
93
+ .content {
94
+ float: right;
95
+ width: $content-width;
96
+ }
97
+
98
+ .sidebar {
99
+ float: left;
100
+ }
101
+
102
+ aside {
103
+ @include border-radius(10px);
104
+ background-color: lighten($accent-color, 70%);
105
+ margin-bottom: 2em;
106
+ padding: 0.25em 1em;
107
+ }
108
+
109
+ code {
110
+ background-color: lighten($base-color, 80%);
111
+ font-weight: bold;
112
+ }
113
+
114
+ strong {
115
+ color: $accent-color;
116
+ }