scamp 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 5a8f622dff6a60fddd4050cde82ebe3708197d52
4
+ data.tar.gz: b5f6e9c1d1f0ecd3278b82cc9bea44bb69d1c045
5
+ SHA512:
6
+ metadata.gz: ef395384dcb7efb1e37398a4fe0e480001688b2ccd74c2f654ac458a1dc06ff8feaf173e49b181458e8893c6c2e62bd145a3faa06b188a4e7a1cce41b3f90ac0
7
+ data.tar.gz: 299820bac823a24117d2d7ce4fb72494783e5e78c07358ab7e51a67062500ffdf3d546bf04f64b27704fccbe9e2d2bbfbf437beb38d393ed357ed8a71cb09cfa
data/Gemfile CHANGED
@@ -1,2 +1,2 @@
1
- source :rubygems
1
+ source "https://rubygems.org"
2
2
  gemspec
data/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ [![Build Status](https://secure.travis-ci.org/wjessop/Scamp.png?branch=master)](https://travis-ci.org/wjessop/Scamp)
2
+
1
3
  # Scamp
2
4
 
3
5
  A framework for writing [Campfire](http://campfirenow.com/) bots. Scamp is in early development so use it at your own risk, pull requests welcome.
@@ -226,6 +228,10 @@ Here's the most direct way to get your work merged into the project:
226
228
 
227
229
  Take a look at the TODO list or known issues for some inspiration if you need it.
228
230
 
231
+ ## Authors
232
+
233
+ * Will Jessop (will@willj.net)
234
+
229
235
  ## Thanks
230
236
 
231
237
  First class support, commits and pull requests, thanks guys!
@@ -233,6 +239,7 @@ First class support, commits and pull requests, thanks guys!
233
239
  * [Caius Durling](http://caius.name/)
234
240
  * Sudara Williams of [Ramen Music](http://ramenmusic.com)
235
241
  * [Dom Hodgson](http://www.thehodge.co.uk/) (for the name)
242
+ * Pull requests: @mheffner
236
243
 
237
244
  ## License
238
245
 
@@ -26,7 +26,7 @@ class Scamp
26
26
  private
27
27
 
28
28
  def triggered_by(message_text)
29
- if message_text && required_prefix
29
+ if message_text && required_prefix
30
30
  message_text = handle_prefix(message_text)
31
31
  return false unless message_text
32
32
  end
@@ -67,7 +67,7 @@ class Scamp
67
67
 
68
68
  def conditions_satisfied_by(msg)
69
69
  bot.logger.debug "Checking message against #{conditions.inspect}"
70
-
70
+
71
71
  # item will be :user or :room
72
72
  # cond is the int or string value.
73
73
  conditions.each do |item, cond|
@@ -91,6 +91,13 @@ class Scamp
91
91
  cond.select {|e| e.is_a? String }.include?(bot.room_name_for(msg[:room_id]))
92
92
  end
93
93
  bot.logger.error "Don't know how to deal with a match item of #{item}, cond #{cond}"
94
+ elsif cond.is_a? Symbol
95
+ case item
96
+ when :type
97
+ return (cond == :text && msg[:type] == "TextMessage") ||
98
+ (cond == :paste && msg[:type] == "PasteMessage")
99
+ end
100
+ bot.logger.error "Don't know how to deal with a match item of #{item}, cond #{cond}"
94
101
  end
95
102
  end
96
103
  true
@@ -1,3 +1,3 @@
1
1
  class Scamp
2
- VERSION = "1.1.0"
2
+ VERSION = "1.2.0"
3
3
  end
metadata CHANGED
@@ -1,93 +1,113 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scamp
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
5
- prerelease:
4
+ version: 1.2.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Will Jessop
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-07-11 00:00:00.000000000 Z
11
+ date: 2013-10-11 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: eventmachine
16
- requirement: &70342178368200 !ruby/object:Gem::Requirement
17
- none: false
15
+ requirement: !ruby/object:Gem::Requirement
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
21
19
  version: 1.0.0.rc.4
22
20
  type: :runtime
23
21
  prerelease: false
24
- version_requirements: *70342178368200
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: 1.0.0.rc.4
25
27
  - !ruby/object:Gem::Dependency
26
28
  name: yajl-ruby
27
- requirement: &70342178367340 !ruby/object:Gem::Requirement
28
- none: false
29
+ requirement: !ruby/object:Gem::Requirement
29
30
  requirements:
30
31
  - - ~>
31
32
  - !ruby/object:Gem::Version
32
33
  version: '1.1'
33
34
  type: :runtime
34
35
  prerelease: false
35
- version_requirements: *70342178367340
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: '1.1'
36
41
  - !ruby/object:Gem::Dependency
37
42
  name: em-http-request
38
- requirement: &70342178365600 !ruby/object:Gem::Requirement
39
- none: false
43
+ requirement: !ruby/object:Gem::Requirement
40
44
  requirements:
41
45
  - - ~>
42
46
  - !ruby/object:Gem::Version
43
47
  version: '1.0'
44
48
  type: :runtime
45
49
  prerelease: false
46
- version_requirements: *70342178365600
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: '1.0'
47
55
  - !ruby/object:Gem::Dependency
48
56
  name: rake
49
- requirement: &70342178364540 !ruby/object:Gem::Requirement
50
- none: false
57
+ requirement: !ruby/object:Gem::Requirement
51
58
  requirements:
52
59
  - - ~>
53
60
  - !ruby/object:Gem::Version
54
61
  version: '0.9'
55
62
  type: :development
56
63
  prerelease: false
57
- version_requirements: *70342178364540
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ~>
67
+ - !ruby/object:Gem::Version
68
+ version: '0.9'
58
69
  - !ruby/object:Gem::Dependency
59
70
  name: rspec
60
- requirement: &70342178363100 !ruby/object:Gem::Requirement
61
- none: false
71
+ requirement: !ruby/object:Gem::Requirement
62
72
  requirements:
63
73
  - - ~>
64
74
  - !ruby/object:Gem::Version
65
75
  version: '2.6'
66
76
  type: :development
67
77
  prerelease: false
68
- version_requirements: *70342178363100
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ~>
81
+ - !ruby/object:Gem::Version
82
+ version: '2.6'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: mocha
71
- requirement: &70342178362180 !ruby/object:Gem::Requirement
72
- none: false
85
+ requirement: !ruby/object:Gem::Requirement
73
86
  requirements:
74
87
  - - ~>
75
88
  - !ruby/object:Gem::Version
76
89
  version: '0.10'
77
90
  type: :development
78
91
  prerelease: false
79
- version_requirements: *70342178362180
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ~>
95
+ - !ruby/object:Gem::Version
96
+ version: '0.10'
80
97
  - !ruby/object:Gem::Dependency
81
98
  name: webmock
82
- requirement: &70342178361280 !ruby/object:Gem::Requirement
83
- none: false
99
+ requirement: !ruby/object:Gem::Requirement
84
100
  requirements:
85
101
  - - ~>
86
102
  - !ruby/object:Gem::Version
87
103
  version: '1.7'
88
104
  type: :development
89
105
  prerelease: false
90
- version_requirements: *70342178361280
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ~>
109
+ - !ruby/object:Gem::Version
110
+ version: '1.7'
91
111
  description: Eventmachine based Campfire bot framework
92
112
  email:
93
113
  - will@willj.net
@@ -115,27 +135,26 @@ files:
115
135
  - spec/spec_helper.rb
116
136
  homepage: https://github.com/wjessop/Scamp
117
137
  licenses: []
138
+ metadata: {}
118
139
  post_install_message:
119
140
  rdoc_options: []
120
141
  require_paths:
121
142
  - lib
122
143
  required_ruby_version: !ruby/object:Gem::Requirement
123
- none: false
124
144
  requirements:
125
- - - ! '>='
145
+ - - '>='
126
146
  - !ruby/object:Gem::Version
127
147
  version: '0'
128
148
  required_rubygems_version: !ruby/object:Gem::Requirement
129
- none: false
130
149
  requirements:
131
- - - ! '>='
150
+ - - '>='
132
151
  - !ruby/object:Gem::Version
133
152
  version: '0'
134
153
  requirements: []
135
154
  rubyforge_project:
136
- rubygems_version: 1.8.10
155
+ rubygems_version: 2.0.5
137
156
  signing_key:
138
- specification_version: 3
157
+ specification_version: 4
139
158
  summary: Eventmachine based Campfire bot framework
140
159
  test_files:
141
160
  - spec/lib/scamp_spec.rb