zodiac 0.1 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,50 @@
1
+ h1. zodiac
2
+
3
+ @zodiac@ is a simple gem for getting a zodiac sign from a given date of birth. It extends @Time@, @Date@ and @DateTime@ objects with a @zodiac_sign@ method.
4
+
5
+ h2. Installation
6
+
7
+ <pre>gem install zodiac</pre>
8
+
9
+ h2. Usage
10
+
11
+ <pre>
12
+ require 'zodiac'
13
+ Time.now.zodiac_sign # => "Aries"
14
+ require 'date'
15
+ Date.new(2011, 1, 1).zodiac_sign # => "Capricorn"
16
+ DateTime.new(2011, 4, 30).zodiac_sign # => "Taurus"
17
+ </pre>
18
+
19
+ @#zodiac_sign@ returns values using I18n with "zodiac.#{sign}" path, so if you want your own translations, you can put them in your locale with keys like @zodiac.aries@, @zodiac.taurus@ etc. See examples "here":http://github.com/7even/zodiac/blob/master/lib/locales/en.yml
20
+
21
+ h2. Included locales
22
+
23
+ <pre>
24
+ en
25
+ ru
26
+ pt-BR (thanks "jeffrydegrande":https://github.com/jeffrydegrande)
27
+ </pre>
28
+
29
+ h2. Changelog
30
+
31
+ * 0.1 Initial version with Time/Date/DateTime extension and [:ru, :en] locales
32
+ * 0.1.1 Added pt-BR locale (thanks "jeffrydegrande":https://github.com/jeffrydegrande)
33
+
34
+ h2. Roadmap
35
+
36
+ 1. Rdoc coverage of everything
37
+
38
+ 2. ActiveRecord macro:
39
+
40
+ <pre>
41
+ class Person < ActiveRecord::Base
42
+ zodiac_reader :dob # dob is a DateTime attribute containing person's date of birth
43
+ end
44
+ Person.first.zodiac_sign # => "scorpio"
45
+ Person.find_by_zodiac_sign("gemini") # => AR::Relation
46
+ </pre>
47
+
48
+ h2. Contributing
49
+
50
+ Fork the repository, push your changes to a topic branch and send me a pull request.
@@ -0,0 +1,14 @@
1
+ pt-BR:
2
+ zodiac:
3
+ aries: Áries
4
+ taurus: Touro
5
+ gemini: Gêmeos
6
+ cancer: Câncer
7
+ leo: Leão
8
+ virgo: Virgem
9
+ libra: Libra
10
+ scorpio: Escorpião
11
+ sagittarius: Sagitário
12
+ capricorn: Capricórnio
13
+ aquarius: Aquário
14
+ pisces: Peixes
@@ -1,3 +1,3 @@
1
1
  module Zodiac
2
- VERSION = "0.1"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: zodiac
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: "0.1"
5
+ version: 0.1.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Vsevolod Romashov
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-04-16 00:00:00 +04:00
13
+ date: 2011-07-03 00:00:00 +04:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -58,8 +58,10 @@ extra_rdoc_files: []
58
58
  files:
59
59
  - .gitignore
60
60
  - Gemfile
61
+ - README.textile
61
62
  - Rakefile
62
63
  - lib/locales/en.yml
64
+ - lib/locales/pt-BR.yml
63
65
  - lib/locales/ru.yml
64
66
  - lib/zodiac.rb
65
67
  - lib/zodiac/date.rb
@@ -93,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
93
95
  requirements: []
94
96
 
95
97
  rubyforge_project:
96
- rubygems_version: 1.6.2
98
+ rubygems_version: 1.6.1
97
99
  signing_key:
98
100
  specification_version: 3
99
101
  summary: Zodiac sign calculator for any date