i18n-spec 0.5.2 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9f98bd04f57bcd38cd4ddbe0e602af7b40b13c17
4
- data.tar.gz: f412910af3c451d65aa56b0cbcab5229966ecce2
3
+ metadata.gz: 6c2341e4789141bf829895aa14c513523b218af1
4
+ data.tar.gz: 778fa80c604c83fbe02b85de334e83987f649705
5
5
  SHA512:
6
- metadata.gz: 049b6449737469f47587f31628ca059aee1f146347e9e7fc5d47bacbd1cac7cb8381800d87fd53e60701f40d3cc3203836cbdf5179bd218133954ec5f43dae14
7
- data.tar.gz: 2565f959ad8f856902c219fdf00ac7963a6545193e03c6bd9366e3d717ca7c30981a678da7a7dae20ffa7b725b42a091fdaa42322b509e8f3c022376504574b9
6
+ metadata.gz: c8f8faf1ace20f8f5073e816b91912dbec848f7a883a309d2198f614ab1d3c91f1d5606e5a71b256ea54b092907c4b0411f473643ccf03eef55ee36bcf204fcd
7
+ data.tar.gz: 328fd14f92922daf160dca73eb45f216a8f2949688500486efd7111d888ccdef9c5a32845098fb931fee631dd27d0731f63247f18f2c71c5c1b2c01469ed501d
data/Gemfile CHANGED
@@ -3,7 +3,7 @@ source 'https://rubygems.org'
3
3
  gem "iso"
4
4
 
5
5
  group :development do
6
- gem "rspec", ">= 2.4.0"
6
+ gem "rspec", ">= 3"
7
7
  gem "bundler"
8
8
  gem "jeweler"
9
9
  gem "rdoc"
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.2
1
+ 0.6.0
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: i18n-spec 0.5.2 ruby lib
5
+ # stub: i18n-spec 0.6.0 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "i18n-spec"
9
- s.version = "0.5.2"
9
+ s.version = "0.6.0"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["Christopher Dell"]
14
- s.date = "2014-08-03"
14
+ s.date = "2014-10-27"
15
15
  s.description = "Includes a number of rspec matchers to make specing your locale files easy peasy."
16
16
  s.email = "chris@tigrish.com"
17
17
  s.extra_rdoc_files = [
@@ -68,20 +68,20 @@ Gem::Specification.new do |s|
68
68
 
69
69
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
70
70
  s.add_runtime_dependency(%q<iso>, [">= 0"])
71
- s.add_development_dependency(%q<rspec>, [">= 2.4.0"])
71
+ s.add_development_dependency(%q<rspec>, [">= 3"])
72
72
  s.add_development_dependency(%q<bundler>, [">= 0"])
73
73
  s.add_development_dependency(%q<jeweler>, [">= 0"])
74
74
  s.add_development_dependency(%q<rdoc>, [">= 0"])
75
75
  else
76
76
  s.add_dependency(%q<iso>, [">= 0"])
77
- s.add_dependency(%q<rspec>, [">= 2.4.0"])
77
+ s.add_dependency(%q<rspec>, [">= 3"])
78
78
  s.add_dependency(%q<bundler>, [">= 0"])
79
79
  s.add_dependency(%q<jeweler>, [">= 0"])
80
80
  s.add_dependency(%q<rdoc>, [">= 0"])
81
81
  end
82
82
  else
83
83
  s.add_dependency(%q<iso>, [">= 0"])
84
- s.add_dependency(%q<rspec>, [">= 2.4.0"])
84
+ s.add_dependency(%q<rspec>, [">= 3"])
85
85
  s.add_dependency(%q<bundler>, [">= 0"])
86
86
  s.add_dependency(%q<jeweler>, [">= 0"])
87
87
  s.add_dependency(%q<rdoc>, [">= 0"])
@@ -1,22 +1,22 @@
1
1
  module I18nSpec
2
2
  module FailureMessage
3
- def failure_for_should
3
+ def failure_for_should(&block)
4
4
  if respond_to?(:failure_message)
5
5
  # Rspec 3
6
- failure_message { |f| yield(f) }
6
+ failure_message { |f| instance_exec(f, &block) }
7
7
  else
8
8
  # Rspec 2
9
- failure_message_for_should { |f| yield(f) }
9
+ failure_message_for_should { |f| instance_exec(f, &block) }
10
10
  end
11
11
  end
12
12
 
13
- def failure_for_should_not
13
+ def failure_for_should_not(&block)
14
14
  if respond_to?(:failure_message_when_negated)
15
15
  # Rspec 3
16
- failure_message_when_negated { |f| yield(f) }
16
+ failure_message_when_negated { |f| instance_exec(f, &block) }
17
17
  else
18
18
  # Rspec 2
19
- failure_message_for_should_not { |f| yield(f) }
19
+ failure_message_for_should_not { |f| instance_exec(f, &block) }
20
20
  end
21
21
  end
22
22
  end
@@ -4,9 +4,7 @@ RSpec::Matchers.define :be_a_complete_translation_of do |default_locale_filepath
4
4
  match do |filepath|
5
5
  locale_file = I18nSpec::LocaleFile.new(filepath)
6
6
  default_locale = I18nSpec::LocaleFile.new(default_locale_filepath)
7
- @misses = default_locale.flattened_translations.keys.reject do |key|
8
- locale_file.flattened_translations.keys.include?(key)
9
- end
7
+ @misses = default_locale.flattened_translations.keys - locale_file.flattened_translations.keys
10
8
  @misses.empty?
11
9
  end
12
10
 
@@ -4,9 +4,7 @@ RSpec::Matchers.define :be_a_subset_of do |default_locale_filepath|
4
4
  match do |filepath|
5
5
  locale_file = I18nSpec::LocaleFile.new(filepath)
6
6
  default_locale = I18nSpec::LocaleFile.new(default_locale_filepath)
7
- @superset = locale_file.flattened_translations.keys.reject do |key|
8
- default_locale.flattened_translations.keys.include?(key)
9
- end
7
+ @superset = locale_file.flattened_translations.keys - default_locale.flattened_translations.keys
10
8
  @superset.empty?
11
9
  end
12
10
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: i18n-spec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christopher Dell
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-03 00:00:00.000000000 Z
11
+ date: 2014-10-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: iso
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 2.4.0
33
+ version: '3'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: 2.4.0
40
+ version: '3'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement