minitel 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- checksums.yaml.gz.sig +0 -0
- data/.travis.yml +14 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +32 -0
- data/LICENSE +19 -0
- data/lib/minitel/client.rb +27 -0
- data/lib/minitel/version.rb +3 -0
- data/lib/minitel.rb +5 -0
- data/minitel.gemspec +25 -0
- data/spec/minitel_spec.rb +7 -0
- data/spec/spec_helper.rb +1 -0
- data.tar.gz.sig +0 -0
- metadata +125 -0
- metadata.gz.sig +2 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 648b98c8dc9f1b7ffb9dbfea6a2608dbf0e28e45
|
4
|
+
data.tar.gz: 73eb5fee51e79d898d0601ebff1b766231da210c
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 7356837b3e88e75e92e087e474238983a46e810577ecad94eb4d5a6fceb98714e9c92e57a8965520ab058e8ea2fd46441cf37f2d1e10be32991c1499531217ce
|
7
|
+
data.tar.gz: a9b3532a374f148d609e8105bb1ee22fa715a83982f758b7053b53db266fa2acd66e8b1b05a20db2bc34b3e27ade1273b5f3ff97c5218ede3bb1d73957f42bca
|
checksums.yaml.gz.sig
ADDED
Binary file
|
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
minitel (0.0.1)
|
5
|
+
excon (~> 0, > 0.16)
|
6
|
+
multi_json (~> 1.0)
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
diff-lcs (1.2.5)
|
12
|
+
excon (0.39.6)
|
13
|
+
multi_json (1.10.1)
|
14
|
+
rspec (3.1.0)
|
15
|
+
rspec-core (~> 3.1.0)
|
16
|
+
rspec-expectations (~> 3.1.0)
|
17
|
+
rspec-mocks (~> 3.1.0)
|
18
|
+
rspec-core (3.1.5)
|
19
|
+
rspec-support (~> 3.1.0)
|
20
|
+
rspec-expectations (3.1.2)
|
21
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
22
|
+
rspec-support (~> 3.1.0)
|
23
|
+
rspec-mocks (3.1.2)
|
24
|
+
rspec-support (~> 3.1.0)
|
25
|
+
rspec-support (3.1.1)
|
26
|
+
|
27
|
+
PLATFORMS
|
28
|
+
ruby
|
29
|
+
|
30
|
+
DEPENDENCIES
|
31
|
+
minitel!
|
32
|
+
rspec (~> 3.0)
|
data/LICENSE
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
The MIT License
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
5
|
+
in the Software without restriction, including without limitation the rights
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
8
|
+
furnished to do so, subject to the following conditions:
|
9
|
+
|
10
|
+
The above copyright notice and this permission notice shall be included in
|
11
|
+
all copies or substantial portions of the Software.
|
12
|
+
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
+
THE SOFTWARE.
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'multi_json'
|
2
|
+
require 'excon'
|
3
|
+
|
4
|
+
module Minitel
|
5
|
+
class Client
|
6
|
+
attr_accessor :telex_url
|
7
|
+
|
8
|
+
def initialize(telex_url)
|
9
|
+
raise "Bad Url" unless telex_url.start_with? "https://"
|
10
|
+
self.telex_url = telex_url
|
11
|
+
end
|
12
|
+
|
13
|
+
def notify_app(args)
|
14
|
+
message = {
|
15
|
+
title: args.fetch(:title),
|
16
|
+
body: args.fetch(:body),
|
17
|
+
target: {type: 'app', id: args.fetch(:app_uuid)}
|
18
|
+
}
|
19
|
+
|
20
|
+
response = Excon.post("#{telex_url}/producer/messages",
|
21
|
+
body: MultiJson.dump(message),
|
22
|
+
expects: 201)
|
23
|
+
|
24
|
+
MultiJson.load(response.body)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
data/lib/minitel.rb
ADDED
data/minitel.gemspec
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require_relative 'lib/minitel'
|
4
|
+
|
5
|
+
Gem::Specification.new do |gem|
|
6
|
+
gem.name = "minitel"
|
7
|
+
gem.authors = ["Will Leinweber"]
|
8
|
+
gem.email = ["will@bitfission.com"]
|
9
|
+
gem.description = %q{𝕋𝔼𝕃𝔼𝕏 client}
|
10
|
+
gem.summary = %q{𝕋𝔼𝕃𝔼𝕏 client: see https://github.com/heroku/telex}
|
11
|
+
gem.homepage = "https://github.com/heroku/minitel"
|
12
|
+
|
13
|
+
gem.files = `git ls-files`.split($\)
|
14
|
+
#gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
15
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
16
|
+
gem.require_paths = ["lib"]
|
17
|
+
gem.version = Minitel::VERSION
|
18
|
+
gem.platform = Gem::Platform::RUBY
|
19
|
+
gem.license = "MIT"
|
20
|
+
|
21
|
+
gem.add_runtime_dependency 'excon', '~> 0', "> 0.16"
|
22
|
+
gem.add_runtime_dependency 'multi_json', '~> 1.0'
|
23
|
+
|
24
|
+
gem.add_development_dependency 'rspec', '~> 3.0'
|
25
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'rspec'
|
data.tar.gz.sig
ADDED
Binary file
|
metadata
ADDED
@@ -0,0 +1,125 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: minitel
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Will Leinweber
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain:
|
11
|
+
- |
|
12
|
+
-----BEGIN CERTIFICATE-----
|
13
|
+
MIIDLDCCAhSgAwIBAgIBAjANBgkqhkiG9w0BAQUFADA8MQwwCgYDVQQDDANnZWQx
|
14
|
+
FzAVBgoJkiaJk/IsZAEZFgdfYWVyaWVfMRMwEQYKCZImiZPyLGQBGRYDb3JnMB4X
|
15
|
+
DTE0MTAwMzIxNTAzOVoXDTE1MTAwMzIxNTAzOVowPDEMMAoGA1UEAwwDZ2VkMRcw
|
16
|
+
FQYKCZImiZPyLGQBGRYHX2FlcmllXzETMBEGCgmSJomT8ixkARkWA29yZzCCASIw
|
17
|
+
DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL2ktZGc4m4haPvYmfO3e+iS8/fz
|
18
|
+
jgNlufSZRdzgCLHrpbhah3m5/zqHyoZNiTcc8Yy1nENd3WGff9TY8c+l0jpngKWl
|
19
|
+
OcUlokbLCPeshunm69Vp27yp0gzfDSh0YpgRAEpWZo3S1z2u406TFhUg6dGhifYE
|
20
|
+
b+qFpRTmXwqTRMHySR47Qd9hvVv4X0lLJ1uQZzw0GdLh2vi4QOFogA9V84cR+eXZ
|
21
|
+
nUrVVozokeeGDPzQT8YcEPe4xOcRBdGw39FXtkdv5rV+VPWBBGHzS85OWJTgPyB/
|
22
|
+
2ORYZyzxEJh9jm2jj/HY+DMvfLltUoxbcQqUlptFcKAXxN+XCHtyvZWHfsUCAwEA
|
23
|
+
AaM5MDcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0OBBYEFIhJl2mW1q84
|
24
|
+
NnEK6bUn+w3IKVvIMA0GCSqGSIb3DQEBBQUAA4IBAQAZ6lk5u35ga+6qIx+rWMW9
|
25
|
+
o3gnYbsslgPaBFp2JrmzoMv6sWGhR5khgiCsa3B/A9LEb8HOmih8/rbL5+w1gVk1
|
26
|
+
aljsXhed340GExBCh9zQr31dGyZUQ3sxyfc0r9TjqY2kPl7mFYO0CAwHVeWCFQVx
|
27
|
+
WLNJFp9CvlBd8xTLUcWjRJ5tfxFwyOQ4i7C+02pYAnqEClmpv6x7n6+I8elW/uPG
|
28
|
+
5bkhRfJHSD/uX/cHbjmopLRbPlHrGbZTDIP4VEC5l0QLPiZ1nhKQnf3+U0+FSy2o
|
29
|
+
CCngcLCR6q+mLf+A4L54VxmyrtFpcBfmkU72QYyf3vJ9QipL3XbvJvbpPkWSn1DX
|
30
|
+
-----END CERTIFICATE-----
|
31
|
+
date: 2014-10-04 00:00:00.000000000 Z
|
32
|
+
dependencies:
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: excon
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0'
|
40
|
+
- - ">"
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '0.16'
|
43
|
+
type: :runtime
|
44
|
+
prerelease: false
|
45
|
+
version_requirements: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - "~>"
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '0'
|
50
|
+
- - ">"
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: '0.16'
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
name: multi_json
|
55
|
+
requirement: !ruby/object:Gem::Requirement
|
56
|
+
requirements:
|
57
|
+
- - "~>"
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: '1.0'
|
60
|
+
type: :runtime
|
61
|
+
prerelease: false
|
62
|
+
version_requirements: !ruby/object:Gem::Requirement
|
63
|
+
requirements:
|
64
|
+
- - "~>"
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: '1.0'
|
67
|
+
- !ruby/object:Gem::Dependency
|
68
|
+
name: rspec
|
69
|
+
requirement: !ruby/object:Gem::Requirement
|
70
|
+
requirements:
|
71
|
+
- - "~>"
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: '3.0'
|
74
|
+
type: :development
|
75
|
+
prerelease: false
|
76
|
+
version_requirements: !ruby/object:Gem::Requirement
|
77
|
+
requirements:
|
78
|
+
- - "~>"
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: '3.0'
|
81
|
+
description: "\U0001D54B\U0001D53C\U0001D543\U0001D53C\U0001D54F client"
|
82
|
+
email:
|
83
|
+
- will@bitfission.com
|
84
|
+
executables: []
|
85
|
+
extensions: []
|
86
|
+
extra_rdoc_files: []
|
87
|
+
files:
|
88
|
+
- ".travis.yml"
|
89
|
+
- Gemfile
|
90
|
+
- Gemfile.lock
|
91
|
+
- LICENSE
|
92
|
+
- lib/minitel.rb
|
93
|
+
- lib/minitel/client.rb
|
94
|
+
- lib/minitel/version.rb
|
95
|
+
- minitel.gemspec
|
96
|
+
- spec/minitel_spec.rb
|
97
|
+
- spec/spec_helper.rb
|
98
|
+
homepage: https://github.com/heroku/minitel
|
99
|
+
licenses:
|
100
|
+
- MIT
|
101
|
+
metadata: {}
|
102
|
+
post_install_message:
|
103
|
+
rdoc_options: []
|
104
|
+
require_paths:
|
105
|
+
- lib
|
106
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
112
|
+
requirements:
|
113
|
+
- - ">="
|
114
|
+
- !ruby/object:Gem::Version
|
115
|
+
version: '0'
|
116
|
+
requirements: []
|
117
|
+
rubyforge_project:
|
118
|
+
rubygems_version: 2.2.2
|
119
|
+
signing_key:
|
120
|
+
specification_version: 4
|
121
|
+
summary: "\U0001D54B\U0001D53C\U0001D543\U0001D53C\U0001D54F client: see https://github.com/heroku/telex"
|
122
|
+
test_files:
|
123
|
+
- spec/minitel_spec.rb
|
124
|
+
- spec/spec_helper.rb
|
125
|
+
has_rdoc:
|
metadata.gz.sig
ADDED