declension 0.0.1 → 0.0.2

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: 9a5828c76a77a2f659b84eb06b615322183c9384
4
- data.tar.gz: 12c8e3099cbe2adf4aa1e5deb3c86d1c570245ca
3
+ metadata.gz: 993b0cb44402c3b6eabb5883ccb42a4a9400bcc7
4
+ data.tar.gz: 29b156f515a9309975888234fb460c86403f4a55
5
5
  SHA512:
6
- metadata.gz: e26e07b26855ef73850197dac4eefc13a644038d63fcdbc114ad5c534bb20f14c52ece8b943b5e8938e5f0c1283c049100f46afd2488d027bb46b7bb010f83ee
7
- data.tar.gz: 36321ff52fa26989c2015f39806263d249479e5472ba19029e71c51682518cfb21165f0a8efd3685a261a3802c8547fbefbad30aa80dcc85b4690a6ff117736c
6
+ metadata.gz: b44acd55bc0074c5167385e8a9d8eeca43559ace0530d63973b10c34ee5ca79cb5963cc9bdbd76e33a8438fb14bc717b5d20db399addfa77d371b0715db1fd6f
7
+ data.tar.gz: 13a4661324e6f351b1dbbc5a8e8897061689e62458dd7145b1998c939befecb8e038ad60769c26231f567f157e62c3beba289421ad4b8f4983765ba1c2b4ac9e
@@ -0,0 +1,4 @@
1
+ ## 0.0.1 (April 16, 2015)
2
+
3
+ ### Features
4
+ * Initial Latvian language support
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2014-2015 Miks Mikelsons
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,47 @@
1
+ == declension
2
+
3
+ {<img src="https://secure.travis-ci.org/miks/declension.png?branch=master" />}[http://travis-ci.org/miks/declension]
4
+
5
+ Inflect string according to current I18n.locale.
6
+
7
+ == Supported Languages
8
+
9
+ * Latvian [lv]
10
+
11
+ == Examples
12
+
13
+ "Jānis Ozols".inflect(:genitive, as: :male)
14
+ => "Jāņa Ozola"
15
+
16
+ "automašīna".inflect(:instrumental, as: :female)
17
+ => "ar automašīnu"
18
+
19
+ "Roberts Egle".inflect(:dative, as: :male)
20
+ => "Robertam Eglem"
21
+
22
+ "Jana Egle".inflect(:dative, as: :female)
23
+ => "Janai Eglei"
24
+
25
+ == Requirements
26
+
27
+ * 2.0.0 <= Ruby
28
+
29
+ == Installation
30
+
31
+ gem install declension
32
+
33
+ == License
34
+
35
+ MIT License
36
+
37
+ == Bugs and Language Support
38
+
39
+ See CHANGELOG.md for last changes.
40
+
41
+ Fork the project. Make your feature addition or bug fix with tests.
42
+
43
+ Send a pull request. Bonus points for topic branches.
44
+
45
+ == Contacts
46
+
47
+ * Miks Miķelsons (link:http://github.com/miks)
@@ -21,7 +21,7 @@ module Declension
21
21
  raise ArgumentError, "No valid gender specified"
22
22
  end
23
23
 
24
- self.word_base = word[0..-(ending.length + 1)]
24
+ self.word_base = word[0..-(ending.length + 1)] if declension
25
25
  end
26
26
 
27
27
  def analyze_male_gender_word
@@ -86,6 +86,8 @@ module Declension
86
86
  fifth_declension(grammar_case, options = {})
87
87
  elsif declension == 6
88
88
  sixth_declension(grammar_case, options = {})
89
+ else
90
+ word
89
91
  end
90
92
  end
91
93
 
@@ -1,3 +1,3 @@
1
1
  module Declension
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: declension
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miks Mikelsons
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-16 00:00:00.000000000 Z
11
+ date: 2015-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n
@@ -70,8 +70,14 @@ description: Apply grammatical cases to words.
70
70
  email: miks.mikelsons@gmail.com
71
71
  executables: []
72
72
  extensions: []
73
- extra_rdoc_files: []
73
+ extra_rdoc_files:
74
+ - CHANGELOG.md
75
+ - LICENSE.txt
76
+ - README.rdoc
74
77
  files:
78
+ - CHANGELOG.md
79
+ - LICENSE.txt
80
+ - README.rdoc
75
81
  - lib/declension.rb
76
82
  - lib/declension/cases.rb
77
83
  - lib/declension/core_ext.rb