qb 0.3.12 → 0.3.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +3 -1
- data/README.md +42 -26
- data/ansible.cfg +7 -0
- data/doc/common_issues/qb_run/slow_gather_facts.md +51 -0
- data/doc/getting_started.md +84 -0
- data/doc/intro.md +67 -0
- data/doc/notes/2018.01.06.ansible_devel_submodule.md +29 -0
- data/doc/qb_roles.md +155 -0
- data/doc/qb_roles/metadata/default_dir.md +116 -0
- data/exe/qb +16 -14
- data/lib/qb.rb +5 -20
- data/lib/qb/ansible/cmds/playbook.rb +3 -4
- data/lib/qb/ansible/env.rb +22 -2
- data/lib/qb/ansible/env/devel.rb +49 -0
- data/lib/qb/cli.rb +3 -1
- data/lib/qb/cli/help.rb +1 -1
- data/lib/qb/cli/list.rb +47 -0
- data/lib/qb/cli/run.rb +41 -15
- data/lib/qb/cli/setup.rb +35 -2
- data/lib/qb/options.rb +57 -30
- data/lib/qb/role.rb +32 -170
- data/lib/qb/role/default_dir.rb +231 -0
- data/lib/qb/role/errors.rb +18 -10
- data/lib/qb/role/name.rb +139 -0
- data/lib/qb/util/logging.rb +0 -7
- data/lib/qb/version.rb +1 -1
- data/library/stream +5 -0
- data/plugins/filter_plugins/string_plugins.py +2 -3
- data/plugins/filter_plugins/version_plugins.py +11 -0
- data/qb.gemspec +158 -62
- data/roles/nrser.blockinfile/library/blockinfile.py +14 -0
- data/roles/qb.git_repo/tasks/main.yml +3 -3
- data/roles/qb.npm_package/meta/main.yml +2 -2
- data/roles/qb.npm_package/meta/qb.yml +3 -3
- data/roles/qb.vars/meta/qb.yml +8 -7
- data/roles/qb.vars/tasks/main.yml +10 -1
- data/roles/qb/call/defaults/main.yml +2 -0
- data/roles/qb/call/meta/main.yml +8 -0
- data/roles/qb/call/meta/qb.yml +68 -0
- data/roles/qb/call/tasks/main.yml +92 -0
- data/roles/qb/gem/new/meta/qb.yml +1 -1
- data/roles/qb/gem/new/tasks/main.yml +3 -3
- data/roles/qb/gem/release/tasks/main.yml +3 -5
- data/roles/{qb.gitignore → qb/git/ignore}/defaults/main.yml +1 -1
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Actionscript.gitignore +2 -3
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Ada.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Agda.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Android.gitignore +3 -2
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/AppEngine.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/AppceleratorTitanium.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/ArchLinuxPackages.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Autotools.gitignore +9 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/C++.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/C.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/CFWheels.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/CMake.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/CONTRIBUTING.md +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/CUDA.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/CakePHP.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/ChefCookbook.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Clojure.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/CodeIgniter.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/CommonLisp.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Composer.gitignore +1 -1
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Concrete5.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Coq.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/CraftCMS.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/D.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/DM.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Dart.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Delphi.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Drupal.gitignore +3 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/EPiServer.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Eagle.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Elisp.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Elixir.gitignore +2 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Elm.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Erlang.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/ExpressionEngine.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/ExtJs.gitignore +2 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Fancy.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Finale.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/ForceDotCom.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Fortran.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/FuelPHP.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/GWT.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Gcov.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Gem.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/GitBook.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/Anjuta.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/Ansible.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/Archives.gitignore +2 -2
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/Bazaar.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/BricxCC.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/CVS.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/Calabash.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/Cloud9.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/CodeKit.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/DartEditor.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/Dreamweaver.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/Dropbox.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/Eclipse.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/EiffelStudio.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/Emacs.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/Ensime.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/Espresso.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/FlexBuilder.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/GPG.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/JDeveloper.gitignore +0 -0
- data/roles/qb/git/ignore/files/gitignore/Global/JEnv.gitignore +5 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/JetBrains.gitignore +2 -1
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/KDevelop4.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/Kate.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/Lazarus.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/LibreOffice.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/Linux.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/LyX.gitignore +0 -0
- data/roles/qb/git/ignore/files/gitignore/Global/Matlab.gitignore +25 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/Mercurial.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/MicrosoftOffice.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/ModelSim.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/Momentics.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/MonoDevelop.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/NetBeans.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/Ninja.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/NotepadPP.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/Otto.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/README.md +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/Redcar.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/Redis.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/SBT.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/SVN.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/SlickEdit.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/Stata.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/SublimeText.gitignore +5 -5
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/SynopsysVCS.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/Tags.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/TextMate.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/TortoiseGit.gitignore +0 -0
- data/roles/qb/git/ignore/files/gitignore/Global/Vagrant.gitignore +5 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/Vim.gitignore +6 -4
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/VirtualEnv.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/VisualStudioCode.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/WebMethods.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/Windows.gitignore +4 -1
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/Xcode.gitignore +9 -9
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/XilinxISE.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Global/macOS.gitignore +2 -1
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Go.gitignore +0 -3
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Gradle.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Grails.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Haskell.gitignore +2 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/IGORPro.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Idris.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Java.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Jboss.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Jekyll.gitignore +1 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Joomla.gitignore +1 -1
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Julia.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/KiCad.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Kohana.gitignore +0 -0
- data/roles/qb/git/ignore/files/gitignore/Kotlin.gitignore +1 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/LICENSE +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/LabVIEW.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Laravel.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Leiningen.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/LemonStand.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Lilypond.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Lithium.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Lua.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Magento.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Maven.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Mercury.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/MetaProgrammingSystem.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Nanoc.gitignore +1 -1
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Nim.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Node.gitignore +1 -1
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/OCaml.gitignore +3 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Objective-C.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Opa.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/OpenCart.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/OracleForms.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Packer.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Perl.gitignore +1 -1
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Phalcon.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/PlayFramework.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Plone.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Prestashop.gitignore +3 -1
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Processing.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/PureScript.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Python.gitignore +11 -5
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/QB.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Qooxdoo.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Qt.gitignore +8 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/R.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/README.md +2 -2
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/ROS.gitignore +2 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Rails.gitignore +4 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/RhodesRhomobile.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Ruby.gitignore +0 -16
- data/roles/qb/git/ignore/files/gitignore/RubyMotion.gitignore +30 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Rust.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/SCons.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Sass.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Scala.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Scheme.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Scrivener.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Sdcc.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/SeamGen.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/SketchUp.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Smalltalk.gitignore +4 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Stella.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/SugarCRM.gitignore +2 -2
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Swift.gitignore +1 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Symfony.gitignore +7 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/SymphonyCMS.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/TeX.gitignore +6 -1
- data/roles/qb/git/ignore/files/gitignore/Terraform.gitignore +9 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Textpattern.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/TurboGears2.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Typo3.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Umbraco.gitignore +7 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Unity.gitignore +7 -6
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/UnrealEngine.gitignore +2 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/VVVV.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/VisualStudio.gitignore +37 -6
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Waf.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/WordPress.gitignore +1 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Xojo.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Yeoman.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Yii.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/ZendFramework.gitignore +0 -1
- data/roles/{qb.gitignore → qb/git/ignore}/files/gitignore/Zephir.gitignore +0 -0
- data/roles/{qb.gitignore → qb/git/ignore}/meta/main.yml +1 -1
- data/roles/{qb.gitignore → qb/git/ignore}/meta/qb +5 -0
- data/roles/{qb.gitignore → qb/git/ignore}/tasks/main.yml +9 -1
- data/roles/qb/github/pages/setup/defaults/main.yml +2 -0
- data/roles/qb/github/pages/setup/meta/main.yml +8 -0
- data/roles/qb/github/pages/setup/meta/qb.yml +68 -0
- data/roles/qb/github/pages/setup/tasks/main.yml +10 -0
- data/roles/{qb.project → qb/project}/.qb-options.yml +1 -1
- data/roles/{qb.project → qb/project}/defaults/main.yml +1 -1
- data/roles/{qb.project → qb/project}/files/ansible.cfg +0 -0
- data/roles/{qb.project → qb/project}/files/hosts +0 -0
- data/roles/qb/project/meta/main.yml +6 -0
- data/roles/{qb.project → qb/project}/meta/qb.yml +4 -2
- data/roles/{qb.project → qb/project}/qb/get_dir +0 -0
- data/roles/qb/project/tasks/dev.yml +53 -0
- data/roles/{qb.project → qb/project}/tasks/main.yml +3 -2
- data/roles/{qb.project → qb/project}/templates/.gitkeep +0 -0
- data/roles/qb/project/templates/README.md.j2 +4 -0
- data/roles/qb/project/templates/setup.qb.yml.j2 +52 -0
- data/roles/{qb.project → qb/project}/templates/setup.yml.j2 +0 -0
- data/roles/{qb.role → qb/role}/.qb-options.yml +0 -0
- data/roles/{qb.role → qb/role}/defaults/main.yml +4 -1
- data/roles/{qb.role → qb/role}/meta/main.yml +1 -1
- data/roles/{qb.role → qb/role}/meta/qb.yml +2 -2
- data/roles/qb/role/qb/meta/main.yml +1 -1
- data/roles/qb/role/qb/meta/qb.yml +1 -1
- data/roles/qb/role/qb/tasks/main.yml +4 -2
- data/roles/qb/role/qb/templates/qb.yml.j2 +1 -1
- data/roles/{qb.role → qb/role}/tasks/main.yml +3 -2
- data/roles/{qb.role → qb/role}/tasks/module.yml +0 -0
- data/roles/{qb.role → qb/role}/tasks/plugins/_filter_plugin.yml +0 -0
- data/roles/{qb.role → qb/role}/tasks/plugins/filter_plugins.yml +5 -5
- data/roles/{qb.role → qb/role}/templates/.gitkeep +0 -0
- data/roles/{qb.role → qb/role}/templates/README.md.j2 +0 -0
- data/roles/{qb.role → qb/role}/templates/defaults/main.yml.j2 +0 -0
- data/roles/{qb.role → qb/role}/templates/filter_plugins/filters.py.j2 +0 -0
- data/roles/{qb.role → qb/role}/templates/handlers/main.yml.j2 +0 -0
- data/roles/{qb.role → qb/role}/templates/library/module.rb.j2 +0 -0
- data/roles/{qb.role → qb/role}/templates/meta/main.yml.j2 +0 -0
- data/roles/{qb.role → qb/role}/templates/tasks/main.yml.j2 +0 -0
- data/roles/{qb.role → qb/role}/templates/vars/main.yml.j2 +0 -0
- data/roles/{qb.role → qb/role}/vars/main.yml +1 -1
- data/roles/qb/ruby/bundler/.qb-options.yml +4 -0
- data/roles/qb/ruby/bundler/defaults/main.yml +7 -0
- data/roles/qb/ruby/bundler/filter_plugins/bundler_filters.py +157 -0
- data/roles/qb/ruby/bundler/meta/main.yml +8 -0
- data/roles/qb/ruby/bundler/meta/qb.yml +69 -0
- data/roles/qb/ruby/bundler/tasks/gems.yml +12 -0
- data/roles/qb/ruby/bundler/tasks/main.yml +12 -0
- data/roles/qb/ruby/bundler/tasks/setup.yml +13 -0
- data/roles/qb/ruby/yard/defaults/args.yml +2 -0
- data/roles/qb/ruby/yard/defaults/main.yml +9 -0
- data/roles/qb/ruby/yard/meta/main.yml +8 -0
- data/roles/qb/ruby/yard/meta/qb.yml +71 -0
- data/roles/qb/ruby/yard/tasks/main.yml +28 -0
- metadata +290 -297
- data/roles/nrser.blockinfile/tests/.gitignore +0 -1
- data/roles/nrser.blockinfile/tests/expected/test-basic/create.txt +0 -5
- data/roles/nrser.blockinfile/tests/expected/test-basic/insert.txt +0 -6
- data/roles/nrser.blockinfile/tests/expected/test-basic/marker.txt +0 -5
- data/roles/nrser.blockinfile/tests/expected/test-basic/remove.txt +0 -2
- data/roles/nrser.blockinfile/tests/expected/test-basic/update.txt +0 -6
- data/roles/nrser.blockinfile/tests/expected/test-block/block.txt +0 -4
- data/roles/nrser.blockinfile/tests/expected/test-block/content.txt +0 -4
- data/roles/nrser.blockinfile/tests/expected/test-follow/link0.txt +0 -6
- data/roles/nrser.blockinfile/tests/expected/test-follow/link1.txt +0 -6
- data/roles/nrser.blockinfile/tests/expected/test-follow/link2.txt +0 -1
- data/roles/nrser.blockinfile/tests/expected/test-follow/real0.txt +0 -2
- data/roles/nrser.blockinfile/tests/expected/test-follow/real1.txt +0 -2
- data/roles/nrser.blockinfile/tests/expected/test-follow/real2.txt +0 -6
- data/roles/nrser.blockinfile/tests/expected/test-insertab/insertafter.txt +0 -8
- data/roles/nrser.blockinfile/tests/expected/test-insertab/insertbefore.txt +0 -8
- data/roles/nrser.blockinfile/tests/expected/test-insertab/insertbof.txt +0 -8
- data/roles/nrser.blockinfile/tests/expected/test-insertab/inserteof.txt +0 -8
- data/roles/nrser.blockinfile/tests/expected/test-insertab/insertunmatched.txt +0 -8
- data/roles/nrser.blockinfile/tests/expected/test-insertab/updateafter.txt +0 -8
- data/roles/nrser.blockinfile/tests/expected/test-insertab/updatebefore.txt +0 -8
- data/roles/nrser.blockinfile/tests/expected/test-multiline/insert.txt +0 -11
- data/roles/nrser.blockinfile/tests/expected/test-multiline/remove.txt +0 -2
- data/roles/nrser.blockinfile/tests/expected/test-multiline/update.txt +0 -12
- data/roles/nrser.blockinfile/tests/expected/test-replace/index.html +0 -6
- data/roles/nrser.blockinfile/tests/expected/test-state/insert-present.txt +0 -5
- data/roles/nrser.blockinfile/tests/expected/test-state/insert.txt +0 -5
- data/roles/nrser.blockinfile/tests/expected/test-state/remove-absent.txt +0 -2
- data/roles/nrser.blockinfile/tests/expected/test-state/remove-present.txt +0 -2
- data/roles/nrser.blockinfile/tests/expected/test-state/remove.txt +0 -2
- data/roles/nrser.blockinfile/tests/fixtures/test-basic/insert.txt +0 -2
- data/roles/nrser.blockinfile/tests/fixtures/test-basic/marker.txt +0 -1
- data/roles/nrser.blockinfile/tests/fixtures/test-basic/remove.txt +0 -6
- data/roles/nrser.blockinfile/tests/fixtures/test-basic/update.txt +0 -6
- data/roles/nrser.blockinfile/tests/fixtures/test-block/block.txt +0 -1
- data/roles/nrser.blockinfile/tests/fixtures/test-block/content.txt +0 -1
- data/roles/nrser.blockinfile/tests/fixtures/test-follow/link0.txt +0 -1
- data/roles/nrser.blockinfile/tests/fixtures/test-follow/link1.txt +0 -1
- data/roles/nrser.blockinfile/tests/fixtures/test-follow/link2.txt +0 -1
- data/roles/nrser.blockinfile/tests/fixtures/test-follow/real0.txt +0 -2
- data/roles/nrser.blockinfile/tests/fixtures/test-follow/real1.txt +0 -2
- data/roles/nrser.blockinfile/tests/fixtures/test-follow/real2.txt +0 -2
- data/roles/nrser.blockinfile/tests/fixtures/test-insertab/insertafter.txt +0 -4
- data/roles/nrser.blockinfile/tests/fixtures/test-insertab/insertbefore.txt +0 -4
- data/roles/nrser.blockinfile/tests/fixtures/test-insertab/insertbof.txt +0 -4
- data/roles/nrser.blockinfile/tests/fixtures/test-insertab/inserteof.txt +0 -4
- data/roles/nrser.blockinfile/tests/fixtures/test-insertab/insertunmatched.txt +0 -4
- data/roles/nrser.blockinfile/tests/fixtures/test-insertab/updateafter.txt +0 -8
- data/roles/nrser.blockinfile/tests/fixtures/test-insertab/updatebefore.txt +0 -8
- data/roles/nrser.blockinfile/tests/fixtures/test-multiline/insert.txt +0 -2
- data/roles/nrser.blockinfile/tests/fixtures/test-multiline/remove.txt +0 -11
- data/roles/nrser.blockinfile/tests/fixtures/test-multiline/update.txt +0 -12
- data/roles/nrser.blockinfile/tests/fixtures/test-replace/index.html +0 -1
- data/roles/nrser.blockinfile/tests/fixtures/test-state/insert-present.txt +0 -2
- data/roles/nrser.blockinfile/tests/fixtures/test-state/insert.txt +0 -2
- data/roles/nrser.blockinfile/tests/fixtures/test-state/remove-absent.txt +0 -6
- data/roles/nrser.blockinfile/tests/fixtures/test-state/remove-present.txt +0 -6
- data/roles/nrser.blockinfile/tests/fixtures/test-state/remove.txt +0 -6
- data/roles/nrser.blockinfile/tests/hosts +0 -1
- data/roles/nrser.blockinfile/tests/roles/yaegashi.blockinfile +0 -1
- data/roles/nrser.blockinfile/tests/run.sh +0 -64
- data/roles/nrser.blockinfile/tests/test-basic.yml +0 -31
- data/roles/nrser.blockinfile/tests/test-block.yml +0 -16
- data/roles/nrser.blockinfile/tests/test-follow.yml +0 -21
- data/roles/nrser.blockinfile/tests/test-insertab.yml +0 -34
- data/roles/nrser.blockinfile/tests/test-multiline.yml +0 -51
- data/roles/nrser.blockinfile/tests/test-replace.yml +0 -21
- data/roles/nrser.blockinfile/tests/test-state.yml +0 -32
- data/roles/qb.gitignore/files/gitignore/Global/Matlab.gitignore +0 -22
- data/roles/qb.gitignore/files/gitignore/Global/Vagrant.gitignore +0 -1
- data/roles/qb.gitignore/files/gitignore/Terraform.gitignore +0 -6
- data/roles/qb.project/meta/main.yml +0 -6
- data/roles/qb.project/tasks/dev.yml +0 -36
- data/roles/qb.project/tasks/setup.yml +0 -42
- data/roles/qb.project/templates/README.md.j2 +0 -2
- data/roles/qb.project/templates/bootstrap.yml.j2 +0 -20
data/lib/qb/role/errors.rb
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
# Refinements
|
2
|
+
# =======================================================================
|
3
|
+
|
4
|
+
require 'nrser/refinements'
|
5
|
+
using NRSER
|
6
|
+
|
7
|
+
|
8
|
+
# Definitions
|
9
|
+
# =======================================================================
|
10
|
+
|
1
11
|
module QB
|
2
12
|
class Role
|
3
13
|
# raised by `.require` when no roles match input
|
@@ -19,16 +29,14 @@ module QB
|
|
19
29
|
@input = input
|
20
30
|
@matches = matches
|
21
31
|
|
22
|
-
super <<-END
|
23
|
-
multiple roles match input
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
END
|
32
|
+
super binding.erb <<-END
|
33
|
+
multiple roles match input <%= @input.inspect %>:
|
34
|
+
|
35
|
+
<% @matches.map do |role| %>
|
36
|
+
- <%= role.to_s %> (<%= role.path.to_s %>)
|
37
|
+
<% end %>
|
38
|
+
|
39
|
+
END
|
32
40
|
end
|
33
41
|
end
|
34
42
|
|
data/lib/qb/role/name.rb
ADDED
@@ -0,0 +1,139 @@
|
|
1
|
+
##
|
2
|
+
# {QB::Role} methods for dealing with role names.
|
3
|
+
#
|
4
|
+
# Broken out from the main `//lib/qb/role.rb` file because it was starting to
|
5
|
+
# get long and unwieldy.
|
6
|
+
#
|
7
|
+
##
|
8
|
+
|
9
|
+
# Requirements
|
10
|
+
# =======================================================================
|
11
|
+
|
12
|
+
# Stdlib
|
13
|
+
# -----------------------------------------------------------------------
|
14
|
+
|
15
|
+
# Deps
|
16
|
+
# -----------------------------------------------------------------------
|
17
|
+
|
18
|
+
# Project / Package
|
19
|
+
# -----------------------------------------------------------------------
|
20
|
+
require 'qb/util'
|
21
|
+
|
22
|
+
|
23
|
+
# Refinements
|
24
|
+
# =======================================================================
|
25
|
+
|
26
|
+
require 'nrser/refinements'
|
27
|
+
using NRSER
|
28
|
+
|
29
|
+
|
30
|
+
# Declarations
|
31
|
+
# =======================================================================
|
32
|
+
|
33
|
+
|
34
|
+
# Definitions
|
35
|
+
# =======================================================================
|
36
|
+
|
37
|
+
class QB::Role
|
38
|
+
|
39
|
+
# Class Methods
|
40
|
+
# ======================================================================
|
41
|
+
#
|
42
|
+
# Actual functionality is implemented as static methods so that it can be
|
43
|
+
# used in cases where we don't have a {QB::Role} instantiated, especially
|
44
|
+
# in roles themselves like `//roles/qb/role` with:
|
45
|
+
#
|
46
|
+
# role_role_name: >-
|
47
|
+
# {{ 'QB::Role' | qb_send_const( 'default_name_for', role_dest ) }}
|
48
|
+
#
|
49
|
+
# role_namespaceless: >-
|
50
|
+
# {{ 'QB::Role' | qb_send_const( 'namespaceless_for', role_role_name ) }}
|
51
|
+
#
|
52
|
+
|
53
|
+
|
54
|
+
# Do our best to figure out a role name from a path (that might not exist).
|
55
|
+
#
|
56
|
+
# We needs this when we're creating a role.
|
57
|
+
#
|
58
|
+
# @param [String | Pathname] path
|
59
|
+
#
|
60
|
+
#
|
61
|
+
# @return [String]
|
62
|
+
#
|
63
|
+
def self.default_name_for path
|
64
|
+
resolved_path = QB::Util.resolve path
|
65
|
+
|
66
|
+
# Find the first directory in the search path that contains the path,
|
67
|
+
# if any do.
|
68
|
+
#
|
69
|
+
# It *could* be in more than one in funky situations like overlapping
|
70
|
+
# search paths or link silliness, but that doesn't matter - we consider
|
71
|
+
# the first place we find it to be the relevant once, since the search
|
72
|
+
# path is most-important-first.
|
73
|
+
#
|
74
|
+
search_dir = search_path.find { |pathname|
|
75
|
+
resolved_path.fnmatch? ( pathname / '**' ).to_s
|
76
|
+
}
|
77
|
+
|
78
|
+
if search_dir.nil?
|
79
|
+
# It's not in any of the search directories
|
80
|
+
#
|
81
|
+
# If it has 'roles' as a segment than use what's after the last occurrence
|
82
|
+
# of that (unless there isn't anything).
|
83
|
+
#
|
84
|
+
segments = resolved_path.to_s.split File::SEPARATOR
|
85
|
+
|
86
|
+
if index = segments.rindex( 'roles' )
|
87
|
+
name_segs = segments[( index + 1 )..( -1 )]
|
88
|
+
|
89
|
+
unless name_segs.empty?
|
90
|
+
return File.join name_segs
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
# Ok, that didn't work... just return the basename I guess...
|
95
|
+
return File.basename resolved_path
|
96
|
+
|
97
|
+
end
|
98
|
+
|
99
|
+
# it's in the search path, return the relative path from the containing
|
100
|
+
# search dir to the resolved path (string version of it).
|
101
|
+
resolved_path.relative_path_from( search_dir ).to_s
|
102
|
+
|
103
|
+
end # #default_name_for
|
104
|
+
|
105
|
+
# Old depreciated name
|
106
|
+
singleton_class.send :alias_method, :default_role_name, :default_name_for
|
107
|
+
|
108
|
+
|
109
|
+
def self.namespace_for name
|
110
|
+
*namespace_segments, last = name.split File::Separator
|
111
|
+
|
112
|
+
namespace_segments << last.split('.').first if last.include?('.')
|
113
|
+
|
114
|
+
if namespace_segments.empty?
|
115
|
+
nil
|
116
|
+
else
|
117
|
+
File.join *namespace_segments
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
121
|
+
|
122
|
+
def self.namespaceless_for name
|
123
|
+
File.basename( name ).split('.', 2).last
|
124
|
+
end
|
125
|
+
|
126
|
+
|
127
|
+
# Instance Methods
|
128
|
+
# ============================================================================
|
129
|
+
|
130
|
+
def namespace
|
131
|
+
self.class.namespace_for @name
|
132
|
+
end
|
133
|
+
|
134
|
+
|
135
|
+
def namespaceless
|
136
|
+
self.class.namespaceless_for @name
|
137
|
+
end
|
138
|
+
|
139
|
+
end # class QB::Role
|
data/lib/qb/util/logging.rb
CHANGED
@@ -158,8 +158,6 @@ module QB::Util::Logging
|
|
158
158
|
end # module Formatters
|
159
159
|
|
160
160
|
|
161
|
-
|
162
|
-
|
163
161
|
# Module (Class) Methods
|
164
162
|
# =====================================================================
|
165
163
|
|
@@ -208,8 +206,3 @@ module QB::Util::Logging
|
|
208
206
|
|
209
207
|
|
210
208
|
end # module QB::Util::Logging
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
# Post-Processing
|
215
|
-
# =======================================================================
|
data/lib/qb/version.rb
CHANGED
data/library/stream
CHANGED
@@ -23,6 +23,11 @@ class Stream < QB::Ansible::Module
|
|
23
23
|
"Must supply `template` or `cmd` argument."
|
24
24
|
end
|
25
25
|
|
26
|
+
if @args['creates'] && File.exists?( @args['creates'] )
|
27
|
+
debug "File #{ @args['creates'] } exists, skipping"
|
28
|
+
return nil
|
29
|
+
end
|
30
|
+
|
26
31
|
opts = {}
|
27
32
|
|
28
33
|
[:args, :kwds, :input, :assert, :env, :chdir].each { |key|
|
@@ -62,7 +62,6 @@ def cap(string):
|
|
62
62
|
'DoSomething'
|
63
63
|
'''
|
64
64
|
return string[0].upper() + string[1:]
|
65
|
-
|
66
65
|
|
67
66
|
|
68
67
|
def camel_case(string):
|
@@ -80,8 +79,8 @@ def camel_case(string):
|
|
80
79
|
>>> camel_case("qb.DoSomething")
|
81
80
|
'qbDoSomething'
|
82
81
|
'''
|
83
|
-
|
84
|
-
return
|
82
|
+
words = qb.strings.words(string)
|
83
|
+
return words[0] + "".join(cap(s) for s in words[1:])
|
85
84
|
|
86
85
|
|
87
86
|
def cap_camel_case(string):
|
@@ -34,7 +34,18 @@ def semver_inc(version, level = None, preid = None):
|
|
34
34
|
|
35
35
|
semver --increment <level> [--preid <preid>] <version>
|
36
36
|
|
37
|
+
|
38
|
+
This does **not** do what you probably want... `preid` is ignored:
|
39
|
+
|
40
|
+
>>> semver_inc('1.0.0', 'patch', preid = 'dev')
|
41
|
+
'1.0.1'
|
42
|
+
|
37
43
|
>>> semver_inc('1.0.0', 'minor', preid = 'dev')
|
44
|
+
'1.1.0'
|
45
|
+
|
46
|
+
The only way to get the `preid` appended is to increment the prerelease:
|
47
|
+
|
48
|
+
>>> semver_inc('1.0.0', 'prerelease', preid = 'dev')
|
38
49
|
'1.0.1-dev.0'
|
39
50
|
|
40
51
|
'''
|
data/qb.gemspec
CHANGED
@@ -1,13 +1,35 @@
|
|
1
1
|
# coding: utf-8
|
2
|
+
|
3
|
+
# WARNING!!!
|
4
|
+
#
|
5
|
+
# This file gets executed every time Bundler sets up, so we want it to be
|
6
|
+
# fast, fast, *fast*... or every command execution in development will be
|
7
|
+
# painfully slow.
|
8
|
+
#
|
9
|
+
# This comes into play because you're dealing with potentially large lists of
|
10
|
+
# files, and how you handle them makes a difference.
|
11
|
+
#
|
12
|
+
|
2
13
|
require 'pathname'
|
3
14
|
|
4
|
-
|
5
|
-
|
6
|
-
|
15
|
+
# gem_root = File.expand_path(File.dirname(__FILE__))
|
16
|
+
gem_root = Pathname.new( __FILE__ ).dirname.expand_path
|
17
|
+
lib = File.join gem_root, 'lib'
|
18
|
+
|
19
|
+
$LOAD_PATH.unshift( lib ) unless $LOAD_PATH.include?( lib )
|
20
|
+
|
7
21
|
require 'qb/version'
|
8
22
|
|
9
|
-
|
10
|
-
|
23
|
+
|
24
|
+
# "Constants"
|
25
|
+
# ============================================================================
|
26
|
+
#
|
27
|
+
# Though they're implemented as local variables because I don't want to
|
28
|
+
# pollute the global namespace.
|
29
|
+
#
|
30
|
+
|
31
|
+
# Things not to package (String | Regexp)
|
32
|
+
omit_files = [
|
11
33
|
# standard gem ignores (test files)
|
12
34
|
%r{^(test|spec|feature)/},
|
13
35
|
# all the development files
|
@@ -29,90 +51,163 @@ OMIT_FILES = [
|
|
29
51
|
'node_modules/.yarn-integrity',
|
30
52
|
# nrser.blockinfile tests carried over from fork
|
31
53
|
%r{^roles/nrser.blockinfile/tests/},
|
32
|
-
# temp playbook used in development
|
33
|
-
'temp.yml',
|
34
54
|
# don't think we need the Rakefile
|
35
55
|
'Rakefile',
|
56
|
+
|
57
|
+
# Omit the ansible devel checkout for now
|
58
|
+
%r{^packages/python/ansible/},
|
36
59
|
]
|
37
60
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
61
|
+
|
62
|
+
# Helpers
|
63
|
+
# ============================================================================
|
64
|
+
#
|
65
|
+
# Again, implemented as local variables pointing to lambdas to not pollute.
|
66
|
+
#
|
67
|
+
|
68
|
+
get_rel_path = ->( path ) {
|
69
|
+
Pathname.new( path ).relative_path_from( gem_root ).to_s
|
70
|
+
}
|
71
|
+
|
72
|
+
should_omit = ->( rel_path ) {
|
73
|
+
omit_files.any? {|pattern|
|
74
|
+
case pattern
|
75
|
+
when String
|
76
|
+
rel_path == pattern
|
77
|
+
when Regexp
|
78
|
+
pattern.match rel_path
|
79
|
+
else
|
80
|
+
raise "bad pattern: #{ pattern.inspect }"
|
81
|
+
end
|
55
82
|
}
|
83
|
+
}
|
84
|
+
|
85
|
+
filter_files = ->( rel_paths ) {
|
86
|
+
rel_paths.reject { |rel_path| should_omit.call rel_path }
|
87
|
+
}
|
88
|
+
|
89
|
+
|
90
|
+
# Spec
|
91
|
+
# ============================================================================
|
92
|
+
|
93
|
+
Gem::Specification.new do |spec|
|
94
|
+
spec.name = QB::GEM_NAME
|
95
|
+
spec.version = QB::VERSION
|
96
|
+
spec.authors = ["nrser"]
|
97
|
+
spec.email = ["neil@ztkae.com"]
|
98
|
+
|
99
|
+
spec.summary = \
|
100
|
+
%q{qb is all about projects. named after everyone's favorite projects.}
|
56
101
|
|
57
|
-
spec.
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
end
|
67
|
-
}
|
68
|
-
}
|
102
|
+
# spec.description = \
|
103
|
+
# %q{TODO: Write a longer description or delete this line.}
|
104
|
+
|
105
|
+
spec.homepage = "https://github.com/nrser/qb"
|
106
|
+
spec.license = "MIT"
|
107
|
+
|
108
|
+
|
109
|
+
# Files
|
110
|
+
# ============================================================================
|
69
111
|
|
70
|
-
#
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
112
|
+
# Start with all the checked-in files that are not omitted
|
113
|
+
spec.files = filter_files.call `git ls-files -z`.split( "\x0" )
|
114
|
+
|
115
|
+
# Add files from `//node_modules` that are not omitted
|
116
|
+
spec.files += filter_files.call Dir.glob(
|
117
|
+
(gem_root / 'node_modules' / '**' / '*'), File::FNM_DOTMATCH
|
118
|
+
).map { |abs_path| get_rel_path.call abs_path }
|
119
|
+
|
120
|
+
# Add all files from Git submodules that are not omitted
|
121
|
+
`git submodule --quiet foreach --recursive pwd`.
|
122
|
+
split( $\ ).
|
123
|
+
each do |submod_abs_path|
|
124
|
+
submod_rel_path = get_rel_path.call submod_abs_path
|
75
125
|
|
76
|
-
#
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
126
|
+
# Only deal with the submodule at all if it isn't totally omitted
|
127
|
+
#
|
128
|
+
# Need to add the `/` on the end 'cause that's how they're matched in the
|
129
|
+
# regexps
|
130
|
+
#
|
131
|
+
unless should_omit.call( submod_rel_path + '/' )
|
132
|
+
Dir.chdir submod_abs_path do
|
133
|
+
# Issue git ls-files in submodule's directory and
|
134
|
+
# prepend the submodule path to create absolute file paths
|
135
|
+
#
|
136
|
+
# WARNING!!! Do **NOT** `<<` to `spec.files` in the loop, it's shit
|
137
|
+
# slow (lots of files -> prob resizing array tons of
|
138
|
+
# times)
|
139
|
+
#
|
140
|
+
spec.files += filter_files.call `git ls-files -z`.
|
141
|
+
split( "\x0" ).
|
142
|
+
map { |filename|
|
143
|
+
File.join( submod_rel_path, filename)
|
144
|
+
}
|
82
145
|
end
|
83
146
|
end
|
84
|
-
end
|
85
|
-
end
|
147
|
+
end # each submod_abs_path
|
86
148
|
|
149
|
+
# ****************************************************************************
|
150
|
+
|
151
|
+
# Latest (as of 2018-01-6) `bundle gem` setup uses `//exe` as the gem
|
152
|
+
# binaries (that are shipped) and `//bin` as the development binaries, so
|
153
|
+
# I've just stuck to that
|
87
154
|
spec.bindir = "exe"
|
88
155
|
|
89
|
-
#
|
90
|
-
|
156
|
+
# Executables to install in system path with gem
|
157
|
+
#
|
158
|
+
# All files in the bindir that *do not* start with `.`
|
159
|
+
#
|
160
|
+
spec.executables = spec.files.grep %r{^#{ spec.bindir }/[^\.]},
|
161
|
+
&File.method( :basename )
|
91
162
|
|
92
163
|
spec.require_paths = ["lib"]
|
164
|
+
|
165
|
+
|
166
|
+
# Dependencies
|
167
|
+
# ============================================================================
|
168
|
+
|
169
|
+
# Development Dependencies
|
170
|
+
# ----------------------------------------------------------------------------
|
93
171
|
|
94
172
|
spec.add_development_dependency "bundler", "~> 1.10"
|
95
173
|
spec.add_development_dependency "rake", "~> 10.0"
|
96
174
|
spec.add_development_dependency "rspec", "~> 3.7.0"
|
97
|
-
spec.add_development_dependency "yard"
|
175
|
+
spec.add_development_dependency "yard", '~> 0.9.12'
|
176
|
+
spec.add_development_dependency "redcarpet"
|
177
|
+
spec.add_development_dependency "github-markup"
|
98
178
|
spec.add_development_dependency "pry"
|
99
179
|
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
spec.add_dependency
|
105
|
-
spec.add_dependency "
|
180
|
+
|
181
|
+
# Runtime Dependencies
|
182
|
+
# ----------------------------------------------------------------------------
|
183
|
+
|
184
|
+
spec.add_dependency "cmds", '~> 0.0', ">= 0.2.4"
|
185
|
+
spec.add_dependency "nrser", '~> 0.0', ">= 0.0.30"
|
186
|
+
spec.add_dependency "nrser-extras", '~> 0.0', ">= 0.0.3"
|
187
|
+
spec.add_dependency "state_mate", '~> 0.0', ">= 0.1.0"
|
188
|
+
|
189
|
+
# Used to parse `ansible.cfg` files
|
190
|
+
spec.add_dependency 'parseconfig', '~> 1.0', '>= 1.0.8'
|
191
|
+
|
192
|
+
# GitHub API client
|
193
|
+
spec.add_dependency "octokit", "~> 4.0"
|
106
194
|
|
107
195
|
# Much better logging
|
108
|
-
spec.add_dependency 'semantic_logger',
|
196
|
+
spec.add_dependency 'semantic_logger', '~> 4.2'
|
197
|
+
|
109
198
|
# With much more awesome printing!
|
110
|
-
spec.add_dependency 'awesome_print',
|
199
|
+
spec.add_dependency 'awesome_print', '~> 1.8'
|
111
200
|
|
112
201
|
# Ruby lib wrapping `git` binary system calls for use in {QB::Repo::Git}
|
113
202
|
spec.add_dependency 'git', '~> 1.3.0'
|
114
203
|
|
115
204
|
|
205
|
+
# Development-Only Extra Metadata
|
206
|
+
# ============================================================================
|
207
|
+
#
|
208
|
+
# We dump this in CLI output header in local dev.
|
209
|
+
#
|
210
|
+
|
116
211
|
if QB::VERSION.end_with? '.dev'
|
117
212
|
commit = `git rev-parse HEAD`.strip
|
118
213
|
|
@@ -122,5 +217,6 @@ Gem::Specification.new do |spec|
|
|
122
217
|
"commit" => commit,
|
123
218
|
"browse" => "https://github.com/nrser/qb/tree/#{ commit }",
|
124
219
|
}
|
125
|
-
end
|
126
|
-
|
220
|
+
end # if dev version
|
221
|
+
|
222
|
+
end # spec
|