cinch-bitcoin 1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/cinch/plugins/bitcoin.rb +27 -0
- metadata +61 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: 342ecca644dc27c036171fcb81ffdf7213f788d0
|
4
|
+
data.tar.gz: 8976e05f25086551d2eeec77bb369ec179bbd6d2
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: dd810a654a658bbf8689b0367fa3c8d7120ea97c35ced37d63f6cfe17c179507ee79779acc30767dd51220700c9fe0c20fe9565474d56d1cc36bc583d6634b6c
|
7
|
+
data.tar.gz: dc38c47e58a15f13640a19de013b85d13a102f2a6cb93d99b0e25501829f854bf2aa56440986cd96ae56c460d0cefd2c6ad6c723612464594ab15fc78307519e
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'cinch'
|
2
|
+
require 'ostruct'
|
3
|
+
require 'open-uri'
|
4
|
+
require 'json'
|
5
|
+
|
6
|
+
module Cinch
|
7
|
+
module Plugins
|
8
|
+
class Bitcoin
|
9
|
+
include Cinch::Plugin
|
10
|
+
|
11
|
+
set :plugin_name, 'bitcoin'
|
12
|
+
set :help, <<-USAGE.gsub(/^ {6}/, '')
|
13
|
+
Just a seen plugin!
|
14
|
+
Usage:
|
15
|
+
* !btcv: Returns the latest value of 1 (one) Bitcoin in USD
|
16
|
+
USAGE
|
17
|
+
|
18
|
+
match /btcv/
|
19
|
+
|
20
|
+
def execute(m)
|
21
|
+
data = JSON.parse(open("http://blockchain.info/ticker").read)
|
22
|
+
value = data['USD']['15m']
|
23
|
+
m.reply "Current value of 1 BTC in USD is: #{value}", true
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
metadata
ADDED
@@ -0,0 +1,61 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: cinch-bitcoin
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: '1.0'
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Richard Banks
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-03-12 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: cinch
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 2.1.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 2.1.0
|
27
|
+
description: A gem/plugin for the Cinch IRC Framework that returns the value of Bitcoin
|
28
|
+
in USD.
|
29
|
+
email:
|
30
|
+
- namaste@rawrnet.net
|
31
|
+
executables: []
|
32
|
+
extensions: []
|
33
|
+
extra_rdoc_files: []
|
34
|
+
files:
|
35
|
+
- lib/cinch/plugins/bitcoin.rb
|
36
|
+
homepage: https://github.com/RawrNet/cinch-bitcoin
|
37
|
+
licenses:
|
38
|
+
- MIT
|
39
|
+
metadata: {}
|
40
|
+
post_install_message:
|
41
|
+
rdoc_options: []
|
42
|
+
require_paths:
|
43
|
+
- lib
|
44
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - ! '>='
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '0'
|
49
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
requirements: []
|
55
|
+
rubyforge_project: ! '[none]'
|
56
|
+
rubygems_version: 2.1.11
|
57
|
+
signing_key:
|
58
|
+
specification_version: 4
|
59
|
+
summary: A gem/plugin for the Cinch IRC Framework that returns the value of Bitcoin
|
60
|
+
in USD.
|
61
|
+
test_files: []
|