botemon 0.5.8 → 0.5.8.1

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
  SHA1:
3
- metadata.gz: 3dd3d52a460f55c3d43843f5932f07c780ee78e0
4
- data.tar.gz: 774aa6d90ff59356bff82a159c053c3fe11f19ec
3
+ metadata.gz: dc0c1cd0cc4799071ae94736411e2ecf68cf309b
4
+ data.tar.gz: 45bf8f209938b9833e35a1e08ac427c7ab665251
5
5
  SHA512:
6
- metadata.gz: f40774510b498882287deb18a8e01dd8bf05be72f31b68f711374fb008a6b373bccc2534fd5167aeb3b8a25edb26a7697163e0fa43b0a3a8fcd76d27081c7e16
7
- data.tar.gz: 9c9b1f7656c8d655d5b6f89a3ad85f9416d5a8a36382bf99b0f5376b0c0b8bfff8d0aeaa04f1e505eb127652bd5eb3d18c747b9bb6116d4f08997ff7b68cdb2b
6
+ metadata.gz: f313ff5f245aeb735738911ded0db8b4645d1d50c230c91ab1baceb3f378a36effef0e13f1f0eaa708f4af3300dc5df6abf42d23a62e897727caada826ba288d
7
+ data.tar.gz: 54f6f7200e8702a344537e861b2aa7633ccb0828842fb19d3115ff22d05b2ff5804c215bd30531487b47e822cc2b916e870b242d8eb7c0012cac1ff5836b716a
@@ -1,5 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
- #encoding: utf-8
3
2
  #--
4
3
  # Copyright(C) 2013 Giovanni Capuano <webmaster@giovannicapuano.net>
5
4
  #
@@ -25,7 +24,7 @@ require 'cinch/colorize'
25
24
 
26
25
  abort 'Usage: botemon <bot_name> <bot_password> <server> <channels>' if ARGV.length < 4
27
26
 
28
- bot = Cinch::Bot.new {
27
+ Cinch::Bot.new {
29
28
  configure do |c|
30
29
  c.nick = ARGV[0]
31
30
  c.realname = ARGV[0]
@@ -204,5 +203,4 @@ bot = Cinch::Bot.new {
204
203
  m.reply "- pstats Scizor 70 Adamant 0/252/0/0/6/252 ".colorize
205
204
  m.reply "- pkrandom, pktrivia, pkdebug, pkstop, pkcache, pkversion ".colorize
206
205
  end
207
- }
208
- bot.start
206
+ }.start
@@ -21,35 +21,31 @@ module Smogon
21
21
  class Pokemon
22
22
  attr_accessor :name, :_name, :types, :tier, :abilities, :base_stats, :moves
23
23
 
24
- def to_s
25
- "Name: #{@name}\nAbility: #{@abilities.join(', ')}\nType: #{@types.join(?/)}\nTier: #{@tier}\nBase stats: #{@base_stats.join(?/)}\nMoves: #{@moves.join(', ')}"
26
- end
27
-
28
24
  def clues
29
25
  "Ability: #{@abilities.join(', ')}\nType: #{@types.join(?/)}\nTier: #{@tier}\nBase stats: #{@base_stats.join(?/)}"
30
26
  end
31
27
 
32
28
  def self.to_pokemon(ary)
33
29
  return Pokemon.new.tap { |pokemon|
34
- pokemon.name = ary['name']
35
- pokemon._name = ary['_name']
36
- pokemon.types = ary['types'] || ''
37
- pokemon.tier = ary['tier'] || ''
38
- pokemon.abilities = ary['abilities'] || ''
39
- pokemon.base_stats = ary['base_stats'] ||
40
- pokemon.moves = ary['moves'] || ''
30
+ pokemon.name = ary['name' ]
31
+ pokemon._name = ary['_name' ]
32
+ pokemon.types = ary['types' ]
33
+ pokemon.tier = ary['tier' ]
34
+ pokemon.abilities = ary['abilities' ]
35
+ pokemon.base_stats = ary['base_stats']
36
+ pokemon.moves = ary['moves' ]
41
37
  }
42
38
  end
43
39
 
44
40
  def to_ary
45
41
  {
46
- 'name' => name,
47
- '_name' => _name,
48
- 'types' => types,
49
- 'tier' => tier,
50
- 'abilities' => abilities,
51
- 'base_stats' => base_stats,
52
- 'moves' => moves
42
+ 'name' => @name,
43
+ '_name' => @_name,
44
+ 'types' => @types,
45
+ 'tier' => @tier,
46
+ 'abilities' => @abilities,
47
+ 'base_stats' => @base_stats,
48
+ 'moves' => @moves
53
49
  }
54
50
  end
55
51
 
@@ -19,6 +19,6 @@
19
19
 
20
20
  module Botemon
21
21
  def self.version
22
- '0.5.8'
22
+ '0.5.8.1'
23
23
  end
24
24
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: botemon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.8
4
+ version: 0.5.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Giovanni Capuano