magnum-payload 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -18,15 +18,17 @@ You can integrate with the following providers:
18
18
 
19
19
  ## Installation
20
20
 
21
- Add dependency to Gemfile:
21
+ Install via rubygems:
22
22
 
23
23
  ```
24
- gem 'magnum-payload',
25
- github: 'magnumci/magnum-payload',
26
- require: 'magnum/payload'
24
+ gem install magnum-payload
27
25
  ```
28
26
 
29
- NOTE: Library is not distributed via Rubygems.
27
+ Or with bundler:
28
+
29
+ ```
30
+ gem 'magnum-payload', require: 'magnum/payload'
31
+ ```
30
32
 
31
33
  ## Usage
32
34
 
@@ -50,6 +52,8 @@ payload.skip_message?
50
52
 
51
53
  See `Payload Attributes` section for payload instance details.
52
54
 
55
+ Check `examples` directory for code samples.
56
+
53
57
  ## Payload Classes
54
58
 
55
59
  All payload classes are inherited from `Magnum::Payload::Base`:
@@ -87,6 +91,8 @@ rake test
87
91
 
88
92
  ## License
89
93
 
94
+ MIT License
95
+
90
96
  Copyright (c) 2013 Magnum CI, Dan Sosedoff <dan.sosedoff@gmail.com>
91
97
 
92
98
  Permission is hereby granted, free of charge, to any person obtaining a copy of
@@ -0,0 +1,13 @@
1
+ require 'sinatra'
2
+ require 'magnum/payload'
3
+
4
+ class MyApp < Sinatra::Base
5
+ post '/payload/:provider' do
6
+ payload = Magnum::Payload.parse(
7
+ params[:provider],
8
+ params[:payload]
9
+ )
10
+
11
+ "I got some json: #{payload.attributes_hash.inspect}"
12
+ end
13
+ end
@@ -1,5 +1,5 @@
1
1
  module Magnum
2
2
  module Payload
3
- VERSION = '0.3.0'
3
+ VERSION = '0.3.1'
4
4
  end
5
5
  end
@@ -8,6 +8,7 @@ Gem::Specification.new do |s|
8
8
  s.homepage = "https://github.com/magnumci/magnum-payload"
9
9
  s.authors = ["Dan Sosedoff"]
10
10
  s.email = ["dan.sosedoff@gmail.com"]
11
+ s.license = 'MIT'
11
12
 
12
13
  s.add_development_dependency 'rake', '~> 10'
13
14
  s.add_development_dependency 'rspec', '~> 2.13'
metadata CHANGED
@@ -1,18 +1,20 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: magnum-payload
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Dan Sosedoff
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2013-07-23 00:00:00.000000000 Z
12
+ date: 2013-07-24 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: rake
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
19
  - - ~>
18
20
  - !ruby/object:Gem::Version
@@ -20,6 +22,7 @@ dependencies:
20
22
  type: :development
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
27
  - - ~>
25
28
  - !ruby/object:Gem::Version
@@ -27,6 +30,7 @@ dependencies:
27
30
  - !ruby/object:Gem::Dependency
28
31
  name: rspec
29
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
30
34
  requirements:
31
35
  - - ~>
32
36
  - !ruby/object:Gem::Version
@@ -34,6 +38,7 @@ dependencies:
34
38
  type: :development
35
39
  prerelease: false
36
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
37
42
  requirements:
38
43
  - - ~>
39
44
  - !ruby/object:Gem::Version
@@ -41,6 +46,7 @@ dependencies:
41
46
  - !ruby/object:Gem::Dependency
42
47
  name: simplecov
43
48
  requirement: !ruby/object:Gem::Requirement
49
+ none: false
44
50
  requirements:
45
51
  - - ~>
46
52
  - !ruby/object:Gem::Version
@@ -48,6 +54,7 @@ dependencies:
48
54
  type: :development
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
51
58
  requirements:
52
59
  - - ~>
53
60
  - !ruby/object:Gem::Version
@@ -55,6 +62,7 @@ dependencies:
55
62
  - !ruby/object:Gem::Dependency
56
63
  name: json
57
64
  requirement: !ruby/object:Gem::Requirement
65
+ none: false
58
66
  requirements:
59
67
  - - ! '>='
60
68
  - !ruby/object:Gem::Version
@@ -62,6 +70,7 @@ dependencies:
62
70
  type: :runtime
63
71
  prerelease: false
64
72
  version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
65
74
  requirements:
66
75
  - - ! '>='
67
76
  - !ruby/object:Gem::Version
@@ -69,6 +78,7 @@ dependencies:
69
78
  - !ruby/object:Gem::Dependency
70
79
  name: hashr
71
80
  requirement: !ruby/object:Gem::Requirement
81
+ none: false
72
82
  requirements:
73
83
  - - ! '>='
74
84
  - !ruby/object:Gem::Version
@@ -76,6 +86,7 @@ dependencies:
76
86
  type: :runtime
77
87
  prerelease: false
78
88
  version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
79
90
  requirements:
80
91
  - - ! '>='
81
92
  - !ruby/object:Gem::Version
@@ -93,6 +104,7 @@ files:
93
104
  - LICENSE
94
105
  - README.md
95
106
  - Rakefile
107
+ - examples/sinatra.rb
96
108
  - lib/magnum/payload.rb
97
109
  - lib/magnum/payload/base.rb
98
110
  - lib/magnum/payload/beanstalk.rb
@@ -128,27 +140,35 @@ files:
128
140
  - spec/payload_spec.rb
129
141
  - spec/spec_helper.rb
130
142
  homepage: https://github.com/magnumci/magnum-payload
131
- licenses: []
132
- metadata: {}
143
+ licenses:
144
+ - MIT
133
145
  post_install_message:
134
146
  rdoc_options: []
135
147
  require_paths:
136
148
  - lib
137
149
  required_ruby_version: !ruby/object:Gem::Requirement
150
+ none: false
138
151
  requirements:
139
152
  - - ! '>='
140
153
  - !ruby/object:Gem::Version
141
154
  version: '0'
155
+ segments:
156
+ - 0
157
+ hash: 3727367032317050001
142
158
  required_rubygems_version: !ruby/object:Gem::Requirement
159
+ none: false
143
160
  requirements:
144
161
  - - ! '>='
145
162
  - !ruby/object:Gem::Version
146
163
  version: '0'
164
+ segments:
165
+ - 0
166
+ hash: 3727367032317050001
147
167
  requirements: []
148
168
  rubyforge_project:
149
- rubygems_version: 2.0.3
169
+ rubygems_version: 1.8.25
150
170
  signing_key:
151
- specification_version: 4
171
+ specification_version: 3
152
172
  summary: Code payload parser
153
173
  test_files:
154
174
  - spec/fixtures/beanstalk/git.json
@@ -174,4 +194,3 @@ test_files:
174
194
  - spec/payload/message_parser_spec.rb
175
195
  - spec/payload_spec.rb
176
196
  - spec/spec_helper.rb
177
- has_rdoc:
checksums.yaml DELETED
@@ -1,15 +0,0 @@
1
- ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- NWM5YzVmNTc0ZTJhZTIwNDA4OGExODViN2E2NDdkOWViMjI4MWQxNw==
5
- data.tar.gz: !binary |-
6
- NWQzZjM0NmZiYWNiMzhhYzgwM2MxZWVhY2RkNzdmMjVjODMyOTIyYQ==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- MDM2MWEyNzhiNjkxYTI3OTZiMDI3M2VmYjBjYTgwYWQzOGRjNmFjNmE2Zjg4
10
- MWFmOTFjZThjNTBlOWEwYmI2NzgxMTUzY2I4N2I5Y2NjYmY4M2I0MDg5NmNj
11
- NDE0NTliNjlmMzEzOWRiYTBmZmRlM2MyNTNjZDBkYjFhNmU4MDk=
12
- data.tar.gz: !binary |-
13
- OGVmMGM2ZTU5MjFmNmFmZDQwOWVkOTE3M2UzZTMxYTNmYTI1N2E1ZWQzNTVk
14
- NTc3MWFmNWUyZGIxOTAzMTZhZmIyNjE1ODgxYjQ1NGFlYmM1MWFkZmIyNGNj
15
- MTA2Y2YzYjJjNWM5ODRlYTAwMjAwMzA5MzFiMzIwODEyZTc1OWY=