lita-docker-hub 0.1.0

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.
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ ZTNhYjQ2ZTY2Y2E1OTg0YjFmOWVlNTdkYWQ2MjZkOTFjYjFhNzdiOA==
5
+ data.tar.gz: !binary |-
6
+ YWRhYjBkYzZhN2UyNWNkNjg2ODg1OTBiZWY2MTU2NmE0YjE3NjY0Nw==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ ZTg0MDc5ZjZkY2NhZWY2OWI5ZjE4NDY5YmQ0ZjdiYjhiMjQ0ZGY1YTNmOTI0
10
+ OGI3OTE5NjY3YTRiN2Y5NDAwOTI3Y2I0ZGRlODA4ZDRiMDc0MTA2ZDBlNWY2
11
+ ZGNkZmQwNWYzMzRkMTc0MjZmNzRjN2YzNWUyMTkzNDY1Yjc4ZGM=
12
+ data.tar.gz: !binary |-
13
+ Y2ZhMGNlMmI4ODM5Y2ZiM2FkMWM5YTRmOWQ5MWUxMjU5Y2YxZWJmNmExMjRh
14
+ ZjZjMjRhMzc4NzY2OWE1ODc4YTI5ZTk4NWI5NzE2OTk4NjRmNzNkNjVkZmRm
15
+ YTEwZDU1OWI1MGEzMjAyNmE3OTVhOWQxMzFiNDU4MWZhZDU0ZTg=
@@ -0,0 +1,50 @@
1
+ *.gem
2
+ *.rbc
3
+ /.config
4
+ /coverage/
5
+ /InstalledFiles
6
+ /pkg/
7
+ /spec/reports/
8
+ /spec/examples.txt
9
+ /test/tmp/
10
+ /test/version_tmp/
11
+ /tmp/
12
+
13
+ # Used by dotenv library to load environment variables.
14
+ # .env
15
+
16
+ ## Specific to RubyMotion:
17
+ .dat*
18
+ .repl_history
19
+ build/
20
+ *.bridgesupport
21
+ build-iPhoneOS/
22
+ build-iPhoneSimulator/
23
+
24
+ ## Specific to RubyMotion (use of CocoaPods):
25
+ #
26
+ # We recommend against adding the Pods directory to your .gitignore. However
27
+ # you should judge for yourself, the pros and cons are mentioned at:
28
+ # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
29
+ #
30
+ # vendor/Pods/
31
+
32
+ ## Documentation cache and generated files:
33
+ /.yardoc/
34
+ /_yardoc/
35
+ /doc/
36
+ /rdoc/
37
+
38
+ ## Environment normalization:
39
+ /.bundle/
40
+ /vendor/bundle
41
+ /lib/bundler/man/
42
+
43
+ # for a library or gem, you might want to ignore these files since the code is
44
+ # intended to run in multiple environments; otherwise, check them in:
45
+ # Gemfile.lock
46
+ # .ruby-version
47
+ # .ruby-gemset
48
+
49
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
50
+ .rvmrc
@@ -0,0 +1,17 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.3.1
4
+ install:
5
+ - travis_retry bundle install
6
+ script: bundle exec rspec
7
+ deploy:
8
+ provider: rubygems
9
+ api_key:
10
+ secure: Pa29E+nF2RCkiu0JAGJWHTeD3aDRkq8j2Ip3E293WM4vzkOSynoHuMjoXO3WDLSTWhGxV/NkuCGdlj06DXZ7CgJ2EAoheHEpmlY7aGfaI+ykIABNvB3O7f6xA7GtqHcwlyQECSlA8TK+ZLlnviWQROKlOe59kAdCHrdxx7FENpSRWmzyMTCCGxbPeetaHt0g50lXbx9FMoyM2Nv4JEY+uozrunawSR0LyTZ/IK6zhfy1mavA77r+yUn+/wErQ7hRtA81deoHZUsxWFqjRMLg3G+xl09ZEttusJqdzat+Ewu2t6fZCBmmBOVXPO60zJGAzUKiRevkghumr5clTBRa4Ur9xFUgi934ZdkwqBKQGjhPltJDEbS0cYtsqD3dfz7jAtrx+tluqgR7oCvge94ApM/vjPtE/IsXqlsTIY3j4RtslbM5eaGXVw6wm84Ksb36Ei/Y0W74H1p5cHSmlrBdakeHGYwFiQvQqcJ4LCUi2cLA1Sw/nYq6C6nmu79gsKxv5eq5iJWGgWXUIAwRTI3pJOBshf0lWQPU1KMxIhyDL6mgz/WmDPMZBh/msED8Kks/1UkmmVBfG5o13g+/eOV7yQ0DDoJASj+Myc6bblGMTQwhusIR8F/wkKNhOBjj8SpqDzk8XRoHqbGo1dVRWxCF/6UlKu5c5+vRZWUP4AXQxgc=
11
+ gem: lita-docker-hub
12
+ on:
13
+ tags: true
14
+ repo: datacite/lita-docker-hub
15
+ notifications:
16
+ email: false
17
+ slack: datacite:Wt8En0ALoTA6Kjc5EOKNDWxN
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2016 DataCite
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,24 @@
1
+ # lita-docker-hub
2
+
3
+ [![Build Status](https://travis-ci.org/datacite/lita-docker-hub.svg?branch=master)](https://travis-ci.org/datacite/lita-docker-hub)
4
+
5
+ A [Docker Hub](https://hub.docker.com/) plugin for [Lita](https://www.lita.io/).
6
+
7
+ ## Installation
8
+
9
+ Add lita-docker-hub to your Lita instance's Gemfile:
10
+
11
+ ``` ruby
12
+ gem "lita-docker-hub"
13
+ ```
14
+ ## Configuration
15
+
16
+ TODO: Describe any configuration attributes the plugin exposes.
17
+
18
+ ## Usage
19
+
20
+ TODO: Describe the plugin's features and how to use them.
21
+
22
+ ## License
23
+
24
+ [MIT](LICENSE.md)
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task default: :spec
@@ -0,0 +1,12 @@
1
+ require "lita"
2
+
3
+ Lita.load_locales Dir[File.expand_path(
4
+ File.join("..", "..", "locales", "*.yml"), __FILE__
5
+ )]
6
+
7
+ require "lita/handlers/docker_hub"
8
+
9
+ Lita::Handlers::DockerHub.template_root File.expand_path(
10
+ File.join("..", "..", "templates"),
11
+ __FILE__
12
+ )
@@ -0,0 +1,26 @@
1
+ module Lita
2
+ module Handlers
3
+ class DockerHub < Handler
4
+ config :room, type: String, default: "general"
5
+
6
+ http.post "/docker-hub/receive", :receive
7
+
8
+ def receive(request, response)
9
+ room = config.room
10
+ message = parse(request.body.string)
11
+ send_message_to_room(message.inspect, room)
12
+
13
+ response.headers["Content-Type"] = "application/json"
14
+ response.write("ok")
15
+ end
16
+
17
+ Lita.register_handler(self)
18
+
19
+ private
20
+
21
+ def parse(obj)
22
+ MultiJson.load(obj)
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,3 @@
1
+ module DockerHub
2
+ VERSION = "0.1.0"
3
+ end
@@ -0,0 +1,26 @@
1
+ require File.expand_path("../lib/lita/handlers/version", __FILE__)
2
+
3
+ Gem::Specification.new do |spec|
4
+ spec.name = "lita-docker-hub"
5
+ spec.version = DockerHub::VERSION
6
+ spec.authors = ["Martin Fenner"]
7
+ spec.email = ["mfenner@datacite.org"]
8
+ spec.description = "A Docker Hub plugin for Lita."
9
+ spec.summary = "Lita extension to consume Docker Hub webhook events."
10
+ spec.homepage = "https://github.com/datacite/lita-docker-hub"
11
+ spec.license = "MIT"
12
+ spec.metadata = { "lita_plugin_type" => "handler" }
13
+
14
+ spec.files = `git ls-files`.split($/)
15
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
16
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
17
+ spec.require_paths = ["lib"]
18
+
19
+ spec.add_runtime_dependency "lita", ">= 4.7"
20
+
21
+ spec.add_development_dependency "bundler", "~> 1.3"
22
+ spec.add_development_dependency "pry-byebug"
23
+ spec.add_development_dependency "rake"
24
+ spec.add_development_dependency "rack-test"
25
+ spec.add_development_dependency "rspec", ">= 3.0.0"
26
+ end
@@ -0,0 +1,4 @@
1
+ en:
2
+ lita:
3
+ handlers:
4
+ docker:
@@ -0,0 +1,5 @@
1
+ require "spec_helper"
2
+
3
+ describe Lita::Handlers::DockerHub, lita_handler: true do
4
+
5
+ end
@@ -0,0 +1,6 @@
1
+ require "lita-docker-hub"
2
+ require "lita/rspec"
3
+
4
+ # A compatibility mode is provided for older plugins upgrading from Lita 3. Since this plugin
5
+ # was generated with Lita 4, the compatibility mode should be left disabled.
6
+ Lita.version_3_compatibility_mode = false
metadata ADDED
@@ -0,0 +1,144 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: lita-docker-hub
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Martin Fenner
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-08-14 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: lita
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ! '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '4.7'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ! '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '4.7'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: '1.3'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: '1.3'
41
+ - !ruby/object:Gem::Dependency
42
+ name: pry-byebug
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ! '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ! '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rack-test
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ! '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ! '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rspec
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ! '>='
88
+ - !ruby/object:Gem::Version
89
+ version: 3.0.0
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ! '>='
95
+ - !ruby/object:Gem::Version
96
+ version: 3.0.0
97
+ description: A Docker Hub plugin for Lita.
98
+ email:
99
+ - mfenner@datacite.org
100
+ executables: []
101
+ extensions: []
102
+ extra_rdoc_files: []
103
+ files:
104
+ - .gitignore
105
+ - .travis.yml
106
+ - Gemfile
107
+ - LICENSE.md
108
+ - README.md
109
+ - Rakefile
110
+ - lib/lita-docker-hub.rb
111
+ - lib/lita/handlers/docker_hub.rb
112
+ - lib/lita/handlers/version.rb
113
+ - lita-docker-hub.gemspec
114
+ - locales/en.yml
115
+ - spec/lita/handlers/docker_spec.rb
116
+ - spec/spec_helper.rb
117
+ homepage: https://github.com/datacite/lita-docker-hub
118
+ licenses:
119
+ - MIT
120
+ metadata:
121
+ lita_plugin_type: handler
122
+ post_install_message:
123
+ rdoc_options: []
124
+ require_paths:
125
+ - lib
126
+ required_ruby_version: !ruby/object:Gem::Requirement
127
+ requirements:
128
+ - - ! '>='
129
+ - !ruby/object:Gem::Version
130
+ version: '0'
131
+ required_rubygems_version: !ruby/object:Gem::Requirement
132
+ requirements:
133
+ - - ! '>='
134
+ - !ruby/object:Gem::Version
135
+ version: '0'
136
+ requirements: []
137
+ rubyforge_project:
138
+ rubygems_version: 2.4.5
139
+ signing_key:
140
+ specification_version: 4
141
+ summary: Lita extension to consume Docker Hub webhook events.
142
+ test_files:
143
+ - spec/lita/handlers/docker_spec.rb
144
+ - spec/spec_helper.rb