meiou 0.1.8 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a05e3f64df21c58543921438076e8c92e88f68664c015d0d9e41f41c57b8e3f5
4
- data.tar.gz: 9101e1f410c11c4469537a364a034d40c414bb0ca99b070c800b5b7bcbfe9d5f
3
+ metadata.gz: 0125e64edcd549b568cbbb6067fde917dce531807ff9fba677e73d8e2cc21ae0
4
+ data.tar.gz: aeb245bf22ec81e293eb1300035c44c1d596ff875c6a7165593325cdd1e169d0
5
5
  SHA512:
6
- metadata.gz: e9dea2101cd9275e8859375de05667d687a64b27decf9d045c0a80de836989a7913562ff1a8ac8d7f2786b4d9a59ed49d78ab3ec4dd94a7e5e4b034b55271f05
7
- data.tar.gz: 1cef052922ec47d8a45025bbe2394af350e40e76c4783753edd2c14bb2a3cdef151c4ac0c30f87dc91de44a7a25fd9dcdc466ca55642e59dc05c6c35894fe0ff
6
+ metadata.gz: ab08472d8f41050b013a377a89ba4134714522406b0ed02bbc72654fa27228d43c1a22b336dac0afd369cc6f885765fc091d9cd4718e7f5775dba64bd299c295
7
+ data.tar.gz: ef5b766895ee3effe0d0de2fa18c07d3445fc6c77db5a50837efb0f60f6a40d5886841a82f36145a01a3057bae9ac5300e0cfaa74aeddcf73f4cf70eda1e5114
@@ -38,9 +38,9 @@ module ASTRO
38
38
 
39
39
  @@ASTRO.categories.each { |e| @@C[e] }
40
40
 
41
- def self.zodiac
42
- [ :cancer,:leo,:capricorn,:gemini,:aquarius,:libra,:taurus,:aries,:pisces ]
43
- end
41
+ # def self.zodiac
42
+ # [ :cancer,:leo,:capricorn,:gemini,:aquarius,:libra,:taurus,:aries,:pisces ]
43
+ # end
44
44
  def self.movements
45
45
  [ :rising, :falling, 'at rest' ]
46
46
  end
@@ -62,10 +62,117 @@ module ASTRO
62
62
 
63
63
  end
64
64
 
65
+ module ZODIAC
66
+
67
+ def self.[] k
68
+ d = Meiou.date(k)
69
+ month = d.month
70
+ day = d.day
71
+
72
+ if month == 12
73
+ if day < 22
74
+ astro_sign = "Sagittarius";
75
+ else
76
+ astro_sign ="capricorn";
77
+ end
78
+
79
+ elsif month == 1
80
+ if day < 20
81
+ astro_sign = "Capricorn";
82
+ else
83
+ astro_sign = "aquarius";
84
+ end
85
+
86
+ elsif month == 2
87
+ if day < 19
88
+ astro_sign = "Aquarius";
89
+ else
90
+ astro_sign = "pisces";
91
+ end
92
+
93
+ elsif month == 3
94
+ if day < 21
95
+ astro_sign = "Pisces";
96
+ else
97
+ astro_sign = "aries";
98
+ end
99
+
100
+ elsif month == 4
101
+ if day < 20
102
+ astro_sign = "Aries";
103
+ else
104
+ astro_sign = "taurus";
105
+ end
106
+
107
+ elsif month == 5
108
+ if day < 21
109
+ astro_sign = "Taurus";
110
+ else
111
+ astro_sign = "gemini";
112
+ end
113
+
114
+ elsif month == 6
115
+ if day < 21
116
+ astro_sign = "Gemini";
117
+ else
118
+ astro_sign = "cancer";
119
+ end
120
+
121
+ elsif month == 7
122
+ if day < 23
123
+ astro_sign = "Cancer";
124
+ else
125
+ astro_sign = "leo";
126
+ end
127
+
128
+ elsif month == 8
129
+ if day < 23
130
+ astro_sign = "Leo";
131
+ else
132
+ astro_sign = "virgo";
133
+ end
134
+
135
+ elsif month == 9
136
+ if day < 23
137
+ astro_sign = "Virgo";
138
+ else
139
+ astro_sign = "libra";
140
+ end
141
+
142
+ elsif month == 10
143
+ if day < 23
144
+ astro_sign = "Libra";
145
+ else
146
+ astro_sign = "scorpio";
147
+ end
148
+
149
+ elsif month == 11
150
+ if day < 22
151
+ astro_sign = "scorpio";
152
+ else
153
+ astro_sign = "sagittarius";
154
+ end
155
+ end
156
+ return astro_sign
157
+ end
158
+
159
+ end
160
+
65
161
  module Meiou
66
162
  def self.astronomy
67
163
  ASTRO
68
164
  end
165
+
166
+ @@Z = Hash.new { |h,k| h[k] = ZODIAC[k] }
167
+
168
+ def self.zodiac
169
+ @@Z
170
+ end
171
+
172
+ def self.date k
173
+ m = /(?<date>(?<year>\d+)\/(?<month>\d+)\/(?<day>\d+))(?<time> (?<hour>\d+):(?<minute>\d+))?/.match(k)
174
+ DateTime.new(m[:year].to_i,m[:month].to_i,m[:day].to_i,m[:hour].to_i || 0,m[:minute].to_i || 0,0).to_time
175
+ end
69
176
  end
70
177
 
71
178
  Meiou.init(:astro) { |h| ASTRO.init! }
data/lib/meiou/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Meiou
4
- VERSION = "0.1.8"
4
+ VERSION = "0.1.9"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: meiou
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erik Olson
@@ -135,31 +135,6 @@ files:
135
135
  - LICENSE.txt
136
136
  - README.md
137
137
  - Rakefile
138
- - _books/Anarchism.txt
139
- - _books/Applied_Psychology_for_Nurses.txt
140
- - _books/Common_Sense.txt
141
- - _books/Considerations_on_Representative_Government.txt
142
- - _books/Crystallizing_Public_Opinion.txt
143
- - _books/Doctor_and_Patient.txt
144
- - _books/Increasing_Human_Efficiency_in_Business.txt
145
- - _books/Marriage_and_Love.txt
146
- - _books/Mutual_Aid.txt
147
- - _books/Natural_Faculties.txt
148
- - _books/Other_People's_Money.txt
149
- - _books/Philosophy_of_Misery.txt
150
- - _books/Playwrights_on_Playmaking.txt
151
- - _books/Principles_of_Scientific_Management.txt
152
- - _books/Psychology_of_Management.txt
153
- - _books/Psychopathology_of_Everyday_Life.txt
154
- - _books/Roman_Farm_Management.txt
155
- - _books/Sexual_Neuroses.txt
156
- - _books/Social_Organization.txt
157
- - _books/Three_Contributions_to_the_Theory_of_Sex.txt
158
- - _books/interpretation_of_dreams.txt
159
- - _books/principals_of_political_economy.txt
160
- - _books/the_Social_Contract.txt
161
- - _books/the_individual_in_society.txt
162
- - _books/the_prince.txt
163
138
  - books/Anarchism.txt
164
139
  - books/Applied_Psychology_for_Nurses.txt
165
140
  - books/Crystallizing_Public_Opinion.txt