globalize3 0.0.10 → 0.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Gemfile.lock CHANGED
@@ -1,41 +1,40 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- globalize3 (0.0.9)
4
+ globalize3 (0.0.10)
5
5
  activemodel (>= 3.0.0)
6
6
  activerecord (>= 3.0.0)
7
7
 
8
8
  GEM
9
9
  remote: http://rubygems.org/
10
10
  specs:
11
- activemodel (3.0.0)
12
- activesupport (= 3.0.0)
11
+ activemodel (3.0.3)
12
+ activesupport (= 3.0.3)
13
13
  builder (~> 2.1.2)
14
- i18n (~> 0.4.1)
15
- activerecord (3.0.0)
16
- activemodel (= 3.0.0)
17
- activesupport (= 3.0.0)
18
- arel (~> 1.0.0)
14
+ i18n (~> 0.4)
15
+ activerecord (3.0.3)
16
+ activemodel (= 3.0.3)
17
+ activesupport (= 3.0.3)
18
+ arel (~> 2.0.2)
19
19
  tzinfo (~> 0.3.23)
20
- activesupport (3.0.0)
21
- arel (1.0.1)
22
- activesupport (~> 3.0.0)
20
+ activesupport (3.0.3)
21
+ arel (2.0.6)
23
22
  builder (2.1.2)
24
- columnize (0.3.1)
23
+ columnize (0.3.2)
25
24
  database_cleaner (0.5.2)
26
- i18n (0.4.1)
25
+ i18n (0.5.0)
27
26
  linecache (0.43)
28
- mocha (0.9.8)
27
+ mocha (0.9.10)
29
28
  rake
30
29
  pathname_local (0.0.2)
31
30
  rake (0.8.7)
32
- ruby-debug (0.10.3)
31
+ ruby-debug (0.10.4)
33
32
  columnize (>= 0.1)
34
- ruby-debug-base (~> 0.10.3.0)
35
- ruby-debug-base (0.10.3)
33
+ ruby-debug-base (~> 0.10.4.0)
34
+ ruby-debug-base (0.10.4)
36
35
  linecache (>= 0.3)
37
- sqlite3-ruby (1.3.1)
38
- test_declarative (0.0.3)
36
+ sqlite3-ruby (1.3.2)
37
+ test_declarative (0.0.4)
39
38
  tzinfo (0.3.23)
40
39
 
41
40
  PLATFORMS
@@ -25,7 +25,7 @@ module Globalize
25
25
  end
26
26
 
27
27
  def class_name
28
- class_name = table_name[table_name_prefix.length..-(table_name_suffix.length + 1)].camelize
28
+ class_name = table_name[table_name_prefix.length..-(table_name_suffix.length + 1)].downcase.camelize
29
29
  pluralize_table_names ? class_name.singularize : class_name
30
30
  end
31
31
 
@@ -40,4 +40,4 @@ module Globalize
40
40
  end
41
41
  end
42
42
  end
43
- end
43
+ end
@@ -24,8 +24,11 @@ module Globalize
24
24
  end
25
25
 
26
26
  def write_attribute(name, value, locale = nil)
27
- super(name, value)
28
- globalize.write(locale || Globalize.locale, name, value) if translated?(name)
27
+ # Make sure that we return some value as some methods might
28
+ # rely on the data
29
+ return_value = super(name, value)
30
+ return_value = globalize.write(locale || Globalize.locale, name, value) if translated?(name)
31
+ return_value
29
32
  end
30
33
 
31
34
  def read_attribute(name, locale = nil)
@@ -1,3 +1,3 @@
1
1
  module Globalize3
2
- VERSION = '0.0.10'
2
+ VERSION = '0.0.11'
3
3
  end
@@ -2,7 +2,9 @@ require 'active_record/serializers/xml_serializer'
2
2
 
3
3
  ActiveRecord::XmlSerializer::Attribute.class_eval do
4
4
  def compute_type_with_translations
5
- if @serializable.class.translated_attribute_names.include?(name.to_sym)
5
+ klass = @serializable.class
6
+ if klass.respond_to?(:translated_attribute_names) &&
7
+ klass.translated_attribute_names.include?(name.to_sym)
6
8
  :string
7
9
  else
8
10
  compute_type_without_translations
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: globalize3
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
5
- prerelease: false
4
+ hash: 9
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 10
10
- version: 0.0.10
9
+ - 11
10
+ version: 0.0.11
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sven Fuchs
@@ -18,7 +18,7 @@ autorequire:
18
18
  bindir: bin
19
19
  cert_chain: []
20
20
 
21
- date: 2010-11-30 00:00:00 +01:00
21
+ date: 2011-01-11 00:00:00 +01:00
22
22
  default_executable:
23
23
  dependencies:
24
24
  - !ruby/object:Gem::Dependency
@@ -201,7 +201,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
201
201
  requirements: []
202
202
 
203
203
  rubyforge_project: "[none]"
204
- rubygems_version: 1.3.7
204
+ rubygems_version: 1.4.2
205
205
  signing_key:
206
206
  specification_version: 3
207
207
  summary: "Rails I18n: de-facto standard library for ActiveRecord 3 model/data translation"