tropeco 0.1.1 → 0.2.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.
- data/Gemfile +1 -0
- data/Gemfile.lock +15 -0
- data/VERSION +1 -1
- data/config.yaml +6 -0
- data/lib/tropeco.rb +13 -8
- data/lib/tropeco/configurations.rb +23 -0
- data/lib/tropeco/plugins.rb +3 -0
- data/lib/tropeco/plugins/download.rb +1 -1
- data/lib/tropeco/plugins/transcriptions.rb +1 -1
- data/run_test.br +2 -13
- data/tropeco.gemspec +8 -2
- metadata +22 -3
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
GEM
|
2
2
|
remote: http://rubygems.org/
|
3
3
|
specs:
|
4
|
+
archive-tar-minitar (0.5.2)
|
4
5
|
cinch (2.0.3)
|
6
|
+
columnize (0.3.6)
|
5
7
|
diff-lcs (1.1.3)
|
6
8
|
git (1.2.5)
|
7
9
|
jeweler (1.8.4)
|
@@ -10,6 +12,8 @@ GEM
|
|
10
12
|
rake
|
11
13
|
rdoc
|
12
14
|
json (1.7.5)
|
15
|
+
linecache19 (0.5.12)
|
16
|
+
ruby_core_source (>= 0.1.4)
|
13
17
|
multi_json (1.3.7)
|
14
18
|
rake (0.9.2.2)
|
15
19
|
rdoc (3.12)
|
@@ -22,6 +26,16 @@ GEM
|
|
22
26
|
rspec-expectations (2.12.0)
|
23
27
|
diff-lcs (~> 1.1.3)
|
24
28
|
rspec-mocks (2.12.0)
|
29
|
+
ruby-debug-base19 (0.11.25)
|
30
|
+
columnize (>= 0.3.1)
|
31
|
+
linecache19 (>= 0.5.11)
|
32
|
+
ruby_core_source (>= 0.1.4)
|
33
|
+
ruby-debug19 (0.11.6)
|
34
|
+
columnize (>= 0.3.1)
|
35
|
+
linecache19 (>= 0.5.11)
|
36
|
+
ruby-debug-base19 (>= 0.11.19)
|
37
|
+
ruby_core_source (0.1.5)
|
38
|
+
archive-tar-minitar (>= 0.5.2)
|
25
39
|
simplecov (0.7.1)
|
26
40
|
multi_json (~> 1.0)
|
27
41
|
simplecov-html (~> 0.7.1)
|
@@ -37,4 +51,5 @@ DEPENDENCIES
|
|
37
51
|
rake
|
38
52
|
rdoc (~> 3.12)
|
39
53
|
rspec
|
54
|
+
ruby-debug19
|
40
55
|
simplecov
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.2.0
|
data/config.yaml
ADDED
data/lib/tropeco.rb
CHANGED
@@ -1,16 +1,21 @@
|
|
1
|
-
require 'tropeco/plugins
|
2
|
-
require 'tropeco/
|
3
|
-
require 'tropeco/plugins/transcriptions'
|
4
|
-
|
1
|
+
require 'tropeco/plugins'
|
2
|
+
require 'tropeco/configurations'
|
5
3
|
|
6
4
|
module Tropeco
|
7
5
|
def self.start
|
6
|
+
plugins = [Tropeco::Plugins::HelloWorld,
|
7
|
+
Tropeco::Plugins::DownloadFile,
|
8
|
+
Tropeco::Plugins::Transcription]
|
9
|
+
|
10
|
+
# configs = Tropeco::Configurations.new('config.yaml')
|
11
|
+
configs = Tropeco::Configurations.get_config
|
12
|
+
|
8
13
|
bot = Cinch::Bot.new do
|
9
14
|
configure do |c|
|
10
|
-
c.server =
|
11
|
-
c.nick =
|
12
|
-
c.channels =
|
13
|
-
c.plugins.plugins =
|
15
|
+
c.server = configs.server
|
16
|
+
c.nick = configs.nick_name
|
17
|
+
c.channels = configs.channels
|
18
|
+
c.plugins.plugins = plugins
|
14
19
|
end
|
15
20
|
end
|
16
21
|
bot.start
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'yaml'
|
2
|
+
require 'singleton'
|
3
|
+
|
4
|
+
module Tropeco
|
5
|
+
class Configurations
|
6
|
+
|
7
|
+
include Singleton
|
8
|
+
attr_accessor :configs
|
9
|
+
|
10
|
+
|
11
|
+
def self.get_config()
|
12
|
+
return self.instance
|
13
|
+
end
|
14
|
+
|
15
|
+
def initialize()
|
16
|
+
@configs = YAML.load_file('config.yaml')
|
17
|
+
end
|
18
|
+
|
19
|
+
def method_missing(method, *args)
|
20
|
+
return @configs[method.to_s]
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
data/run_test.br
CHANGED
@@ -1,17 +1,6 @@
|
|
1
1
|
#!/usr/bin/ruby
|
2
2
|
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), 'lib'))
|
3
3
|
require 'cinch'
|
4
|
-
require 'tropeco
|
5
|
-
require 'tropeco/plugins/download'
|
4
|
+
require 'tropeco'
|
6
5
|
|
7
|
-
|
8
|
-
bot = Cinch::Bot.new do
|
9
|
-
configure do |c|
|
10
|
-
c.server = "irc.freenode.org"
|
11
|
-
c.nick = "tropeco"
|
12
|
-
c.channels = ["#opaopa"]
|
13
|
-
c.plugins.plugins = [Tropeco::Plugins::HelloWorld, Tropeco::Plugins::DownloadFile]
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
bot.start
|
6
|
+
Tropeco.start
|
data/tropeco.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "tropeco"
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.2.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Andre Fonseca"]
|
12
|
-
s.date = "2012-11-
|
12
|
+
s.date = "2012-11-30"
|
13
13
|
s.description = "IRC BOT with somethings"
|
14
14
|
s.email = "aoqfonseca@gmail.com"
|
15
15
|
s.executables = ["tropeco"]
|
@@ -27,7 +27,10 @@ Gem::Specification.new do |s|
|
|
27
27
|
"Rakefile",
|
28
28
|
"VERSION",
|
29
29
|
"bin/tropeco",
|
30
|
+
"config.yaml",
|
30
31
|
"lib/tropeco.rb",
|
32
|
+
"lib/tropeco/configurations.rb",
|
33
|
+
"lib/tropeco/plugins.rb",
|
31
34
|
"lib/tropeco/plugins/download.rb",
|
32
35
|
"lib/tropeco/plugins/hello_world.rb",
|
33
36
|
"lib/tropeco/plugins/transcriptions.rb",
|
@@ -52,6 +55,7 @@ Gem::Specification.new do |s|
|
|
52
55
|
s.add_development_dependency(%q<bundler>, [">= 0"])
|
53
56
|
s.add_development_dependency(%q<jeweler>, ["~> 1.8.4"])
|
54
57
|
s.add_development_dependency(%q<simplecov>, [">= 0"])
|
58
|
+
s.add_development_dependency(%q<ruby-debug19>, [">= 0"])
|
55
59
|
else
|
56
60
|
s.add_dependency(%q<cinch>, [">= 0"])
|
57
61
|
s.add_dependency(%q<rake>, [">= 0"])
|
@@ -60,6 +64,7 @@ Gem::Specification.new do |s|
|
|
60
64
|
s.add_dependency(%q<bundler>, [">= 0"])
|
61
65
|
s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
|
62
66
|
s.add_dependency(%q<simplecov>, [">= 0"])
|
67
|
+
s.add_dependency(%q<ruby-debug19>, [">= 0"])
|
63
68
|
end
|
64
69
|
else
|
65
70
|
s.add_dependency(%q<cinch>, [">= 0"])
|
@@ -69,6 +74,7 @@ Gem::Specification.new do |s|
|
|
69
74
|
s.add_dependency(%q<bundler>, [">= 0"])
|
70
75
|
s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
|
71
76
|
s.add_dependency(%q<simplecov>, [">= 0"])
|
77
|
+
s.add_dependency(%q<ruby-debug19>, [">= 0"])
|
72
78
|
end
|
73
79
|
end
|
74
80
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tropeco
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-11-
|
12
|
+
date: 2012-11-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: cinch
|
@@ -123,6 +123,22 @@ dependencies:
|
|
123
123
|
- - ! '>='
|
124
124
|
- !ruby/object:Gem::Version
|
125
125
|
version: '0'
|
126
|
+
- !ruby/object:Gem::Dependency
|
127
|
+
name: ruby-debug19
|
128
|
+
requirement: !ruby/object:Gem::Requirement
|
129
|
+
none: false
|
130
|
+
requirements:
|
131
|
+
- - ! '>='
|
132
|
+
- !ruby/object:Gem::Version
|
133
|
+
version: '0'
|
134
|
+
type: :development
|
135
|
+
prerelease: false
|
136
|
+
version_requirements: !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
138
|
+
requirements:
|
139
|
+
- - ! '>='
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: '0'
|
126
142
|
description: IRC BOT with somethings
|
127
143
|
email: aoqfonseca@gmail.com
|
128
144
|
executables:
|
@@ -141,7 +157,10 @@ files:
|
|
141
157
|
- Rakefile
|
142
158
|
- VERSION
|
143
159
|
- bin/tropeco
|
160
|
+
- config.yaml
|
144
161
|
- lib/tropeco.rb
|
162
|
+
- lib/tropeco/configurations.rb
|
163
|
+
- lib/tropeco/plugins.rb
|
145
164
|
- lib/tropeco/plugins/download.rb
|
146
165
|
- lib/tropeco/plugins/hello_world.rb
|
147
166
|
- lib/tropeco/plugins/transcriptions.rb
|
@@ -163,7 +182,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
163
182
|
version: '0'
|
164
183
|
segments:
|
165
184
|
- 0
|
166
|
-
hash:
|
185
|
+
hash: 2665446516472855645
|
167
186
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
168
187
|
none: false
|
169
188
|
requirements:
|