gemspec 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +2 -0
- data/Gemfile +4 -0
- data/LICENSES/.info +1 -0
- data/LICENSES/MIT +9 -0
- data/README.md +26 -0
- data/Rakefile +0 -0
- data/VERSION +1 -0
- data/VERSIONING.md +18 -0
- data/VERSION_FOR_HUMANS +1 -0
- data/gemspec.gemspec +33 -0
- data/lib/gemspec.rb +46 -0
- data/lib/gemspec/HUMAN_VERSION +1 -0
- data/lib/gemspec/VERSION +1 -0
- data/lib/gemspec/VERSION_FOR_HUMANS +1 -0
- data/lib/gemspec/base_dirname.rb +9 -0
- data/lib/gemspec/bootstrap_lib.rb +75 -0
- data/lib/gemspec/camelize.rb +13 -0
- data/lib/gemspec/git.rb +35 -0
- data/lib/gemspec/version.rb +4 -0
- data/lib/super_hash.rb +51 -0
- data/rakelib/gem.rake +13 -0
- data/rakelib/license.rake +19 -0
- data/share/gemspec/licenses/AAL +27 -0
- data/share/gemspec/licenses/ADSL +5 -0
- data/share/gemspec/licenses/AFL-1.1 +17 -0
- data/share/gemspec/licenses/AFL-1.2 +21 -0
- data/share/gemspec/licenses/AFL-2.0 +30 -0
- data/share/gemspec/licenses/AFL-2.1 +30 -0
- data/share/gemspec/licenses/AFL-3.0 +28 -0
- data/share/gemspec/licenses/AGPL-1.0 +51 -0
- data/share/gemspec/licenses/AGPL-3.0 +141 -0
- data/share/gemspec/licenses/AMDPLPA +14 -0
- data/share/gemspec/licenses/AML +9 -0
- data/share/gemspec/licenses/AMPAS +11 -0
- data/share/gemspec/licenses/ANTLR-PD +7 -0
- data/share/gemspec/licenses/APAFML +6 -0
- data/share/gemspec/licenses/APL-1.0 +188 -0
- data/share/gemspec/licenses/APSL-1.0 +74 -0
- data/share/gemspec/licenses/APSL-1.1 +63 -0
- data/share/gemspec/licenses/APSL-1.2 +60 -0
- data/share/gemspec/licenses/APSL-2.0 +60 -0
- data/share/gemspec/licenses/Abstyles +11 -0
- data/share/gemspec/licenses/Adobe-2006 +11 -0
- data/share/gemspec/licenses/Adobe-Glyph +10 -0
- data/share/gemspec/licenses/Afmparse +10 -0
- data/share/gemspec/licenses/Aladdin +43 -0
- data/share/gemspec/licenses/Apache-1.0 +36 -0
- data/share/gemspec/licenses/Apache-1.1 +33 -0
- data/share/gemspec/licenses/Apache-2.0 +59 -0
- data/share/gemspec/licenses/Artistic-1.0 +32 -0
- data/share/gemspec/licenses/Artistic-1.0-Perl +33 -0
- data/share/gemspec/licenses/Artistic-1.0-cl8 +33 -0
- data/share/gemspec/licenses/Artistic-2.0 +49 -0
- data/share/gemspec/licenses/BSD-2-Clause +15 -0
- data/share/gemspec/licenses/BSD-2-Clause-FreeBSD +11 -0
- data/share/gemspec/licenses/BSD-2-Clause-NetBSD +16 -0
- data/share/gemspec/licenses/BSD-3-Clause +18 -0
- data/share/gemspec/licenses/BSD-3-Clause-Attribution +5 -0
- data/share/gemspec/licenses/BSD-3-Clause-Clear +23 -0
- data/share/gemspec/licenses/BSD-3-Clause-LBNL +11 -0
- data/share/gemspec/licenses/BSD-4-Clause +22 -0
- data/share/gemspec/licenses/BSD-4-Clause-UC +12 -0
- data/share/gemspec/licenses/BSD-Protection +39 -0
- data/share/gemspec/licenses/BSL-1.0 +11 -0
- data/share/gemspec/licenses/Bahyph +10 -0
- data/share/gemspec/licenses/Barr +5 -0
- data/share/gemspec/licenses/Beerware +5 -0
- data/share/gemspec/licenses/BitTorrent-1.0 +136 -0
- data/share/gemspec/licenses/BitTorrent-1.1 +77 -0
- data/share/gemspec/licenses/Borceux +21 -0
- data/share/gemspec/licenses/CATOSL-1.1 +65 -0
- data/share/gemspec/licenses/CC-BY-1.0 +48 -0
- data/share/gemspec/licenses/CC-BY-2.0 +48 -0
- data/share/gemspec/licenses/CC-BY-2.5 +48 -0
- data/share/gemspec/licenses/CC-BY-3.0 +54 -0
- data/share/gemspec/licenses/CC-BY-4.0 +89 -0
- data/share/gemspec/licenses/CC-BY-NC-1.0 +45 -0
- data/share/gemspec/licenses/CC-BY-NC-2.0 +48 -0
- data/share/gemspec/licenses/CC-BY-NC-2.5 +48 -0
- data/share/gemspec/licenses/CC-BY-NC-3.0 +55 -0
- data/share/gemspec/licenses/CC-BY-NC-4.0 +90 -0
- data/share/gemspec/licenses/CC-BY-NC-ND-1.0 +45 -0
- data/share/gemspec/licenses/CC-BY-NC-ND-2.0 +46 -0
- data/share/gemspec/licenses/CC-BY-NC-ND-2.5 +46 -0
- data/share/gemspec/licenses/CC-BY-NC-ND-3.0 +52 -0
- data/share/gemspec/licenses/CC-BY-NC-ND-4.0 +89 -0
- data/share/gemspec/licenses/CC-BY-NC-SA-1.0 +49 -0
- data/share/gemspec/licenses/CC-BY-NC-SA-2.0 +51 -0
- data/share/gemspec/licenses/CC-BY-NC-SA-2.5 +51 -0
- data/share/gemspec/licenses/CC-BY-NC-SA-3.0 +57 -0
- data/share/gemspec/licenses/CC-BY-NC-SA-4.0 +96 -0
- data/share/gemspec/licenses/CC-BY-ND-1.0 +44 -0
- data/share/gemspec/licenses/CC-BY-ND-2.0 +45 -0
- data/share/gemspec/licenses/CC-BY-ND-2.5 +45 -0
- data/share/gemspec/licenses/CC-BY-ND-3.0 +51 -0
- data/share/gemspec/licenses/CC-BY-ND-4.0 +88 -0
- data/share/gemspec/licenses/CC-BY-SA-1.0 +48 -0
- data/share/gemspec/licenses/CC-BY-SA-2.0 +50 -0
- data/share/gemspec/licenses/CC-BY-SA-2.5 +50 -0
- data/share/gemspec/licenses/CC-BY-SA-3.0 +57 -0
- data/share/gemspec/licenses/CC-BY-SA-4.0 +97 -0
- data/share/gemspec/licenses/CC0-1.0 +28 -0
- data/share/gemspec/licenses/CDDL-1.0 +70 -0
- data/share/gemspec/licenses/CDDL-1.1 +73 -0
- data/share/gemspec/licenses/CECILL-1.0 +130 -0
- data/share/gemspec/licenses/CECILL-1.1 +124 -0
- data/share/gemspec/licenses/CECILL-2.0 +127 -0
- data/share/gemspec/licenses/CECILL-B +129 -0
- data/share/gemspec/licenses/CECILL-C +128 -0
- data/share/gemspec/licenses/CNRI-Python +17 -0
- data/share/gemspec/licenses/CNRI-Python-GPL-Compatible +16 -0
- data/share/gemspec/licenses/CPAL-1.0 +113 -0
- data/share/gemspec/licenses/CPL-1.0 +48 -0
- data/share/gemspec/licenses/CPOL-1.02 +56 -0
- data/share/gemspec/licenses/CUA-OPL-1.0 +91 -0
- data/share/gemspec/licenses/Caldera +19 -0
- data/share/gemspec/licenses/ClArtistic +35 -0
- data/share/gemspec/licenses/Condor-1.1 +29 -0
- data/share/gemspec/licenses/Crossword +9 -0
- data/share/gemspec/licenses/Cube +13 -0
- data/share/gemspec/licenses/D-FSL-1.0 +93 -0
- data/share/gemspec/licenses/DOC +12 -0
- data/share/gemspec/licenses/DSDP +14 -0
- data/share/gemspec/licenses/Dotseqn +7 -0
- data/share/gemspec/licenses/ECL-1.0 +19 -0
- data/share/gemspec/licenses/ECL-2.0 +65 -0
- data/share/gemspec/licenses/EFL-1.0 +11 -0
- data/share/gemspec/licenses/EFL-2.0 +10 -0
- data/share/gemspec/licenses/EPL-1.0 +48 -0
- data/share/gemspec/licenses/EUDatagrid +18 -0
- data/share/gemspec/licenses/EUPL-1.0 +84 -0
- data/share/gemspec/licenses/EUPL-1.1 +85 -0
- data/share/gemspec/licenses/Entessa +16 -0
- data/share/gemspec/licenses/ErlPL-1.1 +67 -0
- data/share/gemspec/licenses/Eurosym +14 -0
- data/share/gemspec/licenses/FSFUL +6 -0
- data/share/gemspec/licenses/FSFULLR +6 -0
- data/share/gemspec/licenses/FTL +44 -0
- data/share/gemspec/licenses/Fair +9 -0
- data/share/gemspec/licenses/Frameworx-1.0 +40 -0
- data/share/gemspec/licenses/FreeImage +75 -0
- data/share/gemspec/licenses/GFDL-1.1 +77 -0
- data/share/gemspec/licenses/GFDL-1.2 +88 -0
- data/share/gemspec/licenses/GFDL-1.3 +91 -0
- data/share/gemspec/licenses/GL2PS +11 -0
- data/share/gemspec/licenses/GPL-1.0 +61 -0
- data/share/gemspec/licenses/GPL-1.0+ +210 -0
- data/share/gemspec/licenses/GPL-2.0 +70 -0
- data/share/gemspec/licenses/GPL-2.0+ +88 -0
- data/share/gemspec/licenses/GPL-2.0-with-GCC-exception +7 -0
- data/share/gemspec/licenses/GPL-2.0-with-autoconf-exception +9 -0
- data/share/gemspec/licenses/GPL-2.0-with-bison-exception +7 -0
- data/share/gemspec/licenses/GPL-2.0-with-classpath-exception +8 -0
- data/share/gemspec/licenses/GPL-2.0-with-font-exception +7 -0
- data/share/gemspec/licenses/GPL-3.0 +137 -0
- data/share/gemspec/licenses/GPL-3.0+ +145 -0
- data/share/gemspec/licenses/GPL-3.0-with-GCC-exception +24 -0
- data/share/gemspec/licenses/GPL-3.0-with-autoconf-exception +19 -0
- data/share/gemspec/licenses/Giftware +9 -0
- data/share/gemspec/licenses/Glide +52 -0
- data/share/gemspec/licenses/Glulxe +6 -0
- data/share/gemspec/licenses/HPND +8 -0
- data/share/gemspec/licenses/HaskellReport +8 -0
- data/share/gemspec/licenses/IBM-pibs +9 -0
- data/share/gemspec/licenses/ICU +11 -0
- data/share/gemspec/licenses/IJG +26 -0
- data/share/gemspec/licenses/IPA +46 -0
- data/share/gemspec/licenses/IPL-1.0 +191 -0
- data/share/gemspec/licenses/ISC +9 -0
- data/share/gemspec/licenses/ImageMagick +62 -0
- data/share/gemspec/licenses/Imlib2 +9 -0
- data/share/gemspec/licenses/Intel +12 -0
- data/share/gemspec/licenses/Intel-ACPI +22 -0
- data/share/gemspec/licenses/JSON +10 -0
- data/share/gemspec/licenses/JasPer-2.0 +15 -0
- data/share/gemspec/licenses/LGPL-2.0 +100 -0
- data/share/gemspec/licenses/LGPL-2.0+ +110 -0
- data/share/gemspec/licenses/LGPL-2.1 +101 -0
- data/share/gemspec/licenses/LGPL-2.1+ +110 -0
- data/share/gemspec/licenses/LGPL-3.0 +44 -0
- data/share/gemspec/licenses/LGPL-3.0+ +44 -0
- data/share/gemspec/licenses/LPL-1.0 +64 -0
- data/share/gemspec/licenses/LPL-1.02 +50 -0
- data/share/gemspec/licenses/LPPL-1.0 +67 -0
- data/share/gemspec/licenses/LPPL-1.1 +95 -0
- data/share/gemspec/licenses/LPPL-1.2 +93 -0
- data/share/gemspec/licenses/LPPL-1.3a +119 -0
- data/share/gemspec/licenses/LPPL-1.3c +120 -0
- data/share/gemspec/licenses/Latex2e +10 -0
- data/share/gemspec/licenses/Leptonica +10 -0
- data/share/gemspec/licenses/Libpng +53 -0
- data/share/gemspec/licenses/MIT +9 -0
- data/share/gemspec/licenses/MIT-CMU +9 -0
- data/share/gemspec/licenses/MIT-advertising +8 -0
- data/share/gemspec/licenses/MIT-enna +9 -0
- data/share/gemspec/licenses/MIT-feh +7 -0
- data/share/gemspec/licenses/MITNFA +8 -0
- data/share/gemspec/licenses/MPL-1.0 +84 -0
- data/share/gemspec/licenses/MPL-1.1 +98 -0
- data/share/gemspec/licenses/MPL-2.0 +87 -0
- data/share/gemspec/licenses/MPL-2.0-no-copyleft-exception +298 -0
- data/share/gemspec/licenses/MS-PL +17 -0
- data/share/gemspec/licenses/MS-RL +21 -0
- data/share/gemspec/licenses/MTLL +22 -0
- data/share/gemspec/licenses/MakeIndex +17 -0
- data/share/gemspec/licenses/MirOS +25 -0
- data/share/gemspec/licenses/Motosoto +60 -0
- data/share/gemspec/licenses/Multics +12 -0
- data/share/gemspec/licenses/Mup +11 -0
- data/share/gemspec/licenses/NASA-1.3 +52 -0
- data/share/gemspec/licenses/NBPL-1.0 +34 -0
- data/share/gemspec/licenses/NCSA +18 -0
- data/share/gemspec/licenses/NGPL +25 -0
- data/share/gemspec/licenses/NLPL +14 -0
- data/share/gemspec/licenses/NOSL +104 -0
- data/share/gemspec/licenses/NPL-1.0 +70 -0
- data/share/gemspec/licenses/NPL-1.1 +116 -0
- data/share/gemspec/licenses/NPOSL-3.0 +34 -0
- data/share/gemspec/licenses/NRL +20 -0
- data/share/gemspec/licenses/NTP +13 -0
- data/share/gemspec/licenses/Naumen +15 -0
- data/share/gemspec/licenses/NetCDF +8 -0
- data/share/gemspec/licenses/Newsletr +8 -0
- data/share/gemspec/licenses/Nokia +92 -0
- data/share/gemspec/licenses/Noweb +9 -0
- data/share/gemspec/licenses/Nunit +12 -0
- data/share/gemspec/licenses/OCLC-2.0 +50 -0
- data/share/gemspec/licenses/ODbL-1.0 +126 -0
- data/share/gemspec/licenses/OFL-1.0 +31 -0
- data/share/gemspec/licenses/OFL-1.1 +26 -0
- data/share/gemspec/licenses/OGTSL +32 -0
- data/share/gemspec/licenses/OLDAP-1.1 +35 -0
- data/share/gemspec/licenses/OLDAP-1.2 +35 -0
- data/share/gemspec/licenses/OLDAP-1.3 +36 -0
- data/share/gemspec/licenses/OLDAP-1.4 +36 -0
- data/share/gemspec/licenses/OLDAP-2.0 +14 -0
- data/share/gemspec/licenses/OLDAP-2.0.1 +14 -0
- data/share/gemspec/licenses/OLDAP-2.1 +15 -0
- data/share/gemspec/licenses/OLDAP-2.2 +16 -0
- data/share/gemspec/licenses/OLDAP-2.2.1 +16 -0
- data/share/gemspec/licenses/OLDAP-2.2.2 +17 -0
- data/share/gemspec/licenses/OLDAP-2.3 +17 -0
- data/share/gemspec/licenses/OLDAP-2.4 +16 -0
- data/share/gemspec/licenses/OLDAP-2.5 +16 -0
- data/share/gemspec/licenses/OLDAP-2.6 +15 -0
- data/share/gemspec/licenses/OLDAP-2.7 +15 -0
- data/share/gemspec/licenses/OLDAP-2.8 +15 -0
- data/share/gemspec/licenses/OML +7 -0
- data/share/gemspec/licenses/OPL-1.0 +74 -0
- data/share/gemspec/licenses/OSL-1.0 +27 -0
- data/share/gemspec/licenses/OSL-1.1 +28 -0
- data/share/gemspec/licenses/OSL-2.0 +28 -0
- data/share/gemspec/licenses/OSL-2.1 +28 -0
- data/share/gemspec/licenses/OSL-3.0 +28 -0
- data/share/gemspec/licenses/OpenSSL +30 -0
- data/share/gemspec/licenses/PDDL-1.0 +73 -0
- data/share/gemspec/licenses/PHP-3.0 +19 -0
- data/share/gemspec/licenses/PHP-3.01 +18 -0
- data/share/gemspec/licenses/Plexus +13 -0
- data/share/gemspec/licenses/PostgreSQL +11 -0
- data/share/gemspec/licenses/Python-2.0 +42 -0
- data/share/gemspec/licenses/QPL-1.0 +30 -0
- data/share/gemspec/licenses/Qhull +13 -0
- data/share/gemspec/licenses/RHeCos-1.1 +73 -0
- data/share/gemspec/licenses/RPL-1.1 +100 -0
- data/share/gemspec/licenses/RPL-1.5 +90 -0
- data/share/gemspec/licenses/RPSL-1.0 +120 -0
- data/share/gemspec/licenses/RSCPL +79 -0
- data/share/gemspec/licenses/Rdisc +12 -0
- data/share/gemspec/licenses/Ruby +19 -0
- data/share/gemspec/licenses/SAX-PD +21 -0
- data/share/gemspec/licenses/SCEA +36 -0
- data/share/gemspec/licenses/SGI-B-1.0 +52 -0
- data/share/gemspec/licenses/SGI-B-1.1 +53 -0
- data/share/gemspec/licenses/SGI-B-2.0 +11 -0
- data/share/gemspec/licenses/SISSL +88 -0
- data/share/gemspec/licenses/SISSL-1.2 +87 -0
- data/share/gemspec/licenses/SMLNJ +8 -0
- data/share/gemspec/licenses/SNIA +73 -0
- data/share/gemspec/licenses/SPL-1.0 +81 -0
- data/share/gemspec/licenses/SWL +8 -0
- data/share/gemspec/licenses/Saxpath +15 -0
- data/share/gemspec/licenses/SimPL-2.0 +27 -0
- data/share/gemspec/licenses/Sleepycat +24 -0
- data/share/gemspec/licenses/StandardML-NJ +8 -0
- data/share/gemspec/licenses/SugarCRM-1.1.3 +94 -0
- data/share/gemspec/licenses/TCL +9 -0
- data/share/gemspec/licenses/TMate +15 -0
- data/share/gemspec/licenses/TORQUE-1.1 +20 -0
- data/share/gemspec/licenses/TOSL +10 -0
- data/share/gemspec/licenses/Unicode-TOU +30 -0
- data/share/gemspec/licenses/Unlicense +10 -0
- data/share/gemspec/licenses/VOSTROM +5 -0
- data/share/gemspec/licenses/VSL-1.0 +14 -0
- data/share/gemspec/licenses/Vim +21 -0
- data/share/gemspec/licenses/W3C +19 -0
- data/share/gemspec/licenses/W3C-19980720 +16 -0
- data/share/gemspec/licenses/WTFPL +11 -0
- data/share/gemspec/licenses/WXwindows +17 -0
- data/share/gemspec/licenses/Watcom-1.0 +62 -0
- data/share/gemspec/licenses/Wsuipa +7 -0
- data/share/gemspec/licenses/X11 +11 -0
- data/share/gemspec/licenses/XFree86-1.1 +13 -0
- data/share/gemspec/licenses/XSkat +11 -0
- data/share/gemspec/licenses/Xerox +7 -0
- data/share/gemspec/licenses/Xnet +10 -0
- data/share/gemspec/licenses/YPL-1.0 +30 -0
- data/share/gemspec/licenses/YPL-1.1 +30 -0
- data/share/gemspec/licenses/ZPL-1.1 +21 -0
- data/share/gemspec/licenses/ZPL-2.0 +16 -0
- data/share/gemspec/licenses/ZPL-2.1 +15 -0
- data/share/gemspec/licenses/Zed +7 -0
- data/share/gemspec/licenses/Zend-2.0 +14 -0
- data/share/gemspec/licenses/Zimbra-1.3 +30 -0
- data/share/gemspec/licenses/Zimbra-1.4 +31 -0
- data/share/gemspec/licenses/Zlib +10 -0
- data/share/gemspec/licenses/bzip2-1.0.5 +14 -0
- data/share/gemspec/licenses/bzip2-1.0.6 +12 -0
- data/share/gemspec/licenses/diffmark +6 -0
- data/share/gemspec/licenses/dvipdfm +5 -0
- data/share/gemspec/licenses/eCos-2.0 +13 -0
- data/share/gemspec/licenses/eGenix +31 -0
- data/share/gemspec/licenses/gSOAP-1.3b +102 -0
- data/share/gemspec/licenses/gnuplot +13 -0
- data/share/gemspec/licenses/iMatix +25 -0
- data/share/gemspec/licenses/libtiff +9 -0
- data/share/gemspec/licenses/mpich2 +14 -0
- data/share/gemspec/licenses/psfrag +8 -0
- data/share/gemspec/licenses/psutils +26 -0
- data/share/gemspec/licenses/txt +0 -0
- data/share/gemspec/licenses/xinetd +18 -0
- data/share/gemspec/licenses/xpp +15 -0
- data/share/gemspec/licenses/zlib-acknowledgement +13 -0
- data/share/gemspec/templates/bare/gemspec.gemspec +33 -0
- data/share/gemspec/templates/init/Gemfile +5 -0
- data/share/gemspec/templates/init/VERSIONING.md +18 -0
- data/share/gemspec/templates/init/gemspec.gemspec +33 -0
- data/share/gemspec/templates/init/rakelib/gem.rake +13 -0
- data/share/gemspec/templates/init/rakelib/license.rake +19 -0
- data/share/gemspec/templates/init/rakelib/test.rake +7 -0
- data/share/gemspec/templates/init/test/minitest_helper.rb +7 -0
- data/share/gemspec/templates/init/test/test_spec.rb +11 -0
- data/share/gemspec/templates/init/test/test_test.rb +11 -0
- data/share/gemspec/templates/rspec/.rspec +2 -0
- data/share/gemspec/templates/rspec/rakelib/spec.rake +3 -0
- data/share/gemspec/templates/rspec/spec/spec_helper.rb +4 -0
- data/share/gemspec/templates/rspec/spec/spec_spec.rb +0 -0
- metadata +463 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 6703d9a6209f017896a24cb5611385a3d2aac0a8
|
4
|
+
data.tar.gz: bddb090732e5bad00b9d407fb5b30aa3bb35d146
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 623760ee54ff5b7ee941774bd862eee71dc0eb821bf7317b2f128bfebcc547c213171c996a6e3fadcaa853d2dcd09362e01f71ddccef325e0d92f436f05798f2
|
7
|
+
data.tar.gz: 266f6377fd0b7125e8f2816e48ef93443b92bd070790f5898317cd2d3d4a095fc2717299c6d0ef8a72d5af10eec83d2c559289b6b723e6fcc3eb984c780e7e21
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSES/.info
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
This directory contains the licenses you can use with this gem
|
data/LICENSES/MIT
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
|
2
|
+
MIT License
|
3
|
+
Copyright (c) <year> <copyright holders>
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
6
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
7
|
+
|
8
|
+
There is no standard license header for the license
|
9
|
+
|
data/README.md
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
# Gemspec
|
2
|
+
|
3
|
+
Gemspec is a convention-over-configuration library for creating gems.
|
4
|
+
|
5
|
+
## Gemspec::boilerplate
|
6
|
+
The main functionality of the libary is the `Gemspec::boilerplate` method, which when called with a `Gem::Specification`
|
7
|
+
as its argument, adds standard boilerplate to your gemspec.
|
8
|
+
|
9
|
+
It assumes you're using `Git`, and it infers most of the gemspec boilerplate from:
|
10
|
+
|
11
|
+
1) the name\* of your gem, which defaults to the name of your project's directory
|
12
|
+
2) your git data
|
13
|
+
|
14
|
+
Additionally, it:
|
15
|
+
|
16
|
+
1) `git init`s your project directory unless it's already been initialized
|
17
|
+
2) scaffolds out the files and directories your `lib` folder should contain based on your project's name,
|
18
|
+
unless those files and directories already exist.
|
19
|
+
|
20
|
+
\*The naming convetions it uses are those laid out in http://guides.rubygems.org/name-your-gem/.
|
21
|
+
|
22
|
+
## Usage
|
23
|
+
|
24
|
+
gem install gemspec
|
25
|
+
|
26
|
+
|
data/Rakefile
ADDED
File without changes
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
lib/gemspec/VERSION
|
data/VERSIONING.md
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
## Versioning
|
2
|
+
### Version Number for Machines
|
3
|
+
|
4
|
+
This gem uses a slightly modified version of the **SemVer** specification, namely:
|
5
|
+
```ruby
|
6
|
+
spec.version = "BREAKING.PATCHES.NONBREAKING"
|
7
|
+
```
|
8
|
+
You can use this versioning with your dependency tools, only you have a somewhat stronger guarantee that your
|
9
|
+
code won't break if you limit yourself to the third number, but you need to allow second level updates in order to
|
10
|
+
get (security and other) patches.
|
11
|
+
|
12
|
+
### Version Number for Humans
|
13
|
+
Since the above-described type of versioning doesn't tell you anything about the functional state of the gem (you can go from a "hello world" to a full blown operating system
|
14
|
+
without making a breaking change, as long as your operating system prints "hello world" to the screen) (SemVer, when used correctly, doesn't tell anything about the functional state of a software package either), a second, human-friendly version number can be found in `spec.metadata[:human_version]`.
|
15
|
+
|
16
|
+
The magnitude of this version number shall be made to correspond to actual functional changes in the software. If I've worked a lot on the package, I'll make it move a lot, but unless I've made breaking changes, I'll stick to only moving the third number in the `spec.version` version.
|
17
|
+
|
18
|
+
This number is for you. If you see it increase a lot, it probably means much more new goodies, but is less strictly defined then the version number for the machine. (I reserve the right to later change the way I change this number).
|
data/VERSION_FOR_HUMANS
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
lib/gemspec/VERSION_FOR_HUMANS
|
data/gemspec.gemspec
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
#Naming utils, git utils, and default boilerplate
|
4
|
+
require 'gemspec'
|
5
|
+
|
6
|
+
#This is a place to put custom overrides to Gemspec.boilerplate
|
7
|
+
begin; require_relative 'gemspec.rb'; rescue LoadError; end
|
8
|
+
|
9
|
+
Gem::Specification.new do |s|
|
10
|
+
|
11
|
+
#Name is the name of the project root directory
|
12
|
+
s.name = Gemspec.base_dirname(__FILE__)
|
13
|
+
|
14
|
+
Gemspec.boilerplate(s)
|
15
|
+
|
16
|
+
#s.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com' to prevent pushes to rubygems.org, or delete to allow pushes to any server."
|
17
|
+
|
18
|
+
#####Must change
|
19
|
+
s.summary = %q{Gemspec aims to streamline and DRY up the creation of ruby packages AKA gems}
|
20
|
+
s.description = File.read('README.md')
|
21
|
+
s.licenses = %w[MIT]
|
22
|
+
|
23
|
+
|
24
|
+
#####Unlikely to change
|
25
|
+
s.email = [ `git config user.email` ]
|
26
|
+
s.homepage = "https://github.com/#{`git config github.username`}/#{s.name}.git"
|
27
|
+
###################################
|
28
|
+
|
29
|
+
s.add_dependency 'activesupport', '4.2.1'
|
30
|
+
s.add_dependency 'memoist', '0.12.0'
|
31
|
+
s.add_dependency 'rake', '~> 10.4'
|
32
|
+
|
33
|
+
end
|
data/lib/gemspec.rb
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
|
3
|
+
#Gemspec::boilerplate
|
4
|
+
# - adds standard boilerplate to its argument (assumed to be a Gem::Specification) based on the spec's name and git-provided data
|
5
|
+
# - if they don't exist, it scaffolds basic lib files which should exist for the spec name
|
6
|
+
|
7
|
+
require 'gemspec/bootstrap_lib'
|
8
|
+
require 'gemspec/camelize'
|
9
|
+
require 'gemspec/base_dirname'
|
10
|
+
require 'gemspec/git'
|
11
|
+
|
12
|
+
module Gemspec
|
13
|
+
module_function
|
14
|
+
|
15
|
+
#####These settings shouldn't change as long as you follow conventions
|
16
|
+
def boilerplate(s)
|
17
|
+
Dir.exist?('.git') || system('git', 'init', '.')
|
18
|
+
|
19
|
+
#Naming according to conventions
|
20
|
+
s.metadata["namespaced_path"] = s.name.tr('-', '/')
|
21
|
+
s.metadata["constant_name"] = camelize(s.metadata["namespaced_path"])
|
22
|
+
|
23
|
+
#Add lib to path so that the version file can be loaded
|
24
|
+
lib = File.expand_path('lib')
|
25
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
26
|
+
|
27
|
+
#Bootstrap the lib directory along with the basic *.rb files
|
28
|
+
#This won't overwrite existing files
|
29
|
+
Gemspec::bootstrap_lib!(s)
|
30
|
+
|
31
|
+
#Get VERSION and VERSION_FOR_HUMANS from the version file
|
32
|
+
require "#{s.metadata["namespaced_path"]}/version"
|
33
|
+
spec_module = Object.const_get(s.metadata["constant_name"])
|
34
|
+
s.version = spec_module::VERSION
|
35
|
+
s.metadata["human_version"] = spec_module::VERSION_FOR_HUMANS
|
36
|
+
|
37
|
+
#Specify common paths and files
|
38
|
+
s.test_files = Git::ls_files.grep(%r{^(test|s|features)/})
|
39
|
+
s.files = Git::ls_files.reject { |f| f.match(%r{^(test|s|features)/}) }
|
40
|
+
s.executables = s.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
41
|
+
s.require_paths = ["lib"]
|
42
|
+
|
43
|
+
#Authors are all committers or `git config user.name` if the former is empty
|
44
|
+
s.authors = Git::ls_authors
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
0.1.0
|
data/lib/gemspec/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.1.0
|
@@ -0,0 +1 @@
|
|
1
|
+
0.1.0
|
@@ -0,0 +1,75 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# -*- coding: utf-8 -*-
|
3
|
+
|
4
|
+
require 'yaml'
|
5
|
+
require 'erb'
|
6
|
+
require 'fileutils'
|
7
|
+
|
8
|
+
require 'memoist'
|
9
|
+
|
10
|
+
require 'gemspec/camelize'
|
11
|
+
|
12
|
+
module Gemspec
|
13
|
+
extend Memoist
|
14
|
+
|
15
|
+
module_function
|
16
|
+
|
17
|
+
def bootstrap_lib!(spec)
|
18
|
+
|
19
|
+
config = {}
|
20
|
+
config["constant_name"] = spec.metadata["constant_name"] || camelize(metadata["namespaced_path"])
|
21
|
+
config["namespaced_path"] = spec.metadata["namespaced_path"] || spec.name.tr('-', '/')
|
22
|
+
config["constant_array"] = config["constant_name"].split("::")
|
23
|
+
|
24
|
+
path = "lib/#{config["namespaced_path"]}"
|
25
|
+
versionfilerb = "#{path}/version.rb"
|
26
|
+
versionfile = "#{path}/VERSION"
|
27
|
+
human_versionfile = "#{path}/VERSION_FOR_HUMANS"
|
28
|
+
rbfile = "#{path}.rb"
|
29
|
+
|
30
|
+
FileUtils.mkdir_p path
|
31
|
+
|
32
|
+
template_write(rbfile, config, templates["newgem.tt"]) unless File.exist?(rbfile)
|
33
|
+
template_write(versionfilerb, config, templates["version.rb.tt"]) unless File.exist?(versionfilerb)
|
34
|
+
File.write(versionfile, '0.1.0') unless File.exist?(versionfile)
|
35
|
+
File.write(human_versionfile, '0.1.0') unless File.exist?(human_versionfile)
|
36
|
+
end
|
37
|
+
|
38
|
+
memoize def templates
|
39
|
+
ret = nil
|
40
|
+
File.open(__FILE__) do |this_file|
|
41
|
+
this_file.find { |line| line =~ /^__END__ *$/ }
|
42
|
+
ret = YAML.load(this_file.read)
|
43
|
+
end
|
44
|
+
return ret
|
45
|
+
end
|
46
|
+
|
47
|
+
def template_write(filename, config, template_str)
|
48
|
+
File.write(filename, ERB.new(template_str, nil,'-').result(binding))
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
__END__
|
53
|
+
---
|
54
|
+
newgem.tt: |
|
55
|
+
require "<%=config["namespaced_path"]%>/version"
|
56
|
+
<%- if config[:ext] -%>
|
57
|
+
require "<%=config["namespaced_path"]%>/<%=config["name"]%>"
|
58
|
+
<%- end -%>
|
59
|
+
|
60
|
+
<%- config["constant_array"].each_with_index do |c,i| -%>
|
61
|
+
<%= ' '*i %>module <%= c %>
|
62
|
+
<%- end -%>
|
63
|
+
<%= ' '*config["constant_array"].size %>
|
64
|
+
<%- (config["constant_array"].size-1).downto(0) do |i| -%>
|
65
|
+
<%= ' '*i %>end
|
66
|
+
<%- end -%>
|
67
|
+
version.rb.tt: |
|
68
|
+
<%- config["constant_array"].each_with_index do |c,i| -%>
|
69
|
+
<%= ' '*i %>module <%= c %>
|
70
|
+
<%- end -%>
|
71
|
+
<%= ' '*config["constant_array"].size %>VERSION = File.read(File.expand_path("../VERSION", __FILE__))
|
72
|
+
<%= ' '*config["constant_array"].size %>VERSION_FOR_HUMANS = File.read(File.expand_path("../VERSION_FOR_HUMANS", __FILE__))
|
73
|
+
<%- (config["constant_array"].size-1).downto(0) do |i| -%>
|
74
|
+
<%= ' '*i %>end
|
75
|
+
<%- end -%>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
|
3
|
+
require 'forwardable'
|
4
|
+
require 'active_support/inflector/methods'
|
5
|
+
|
6
|
+
module Gemspec
|
7
|
+
module CamelizeMethod
|
8
|
+
extend Forwardable
|
9
|
+
def_delegators ::ActiveSupport::Inflector, :camelize
|
10
|
+
end
|
11
|
+
extend CamelizeMethod
|
12
|
+
end
|
13
|
+
|
data/lib/gemspec/git.rb
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
|
3
|
+
require 'memoist'
|
4
|
+
require 'super_hash'
|
5
|
+
|
6
|
+
Dir.exist?('.git') || system(*%w[git init .])
|
7
|
+
module Gemspec
|
8
|
+
module Git
|
9
|
+
extend Memoist
|
10
|
+
module_function
|
11
|
+
|
12
|
+
memoize def ls_files
|
13
|
+
`git ls-files -z`.split("\x0")
|
14
|
+
end
|
15
|
+
|
16
|
+
memoize def config
|
17
|
+
cmd = %w[git config --list]
|
18
|
+
config = SuperHash.new
|
19
|
+
IO.popen(cmd).each do |line|
|
20
|
+
line.chomp!
|
21
|
+
path, _, value = line.partition("=")
|
22
|
+
path = path.split(".").map(&:to_sym)
|
23
|
+
path, assign = path[0...-1], path[-1]
|
24
|
+
(path.reduce(config) {|acc,key| acc[key] })[assign] = value
|
25
|
+
end
|
26
|
+
config
|
27
|
+
end
|
28
|
+
|
29
|
+
memoize def ls_authors
|
30
|
+
authors = `git log > /dev/null 2>&1 && git shortlog -sn`.split("\n").map {|a| a.sub(/^[\d\s]*/, '') }
|
31
|
+
authors = (authors.empty? && [ `git config user.name` ]) || authors
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
data/lib/super_hash.rb
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# -*- coding: utf-8 -*-
|
3
|
+
|
4
|
+
# SuperHash is very much like OpenStruct except that it creates whole paths instead of just keys
|
5
|
+
#SuperHash is a hash whose default value defaults to another instance of SuperHash
|
6
|
+
#which allows for chaining:
|
7
|
+
# super_hash[:x][:y][:z] will create the :x, :y, and :z sub-superhashes
|
8
|
+
#Assignment creates signleton accessor methods
|
9
|
+
# super_hash[:x] = 42
|
10
|
+
# super_hash.respond_to? :x == true
|
11
|
+
# super_hash.respond_to? :x= == true
|
12
|
+
#Since a bare:
|
13
|
+
# super_hash[:x]
|
14
|
+
#*assigns* another superhash if no :x key is found, this alone results in:
|
15
|
+
# super_hash.respond_to?(:x) == true
|
16
|
+
# super_hash.respond_to?(:x=) == true
|
17
|
+
#method_missing delegates to either :[] or :[]= (depeding on whether the method name ends with =)
|
18
|
+
#so either eventually results in a singleton method definition and you can use dots instead
|
19
|
+
#of [] like in JavaScript
|
20
|
+
# super_hash.x.y.z = 42 #This creates the whole chain of hashes and the accessor methods
|
21
|
+
|
22
|
+
class SuperHash < Hash
|
23
|
+
def initialize(*args)
|
24
|
+
super(*args) { |hash,key|
|
25
|
+
hash[key] = SuperHash.new
|
26
|
+
}
|
27
|
+
end
|
28
|
+
#Assignment defines accessor methods
|
29
|
+
def []=(key, val)
|
30
|
+
this = self
|
31
|
+
unless respond_to?(key)
|
32
|
+
self.define_singleton_method(key) do
|
33
|
+
this[key]
|
34
|
+
end
|
35
|
+
end
|
36
|
+
unless respond_to?("#{key}=".to_sym)
|
37
|
+
self.define_singleton_method("#{key}=".to_sym) do |v|
|
38
|
+
this[key] = v
|
39
|
+
end
|
40
|
+
end
|
41
|
+
return super(key, val)
|
42
|
+
end
|
43
|
+
|
44
|
+
def method_missing(key, *args)
|
45
|
+
if /=$/ === key
|
46
|
+
key = key.to_s.sub(/=$/,'').to_sym
|
47
|
+
return public_send :[]=, key, *args
|
48
|
+
end
|
49
|
+
return public_send :[], key, *args
|
50
|
+
end
|
51
|
+
end
|
data/rakelib/gem.rake
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'rubygems/package_task'
|
2
|
+
$:.unshift(File.expand_path('../lib',__FILE__))
|
3
|
+
|
4
|
+
$gemspec = Gem::Specification.load(Dir["*.gemspec"][0])
|
5
|
+
files = Rake::FileList.new(Gemspec::Git.ls_files)
|
6
|
+
|
7
|
+
Gem::PackageTask.new($gemspec) { }
|
8
|
+
task :gem => :chmod
|
9
|
+
task :chmod do
|
10
|
+
files.each do |file|
|
11
|
+
chmod 'o+r', file unless File.world_readable?(file)
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
directory "LICENSES"
|
2
|
+
$gemspec = Gem::Specification.load(Dir["*.gemspec"][0])
|
3
|
+
|
4
|
+
file "LICENSES/.info" => "gemspec.gemspec" do |t|
|
5
|
+
mkdir_p "LICENSES"
|
6
|
+
|
7
|
+
licenses_dir = File.expand_path('../../share/gemspec/licenses/', `gem which gemspec`.chomp)
|
8
|
+
$? == 0 or licenses_dir = File.expand_path('licenses/')
|
9
|
+
|
10
|
+
$gemspec.licenses.each do |license|
|
11
|
+
cp File.join(licenses_dir, license), "LICENSES/#{Shellwords.escape license}"
|
12
|
+
end
|
13
|
+
File.write(t.name, "This directory contains the licenses you can use with this gem\n")
|
14
|
+
end
|
15
|
+
|
16
|
+
desc "Fill LICENSES/ with licenses according to gemspec.gemspec and view them"
|
17
|
+
task 'license' => 'LICENSES/.info' do
|
18
|
+
sh "cd LICENSES/; less *"
|
19
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
|
2
|
+
Attribution Assurance License
|
3
|
+
Copyright (c)
|
4
|
+
2002 by AUTHOR PROFESSIONAL IDENTIFICATION * URL "PROMOTIONAL SLOGAN FOR AUTHOR'S PROFESSIONAL PRACTICE"
|
5
|
+
|
6
|
+
All Rights Reserved
|
7
|
+
ATTRIBUTION ASSURANCE LICENSE (adapted from the original BSD license)
|
8
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the conditions below are met. These conditions require a modest attribution to
|
9
|
+
<AUTHOR>
|
10
|
+
(the "Author"), who hopes that its promotional value may help justify the thousands of dollars in otherwise billable time invested in writing this and other freely available, open-source software.
|
11
|
+
1. Redistributions of source code, in whole or part and with or without modification (the "Code"), must prominently display this GPG-signed text in verifiable form.
|
12
|
+
2. Redistributions of the Code in binary form must be accompanied by this GPG-signed text in any documentation and, each time the resulting executable program or a program dependent thereon is launched, a prominent display (e.g., splash screen or banner text) of the Author's attribution information, which includes:
|
13
|
+
(a)
|
14
|
+
Name
|
15
|
+
("AUTHOR"),
|
16
|
+
(b)
|
17
|
+
Professional identification
|
18
|
+
("PROFESSIONAL IDENTIFICATION"), and
|
19
|
+
(c)
|
20
|
+
URL
|
21
|
+
("URL").
|
22
|
+
3. Neither the name nor any trademark of the Author may be used to endorse or promote products derived from this software without specific prior written permission.
|
23
|
+
4. Users are entirely responsible, to the exclusion of the Author and any other persons, for compliance with (1) regulations set by owners or administrators of employed equipment, (2) licensing terms of any other software, and (3) local regulations regarding use, including those regarding import, export, and use of encryption software.
|
24
|
+
THIS FREE SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR ANY CONTRIBUTOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, EFFECTS OF UNAUTHORIZED OR MALICIOUS NETWORK ACCESS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
25
|
+
|
26
|
+
There is no standard license header for the license
|
27
|
+
|