i18n-airbrake 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,11 +1,13 @@
1
1
  # I18n::Airbrake
2
2
 
3
- * translates known keys normally
4
- * translates defaults normally
5
- * notifies airbrake in production environment
6
- * titleizes the key in production environment
7
- * raises the error in development environment
8
- * raises the error in test environment
3
+ * when the translation can be found
4
+ * translates known keys normally
5
+ * uses the default normally
6
+ * when the translation cannot be found
7
+ * notifies airbrake in production environment
8
+ * titleizes the key in production environment
9
+ * raises the error in development environment
10
+ * raises the error in test environment
9
11
 
10
12
  (straight from the specs)
11
13
 
@@ -15,8 +15,8 @@ Gem::Specification.new do |gem|
15
15
  gem.require_paths = ["lib"]
16
16
  gem.version = I18n::Airbrake::VERSION
17
17
 
18
- gem.add_dependency "i18n", "~> 0.6.0"
19
- gem.add_dependency "airbrake", "~> 3.0.9"
18
+ gem.add_dependency "i18n", "~> 0.6"
19
+ gem.add_dependency "airbrake", "~> 3.0"
20
20
 
21
21
  gem.add_development_dependency "rspec", "~> 2.9"
22
22
 
@@ -1,5 +1,5 @@
1
1
  module I18n
2
2
  module Airbrake
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
@@ -1,7 +1,6 @@
1
1
  require 'i18n-airbrake'
2
2
  require 'airbrake'
3
3
 
4
-
5
4
  describe I18n::Airbrake do
6
5
 
7
6
  let(:env) { stub "env", :development? => false, :test? => false }
@@ -15,34 +14,42 @@ describe I18n::Airbrake do
15
14
  Rails.stub(:env) { env }
16
15
  end
17
16
 
18
- it "translates known keys normally" do
19
- I18n.t(:known).should == translation
20
- end
17
+ context "when the translation can be found" do
21
18
 
22
- it "translates defaults normally" do
23
- I18n.t(:unknown, :default => "With Default").should == "With Default"
24
- end
19
+ it "translates normally" do
20
+ I18n.t(:known).should == translation
21
+ end
25
22
 
26
- it "notifies airbrake in production environment" do
27
- ::Airbrake.should_receive(:notify).with(an_instance_of(I18n::MissingTranslationData))
28
- I18n.t(:unknown)
29
- end
23
+ it "uses the default normally" do
24
+ I18n.t(:unknown, :default => "With Default").should == "With Default"
25
+ end
30
26
 
31
- it "titleizes the key in production environment" do
32
- ::Airbrake.stub(:notify)
33
- I18n.t(:unknown).should == "Unknown"
34
27
  end
35
28
 
36
- it "raises the error in development environment" do
37
- Rails.env.stub(:development?) { true }
38
- ::Airbrake.should_not_receive(:notify)
39
- expect { I18n.t(:unknown) }.to raise_error I18n::MissingTranslationData
40
- end
29
+ context "when the translation cannot be found" do
30
+
31
+ it "notifies airbrake in production environment" do
32
+ ::Airbrake.should_receive(:notify).with(an_instance_of(I18n::MissingTranslationData))
33
+ I18n.t(:unknown)
34
+ end
35
+
36
+ it "titleizes the key in production environment" do
37
+ ::Airbrake.stub(:notify)
38
+ I18n.t(:unknown).should == "Unknown"
39
+ end
40
+
41
+ it "raises the error in development environment" do
42
+ Rails.env.stub(:development?) { true }
43
+ ::Airbrake.should_not_receive(:notify)
44
+ expect { I18n.t(:unknown) }.to raise_error I18n::MissingTranslationData
45
+ end
46
+
47
+ it "raises the error in test environment" do
48
+ Rails.env.stub(:test?) { true }
49
+ ::Airbrake.should_not_receive(:notify)
50
+ expect { I18n.t(:unknown) }.to raise_error I18n::MissingTranslationData
51
+ end
41
52
 
42
- it "raises the error in test environment" do
43
- Rails.env.stub(:test?) { true }
44
- ::Airbrake.should_not_receive(:notify)
45
- expect { I18n.t(:unknown) }.to raise_error I18n::MissingTranslationData
46
53
  end
47
54
 
48
55
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: i18n-airbrake
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,33 +9,43 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-29 00:00:00.000000000 Z
12
+ date: 2012-06-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: i18n
16
- requirement: &70268164432240 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
20
20
  - !ruby/object:Gem::Version
21
- version: 0.6.0
21
+ version: '0.6'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70268164432240
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: '0.6'
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: airbrake
27
- requirement: &70268164448100 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
35
  - - ~>
31
36
  - !ruby/object:Gem::Version
32
- version: 3.0.9
37
+ version: '3.0'
33
38
  type: :runtime
34
39
  prerelease: false
35
- version_requirements: *70268164448100
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: '3.0'
36
46
  - !ruby/object:Gem::Dependency
37
47
  name: rspec
38
- requirement: &70268164447640 !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
39
49
  none: false
40
50
  requirements:
41
51
  - - ~>
@@ -43,7 +53,12 @@ dependencies:
43
53
  version: '2.9'
44
54
  type: :development
45
55
  prerelease: false
46
- version_requirements: *70268164447640
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: '2.9'
47
62
  description: Notifies Airbrake when you miss a translation
48
63
  email:
49
64
  - iain@iain.nl
@@ -83,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
83
98
  version: '0'
84
99
  requirements: []
85
100
  rubyforge_project:
86
- rubygems_version: 1.8.15
101
+ rubygems_version: 1.8.24
87
102
  signing_key:
88
103
  specification_version: 3
89
104
  summary: Notifies Airbrake when you miss a translation