fixed libdir for control file and added version test v0.0.4
authorDickson S. Guedes <[email protected]>
Fri, 13 May 2011 04:59:20 +0000 (01:59 -0300)
committerDickson S. Guedes <[email protected]>
Fri, 13 May 2011 04:59:20 +0000 (01:59 -0300)
lib/pgxn_utils/templates/root/%extension_name%.control.tt
lib/pgxn_utils/version.rb
spec/cli_spec.rb

index 395dc27a8d1506b032f2cc693ec1178bbd350da0..9bd8a53089e49e586f3c0b9b6af8dc752fa1ffde 100644 (file)
@@ -1,5 +1,5 @@
 # <%= extension_name %> extension
 comment = '<%= abstract %>'
-default_version = '1.0.0'
-module_pathname = '/<%= extension_name %>'
+default_version = '<%= version %>'
+module_pathname = '$libdir/<%= extension_name %>'
 relocatable = true
index 3e7cd3effe5d0a4f2ca72dc43360446b93e9c48d..8fd09e04a571bf94c36739d6ee91edc67366f1f9 100644 (file)
@@ -1,3 +1,3 @@
 module PgxnUtils
-  VERSION = "0.0.3"
+  VERSION = "0.0.4"
 end
index 200575669a72fca989d2d83d1670b602d6d87548..57cb7b75d1f6bc13b0207f4c72ec92ee5f06ad80 100644 (file)
@@ -52,7 +52,8 @@ describe PgxnUtils::CLI do
       makefile.should match(/EXTENSION    = #{expected_extension}/)
 
       control = File.read("/tmp/#{expected_extension}/#{expected_extension}.control")
-      control.should match(/module_pathname = '\/#{expected_extension}'/)
+      control.should match(/module_pathname = '\$libdir\/#{expected_extension}'/)
+      control.should match(/default_version = '#{expected_version}'/)
     end
 
     it "should generates a skeleton" do