Permalink
Browse files

added locale support

  • Loading branch information...
1 parent 33f598c commit cb9c5db7b6068398642e92ebf2453d36219dfe06 @dickeyxxx dickeyxxx committed Sep 12, 2012
Showing with 5 additions and 0 deletions.
  1. +3 −0 README.md
  2. +2 −0 definitions/pg_database.rb
View
@@ -65,6 +65,7 @@ pg_database "mydb" do
owner "myuser"
encoding "utf8"
template "template0"
+ locale "en_US.UTF8"
end
# drop a database
@@ -453,6 +454,8 @@ Many thanks go to the following who have contributed to making this cookbook eve
* add `pg_user` and `pg_database` definitions
* **[@cmer](https://github.com/cmer)**
* add `encrypted_password` param for `pg_user` definition
+* **[@dickeyxxx](https://github.com/dickeyxxx)**
+ * added support for specifying database locale
## License
@@ -6,6 +6,7 @@
:host => nil,
:port => nil,
:encoding => "utf8",
+ :locale => nil,
:template => nil,
:owner => nil,
}
@@ -25,6 +26,7 @@
createdb = ["createdb"]
createdb.push "-U #{defaults[:username]}" if defaults[:username]
createdb.push "-E #{defaults[:encoding]}" if defaults[:encoding]
+ createdb.push "--locale #{defaults[:locale]}" if defaults[:locale]
createdb.push "-T #{defaults[:template]}" if defaults[:template]
createdb.push "--host #{defaults[:host]}" if defaults[:host]
createdb.push "--port #{defaults[:port]}" if defaults[:port]

0 comments on commit cb9c5db

Please sign in to comment.