campfire-bot-standup 0.0.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.
- data/.gitignore +4 -0
- data/Gemfile +4 -0
- data/README.md +85 -0
- data/Rakefile +1 -0
- data/campfire-bot-standup.gemspec +23 -0
- data/lib/campfire_bot/standup/version.rb +5 -0
- data/lib/campfire_bot/standup.rb +44 -0
- data/standup-config.example.yml +17 -0
- metadata +75 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,85 @@
|
|
1
|
+
# NOTE
|
2
|
+
|
3
|
+
Currently, this only works with [my fork](https://github.com/hoverlover/campfire-bot). Hopefully,
|
4
|
+
the maintainers of the [main repo](https://github.com/joshwand/campfire-bot) will pull in my changes.
|
5
|
+
|
6
|
+
#CampfireBot::Standup
|
7
|
+
|
8
|
+
This is a plugin for use with [campfire-bot](https://github.com/joshwand/campfire-bot).
|
9
|
+
It provides the ability to send [daily standup](http://en.wikipedia.org/wiki/Stand-up_meeting) emails
|
10
|
+
to a list of people (your managers). This campfire-bot plugin is
|
11
|
+
targeted at distributed teams that don't have the luxury of standing in
|
12
|
+
the same room. The message goes out in the campfire room for all
|
13
|
+
developers to see, and at the same time an email is sent to the
|
14
|
+
configured list of managers so they can also see the status.
|
15
|
+
|
16
|
+
## Installation
|
17
|
+
|
18
|
+
1. First, make sure you install the campfire-bot gem.
|
19
|
+
2. `gem install campfire-bot-absentee-camper`
|
20
|
+
3. Create Gemfile with the following lines:
|
21
|
+
gem 'campfire-bot'
|
22
|
+
gem 'campfire-bot-standup'
|
23
|
+
4. Create your _standup-config.yml_ file (see below).
|
24
|
+
5. Register the plugin to your main _config.yml_ file
|
25
|
+
|
26
|
+
## Usage
|
27
|
+
|
28
|
+
First, fire up the bot:
|
29
|
+
|
30
|
+
`bundle exec bot <environment>`
|
31
|
+
|
32
|
+
`<environment>` is the matching environment from the config file. Now,
|
33
|
+
in the campfire room, give your standup status using the `!standup`
|
34
|
+
command:
|
35
|
+
|
36
|
+
!standup Yesterday I goofed off a lot. Today, after checking my Twitter feed, I will hopefully get some work done.
|
37
|
+
|
38
|
+
After sending this message, a message will be sent by the Campfire Bot
|
39
|
+
that your standup email has been emailed to your manager(s):
|
40
|
+
|
41
|
+
Campfire B. Sent standup email to michael.scott@dunder-mifflin.com
|
42
|
+
|
43
|
+
|
44
|
+
## Configuration
|
45
|
+
|
46
|
+
Here is a sample config file:
|
47
|
+
|
48
|
+
---
|
49
|
+
production:
|
50
|
+
subject: Daily Standup
|
51
|
+
to:
|
52
|
+
- michael.scott@dunder-mifflin.com
|
53
|
+
pony_options:
|
54
|
+
# NOTE: The colons before these options are very important.
|
55
|
+
# Pony requires that the keys be symbols and not strings.
|
56
|
+
#
|
57
|
+
:via: :smtp
|
58
|
+
:via_options:
|
59
|
+
:address: smtp.sendgrid.net
|
60
|
+
:port: 587
|
61
|
+
:enable_starttls_auto: true
|
62
|
+
:authentication: :plain
|
63
|
+
:user_name: your-user-name
|
64
|
+
:password: secret
|
65
|
+
|
66
|
+
* `production` - This is the environment for which the settins apply.
|
67
|
+
You can specify multiple environments (e.g. development, test, etc).
|
68
|
+
* `subject` - The subject line of the outgoing email.
|
69
|
+
* `to` - The list of email addresses where the email will be sent.
|
70
|
+
* `pony_options` - The configuration options for [Pony](https://github.com/adamwiggins/pony)
|
71
|
+
|
72
|
+
## TODO
|
73
|
+
|
74
|
+
* Specs coming soon!
|
75
|
+
|
76
|
+
## Testing
|
77
|
+
|
78
|
+
You have two options:
|
79
|
+
|
80
|
+
* run `bundle exec rake`
|
81
|
+
* run `bundle exec guard` for continuous feedback
|
82
|
+
|
83
|
+
## Contributing
|
84
|
+
|
85
|
+
Do the usual fork -> change -> pull request dance.
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "campfire_bot/standup/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "campfire-bot-standup"
|
7
|
+
s.version = CampfireBot::Standup::VERSION
|
8
|
+
s.authors = ["hoverlover"]
|
9
|
+
s.email = ["hoverlover@gmail.com"]
|
10
|
+
s.homepage = ""
|
11
|
+
s.summary = %q{Plugin for campfire-bot that sends Standup emails using the command !standup.}
|
12
|
+
s.description = s.summary
|
13
|
+
|
14
|
+
s.rubyforge_project = "campfire-bot-standup"
|
15
|
+
|
16
|
+
s.files = `git ls-files`.split("\n")
|
17
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
18
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
19
|
+
s.require_paths = ["lib/campfire_bot"]
|
20
|
+
|
21
|
+
s.add_dependency 'campfire-bot', '~> 0.0.1'
|
22
|
+
s.add_dependency 'pony', '~> 1.3'
|
23
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
require 'pony'
|
2
|
+
|
3
|
+
module CampfireBot
|
4
|
+
module Standup
|
5
|
+
class Plugin < CampfireBot::Plugin
|
6
|
+
on_command 'standup', :standup
|
7
|
+
|
8
|
+
def initialize
|
9
|
+
@config = YAML::load(ERB.new(File.read("#{BOT_ROOT}/standup-config.yml")).result)[BOT_ENVIRONMENT]
|
10
|
+
end
|
11
|
+
|
12
|
+
def standup(msg)
|
13
|
+
bot.log.debug "sending standup email to #{to_addresses}"
|
14
|
+
|
15
|
+
Pony.mail({
|
16
|
+
:to => to_addresses,
|
17
|
+
:from => from(msg),
|
18
|
+
:subject => subject,
|
19
|
+
:body => msg[:message]
|
20
|
+
}.merge(pony_options))
|
21
|
+
|
22
|
+
msg.speak "Sent standup email to #{to_addresses.join(', ')}"
|
23
|
+
end
|
24
|
+
|
25
|
+
private
|
26
|
+
|
27
|
+
def from(msg)
|
28
|
+
msg[:user][:email_address]
|
29
|
+
end
|
30
|
+
|
31
|
+
def to_addresses
|
32
|
+
@config['to']
|
33
|
+
end
|
34
|
+
|
35
|
+
def subject
|
36
|
+
@config['subject']
|
37
|
+
end
|
38
|
+
|
39
|
+
def pony_options
|
40
|
+
@config['pony_options']
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
---
|
2
|
+
production:
|
3
|
+
subject: Daily Standup
|
4
|
+
to:
|
5
|
+
- michael.scott@dunder-mifflin.com
|
6
|
+
pony_options:
|
7
|
+
# NOTE: The colons before these options are very important.
|
8
|
+
# Pony requires that the keys be symbols and not strings.
|
9
|
+
#
|
10
|
+
:via: :smtp
|
11
|
+
:via_options:
|
12
|
+
:address: smtp.sendgrid.net
|
13
|
+
:port: 587
|
14
|
+
:enable_starttls_auto: true
|
15
|
+
:authentication: :plain
|
16
|
+
:user_name: your-user-name
|
17
|
+
:password: secret
|
metadata
ADDED
@@ -0,0 +1,75 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: campfire-bot-standup
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- hoverlover
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2011-10-03 00:00:00.000000000Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: campfire-bot
|
16
|
+
requirement: &70115511760240 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 0.0.1
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *70115511760240
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: pony
|
27
|
+
requirement: &70115511759720 !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ~>
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '1.3'
|
33
|
+
type: :runtime
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *70115511759720
|
36
|
+
description: Plugin for campfire-bot that sends Standup emails using the command !standup.
|
37
|
+
email:
|
38
|
+
- hoverlover@gmail.com
|
39
|
+
executables: []
|
40
|
+
extensions: []
|
41
|
+
extra_rdoc_files: []
|
42
|
+
files:
|
43
|
+
- .gitignore
|
44
|
+
- Gemfile
|
45
|
+
- README.md
|
46
|
+
- Rakefile
|
47
|
+
- campfire-bot-standup.gemspec
|
48
|
+
- lib/campfire_bot/standup.rb
|
49
|
+
- lib/campfire_bot/standup/version.rb
|
50
|
+
- standup-config.example.yml
|
51
|
+
homepage: ''
|
52
|
+
licenses: []
|
53
|
+
post_install_message:
|
54
|
+
rdoc_options: []
|
55
|
+
require_paths:
|
56
|
+
- lib/campfire_bot
|
57
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
58
|
+
none: false
|
59
|
+
requirements:
|
60
|
+
- - ! '>='
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0'
|
63
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
64
|
+
none: false
|
65
|
+
requirements:
|
66
|
+
- - ! '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
requirements: []
|
70
|
+
rubyforge_project: campfire-bot-standup
|
71
|
+
rubygems_version: 1.8.10
|
72
|
+
signing_key:
|
73
|
+
specification_version: 3
|
74
|
+
summary: Plugin for campfire-bot that sends Standup emails using the command !standup.
|
75
|
+
test_files: []
|