merb_global 0.0.5.1 → 0.0.5.2

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -6,7 +6,7 @@ require 'fileutils'
6
6
 
7
7
  PLUGIN = "merb_global"
8
8
  NAME = "merb_global"
9
- GEM_VERSION = "0.0.5.1"
9
+ GEM_VERSION = "0.0.5.2"
10
10
  AUTHORS = ["Alex Coles", "Maciej Piechotka"]
11
11
  EMAIL = "alex@alexcolesportfolio.com"
12
12
  HOMEPAGE = "http://trac.ikonoklastik.com/merb_global/"
@@ -40,7 +40,11 @@ module Merb
40
40
  end
41
41
 
42
42
  def choose(except)
43
- Language.filter(~{:name => except}).first[:name]
43
+ if except.empty?
44
+ Language.first[:name]
45
+ else
46
+ Language.filter(~{:name => except}).first[:name]
47
+ end
44
48
  end
45
49
 
46
50
  def import
@@ -91,6 +95,7 @@ module Merb
91
95
  end
92
96
 
93
97
  class Language < ::Sequel::Model(:merb_global_languages)
98
+ set_primary_key :id
94
99
  has_many :translations,
95
100
  :class => "Merb::Global::MessageProviders::Sequel::Translation",
96
101
  :key => :language_id
@@ -11,12 +11,12 @@ class AddTranslationsMigration < Sequel::Migration
11
11
  varchar :plural, :size => 128
12
12
  end
13
13
  create_table :merb_global_translations do
14
- primary_key [:language_id, :msgid_hash, :msgstr_index]
15
14
  foreign_key :language_id, :null => false
16
15
  text :msgid, :null => false
17
16
  text :msgid_plural
18
17
  text :msgstr, :null => false
19
18
  integer :msgstr_index, :null => true
19
+ primary_key [:language_id, :msgid, :msgstr_index]
20
20
  end
21
21
  end
22
22
  def down
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: merb_global
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5.1
4
+ version: 0.0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Coles
@@ -10,7 +10,7 @@ autorequire: merb_global
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2008-08-21 00:00:00 +02:00
13
+ date: 2008-10-31 00:00:00 +01:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency