copycats 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/{HISTORY.md → CHANGELOG.md} +0 -0
- data/Manifest.txt +4 -2
- data/Rakefile +3 -3
- data/lib/copycats.rb +7 -2
- data/lib/copycats/fancies.rb +155 -31
- data/lib/copycats/gene.rb +0 -42
- data/lib/copycats/{data.rb → import/read.rb} +0 -95
- data/lib/copycats/import/setup.rb +94 -0
- data/lib/copycats/reports/genes.rb +32 -9
- data/lib/copycats/traits.rb +174 -19
- data/lib/copycats/traits_timeline.rb +294 -0
- data/lib/copycats/version.rb +1 -1
- metadata +15 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2c6eb5ce1a08788c4f1fa3ca5ece8aa980fd282
|
4
|
+
data.tar.gz: '09b5543d21a4cebd5e465fa6e4062d3816902fdf'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e0f694fec6aa4139d28c23ca652e7ab50e39bece57bcbb09914097da70f1804aedf0860f39db14f88fa4d4cbb280d045d12fa652cac4d0792724597f975a5baa
|
7
|
+
data.tar.gz: 6b91cecc1caa19df875427e196e9021df1b728c5ec7e4f18590b8bcf51cc804943f6e83e674bb3e04a69c65dcdd20b6d9a891553b02a11b5bfe7dd2d02ca163d
|
data/{HISTORY.md → CHANGELOG.md}
RENAMED
File without changes
|
data/Manifest.txt
CHANGED
@@ -1,14 +1,15 @@
|
|
1
|
-
|
1
|
+
CHANGELOG.md
|
2
2
|
LICENSE.md
|
3
3
|
Manifest.txt
|
4
4
|
README.md
|
5
5
|
Rakefile
|
6
6
|
bin/kitty
|
7
7
|
lib/copycats.rb
|
8
|
-
lib/copycats/data.rb
|
9
8
|
lib/copycats/fancies.rb
|
10
9
|
lib/copycats/gene.rb
|
11
10
|
lib/copycats/genome.rb
|
11
|
+
lib/copycats/import/read.rb
|
12
|
+
lib/copycats/import/setup.rb
|
12
13
|
lib/copycats/models/kitty.rb
|
13
14
|
lib/copycats/reports/genes.rb
|
14
15
|
lib/copycats/reports/kitty.rb
|
@@ -17,6 +18,7 @@ lib/copycats/reports/traits.rb
|
|
17
18
|
lib/copycats/schema.rb
|
18
19
|
lib/copycats/tool.rb
|
19
20
|
lib/copycats/traits.rb
|
21
|
+
lib/copycats/traits_timeline.rb
|
20
22
|
lib/copycats/version.rb
|
21
23
|
test/helper.rb
|
22
24
|
test/test_genome.rb
|
data/Rakefile
CHANGED
@@ -15,13 +15,13 @@ Hoe.spec 'copycats' do
|
|
15
15
|
|
16
16
|
# switch extension to .markdown for gihub formatting
|
17
17
|
self.readme_file = 'README.md'
|
18
|
-
self.history_file = '
|
18
|
+
self.history_file = 'CHANGELOG.md'
|
19
19
|
|
20
20
|
self.extra_deps = [
|
21
|
-
['base32-
|
21
|
+
['base32-alphabets', '>= 1.0.0'],
|
22
|
+
['csvreader', '>= 1.2.3'],
|
22
23
|
['activerecord'],
|
23
24
|
['sqlite3'],
|
24
|
-
['csvreader']
|
25
25
|
]
|
26
26
|
|
27
27
|
self.licenses = ['Public Domain']
|
data/lib/copycats.rb
CHANGED
@@ -14,19 +14,21 @@ require 'logger' # note: use for ActiveRecord::Base.logger -- remove/replace
|
|
14
14
|
## 3rd party gems
|
15
15
|
require 'active_record' ## todo: add sqlite3? etc.
|
16
16
|
|
17
|
-
require 'base32-
|
17
|
+
require 'base32-alphabets' ## base32 / kai encoding / decoding for genes
|
18
18
|
require 'csvreader'
|
19
19
|
|
20
20
|
|
21
|
+
|
21
22
|
## our own code
|
22
23
|
require 'copycats/version' # note: let version always go first
|
23
24
|
require 'copycats/traits'
|
25
|
+
require 'copycats/traits_timeline'
|
26
|
+
|
24
27
|
require 'copycats/fancies'
|
25
28
|
require 'copycats/gene'
|
26
29
|
require 'copycats/genome'
|
27
30
|
|
28
31
|
require 'copycats/schema'
|
29
|
-
require 'copycats/data'
|
30
32
|
|
31
33
|
require 'copycats/models/kitty'
|
32
34
|
|
@@ -35,6 +37,9 @@ require 'copycats/reports/mix'
|
|
35
37
|
require 'copycats/reports/genes'
|
36
38
|
require 'copycats/reports/traits'
|
37
39
|
|
40
|
+
require 'copycats/import/setup'
|
41
|
+
require 'copycats/import/read'
|
42
|
+
|
38
43
|
require 'copycats/tool'
|
39
44
|
|
40
45
|
|
data/lib/copycats/fancies.rb
CHANGED
@@ -4,50 +4,174 @@
|
|
4
4
|
#
|
5
5
|
# for latest updates on new fancies/exclusives see:
|
6
6
|
# https://updates.cryptokitties.co (official latest updates/timeline)
|
7
|
+
#
|
8
|
+
# or see
|
9
|
+
# https://blog.kotobaza.co/timeline/
|
10
|
+
|
7
11
|
|
12
|
+
##
|
13
|
+
## note:
|
14
|
+
## for time limits for fancies use:
|
15
|
+
## e.g. time: { end: '2018-12-07' } # until dec/7
|
16
|
+
##
|
17
|
+
## for overflows for limited edition use:
|
18
|
+
## e.g. overflow: 1 # 888+1 (=889)
|
8
19
|
|
9
|
-
## todo: add formula: []
|
10
20
|
|
11
21
|
FANCIES =
|
12
22
|
{
|
13
|
-
|
14
|
-
|
23
|
+
## 2018
|
24
|
+
## November
|
25
|
+
draco: { name: 'Draco', date: '2018-11-30', time: { end: '2018-12-07' },
|
26
|
+
traits: ['toyger', 'martian', 'peppermint', 'dragonwings', 'SE03']},
|
27
|
+
dracothemagnificent: { name: 'Draco The Magnificent', date: '2018-11-27', limit: 12, exclusive: true, ids: (270..281).to_a },
|
28
|
+
bugcatv2: { name: 'Bug Cat V2', date: '2018-11-27', limit: 20, exclusive: true, ids: (167..186).to_a, desc: 'Bug Bounty II (Offers Contract) Kitty' },
|
29
|
+
dracojunior: { name: 'Draco Junior', date: '2018-11-26', time: { end: '2018-12-07' },
|
30
|
+
traits: ['lynx', 'verdigris', 'dragontail', 'SE03']},
|
31
|
+
dreggo: { name: 'Dreggo', date: '2018-11-21', time: { end: '2018-12-07' },
|
32
|
+
traits: ['siberian', 'bananacream', 'SE03']},
|
33
|
+
pickles: { name: 'Pickles', date: '2018-11-14', limit: 303,
|
34
|
+
traits: ['lynx', 'martian', 'highsociety', 'emeraldgreen']},
|
35
|
+
lilbub: { name: 'Lil Bub Ub Bub (BUB)', date: '2018-11-13', limit: 42, special: true }, ## for search use specialedition:
|
36
|
+
|
37
|
+
lilbubthemagicalspacecat: { name: 'Lil Bub Ub Bub (BUB) The Magical Space Cat', date: '2018-11-13', limit: 3, exclusive: true, ids: [266,267,268] },
|
38
|
+
|
39
|
+
## October
|
40
|
+
thatsawrap: { name: 'Thatsawrap', date: '2018-10-21', limit: 615, time: { start: '2018-10-20', end: '2018-11-06' }, prestige: true,
|
41
|
+
traits: ['bobtail','WE00','PU28']},
|
42
|
+
duckduckcat: { name: 'Duckduckcat', date: '2018-10-19', limit: 1249, time: { start: '2018-10-20', end: '2018-11-15' }, prestige: true,
|
43
|
+
traits: ['neckbeard',['PU24','PU25','PU26']]}, ## Purrstige: PU24 / PU25 / PU26
|
44
|
+
|
45
|
+
dukecat: { name: 'Dukecat', date: '2018-10-18', limit: 1366,
|
46
|
+
traits: ['cymric', 'periwinkle', 'simple', 'tongue']},
|
47
|
+
sheilapurren: { name: 'Sheila Purren', date: '2018-10-04', limit: 1971, desc: 'Sheila Warren Kitty-fied - Head of Blockchain and Distributed Ledger Technology at the World Economic Forum (WEF)',
|
48
|
+
traits: ['mauveover', 'icy', 'wingtips', 'fangtastic']},
|
49
|
+
|
50
|
+
## September
|
51
|
+
pawzilla: { name: 'Pawzilla', date: '2018-09-22', limit: 1185,
|
52
|
+
traits: ['jaguar', 'universe', 'atlantis', 'littlefoot']},
|
53
|
+
prune: { name: 'Prune', date: '2018-09-19', limit: 921, time: { start: '2018-09-18', end: '2018-09-30' }, prestige: true,
|
54
|
+
traits: ['norwegianforest', 'totesbasic', 'PU25']}, ## todo/fix: check totesbasic - three genes!!! - check which one PA15?
|
55
|
+
furball: { name: 'Furball', date: '2018-09-19', limit: 998, time: { start: '2018-09-19', end: '2018-09-30' }, prestige: true,
|
56
|
+
traits: ['norwegianforest', 'totesbasic', 'PU26']}, ## todo/fix: check totesbasic - three genes!!! - check which one PA15?
|
57
|
+
vulcat: { name: 'Vulcat', date: '2018-09-12', limit: 1, exclusive: true, ids: [1000000], desc: '1 000 000th Kitty' },
|
58
|
+
meowstro: { name: 'Meowstro', date: '2018-09-09', limit: 1698,
|
59
|
+
traits: ['onyx', 'wowza', 'eclipse']},
|
60
|
+
atlas: { name: 'Atlas', date: '2018-09-07', limit: 998,
|
61
|
+
traits: ['highlander', 'kittencream', 'swarley', 'topoftheworld']},
|
15
62
|
|
16
|
-
|
17
|
-
|
63
|
+
## August
|
64
|
+
vulcant: { name: 'Vulcant', date: '2018-08-31', limit: 20, exclusive: true, ids: [932914,937360,938299,946526,948925,949058,950617,952280,952981,956374,956908,958570,964205,967234,983046,984451,990713,992861,995745,997469] },
|
65
|
+
purrity: { name: 'Purrity', date: '2018-08-23', limit: 5984,
|
66
|
+
traits: ['selkirk', 'chronic', 'cloudwhite', 'cheeky']},
|
67
|
+
rabbidkitty: { name: 'Rabbid Kitty', date: '2018-08-23', limit: 6, exclusive: true, ids: (260..265).to_a, desc: 'Ubisoft Blockchain Heroes Hackathon' },
|
68
|
+
squiddlesworth: { name: 'Squiddlesworth', date: '2018-08-16', limit: 1510, desc: 'Lava Squid Cat',
|
69
|
+
traits: ['sphynx', 'redvelvet', 'patrickstarfish', 'dragontail']},
|
18
70
|
|
19
|
-
|
71
|
+
## July
|
72
|
+
purrspero: { name: 'Purrspero', date: '2018-07-27', limit: 4448,
|
73
|
+
traits: ['dippedcone', 'googly', 'royalpurple', 'beard']},
|
74
|
+
catbury: { name: 'Catbury', date: '2018-07-25', limit: 76,
|
75
|
+
traits: ['ragdoll', 'crazy', 'chocolate', 'mintmacaron', 'yokel', 'WE02']},
|
76
|
+
honu: { name: 'Honu', date: '2018-07-20', limit: 1, exclusive: true, ids: [251], desc: 'Kitties for Good - Save Turtle Habitats' },
|
77
|
+
victoire: { name: 'Victoire', date: '2018-07-18', limit: 1, exclusive: true, ids: [402], desc: 'France Football World Cup Champion' },
|
78
|
+
lulu: { name: 'Lulu', date: '2018-07-13', limit: 999,
|
79
|
+
traits: ['cyan', 'verdigris', 'turtleback', 'salty']},
|
80
|
+
boot: { name: 'Boot', date: '2018-07-05', limit: 1440, desc: 'Football World Cup',
|
81
|
+
traits: ['ganado', 'wiley', 'cerulian', 'rollercoaster'],
|
82
|
+
variants: {
|
83
|
+
belgium: { name: 'Belgium', limit: 97, traits: [['orangesoda','onyx']]}, ## Base Color: Orangesoda / Onyx
|
84
|
+
brazil: { name: 'Brazil', limit: 195, traits: [['hintomint','bananacream','verdigris']]}, ## Base Color: Hintomint / Bananacream / Verdigris
|
85
|
+
croatia: { name: 'Croatia', limit: 253, traits: [['cottoncandy','mauveover','oldlace']]}, ## Base Color: Cottoncandy / Mauveover / Oldlace
|
86
|
+
england: { name: 'England', limit: 168, traits: [['greymatter','martian']]}, ## Base Color: Greymatter / Martian
|
87
|
+
france: { name: 'France', limit: 317, traits: [['harbourfog','cinderella','lavender']]}, ## Base Color: Harbourfog / Cinderella / Lavender
|
88
|
+
russia: { name: 'Russia', limit: 94, traits: [['shadowgrey','salmon','cloudwhite']]}, ## Base Color: Shadowgrey / Salmon/ Cloudwhite
|
89
|
+
sweden: { name: 'Sweden', limit: 123, traits: [['brownies','dragonfruit','redvelvet']]}, ## Base Color: Brownies / Dragonfruit / Redvelvet
|
90
|
+
uruguay: { name: 'Uruguay', limit: 193, traits: [['aquamarine','nachocheez','koala']]}, ## Base Color: Aquamarine / Nachocheez / Koala
|
91
|
+
},
|
92
|
+
},
|
93
|
+
## note: boot - different variants for world cup teams
|
94
|
+
## Although there are 8 unique Fancies, they're actually each a variant on the same Fancy - Boot.
|
95
|
+
## Their colours are different, and you can collect all 8 as a set
|
20
96
|
|
21
|
-
|
97
|
+
## June
|
98
|
+
raspoutine: { name: 'Raspoutine', date: '2018-06-28', limit: 1867,
|
99
|
+
traits: ['buzzed', 'nachocheez', 'sandalwood', 'belch']},
|
100
|
+
furlin: { name: 'Furlin', date: '2018-06-26', limit: 52, exclusive: true, ids: (115..126).to_a + (128..166).to_a },
|
101
|
+
kittypride: { name: 'Kitty Pride', date: '2018-06-21', limit: 1316,
|
102
|
+
traits: ['fabulous','cinderella','garnet']},
|
103
|
+
furrmingo: { name: 'Furrmingo', date: '2018-06-14', limit: 333,
|
104
|
+
traits: ['bobtail', 'egyptiankohl', 'flamingo', 'whixtensions']},
|
22
105
|
|
23
|
-
|
24
|
-
|
106
|
+
## May
|
107
|
+
page: { name: 'Page', date: '2018-05-31', limit: 50_000,
|
108
|
+
traits: ['rascal', 'peach', 'wasntme' ]},
|
109
|
+
"schrödingerscat": { name: "Schrödinger's Cat", date: '2018-05-20', limit: 73,
|
110
|
+
traits: ['forgetmenot','tinybox','PU20','SE25']},
|
111
|
+
chatplongeur: { name: 'Chat Plongeur', date: '2018-05-19', limit: 1910,
|
112
|
+
traits: ['aquamarine', 'skyblue', 'seafoam']},
|
113
|
+
docpurr: { name: 'Doc Purr', date: '2018-05-16', limit: 250,
|
114
|
+
traits: ['persian','spock','raisedbrow','violet','tongue']},
|
115
|
+
celestialcyberdimension: { name: 'Celestial Cyber Dimension', date: '2018-05-12', limit: 1, exclusive: true, ids: [127] },
|
116
|
+
swish: { name: 'Swish', date: '2018-05-08', limit: 2880,
|
117
|
+
traits: ['norwegianforest', 'luckystripes', 'thicccbrowz', 'orangesoda']},
|
25
118
|
|
26
|
-
|
27
|
-
|
119
|
+
## April
|
120
|
+
flutterbee: { name: 'Flutterbee', date: '2018-04-28', limit: 275,
|
121
|
+
traits: ['cloudwhite','jaguar','lemonade','azaleablush','WE14']},
|
122
|
+
vernon: { name: 'Vernon', date: '2018-04-16', limit: 320, desc: 'Spring Equinox Kitty',
|
123
|
+
traits: ['amur','fabulous','cottoncandy','springcrocus','belleblue','soserious']}, ## first, see https://www.cryptokitties.co/kitty/696398
|
28
124
|
|
29
|
-
|
30
|
-
|
125
|
+
## March
|
126
|
+
berry: { name: 'Berry', date: '2018-03-16', limit: 200,
|
127
|
+
traits: ['dragonfruit','thunderstruck','emeraldgreen','apricot','simple']},
|
128
|
+
pussforprogress: { name: 'Puss For Progress', date: '2018-03-08', limit: 1920, desc: "Women's Day",
|
129
|
+
traits: ['himalayan','peach','safetyvest','gerbil']},
|
130
|
+
fortunecat: { name: 'Fortune Cat', name_cn: '红包喵', date: '2018-03-08', limit: 888,
|
131
|
+
traits: ['harbourfog','calicool','swampgreen','sapphire','beard']}, ## todo: check date for china launch specials!!!
|
132
|
+
goldendragoncat: { name: 'Golden Dragon Cat', name_cn: '帝龙喵', date: '2018-03-08', limit: 1, exclusive: true, ids: [888], desc: 'China Launch' }, ## todo: check date for china launch specials!!!
|
133
|
+
goldendogcat: { name: 'Golden Dog Cat', name_cn: '旺财汪', date: '2018-03-08', limit: 11, exclusive: true, ids: [1802,1803,1805,1806,1808,1809,1812,1816]+(1825..1828).to_a, desc: 'China Launch' }, ## todo: check date for china launch specials!!!
|
134
|
+
liondance: { name: 'Lion Dance', name_cn: '咚咚锵', date: '2018-03-07', limit: 888, overflow: 1,
|
135
|
+
traits: ['manx','royalblue','googly','starstruck']},
|
136
|
+
dogcat: { name: 'Dog Cat', name_cn: '汪星爷', date: '2018-03-02', limit: 88, desc: 'Year of the Dog (Greater China)',
|
137
|
+
traits: ['tigerpunk','periwinkle','barkbrown','sweetmeloncakes','yokel']},
|
138
|
+
knightkitty: { name: 'Knight Kitty', date: '2018-03-01', limit: 11, exclusive: true, ids: (104..114).to_a },
|
31
139
|
|
32
|
-
|
33
|
-
|
140
|
+
## February
|
141
|
+
tabby: { name: 'Tabby', date: '2018-02-26', limit: 250,
|
142
|
+
traits: ['ragamuffin','morningglory','otaku','cheeky']},
|
143
|
+
yuricatsuki: { name: 'Yuri Catsuki', date: '2018-02-20', limit: 250, desc: 'Figure Scating Kitty - Winter Olympics (Korea)',
|
144
|
+
traits: ['cymric','tiger','neckbeard','elk']},
|
145
|
+
misterpurrfect: { name: 'Mister Purrfect', date: '2018-02-14', limit: 1000, desc: "Valentine's Day",
|
146
|
+
traits: ['chocolate','baddate','strawberry','wuvme']},
|
147
|
+
earnie: { name: 'Earnie', date: '2018-02-13', limit: 500, desc: 'Earn.com - Golden Kitty Award (Product Hunt)',
|
148
|
+
traits: ['birman','orangesoda','hotrod','grim']},
|
149
|
+
cathena: { name: 'Cathena', date: '2018-02-06', limit: 1, exclusive: true, ids: [500000], desc: '500 000th Kitty' },
|
34
150
|
|
151
|
+
## January
|
152
|
+
'momo-chan': { name: 'Momo-chan', date: '2018-01-31', limit: 500, desc: 'Ninja Kitty',
|
153
|
+
traits: ['onyx','henna','bloodred','wolfgrey','sass']},
|
154
|
+
negato: { name: 'Negato', date: '2018-01-29', limit: 500, desc: 'Ninja Kitty',
|
155
|
+
traits: ['onyx','henna','wolfgrey','slyboots']},
|
156
|
+
stitches: { name: 'Stitches', date: '2018-01-10', limit: 500, desc: 'Zombie Kitty',
|
157
|
+
traits: ['hintomint','seafoam','swampgreen','saycheese']},
|
35
158
|
|
159
|
+
## 2017
|
160
|
+
## December
|
161
|
+
phuziqaat: { name: 'Phu Ziqaat', date: '2017-12-31', limit: 1000, desc: 'Alien Kitty',
|
162
|
+
traits: ['chartreux','spock','alien','pouty']},
|
163
|
+
santaclaws: { name: 'Santa Claws', date: '2017-12-12', limit: 1000, overflow: 2, desc: 'Ho Ho Ho - Santa Claus Kitty',
|
164
|
+
traits: ['cloudwhite','scarlet','beard','wild_d']},
|
165
|
+
mistletoe: { name: 'Mistletoe', date: '2017-12-09', limit: 2000, desc: "XMas Kitty",
|
166
|
+
traits: ['odlace','crazy','gerbil']},
|
167
|
+
dracula: { name: 'Dracula', date: '2017-12-01', limit: 2000,
|
168
|
+
traits: ['laperm','spock','strawberry','WE01']},
|
36
169
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
knightkitty: { name: 'Knight Kitty', limit: 11 },
|
45
|
-
liondance: { name: 'Lion Dance', name_cn: '咚咚锵', limit: 888 },
|
46
|
-
misterpurrfect: { name: 'Mister Purrfect', limit: 1_000, desc: "Valentine's Day" },
|
47
|
-
'momo-chan': { name: 'Momo-chan', limit: 500, desc: 'Ninja Kitty' },
|
48
|
-
negato: { name: 'Negato', limit: 500, desc: 'Ninja Kitty' },
|
49
|
-
pussforprogress: { name: 'Puss For Progress', limit: 1_920, desc: "Women's Day" },
|
50
|
-
tabby: { name: 'Tabby', limit: 250 },
|
51
|
-
yuricatsuki: { name: 'Yuri Catsuki', limit: 250, desc: 'Figure Scating Kitty - Winter Olympics (Korea)' },
|
52
|
-
vernon: { name: 'Vernon', limit: 320, desc: 'Spring Equinox Kitty' }, ## first, see https://www.cryptokitties.co/kitty/696398
|
170
|
+
## November
|
171
|
+
ducat: { name: 'Du Cat', date: '2017-11-29', limit: 10_000,
|
172
|
+
traits: ['cymric','tongue']},
|
173
|
+
genesis: { name: 'Genesis', date: '2017-11-24', limit: 1, exclusive: true, ids: [1], desc: '1st Kitty'},
|
174
|
+
shipcat: { name: 'Ship Cat', date: '2017-11-23', limit: 2000,
|
175
|
+
traits: ['sphynx','orangesoda','luckystripe','crazy']},
|
176
|
+
bugcat: { name: 'Bug Cat', date: '2017-11-23', limit: 3, exclusive: true, ids: [101,102,103], desc: 'Bug Bounty Kitty' },
|
53
177
|
}
|
data/lib/copycats/gene.rb
CHANGED
@@ -89,46 +89,4 @@ class Gene
|
|
89
89
|
gene
|
90
90
|
end
|
91
91
|
|
92
|
-
|
93
|
-
|
94
|
-
#############################
|
95
|
-
# Tier 1 Tier 2 Tier 3 Tier 4 Tier 5
|
96
|
-
## (1-g) (h-p) (q-t) (u,v) (w)
|
97
|
-
|
98
|
-
### todo/check: move TIER mapping to Genome class or ... - why? why not?
|
99
|
-
TIER = { ## todo/fix: use an algo to calculate - why? why not?
|
100
|
-
'1' => 1,
|
101
|
-
'2' => 1,
|
102
|
-
'3' => 1,
|
103
|
-
'4' => 1,
|
104
|
-
'5' => 1,
|
105
|
-
'6' => 1,
|
106
|
-
'7' => 1,
|
107
|
-
'8' => 1,
|
108
|
-
'9' => 1,
|
109
|
-
'a' => 1,
|
110
|
-
'b' => 1,
|
111
|
-
'c' => 1,
|
112
|
-
'd' => 1,
|
113
|
-
'e' => 1,
|
114
|
-
'f' => 1,
|
115
|
-
'g' => 1,
|
116
|
-
'h' => 2,
|
117
|
-
'i' => 2,
|
118
|
-
'j' => 2,
|
119
|
-
'k' => 2,
|
120
|
-
'm' => 2,
|
121
|
-
'n' => 2,
|
122
|
-
'o' => 2,
|
123
|
-
'p' => 2,
|
124
|
-
'q' => 3,
|
125
|
-
'r' => 3,
|
126
|
-
's' => 3,
|
127
|
-
't' => 3,
|
128
|
-
'u' => 4,
|
129
|
-
'v' => 4,
|
130
|
-
'w' => 5,
|
131
|
-
'x' => nil
|
132
|
-
}
|
133
|
-
|
134
92
|
end # class Gene
|
@@ -3,8 +3,6 @@
|
|
3
3
|
|
4
4
|
## load all *.file in data folder
|
5
5
|
|
6
|
-
|
7
|
-
|
8
6
|
def find_datafiles( root='.' )
|
9
7
|
files = []
|
10
8
|
## todo/check: include all subfolders - why? why not?
|
@@ -15,99 +13,6 @@ def find_datafiles( root='.' )
|
|
15
13
|
end
|
16
14
|
|
17
15
|
|
18
|
-
def connect( config={} )
|
19
|
-
if config.empty?
|
20
|
-
puts "ENV['DATBASE_URL'] - >#{ENV['DATABASE_URL']}<"
|
21
|
-
|
22
|
-
### change default to ./copycats.db ?? why? why not?
|
23
|
-
db = URI.parse( ENV['DATABASE_URL'] || 'sqlite3:///kitties.db' )
|
24
|
-
|
25
|
-
if db.scheme == 'postgres'
|
26
|
-
config = {
|
27
|
-
adapter: 'postgresql',
|
28
|
-
host: db.host,
|
29
|
-
port: db.port,
|
30
|
-
username: db.user,
|
31
|
-
password: db.password,
|
32
|
-
database: db.path[1..-1],
|
33
|
-
encoding: 'utf8'
|
34
|
-
}
|
35
|
-
else # assume sqlite3
|
36
|
-
config = {
|
37
|
-
adapter: db.scheme, # sqlite3
|
38
|
-
database: db.path[1..-1] # world.db (NB: cut off leading /, thus 1..-1)
|
39
|
-
}
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
|
-
|
44
|
-
puts "Connecting to db using settings: "
|
45
|
-
pp config
|
46
|
-
ActiveRecord::Base.establish_connection( config )
|
47
|
-
ActiveRecord::Base.logger = Logger.new( STDOUT )
|
48
|
-
## ActiveRecord::Base.colorize_logging = false - no longer exists - check new api/config setting?
|
49
|
-
|
50
|
-
## if sqlite3 add (use) some pragmas for speedups
|
51
|
-
if config[:adapter] == 'sqlite3'
|
52
|
-
## check/todo: if in memory e.g. ':memory:' no pragma needed!!
|
53
|
-
con = ActiveRecord::Base.connection
|
54
|
-
con.execute( 'PRAGMA synchronous=OFF;' )
|
55
|
-
con.execute( 'PRAGMA journal_mode=OFF;' )
|
56
|
-
con.execute( 'PRAGMA temp_store=MEMORY;' )
|
57
|
-
end
|
58
|
-
end ## method connect
|
59
|
-
|
60
|
-
|
61
|
-
def setup_db
|
62
|
-
## build schema
|
63
|
-
CreateDb.new.up
|
64
|
-
end
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
### todo/fix:
|
69
|
-
## make trait_ids_cache more (re)usable - fix global!!!!
|
70
|
-
TRAIT_IDS_CACHE = {}
|
71
|
-
|
72
|
-
|
73
|
-
def setup_traits
|
74
|
-
## for speed - turn off logging for info/debug/etc. levels
|
75
|
-
ActiveRecord::Base.logger.level = :warn
|
76
|
-
|
77
|
-
### add traits
|
78
|
-
TRAITS.each do |trait_key, trait_hash|
|
79
|
-
|
80
|
-
trait_t = Copycats::Model::TraitType.new
|
81
|
-
trait_t.name = trait_hash[:name]
|
82
|
-
trait_t.key = trait_key.to_s
|
83
|
-
trait_t.save!
|
84
|
-
|
85
|
-
cache = {}
|
86
|
-
|
87
|
-
Kai::ALPHABET.each_char.with_index do |kai,n|
|
88
|
-
name = trait_hash[:kai][kai]
|
89
|
-
name = '?' if name.nil? || name.empty?
|
90
|
-
|
91
|
-
tier = Gene::TIER[kai]
|
92
|
-
|
93
|
-
puts "Kai: #{kai} (#{n}) /#{tier}, Cattribute: #{name}"
|
94
|
-
trait = Copycats::Model::Trait.new
|
95
|
-
trait.name = name
|
96
|
-
trait.kai = kai
|
97
|
-
trait.n = n
|
98
|
-
trait.tier = tier
|
99
|
-
trait.trait_type_id = trait_t.id
|
100
|
-
trait.save!
|
101
|
-
|
102
|
-
cache[ kai ] = trait.id
|
103
|
-
end
|
104
|
-
|
105
|
-
TRAIT_IDS_CACHE[ trait_key ] = { id: trait_t.id,
|
106
|
-
kai: cache }
|
107
|
-
end
|
108
|
-
end
|
109
|
-
|
110
|
-
|
111
16
|
def read_datafiles( data_dir: './data' )
|
112
17
|
files = find_datafiles( data_dir )
|
113
18
|
pp files
|
@@ -0,0 +1,94 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
|
4
|
+
def connect( config={} )
|
5
|
+
if config.empty?
|
6
|
+
puts "ENV['DATBASE_URL'] - >#{ENV['DATABASE_URL']}<"
|
7
|
+
|
8
|
+
### change default to ./copycats.db ?? why? why not?
|
9
|
+
db = URI.parse( ENV['DATABASE_URL'] || 'sqlite3:///kitties.db' )
|
10
|
+
|
11
|
+
if db.scheme == 'postgres'
|
12
|
+
config = {
|
13
|
+
adapter: 'postgresql',
|
14
|
+
host: db.host,
|
15
|
+
port: db.port,
|
16
|
+
username: db.user,
|
17
|
+
password: db.password,
|
18
|
+
database: db.path[1..-1],
|
19
|
+
encoding: 'utf8'
|
20
|
+
}
|
21
|
+
else # assume sqlite3
|
22
|
+
config = {
|
23
|
+
adapter: db.scheme, # sqlite3
|
24
|
+
database: db.path[1..-1] # world.db (NB: cut off leading /, thus 1..-1)
|
25
|
+
}
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
|
30
|
+
puts "Connecting to db using settings: "
|
31
|
+
pp config
|
32
|
+
ActiveRecord::Base.establish_connection( config )
|
33
|
+
ActiveRecord::Base.logger = Logger.new( STDOUT )
|
34
|
+
## ActiveRecord::Base.colorize_logging = false - no longer exists - check new api/config setting?
|
35
|
+
|
36
|
+
## if sqlite3 add (use) some pragmas for speedups
|
37
|
+
if config[:adapter] == 'sqlite3'
|
38
|
+
## check/todo: if in memory e.g. ':memory:' no pragma needed!!
|
39
|
+
con = ActiveRecord::Base.connection
|
40
|
+
con.execute( 'PRAGMA synchronous=OFF;' )
|
41
|
+
con.execute( 'PRAGMA journal_mode=OFF;' )
|
42
|
+
con.execute( 'PRAGMA temp_store=MEMORY;' )
|
43
|
+
end
|
44
|
+
end ## method connect
|
45
|
+
|
46
|
+
|
47
|
+
def setup_db
|
48
|
+
## build schema
|
49
|
+
CreateDb.new.up
|
50
|
+
end
|
51
|
+
|
52
|
+
|
53
|
+
|
54
|
+
### todo/fix:
|
55
|
+
## make trait_ids_cache more (re)usable - fix global!!!!
|
56
|
+
TRAIT_IDS_CACHE = {}
|
57
|
+
|
58
|
+
|
59
|
+
def setup_traits
|
60
|
+
## for speed - turn off logging for info/debug/etc. levels
|
61
|
+
ActiveRecord::Base.logger.level = :warn
|
62
|
+
|
63
|
+
### add traits
|
64
|
+
TRAITS.each do |trait_key, trait_hash|
|
65
|
+
|
66
|
+
trait_t = Copycats::Model::TraitType.new
|
67
|
+
trait_t.name = trait_hash[:name]
|
68
|
+
trait_t.key = trait_key.to_s
|
69
|
+
trait_t.save!
|
70
|
+
|
71
|
+
cache = {}
|
72
|
+
|
73
|
+
Kai::ALPHABET.each_with_index do |kai,n|
|
74
|
+
name = trait_hash[:kai][kai]
|
75
|
+
name = '?' if name.nil? || name.empty?
|
76
|
+
|
77
|
+
tier = Gene::TIER[kai]
|
78
|
+
|
79
|
+
puts "Kai: #{kai} (#{n}) /#{tier}, Cattribute: #{name}"
|
80
|
+
trait = Copycats::Model::Trait.new
|
81
|
+
trait.name = name
|
82
|
+
trait.kai = kai
|
83
|
+
trait.n = n
|
84
|
+
trait.tier = tier
|
85
|
+
trait.trait_type_id = trait_t.id
|
86
|
+
trait.save!
|
87
|
+
|
88
|
+
cache[ kai ] = trait.id
|
89
|
+
end
|
90
|
+
|
91
|
+
TRAIT_IDS_CACHE[ trait_key ] = { id: trait_t.id,
|
92
|
+
kai: cache }
|
93
|
+
end
|
94
|
+
end
|
@@ -23,15 +23,16 @@ def build
|
|
23
23
|
items = []
|
24
24
|
Kai::ALPHABET.each_char do |kai|
|
25
25
|
value = trait[:kai][kai]
|
26
|
+
code = "#{trait[:code]}%02d" % Kai::NUMBER[kai] ## e.g. FU00, FU01, FU02, etc.
|
26
27
|
value = '?' if value.nil? || value.empty?
|
27
|
-
items << [kai, value]
|
28
|
+
items << [kai, code, value]
|
28
29
|
end
|
29
30
|
|
30
31
|
items.each do |item|
|
31
|
-
puts "#{item[0]} #{item[1]}"
|
32
|
+
puts "#{item[0]} #{item[1]} #{item[2]}"
|
32
33
|
end
|
33
34
|
|
34
|
-
buf << "## #{trait[:name]} (Genes #{trait[:genes]}
|
35
|
+
buf << "## #{trait[:name]} (#{trait[:code]}) - Genes #{trait[:genes]}\n\n"
|
35
36
|
buf << make_table( items )
|
36
37
|
buf << "\n\n"
|
37
38
|
end
|
@@ -41,17 +42,39 @@ def build
|
|
41
42
|
buf
|
42
43
|
end ## method build
|
43
44
|
|
45
|
+
|
46
|
+
##
|
47
|
+
## todo/fix: use "shared" link helpers!!!!!
|
48
|
+
def kitties_search( q )
|
49
|
+
"https://www.cryptokitties.co/search?include=sale,sire,other&search=#{q}"
|
50
|
+
end
|
51
|
+
|
52
|
+
|
44
53
|
def make_table( items )
|
45
|
-
rows = make_rows( items, columns:
|
54
|
+
rows = make_rows( items, columns: 2 ) ## was 4
|
46
55
|
pp rows
|
47
56
|
|
48
57
|
buf = ""
|
49
|
-
buf << "|Kai|Cattribute |Kai|
|
50
|
-
buf << "
|
58
|
+
buf << "|Kai|Code|Cattribute |Kai|Code|Cattribute |\n"
|
59
|
+
buf << "|--:|---:|-------------|--:|---:|------------|\n"
|
51
60
|
|
52
61
|
rows.each do |row|
|
53
62
|
buf << "| "
|
54
|
-
|
63
|
+
|
64
|
+
parts = row.map do |item|
|
65
|
+
kai = item[0]
|
66
|
+
name = item[2]
|
67
|
+
|
68
|
+
if name == '?'
|
69
|
+
cattribute = "?"
|
70
|
+
else
|
71
|
+
cattribute = "**[#{name}](#{kitties_search(name)})** #{MEWTATION_LEVEL[kai]}"
|
72
|
+
end
|
73
|
+
|
74
|
+
"#{item[0]} | #{item[1]} | #{cattribute}"
|
75
|
+
end
|
76
|
+
|
77
|
+
buf << parts.join( " | " )
|
55
78
|
buf << " |\n"
|
56
79
|
end
|
57
80
|
|
@@ -60,7 +83,7 @@ end
|
|
60
83
|
|
61
84
|
|
62
85
|
## helpers
|
63
|
-
def make_rows( items, columns:
|
86
|
+
def make_rows( items, columns: 2 )
|
64
87
|
offset = items.size / columns
|
65
88
|
pp offset
|
66
89
|
|
@@ -74,7 +97,7 @@ end
|
|
74
97
|
|
75
98
|
|
76
99
|
def save( path )
|
77
|
-
File.open( path, "w" ) do |f|
|
100
|
+
File.open( path, "w:utf-8" ) do |f|
|
78
101
|
f.write build
|
79
102
|
end
|
80
103
|
end
|
data/lib/copycats/traits.rb
CHANGED
@@ -17,7 +17,7 @@ TRAITS =
|
|
17
17
|
{
|
18
18
|
body: {
|
19
19
|
genes: '0-3',
|
20
|
-
name: 'Fur',
|
20
|
+
name: 'Fur', code: 'FU',
|
21
21
|
kai: {
|
22
22
|
'1' => 'savannah',
|
23
23
|
'2' => 'selkirk',
|
@@ -55,14 +55,14 @@ TRAITS =
|
|
55
55
|
},
|
56
56
|
pattern: {
|
57
57
|
genes: '4-7',
|
58
|
-
name: 'Pattern',
|
58
|
+
name: 'Pattern', code: 'PA',
|
59
59
|
kai: {
|
60
60
|
'1' => 'vigilante',
|
61
61
|
'2' => 'tiger',
|
62
62
|
'3' => 'rascal',
|
63
63
|
'4' => 'ganado',
|
64
64
|
'5' => 'leopard',
|
65
|
-
'6' => 'camo
|
65
|
+
'6' => 'camo',
|
66
66
|
'7' => 'rorschach',
|
67
67
|
'8' => 'spangled',
|
68
68
|
'9' => 'calicool',
|
@@ -93,7 +93,7 @@ TRAITS =
|
|
93
93
|
},
|
94
94
|
coloreyes: {
|
95
95
|
genes: '8-11',
|
96
|
-
name: 'Eye Color',
|
96
|
+
name: 'Eye Color', code: 'EC',
|
97
97
|
kai: {
|
98
98
|
'1' => 'thundergrey',
|
99
99
|
'2' => 'gold',
|
@@ -131,7 +131,7 @@ TRAITS =
|
|
131
131
|
},
|
132
132
|
eyes: {
|
133
133
|
genes: '12-15',
|
134
|
-
name: 'Eye Shape', ## eye type
|
134
|
+
name: 'Eye Shape', code: 'ES', ## eye type
|
135
135
|
kai: {
|
136
136
|
'1' => 'swarley',
|
137
137
|
'2' => 'wonky',
|
@@ -169,7 +169,7 @@ TRAITS =
|
|
169
169
|
},
|
170
170
|
color1: {
|
171
171
|
genes: '16-19',
|
172
|
-
name: 'Base Color', ## colorprimary / body color
|
172
|
+
name: 'Base Color', code: 'BC', ## colorprimary / body color
|
173
173
|
kai: {
|
174
174
|
'1' => 'shadowgrey',
|
175
175
|
'2' => 'salmon',
|
@@ -207,7 +207,7 @@ TRAITS =
|
|
207
207
|
},
|
208
208
|
color2: {
|
209
209
|
genes: '20-23',
|
210
|
-
name: 'Highlight Color',
|
210
|
+
name: 'Highlight Color', code: 'HC', ## colorsecondary / sec color / pattern color
|
211
211
|
kai: {
|
212
212
|
'1' => 'cyborg',
|
213
213
|
'2' => 'springcrocus',
|
@@ -245,7 +245,7 @@ TRAITS =
|
|
245
245
|
},
|
246
246
|
color3: {
|
247
247
|
genes: '24-27',
|
248
|
-
name: 'Accent Color',
|
248
|
+
name: 'Accent Color', code: 'AC', ## colortertiary
|
249
249
|
kai: {
|
250
250
|
'1' => 'belleblue',
|
251
251
|
'2' => 'sandalwood',
|
@@ -283,7 +283,7 @@ TRAITS =
|
|
283
283
|
},
|
284
284
|
wild: {
|
285
285
|
genes: '28-31',
|
286
|
-
name: 'Wild',
|
286
|
+
name: 'Wild', code: 'WE',
|
287
287
|
kai: {
|
288
288
|
'h' => 'littlefoot',
|
289
289
|
'i' => 'elk',
|
@@ -292,6 +292,7 @@ TRAITS =
|
|
292
292
|
'm' => 'daemonwings',
|
293
293
|
'n' => 'featherbrain',
|
294
294
|
'o' => 'flapflap',
|
295
|
+
'p' => 'daemonhorns',
|
295
296
|
'q' => 'dragontail',
|
296
297
|
'r' => 'aflutter',
|
297
298
|
's' => 'foghornpawhorn',
|
@@ -304,7 +305,7 @@ TRAITS =
|
|
304
305
|
},
|
305
306
|
mouth: {
|
306
307
|
genes: '32-35',
|
307
|
-
name: 'Mouth',
|
308
|
+
name: 'Mouth', code: 'MO',
|
308
309
|
kai: {
|
309
310
|
'1' => 'whixtensions',
|
310
311
|
'2' => 'wasntme',
|
@@ -340,9 +341,9 @@ TRAITS =
|
|
340
341
|
'x' => ''
|
341
342
|
}
|
342
343
|
},
|
343
|
-
|
344
|
+
environment: {
|
344
345
|
genes: '36-39',
|
345
|
-
name: 'Environment',
|
346
|
+
name: 'Environment', code: 'EN',
|
346
347
|
kai: {
|
347
348
|
'h' => 'salty',
|
348
349
|
'i' => 'dune',
|
@@ -360,16 +361,170 @@ TRAITS =
|
|
360
361
|
'v' => 'prism',
|
361
362
|
'w' => 'junglebook',
|
362
363
|
'x' => ''
|
363
|
-
}
|
364
|
+
}
|
364
365
|
},
|
365
|
-
|
366
|
+
secret: {
|
366
367
|
genes: '40-43',
|
367
|
-
name: 'Y Gene', ## todo: change to Y Gene or Y (see https://guide.cryptokitties.co/guide/cat-features/genes)
|
368
|
-
kai: { }
|
368
|
+
name: 'Secret Y Gene', code: 'SE', ## todo: change to Y Gene or Y (see https://guide.cryptokitties.co/guide/cat-features/genes)
|
369
|
+
kai: { }
|
370
|
+
## use alpha_1, alpha_2, ... - why? why not?
|
371
|
+
## use beta_1, beta_2, ... - why? why not?
|
372
|
+
## use gamma_1, gamma_2, ... - why? why not?
|
369
373
|
},
|
370
|
-
|
374
|
+
prestige: {
|
371
375
|
genes: '44-47',
|
372
|
-
name: 'Purrstige',
|
373
|
-
kai: { }
|
376
|
+
name: 'Purrstige', code: 'PU',
|
377
|
+
kai: { }
|
378
|
+
## prune, furball, duckduckcat, or thatsawrap - more like fancies (not really traits)
|
374
379
|
}
|
375
380
|
}
|
381
|
+
|
382
|
+
|
383
|
+
### build "reverse" lookup tables
|
384
|
+
|
385
|
+
TRAITS_BY_NAME = {} # e.g. savannah, selkirk, chantilly, ...
|
386
|
+
TRAITS_BY_CODE = {} # e.g. FU00, FU01, FU02, ...
|
387
|
+
|
388
|
+
TRAITS.each do |key,h|
|
389
|
+
h[:kai].each do |kai, name|
|
390
|
+
|
391
|
+
num = Kai::NUMBER[kai]
|
392
|
+
code = "#{h[:code]}#{'%02d' % num}" ## e.g. FU00, FU01, etc.
|
393
|
+
|
394
|
+
rec = {}
|
395
|
+
rec[:name] = name
|
396
|
+
rec[:kai] = kai
|
397
|
+
rec[:code] = code
|
398
|
+
rec[:type] = key ## todo - use trait instead of type (use string not symbol?) - why? why not?
|
399
|
+
|
400
|
+
if TRAITS_BY_NAME[name]
|
401
|
+
puts "warn: duplicate trait name!! overwritting old #{name}:"
|
402
|
+
pp TRAITS_BY_NAME[name]
|
403
|
+
## add count - why? why not?
|
404
|
+
## note: totebasic used three (3) times!!!
|
405
|
+
## how to make name "unique" ? - add kai e.g. totebase_g etc. - why? why not?
|
406
|
+
end
|
407
|
+
|
408
|
+
|
409
|
+
TRAITS_BY_NAME[name] = rec unless name.empty? || name == '?'
|
410
|
+
TRAITS_BY_CODE[code] = rec
|
411
|
+
end
|
412
|
+
end
|
413
|
+
|
414
|
+
|
415
|
+
### todo/check: move TIER mapping to Genome class or ... - why? why not?
|
416
|
+
|
417
|
+
##################################
|
418
|
+
# Tier 0 (Base) (1-g)
|
419
|
+
# Tier 1 (Mewtation I) (h-p)
|
420
|
+
# Tier 2 (Mewtation II) (q-t)
|
421
|
+
# Tier 3 (Mewtation III) (u,v)
|
422
|
+
# Tier 4 (Mewtation IIII) (w)
|
423
|
+
#
|
424
|
+
TIER = { ## todo/fix: use an algo to calculate - why? why not?
|
425
|
+
'1' => 0,
|
426
|
+
'2' => 0,
|
427
|
+
'3' => 0,
|
428
|
+
'4' => 0,
|
429
|
+
'5' => 0,
|
430
|
+
'6' => 0,
|
431
|
+
'7' => 0,
|
432
|
+
'8' => 0,
|
433
|
+
'9' => 0,
|
434
|
+
'a' => 0,
|
435
|
+
'b' => 0,
|
436
|
+
'c' => 0,
|
437
|
+
'd' => 0,
|
438
|
+
'e' => 0,
|
439
|
+
'f' => 0,
|
440
|
+
'g' => 0,
|
441
|
+
'h' => 1,
|
442
|
+
'i' => 1,
|
443
|
+
'j' => 1,
|
444
|
+
'k' => 1,
|
445
|
+
'm' => 1,
|
446
|
+
'n' => 1,
|
447
|
+
'o' => 1,
|
448
|
+
'p' => 1,
|
449
|
+
'q' => 2,
|
450
|
+
'r' => 2,
|
451
|
+
's' => 2,
|
452
|
+
't' => 2,
|
453
|
+
'u' => 3,
|
454
|
+
'v' => 3,
|
455
|
+
'w' => 4,
|
456
|
+
'x' => nil
|
457
|
+
}
|
458
|
+
|
459
|
+
## (quick 'n' dirty) kai to mutation/mewtation level (I,II,III,IIII)
|
460
|
+
MUTATION_LEVEL = {
|
461
|
+
'1' => '',
|
462
|
+
'2' => '',
|
463
|
+
'3' => '',
|
464
|
+
'4' => '',
|
465
|
+
'5' => '',
|
466
|
+
'6' => '',
|
467
|
+
'7' => '',
|
468
|
+
'8' => '',
|
469
|
+
'9' => '',
|
470
|
+
'a' => '',
|
471
|
+
'b' => '',
|
472
|
+
'c' => '',
|
473
|
+
'd' => '',
|
474
|
+
'e' => '',
|
475
|
+
'f' => '',
|
476
|
+
'g' => '',
|
477
|
+
'h' => 'I',
|
478
|
+
'i' => 'I',
|
479
|
+
'j' => 'I',
|
480
|
+
'k' => 'I',
|
481
|
+
'm' => 'I',
|
482
|
+
'n' => 'I',
|
483
|
+
'o' => 'I',
|
484
|
+
'p' => 'I',
|
485
|
+
'q' => 'II',
|
486
|
+
'r' => 'II',
|
487
|
+
's' => 'II',
|
488
|
+
't' => 'II',
|
489
|
+
'u' => 'III',
|
490
|
+
'v' => 'III',
|
491
|
+
'w' => 'IIII',
|
492
|
+
'x' => ''
|
493
|
+
}
|
494
|
+
MEWTATION_LEVEL = MUTATION_LEVEL ## add alias
|
495
|
+
|
496
|
+
MUTATION_PAIR = {
|
497
|
+
'1' => '', ## todo: use nil for "" - why? why not?
|
498
|
+
'2' => '',
|
499
|
+
'3' => '',
|
500
|
+
'4' => '',
|
501
|
+
'5' => '',
|
502
|
+
'6' => '',
|
503
|
+
'7' => '',
|
504
|
+
'8' => '',
|
505
|
+
'9' => '',
|
506
|
+
'a' => '',
|
507
|
+
'b' => '',
|
508
|
+
'c' => '',
|
509
|
+
'd' => '',
|
510
|
+
'e' => '',
|
511
|
+
'f' => '',
|
512
|
+
'g' => '',
|
513
|
+
'h' => '1+2',
|
514
|
+
'i' => '3+4',
|
515
|
+
'j' => '5+6',
|
516
|
+
'k' => '7+8',
|
517
|
+
'm' => '9+a',
|
518
|
+
'n' => 'b+c',
|
519
|
+
'o' => 'd+e',
|
520
|
+
'p' => 'f+g',
|
521
|
+
'q' => 'h+i',
|
522
|
+
'r' => 'j+k',
|
523
|
+
's' => 'm+n',
|
524
|
+
't' => 'o+p',
|
525
|
+
'u' => 'q+r',
|
526
|
+
'v' => 's+t',
|
527
|
+
'w' => 'u+v',
|
528
|
+
'x' => ''
|
529
|
+
}
|
530
|
+
MEWTATION_PAIR = MUTATION_PAIR ## add alias
|
@@ -0,0 +1,294 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
|
4
|
+
TRAITS_TIMELINE =
|
5
|
+
{
|
6
|
+
## 2018
|
7
|
+
## november
|
8
|
+
dune: { date: '2018-11-21' },
|
9
|
+
secretgarden: { date: '2018-11-21' },
|
10
|
+
floorislava: { date: '2018-11-21' },
|
11
|
+
junglebook: { date: '2018-11-21' },
|
12
|
+
|
13
|
+
meowgarine: { date: '2018-11-16' },
|
14
|
+
cornflower: { date: '2018-11-16' },
|
15
|
+
icicle: { date: '2018-11-16' },
|
16
|
+
hotcocoa: { date: '2018-11-16' },
|
17
|
+
firstblush: { date: '2018-11-16' },
|
18
|
+
|
19
|
+
featherbrain: { date: '2018-11-13' },
|
20
|
+
foghornpawhorn: { date: '2018-11-13' },
|
21
|
+
alicorn: { date: '2018-11-13' },
|
22
|
+
wyrm: { date: '2018-11-13' },
|
23
|
+
|
24
|
+
mittens: { date: '2018-11-06' },
|
25
|
+
arcreactor: { date: '2018-11-06' },
|
26
|
+
allyouneed: { date: '2018-11-06' },
|
27
|
+
gyre: { date: '2018-11-06' },
|
28
|
+
moonrise: { date: '2018-11-06' },
|
29
|
+
|
30
|
+
## october
|
31
|
+
metime: { date: '2018-10-26' },
|
32
|
+
jacked: { date: '2018-10-26' },
|
33
|
+
prism: { date: '2018-10-26' },
|
34
|
+
|
35
|
+
isotope: { date: '2018-10-23' },
|
36
|
+
bridesmaid: { date: '2018-10-23' },
|
37
|
+
downbythebay: { date: '2018-10-23' },
|
38
|
+
gemini: { date: '2018-10-23' },
|
39
|
+
kaleidoscope: { date: '2018-10-23' },
|
40
|
+
|
41
|
+
## thatsawrap: { date: '2018-10-21' }, ## todo: move prestige to fancies!!!
|
42
|
+
## duckduckcat: { date: '2018-10-19' }, ## todo: move prestige to fancies!!!
|
43
|
+
|
44
|
+
siberian: { date: '2018-10-17' },
|
45
|
+
lynx: { date: '2018-10-17' },
|
46
|
+
toyger: { date: '2018-10-17' },
|
47
|
+
burmilla: { date: '2018-10-17' },
|
48
|
+
liger: { date: '2018-10-17' },
|
49
|
+
|
50
|
+
moue: { date: '2018-10-10' },
|
51
|
+
majestic: { date: '2018-10-10' },
|
52
|
+
satiated: { date: '2018-10-10' },
|
53
|
+
struck: { date: '2018-10-10' },
|
54
|
+
delite: { date: '2018-10-10' },
|
55
|
+
|
56
|
+
myparade: { date: '2018-10-03' },
|
57
|
+
roadtogold: { date: '2018-10-03' },
|
58
|
+
|
59
|
+
|
60
|
+
## september
|
61
|
+
dreamboat: { date: '2018-09-21' },
|
62
|
+
fallspice: { date: '2018-09-21' },
|
63
|
+
mallowflower: { date: '2018-09-21' },
|
64
|
+
hanauma: { date: '2018-09-21' },
|
65
|
+
summerbonnet: { date: '2018-09-21' },
|
66
|
+
|
67
|
+
## prune: { date: '2018-09-19' }, ## todo: move prestige to fancies!!!
|
68
|
+
## furball: { date: '2018-09-19' }, ## todo: move prestige to fancies!!!
|
69
|
+
|
70
|
+
firedup: { date: '2018-09-06' },
|
71
|
+
hacker: { date: '2018-09-06' },
|
72
|
+
drama: { date: '2018-09-06' },
|
73
|
+
candyshoppe: { date: '2018-09-06' },
|
74
|
+
|
75
|
+
asif: { date: '2018-09-05' },
|
76
|
+
|
77
|
+
## august
|
78
|
+
dragonwings: { date: '2018-08-29' },
|
79
|
+
aflutter: { date: '2018-08-29' },
|
80
|
+
ducky: { date: '2018-08-29' },
|
81
|
+
|
82
|
+
chantilly: { date: '2018-08-23' },
|
83
|
+
mekong: { date: '2018-08-23' },
|
84
|
+
fox: { date: '2018-08-23' },
|
85
|
+
lykoi: { date: '2018-08-23' },
|
86
|
+
|
87
|
+
tundra: { date: '2018-08-17' },
|
88
|
+
glacier: { date: '2018-08-17' },
|
89
|
+
hyacinth: { date: '2018-08-17' },
|
90
|
+
shamrock: { date: '2018-08-17' },
|
91
|
+
|
92
|
+
inflatablepool: { date: '2018-08-08' },
|
93
|
+
peppermint: { date: '2018-08-08' },
|
94
|
+
ooze: { date: '2018-08-08' },
|
95
|
+
cyborg: { date: '2018-08-08' },
|
96
|
+
|
97
|
+
scorpius: { date: '2018-08-01' },
|
98
|
+
splat: { date: '2018-08-01' },
|
99
|
+
vigilante: { date: '2018-08-01' },
|
100
|
+
avatar: { date: '2018-08-01' },
|
101
|
+
|
102
|
+
## july
|
103
|
+
topoftheworld: { date: '2018-07-25' },
|
104
|
+
confuzzled: { date: '2018-07-25' },
|
105
|
+
samwise: { date: '2018-07-25' },
|
106
|
+
walrus: { date: '2018-07-25' },
|
107
|
+
|
108
|
+
olive: { date: '2018-07-20' },
|
109
|
+
pinefresh: { date: '2018-07-20' },
|
110
|
+
oasis: { date: '2018-07-20' },
|
111
|
+
dioscuri: { date: '2018-07-20' },
|
112
|
+
|
113
|
+
juju: { date: '2018-07-18' },
|
114
|
+
frozen: { date: '2018-07-18' },
|
115
|
+
|
116
|
+
kalahari: { date: '2018-07-13' },
|
117
|
+
atlantis: { date: '2018-07-13' },
|
118
|
+
|
119
|
+
fangtastic: { date: '2018-07-06' },
|
120
|
+
|
121
|
+
## june
|
122
|
+
littlefoot: { date: '2018-06-29' },
|
123
|
+
dragontail: { date: '2018-06-29' },
|
124
|
+
|
125
|
+
padparadscha: { date: '2018-06-28' },
|
126
|
+
rosequartz: { date: '2018-06-28' },
|
127
|
+
universe: { date: '2018-06-28' },
|
128
|
+
|
129
|
+
martian: { date: '2018-06-22' },
|
130
|
+
redvelvet: { date: '2018-06-22' },
|
131
|
+
brownies: { date: '2018-06-22' },
|
132
|
+
|
133
|
+
wowza: { date: '2018-06-19' },
|
134
|
+
tendertears: { date: '2018-06-19' },
|
135
|
+
|
136
|
+
impish: { date: '2018-06-14' },
|
137
|
+
|
138
|
+
finalfrontier: { date: '2018-06-11' },
|
139
|
+
|
140
|
+
cobalt: { date: '2018-06-09' },
|
141
|
+
cashewmilk: { date: '2018-06-09' },
|
142
|
+
buttercup: { date: '2018-06-09' },
|
143
|
+
|
144
|
+
manul: { date: '2018-06-05' },
|
145
|
+
balinese: { date: '2018-06-05' },
|
146
|
+
kurilian: { date: '2018-06-05' },
|
147
|
+
|
148
|
+
## may
|
149
|
+
unicorn: { date: '2018-05-31' },
|
150
|
+
flapflap: { date: '2018-05-31' },
|
151
|
+
|
152
|
+
dahlia: { date: '2018-05-29' },
|
153
|
+
palejade: { date: '2018-05-29' },
|
154
|
+
autumnmoon: { date: '2018-05-29' },
|
155
|
+
|
156
|
+
razzledazzle: { date: '2018-05-24' },
|
157
|
+
highsociety: { date: '2018-05-24' },
|
158
|
+
rorschach: { date: '2018-05-24' },
|
159
|
+
|
160
|
+
tinybox: { date: '2018-05-19' },
|
161
|
+
|
162
|
+
butterscotch: { date: '2018-05-10' },
|
163
|
+
garnet: { date: '2018-05-10' },
|
164
|
+
mertail: { date: '2018-05-10' },
|
165
|
+
pearl: { date: '2018-05-10' },
|
166
|
+
|
167
|
+
highlander: { date: '2018-05-08' },
|
168
|
+
koladiviya: { date: '2018-05-08' },
|
169
|
+
|
170
|
+
swarley: { date: '2018-05-04' },
|
171
|
+
oceanid: { date: '2018-05-04' },
|
172
|
+
chameleon: { date: '2018-05-04' },
|
173
|
+
bornwithit: { date: '2018-05-04' },
|
174
|
+
|
175
|
+
## april
|
176
|
+
cinderella: { date: '2018-04-27' },
|
177
|
+
lavender: { date: '2018-04-27' },
|
178
|
+
|
179
|
+
daemonhorns: { date: '2018-04-24' },
|
180
|
+
salty: { date: '2018-04-24' },
|
181
|
+
|
182
|
+
shale: { date: '2018-04-19' },
|
183
|
+
|
184
|
+
eclipse: { date: '2018-04-17' },
|
185
|
+
parakeet: { date: '2018-04-17' },
|
186
|
+
|
187
|
+
daemonwings: { date: '2018-04-13' },
|
188
|
+
|
189
|
+
caffeine: { date: '2018-04-10' },
|
190
|
+
|
191
|
+
frosting: { date: '2018-04-02' },
|
192
|
+
patrickstarfish: { date: '2018-04-02' },
|
193
|
+
mintmacaron: { date: '2018-04-02' },
|
194
|
+
|
195
|
+
|
196
|
+
## march
|
197
|
+
doridnudibranch: { date: '2018-03-30' },
|
198
|
+
|
199
|
+
springcrocus: { date: '2018-03-20' },
|
200
|
+
|
201
|
+
thunderstruck: { date: '2018-03-16' },
|
202
|
+
rascal: { date: '2018-03-16' },
|
203
|
+
|
204
|
+
dragonfruit: { date: '2018-03-14' },
|
205
|
+
|
206
|
+
belch: { date: '2018-03-09' },
|
207
|
+
|
208
|
+
pixiebob: { date: '2018-03-08' },
|
209
|
+
poisonberry: { date: '2018-03-08' },
|
210
|
+
safetyvest: { date: '2018-03-08' },
|
211
|
+
|
212
|
+
cyan: { date: '2018-03-05' },
|
213
|
+
|
214
|
+
|
215
|
+
## february
|
216
|
+
missmuffett: { date: '2018-02-28' },
|
217
|
+
wiley: { date: '2018-02-28' },
|
218
|
+
|
219
|
+
dippedcone: { date: '2018-02-23' },
|
220
|
+
leopard: { date: '2018-02-23' },
|
221
|
+
|
222
|
+
harbourfog: { date: '2018-02-20' },
|
223
|
+
|
224
|
+
baddate: { date: '2018-02-13' },
|
225
|
+
|
226
|
+
wuvme: { date: '2018-02-12' },
|
227
|
+
yokel: { date: '2018-02-12' },
|
228
|
+
starstruck: { date: '2018-02-12' },
|
229
|
+
|
230
|
+
egyptiankohl: { date: '2018-02-09' },
|
231
|
+
bobtail: { date: '2018-02-09' },
|
232
|
+
|
233
|
+
tiger: { date: '2018-02-06' },
|
234
|
+
|
235
|
+
birman: { date: '2018-02-02' },
|
236
|
+
coralsunrise: { date: '2018-02-02' },
|
237
|
+
|
238
|
+
## january
|
239
|
+
forgetmenot: { date: '2018-01-30' },
|
240
|
+
savannah: { date: '2018-01-30' },
|
241
|
+
norwegianforest: { date: '2018-01-30' },
|
242
|
+
twilightsparkle: { date: '2018-01-30' },
|
243
|
+
|
244
|
+
trioculus: { date: '2018-01-26' },
|
245
|
+
|
246
|
+
morningglory: { date: '2018-01-20' },
|
247
|
+
apricot: { date: '2018-01-20' },
|
248
|
+
turtleback: { date: '2018-01-20' },
|
249
|
+
wasntme: { date: '2018-01-20' },
|
250
|
+
cheeky: { date: '2018-01-20' },
|
251
|
+
|
252
|
+
sapphire: { date: '2018-01-17' },
|
253
|
+
|
254
|
+
nachocheez: { date: '2018-01-14' },
|
255
|
+
koala: { date: '2018-01-14' },
|
256
|
+
chronic: { date: '2018-01-14' },
|
257
|
+
onyx: { date: '2018-01-14' },
|
258
|
+
sass: { date: '2018-01-14' },
|
259
|
+
|
260
|
+
slyboots: { date: '2018-01-13' },
|
261
|
+
|
262
|
+
azaleablush: { date: '2018-01-10' },
|
263
|
+
spangled: { date: '2018-01-10' },
|
264
|
+
|
265
|
+
lilac: { date: '2018-01-09' },
|
266
|
+
bananacream: { date: '2018-01-09' },
|
267
|
+
verdigris: { date: '2018-01-09' },
|
268
|
+
|
269
|
+
neckbeard: { date: '2018-01-06' },
|
270
|
+
grim: { date: '2018-01-06' },
|
271
|
+
grimace: { date: '2018-01-06' },
|
272
|
+
stunned: { date: '2018-01-06' },
|
273
|
+
|
274
|
+
wonky: { date: '2018-01-04' },
|
275
|
+
babypuke: { date: '2018-01-04' },
|
276
|
+
pumpkin: { date: '2018-01-04' },
|
277
|
+
|
278
|
+
thundergrey: { date: '2018-01-03' },
|
279
|
+
|
280
|
+
|
281
|
+
## 2017
|
282
|
+
## december
|
283
|
+
selkirk: { date: '2017-12-31' },
|
284
|
+
icy: { date: '2017-12-31' },
|
285
|
+
flamingo: { date: '2017-12-31' },
|
286
|
+
seafoam: { date: '2017-12-31' },
|
287
|
+
|
288
|
+
elk: { date: '2017-12-28' },
|
289
|
+
|
290
|
+
hintomint: { date: '2017-12-22' },
|
291
|
+
|
292
|
+
serpent: { date: '2017-12-20' },
|
293
|
+
alien: { date: '2017-12-20' },
|
294
|
+
}
|
data/lib/copycats/version.rb
CHANGED
metadata
CHANGED
@@ -1,45 +1,45 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: copycats
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gerald Bauer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-12-
|
11
|
+
date: 2018-12-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name: base32-
|
14
|
+
name: base32-alphabets
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 1.0.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 1.0.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: csvreader
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 1.2.3
|
34
34
|
type: :runtime
|
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:
|
40
|
+
version: 1.2.3
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: activerecord
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
@@ -53,7 +53,7 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: sqlite3
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
@@ -103,22 +103,23 @@ executables:
|
|
103
103
|
- kitty
|
104
104
|
extensions: []
|
105
105
|
extra_rdoc_files:
|
106
|
-
-
|
106
|
+
- CHANGELOG.md
|
107
107
|
- LICENSE.md
|
108
108
|
- Manifest.txt
|
109
109
|
- README.md
|
110
110
|
files:
|
111
|
-
-
|
111
|
+
- CHANGELOG.md
|
112
112
|
- LICENSE.md
|
113
113
|
- Manifest.txt
|
114
114
|
- README.md
|
115
115
|
- Rakefile
|
116
116
|
- bin/kitty
|
117
117
|
- lib/copycats.rb
|
118
|
-
- lib/copycats/data.rb
|
119
118
|
- lib/copycats/fancies.rb
|
120
119
|
- lib/copycats/gene.rb
|
121
120
|
- lib/copycats/genome.rb
|
121
|
+
- lib/copycats/import/read.rb
|
122
|
+
- lib/copycats/import/setup.rb
|
122
123
|
- lib/copycats/models/kitty.rb
|
123
124
|
- lib/copycats/reports/genes.rb
|
124
125
|
- lib/copycats/reports/kitty.rb
|
@@ -127,6 +128,7 @@ files:
|
|
127
128
|
- lib/copycats/schema.rb
|
128
129
|
- lib/copycats/tool.rb
|
129
130
|
- lib/copycats/traits.rb
|
131
|
+
- lib/copycats/traits_timeline.rb
|
130
132
|
- lib/copycats/version.rb
|
131
133
|
- test/helper.rb
|
132
134
|
- test/test_genome.rb
|