kris 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.travis.yml +5 -0
- data/Guardfile +6 -0
- data/README.md +4 -5
- data/Rakefile +8 -0
- data/kris.gemspec +18 -13
- data/lib/kris/plugin.rb +4 -2
- data/lib/kris/version.rb +1 -1
- data/spec/plugin_spec.rb +24 -0
- data/spec/spec_helper.rb +7 -0
- metadata +72 -14
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: de3b4057199e71ee549f10c7a8383812d27bca8c
|
4
|
+
data.tar.gz: 81370bf923ce7e14236f110bce562304b53a1276
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 81147e6427f56900f00e70867df4eb388cef8311cb11d892fda7d1b866487ad57c5eaefa6a7ed8206c45194b841642cbce70726952bc6f726b6bdf244d9e56bc
|
7
|
+
data.tar.gz: 55417b5a6ae8e92f6946844c90391d64374515947c6db219d032a9419753ddf60d4c708269093834d8aed90507fb9978f77f0849b23cb2fea58724aa65dccf69
|
data/.travis.yml
ADDED
data/Guardfile
ADDED
data/README.md
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
-
Kris
|
1
|
+
Kris [![Stillmaintained](http://stillmaintained.com/Tomohiro/kris.png)](http://stillmaintained.com/Tomohiro/kris)
|
2
2
|
================================================================================
|
3
3
|
|
4
4
|
IRC bot library - Pluggable, and very simple
|
5
5
|
|
6
6
|
[![Gem Version](https://badge.fury.io/rb/kris.png)](http://badge.fury.io/rb/kris)
|
7
7
|
[![Dependency Status](https://gemnasium.com/Tomohiro/kris.png)](https://gemnasium.com/Tomohiro/kris)
|
8
|
-
[![
|
9
|
-
[![Code Climate](https://codeclimate.com/
|
8
|
+
[![Build Status](https://travis-ci.org/Tomohiro/kris.png?branch=master)](https://travis-ci.org/Tomohiro/kris)
|
9
|
+
[![Code Climate](https://codeclimate.com/github/Tomohiro/kris.png)](https://codeclimate.com/github/Tomohiro/kris)
|
10
10
|
|
11
11
|
|
12
12
|
---
|
@@ -15,7 +15,7 @@ IRC bot library - Pluggable, and very simple
|
|
15
15
|
Requirements
|
16
16
|
--------------------------------------------------------------------------------
|
17
17
|
|
18
|
-
- Ruby 1.9.3
|
18
|
+
- Ruby 1.9.3, 2.0.0
|
19
19
|
|
20
20
|
|
21
21
|
Getting started
|
@@ -111,7 +111,6 @@ end
|
|
111
111
|
|
112
112
|
|
113
113
|
|
114
|
-
|
115
114
|
LICENSE
|
116
115
|
--------------------------------------------------------------------------------
|
117
116
|
|
data/Rakefile
CHANGED
data/kris.gemspec
CHANGED
@@ -3,19 +3,24 @@ lib = File.expand_path('../lib', __FILE__)
|
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
4
|
require 'kris/version'
|
5
5
|
|
6
|
-
Gem::Specification.new do |
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'kris'
|
8
|
+
spec.version = Kris::VERSION
|
9
|
+
spec.authors = ['Tomohiro TAIRA']
|
10
|
+
spec.email = ['tomohiro.t@gmail.com']
|
11
|
+
spec.description = 'IRC bot library - Pluggable, and very simple'
|
12
|
+
spec.summary = 'IRC bot library - Pluggable, and very simple'
|
13
|
+
spec.homepage = 'https://github.com/Tomohiro/kris'
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
15
|
+
spec.files = `git ls-files`.split($/)
|
16
|
+
spec.executables = spec.files.grep(%r{^bin/}).map { |f| File.basename(f) }
|
17
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
|
+
spec.require_paths = ['lib']
|
19
19
|
|
20
|
-
|
20
|
+
spec.add_runtime_dependency 'zircon'
|
21
|
+
spec.add_runtime_dependency 'activesupport', '~> 3.2.12'
|
22
|
+
|
23
|
+
spec.add_development_dependency 'bundler'
|
24
|
+
spec.add_development_dependency 'rake'
|
25
|
+
spec.add_development_dependency 'guard-minitest'
|
21
26
|
end
|
data/lib/kris/plugin.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'active_support/inflector'
|
2
|
+
|
1
3
|
module Kris
|
2
4
|
class Plugin
|
3
5
|
class << self
|
@@ -6,12 +8,12 @@ module Kris
|
|
6
8
|
|
7
9
|
plugin_files(plugin_path).each do |file|
|
8
10
|
require file
|
9
|
-
yield
|
11
|
+
yield const_get(filename_classify(file))
|
10
12
|
end
|
11
13
|
end
|
12
14
|
|
13
15
|
def filename_classify(file)
|
14
|
-
File.basename(file, '.rb').
|
16
|
+
File.basename(file, '.rb').camelize
|
15
17
|
end
|
16
18
|
|
17
19
|
def plugin_files(plugin_path)
|
data/lib/kris/version.rb
CHANGED
data/spec/plugin_spec.rb
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
require 'kris/plugin'
|
5
|
+
|
6
|
+
module Kris
|
7
|
+
describe Plugin do
|
8
|
+
describe 'convert filename to class name' do
|
9
|
+
it 'shoud get class name' do
|
10
|
+
combination = {
|
11
|
+
'foo.rb' => 'Foo',
|
12
|
+
'foo_bar.rb' => 'FooBar',
|
13
|
+
'foo_bar_baz.rb' => 'FooBarBaz',
|
14
|
+
'foo/bar_baz.rb' => 'BarBaz'
|
15
|
+
}
|
16
|
+
|
17
|
+
combination.each do |filename, expect_class_name|
|
18
|
+
class_name = Plugin.filename_classify(filename)
|
19
|
+
class_name.must_equal(expect_class_name)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
data/spec/spec_helper.rb
ADDED
metadata
CHANGED
@@ -1,30 +1,83 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kris
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.3
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Tomohiro TAIRA
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-02-
|
11
|
+
date: 2013-02-26 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: zircon
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: activesupport
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 3.2.12
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 3.2.12
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: guard-minitest
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '>='
|
28
81
|
- !ruby/object:Gem::Version
|
29
82
|
version: '0'
|
30
83
|
description: IRC bot library - Pluggable, and very simple
|
@@ -35,7 +88,9 @@ extensions: []
|
|
35
88
|
extra_rdoc_files: []
|
36
89
|
files:
|
37
90
|
- .gitignore
|
91
|
+
- .travis.yml
|
38
92
|
- Gemfile
|
93
|
+
- Guardfile
|
39
94
|
- LICENSE
|
40
95
|
- README.md
|
41
96
|
- Rakefile
|
@@ -49,28 +104,31 @@ files:
|
|
49
104
|
- lib/kris/session.rb
|
50
105
|
- lib/kris/version.rb
|
51
106
|
- lib/kris/zircon/message.rb
|
107
|
+
- spec/plugin_spec.rb
|
108
|
+
- spec/spec_helper.rb
|
52
109
|
homepage: https://github.com/Tomohiro/kris
|
53
110
|
licenses: []
|
111
|
+
metadata: {}
|
54
112
|
post_install_message:
|
55
113
|
rdoc_options: []
|
56
114
|
require_paths:
|
57
115
|
- lib
|
58
116
|
required_ruby_version: !ruby/object:Gem::Requirement
|
59
|
-
none: false
|
60
117
|
requirements:
|
61
|
-
- -
|
118
|
+
- - '>='
|
62
119
|
- !ruby/object:Gem::Version
|
63
120
|
version: '0'
|
64
121
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
122
|
requirements:
|
67
|
-
- -
|
123
|
+
- - '>='
|
68
124
|
- !ruby/object:Gem::Version
|
69
125
|
version: '0'
|
70
126
|
requirements: []
|
71
127
|
rubyforge_project:
|
72
|
-
rubygems_version:
|
128
|
+
rubygems_version: 2.0.0
|
73
129
|
signing_key:
|
74
|
-
specification_version:
|
130
|
+
specification_version: 4
|
75
131
|
summary: IRC bot library - Pluggable, and very simple
|
76
|
-
test_files:
|
132
|
+
test_files:
|
133
|
+
- spec/plugin_spec.rb
|
134
|
+
- spec/spec_helper.rb
|