mdma 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/Gemfile +6 -0
- data/HISTORY.md +3 -0
- data/LICENSE.txt +22 -0
- data/README.md +33 -0
- data/Rakefile +1 -0
- data/bin/pp +10 -0
- data/lib/mdma.rb +22 -0
- data/lib/mdma/version.rb +3 -0
- data/mdma.gemspec +20 -0
- metadata +55 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 0d6731965917056257328dac4befeace78df59ed
|
4
|
+
data.tar.gz: 4bb27e36cbad6c08f31254c4850ed35993ecbf49
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: f404529af9ecd86311c0ad92a199ffed7b9f163833a4e2a0ebaf807db6cdcc20d5f2c9980c6a3eecfb95a93447d71c2d5f99f6566389c886d319355c9ef96829
|
7
|
+
data.tar.gz: 69914f846376937fc9163d7e35182e90815ef4884d64876c3e7a0bfeed8d7a077522de7d7cc1d8312f30a524aabb0e987799c6c324d6ab8a8624848a9605bb75
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/HISTORY.md
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 claudiob
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
# Mdma
|
2
|
+
|
3
|
+
TODO: Write a gem description
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'mdma'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install mdma
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
From the command line run:
|
22
|
+
|
23
|
+
$ mdma
|
24
|
+
|
25
|
+
Remember to define the following environment variables: `CAMPFIRE_SUBDOMAIN`, `CAMPFIRE_ROOM_ID` and `CAMPFIRE_TOKEN`.
|
26
|
+
|
27
|
+
## Contributing
|
28
|
+
|
29
|
+
1. Fork it
|
30
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
31
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
32
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
33
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/bin/pp
ADDED
data/lib/mdma.rb
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'mdma/room'
|
2
|
+
|
3
|
+
# Provides a method to listen and respond to messages in a Campfire room.
|
4
|
+
module Mdma
|
5
|
+
# Listen and respond to messages in a Campfire room.
|
6
|
+
#
|
7
|
+
# @example Interact in the room https://xxx.campfirenow.com/room/123 as the user with token 'abcd'
|
8
|
+
#
|
9
|
+
# require 'mdma'
|
10
|
+
# Mdma.run 'xxx', 123, 'abcd'
|
11
|
+
#
|
12
|
+
# @param [String] subdomain The campfirenow.com subdomain that hosts the room
|
13
|
+
# @param [Integer] room_id The ID of the Campfire room
|
14
|
+
# @param [String] token The token of the Campfire user to interact with
|
15
|
+
#
|
16
|
+
# @see https://github.com/37signals/campfire-api for Campfire API documentation
|
17
|
+
def self.run(options = {})
|
18
|
+
Room.new(options).listen do |room, request|
|
19
|
+
room.respond_with request.response if request.relevant?
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
data/lib/mdma/version.rb
ADDED
data/mdma.gemspec
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'mdma/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "mdma"
|
8
|
+
spec.version = Mdma::VERSION
|
9
|
+
spec.authors = ["claudiob"]
|
10
|
+
spec.email = ["claudiob@gmail.com"]
|
11
|
+
spec.description = %q{Super Pretty Print}
|
12
|
+
spec.summary = %q{A Super Pretty Print}
|
13
|
+
spec.homepage = "https://www.github.com/claudiob/mdma"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
end
|
metadata
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: mdma
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- claudiob
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-12-07 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: Super Pretty Print
|
14
|
+
email:
|
15
|
+
- claudiob@gmail.com
|
16
|
+
executables:
|
17
|
+
- pp
|
18
|
+
extensions: []
|
19
|
+
extra_rdoc_files: []
|
20
|
+
files:
|
21
|
+
- ".gitignore"
|
22
|
+
- Gemfile
|
23
|
+
- HISTORY.md
|
24
|
+
- LICENSE.txt
|
25
|
+
- README.md
|
26
|
+
- Rakefile
|
27
|
+
- bin/pp
|
28
|
+
- lib/mdma.rb
|
29
|
+
- lib/mdma/version.rb
|
30
|
+
- mdma.gemspec
|
31
|
+
homepage: https://www.github.com/claudiob/mdma
|
32
|
+
licenses:
|
33
|
+
- MIT
|
34
|
+
metadata: {}
|
35
|
+
post_install_message:
|
36
|
+
rdoc_options: []
|
37
|
+
require_paths:
|
38
|
+
- lib
|
39
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
44
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - ">="
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '0'
|
49
|
+
requirements: []
|
50
|
+
rubyforge_project:
|
51
|
+
rubygems_version: 2.6.13
|
52
|
+
signing_key:
|
53
|
+
specification_version: 4
|
54
|
+
summary: A Super Pretty Print
|
55
|
+
test_files: []
|