webhook_handler 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -1
- data/README.md +8 -0
- data/exe/webhook_handler +5 -0
- data/lib/webhook_handler/cli.rb +32 -0
- data/lib/webhook_handler/templates/Gemfile.tt +3 -0
- data/lib/webhook_handler/templates/Procfile +2 -0
- data/lib/webhook_handler/templates/app.rb.tt +9 -0
- data/lib/webhook_handler/templates/config.ru.tt +2 -0
- data/lib/webhook_handler/version.rb +1 -1
- data/webhook_handler.gemspec +1 -0
- metadata +23 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b62ea3bcde5827df3a3cf83961ade1ef233db2a
|
4
|
+
data.tar.gz: cba55499d43014d215ec1d03e10cd6bda97f05b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dae175987d4eace1329fbe7d909b931feb2daebd6868c9ae2f422a5844414a9e47923a0e5cd5b0a8cd68197d9deac09119a91b7082389014e923c5f753f568c3
|
7
|
+
data.tar.gz: 41315f0d4e249325c45b9ff7f31568fdcef44335bb6198d7681f0f1204eafe1e32b7ca8b9bc9f5fa3884b980cb92e977c68c54231b781df9b86412a37874b0ef
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,12 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
5
5
|
|
6
|
+
## [0.3.0] - 2015-11-23
|
7
|
+
|
8
|
+
### Added
|
9
|
+
|
10
|
+
- There is now an app generator that can be used to create a new app. This can be accessed via the `webhook_handler` binary.
|
11
|
+
|
6
12
|
## [0.2.0] - 2015-11-23
|
7
13
|
|
8
14
|
### Changed
|
@@ -13,4 +19,5 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
13
19
|
|
14
20
|
- Initial release
|
15
21
|
|
16
|
-
[0.2.0]: https://github.com/
|
22
|
+
[0.2.0]: https://github.com/chrismytton/webhook_handler/compare/v0.1.0...v0.2.0
|
23
|
+
[0.3.0]: https://github.com/chrismytton/webhook_handler/compare/v0.2.0...v0.3.0
|
data/README.md
CHANGED
@@ -62,6 +62,14 @@ class MyApp
|
|
62
62
|
end
|
63
63
|
```
|
64
64
|
|
65
|
+
## CLI
|
66
|
+
|
67
|
+
You can also generate a new app with the command line tool:
|
68
|
+
|
69
|
+
$ webhook_handler new acme_widget_receiver
|
70
|
+
|
71
|
+
This will generate a new app in the `acme_widget_receiver` directory with the class `AcmeWidgetReceiver` in the `app.rb` file.
|
72
|
+
|
65
73
|
## Development
|
66
74
|
|
67
75
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
data/exe/webhook_handler
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'thor'
|
2
|
+
require 'fileutils'
|
3
|
+
require 'webhook_handler/version'
|
4
|
+
|
5
|
+
module WebhookHandler
|
6
|
+
class CLI < Thor
|
7
|
+
include Thor::Actions
|
8
|
+
desc "new NAME", "create a new app called NAME"
|
9
|
+
|
10
|
+
def self.source_root
|
11
|
+
File.dirname(__FILE__)
|
12
|
+
end
|
13
|
+
|
14
|
+
def new(name)
|
15
|
+
# @see http://git.io/vBqrp
|
16
|
+
@constant_name = name.tr('-', '_').gsub(/-[_-]*(?![_-]|$)/) { "::" }.gsub(/([_-]+|(::)|^)(.|$)/) { $2.to_s + $3.upcase }
|
17
|
+
|
18
|
+
FileUtils.mkdir_p(name)
|
19
|
+
puts "Creating app '#{name}'..."
|
20
|
+
templates = {
|
21
|
+
'Gemfile.tt' => 'Gemfile',
|
22
|
+
'Procfile' => 'Procfile',
|
23
|
+
'app.rb.tt' => 'app.rb',
|
24
|
+
'config.ru.tt' => 'config.ru'
|
25
|
+
}
|
26
|
+
|
27
|
+
templates.each do |src, dest|
|
28
|
+
template(File.join('templates', src), File.join(name, dest))
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
data/webhook_handler.gemspec
CHANGED
@@ -21,6 +21,7 @@ Gem::Specification.new do |spec|
|
|
21
21
|
|
22
22
|
spec.add_dependency 'sidekiq', ['>= 3', '< 5']
|
23
23
|
spec.add_dependency 'sinatra', ['>= 1', '< 2']
|
24
|
+
spec.add_dependency 'thor'
|
24
25
|
|
25
26
|
spec.add_development_dependency 'bundler', '~> 1.10'
|
26
27
|
spec.add_development_dependency 'rake', '~> 10.0'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: webhook_handler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Mytton
|
@@ -50,6 +50,20 @@ dependencies:
|
|
50
50
|
- - "<"
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: '2'
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
name: thor
|
55
|
+
requirement: !ruby/object:Gem::Requirement
|
56
|
+
requirements:
|
57
|
+
- - ">="
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: '0'
|
60
|
+
type: :runtime
|
61
|
+
prerelease: false
|
62
|
+
version_requirements: !ruby/object:Gem::Requirement
|
63
|
+
requirements:
|
64
|
+
- - ">="
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: '0'
|
53
67
|
- !ruby/object:Gem::Dependency
|
54
68
|
name: bundler
|
55
69
|
requirement: !ruby/object:Gem::Requirement
|
@@ -151,7 +165,8 @@ dependencies:
|
|
151
165
|
description:
|
152
166
|
email:
|
153
167
|
- chrismytton@gmail.com
|
154
|
-
executables:
|
168
|
+
executables:
|
169
|
+
- webhook_handler
|
155
170
|
extensions: []
|
156
171
|
extra_rdoc_files: []
|
157
172
|
files:
|
@@ -167,7 +182,13 @@ files:
|
|
167
182
|
- example/README.md
|
168
183
|
- example/app.rb
|
169
184
|
- example/config.ru
|
185
|
+
- exe/webhook_handler
|
170
186
|
- lib/webhook_handler.rb
|
187
|
+
- lib/webhook_handler/cli.rb
|
188
|
+
- lib/webhook_handler/templates/Gemfile.tt
|
189
|
+
- lib/webhook_handler/templates/Procfile
|
190
|
+
- lib/webhook_handler/templates/app.rb.tt
|
191
|
+
- lib/webhook_handler/templates/config.ru.tt
|
171
192
|
- lib/webhook_handler/version.rb
|
172
193
|
- webhook_handler.gemspec
|
173
194
|
homepage: https://github.com/chrismytton/webhook_handler
|