mdma 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in mdma.gemspec
4
+ gemspec
5
+
6
+ gem 'debugger'
data/HISTORY.md ADDED
@@ -0,0 +1,3 @@
1
+ v0.1.0 - 2014/02/08 Silence yajl-ruby deprecation
2
+
3
+ v0.1.0 - 2014/02/05 Mdma.run accepts optional parameters
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
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ begin
4
+ require 'mdma'
5
+ rescue LoadError
6
+ require 'rubygems'
7
+ require 'mdma'
8
+ end
9
+
10
+ Mdma.run subdomain: ENV['CAMPFIRE_SUBDOMAIN'], room_id: ENV['CAMPFIRE_ROOM_ID'], token: ENV['CAMPFIRE_TOKEN']
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
@@ -0,0 +1,3 @@
1
+ module Mdma
2
+ VERSION = '0.1.1'
3
+ end
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: []