elastic_beans 0.12.0.alpha1 → 0.12.0.alpha2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f7c0cd1ef593783f14539924dda68021f78c5fa0
4
- data.tar.gz: 9d3f42eee3bff3cfa8e9af2c59fe0cf492661ed2
3
+ metadata.gz: 7ae6aa35f652ca0e53486f211218fedea2419d62
4
+ data.tar.gz: 55e52f1bb58c11f5fa40934621ecca13e63b2408
5
5
  SHA512:
6
- metadata.gz: 9764af5c4d6cf9637a21a6383bb52d04adbf37c0fdeeaa99ecb40155666b301368ff77e842a6b0e3fa615e6134f8c88289b444a305f5d29a43e92c71185a48ee
7
- data.tar.gz: 7c144fa1983ea8de3dda5623892c94e625f05b2082fda65b758a1070462986d6f216b1e7a47fd274b58532943a9995fadf21c4c0662a615b09328596acd49c0d
6
+ metadata.gz: abd30c1b53faac2caf2f0c38261d999d3a9d5863253ede34375a812b9e1617a9ed96e017cbd579bdeede82e012dcf5b9a31f95b54236526f3266c564a3435649
7
+ data.tar.gz: f34694b8c6601115f442eee12a90195cf50af471ec90a52ea94d5d332a58d31b70c7c00e8aa923c9eea871a2051594f9438bab2a2f64319e6df914401631a611
data/README.md CHANGED
@@ -115,10 +115,10 @@ In `config/initializers/elastic_beans.rb`, add the middleware into your stack, b
115
115
  )
116
116
  end
117
117
 
118
- In `cron.yaml`, URL-encode the full command to be run and add it as another path segment to `/exec`:
118
+ In `cron.yaml`, name the full command to be run and use `/exec` as the `url`:
119
119
 
120
120
  - name: rake myapp:mytask[arg1,arg2]
121
- url: "/exec/rake%20myapp%3Amytask%5Barg1%2Carg2%5D"
121
+ url: "/exec"
122
122
 
123
123
  Then create a periodic scheduler environment using `cron.yaml`:
124
124
 
@@ -1,5 +1,4 @@
1
1
  require "logger"
2
- require "uri"
3
2
  require "action_dispatch"
4
3
 
5
4
  module ElasticBeans
@@ -51,12 +50,12 @@ module ElasticBeans
51
50
  end
52
51
 
53
52
  def command_from_request(request)
54
- command_string = URI.unescape(request.path.sub(%r{\A/exec/}, ''))
53
+ command_string = request.headers['X-Aws-Sqsd-Taskname']
55
54
  ::ElasticBeans::Exec::Command.new(command_string: command_string)
56
55
  end
57
56
 
58
57
  def cron_request?(request)
59
- request.local? && aws_sqsd?(request) && request.method == 'POST' && request.path.start_with?('/exec/')
58
+ request.local? && aws_sqsd?(request) && request.method == 'POST' && request.path == '/exec'
60
59
  end
61
60
 
62
61
  def enabled?
@@ -1,3 +1,3 @@
1
1
  module ElasticBeans
2
- VERSION = "0.12.0.alpha1"
2
+ VERSION = "0.12.0.alpha2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elastic_beans
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0.alpha1
4
+ version: 0.12.0.alpha2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Stegman
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-07-12 00:00:00.000000000 Z
11
+ date: 2017-07-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk