inflections 3.2.8 → 3.2.9.20121201

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.markdown CHANGED
@@ -1,5 +1,9 @@
1
- 3.2.8 (current version)
1
+ 3.2.9 (current version)
2
2
  =======================
3
+ * Support for Norwegian Bokmål (thanks to [Henrik Hodne](https://github.com/henrikhodne))
4
+
5
+ 3.2.8
6
+ =====
3
7
  * Support for British English (thanks to [creativetags](https://github.com/creativetags))
4
8
  * Now versioning alongside ActiveSupport
5
9
 
data/README.markdown CHANGED
@@ -50,6 +50,7 @@ end
50
50
  * English (en)
51
51
  * British English (en-GB)
52
52
  * Spanish (es)
53
+ * Norwegian Bokmål (nb)
53
54
 
54
55
  If you are fluent in a language not yet included in this gem, _please_ consider creating a list of inflections and submitting a pull request.
55
56
 
data/Rakefile CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env rake
2
+
2
3
  require 'bundler/gem_tasks'
3
4
  require 'rake/testtask'
4
5
 
@@ -0,0 +1,14 @@
1
+ module Inflections
2
+ ActiveSupport::Inflector.inflections do |inflect|
3
+ inflect.clear
4
+
5
+ inflect.plural(/$/, 'er')
6
+ inflect.plural(/r$/i, 're')
7
+ inflect.plural(/e$/i, 'er')
8
+
9
+ inflect.singular(/er$/i, '')
10
+ inflect.singular(/re$/i, 'r')
11
+
12
+ inflect.irregular('konto', 'konti')
13
+ end
14
+ end
@@ -1,8 +1,8 @@
1
1
  module Inflections
2
2
  MAJOR = 3
3
3
  MINOR = 2
4
- PATCH = 8
5
- PRE = nil
4
+ PATCH = 9
5
+ PRE = 20121201
6
6
 
7
7
  VERSION = [MAJOR, MINOR, PATCH, PRE].compact.join '.'
8
8
  end
data/test/nb_test.rb ADDED
@@ -0,0 +1,39 @@
1
+ # encoding: utf-8
2
+
3
+ require 'test_helper'
4
+ require 'inflections/nb'
5
+
6
+ class TestNorwegianBokmalInflections < MiniTest::Unit::TestCase
7
+ def test_svake_substantiv_er
8
+ assert_equal 'hunder', 'hund'.pluralize
9
+ assert_equal 'hund', 'hunder'.singularize
10
+
11
+ assert_equal 'dager', 'dag'.pluralize
12
+ assert_equal 'dag', 'dager'.singularize
13
+
14
+ assert_equal 'tester', 'test'.pluralize
15
+ assert_equal 'test', 'tester'.singularize
16
+ end
17
+
18
+ def test_svake_substantiv_r
19
+ assert_equal 'lærere', 'lærer'.pluralize
20
+ assert_equal 'lærer', 'lærere'.singularize
21
+
22
+ assert_equal 'kalendere', 'kalender'.pluralize
23
+ assert_equal 'kalender', 'kalendere'.singularize
24
+ end
25
+
26
+ def test_svake_substantiv_e
27
+ assert_equal 'bakker', 'bakke'.pluralize
28
+ # TODO: Fix this. How do we keep this form apart from "hunder"?
29
+ # assert_equal 'bakke', 'bakker'.singularize
30
+
31
+ assert_equal 'epler', 'eple'.pluralize
32
+ # assert_equal 'eple', 'epler'.singularize
33
+ end
34
+
35
+ def test_sterke_verb
36
+ assert_equal 'konti', 'konto'.pluralize
37
+ assert_equal 'konto', 'konti'.singularize
38
+ end
39
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inflections
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.8
4
+ version: 3.2.9.20121201
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-14 00:00:00.000000000 Z
12
+ date: 2012-12-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -79,11 +79,13 @@ files:
79
79
  - lib/inflections/en-GB.rb
80
80
  - lib/inflections/en.rb
81
81
  - lib/inflections/es.rb
82
+ - lib/inflections/nb.rb
82
83
  - lib/inflections/railtie.rb
83
84
  - lib/inflections/version.rb
84
85
  - test/en-GB_test.rb
85
86
  - test/en_test.rb
86
87
  - test/es_test.rb
88
+ - test/nb_test.rb
87
89
  - test/test_helper.rb
88
90
  homepage: https://github.com/davidcelis/inflections
89
91
  licenses: []
@@ -113,3 +115,5 @@ test_files:
113
115
  - test/en-GB_test.rb
114
116
  - test/en_test.rb
115
117
  - test/es_test.rb
118
+ - test/nb_test.rb
119
+ has_rdoc: