fantasy-irc 0.2.3 → 0.3.0

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
- SHA1:
3
- metadata.gz: da37c0461973d9e69c05e9dd39c27cb26e675941
4
- data.tar.gz: 4fa00ba9e4bc62ffbe6055b12832ffdf92b7c5f0
2
+ SHA256:
3
+ metadata.gz: 69e833581314292ab2f67d98c81470e45fb1be24154351a8664014c8598d4fde
4
+ data.tar.gz: affbbb388b46b6e4c8e42341fbe2436db1756bb5c1f61d627a8d1b11cb9444b9
5
5
  SHA512:
6
- metadata.gz: 3edacc72950c8514a255bbe0adf9b1fbea9f1bf2534930e57f0bec0462fb7ee92f9ac97142c45810fa5c0c4bca6964e5395b18622660c26fba8f19ed3eaf7f1e
7
- data.tar.gz: 3bce90ef3f2f3fbaea2bec99382ac16798d092fad6288d1b3fa5ec44baae3335468802ba75e32c12a1c728b4df731a9f1d125ffcee042a7582285bf4c4ca9249
6
+ metadata.gz: 100efa0d456fd2ad08c4424315cf2e5a146e23a9254147071589cd010d7a06de97ceabbd774e511fcdb79c5c26f21a838d9cbb309db5c4937f774cb737d97956
7
+ data.tar.gz: 81b4d3126bdde58e9c885d851b11dce59754d9c08d3bddd5eb7198daf8415efb43f95e18f625d04c4a63ab9e5829d7772caef1fd657d86224339025ba5488552
data/Gemfile CHANGED
@@ -1,7 +1,7 @@
1
- source :rubygems
1
+ source 'https://rubygems.org'
2
2
 
3
3
  gem "array-unique", "~> 1.1.1"
4
- gem "rake", "~> 10.0.3"
4
+ gem "rake", ">= 12.3.3"
5
5
 
6
6
  group :test do
7
7
  gem "rspec", "~> 2.13.0"
data/Gemfile.lock CHANGED
@@ -1,5 +1,5 @@
1
1
  GEM
2
- remote: http://rubygems.org/
2
+ remote: https://rubygems.org/
3
3
  specs:
4
4
  array-hooked (1.1.4)
5
5
  identifies_as
@@ -10,7 +10,7 @@ GEM
10
10
  diff-lcs (1.2.1)
11
11
  identifies_as (1.1.0)
12
12
  module-cluster (2.0.5)
13
- rake (10.0.3)
13
+ rake (13.0.3)
14
14
  rspec (2.13.0)
15
15
  rspec-core (~> 2.13.0)
16
16
  rspec-expectations (~> 2.13.0)
@@ -26,6 +26,9 @@ PLATFORMS
26
26
  DEPENDENCIES
27
27
  array-unique (~> 1.1.1)
28
28
  ddate
29
- rake (~> 10.0.3)
29
+ rake (>= 12.3.3)
30
30
  rspec (~> 2.13.0)
31
31
  rspec-mocks (~> 2.13.0)
32
+
33
+ BUNDLED WITH
34
+ 2.1.2
data/docs/example.rb CHANGED
@@ -15,7 +15,7 @@ bot.events.by_name('connected').register &connected
15
15
 
16
16
  # join a room and say hi
17
17
  loggedin = Proc.new do
18
- bot.rooms.new("#test").join.say "ohai"
18
+ bot.rooms.new("#test").join.note "ohai"
19
19
  end
20
20
  bot.events.by_name('loggedin').register &loggedin
21
21
 
data/fantasy-irc.gemspec CHANGED
@@ -1,15 +1,14 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.authors = ["Jens Becker"]
3
3
  s.email = ["v2px@v2px.de"]
4
- s.description = "A modular, event-driven IRC client/bot Ruby gem with plugin support"
5
4
  s.summary = "A modular, event-driven IRC client/bot Ruby gem with plugin support"
6
5
  s.homepage = "http://v2px.github.com/fantasy-irc"
6
+ s.license = 'MIT'
7
7
 
8
8
  s.files = `git ls-files`.split("\n")
9
9
  s.name = "fantasy-irc"
10
10
  s.require_paths = ['lib']
11
- s.version = "0.2.3"
11
+ s.version = "0.3.0"
12
12
 
13
- s.rubyforge_project = s.name
14
13
  s.add_runtime_dependency "array-unique", "~> 1.1.1"
15
14
  end
data/lib/fantasy-irc.rb CHANGED
@@ -1,5 +1,5 @@
1
- require "fantasy-irc/irc"
2
- require "fantasy-irc/events"
3
- require "fantasy-irc/plugins"
4
- require "fantasy-irc/rooms"
5
- require "fantasy-irc/users"
1
+ require File.expand_path('../fantasy-irc/irc', __FILE__)
2
+ require File.expand_path('../fantasy-irc/events', __FILE__)
3
+ require File.expand_path('../fantasy-irc/plugins', __FILE__)
4
+ require File.expand_path('../fantasy-irc/rooms', __FILE__)
5
+ require File.expand_path('../fantasy-irc/users', __FILE__)
@@ -52,7 +52,7 @@ module Fantasy
52
52
  end
53
53
 
54
54
  @callbacks.each { |uuid, proc|
55
- proc.call(args)
55
+ proc.call(*args)
56
56
  }
57
57
  end
58
58
  end
@@ -67,7 +67,7 @@ class Plugin
67
67
  end
68
68
 
69
69
  def handle! command, data, args=[]
70
- puts "trying to handle #{command} with #{data} and #{args}"
70
+ #puts "trying to handle #{command} with #{data} and #{args}"
71
71
  @handlers.each do |pattern, block|
72
72
  if command.match(pattern) then
73
73
  puts "#{block} handles #{command}"
@@ -75,6 +75,16 @@ module Fantasy
75
75
  return self
76
76
  end
77
77
 
78
+ # sends a notice to the room
79
+ def note message
80
+ if @joined == false then
81
+ raise "Tried to talk to a room (#{name}) we're not in."
82
+ end
83
+
84
+ @connection.send('NOTICE '+@name+' :'+message)
85
+ return self
86
+ end
87
+
78
88
  # sends a privmsg with ACTION to the room
79
89
  def me message
80
90
  self.say "\001ACTION #{message}\001"
metadata CHANGED
@@ -1,30 +1,30 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fantasy-irc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jens Becker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-28 00:00:00.000000000 Z
11
+ date: 2021-04-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: array-unique
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: 1.1.1
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
26
  version: 1.1.1
27
- description: A modular, event-driven IRC client/bot Ruby gem with plugin support
27
+ description:
28
28
  email:
29
29
  - v2px@v2px.de
30
30
  executables: []
@@ -55,7 +55,8 @@ files:
55
55
  - spec/lib/fantasy-irc_spec.rb
56
56
  - spec/spec_helper.rb
57
57
  homepage: http://v2px.github.com/fantasy-irc
58
- licenses: []
58
+ licenses:
59
+ - MIT
59
60
  metadata: {}
60
61
  post_install_message:
61
62
  rdoc_options: []
@@ -63,17 +64,16 @@ require_paths:
63
64
  - lib
64
65
  required_ruby_version: !ruby/object:Gem::Requirement
65
66
  requirements:
66
- - - '>='
67
+ - - ">="
67
68
  - !ruby/object:Gem::Version
68
69
  version: '0'
69
70
  required_rubygems_version: !ruby/object:Gem::Requirement
70
71
  requirements:
71
- - - '>='
72
+ - - ">="
72
73
  - !ruby/object:Gem::Version
73
74
  version: '0'
74
75
  requirements: []
75
- rubyforge_project: fantasy-irc
76
- rubygems_version: 2.0.3
76
+ rubygems_version: 3.1.2
77
77
  signing_key:
78
78
  specification_version: 4
79
79
  summary: A modular, event-driven IRC client/bot Ruby gem with plugin support