simple_model_translations 0.2.6 → 0.2.7

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,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- simple_model_translations (0.2.5)
4
+ simple_model_translations (0.2.7)
5
5
  activerecord (~> 3.0.0)
6
6
 
7
7
  GEM
@@ -34,7 +34,7 @@ GEM
34
34
  rspec-expectations (~> 2.0.1)
35
35
  shoulda (2.11.3)
36
36
  sqlite3-ruby (1.3.1)
37
- tzinfo (0.3.24)
37
+ tzinfo (0.3.25)
38
38
 
39
39
  PLATFORMS
40
40
  ruby
@@ -44,7 +44,7 @@ module SimpleModelTranslations
44
44
  @record.readonly!
45
45
  @current_translation = translation
46
46
  else
47
- raise "Cannot use translation with locale '#{locale}' for object '#{@record}'"
47
+ raise ActiveRecord::RecordNotFound.new("Cannot use translation with locale '#{locale}' for object '#{@record}'")
48
48
  end
49
49
  end
50
50
 
@@ -1,3 +1,3 @@
1
1
  module SimpleModelTranslations
2
- VERSION = '0.2.6'
2
+ VERSION = '0.2.7'
3
3
  end
@@ -52,9 +52,9 @@ describe Article do
52
52
  article.name.should == 'Hello'
53
53
  end
54
54
 
55
- it 'should raise exception when there is no translation' do
55
+ it 'should raise ActiveRecord::RecordNotFound when there is no translation' do
56
56
  article = Article.create!(:slug => '__hello__', :name => 'Hello', :content => 'World')
57
- expect { article.translation_helper.force_translation_with_locale(:en) }.to raise_error
57
+ expect { article.translation_helper.force_translation_with_locale(:en) }.to raise_error(ActiveRecord::RecordNotFound)
58
58
  end
59
59
 
60
60
  it 'should make record read-only' do
@@ -63,7 +63,6 @@ describe Article do
63
63
  article.translation_helper.force_translation_with_locale(:en)
64
64
  article.should be_readonly
65
65
  end
66
-
67
66
  end
68
67
  end
69
68
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_model_translations
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 6
10
- version: 0.2.6
9
+ - 7
10
+ version: 0.2.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - Pavel Forkert
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-03-19 00:00:00 +02:00
18
+ date: 2011-03-25 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -164,7 +164,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
164
164
  requirements: []
165
165
 
166
166
  rubyforge_project:
167
- rubygems_version: 1.5.2
167
+ rubygems_version: 1.6.2
168
168
  signing_key:
169
169
  specification_version: 3
170
170
  summary: Simple ActiveRecord translations for Rails 3