File size: 155,462 Bytes
f879505 | 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 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 | {"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Introduction): A common message handler will simply rebroadcast the message to the other subscribers with ____ method.\nOptions:\nA) create\nB) rebroadcast!\nC) max\nD) mapping\nReply with the letter of the correct option."}, {"role": "assistant", "content": "B"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section '`amber db`', complete this statement: The ____ or `db` command is one of the most common command that you will be operating."}, {"role": "assistant", "content": "The missing term is database."}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Introduction', complete this statement: A common message handler will simply rebroadcast the message to the other subscribers with ____ method."}, {"role": "assistant", "content": "The missing term is rebroadcast!."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Dockerfile): It starts from the official ____ docker image."}, {"role": "assistant", "content": "crystallang/crystal:{version}"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Create a single connection to the server', complete this statement: Place the route that was created on the server side in the ____ as the endpoint to which the front end will connect to."}, {"role": "assistant", "content": "The missing term is routes.cr."}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Working with Views): (Kilt will work with ____ and `temel` as well, but they haven't been tested in amber, so your experience may vary.) Kilt automatically selects the templating engine based on the extension of the file being read (e.g.\nOptions:\nA) spec\nB) amber\nC) belongs_to\nD) mustache\nReply with the letter of the correct option."}, {"role": "assistant", "content": "D"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Methods and Actions): Controllers are defined as such: As an example, if a user goes to ____ in your application to add a new client, Amber will create an instance of **ApiController** and call it's **index** method\nOptions:\nA) src/controllers/hello_controller.cr\nB) message_new\nC) channel.push\nD) api/index\nReply with the letter of the correct option."}, {"role": "assistant", "content": "D"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Full Example:', complete this statement: Set the article's ____ flag to be `false` 1."}, {"role": "assistant", "content": "The missing term is archived."}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Validation API', complete this statement: If valid, returns a hash of validated params otherwise raises ____ which contains the failed validaton error messages."}, {"role": "assistant", "content": "The missing term is Validator::ValidationFailed."}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Environments', complete this statement: For example if ____ the framework will expect a `config/environments/staging.yml` file to exist and attempt to load its configurations into the application."}, {"role": "assistant", "content": "The missing term is AMBER_ENV=staging."}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Working with Views', complete this statement: Views are rendered with the amber ____ macro, which uses [Kilt](http://github.com/jeromegn/kilt)."}, {"role": "assistant", "content": "The missing term is render."}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Tips and Tricks for debugging Crystal applications', complete this statement: ____ does not show data for variables in crystal yet, see issue [\\#4457](https://github.com/crystal-lang/crystal/issues/4457) Fully debugging Crystal applications is not supported yet."}, {"role": "assistant", "content": "The missing term is lldb."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Amber Testing): The ____ test directory holds system tests, which are used for full browser testing of your application."}, {"role": "assistant", "content": "system"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (docker-compose.yml): The ____ file will allow you to easily get up and running."}, {"role": "assistant", "content": "docker-compose.yml"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Note about Amber Encryption Key): This is added to ____ by default as it should never be added to your repo."}, {"role": "assistant", "content": "gitignore"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (1. Install dependencies): If you already have ____, `amber`, and a database installed, you can [skip this step](#2.-generate-a-new-amber-application).\nOptions:\nA) /spec\nB) settings.cr\nC) {project_name}/config/environments\nD) crystal\nReply with the letter of the correct option."}, {"role": "assistant", "content": "D"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Validation API): ____ Setup validation rules to be performed.\nOptions:\nA) .to_s\nB) #validation\nC) slang\nD) scope\nReply with the letter of the correct option."}, {"role": "assistant", "content": "B"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (The Heroku Procfile): To deploy your app to heroku you're going to need a ____.\nOptions:\nA) Procfile\nB) AMBER_ENCRYPTION_KEY\nC) Amber::WebSockets::ClientSocket\nD) .group\nReply with the letter of the correct option."}, {"role": "assistant", "content": "A"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Mappings): If that is not true, you should pass ____ as the second argument and override the `::field_count` method to represent the correct field count."}, {"role": "assistant", "content": "false"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Create Procfile', complete this statement: Create a ____ at the root of your Amber application and add the following: The Amber buildpack takes care of compiling the project for you."}, {"role": "assistant", "content": "The missing term is Procfile."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Working with Views): [Amber Generators](https://docs.amberframework.org/amber/cli/generate) support ____ and `ecr` templates using the `-t` option when creating a new project."}, {"role": "assistant", "content": "slang"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Amber Testing', complete this statement: The first time you generate an Amber application using `amber new your_app_name` a ____ directory is generated."}, {"role": "assistant", "content": "The missing term is spec."}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Where', complete this statement: ____ retrieves everything \\(only at the beginning; creates empty request\\)."}, {"role": "assistant", "content": "The missing term is all."}]}
{"messages": [{"role": "user", "content": "In the Amber docs section '1.2 Install a database', complete this statement: Amber works with ____ \\(default\\), `mysql`, or `sqlite`."}, {"role": "assistant", "content": "The missing term is postgresql."}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Add A Jennifer Initializer to Configuration', complete this statement: To begin, you will need to create a ____ file in your project's `config` directory."}, {"role": "assistant", "content": "The missing term is config/jennifer.cr."}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Distinct', complete this statement: ____ can only be at the end of the query chain as it results in a direct database query."}, {"role": "assistant", "content": "The missing term is distinct."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Set Encryption Key): Amber adds it by default to your ____ file."}, {"role": "assistant", "content": ".gitignore"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Docker', complete this statement: When you generate a new Amber project, we include ____ and `docker-compose.yml` files to simplify development."}, {"role": "assistant", "content": "The missing term is Dockerfile."}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Introduction): * ____ - Called when a user leaves the channel.\nOptions:\nA) spec_helper.cr\nB) shard.yml\nC) handle_message\nD) handle_leave\nReply with the letter of the correct option."}, {"role": "assistant", "content": "D"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Custom): Here you don't need to setup ____, however the requested path requires a `.json` extension, by example `/json_api.json` For a full CRUD example, see [JSON API full CRUD](../examples/json-api-full-crud.md)."}, {"role": "assistant", "content": "content_type"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Where): The ____ method accepts a block which represents the where clause of the query statement.\nOptions:\nA) --release\nB) build\nC) where\nD) SMTP_URL\nReply with the letter of the correct option."}, {"role": "assistant", "content": "C"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Send messages from controllers \\(or anywhere else\\)', complete this statement: ____ provides a public class method `broadcast` for publishing messages to all subscribers of a topic from within controllers or anywhere else in your application."}, {"role": "assistant", "content": "The missing term is Amber::WebSockets::ClientSocket."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (FormBuilder in Plain Crystal Code): When using the ____ method in plain Crystal code, the `<<` syntax is required to add the generated field HTML to the form HTML string OR you can use the lower level `String.build` instead:"}, {"role": "assistant", "content": "FormBuilder.form"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Resources): In order to use resourceful routing for a particular controller, your controller _must_ define and implement all seven standard actions: ____, `edit`, `new`, `show`, `create`, `destroy`, and `update`."}, {"role": "assistant", "content": "index"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (The Flash): Make sure the Flash, Session and CSRF pipelines are enabled in your ____ file and in the order that the scaffolding renders them.\nOptions:\nA) routes.cr\nB) #{{relation_name}}_query\nC) config/initializers\nD) .crystal-version\nReply with the letter of the correct option."}, {"role": "assistant", "content": "A"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Encrypt unencrypted environment settings', complete this statement: `amber encrypt development` will encrypt ____ using same keys as above."}, {"role": "assistant", "content": "The missing term is config/environments/development.yml."}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Validation API): ____ Input must be valid otherwise raises an error.\nOptions:\nA) index\nB) shards.yml\nC) #validate!\nD) src/controllers/admin\nReply with the letter of the correct option."}, {"role": "assistant", "content": "C"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Where): You can chain several ____ methods together and they will be concatenated using `AND`.\nOptions:\nA) SELECT\nB) config/\nC) chromedriver\nD) where\nReply with the letter of the correct option."}, {"role": "assistant", "content": "D"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (How are messages broadcasted?): Whenever a user sends a message that is broadcasted through the JavaScript ____ function, the `handle_message` method is invoked."}, {"role": "assistant", "content": "channel.push"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'docker-compose.yml', complete this statement: The ____ file will allow you to easily get up and running."}, {"role": "assistant", "content": "The missing term is docker-compose.yml."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Can't build my amber project): Then, ensure to install all development packages for ____ `git`, `yaml`, `libevent`, and `sqlite3`, `postgresql`, or `mysql`."}, {"role": "assistant", "content": "openssl"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Select): Raw SQL for ____ clause can be passed into `.select` method.\nOptions:\nA) destroy\nB) .amber.yml\nC) exec\nD) SELECT\nReply with the letter of the correct option."}, {"role": "assistant", "content": "D"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Where): As mentioned, after declaring model attributes, you can use their names inside of a block: ____ if it is for the current table and `ModelName._field_name` if for another model."}, {"role": "assistant", "content": "_field_name"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Introduction): Channels define 3 public methods that can be used: * ____ - Called when a user joins a channel."}, {"role": "assistant", "content": "handle_joined"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Configuration', complete this statement: Every Amber project has a ____ directory."}, {"role": "assistant", "content": "The missing term is {project_name}/config."}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Define Buildpack', complete this statement: Create a file named ____ in the root of your project and with this: ```text https://github.com/amberframework/heroku-buildpack-amber.git"}, {"role": "assistant", "content": "The missing term is .buildpacks."}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Bootstrap an Application', complete this statement: Change your current directory to ____, if that was the path you chose:"}, {"role": "assistant", "content": "The missing term is weblog."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Installation): Add this to your application's ____ file: Then require it within the `config/application.cr` file:"}, {"role": "assistant", "content": "shard.yml"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Application.cr', complete this statement: The main entry point for an Amber application is ____."}, {"role": "assistant", "content": "The missing term is config/application.cr."}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Define a Mailer', complete this statement: You may use the ____ helper to create the body of the email."}, {"role": "assistant", "content": "The missing term is render."}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Transaction): To rollback a transaction, raise ____ exception.\nOptions:\nA) :status\nB) --back\nC) /app/local\nD) DB::Rollback\nReply with the letter of the correct option."}, {"role": "assistant", "content": "D"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Bootstrap an Application): Change your current directory to ____, if that was the path you chose:\nOptions:\nA) index\nB) chat_room:\nC) weblog\nD) pets\nReply with the letter of the correct option."}, {"role": "assistant", "content": "C"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Methods and Actions', complete this statement: A controller is a Crystal class which inherits from ____and has methods just like any other class."}, {"role": "assistant", "content": "The missing term is ApplicationController."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Amber Testing): * ____ * `/controllers` * `/system` * `/models` * `/integrations` * `/mailers` The `helpers`, `mailers`, and `models` directories are meant to hold tests for view helpers, mailers, and models, respectively."}, {"role": "assistant", "content": "/spec"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Eager load): Also you can extract the first entity via ____.\nOptions:\nA) #validation\nB) first\nC) :status\nD) src/views/layouts/photos.ecr\nReply with the letter of the correct option."}, {"role": "assistant", "content": "B"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Finding Layouts): For example, rendering actions from the PhotosController class will use ____."}, {"role": "assistant", "content": "src/views/layouts/photos.ecr"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Introduction): An ____ instance has both `cookies` and `session` getters and are available from within the `on_connect` method.\nOptions:\nA) Amber::WebSockets::ClientSocket\nB) {project_name}/config/environments\nC) Resources\nD) config/settings.cr\nReply with the letter of the correct option."}, {"role": "assistant", "content": "A"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Rendering an Action's Template from Another Controller', complete this statement: If you want to render a template from an entirely different controller from the one that contains the action code, You can accomplish that with ____, which accepts the full path \\(relative to `src/views`\\) of the template to render."}, {"role": "assistant", "content": "The missing term is render."}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Callbacks', complete this statement: The available macros for defining callbacks include: * ____ * `after_save` * `before_create` * `after_create` * `after_initialize` * `before_destroy` They accept method names."}, {"role": "assistant", "content": "The missing term is before_save."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Join a channel): In the above example, ____ is the channel that was created on line 2 of the `ChatSocket` struct."}, {"role": "assistant", "content": "chat_room"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Note about Amber Encryption Key): When a new project is created the file ____ is created with a random key."}, {"role": "assistant", "content": ".encryption_key"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Joins): Also there are two shortcuts for left and right joins: > For now Jennifer provides manual aliasing as a second argument for ____ and automatic when using `#includes` and `#with` methods.\nOptions:\nA) AMBER_ENV=staging\nB) #join\nC) encrypt\nD) .group\nReply with the letter of the correct option."}, {"role": "assistant", "content": "B"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Encrypted Environment Settings', complete this statement: It contains a ____ that is used to decrypt your encrypted environment settings."}, {"role": "assistant", "content": "The missing term is secret_key_base."}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Amber Testing', complete this statement: The ____ test directory holds system tests, which are used for full browser testing of your application."}, {"role": "assistant", "content": "The missing term is system."}]}
{"messages": [{"role": "user", "content": "In the Amber docs section '1.2 Install a database', complete this statement: By default, a new Amber application generates a ____ that can be used for this purpose."}, {"role": "assistant", "content": "The missing term is docker-compose.yml."}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Note about Amber Encryption Key', complete this statement: When a new project is created the file ____ is created with a random key."}, {"role": "assistant", "content": "The missing term is .encryption_key."}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'How to use CSRF with Ajax', complete this statement: To use CSRF with Ajax, simply call the ____ helper inside your controller and return it as part of a JSON object: In your Javascript, after getting the JSON object back, refresh your CSRF tag with the one from the server."}, {"role": "assistant", "content": "The missing term is csrf_tag."}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Introduction', complete this statement: Channels define 3 public methods that can be used: * ____ - Called when a user joins a channel."}, {"role": "assistant", "content": "The missing term is handle_joined."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Define Crystal Version): Create a file named ____ in the root of your project with the wanted crystal version:"}, {"role": "assistant", "content": ".crystal-version"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Create Procfile): Create a ____ at the root of your Amber application and add the following: The Amber buildpack takes care of compiling the project for you."}, {"role": "assistant", "content": "Procfile"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Define Buildpack): Create a file named ____ in the root of your project and with this: ```text https://github.com/amberframework/heroku-buildpack-amber.git\nOptions:\nA) .delete\nB) http://www.mycoolsite.com/page\nC) Amber::Router::File\nD) .buildpacks\nReply with the letter of the correct option."}, {"role": "assistant", "content": "D"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Set Encryption Key', complete this statement: Ensure you first run: To be able to decrypt and use production environment you'll need to set `ENV[\"AMBER_ENCRYPTION_KEY\"]` to the value of your local projects ____ file."}, {"role": "assistant", "content": "The missing term is .encryption_key."}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Methods and Actions): A controller is a Crystal class which inherits from ____and has methods just like any other class.\nOptions:\nA) crystal\nB) ApplicationController\nC) <repository>\nD) #remove_{{relation_name}}\nReply with the letter of the correct option."}, {"role": "assistant", "content": "B"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (7. Print hidden objects): You can unhide them using the ____ method and a temporary debugging variable, like this: This trick allows showing the `bar_hello_to_s` variable inside the debugger tool.\nOptions:\nA) .to_s\nB) StaticController\nC) settings.cr\nD) config/routes.cr\nReply with the letter of the correct option."}, {"role": "assistant", "content": "A"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Set Encryption Key', complete this statement: Copy the key from ____ and set it to env, like so:"}, {"role": "assistant", "content": "The missing term is .encryption_key."}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Create Procfile): Create a ____ at the root of your Amber application and add the following: The Amber buildpack takes care of compiling the project for you.\nOptions:\nA) secret_key_base\nB) application_controller.cr\nC) Procfile\nD) AMBER_ENV=staging\nReply with the letter of the correct option."}, {"role": "assistant", "content": "C"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Usage): The following field types are supported: - ____ - `:file` - `:hidden` - `:password` - `:radio` - `:select` - `:text` - `:textarea`\nOptions:\nA) --back\nB) bin/{your-app-name}\nC) secret_key_base\nD) :checkbox\nReply with the letter of the correct option."}, {"role": "assistant", "content": "D"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Where): ____ retrieves everything \\(only at the beginning; creates empty request\\).\nOptions:\nA) {environment}.enc\nB) .first\nC) .buildpacks\nD) all\nReply with the letter of the correct option."}, {"role": "assistant", "content": "D"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Requirements): Then uncomment in ____: In order for the buildpack to work properly you should have a `shard.yml` file,as it is how it will detect that your app is a Crystal app.\nOptions:\nA) config/settings.cr\nB) Quartz\nC) config/routes.cr\nD) message_new\nReply with the letter of the correct option."}, {"role": "assistant", "content": "A"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'The `mailcatcher` container', complete this statement: If you generate mailers, it will configure the ____ to point to the mail catcher container."}, {"role": "assistant", "content": "The missing term is SMTP_URL."}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Build and run your project): To compile your project use `shards build myapp`and run the executable with ____.\nOptions:\nA) has_many\nB) Profile.all\nC) bin/myapp\nD) spec\nReply with the letter of the correct option."}, {"role": "assistant", "content": "C"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section '`amber new`', complete this statement: An ____ configuration file is generated a long with the default application directory structure."}, {"role": "assistant", "content": "The missing term is .amber.yml."}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Environments): Each Amber project ships with three default environments: * Development * Test * Production The files for each environment are found under ____.\nOptions:\nA) <repository>\nB) {project_name}/config/environments\nC) encryption_key\nD) accepts\nReply with the letter of the correct option."}, {"role": "assistant", "content": "B"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Encrypted Environment Settings', complete this statement: This file is added to ____ to avoid inclusion in version control."}, {"role": "assistant", "content": "The missing term is .gitignore."}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (How do I access my custom settings?): In your application, you can access settings from your environment YAML files using the ____ Hash\nOptions:\nA) with\nB) .distinct\nC) api/index\nD) Amber.settings.secrets\nReply with the letter of the correct option."}, {"role": "assistant", "content": "D"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Eager load): To extract only some fields rather than entire objects, use ____: It returns an array of values if only one field was given, and an array of arrays if more."}, {"role": "assistant", "content": "pluck"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Hello World): This recipe will help you to setup a `Hello World!` response in your ____ path.\nOptions:\nA) /hello\nB) _some_model_or_table_name__field_name\nC) index.ecr\nD) .gitignore\nReply with the letter of the correct option."}, {"role": "assistant", "content": "A"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Can't connect to database): Then, ensure your database is running and the ____ is well specified on `config/environments/{your-enviroment-file}.yml`, or on `DATABASE_URL` environment variable."}, {"role": "assistant", "content": "database_url"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (7. Print hidden objects): You can unhide them using the ____ method and a temporary debugging variable, like this: This trick allows showing the `bar_hello_to_s` variable inside the debugger tool."}, {"role": "assistant", "content": ".to_s"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'The Test Environment', complete this statement: By default every Amber application generates with three environments: ____, `test` and `production`."}, {"role": "assistant", "content": "The missing term is development."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Buttons): A ____ helper is available: Produces the following HTML For more complex forms, see section below."}, {"role": "assistant", "content": "button_to"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Eager load): To extract only some fields rather than entire objects, use ____: It returns an array of values if only one field was given, and an array of arrays if more.\nOptions:\nA) csrf_tag\nB) belongs_to\nC) pluck\nD) content_type\nReply with the letter of the correct option."}, {"role": "assistant", "content": "C"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Build and run your project', complete this statement: To compile your project use `shards build myapp`and run the executable with ____."}, {"role": "assistant", "content": "The missing term is bin/myapp."}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Note about Amber Encryption Key', complete this statement: Keep track of the values of ____ or `ENV[AMBER_ENCRYPTION_KEY]`."}, {"role": "assistant", "content": "The missing term is .encryption_key."}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Finding Layouts): For example, rendering actions from the PhotosController class will use ____.\nOptions:\nA) src/views/layouts/photos.ecr\nB) ./microsecond-blog\nC) DB::Rollback\nD) .group\nReply with the letter of the correct option."}, {"role": "assistant", "content": "A"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (What happens when a user leaves?): The ____ method handles this in the channels class.\nOptions:\nA) :errors\nB) handle_leave\nC) config/jennifer.cr\nD) first\nReply with the letter of the correct option."}, {"role": "assistant", "content": "B"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Environments', complete this statement: Each Amber project ships with three default environments: * Development * Test * Production The files for each environment are found under ____."}, {"role": "assistant", "content": "The missing term is {project_name}/config/environments."}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Working with Views): Views are rendered with the amber ____ macro, which uses [Kilt](http://github.com/jeromegn/kilt).\nOptions:\nA) Amber::WebSockets::ClientSocket\nB) render\nC) where\nD) src/views/layouts/photos.ecr\nReply with the letter of the correct option."}, {"role": "assistant", "content": "B"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Define a Mailer): The mailer has the ability to set the ____, `to`, `cc`, `bcc`, and `subject` as well as both `text` and `html` body formats."}, {"role": "assistant", "content": "from"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (What happens when a user joins?): The ____ method is invoked when a user lands on a web page that has a `new Amber.Socket` established through the JavaScript on it."}, {"role": "assistant", "content": "handle_joined"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Query DSL', complete this statement: However, some methods can only be used at the end of a chain (such as ____ or `.pluck`)."}, {"role": "assistant", "content": "The missing term is .first."}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Installation): Add this to your application's ____ file: Then require it within the `config/application.cr` file:\nOptions:\nA) shard.yml\nB) #valid?\nC) button_to\nD) docker-compose.yml\nReply with the letter of the correct option."}, {"role": "assistant", "content": "A"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Namespaces): **Important:** the order you declare your ____ and `resource` routes _does_ matter!\nOptions:\nA) index\nB) app/views/shared/_menu.html.ecr\nC) namespace\nD) :web\nReply with the letter of the correct option."}, {"role": "assistant", "content": "C"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Group): ____ allows to add columns for `GROUP BY` section."}, {"role": "assistant", "content": ".group"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Amber Testing', complete this statement: The ____ directory is meant to hold tests for controllers, routes, and views."}, {"role": "assistant", "content": "The missing term is controllers."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Debug on VSCode): By convention the project directory name is the same as your application name, if you have changed it, please update `${workspaceFolderBasename}` with the name configured inside ____"}, {"role": "assistant", "content": "shards.yml"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Finding Layouts', complete this statement: If there is no such controller-specific layout, Amber will use ____."}, {"role": "assistant", "content": "The missing term is src/views/layouts/application.html.ecr."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (1.2 Install a database): Amber works with ____ \\(default\\), `mysql`, or `sqlite`."}, {"role": "assistant", "content": "postgresql"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Note about Amber Encryption Key): Keep track of the values of ____ or `ENV[AMBER_ENCRYPTION_KEY]`.\nOptions:\nA) .encryption_key\nB) user_join\nC) accepts\nD) rebroadcast!\nReply with the letter of the correct option."}, {"role": "assistant", "content": "A"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Defining Routes): For example, let's say you are creating a static website and you want the URL to be displayed as ____.\nOptions:\nA) development\nB) with\nC) build\nD) http://www.mycoolsite.com/page\nReply with the letter of the correct option."}, {"role": "assistant", "content": "D"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Example Usage): Using `amber new microsecond-blog -r damianham/amber_modular` will generate a skeleton Amber application in ____ using the _amber_modular_ recipe that was provided by the GitHub user _damianham_."}, {"role": "assistant", "content": "./microsecond-blog"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (returns => :production): ``` Alternatively, you can use built in environment helpers such as ____, `Amber.env.test?`, and `Amber.env.production?` to check the environment value.\nOptions:\nA) config/environments/development.yml\nB) views/home/index.slang\nC) Amber.env.development?\nD) .css\nReply with the letter of the correct option."}, {"role": "assistant", "content": "C"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Excluding and Including Actions): Sometimes you want to use ____ as a shortcut for defining routes, and with that you don't want to define routes for actions that don't exist yet.\nOptions:\nA) _field_name\nB) resources\nC) :status\nD) /app/local\nReply with the letter of the correct option."}, {"role": "assistant", "content": "B"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Custom): Then in your routes file: Alternatively you can use [____](../guides/controllers/respond-with.md) helper.\nOptions:\nA) respond_with\nB) redirect_to\nC) postgres\nD) belong_to\nReply with the letter of the correct option."}, {"role": "assistant", "content": "A"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Join a channel): In the above example, ____ is the channel that was created on line 2 of the `ChatSocket` struct.\nOptions:\nA) .css\nB) Amber.settings.secrets\nC) link_to\nD) chat_room\nReply with the letter of the correct option."}, {"role": "assistant", "content": "D"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Buttons', complete this statement: A ____ helper is available: Produces the following HTML For more complex forms, see section below."}, {"role": "assistant", "content": "The missing term is button_to."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Add A Jennifer Initializer to Configuration): With your ____ in place, we need to inform Amber about Jennifer and tell the framework how we would like to configure the ORM."}, {"role": "assistant", "content": "config/database.yml"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Resources): Let’s add a resource to the ____ Then go to the root of your project, and run `amber routes` This will output the standard matrix of HTTP verbs, controller, action, pipeline, scope, and URI pattern.\nOptions:\nA) database_url\nB) config/\nC) .gitignore\nD) config/routes.cr\nReply with the letter of the correct option."}, {"role": "assistant", "content": "D"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Destroy): To destroy an object, use ____ \\(called without callback\\) or `.destroy`.\nOptions:\nA) .delete\nB) namespace\nC) render\nD) user_join\nReply with the letter of the correct option."}, {"role": "assistant", "content": "A"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (check out the latest code into the working copy): * ____ is your project with your`.git` folder inside."}, {"role": "assistant", "content": "<repository>"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Local CLI', complete this statement: As additional step you can compile an amber CLI inside your project using: Then use ____ to do scaffolding, run migrations and [more](../cli/)."}, {"role": "assistant", "content": "The missing term is bin/amber."}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Note about Amber Encryption Key', complete this statement: This is added to ____ by default as it should never be added to your repo."}, {"role": "assistant", "content": "The missing term is gitignore."}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (5. Build the application and run the server): The ____ commands will keep observing for file changes within the project and recompiling the application.\nOptions:\nA) settings.cr\nB) .git/hook/post-receive\nC) watch\nD) /hello\nReply with the letter of the correct option."}, {"role": "assistant", "content": "C"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (1. Generate Blogsy App): The ____ will automatically install project dependencies.\nOptions:\nA) chat_room:\nB) --deps\nC) first\nD) Amber.env.development?\nReply with the letter of the correct option."}, {"role": "assistant", "content": "B"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Custom', complete this statement: Here you don't need to setup ____, however the requested path requires a `.json` extension, by example `/json_api.json` For a full CRUD example, see [JSON API full CRUD](../examples/json-api-full-crud.md)."}, {"role": "assistant", "content": "The missing term is content_type."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Introduction): An ____ instance has both `cookies` and `session` getters and are available from within the `on_connect` method."}, {"role": "assistant", "content": "Amber::WebSockets::ClientSocket"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (The Heroku Procfile): When the compilation process is complete a ____ directory is added, with this binary of your application with this binary file ready you can proceed to run your application locally with heroku."}, {"role": "assistant", "content": "bin/{your-app-name}"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Amber Testing): The ____ test directory holds system tests, which are used for full browser testing of your application.\nOptions:\nA) gitignore\nB) first\nC) config/\nD) system\nReply with the letter of the correct option."}, {"role": "assistant", "content": "D"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Distinct): ____ can only be at the end of the query chain as it results in a direct database query."}, {"role": "assistant", "content": "distinct"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Subscribe to events / messages', complete this statement: You may also have a listener on the subject of ____ to notify active connections of a new user to the chatroom."}, {"role": "assistant", "content": "The missing term is user_join."}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Encrypted Environment Settings', complete this statement: With Amber you can encrypt your environment setting using `amber encrypt {environment}`, this command will open your editor to allow make changes if needed and then encrypt the file ____."}, {"role": "assistant", "content": "The missing term is {environment}.enc."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Validation API): This array of errors is populated after running ____ or `#valid?`."}, {"role": "assistant", "content": "#validate!"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Includes', complete this statement: To preload a relation use ____ and pass relation name: If there are several includes with same table - Jennifer will auto alias tables."}, {"role": "assistant", "content": "The missing term is includes."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (The Heroku Procfile): To deploy your app to heroku you're going to need a ____."}, {"role": "assistant", "content": "Procfile"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Halt!): When you want a request to cease and return a particular message rather then rendering a page, you use Amber ____ to stop the request from continue execution.\nOptions:\nA) halt!\nB) .delete\nC) build\nD) src/views/layouts\nReply with the letter of the correct option."}, {"role": "assistant", "content": "A"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Creating the database', complete this statement: Edit the database setting for your current environment by editing the file: Amber looks at the ____ key for the default database connection string."}, {"role": "assistant", "content": "The missing term is database_url."}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Example Usage', complete this statement: Using `amber new microsecond-blog -r damianham/amber_modular` will generate a skeleton Amber application in ____ using the _amber_modular_ recipe that was provided by the GitHub user _damianham_."}, {"role": "assistant", "content": "The missing term is ./microsecond-blog."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Configuration): Every Amber project has a ____ directory."}, {"role": "assistant", "content": "{project_name}/config"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Create a single connection to the server): Place the route that was created on the server side in the ____ as the endpoint to which the front end will connect to."}, {"role": "assistant", "content": "routes.cr"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Excluding and Including Actions', complete this statement: ____ allow you to pass another argument, `only:` or `except:` to either include actions or exclude them from being generated."}, {"role": "assistant", "content": "The missing term is Resources."}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Example Usage): Using `amber new microsecond-blog` will generate a skeleton Amber application in ____.\nOptions:\nA) ./microsecond-blog\nB) distinct\nC) slang\nD) /app/local\nReply with the letter of the correct option."}, {"role": "assistant", "content": "A"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section '1. Install dependencies', complete this statement: If you already have ____, `amber`, and a database installed, you can [skip this step](#2.-generate-a-new-amber-application)."}, {"role": "assistant", "content": "The missing term is crystal."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Create Procfile): To deploy your app to Dokku you're going to need a ____."}, {"role": "assistant", "content": "Procfile"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (6. Printing instance variables): For printing ____ var in this code: You can use `self.foo` in the debugger terminal or VSCode GUI.\nOptions:\nA) @foo\nB) #validate!\nC) handle_leave\nD) distinct\nReply with the letter of the correct option."}, {"role": "assistant", "content": "A"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (The Test Environment): In this case, we can modify our test environment by changing the options found in ____.\nOptions:\nA) lldb\nB) docker-compose.yml\nC) config/environments/test.yml\nD) routes.cr\nReply with the letter of the correct option."}, {"role": "assistant", "content": "C"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Working with Views', complete this statement: ____ will be rendered with the ECR engine)."}, {"role": "assistant", "content": "The missing term is index.ecr."}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (How to use CSRF with Ajax): To use CSRF with Ajax, simply call the ____ helper inside your controller and return it as part of a JSON object: In your Javascript, after getting the JSON object back, refresh your CSRF tag with the one from the server.\nOptions:\nA) config/database.yml\nB) app/views/shared/_menu.html.ecr\nC) AMBER_ENV\nD) csrf_tag\nReply with the letter of the correct option."}, {"role": "assistant", "content": "D"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Initializers): To add a new initializer simply create a file and save it under ____ to load at runtime.\nOptions:\nA) src/controllers/admin\nB) link_to\nC) chromedriver\nD) config/initializers\nReply with the letter of the correct option."}, {"role": "assistant", "content": "D"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Includes): To preload a relation use ____ and pass relation name: If there are several includes with same table - Jennifer will auto alias tables."}, {"role": "assistant", "content": "includes"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Set Encryption Key): Ensure you first run: To be able to decrypt and use production environment you'll need to set `ENV[\"AMBER_ENCRYPTION_KEY\"]` to the value of your local projects ____ file.\nOptions:\nA) .encryption_key\nB) shard.yml\nC) config/initializers\nD) where\nReply with the letter of the correct option."}, {"role": "assistant", "content": "A"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Introduction): * ____ - Called when a user sends a message to a channel.\nOptions:\nA) development\nB) resources\nC) handle_message\nD) src/views/layouts/application.html.ecr\nReply with the letter of the correct option."}, {"role": "assistant", "content": "C"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Subscribe to events / messages): You may also have a listener on the subject of ____ to notify active connections of a new user to the chatroom.\nOptions:\nA) resources\nB) user_join\nC) distinct\nD) api/index\nReply with the letter of the correct option."}, {"role": "assistant", "content": "B"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Validation API): If valid, returns a hash of validated params otherwise raises ____ which contains the failed validaton error messages.\nOptions:\nA) includes\nB) with\nC) spec\nD) Validator::ValidationFailed\nReply with the letter of the correct option."}, {"role": "assistant", "content": "D"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Controller Naming Convention', complete this statement: When defining your routes you specify the controller that the route will match to In the snippet above, **ApiController** is the name of the controller ____"}, {"role": "assistant", "content": "The missing term is ./src/controller/api_controller.cr."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Introduction): A common message handler will simply rebroadcast the message to the other subscribers with ____ method."}, {"role": "assistant", "content": "rebroadcast!"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Methods and Actions): Controllers are defined as such: As an example, if a user goes to ____ in your application to add a new client, Amber will create an instance of **ApiController** and call it's **index** method"}, {"role": "assistant", "content": "api/index"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Validation API', complete this statement: ____ Returns true if all params are valid or false otherwise."}, {"role": "assistant", "content": "The missing term is #valid?."}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Add A Jennifer Initializer to Configuration', complete this statement: Note that we pass the ____ to `Jennifer::Config.read` this will allow Jennifer to use the correct database settings for the environment."}, {"role": "assistant", "content": "The missing term is AMBER_ENV."}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'From Source', complete this statement: Download and install ____ **NOTE:** At the time of this writing, v1.4.1 is the current stable release, but you should use the most recent tag in place of that."}, {"role": "assistant", "content": "The missing term is amber."}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Full Example:): Set the article's ____ flag to be `false` 1.\nOptions:\nA) settings.cr\nB) src/views/layouts/application.html.ecr\nC) archived\nD) default\nReply with the letter of the correct option."}, {"role": "assistant", "content": "C"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'The `app` container', complete this statement: The external project directory is mapped to ____ so as you make changes to your project and amber will watch for changes, recompile and re-launch the application."}, {"role": "assistant", "content": "The missing term is /app/local."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Validation API): ____ Returns true if all params are valid or false otherwise."}, {"role": "assistant", "content": "#valid?"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (CSRF): To use CSRF, enable the pipe in your ____ by adding the following pipe to a pipeline.\nOptions:\nA) .first!\nB) routes.cr\nC) #{{relation_name}}_reload\nD) config/routes.cr\nReply with the letter of the correct option."}, {"role": "assistant", "content": "B"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Note about Amber Encryption Key): If you need to encrypt or decrypt on another development box or server you will need to manually move ____ or set the value of `ENV[AMBER_ENCRYPTION_KEY]` on that computer.\nOptions:\nA) Procfile\nB) .encryption_key\nC) config/mailer.cr\nD) first\nReply with the letter of the correct option."}, {"role": "assistant", "content": "B"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Initializers', complete this statement: To add a new initializer simply create a file and save it under ____ to load at runtime."}, {"role": "assistant", "content": "The missing term is config/initializers."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Destroy): To destroy an object, use ____ \\(called without callback\\) or `.destroy`."}, {"role": "assistant", "content": ".delete"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Exists', complete this statement: ____ check if there is any record with provided conditions."}, {"role": "assistant", "content": "The missing term is .exists?."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Define Buildpack): Create a file named ____ in the root of your project and with this: ```text https://github.com/amberframework/heroku-buildpack-amber.git"}, {"role": "assistant", "content": ".buildpacks"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Select): Raw SQL for ____ clause can be passed into `.select` method."}, {"role": "assistant", "content": "SELECT"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Add A Jennifer Initializer to Configuration): To begin, you will need to create a ____ file in your project's `config` directory.\nOptions:\nA) config/jennifer.cr\nB) src/controllers/admin\nC) gitignore\nD) includes\nReply with the letter of the correct option."}, {"role": "assistant", "content": "A"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Send messages from controllers \\(or anywhere else\\)): ____ provides a public class method `broadcast` for publishing messages to all subscribers of a topic from within controllers or anywhere else in your application."}, {"role": "assistant", "content": "Amber::WebSockets::ClientSocket"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Define Crystal Version', complete this statement: Create a file named ____ in the root of your project with the wanted crystal version:"}, {"role": "assistant", "content": "The missing term is .crystal-version."}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Can't build my amber project): Then, ensure to install all development packages for ____ `git`, `yaml`, `libevent`, and `sqlite3`, `postgresql`, or `mysql`.\nOptions:\nA) openssl\nB) /spec\nC) .group\nD) SELECT\nReply with the letter of the correct option."}, {"role": "assistant", "content": "A"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Introduction', complete this statement: * ____ - Called when a user leaves the channel."}, {"role": "assistant", "content": "The missing term is handle_leave."}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Working with Views', complete this statement: (Kilt will work with ____ and `temel` as well, but they haven't been tested in amber, so your experience may vary.) Kilt automatically selects the templating engine based on the extension of the file being read (e.g."}, {"role": "assistant", "content": "The missing term is mustache."}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Joins', complete this statement: Also there are two shortcuts for left and right joins: > For now Jennifer provides manual aliasing as a second argument for ____ and automatic when using `#includes` and `#with` methods."}, {"role": "assistant", "content": "The missing term is #join."}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Mailers): This library is required by default within ____.\nOptions:\nA) config/webpack\nB) config/mailer.cr\nC) weblog\nD) src/views/layouts\nReply with the letter of the correct option."}, {"role": "assistant", "content": "B"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Encrypted Environment Settings): **Never commit the encryption key!** Setup your production machine and use the variable ____ See more on [encrypt section](../cli/encrypt.md)\nOptions:\nA) AMBER_ENCRYPTION_KEY\nB) false\nC) development\nD) _menu.html.ecr\nReply with the letter of the correct option."}, {"role": "assistant", "content": "A"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Set Encryption Key): Amber adds it by default to your ____ file.\nOptions:\nA) .gitignore\nB) SELECT\nC) config/routes.cr\nD) scope\nReply with the letter of the correct option."}, {"role": "assistant", "content": "A"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Custom', complete this statement: Then in your routes file: Alternatively you can use [____](../guides/controllers/respond-with.md) helper."}, {"role": "assistant", "content": "The missing term is respond_with."}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Eager load', complete this statement: To load relations using same query joins needed tables \\(yep you should specify join on condition by yourself again\\) and specifies all needed relations in ____ \\(relation name not table\\)."}, {"role": "assistant", "content": "The missing term is with."}]}
{"messages": [{"role": "user", "content": "In the Amber docs section '5. Printing array variables', complete this statement: To print array items in the debugger: First, setup the debugger with the ____ statement: Then use `print` in the debugging console: Change the buffer index for each item you want to print."}, {"role": "assistant", "content": "The missing term is debugger."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Eager load): To load relations using same query joins needed tables \\(yep you should specify join on condition by yourself again\\) and specifies all needed relations in ____ \\(relation name not table\\)."}, {"role": "assistant", "content": "with"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Mappings): An important macro in particular is ____ which is used to describe model attributes.\nOptions:\nA) .gitignore\nB) _menu.html.ecr\nC) mapping\nD) handle_leave\nReply with the letter of the correct option."}, {"role": "assistant", "content": "C"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'The Test Environment', complete this statement: In this case, we can modify our test environment by changing the options found in ____."}, {"role": "assistant", "content": "The missing term is config/environments/test.yml."}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Includes): To preload a relation use ____ and pass relation name: If there are several includes with same table - Jennifer will auto alias tables.\nOptions:\nA) database\nB) includes\nC) config/mailer.cr\nD) Amber::Server\nReply with the letter of the correct option."}, {"role": "assistant", "content": "B"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Mappings): Note that there are a variety of optional configurations such as ____ values and `null` security that can be appended to the `mapping` definition."}, {"role": "assistant", "content": "default"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Namespaces', complete this statement: **Important:** the order you declare your ____ and `resource` routes _does_ matter!"}, {"role": "assistant", "content": "The missing term is namespace."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Add Amber dependency): First you require to add the ____ shard dependency in your `shard.yml` file: Then execute `shards install` :"}, {"role": "assistant", "content": "amber"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Initializers', complete this statement: For example, to initialize a ____ mailer: ```ruby"}, {"role": "assistant", "content": "The missing term is Quartz."}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Aggregation', complete this statement: ____, `min`, `count`\\), and ones working with a GROUP clause and returning an array of values."}, {"role": "assistant", "content": "The missing term is max."}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Controller Naming Convention): When defining your routes you specify the controller that the route will match to In the snippet above, **ApiController** is the name of the controller ____\nOptions:\nA) docker-compose.yml\nB) config/\nC) ./src/controller/api_controller.cr\nD) sam.cr\nReply with the letter of the correct option."}, {"role": "assistant", "content": "C"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Local CLI): As additional step you can compile an amber CLI inside your project using: Then use ____ to do scaffolding, run migrations and [more](../cli/).\nOptions:\nA) index\nB) StaticController\nC) bin/amber\nD) FormBuilder.form\nReply with the letter of the correct option."}, {"role": "assistant", "content": "C"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Resources): The ____ macro is a quick way to setup up resourceful routing for all seven standard actions for a controller in a single line."}, {"role": "assistant", "content": "resources"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Example Usage', complete this statement: Using `amber new microsecond-blog` will generate a skeleton Amber application in ____."}, {"role": "assistant", "content": "The missing term is ./microsecond-blog."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (returns => :production): ``` Alternatively, you can use built in environment helpers such as ____, `Amber.env.test?`, and `Amber.env.production?` to check the environment value."}, {"role": "assistant", "content": "Amber.env.development?"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Working with Views): [Amber Generators](https://docs.amberframework.org/amber/cli/generate) support ____ and `ecr` templates using the `-t` option when creating a new project.\nOptions:\nA) slang\nB) sam.cr\nC) #validation\nD) all\nReply with the letter of the correct option."}, {"role": "assistant", "content": "A"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'The Heroku Procfile', complete this statement: When the compilation process is complete a ____ directory is added, with this binary of your application with this binary file ready you can proceed to run your application locally with heroku."}, {"role": "assistant", "content": "The missing term is bin/{your-app-name}."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (CSRF): To use CSRF, enable the pipe in your ____ by adding the following pipe to a pipeline."}, {"role": "assistant", "content": "routes.cr"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (1. Generate Blogsy App): The ____ will automatically install project dependencies."}, {"role": "assistant", "content": "--deps"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Define a Mailer): The mailer has the ability to set the ____, `to`, `cc`, `bcc`, and `subject` as well as both `text` and `html` body formats.\nOptions:\nA) destroy\nB) _menu.html.ecr\nC) #errors\nD) from\nReply with the letter of the correct option."}, {"role": "assistant", "content": "D"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Join a channel', complete this statement: You can dynamically create separate channels within the prefix of ____ by appending any character after the colon."}, {"role": "assistant", "content": "The missing term is chat_room:."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Working with Views): Views are rendered with the amber ____ macro, which uses [Kilt](http://github.com/jeromegn/kilt)."}, {"role": "assistant", "content": "render"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Amber Testing', complete this statement: * ____ * `/controllers` * `/system` * `/models` * `/integrations` * `/mailers` The `helpers`, `mailers`, and `models` directories are meant to hold tests for view helpers, mailers, and models, respectively."}, {"role": "assistant", "content": "The missing term is /spec."}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Eager load): If you are sure that at least one entity in the database satisfies your query, you can call ____.\nOptions:\nA) config/environments/development.yml\nB) bin/<your-app>\nC) src/views/layouts\nD) .first!\nReply with the letter of the correct option."}, {"role": "assistant", "content": "D"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Select', complete this statement: Raw SQL for ____ clause can be passed into `.select` method."}, {"role": "assistant", "content": "The missing term is SELECT."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Where): The ____ method accepts a block which represents the where clause of the query statement."}, {"role": "assistant", "content": "where"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Amber Testing): The first time you generate an Amber application using `amber new your_app_name` a ____ directory is generated."}, {"role": "assistant", "content": "spec"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Application.cr): The main entry point for an Amber application is ____.\nOptions:\nA) join\nB) Validator::ValidationFailed\nC) config/application.cr\nD) type\nReply with the letter of the correct option."}, {"role": "assistant", "content": "C"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Example Usage): Using `amber new microsecond-blog` will generate a skeleton Amber application in ____."}, {"role": "assistant", "content": "./microsecond-blog"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Configuration): Every Amber project has a ____ directory.\nOptions:\nA) pluck\nB) #join\nC) config/settings.cr\nD) {project_name}/config\nReply with the letter of the correct option."}, {"role": "assistant", "content": "D"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Add A Jennifer Initializer to Configuration): Note that we pass the ____ to `Jennifer::Config.read` this will allow Jennifer to use the correct database settings for the environment.\nOptions:\nA) .crystal-version\nB) database_url\nC) watch\nD) AMBER_ENV\nReply with the letter of the correct option."}, {"role": "assistant", "content": "D"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Mappings', complete this statement: If that is not true, you should pass ____ as the second argument and override the `::field_count` method to represent the correct field count."}, {"role": "assistant", "content": "The missing term is false."}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (File Mode): The changes you make will **not** modify the original source file, but they will be used when `amber exec` runs the code and saved as a ____ file.\nOptions:\nA) before_save\nB) .exists?\nC) ./src/controller/api_controller.cr\nD) ./tmp/{timestamp}_console.cr\nReply with the letter of the correct option."}, {"role": "assistant", "content": "D"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Editing Encrypted Files): The command`amber encrypt production` will use the secret key in .____ or `ENV[AMBER_ENCRYPTION_KEY]` to decrypt `config/environments/.production.enc` and open it in your favorite editor.\nOptions:\nA) default\nB) _some_model_or_table_name__field_name\nC) handle_message\nD) encryption_key\nReply with the letter of the correct option."}, {"role": "assistant", "content": "D"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Validation API): This array of errors is populated after running ____ or `#valid?`.\nOptions:\nA) src/controllers/hello_controller.cr\nB) #validate!\nC) find\nD) message_new\nReply with the letter of the correct option."}, {"role": "assistant", "content": "B"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Resources', complete this statement: In order to use resourceful routing for a particular controller, your controller _must_ define and implement all seven standard actions: ____, `edit`, `new`, `show`, `create`, `destroy`, and `update`."}, {"role": "assistant", "content": "The missing term is index."}]}
{"messages": [{"role": "user", "content": "In the Amber docs section '3. Try `@[NoInline]` to debug arguments data', complete this statement: To avoid this behavior use the ____ attribute before your function implementation."}, {"role": "assistant", "content": "The missing term is @[NoInline]."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Subscribe to events / messages): For example, below the subject of ____ is being listened to from within the `chat_room:123` channel."}, {"role": "assistant", "content": "message_new"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Requirements', complete this statement: Then uncomment in ____: In order for the buildpack to work properly you should have a `shard.yml` file,as it is how it will detect that your app is a Crystal app."}, {"role": "assistant", "content": "The missing term is config/settings.cr."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (The `app` container): The external project directory is mapped to ____ so as you make changes to your project and amber will watch for changes, recompile and re-launch the application."}, {"role": "assistant", "content": "/app/local"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Validation API): If valid, returns a hash of validated params otherwise raises ____ which contains the failed validaton error messages."}, {"role": "assistant", "content": "Validator::ValidationFailed"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Editing Encrypted Files', complete this statement: The command`amber encrypt production` will use the secret key in .____ or `ENV[AMBER_ENCRYPTION_KEY]` to decrypt `config/environments/.production.enc` and open it in your favorite editor."}, {"role": "assistant", "content": "The missing term is encryption_key."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Add A Jennifer Initializer to Configuration): To begin, you will need to create a ____ file in your project's `config` directory."}, {"role": "assistant", "content": "config/jennifer.cr"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Define Crystal Version): Create a file named ____ in the root of your project with the wanted crystal version:\nOptions:\nA) find\nB) .crystal-version\nC) build\nD) src/views/layouts\nReply with the letter of the correct option."}, {"role": "assistant", "content": "B"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Dockerfile', complete this statement: It starts from the official ____ docker image."}, {"role": "assistant", "content": "The missing term is crystallang/crystal:{version}."}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Error Handling): If the ____ argument is provided it will generate the appropriate error help text element(s) next to the field.\nOptions:\nA) controllers\nB) openssl\nC) :errors\nD) routes.cr\nReply with the letter of the correct option."}, {"role": "assistant", "content": "C"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Introduction): * ____ - Called when a user sends a message to a channel."}, {"role": "assistant", "content": "handle_message"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Where): As a method name, you can specify an attribute of the model or table using underscores: ____ - model/table name is separated from field name by \"_\\_\"."}, {"role": "assistant", "content": "_some_model_or_table_name__field_name"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'How do I access my custom settings?', complete this statement: In your application, you can access settings from your environment YAML files using the ____ Hash"}, {"role": "assistant", "content": "The missing term is Amber.settings.secrets."}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Encrypt unencrypted environment settings): `amber encrypt development` will encrypt ____ using same keys as above.\nOptions:\nA) config/environments/development.yml\nB) config/mailer.cr\nC) encrypt\nD) chromedriver\nReply with the letter of the correct option."}, {"role": "assistant", "content": "A"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (1.2 Install a database): By default, a new Amber application generates a ____ that can be used for this purpose."}, {"role": "assistant", "content": "docker-compose.yml"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (FormBuilder in Plain Crystal Code): When using the ____ method in plain Crystal code, the `<<` syntax is required to add the generated field HTML to the form HTML string OR you can use the lower level `String.build` instead:\nOptions:\nA) /hello\nB) FormBuilder.form\nC) max\nD) config/environments/test.yml\nReply with the letter of the correct option."}, {"role": "assistant", "content": "B"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Validation API): ____ Input must be valid otherwise raises an error."}, {"role": "assistant", "content": "#validate!"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Validation API', complete this statement: ____ Setup validation rules to be performed."}, {"role": "assistant", "content": "The missing term is #validation."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Requirements): Then uncomment in ____: In order for the buildpack to work properly you should have a `shard.yml` file,as it is how it will detect that your app is a Crystal app."}, {"role": "assistant", "content": "config/settings.cr"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Methods and Actions', complete this statement: Controllers are defined as such: As an example, if a user goes to ____ in your application to add a new client, Amber will create an instance of **ApiController** and call it's **index** method"}, {"role": "assistant", "content": "The missing term is api/index."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (5. Printing array variables): To print array items in the debugger: First, setup the debugger with the ____ statement: Then use `print` in the debugging console: Change the buffer index for each item you want to print."}, {"role": "assistant", "content": "debugger"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Create a single connection to the server): Place the route that was created on the server side in the ____ as the endpoint to which the front end will connect to.\nOptions:\nA) crystallang/crystal:{version}\nB) handle_message\nC) ApplicationController\nD) routes.cr\nReply with the letter of the correct option."}, {"role": "assistant", "content": "D"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'What happens when a user joins?', complete this statement: The ____ method is invoked when a user lands on a web page that has a `new Amber.Socket` established through the JavaScript on it."}, {"role": "assistant", "content": "The missing term is handle_joined."}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Create Procfile): To deploy your app to Dokku you're going to need a ____.\nOptions:\nA) config/jennifer.cr\nB) .git/hook/post-receive\nC) Procfile\nD) with\nReply with the letter of the correct option."}, {"role": "assistant", "content": "C"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Subscribe to events / messages', complete this statement: For example, below the subject of ____ is being listened to from within the `chat_room:123` channel."}, {"role": "assistant", "content": "The missing term is message_new."}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Define a Mailer): You may use the ____ helper to create the body of the email.\nOptions:\nA) routes.cr\nB) amber\nC) {project_name}/config\nD) render\nReply with the letter of the correct option."}, {"role": "assistant", "content": "D"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Where): ____ retrieves everything \\(only at the beginning; creates empty request\\)."}, {"role": "assistant", "content": "all"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (The `app` container): The external project directory is mapped to ____ so as you make changes to your project and amber will watch for changes, recompile and re-launch the application.\nOptions:\nA) join\nB) #validation\nC) save\nD) /app/local\nReply with the letter of the correct option."}, {"role": "assistant", "content": "D"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Working with Views): ____ will be rendered with the ECR engine).\nOptions:\nA) _field_name\nB) button_to\nC) before_save\nD) index.ecr\nReply with the letter of the correct option."}, {"role": "assistant", "content": "D"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Excluding and Including Actions): Sometimes you want to use ____ as a shortcut for defining routes, and with that you don't want to define routes for actions that don't exist yet."}, {"role": "assistant", "content": "resources"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Docker): When you generate a new Amber project, we include ____ and `docker-compose.yml` files to simplify development.\nOptions:\nA) .first!\nB) channel.push\nC) respond_with\nD) Dockerfile\nReply with the letter of the correct option."}, {"role": "assistant", "content": "D"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Validation API', complete this statement: ____ Returns an array of errors for the invalid inputs."}, {"role": "assistant", "content": "The missing term is #errors."}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Where', complete this statement: As a method name, you can specify an attribute of the model or table using underscores: ____ - model/table name is separated from field name by \"_\\_\"."}, {"role": "assistant", "content": "The missing term is _some_model_or_table_name__field_name."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (4. Create and migrate the database): This will create a new database and run the migration to create a ____ table with the specified columns."}, {"role": "assistant", "content": "pets"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Environments): For example if ____ the framework will expect a `config/environments/staging.yml` file to exist and attempt to load its configurations into the application."}, {"role": "assistant", "content": "AMBER_ENV=staging"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Define a Mailer', complete this statement: The mailer has the ability to set the ____, `to`, `cc`, `bcc`, and `subject` as well as both `text` and `html` body formats."}, {"role": "assistant", "content": "The missing term is from."}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Scopes (aka. Prepared queries)): The ____ macro allows you to define a Crystal block containing the desired prepared query statement, and creates a class method on the model to execute.\nOptions:\nA) #add_{{relation_name}}\nB) postgresql\nC) scope\nD) crystal\nReply with the letter of the correct option."}, {"role": "assistant", "content": "C"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Query DSL): However, some methods can only be used at the end of a chain (such as ____ or `.pluck`).\nOptions:\nA) DB::Rollback\nB) belongs_to\nC) bin/myapp\nD) .first\nReply with the letter of the correct option."}, {"role": "assistant", "content": "D"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Custom): Then in your routes file: Alternatively you can use [____](../guides/controllers/respond-with.md) helper."}, {"role": "assistant", "content": "respond_with"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'File Mode', complete this statement: The changes you make will **not** modify the original source file, but they will be used when `amber exec` runs the code and saved as a ____ file."}, {"role": "assistant", "content": "The missing term is ./tmp/{timestamp}_console.cr."}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Dockerfile): It will also add the project to the ____ folder on the image so you can use this in production as well.\nOptions:\nA) /app\nB) settings.cr\nC) postgres\nD) #valid?\nReply with the letter of the correct option."}, {"role": "assistant", "content": "A"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Callbacks): The available macros for defining callbacks include: * ____ * `after_save` * `before_create` * `after_create` * `after_initialize` * `before_destroy` They accept method names.\nOptions:\nA) before_save\nB) bin/myapp\nC) crystal\nD) ./tmp/{timestamp}_console.cr\nReply with the letter of the correct option."}, {"role": "assistant", "content": "A"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Creating the database): If that isn’t the case, update the ____ key with the correct database credentials for your environment."}, {"role": "assistant", "content": "database_url"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Find): An object can be retrieved by id using ____ \\(returns `T?`\\) and `find!` \\(returns `T` or raise `RecordNotFound` exception\\) methods."}, {"role": "assistant", "content": "find"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Eager load): To load relations using same query joins needed tables \\(yep you should specify join on condition by yourself again\\) and specifies all needed relations in ____ \\(relation name not table\\).\nOptions:\nA) find\nB) chat_room\nC) openssl\nD) with\nReply with the letter of the correct option."}, {"role": "assistant", "content": "D"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Namespaces): **Important:** the order you declare your ____ and `resource` routes _does_ matter!"}, {"role": "assistant", "content": "namespace"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Creating the database): Amber assumes that your PostgreSQL database will have a ____ user account with the correct permissions and no password set for this user."}, {"role": "assistant", "content": "postgres"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Join a channel', complete this statement: After the promise passes, include the following code in the function from within the ____ that will be triggered."}, {"role": "assistant", "content": "The missing term is .then."}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Hello World', complete this statement: First create a ____ file and add this: Then add a new route in your `config/routes.cr` file:"}, {"role": "assistant", "content": "The missing term is src/controllers/hello_controller.cr."}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (4. Printing strings objects \\(GDB\\)): To print string objects in the debugger: First, setup the debugger with the ____ statement: Then use `print` in the debugging console.\nOptions:\nA) encrypt\nB) debugger\nC) respond_with\nD) all\nReply with the letter of the correct option."}, {"role": "assistant", "content": "B"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Mappings): If that is not true, you should pass ____ as the second argument and override the `::field_count` method to represent the correct field count.\nOptions:\nA) find\nB) --back\nC) false\nD) link_to\nReply with the letter of the correct option."}, {"role": "assistant", "content": "C"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Environments): At runtime the framework will use the ____ environment value to load the respective environment configuration into the application.\nOptions:\nA) html\nB) AMBER_ENV\nC) bin/<your-app>\nD) handle_leave\nReply with the letter of the correct option."}, {"role": "assistant", "content": "B"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (What happens when a user joins?): The ____ method is invoked when a user lands on a web page that has a `new Amber.Socket` established through the JavaScript on it.\nOptions:\nA) encryption_key\nB) _menu.html.ecr\nC) handle_joined\nD) spec\nReply with the letter of the correct option."}, {"role": "assistant", "content": "C"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Bootstrap an Application): Change your current directory to ____, if that was the path you chose:"}, {"role": "assistant", "content": "weblog"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Eager load', complete this statement: Also you can extract the first entity via ____."}, {"role": "assistant", "content": "The missing term is first."}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Eager load', complete this statement: If you are sure that at least one entity in the database satisfies your query, you can call ____."}, {"role": "assistant", "content": "The missing term is .first!."}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Join a channel', complete this statement: In the above example, ____ is the channel that was created on line 2 of the `ChatSocket` struct."}, {"role": "assistant", "content": "The missing term is chat_room."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Note about Amber Encryption Key): Keep track of the values of ____ or `ENV[AMBER_ENCRYPTION_KEY]`."}, {"role": "assistant", "content": ".encryption_key"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Custom): Here you don't need to setup ____, however the requested path requires a `.json` extension, by example `/json_api.json` For a full CRUD example, see [JSON API full CRUD](../examples/json-api-full-crud.md).\nOptions:\nA) csrf_tag\nB) spec\nC) @foo\nD) content_type\nReply with the letter of the correct option."}, {"role": "assistant", "content": "D"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Halt!', complete this statement: When you want a request to cease and return a particular message rather then rendering a page, you use Amber ____ to stop the request from continue execution."}, {"role": "assistant", "content": "The missing term is halt!."}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Installation', complete this statement: Add this to your application's ____ file: Then require it within the `config/application.cr` file:"}, {"role": "assistant", "content": "The missing term is shard.yml."}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (docker-compose.yml): The ____ file will allow you to easily get up and running.\nOptions:\nA) handle_joined\nB) .amber.yml\nC) DB::Rollback\nD) docker-compose.yml\nReply with the letter of the correct option."}, {"role": "assistant", "content": "D"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Define a Mailer): You may use the ____ helper to create the body of the email."}, {"role": "assistant", "content": "render"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (How do I access my custom settings?): In your application, you can access settings from your environment YAML files using the ____ Hash"}, {"role": "assistant", "content": "Amber.settings.secrets"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Working with Views', complete this statement: [Amber Generators](https://docs.amberframework.org/amber/cli/generate) support ____ and `ecr` templates using the `-t` option when creating a new project."}, {"role": "assistant", "content": "The missing term is slang."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (5. Build the application and run the server): The ____ commands will keep observing for file changes within the project and recompiling the application."}, {"role": "assistant", "content": "watch"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (3. Try `@[NoInline]` to debug arguments data): To avoid this behavior use the ____ attribute before your function implementation."}, {"role": "assistant", "content": "@[NoInline]"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Finding Layouts', complete this statement: For example, rendering actions from the PhotosController class will use ____."}, {"role": "assistant", "content": "The missing term is src/views/layouts/photos.ecr."}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Creating the database): Edit the database setting for your current environment by editing the file: Amber looks at the ____ key for the default database connection string.\nOptions:\nA) weblog\nB) database_url\nC) Procfile\nD) system\nReply with the letter of the correct option."}, {"role": "assistant", "content": "B"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (How to use CSRF with Ajax): To use CSRF with Ajax, simply call the ____ helper inside your controller and return it as part of a JSON object: In your Javascript, after getting the JSON object back, refresh your CSRF tag with the one from the server."}, {"role": "assistant", "content": "csrf_tag"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Where', complete this statement: The ____ method accepts a block which represents the where clause of the query statement."}, {"role": "assistant", "content": "The missing term is where."}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'The `web` container', complete this statement: You can see the webpack configuration in the ____ directory to see what assets are compiled."}, {"role": "assistant", "content": "The missing term is config/webpack."}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Where): As a method name, you can specify an attribute of the model or table using underscores: ____ - model/table name is separated from field name by \"_\\_\".\nOptions:\nA) bin/amber\nB) csrf_tag\nC) _some_model_or_table_name__field_name\nD) namespace\nReply with the letter of the correct option."}, {"role": "assistant", "content": "C"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Encrypt', complete this statement: The ____ command allows you to encrypt and edit your environment settings."}, {"role": "assistant", "content": "The missing term is encrypt."}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (1.2 Install a database): By default, a new Amber application generates a ____ that can be used for this purpose.\nOptions:\nA) docker-compose.yml\nB) amber\nC) _field_name\nD) ./src/controller/api_controller.cr\nReply with the letter of the correct option."}, {"role": "assistant", "content": "A"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'How are messages broadcasted?', complete this statement: Whenever a user sends a message that is broadcasted through the JavaScript ____ function, the `handle_message` method is invoked."}, {"role": "assistant", "content": "The missing term is channel.push."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Rendering an Action's Template from Another Controller): For example, if you're running code in an AdminPostController that lives in ____, you can render the results of an action to a template in `src/views/admin/products` this way:"}, {"role": "assistant", "content": "src/controllers/admin"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (`amber db`): The ____ or `db` command is one of the most common command that you will be operating.\nOptions:\nA) :checkbox\nB) database\nC) {project_name}/config/routes.cr\nD) has_and_belongs_to_many\nReply with the letter of the correct option."}, {"role": "assistant", "content": "B"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Exec', complete this statement: The ____ command allows you to run short pieces of code within the amber application scope."}, {"role": "assistant", "content": "The missing term is exec."}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Creating the database): Amber assumes that your PostgreSQL database will have a ____ user account with the correct permissions and no password set for this user.\nOptions:\nA) config/application.cr\nB) _menu.html.ecr\nC) postgres\nD) #add_{{relation_name}}\nReply with the letter of the correct option."}, {"role": "assistant", "content": "C"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Tips and Tricks for debugging Crystal applications): ____ does not show data for variables in crystal yet, see issue [\\#4457](https://github.com/crystal-lang/crystal/issues/4457) Fully debugging Crystal applications is not supported yet."}, {"role": "assistant", "content": "lldb"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Add A Jennifer Initializer to Configuration', complete this statement: With your ____ in place, we need to inform Amber about Jennifer and tell the framework how we would like to configure the ORM."}, {"role": "assistant", "content": "The missing term is config/database.yml."}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (The Heroku Procfile): When the compilation process is complete a ____ directory is added, with this binary of your application with this binary file ready you can proceed to run your application locally with heroku.\nOptions:\nA) ./tmp/{timestamp}_console.cr\nB) mapping\nC) bin/{your-app-name}\nD) @[NoInline]\nReply with the letter of the correct option."}, {"role": "assistant", "content": "C"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section '4. Printing strings objects \\(GDB\\)', complete this statement: To print string objects in the debugger: First, setup the debugger with the ____ statement: Then use `print` in the debugging console."}, {"role": "assistant", "content": "The missing term is debugger."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Docker): When you generate a new Amber project, we include ____ and `docker-compose.yml` files to simplify development."}, {"role": "assistant", "content": "Dockerfile"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Eager load', complete this statement: To extract only some fields rather than entire objects, use ____: It returns an array of values if only one field was given, and an array of arrays if more."}, {"role": "assistant", "content": "The missing term is pluck."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Set Encryption Key): Copy the key from ____ and set it to env, like so:"}, {"role": "assistant", "content": ".encryption_key"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Join a channel): You can dynamically create separate channels within the prefix of ____ by appending any character after the colon."}, {"role": "assistant", "content": "chat_room:"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Subscribe to events / messages): You may also have a listener on the subject of ____ to notify active connections of a new user to the chatroom."}, {"role": "assistant", "content": "user_join"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Environments): At runtime the framework will use the ____ environment value to load the respective environment configuration into the application."}, {"role": "assistant", "content": "AMBER_ENV"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Set Encryption Key): Copy the key from ____ and set it to env, like so:\nOptions:\nA) #{{relation_name}}_reload\nB) openssl\nC) --back\nD) .encryption_key\nReply with the letter of the correct option."}, {"role": "assistant", "content": "D"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Mappings): Note that there are a variety of optional configurations such as ____ values and `null` security that can be appended to the `mapping` definition.\nOptions:\nA) --deps\nB) postgres\nC) has_and_belongs_to_many\nD) default\nReply with the letter of the correct option."}, {"role": "assistant", "content": "D"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Encrypt unencrypted environment settings): `amber encrypt development` will encrypt ____ using same keys as above."}, {"role": "assistant", "content": "config/environments/development.yml"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Encrypted Environment Settings): **Never commit the encryption key!** Setup your production machine and use the variable ____ See more on [encrypt section](../cli/encrypt.md)"}, {"role": "assistant", "content": "AMBER_ENCRYPTION_KEY"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Exists): ____ check if there is any record with provided conditions."}, {"role": "assistant", "content": ".exists?"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Mappings', complete this statement: An important macro in particular is ____ which is used to describe model attributes."}, {"role": "assistant", "content": "The missing term is mapping."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Distinct): ____ retrieves database column values without repeats."}, {"role": "assistant", "content": ".distinct"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Exec): The ____ command allows you to run short pieces of code within the amber application scope."}, {"role": "assistant", "content": "exec"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Eager load): Also you can extract the first entity via ____."}, {"role": "assistant", "content": "first"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (`amber new`): An ____ configuration file is generated a long with the default application directory structure."}, {"role": "assistant", "content": ".amber.yml"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Dockerfile): It will also add the project to the ____ folder on the image so you can use this in production as well."}, {"role": "assistant", "content": "/app"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Where', complete this statement: As mentioned, after declaring model attributes, you can use their names inside of a block: ____ if it is for the current table and `ModelName._field_name` if for another model."}, {"role": "assistant", "content": "The missing term is _field_name."}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (How are messages broadcasted?): Whenever a user sends a message that is broadcasted through the JavaScript ____ function, the `handle_message` method is invoked.\nOptions:\nA) channel.push\nB) scope\nC) all\nD) http://www.mycoolsite.com/page\nReply with the letter of the correct option."}, {"role": "assistant", "content": "A"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Can't connect to database', complete this statement: Then, ensure your database is running and the ____ is well specified on `config/environments/{your-enviroment-file}.yml`, or on `DATABASE_URL` environment variable."}, {"role": "assistant", "content": "The missing term is database_url."}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Mappings', complete this statement: Note that there are a variety of optional configurations such as ____ values and `null` security that can be appended to the `mapping` definition."}, {"role": "assistant", "content": "The missing term is default."}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Mailers', complete this statement: This library is required by default within ____."}, {"role": "assistant", "content": "The missing term is config/mailer.cr."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Local CLI): As additional step you can compile an amber CLI inside your project using: Then use ____ to do scaffolding, run migrations and [more](../cli/)."}, {"role": "assistant", "content": "bin/amber"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (4. Create and migrate the database): This will create a new database and run the migration to create a ____ table with the specified columns.\nOptions:\nA) src/{project}.cr\nB) #valid?\nC) src/views/layouts/photos.ecr\nD) pets\nReply with the letter of the correct option."}, {"role": "assistant", "content": "D"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Excluding and Including Actions): ____ allow you to pass another argument, `only:` or `except:` to either include actions or exclude them from being generated.\nOptions:\nA) Resources\nB) crystallang/crystal:{version}\nC) max\nD) .css\nReply with the letter of the correct option."}, {"role": "assistant", "content": "A"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Hello World): First create a ____ file and add this: Then add a new route in your `config/routes.cr` file:"}, {"role": "assistant", "content": "src/controllers/hello_controller.cr"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Pick up Env vars): Ensure these settings are in your ____ file.\nOptions:\nA) settings.cr\nB) slang\nC) #valid?\nD) {project_name}/config\nReply with the letter of the correct option."}, {"role": "assistant", "content": "A"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Group): ____ allows to add columns for `GROUP BY` section.\nOptions:\nA) .group\nB) .distinct\nC) {project_name}/config/routes.cr\nD) sam.cr\nReply with the letter of the correct option."}, {"role": "assistant", "content": "A"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Error Handling', complete this statement: If the ____ argument is provided it will generate the appropriate error help text element(s) next to the field."}, {"role": "assistant", "content": "The missing term is :errors."}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Amber Testing): * ____ * `/controllers` * `/system` * `/models` * `/integrations` * `/mailers` The `helpers`, `mailers`, and `models` directories are meant to hold tests for view helpers, mailers, and models, respectively.\nOptions:\nA) crystal\nB) /spec\nC) channel.push\nD) pluck\nReply with the letter of the correct option."}, {"role": "assistant", "content": "B"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Group', complete this statement: ____ allows to add columns for `GROUP BY` section."}, {"role": "assistant", "content": "The missing term is .group."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Links): A ____ helper is available: Produces the following HTML"}, {"role": "assistant", "content": "link_to"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Encrypted Environment Settings): With Amber you can encrypt your environment setting using `amber encrypt {environment}`, this command will open your editor to allow make changes if needed and then encrypt the file ____."}, {"role": "assistant", "content": "{environment}.enc"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Introduction', complete this statement: An ____ instance has both `cookies` and `session` getters and are available from within the `on_connect` method."}, {"role": "assistant", "content": "The missing term is Amber::WebSockets::ClientSocket."}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'The Flash', complete this statement: Make sure the Flash, Session and CSRF pipelines are enabled in your ____ file and in the order that the scaffolding renders them."}, {"role": "assistant", "content": "The missing term is routes.cr."}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (3. Try `@[NoInline]` to debug arguments data): To avoid this behavior use the ____ attribute before your function implementation.\nOptions:\nA) docker-compose.yml\nB) message_new\nC) @[NoInline]\nD) bin/myapp\nReply with the letter of the correct option."}, {"role": "assistant", "content": "C"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section '5. Build the application and run the server', complete this statement: The ____ commands will keep observing for file changes within the project and recompiling the application."}, {"role": "assistant", "content": "The missing term is watch."}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'FormBuilder in Plain Crystal Code', complete this statement: When using the ____ method in plain Crystal code, the `<<` syntax is required to add the generated field HTML to the form HTML string OR you can use the lower level `String.build` instead:"}, {"role": "assistant", "content": "The missing term is FormBuilder.form."}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Validation API', complete this statement: This array of errors is populated after running ____ or `#valid?`."}, {"role": "assistant", "content": "The missing term is #validate!."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Controller Naming Convention): When defining your routes you specify the controller that the route will match to In the snippet above, **ApiController** is the name of the controller ____"}, {"role": "assistant", "content": "./src/controller/api_controller.cr"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Buttons): A ____ helper is available: Produces the following HTML For more complex forms, see section below.\nOptions:\nA) has_and_belongs_to_many\nB) database\nC) button_to\nD) _field_name\nReply with the letter of the correct option."}, {"role": "assistant", "content": "C"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Note about Amber Encryption Key): If you need to encrypt or decrypt on another development box or server you will need to manually move ____ or set the value of `ENV[AMBER_ENCRYPTION_KEY]` on that computer."}, {"role": "assistant", "content": ".encryption_key"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Working with Views): ____ will be rendered with the ECR engine)."}, {"role": "assistant", "content": "index.ecr"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Pick up Env vars): Ensure these settings are in your ____ file."}, {"role": "assistant", "content": "settings.cr"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Finding Layouts', complete this statement: To find the current layout, Amber first looks for a file in ____ with the same base name as the controller."}, {"role": "assistant", "content": "The missing term is src/views/layouts."}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Rendering an Action's Template from Another Controller', complete this statement: For example, if you're running code in an AdminPostController that lives in ____, you can render the results of an action to a template in `src/views/admin/products` this way:"}, {"role": "assistant", "content": "The missing term is src/controllers/admin."}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (The Amber Heroku Buildpack): If you need to use a specific version create a ____ file in your application root directory with the version that should be used \\(e.g.\nOptions:\nA) Procfile\nB) distinct\nC) .crystal-version\nD) .first!\nReply with the letter of the correct option."}, {"role": "assistant", "content": "C"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'docker-compose.yml', complete this statement: It includes the ____, `mailcatcher`, `migrate`, `app`, and `web` containers."}, {"role": "assistant", "content": "The missing term is database."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Encrypt): The ____ command allows you to encrypt and edit your environment settings."}, {"role": "assistant", "content": "encrypt"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'CSRF', complete this statement: To use CSRF, enable the pipe in your ____ by adding the following pipe to a pipeline."}, {"role": "assistant", "content": "The missing term is routes.cr."}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'The Amber Heroku Buildpack', complete this statement: If you need to use a specific version create a ____ file in your application root directory with the version that should be used \\(e.g."}, {"role": "assistant", "content": "The missing term is .crystal-version."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Excluding and Including Actions): ____ allow you to pass another argument, `only:` or `except:` to either include actions or exclude them from being generated."}, {"role": "assistant", "content": "Resources"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Defining Routes): For example, let's say you are creating a static website and you want the URL to be displayed as ____."}, {"role": "assistant", "content": "http://www.mycoolsite.com/page"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Where): As mentioned, after declaring model attributes, you can use their names inside of a block: ____ if it is for the current table and `ModelName._field_name` if for another model.\nOptions:\nA) index.ecr\nB) handle_message\nC) csrf_tag\nD) _field_name\nReply with the letter of the correct option."}, {"role": "assistant", "content": "D"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Scopes (aka. Prepared queries)', complete this statement: The ____ macro allows you to define a Crystal block containing the desired prepared query statement, and creates a class method on the model to execute."}, {"role": "assistant", "content": "The missing term is scope."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Build and run your project): To compile your project use `shards build myapp`and run the executable with ____."}, {"role": "assistant", "content": "bin/myapp"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Introduction', complete this statement: * ____ - Called when a user sends a message to a channel."}, {"role": "assistant", "content": "The missing term is handle_message."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Amber Testing): The ____ directory is meant to hold tests for controllers, routes, and views."}, {"role": "assistant", "content": "controllers"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Encrypted Environment Settings', complete this statement: **Never commit the encryption key!** Setup your production machine and use the variable ____ See more on [encrypt section](../cli/encrypt.md)"}, {"role": "assistant", "content": "The missing term is AMBER_ENCRYPTION_KEY."}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'What happens when a user leaves?', complete this statement: The ____ method handles this in the channels class."}, {"role": "assistant", "content": "The missing term is handle_leave."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (The Amber Heroku Buildpack): If you need to use a specific version create a ____ file in your application root directory with the version that should be used \\(e.g."}, {"role": "assistant", "content": ".crystal-version"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Initializers): To add a new initializer simply create a file and save it under ____ to load at runtime."}, {"role": "assistant", "content": "config/initializers"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Environments): For example if ____ the framework will expect a `config/environments/staging.yml` file to exist and attempt to load its configurations into the application.\nOptions:\nA) first\nB) AMBER_ENV=staging\nC) application_controller.cr\nD) redirect_to\nReply with the letter of the correct option."}, {"role": "assistant", "content": "B"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Creating the database', complete this statement: Amber assumes that your PostgreSQL database will have a ____ user account with the correct permissions and no password set for this user."}, {"role": "assistant", "content": "The missing term is postgres."}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Find', complete this statement: An object can be retrieved by id using ____ \\(returns `T?`\\) and `find!` \\(returns `T` or raise `RecordNotFound` exception\\) methods."}, {"role": "assistant", "content": "The missing term is find."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Validation API): ____ Setup validation rules to be performed."}, {"role": "assistant", "content": "#validation"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Working with Views): (Kilt will work with ____ and `temel` as well, but they haven't been tested in amber, so your experience may vary.) Kilt automatically selects the templating engine based on the extension of the file being read (e.g."}, {"role": "assistant", "content": "mustache"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Mappings): An important macro in particular is ____ which is used to describe model attributes."}, {"role": "assistant", "content": "mapping"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Dockerfile', complete this statement: It will also add the project to the ____ folder on the image so you can use this in production as well."}, {"role": "assistant", "content": "The missing term is /app."}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Resources): In order to use resourceful routing for a particular controller, your controller _must_ define and implement all seven standard actions: ____, `edit`, `new`, `show`, `create`, `destroy`, and `update`.\nOptions:\nA) api/index\nB) mustache\nC) debugger\nD) index\nReply with the letter of the correct option."}, {"role": "assistant", "content": "D"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section '6. Printing instance variables', complete this statement: For printing ____ var in this code: You can use `self.foo` in the debugger terminal or VSCode GUI."}, {"role": "assistant", "content": "The missing term is @foo."}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Resources): The ____ macro is a quick way to setup up resourceful routing for all seven standard actions for a controller in a single line.\nOptions:\nA) openssl\nB) resources\nC) controllers\nD) from\nReply with the letter of the correct option."}, {"role": "assistant", "content": "B"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Join a channel): You can dynamically create separate channels within the prefix of ____ by appending any character after the colon.\nOptions:\nA) user_join\nB) encrypt\nC) chat_room:\nD) .buildpacks\nReply with the letter of the correct option."}, {"role": "assistant", "content": "C"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Links): A ____ helper is available: Produces the following HTML\nOptions:\nA) config/settings.cr\nB) config/initializers\nC) link_to\nD) Amber::Server\nReply with the letter of the correct option."}, {"role": "assistant", "content": "C"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Encrypted Environment Settings): This file is added to ____ to avoid inclusion in version control."}, {"role": "assistant", "content": ".gitignore"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Distinct): ____ can only be at the end of the query chain as it results in a direct database query.\nOptions:\nA) distinct\nB) config/\nC) bin/myapp\nD) join\nReply with the letter of the correct option."}, {"role": "assistant", "content": "A"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section '4. Create and migrate the database', complete this statement: This will create a new database and run the migration to create a ____ table with the specified columns."}, {"role": "assistant", "content": "The missing term is pets."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Full Example:): Set the article's ____ flag to be `false` 1."}, {"role": "assistant", "content": "archived"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Tips and Tricks for debugging Crystal applications): ____ does not show data for variables in crystal yet, see issue [\\#4457](https://github.com/crystal-lang/crystal/issues/4457) Fully debugging Crystal applications is not supported yet.\nOptions:\nA) with\nB) lldb\nC) .gitignore\nD) StaticController\nReply with the letter of the correct option."}, {"role": "assistant", "content": "B"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (`amber new`): An ____ configuration file is generated a long with the default application directory structure.\nOptions:\nA) .amber.yml\nB) .buildpacks\nC) handle_leave\nD) has_and_belongs_to_many\nReply with the letter of the correct option."}, {"role": "assistant", "content": "A"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Resources): Let’s add a resource to the ____ Then go to the root of your project, and run `amber routes` This will output the standard matrix of HTTP verbs, controller, action, pipeline, scope, and URI pattern."}, {"role": "assistant", "content": "config/routes.cr"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Distinct', complete this statement: ____ retrieves database column values without repeats."}, {"role": "assistant", "content": "The missing term is .distinct."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (6. Printing instance variables): For printing ____ var in this code: You can use `self.foo` in the debugger terminal or VSCode GUI."}, {"role": "assistant", "content": "@foo"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Note about Amber Encryption Key): When a new project is created the file ____ is created with a random key.\nOptions:\nA) config/jennifer.cr\nB) archived\nC) {environment}.enc\nD) .encryption_key\nReply with the letter of the correct option."}, {"role": "assistant", "content": "D"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Finding Layouts): If there is no such controller-specific layout, Amber will use ____.\nOptions:\nA) .to_s\nB) _menu.html.ecr\nC) src/views/layouts/application.html.ecr\nD) belongs_to\nReply with the letter of the correct option."}, {"role": "assistant", "content": "C"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Aggregation): ____, `min`, `count`\\), and ones working with a GROUP clause and returning an array of values.\nOptions:\nA) max\nB) #add_{{relation_name}}\nC) <repository>\nD) .group\nReply with the letter of the correct option."}, {"role": "assistant", "content": "A"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Finding Layouts): If there is no such controller-specific layout, Amber will use ____."}, {"role": "assistant", "content": "src/views/layouts/application.html.ecr"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (`amber db`): The ____ or `db` command is one of the most common command that you will be operating."}, {"role": "assistant", "content": "database"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (1. Install dependencies): If you already have ____, `amber`, and a database installed, you can [skip this step](#2.-generate-a-new-amber-application)."}, {"role": "assistant", "content": "crystal"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (The Test Environment): In this case, we can modify our test environment by changing the options found in ____."}, {"role": "assistant", "content": "config/environments/test.yml"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Subscribe to events / messages): For example, below the subject of ____ is being listened to from within the `chat_room:123` channel.\nOptions:\nA) src/views/layouts/application.html.ecr\nB) message_new\nC) spec\nD) @[NoInline]\nReply with the letter of the correct option."}, {"role": "assistant", "content": "B"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Halt!): When you want a request to cease and return a particular message rather then rendering a page, you use Amber ____ to stop the request from continue execution."}, {"role": "assistant", "content": "halt!"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Error Handling): If the ____ argument is provided it will generate the appropriate error help text element(s) next to the field."}, {"role": "assistant", "content": ":errors"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (docker-compose.yml): It includes the ____, `mailcatcher`, `migrate`, `app`, and `web` containers."}, {"role": "assistant", "content": "database"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Aggregation): ____, `min`, `count`\\), and ones working with a GROUP clause and returning an array of values."}, {"role": "assistant", "content": "max"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Rendering an Action's Template from Another Controller): For example, if you're running code in an AdminPostController that lives in ____, you can render the results of an action to a template in `src/views/admin/products` this way:\nOptions:\nA) spec_helper.cr\nB) create\nC) src/controllers/admin\nD) :status\nReply with the letter of the correct option."}, {"role": "assistant", "content": "C"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (The Flash): Make sure the Flash, Session and CSRF pipelines are enabled in your ____ file and in the order that the scaffolding renders them."}, {"role": "assistant", "content": "routes.cr"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (File Mode): The changes you make will **not** modify the original source file, but they will be used when `amber exec` runs the code and saved as a ____ file."}, {"role": "assistant", "content": "./tmp/{timestamp}_console.cr"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (docker-compose.yml): It includes the ____, `mailcatcher`, `migrate`, `app`, and `web` containers.\nOptions:\nA) database\nB) Quartz\nC) .css\nD) bin/<your-app>\nReply with the letter of the correct option."}, {"role": "assistant", "content": "A"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Introduction): * ____ - Called when a user leaves the channel."}, {"role": "assistant", "content": "handle_leave"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Create Procfile', complete this statement: To deploy your app to Dokku you're going to need a ____."}, {"role": "assistant", "content": "The missing term is Procfile."}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Amber Testing): The first time you generate an Amber application using `amber new your_app_name` a ____ directory is generated.\nOptions:\nA) .delete\nB) with\nC) spec\nD) belongs_to\nReply with the letter of the correct option."}, {"role": "assistant", "content": "C"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'The Heroku Procfile', complete this statement: To deploy your app to heroku you're going to need a ____."}, {"role": "assistant", "content": "The missing term is Procfile."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Rendering an Action's Template from Another Controller): If you want to render a template from an entirely different controller from the one that contains the action code, You can accomplish that with ____, which accepts the full path \\(relative to `src/views`\\) of the template to render."}, {"role": "assistant", "content": "render"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Note about Amber Encryption Key', complete this statement: If you need to encrypt or decrypt on another development box or server you will need to manually move ____ or set the value of `ENV[AMBER_ENCRYPTION_KEY]` on that computer."}, {"role": "assistant", "content": "The missing term is .encryption_key."}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Add Amber dependency): First you require to add the ____ shard dependency in your `shard.yml` file: Then execute `shards install` :\nOptions:\nA) amber\nB) #errors\nC) app/views/shared/_menu.html.ecr\nD) --deps\nReply with the letter of the correct option."}, {"role": "assistant", "content": "A"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Rendering Content', complete this statement: In most cases, the ____ method does the heavy lifting of rendering your application's content for use by a browser."}, {"role": "assistant", "content": "The missing term is Controller::Base#render."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Hello World): This recipe will help you to setup a `Hello World!` response in your ____ path."}, {"role": "assistant", "content": "/hello"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Joins): To join another table you can use ____ method passing model class or table name \\(`String`\\) and join type \\(default is `:inner`\\).\nOptions:\nA) exec\nB) DB::Rollback\nC) join\nD) before_save\nReply with the letter of the correct option."}, {"role": "assistant", "content": "C"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Transaction', complete this statement: To rollback a transaction, raise ____ exception."}, {"role": "assistant", "content": "The missing term is DB::Rollback."}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Encrypted Environment Settings): This file is added to ____ to avoid inclusion in version control.\nOptions:\nA) :web\nB) pets\nC) .gitignore\nD) src/{project}.cr\nReply with the letter of the correct option."}, {"role": "assistant", "content": "C"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Environments', complete this statement: At runtime the framework will use the ____ environment value to load the respective environment configuration into the application."}, {"role": "assistant", "content": "The missing term is AMBER_ENV."}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Pick up Env vars', complete this statement: Ensure these settings are in your ____ file."}, {"role": "assistant", "content": "The missing term is settings.cr."}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Destroy', complete this statement: To destroy an object, use ____ \\(called without callback\\) or `.destroy`."}, {"role": "assistant", "content": "The missing term is .delete."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Mailers): This library is required by default within ____."}, {"role": "assistant", "content": "config/mailer.cr"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (1.2 Install a database): Amber works with ____ \\(default\\), `mysql`, or `sqlite`.\nOptions:\nA) Profile.all\nB) src/views/layouts/application.html.ecr\nC) destroy\nD) postgresql\nReply with the letter of the correct option."}, {"role": "assistant", "content": "D"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Links', complete this statement: A ____ helper is available: Produces the following HTML"}, {"role": "assistant", "content": "The missing term is link_to."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Joins): To join another table you can use ____ method passing model class or table name \\(`String`\\) and join type \\(default is `:inner`\\)."}, {"role": "assistant", "content": "join"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (5. Printing array variables): To print array items in the debugger: First, setup the debugger with the ____ statement: Then use `print` in the debugging console: Change the buffer index for each item you want to print.\nOptions:\nA) from\nB) debugger\nC) rebroadcast!\nD) csrf_tag\nReply with the letter of the correct option."}, {"role": "assistant", "content": "B"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Set Encryption Key): Ensure you first run: To be able to decrypt and use production environment you'll need to set `ENV[\"AMBER_ENCRYPTION_KEY\"]` to the value of your local projects ____ file."}, {"role": "assistant", "content": ".encryption_key"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Distinct): ____ retrieves database column values without repeats.\nOptions:\nA) has_and_belongs_to_many\nB) .distinct\nC) :errors\nD) #valid?\nReply with the letter of the correct option."}, {"role": "assistant", "content": "B"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Introduction): Channels define 3 public methods that can be used: * ____ - Called when a user joins a channel.\nOptions:\nA) channel.push\nB) .then\nC) handle_joined\nD) shards.yml\nReply with the letter of the correct option."}, {"role": "assistant", "content": "C"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Amber Testing): The ____ directory is meant to hold tests for controllers, routes, and views.\nOptions:\nA) Quartz\nB) controllers\nC) ChatSocket\nD) database\nReply with the letter of the correct option."}, {"role": "assistant", "content": "B"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Join a channel): After the promise passes, include the following code in the function from within the ____ that will be triggered.\nOptions:\nA) default\nB) handle_joined\nC) settings.cr\nD) .then\nReply with the letter of the correct option."}, {"role": "assistant", "content": "D"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (What happens when a user leaves?): The ____ method handles this in the channels class."}, {"role": "assistant", "content": "handle_leave"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Validation API): ____ Returns an array of errors for the invalid inputs.\nOptions:\nA) archived\nB) SMTP_URL\nC) #errors\nD) /app/local\nReply with the letter of the correct option."}, {"role": "assistant", "content": "C"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Encrypt): The ____ command allows you to encrypt and edit your environment settings.\nOptions:\nA) config/environments/development.yml\nB) StaticController\nC) encrypt\nD) redirect_to\nReply with the letter of the correct option."}, {"role": "assistant", "content": "C"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Add A Jennifer Initializer to Configuration): Note that we pass the ____ to `Jennifer::Config.read` this will allow Jennifer to use the correct database settings for the environment."}, {"role": "assistant", "content": "AMBER_ENV"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (check out the latest code into the working copy): * ____ is your project with your`.git` folder inside.\nOptions:\nA) .amber.yml\nB) <repository>\nC) _field_name\nD) .first!\nReply with the letter of the correct option."}, {"role": "assistant", "content": "B"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Dockerfile): It starts from the official ____ docker image.\nOptions:\nA) database\nB) .buildpacks\nC) crystallang/crystal:{version}\nD) views/home/index.slang\nReply with the letter of the correct option."}, {"role": "assistant", "content": "C"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Send messages from controllers \\(or anywhere else\\)): ____ provides a public class method `broadcast` for publishing messages to all subscribers of a topic from within controllers or anywhere else in your application.\nOptions:\nA) api/index\nB) Amber::WebSockets::ClientSocket\nC) config/routes.cr\nD) shard.yml\nReply with the letter of the correct option."}, {"role": "assistant", "content": "B"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Note about Amber Encryption Key): This is added to ____ by default as it should never be added to your repo.\nOptions:\nA) gitignore\nB) controllers\nC) #add_{{relation_name}}\nD) secret_key_base\nReply with the letter of the correct option."}, {"role": "assistant", "content": "A"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Environments): Each Amber project ships with three default environments: * Development * Test * Production The files for each environment are found under ____."}, {"role": "assistant", "content": "{project_name}/config/environments"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Callbacks): The available macros for defining callbacks include: * ____ * `after_save` * `before_create` * `after_create` * `after_initialize` * `before_destroy` They accept method names."}, {"role": "assistant", "content": "before_save"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Exists): ____ check if there is any record with provided conditions.\nOptions:\nA) config/jennifer.cr\nB) gitignore\nC) .exists?\nD) --deps\nReply with the letter of the correct option."}, {"role": "assistant", "content": "C"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Creating the database', complete this statement: If that isn’t the case, update the ____ key with the correct database credentials for your environment."}, {"role": "assistant", "content": "The missing term is database_url."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Transaction): To rollback a transaction, raise ____ exception."}, {"role": "assistant", "content": "DB::Rollback"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Hello World', complete this statement: This recipe will help you to setup a `Hello World!` response in your ____ path."}, {"role": "assistant", "content": "The missing term is /hello."}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Joins', complete this statement: To join another table you can use ____ method passing model class or table name \\(`String`\\) and join type \\(default is `:inner`\\)."}, {"role": "assistant", "content": "The missing term is join."}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Exec): The ____ command allows you to run short pieces of code within the amber application scope.\nOptions:\nA) config/database.yml\nB) Amber::WebSockets::ClientSocket\nC) AMBER_ENV=staging\nD) exec\nReply with the letter of the correct option."}, {"role": "assistant", "content": "D"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Where', complete this statement: You can chain several ____ methods together and they will be concatenated using `AND`."}, {"role": "assistant", "content": "The missing term is where."}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Defining Routes', complete this statement: For example, let's say you are creating a static website and you want the URL to be displayed as ____."}, {"role": "assistant", "content": "The missing term is http://www.mycoolsite.com/page."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Where): You can chain several ____ methods together and they will be concatenated using `AND`."}, {"role": "assistant", "content": "where"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Encrypted Environment Settings): With Amber you can encrypt your environment setting using `amber encrypt {environment}`, this command will open your editor to allow make changes if needed and then encrypt the file ____.\nOptions:\nA) handle_joined\nB) {environment}.enc\nC) rebroadcast!\nD) Amber::WebSockets::ClientSocket\nReply with the letter of the correct option."}, {"role": "assistant", "content": "B"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Scopes (aka. Prepared queries)): The ____ macro allows you to define a Crystal block containing the desired prepared query statement, and creates a class method on the model to execute."}, {"role": "assistant", "content": "scope"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Example Usage): Using `amber new microsecond-blog -r damianham/amber_modular` will generate a skeleton Amber application in ____ using the _amber_modular_ recipe that was provided by the GitHub user _damianham_.\nOptions:\nA) ./microsecond-blog\nB) pluck\nC) .amber.yml\nD) csrf_tag\nReply with the letter of the correct option."}, {"role": "assistant", "content": "A"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (The `mailcatcher` container): If you generate mailers, it will configure the ____ to point to the mail catcher container.\nOptions:\nA) handle_joined\nB) src/views/layouts\nC) namespace\nD) SMTP_URL\nReply with the letter of the correct option."}, {"role": "assistant", "content": "D"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Editing Encrypted Files): The command`amber encrypt production` will use the secret key in .____ or `ENV[AMBER_ENCRYPTION_KEY]` to decrypt `config/environments/.production.enc` and open it in your favorite editor."}, {"role": "assistant", "content": "encryption_key"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Resources', complete this statement: The ____ macro is a quick way to setup up resourceful routing for all seven standard actions for a controller in a single line."}, {"role": "assistant", "content": "The missing term is resources."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (4. Printing strings objects \\(GDB\\)): To print string objects in the debugger: First, setup the debugger with the ____ statement: Then use `print` in the debugging console."}, {"role": "assistant", "content": "debugger"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Debug on VSCode', complete this statement: By convention the project directory name is the same as your application name, if you have changed it, please update `${workspaceFolderBasename}` with the name configured inside ____"}, {"role": "assistant", "content": "The missing term is shards.yml."}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Encrypted Environment Settings): It contains a ____ that is used to decrypt your encrypted environment settings.\nOptions:\nA) chromedriver\nB) {environment}.enc\nC) secret_key_base\nD) config/mailer.cr\nReply with the letter of the correct option."}, {"role": "assistant", "content": "C"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Creating the database): Edit the database setting for your current environment by editing the file: Amber looks at the ____ key for the default database connection string."}, {"role": "assistant", "content": "database_url"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (From Source): Download and install ____ **NOTE:** At the time of this writing, v1.4.1 is the current stable release, but you should use the most recent tag in place of that.\nOptions:\nA) ./tmp/{timestamp}_console.cr\nB) slang\nC) save\nD) amber\nReply with the letter of the correct option."}, {"role": "assistant", "content": "D"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'check out the latest code into the working copy', complete this statement: * ____ is your project with your`.git` folder inside."}, {"role": "assistant", "content": "The missing term is <repository>."}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Debug on VSCode): By convention the project directory name is the same as your application name, if you have changed it, please update `${workspaceFolderBasename}` with the name configured inside ____\nOptions:\nA) shards.yml\nB) Dockerfile\nC) channel.push\nD) respond_with\nReply with the letter of the correct option."}, {"role": "assistant", "content": "A"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (The `mailcatcher` container): If you generate mailers, it will configure the ____ to point to the mail catcher container."}, {"role": "assistant", "content": "SMTP_URL"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (The Test Environment): By default every Amber application generates with three environments: ____, `test` and `production`."}, {"role": "assistant", "content": "development"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Initializers): For example, to initialize a ____ mailer: ```ruby\nOptions:\nA) Quartz\nB) docker-compose.yml\nC) DB::Rollback\nD) bin/myapp\nReply with the letter of the correct option."}, {"role": "assistant", "content": "A"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Creating the database): If that isn’t the case, update the ____ key with the correct database credentials for your environment.\nOptions:\nA) .distinct\nB) database_url\nC) .first\nD) mapping\nReply with the letter of the correct option."}, {"role": "assistant", "content": "B"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Application.cr): The main entry point for an Amber application is ____."}, {"role": "assistant", "content": "config/application.cr"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Usage): The following field types are supported: - ____ - `:file` - `:hidden` - `:password` - `:radio` - `:select` - `:text` - `:textarea`"}, {"role": "assistant", "content": ":checkbox"}]}
{"messages": [{"role": "user", "content": "In the Amber docs section 'Usage', complete this statement: The following field types are supported: - ____ - `:file` - `:hidden` - `:password` - `:radio` - `:select` - `:text` - `:textarea`"}, {"role": "assistant", "content": "The missing term is :checkbox."}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Finding Layouts): To find the current layout, Amber first looks for a file in ____ with the same base name as the controller."}, {"role": "assistant", "content": "src/views/layouts"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Rendering Content): In most cases, the ____ method does the heavy lifting of rendering your application's content for use by a browser.\nOptions:\nA) pets\nB) Controller::Base#render\nC) database_url\nD) exec\nReply with the letter of the correct option."}, {"role": "assistant", "content": "B"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Methods and Actions): A controller is a Crystal class which inherits from ____and has methods just like any other class."}, {"role": "assistant", "content": "ApplicationController"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Join a channel): After the promise passes, include the following code in the function from within the ____ that will be triggered."}, {"role": "assistant", "content": ".then"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (Validation API): ____ Returns true if all params are valid or false otherwise.\nOptions:\nA) debugger\nB) first\nC) #valid?\nD) Amber::WebSockets::ClientSocket\nReply with the letter of the correct option."}, {"role": "assistant", "content": "C"}]}
{"messages": [{"role": "user", "content": "Fill in the blank from the Amber framework docs (Validation API): ____ Returns an array of errors for the invalid inputs."}, {"role": "assistant", "content": "#errors"}]}
{"messages": [{"role": "user", "content": "Choose the correct option to complete this Amber docs statement (The `web` container): You can see the webpack configuration in the ____ directory to see what assets are compiled.\nOptions:\nA) .css\nB) chat_room\nC) config/webpack\nD) :web\nReply with the letter of the correct option."}, {"role": "assistant", "content": "C"}]}
|