botemon 0.5.2 → 0.5.3

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: f0807c8e26f7d162683ab553702cc7bcab3c5138
4
- data.tar.gz: 644dc230a07fefaab7d07da2211dc617115c8f1c
3
+ metadata.gz: e258f4a57b27793cee29599201c78497a826d87e
4
+ data.tar.gz: 9177a0525f092dcc776da99652165d78ff94e7ac
5
5
  SHA512:
6
- metadata.gz: ad413d04df37ff4830633212090352133fcaf9d0b9986fcc441afcf860a71a73075c9cec97339c9826ff3a9542a104dd1e8966a1333709d9d04492ef3d17b9dd
7
- data.tar.gz: 369100a978faac8a1bb7ee2f26c46cb905f423649cabf43afe7bfe81a6476e150c0ecbe62f2aa43f029fb170666d2ae4f56b4c0f3cdd861a0b22008df0d4653c
6
+ metadata.gz: 688abd378a63f777be2350dee024b9e826e6207130247b43044a83e8d3eb8518afb0ebbe6e911077a68450edf30a3d8a58010185bfd7ccacb97c693e1a31a6f1
7
+ data.tar.gz: 305287b5caff1f880a7eb22a13e2aea6cd3579fbf7e189199782370499aa2f1ebd7bc3a7bcd0c1327f621ec983e2b98bcc0278e55badfed6073ccfef06324298
@@ -47,7 +47,7 @@ Cinch::Bot.new {
47
47
 
48
48
  name = Smogon::Pokemon.id2name(name) if name.numeric?
49
49
 
50
- pokemon = Pokedex.get name, @storage
50
+ pokemon = Pokedex.get name.delete(?'), @storage
51
51
  m.reply pokemon ? "#{pokemon.to_s}\n#{pokemon.url}".split("\n").map { |l| Format(:red, l) }.join("\n") : Format(:red, 'Pokémon not found.')
52
52
  end
53
53
 
@@ -64,20 +64,15 @@ Cinch::Bot.new {
64
64
  end
65
65
 
66
66
  on :message, /^move (.+)/ do |m, name|
67
- name = Smogon::Pokemon.id2name(name) if name.numeric?
67
+ move = Movedex.get name
68
68
 
69
- if name
70
- move = Movedex.get name
71
- m.reply move ? "#{move.to_s}\n#{move.url}".split("\n").map { |l| Format(:red, l) }.join("\n") : Format(:red, 'Move not found.')
72
- else
73
- m.reply Format(:red, 'An error is occurred searching the Pokémon.')
74
- end
69
+ m.reply move ? "#{move.to_s}\n#{move.url}".split("\n").map { |l| Format(:red, l) }.join("\n") : Format(:red, 'Move not found.')
75
70
  end
76
71
 
77
72
  on :message, /^moveset (.+) (.+) (.+)/ do |m, name, tier, metagame|
78
73
  name = Smogon::Pokemon.id2name(name) if name.numeric?
79
74
 
80
- movesets = Movesetdex.get name, tier, (metagame.empty? ? 'bw' : metagame)
75
+ movesets = Movesetdex.get name.delete(?'), tier, (metagame.empty? ? 'bw' : metagame)
81
76
  if movesets != nil || movesets.any?
82
77
  m.reply Format(:red, "--- #{movesets.first.pokemon} (#{movesets.first.tier}) ---")
83
78
  movesets.each { |moveset| m.reply Format(:red, " -- #{moveset.name} --\n#{moveset.to_s.split("\n").map { |l| Format(:red, l) }.join("\n")}\n") }
@@ -89,7 +84,7 @@ Cinch::Bot.new {
89
84
  on :message, /^pkrandom$/ do |m|
90
85
  @storage = Storage.new('./cache.db') unless @storage
91
86
 
92
- pokemon = Pokedex.get Smogon::Pokemon.id2name(Random.new.rand(1..649)), @storage
87
+ pokemon = Pokedex.get Smogon::Pokemon.id2name(Random.new.rand(1..649)).delete(?'), @storage
93
88
  m.reply pokemon ? "#{pokemon.to_s}\n#{pokemon.url}".split("\n").map { |l| Format(:red, l) }.join("\n") : Format(:red, 'Pokémon not found.')
94
89
  end
95
90
 
@@ -100,7 +95,7 @@ Cinch::Bot.new {
100
95
  m.reply Format(:red, 'Other players are playing, wait until they finish.')
101
96
  m.reply Format(:red, @pokemon_trivia.clues)
102
97
  else
103
- @pokemon_trivia = Pokedex.get Smogon::Pokemon.id2name(Random.new.rand(1..649)), @storage
98
+ @pokemon_trivia = Pokedex.get Smogon::Pokemon.id2name(Random.new.rand(1..649)).delete(?'), @storage
104
99
  @trivia_owner = m.user.nick
105
100
  @trivia_wrong = 0
106
101
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -19,6 +19,6 @@
19
19
 
20
20
  module Botemon
21
21
  def self.version
22
- '0.5.2'
22
+ '0.5.3'
23
23
  end
24
24
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: botemon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Giovanni Capuano
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-31 00:00:00.000000000 Z
11
+ date: 2013-09-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -88,16 +88,16 @@ executables:
88
88
  extensions: []
89
89
  extra_rdoc_files: []
90
90
  files:
91
- - lib/botemon/abilitydex.rb
92
- - lib/botemon/itemdex.rb
93
- - lib/botemon/movedex.rb
94
91
  - lib/botemon/movesetdex.rb
95
92
  - lib/botemon/pokedex.rb
96
- - lib/botemon/smogon/moveset.rb
97
- - lib/botemon/smogon/pokemon.rb
98
93
  - lib/botemon/storage.rb
99
94
  - lib/botemon/string.rb
95
+ - lib/botemon/abilitydex.rb
96
+ - lib/botemon/movedex.rb
100
97
  - lib/botemon/version.rb
98
+ - lib/botemon/smogon/pokemon.rb
99
+ - lib/botemon/smogon/moveset.rb
100
+ - lib/botemon/itemdex.rb
101
101
  - lib/botemon.rb
102
102
  - bin/botemon
103
103
  homepage: http://www.giovannicapuano.net
@@ -120,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
120
120
  version: '0'
121
121
  requirements: []
122
122
  rubyforge_project:
123
- rubygems_version: 2.0.3
123
+ rubygems_version: 2.0.6
124
124
  signing_key:
125
125
  specification_version: 4
126
126
  summary: IRC bot for Pokéfags.