[FIX] Added a OHCOUNT_ROOT global so that included libs always work. We can now run...
authorJason Allen <jason@Macintosh-2.local>
Wed, 9 Jul 2008 01:29:37 +0000 (18:29 -0700)
committerJason Allen <jason@Macintosh-2.local>
Wed, 9 Jul 2008 01:29:37 +0000 (18:29 -0700)
commit32b8775b009de9d239164d3cc6d90cb12be2a4c5
tree23861797bcb709fde5d7f66bd13c7ceeedfeade6
parent6f1f0318fd023239d33f93651669587fde208981
[FIX] Added a OHCOUNT_ROOT global so that included libs always work. We can now run tests just by calling 'ruby test/unit/xxx.rb'
[FIX] Added an exception to be thrown on Ohcount::parse if the polyglot passed is nil
[NEW] Ported the ohloh LicenseSniffer to ohcount. Made it easy to add/edit test files.
167 files changed:
bin/ohcount
ext/ohcount_native/ruby_binding.c
lib/licenses/license.rb [new file with mode: 0644]
lib/licenses/license_map.rb [new file with mode: 0644]
lib/licenses/license_sniffer.rb [new file with mode: 0644]
lib/ohcount.rb
lib/ohcount/diff.rb
lib/ohcount/parser.rb
test/expected_licenses/academic_t1 [new file with mode: 0644]
test/expected_licenses/adaptive_t1 [new file with mode: 0644]
test/expected_licenses/apache_2_t1 [new file with mode: 0644]
test/expected_licenses/apache_2_t2 [new file with mode: 0644]
test/expected_licenses/apache_ish_t1 [new file with mode: 0644]
test/expected_licenses/apache_ish_t2 [new file with mode: 0644]
test/expected_licenses/apache_t1 [new file with mode: 0644]
test/expected_licenses/apache_t2 [new file with mode: 0644]
test/expected_licenses/apache_t3 [new file with mode: 0644]
test/expected_licenses/apple_open_source_t1 [new file with mode: 0644]
test/expected_licenses/artistic_t1 [new file with mode: 0644]
test/expected_licenses/attribution_assurance_t1 [new file with mode: 0644]
test/expected_licenses/bsd_2clause_ish_t1 [new file with mode: 0644]
test/expected_licenses/bsd_ish_t1 [new file with mode: 0644]
test/expected_licenses/bsd_ish_t2 [new file with mode: 0644]
test/expected_licenses/bsd_ish_t3 [new file with mode: 0644]
test/expected_licenses/bsd_t1 [new file with mode: 0644]
test/expected_licenses/common_development_and_distribution_t1 [new file with mode: 0644]
test/expected_licenses/common_public_t1 [new file with mode: 0644]
test/expected_licenses/computer_associates_trusted_t1 [new file with mode: 0644]
test/expected_licenses/cua_office_t1 [new file with mode: 0644]
test/expected_licenses/eclipse_t1 [new file with mode: 0644]
test/expected_licenses/educational_t1 [new file with mode: 0644]
test/expected_licenses/eiffel_2_t1 [new file with mode: 0644]
test/expected_licenses/eiffel_t1 [new file with mode: 0644]
test/expected_licenses/entessa_t1 [new file with mode: 0644]
test/expected_licenses/eu_datagrid_t1 [new file with mode: 0644]
test/expected_licenses/fair_t1 [new file with mode: 0644]
test/expected_licenses/frameworx_t1 [new file with mode: 0644]
test/expected_licenses/gpl3_or_later_t1 [new file with mode: 0644]
test/expected_licenses/gpl3_or_later_t2 [new file with mode: 0644]
test/expected_licenses/gpl3_t1 [new file with mode: 0644]
test/expected_licenses/gpl_t1 [new file with mode: 0644]
test/expected_licenses/gpl_t2 [new file with mode: 0644]
test/expected_licenses/gpl_t3 [new file with mode: 0644]
test/expected_licenses/gpl_t4 [new file with mode: 0644]
test/expected_licenses/historical_t1 [new file with mode: 0644]
test/expected_licenses/ibm_public_t1 [new file with mode: 0644]
test/expected_licenses/intel_open_source_t1 [new file with mode: 0644]
test/expected_licenses/jabber_open_source_t1 [new file with mode: 0644]
test/expected_licenses/lgpl_t1 [new file with mode: 0644]
test/expected_licenses/lgpl_t2 [new file with mode: 0644]
test/expected_licenses/lgpl_t3 [new file with mode: 0644]
test/expected_licenses/lgpl_t4 [new file with mode: 0644]
test/expected_licenses/lgpl_t5 [new file with mode: 0644]
test/expected_licenses/lucent_plan9_t1 [new file with mode: 0644]
test/expected_licenses/lucent_public_t1 [new file with mode: 0644]
test/expected_licenses/mit_t1 [new file with mode: 0644]
test/expected_licenses/mit_t2 [new file with mode: 0644]
test/expected_licenses/mitre_t1 [new file with mode: 0644]
test/expected_licenses/motosoto_t1 [new file with mode: 0644]
test/expected_licenses/mozilla_public_1_1_t1 [new file with mode: 0644]
test/expected_licenses/mozilla_public_1_t1 [new file with mode: 0644]
test/expected_licenses/nasa_open_t1 [new file with mode: 0644]
test/expected_licenses/naumen_t1 [new file with mode: 0644]
test/expected_licenses/nethack_t1 [new file with mode: 0644]
test/expected_licenses/nokia_open_source_t1 [new file with mode: 0644]
test/expected_licenses/oclc_research_t1 [new file with mode: 0644]
test/expected_licenses/open_group_test_t1 [new file with mode: 0644]
test/expected_licenses/open_software_t1 [new file with mode: 0644]
test/expected_licenses/php_license_t1 [new file with mode: 0644]
test/expected_licenses/python_license_t1 [new file with mode: 0644]
test/expected_licenses/python_software_foundation_t1 [new file with mode: 0644]
test/expected_licenses/qt_public_t1 [new file with mode: 0644]
test/expected_licenses/realnetworks_public_source_t1 [new file with mode: 0644]
test/expected_licenses/reciprocal_public_t1 [new file with mode: 0644]
test/expected_licenses/ricoh_source_t1 [new file with mode: 0644]
test/expected_licenses/sleepycat_t1 [new file with mode: 0644]
test/expected_licenses/sugarcrm_1_1_3_t1 [new file with mode: 0644]
test/expected_licenses/sun_industry_standards_t1 [new file with mode: 0644]
test/expected_licenses/sun_public_t1 [new file with mode: 0644]
test/expected_licenses/sybase_open_watcom_t1 [new file with mode: 0644]
test/expected_licenses/u_of_i_ncsa_t1 [new file with mode: 0644]
test/expected_licenses/vovida_software_t1 [new file with mode: 0644]
test/expected_licenses/w3c_t1 [new file with mode: 0644]
test/expected_licenses/wx_windows_t1 [new file with mode: 0644]
test/expected_licenses/x_net_t1 [new file with mode: 0644]
test/expected_licenses/zlib_libpng_t1 [new file with mode: 0644]
test/expected_licenses/zope_t1 [new file with mode: 0644]
test/src_licenses/academic_t1.c [new file with mode: 0644]
test/src_licenses/adaptive_t1.rb [new file with mode: 0644]
test/src_licenses/apache_2_t1.cpp [new file with mode: 0644]
test/src_licenses/apache_2_t2.rb [new file with mode: 0644]
test/src_licenses/apache_ish_t1.sql [new file with mode: 0644]
test/src_licenses/apache_ish_t2.sql [new file with mode: 0644]
test/src_licenses/apache_t1.c [new file with mode: 0644]
test/src_licenses/apache_t2.rb [new file with mode: 0644]
test/src_licenses/apache_t3.rb [new file with mode: 0644]
test/src_licenses/apple_open_source_t1.rb [new file with mode: 0644]
test/src_licenses/artistic_t1.d [new file with mode: 0644]
test/src_licenses/attribution_assurance_t1.c [new file with mode: 0644]
test/src_licenses/bsd_2clause_ish_t1.c [new file with mode: 0644]
test/src_licenses/bsd_ish_t1.c [new file with mode: 0644]
test/src_licenses/bsd_ish_t2.c [new file with mode: 0644]
test/src_licenses/bsd_ish_t3.c [new file with mode: 0644]
test/src_licenses/bsd_t1.rb [new file with mode: 0644]
test/src_licenses/common_development_and_distribution_t1.c [new file with mode: 0644]
test/src_licenses/common_public_t1.c [new file with mode: 0644]
test/src_licenses/computer_associates_trusted_t1.c [new file with mode: 0644]
test/src_licenses/cua_office_t1.c [new file with mode: 0644]
test/src_licenses/eclipse_t1.java [new file with mode: 0644]
test/src_licenses/educational_t1.c [new file with mode: 0644]
test/src_licenses/eiffel_2_t1.c [new file with mode: 0644]
test/src_licenses/eiffel_t1.c [new file with mode: 0644]
test/src_licenses/entessa_t1.c [new file with mode: 0644]
test/src_licenses/eu_datagrid_t1.c [new file with mode: 0644]
test/src_licenses/fair_t1.c [new file with mode: 0644]
test/src_licenses/frameworx_t1.c [new file with mode: 0644]
test/src_licenses/gpl3_or_later_t1.cs [new file with mode: 0644]
test/src_licenses/gpl3_or_later_t2.c [new file with mode: 0644]
test/src_licenses/gpl3_t1.c [new file with mode: 0644]
test/src_licenses/gpl_t1.c [new file with mode: 0644]
test/src_licenses/gpl_t2.c [new file with mode: 0644]
test/src_licenses/gpl_t3.c [new file with mode: 0644]
test/src_licenses/gpl_t4.c [new file with mode: 0644]
test/src_licenses/historical_t1.c [new file with mode: 0644]
test/src_licenses/ibm_public_t1.c [new file with mode: 0644]
test/src_licenses/intel_open_source_t1.c [new file with mode: 0644]
test/src_licenses/jabber_open_source_t1.c [new file with mode: 0644]
test/src_licenses/lgpl_t1.c [new file with mode: 0644]
test/src_licenses/lgpl_t2.c [new file with mode: 0644]
test/src_licenses/lgpl_t3.c [new file with mode: 0644]
test/src_licenses/lgpl_t4.c [new file with mode: 0644]
test/src_licenses/lgpl_t5.c [new file with mode: 0644]
test/src_licenses/lucent_plan9_t1.c [new file with mode: 0644]
test/src_licenses/lucent_public_t1.c [new file with mode: 0644]
test/src_licenses/mit_t1.c [new file with mode: 0644]
test/src_licenses/mit_t2.c [new file with mode: 0644]
test/src_licenses/mitre_t1.c [new file with mode: 0644]
test/src_licenses/motosoto_t1.c [new file with mode: 0644]
test/src_licenses/mozilla_public_1_1_t1.c [new file with mode: 0644]
test/src_licenses/mozilla_public_1_t1.c [new file with mode: 0644]
test/src_licenses/nasa_open_t1.c [new file with mode: 0644]
test/src_licenses/naumen_t1.c [new file with mode: 0644]
test/src_licenses/nethack_t1.c [new file with mode: 0644]
test/src_licenses/nokia_open_source_t1.c [new file with mode: 0644]
test/src_licenses/oclc_research_t1.c [new file with mode: 0644]
test/src_licenses/open_group_test_t1.c [new file with mode: 0644]
test/src_licenses/open_software_t1.c [new file with mode: 0644]
test/src_licenses/php_license_t1.php [new file with mode: 0644]
test/src_licenses/python_license_t1.py [new file with mode: 0644]
test/src_licenses/python_software_foundation_t1.py [new file with mode: 0644]
test/src_licenses/qt_public_t1.c [new file with mode: 0644]
test/src_licenses/realnetworks_public_source_t1.c [new file with mode: 0644]
test/src_licenses/reciprocal_public_t1.c [new file with mode: 0644]
test/src_licenses/ricoh_source_t1.c [new file with mode: 0644]
test/src_licenses/sleepycat_t1.c [new file with mode: 0644]
test/src_licenses/sugarcrm_1_1_3_t1.c [new file with mode: 0644]
test/src_licenses/sun_industry_standards_t1.c [new file with mode: 0644]
test/src_licenses/sun_public_t1.c [new file with mode: 0644]
test/src_licenses/sybase_open_watcom_t1.c [new file with mode: 0644]
test/src_licenses/u_of_i_ncsa_t1.c [new file with mode: 0644]
test/src_licenses/vovida_software_t1.c [new file with mode: 0644]
test/src_licenses/w3c_t1.c [new file with mode: 0644]
test/src_licenses/wx_windows_t1.c [new file with mode: 0644]
test/src_licenses/x_net_t1.c [new file with mode: 0644]
test/src_licenses/zlib_libpng_t1.c [new file with mode: 0644]
test/src_licenses/zope_t1.c [new file with mode: 0644]
test/unit/license_sniffer_test.rb [new file with mode: 0644]