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 +4 -4
- data/README.md +6 -4
- data/lib/sms-logparser/api.rb +7 -1
- data/lib/sms-logparser/cli.rb +1 -0
- data/lib/sms-logparser/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9f0b662e2f8fc572e36fb90d70772df4719bd74e
|
|
4
|
+
data.tar.gz: b689ed872012488f135a78ddd38e3583025a02e5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
+
[](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
|
-
|
|
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
|
|
data/lib/sms-logparser/api.rb
CHANGED
|
@@ -15,7 +15,13 @@ module SmsLogparser
|
|
|
15
15
|
unless @options[:simulate]
|
|
16
16
|
urls.each do |url|
|
|
17
17
|
begin
|
|
18
|
-
RestClient.
|
|
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
|
data/lib/sms-logparser/cli.rb
CHANGED
|
@@ -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
|
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.
|
|
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-
|
|
11
|
+
date: 2014-03-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|