{"id":16019647,"url":"https://github.com/iboard/clean","last_synced_at":"2025-04-05T03:25:13.036Z","repository":{"id":4417619,"uuid":"5555314","full_name":"iboard/clean","owner":"iboard","description":"An example ruby-starter-application with 100% test- and doc-coverage.","archived":false,"fork":false,"pushed_at":"2012-10-20T17:19:25.000Z","size":172,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-04T08:08:48.279Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iboard.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-08-25T21:52:42.000Z","updated_at":"2014-06-06T03:41:39.000Z","dependencies_parsed_at":"2022-08-06T16:15:35.020Z","dependency_job_id":null,"html_url":"https://github.com/iboard/clean","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iboard%2Fclean","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iboard%2Fclean/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iboard%2Fclean/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iboard%2Fclean/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iboard","download_url":"https://codeload.github.com/iboard/clean/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247283478,"owners_count":20913581,"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":[],"created_at":"2024-10-08T17:05:01.525Z","updated_at":"2025-04-05T03:25:13.017Z","avatar_url":"https://github.com/iboard.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"A RUBY LESSON\n=============\n\nInitialized by Andreas Altendorfer on Juli 24, 2012 after\n  studying Uncle Bob's 'Clean Code (Episodes 1 to 12)'. It's aim is to demonstrate and learn how a plain\n  ruby-app (w/o Rails) can work in the matter of _CleanCode_\n\n'clean' implements an Application-class which can execute UseCases. A 'UseCase' is\n  a derivative of class UseCase and implements an 'exexute-method'.\n\nA list of available commands can be found at the end of this file.\n\nWHERE/HOW TO START?\n===================\n\nRequirements\n------------\n\n  * ruby 1.9.x\n  * bundler\n  * Used, 3rd-party gems are listed in Gemfile\n\n        gem \"rspec\"\n        gem \"json\"\n        group :development do\n          gem \"yard\"\n          gem \"redcarpet\"\n          gem \"simplecov\"\n        end\n\nQuickstart/run\n--------------\n\n  1. clone from GitHub\n\n        git clone https://github.com/iboard/clean.git\n\n  2. bundle\n\n        cd clean\n        bundle\n\n  3. rake\n\n        rake\n        rspec spec/spec_helper.rb spec/*/\n\n        # Provide evironment:\n        ENVIRONMENT=test rake  # suppress output in test-mode :test is set by default use :devevlopement, :production\n        FORMAT=d rake          # change rspec-output format (d ... text, p ... dots)\n\n  4. run the app from the command-line\n\n        bin/run.rb  --help\n        bin/run.rb commands\n        bin/run.rb loaded\n        bin/run.rb --command=\"ExampleUsecase,'p1','p2','more Parameters...'\"\n\nBrowse the code\n===============\n\n**app/**\nThe Application\n\n**config/**\nBoot and configure\n\n**lib/**\nRake-tasks\n\n![Dependencies](https://docs.google.com/viewer?pid=explorer\u0026srcid=0BxdssCjqaEh6VzRJb0Y1Tl9iWkE\u0026docid=2626c4310bfeb692f4123c60de559b74%7C5df9d15c4f275da200b25854bed41a94\u0026a=bi\u0026pagenumber=1\u0026w=800)\n\n\nExtend with your code\n=====================\n\nWrite a class, derived from 'UseCase' somewhere in `app/usecases/my_class.rb`\n\n    class MyClass \u003c UseCase\n      def desc\n        \"Describe your usecase on a single line\"\n      end\n      def execute\n        ... do something ...\n      end\n    end\n\n\nSee `app/usecases/example_usecase.rb`\n\nRun the new UseCase\n\n    bin/run.rb --command='MyClass,\"parameter one\",\"parameter two\"'\n\n\n100% Coverage \u0026 Documentation\n=============================\n\nWhen you fork this project it has 100% test-, and documentation-coverage.\nIt's up to you to keep at this level when starting your own Application.\n\n\nAvailable Commands and Examples\n===============================\n\n    bin/run.rb --command='ApplicationInfo,\"available_commands\"'\n    =\u003e [\"ApplicationInfo (app/usecases/application_info.rb)\", \"ExampleUsecase (app/usecases/example_usecase.rb)\", \"UseCase (app/usecases/use_case.rb)\"]\n\n    bin/run.rb --command='ApplicationInfo,\"loaded_files\"'\n    =\u003e [[\"Boot\", \"config/boot.rb\"], [\"Application\", \"app/application.rb\"], [\"ApplicationLoader\", \"app/application_loader.rb\"], [\"OptionsError\", \"app/exceptions/options_error.rb\"], [\"ApplicationInfo\", \"app/usecases/application_info.rb\"], [\"CommandRunner\", \"app/usecases/command_runner.rb\"], [\"ExampleUsecase\", \"app/usecases/example_usecase.rb\"], [\"UseCase\", \"app/usecases/use_case.rb\"]]\n\n    bin/run.rb --command='ExampleUsecase,\"hello\",\"world\"' -v\n    =\u003e I, [2012-10-20T02:28:15.899906 #10293]  INFO -- : Logger.level set to 1\n       I, [2012-10-20T02:28:15.900042 #10293]  INFO -- : INITIALIZE CommandRunner.new([\"ExampleUsecase\", \"\\\"hello\\\"\", \"\\\"world\\\"\"])\n       I, [2012-10-20T02:28:15.900084 #10293]  INFO -- : Evaluate \u003e\u003e ExampleUsecase.new(\"hello\",\"world\")\n       I, [2012-10-20T02:28:15.900132 #10293]  INFO -- : Executing ExampleUsecase (UseCase)\n\n       USECASE EXAMPLE\n       ===============\n       /Users/aa/Development/clean/app/usecases/example_usecase.rb\n\n       \u003e  # -*- encoding : utf-8 -*-\"\n       \u003e  class ExampleUsecase  \u003c UseCase\n       \u003e\n       \u003e    def execute\n       \u003e      puts header\n       \u003e      system( \"cat '#{__FILE__}' | sed 's/^/\u003e  /'\" )\n       \u003e      puts inspect_params\n       \u003e      0\n       \u003e    end\n       \u003e\n       \u003e\n       \u003e    protected\n       \u003e    def inspect_params\n       \u003e      puts \"\\n\\nCalled with params: #{params.to_json}\"\n       \u003e    end\n       \u003e\n       \u003e    def header\n       \u003e      \"\\nUSECASE EXAMPLE\\n\" + \"=\"*\"usecase example\".length + \"\\n#{__FILE__}\\n\\n\"\n       \u003e    end\n       \u003e\n       \u003e  end\n\n\n       Called with params: [\"hello\",\"world\"]\n\n       I, [2012-10-20T02:28:15.905374 #10293]  INFO -- : Returned from ExampleUsecase =\u003e 0\n\n\n\n\nLicense\n=======\n\nPublic Domain Dedication\n------------------------\n\nThis work is a compilation and derivation from other previously released works. With the exception of \nvarious included works, which may be restricted by other licenses, the author or authors of this code \ndedicate any and all copyright interest in this code to the public domain. We make this dedication for \nthe benefit of the public at large and to the detriment of our heirs and successors. We intend this \ndedication to be an overt act of relinquishment in perpetuity of all present and future rights to this \ncode under copyright law.\n\n(c) 2012 by Andreas Altendorfer, \u003candreas@altendorfer.at\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiboard%2Fclean","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiboard%2Fclean","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiboard%2Fclean/lists"}