sms-logparser 0.2.0 → 0.3.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 484db0ec68fb533d509b336f6d5258947a1550cb
4
- data.tar.gz: c826cb94003ff3beea5b579e1967a4f3a45cd548
3
+ metadata.gz: 9f0b662e2f8fc572e36fb90d70772df4719bd74e
4
+ data.tar.gz: b689ed872012488f135a78ddd38e3583025a02e5
5
5
  SHA512:
6
- metadata.gz: f1638d239b7bd9ef872f92b2c87271de78eb6ffe46b187609c132607adb7921f2637d0605f3a101c9ae808678b0fe2f995d4dcaff5d868c5e145d8e50f019441
7
- data.tar.gz: 53b8660b214c5a8cd97de7160372b8b5082a5b13c851db48702aae481f0e2151de7118b9fb4024e6979d4c33b318f33988b108625248842ef40e8c7669b0a210
6
+ metadata.gz: 141e69433bd1a57508777f58f6f21f72c7d6456c56bf13b284ac84e85fd75045ab04df0e47aa608db8f0ade2136c9a44e14bcca9c268988d5e7e4acffe50616f
7
+ data.tar.gz: 73fd2b7ddef48779755558005dbe50ee4bf53fc7c4d7f3e0c2f4f5d3dfd3f3d271bed72fd15e83c2f4e4f9dcaf1ef09d46cdf2ca61474f5c0641305c9dea0bd1
data/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  sms-logparser - DB-Logparser for Simplex Media Server (SMS). Reads access logs stored in a MySQL database (coming from the SWISS TXT CDN) and pushes them to the SMS API.
4
4
 
5
+ [![Gem Version](https://badge.fury.io/rb/sms-logparser.png)](http://badge.fury.io/rb/sms-logparser)
6
+
5
7
  ## Installation
6
8
 
7
9
  Add this line to your application's Gemfile:
@@ -40,12 +42,12 @@ Show the last parser runs:
40
42
 
41
43
  $ sms-logparser last_runs
42
44
 
43
- # Development
45
+ ## Development
44
46
 
45
- - check out the git repo (git clone ...)
47
+ - check out the git repo (`git clone <repo>`)
46
48
  - implement your changes
47
- - run the tests `rake test`
48
- - bump the version number commit your changes and release a new version of the gem `rake release`
49
+ - run the tests (`rake test`)
50
+ - bump the version number commit your changes and release a new version of the gem (`rake release`)
49
51
 
50
52
  ## Contributing
51
53
 
@@ -15,7 +15,13 @@ module SmsLogparser
15
15
  unless @options[:simulate]
16
16
  urls.each do |url|
17
17
  begin
18
- RestClient.get(url)
18
+ RestClient::Request.execute(
19
+ :method => :post,
20
+ :url => url,
21
+ :headers => {
22
+ 'X-simplex-api-key' => @options[:api_key]
23
+ }
24
+ )
19
25
  rescue
20
26
  raise "Can't send request to #{url}"
21
27
  end
@@ -14,6 +14,7 @@ module SmsLogparser
14
14
 
15
15
  desc "parse", "Check the database for pcache logs and send them to SMS"
16
16
  option :api_base_path, :default => 'http://dev.simplex.tv/creator/rest', aliases: %w(-a)
17
+ option :api_key, aliases: %w(-k)
17
18
  option :simulate, :type => :boolean, :default => false, aliases: %w(-s)
18
19
  option :verbose, :type => :boolean, :default => false, aliases: %w(-v)
19
20
  def parse
@@ -1,3 +1,3 @@
1
1
  module SmsLogparser
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sms-logparser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - niwo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-14 00:00:00.000000000 Z
11
+ date: 2014-03-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler