{"id":28372173,"url":"https://github.com/igorkasyanchuk/get-smart","last_synced_at":"2025-06-29T16:35:03.886Z","repository":{"id":292922236,"uuid":"967680353","full_name":"igorkasyanchuk/get-smart","owner":"igorkasyanchuk","description":"Learn Ruby/Rails topics during your app’s boot time.","archived":false,"fork":false,"pushed_at":"2025-05-21T08:57:25.000Z","size":1803,"stargazers_count":22,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-05T01:28:12.058Z","etag":null,"topics":["ruby","ruby-on-rails"],"latest_commit_sha":null,"homepage":"https://github.com/igorkasyanchuk/","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/igorkasyanchuk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-16T20:40:14.000Z","updated_at":"2025-05-26T21:24:07.000Z","dependencies_parsed_at":"2025-05-20T01:33:43.967Z","dependency_job_id":null,"html_url":"https://github.com/igorkasyanchuk/get-smart","commit_stats":null,"previous_names":["igorkasyanchuk/get-smart"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorkasyanchuk%2Fget-smart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorkasyanchuk%2Fget-smart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorkasyanchuk%2Fget-smart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorkasyanchuk%2Fget-smart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/igorkasyanchuk","download_url":"https://codeload.github.com/igorkasyanchuk/get-smart/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorkasyanchuk%2Fget-smart/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":258451781,"owners_count":22703268,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ruby","ruby-on-rails"],"created_at":"2025-05-29T13:13:51.097Z","updated_at":"2025-06-29T16:35:03.877Z","avatar_url":"https://github.com/igorkasyanchuk.png","language":"Ruby","readme":"# Get::Smart - Learn Ruby and Rails by examples\n\n[![RailsJazz](https://github.com/igorkasyanchuk/rails_time_travel/blob/main/docs/my_other.svg?raw=true)](https://www.railsjazz.com)\n[![https://www.patreon.com/igorkasyanchuk](https://github.com/igorkasyanchuk/rails_time_travel/blob/main/docs/patron.svg?raw=true)](https://www.patreon.com/igorkasyanchuk)\n\n[![\"Buy Me A Coffee\"](https://github.com/igorkasyanchuk/get-smart/blob/main/docs/snapshot-bmc-button-small.png?raw=true)](https://buymeacoffee.com/igorkasyanchuk)\n\n![Get::Smart](./docs/example.png)\n\nLearn something new every time you boot your Rails application.\n\nNote: all tips were generated by AI (using o4-mini) and stored in markdown files. Quick and dirty. I've validated them a Gemini AI, and some random manually.\n\nBehind the scenes I have a simple logic to avoid showing the same tip twice and showing contextual tips (based on Gemfile, package.json, etc). Not everything is ready yet, but I'm working on it.\n\nIf you want to contribute, please create a PR with your changes. \n\n## Usage\n\nJust add the gem into your Gemfile. And start your Rails application.\n\nGem supports a few options to customize the behavior. See #Options for more details.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem \"get-smart\", group: :development\n```\n\nAnd then execute:\n\n```bash\n$ bundle\n```\n\n## Options\n\nYou can configure the gem in your `config/initializers/get_smart.rb` file.\n\nTo create the default config file run:\n\n```bash\nrails g get:smart:install\n```\n\nAnd edit the generated file.\n\n```ruby\nif defined?(Get::Smart)\n  Get::Smart.setup do |config|\n    # Enable or disable Get::Smart. Default: Rails.env.development?\n    config.enabled = Rails.env.development?\n\n    # Print file details. Default: false\n    config.print_file_details = true\n\n    # Show tips only for these levels. Default: [:advanced, :expert]\n    config.level = [ :advanced, :expert ]\n    # config.level = [:any, :beginner, :middle, :advanced, :expert]\n\n    # Frequency for showing tips. Default: :always\n    config.frequency = :always\n    # Available options:\n    #   :always, :half_hourly, :hourly, :every_two_hours, :every_three_hours,\n    #   :every_four_hours, :every_five_hours, :every_six_hours, :every_seven_hours,\n    #   :every_eight_hours, :every_nine_hours, :every_ten_hours, :every_eleven_hours,\n    #   :every_twelve_hours, :daily, :every_two_days, :weekly\n\n    # Path to the memory file. Default: ~/.get-smart-memory\n    # config.memory_file_path = File.expand_path(\"~/.get-smart-memory\")\n  end\nend\n```\n\n## Development\n\nAll content is stored in the `files` folder.\n\n```bash\n# set OPENAI_API_KEY in .env, it can be used in bin/generator to create new tips. See source of bin/generator for more details.\n\n# in the root of the project\ncd spec/dummy\nbundle install --gemfile /Users/igor/projects/get-smart/Gemfile\nrails c\n\n# or in the root of the project\n\nbin/run\n```\n\nTo run specs:\n\n```bash\n# in the root of the project\nrspec\n```\n\nRun command `bin/dev` for development and testing.\nRun command `bin/run` to print random tip.\n\nLinting:\n\n```bash\nbin/rubocop -f github\n# to fix errors automatically\nbin/rubocop -A\n```\n\n## Content Generator CLI\n\nUsing Open AI API to generate tips (see example below in the readme, in #structure-of-the-files).\n\nIn gem root run:\n\n```bash\nbin/generator \u003ctopic\u003e \u003cpath\u003e \u003ccount\u003e \u003clevel\u003e\n```\n\nExample:\n\n```bash\nbin/generator \"ruby on rails security tips \u0026 tricks\" \"rails/security\" 10 \"middle\"\n```\n\nLater you can verify the tips with (see #Verifier for more details).\n\n```bash\nbin/verifier files/rails/security\n```\n\n## Tree (in Rails app)\n\nGet a tree of all the tips in the `files` folder (according to the current gem config).\n\n```bash\nbin/rails get_smart:tree\n```\n\nTo see the stats about the tips.\n\n## Structure of the files\n\n![Structure of the files](./docs/structure.png)\n\nAll content is stored in the `files` folder. Just use a similar structure to store your tips.\n\nEvery file is a tip on a specific topic, must be named like `topic1.md`, `topic2.md`, etc (as markdown files).\n\nEvery tip should start with a special comment with the tip title, for example:\n\n```ruby\n### 💎 Ruby Gem Tip: Generate Clean URLs Easily with `babosa`\n```\n\nPut file in any of the folder \"\u003cfolder\u003e/\u003ctopic\u003e/\u003cbeginner|middle|advanced|expert\u003e/\u003ctip_title\u003e.md\"\n\nRules:\n\n- Beginner - tips for beginners\n- Middle - tips for middle level developers\n- Advanced - tips for advanced developers\n- Expert - tips for expert developers\n\nYou can use CLI to add new folders for topics:\n\n```bash\nbin/new gems/devise\n```\n\nExample:\n\nChange the topic to \"file compression in ruby\" and specify number of tips to generate for each level.\n\n```bash\nbundle exec bin/generator \"file compression in ruby beginner usage examples\"          \"files/ruby/compression\"         2 \"beginner\"\nbundle exec bin/generator \"file compression in ruby middle usage examples\"            \"files/ruby/compression\"         2 \"middle\"\nbundle exec bin/generator \"file compression in ruby advanced usage examples\"          \"files/ruby/compression\"         2 \"advanced\"\nbundle exec bin/generator \"file compression in ruby expert usage examples\"            \"files/ruby/compression\"         2 \"expert\"\n```\n\nTo create folders in files/gems/devise folders (beginner, middle, advanced, expert).\n\n## Verifier\n\nVerifier uses Gemini API to verify the tips (an additional step to ensure the quality of the tips). Setup Gemini API key in `.env` file.\n\nTo verify the tips run:\n\n```bash\nbin/verifier files/gems/devise\n```\n\n## Tasks\n\n- readme updates, how to use, options, how to contribute, links to other repos\n- tips specific to the project (based on Gemfile, package.json, DB, etc)\n- maybe exclude from running rake tasks? at least with some flag\n- allow adding custom paths (already kind of done, but lets see if it's really needed)\n- think about nicer way to print tip in the console?\n- better contextual suggestions? (handle JS, CSS, React, etc). See @learning_path.rb\n- more topics\n- improve code coverage\n\n## Contributing\n\nYou are welcome to contribute to the gem.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n[![\"Buy Me A Coffee\"](https://github.com/igorkasyanchuk/get-smart/blob/main/docs/snapshot-bmc-button.png?raw=true)](https://buymeacoffee.com/igorkasyanchuk)\n","funding_links":["https://www.patreon.com/igorkasyanchuk","https://buymeacoffee.com/igorkasyanchuk"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figorkasyanchuk%2Fget-smart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Figorkasyanchuk%2Fget-smart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figorkasyanchuk%2Fget-smart/lists"}