snowly 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
- metadata.gz: d173fa98485fdac15319ceb8c82e13e217a71e01
4
- data.tar.gz: 29b7b391be367f4cdc8ade831fc115aef27eed59
3
+ metadata.gz: ec039a35fbadcbad31e696a39fe787f180e840bf
4
+ data.tar.gz: 54ad9ca4c16d3f98bed4a165c9122d3acf086c14
5
5
  SHA512:
6
- metadata.gz: baaa31a93be34a90f0ee857b8fe54c83d0f07e4bfbf07c205ed050d461a411dd99e35d455498ae620ad7077225731b9a01b1275ecf4a86fb955fa04b48524736
7
- data.tar.gz: 7c76ad98a44bbe6da61bc4b3d9dd5eab1ecf38b36a557bdac76980990c24d6dd818e63f57b05652a40ecbc977b07e8da96541651142b1f135dc8dff317ee0477
6
+ metadata.gz: 4e38417f1b759774c5f842fb4c3747cc4377f2ac3ebed499c8799d532a29e37ff565b1093ce2497990256f75a5aac578561c7e9f8048d619a20d0cf2a37b7942
7
+ data.tar.gz: 9bd5e3d86e4d3214356c5a41bd8487a01ec2cd874fed89c732a42192342411bcaced52115d3a31adae432585c79b161e4f6c845b59c48e5eb7e7eab07d2085bc
data/README.md CHANGED
@@ -6,7 +6,7 @@ Snowly is a minimal [Collector](https://github.com/snowplow/snowplow/wiki/Settin
6
6
 
7
7
  ### Motivation
8
8
 
9
- Snowplow has an excellent toolset, but the first implementation stages can be hard. To run Snowplow properly you have to set up a lot of external dependencies like AWS permissions, Cloudfront distributions and EMR jobs. If you're tweaking the snowplow model to fit your needs or using trackers that don't enforce every requirement, you'll find yourself waiting for the ETL jobs to run in order to validate every implementation changes.
9
+ Snowplow has an excellent toolset, but the first implementation stages can be hard. To run Snowplow properly you have to set up a lot of external dependencies like AWS permissions, Cloudfront distributions and EMR jobs. If you're tweaking the snowplow model to fit your needs or using trackers that don't enforce every requirement, you'll find yourself waiting for the ETL jobs to run in order to validate every implementation change. __[update] This has changed a quite a bit with Snowplow Mini's release. It's a lot easier to get started, but Snowly is still valuable as a first step and debug tool.__
10
10
 
11
11
  ### Who will get the most from Snowly
12
12
 
@@ -82,6 +82,35 @@ Other options:
82
82
  --log-file LOG_FILE set the path to the log file (default: app_dir/collector.log)
83
83
  --url-file URL_FILE set the path to the URL file (default: app_dir/collector.url)
84
84
 
85
+ ### Output
86
+
87
+ When Snowly finds something wrong, it renders the parsed request along with its errors.
88
+
89
+ If everything is ok, Snowly delivers the default Snowplow pixel, unless you're using the debug mode. In debug mode it always renders the parsed contents of your requests.
90
+
91
+ If you can't investigate the request's response, you can start Snowly in the foreground and in Debug Mode to output the response to STDOUT.
92
+ `snowly -d -F`
93
+
94
+ Example:
95
+ `http://0.0.0.0:5678/i?&e=pv&page=Root%20README&url=http%3A%2F%2Fgithub.com%2Fsnowplow%2Fsnowplow&aid=snowplow&p=i&tv=no-js-0.1.0`
96
+ ```json
97
+ {
98
+ "errors": [
99
+ "The property '#/platform' value \"i\" did not match one of the following values: web, mob, pc, srv, tv, cnsl, iot in schema snowplow_protocol.json",
100
+ "The property '#/' did not contain a required property of 'event_id' in schema snowplow_protocol.json",
101
+ "The property '#/' did not contain a required property of 'useragent' in schema snowplow_protocol.json"
102
+ ],
103
+ "content": {
104
+ "event": "pv",
105
+ "page_title": "Root README",
106
+ "page_url": "http://github.com/snowplow/snowplow",
107
+ "app_id": "snowplow",
108
+ "platform": "i",
109
+ "v_tracker": "no-js-0.1.0"
110
+ }
111
+ }
112
+ ```
113
+
85
114
  ## JSON Schemas
86
115
 
87
116
  JSON Schema is a powerful tool for validating the structure of JSON data. I recommend reading this excellent [Guide](http://spacetelescope.github.io/understanding-json-schema/) from Michael Droettboom to understand all of its capabilities, but you can start with the examples bellow.
@@ -153,7 +182,7 @@ __Note that this is not valid json because of the comments.__
153
182
 
154
183
  ### Extending Snowplow's Protocol
155
184
 
156
- Although the Snowplow's protocol isn't originally defined in a JSON schema, it doesn't hurt to do so and take advantage of all its perks. It's also here for the sake of consistency, right?
185
+ Although the Snowplow's protocol isn't originally defined as a JSON schema, it doesn't hurt to do so and take advantage of all its perks. It's also here for the sake of consistency, right?
157
186
 
158
187
  By expressing the protocol in a JSON schema you can extend it to fit your particular needs and enforce domain rules that otherwise wouldn't be available. [Take a look](https://github.com/angelim/snowly/blob/master/lib/schemas/snowplow_protocol.json) at the default schema, derived from the rules specified on the [canonical model](https://github.com/snowplow/snowplow/wiki/canonical-event-model).
159
188
 
@@ -102,7 +102,7 @@ module Snowly
102
102
  begin
103
103
  case type
104
104
  when 'json' then JSON.parse(value)
105
- when 'base64' then JSON.parse(Base64.urlsafe_decode64(value))
105
+ when 'base64' then JSON.parse(Base64.strict_decode64(value))
106
106
  when 'integer' then Integer(value)
107
107
  when 'number' then Float(value)
108
108
  else
@@ -1,3 +1,3 @@
1
1
  module Snowly
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
data/snowly.gemspec CHANGED
@@ -34,4 +34,5 @@ Gem::Specification.new do |spec|
34
34
  spec.add_development_dependency 'snowplow-tracker', '~> 0.5'
35
35
  spec.add_development_dependency 'webmock', '~> 2.0'
36
36
  spec.add_development_dependency "shotgun", '~> 0.9'
37
+ spec.add_development_dependency "yard", '~> 0.8'
37
38
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snowly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexandre Angelim
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-01 00:00:00.000000000 Z
11
+ date: 2016-06-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json-schema
@@ -192,6 +192,20 @@ dependencies:
192
192
  - - ~>
193
193
  - !ruby/object:Gem::Version
194
194
  version: '0.9'
195
+ - !ruby/object:Gem::Dependency
196
+ name: yard
197
+ requirement: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - ~>
200
+ - !ruby/object:Gem::Version
201
+ version: '0.8'
202
+ type: :development
203
+ prerelease: false
204
+ version_requirements: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - ~>
207
+ - !ruby/object:Gem::Version
208
+ version: '0.8'
195
209
  description: Snowly is a minimal collector implementation intended to validate your
196
210
  event tracking requests before emitting them to cloudfront or a closure collector.
197
211
  email: