keen 0.1.9 → 0.1.10
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION.yml +1 -1
- data/keen.gemspec +1 -4
- metadata +6 -7
- data/bin/keen_send +0 -51
data/VERSION.yml
CHANGED
data/keen.gemspec
CHANGED
@@ -5,15 +5,13 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{keen}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.10"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["dorkitude"]
|
12
12
|
s.date = %q{2012-06-19}
|
13
|
-
s.default_executable = %q{keen_send}
|
14
13
|
s.description = %q{See the github repo or examples.rb for usage information.}
|
15
14
|
s.email = %q{kyle@keen.io}
|
16
|
-
s.executables = ["keen_send"]
|
17
15
|
s.extra_rdoc_files = [
|
18
16
|
"LICENSE.txt",
|
19
17
|
"README.md"
|
@@ -25,7 +23,6 @@ Gem::Specification.new do |s|
|
|
25
23
|
"README.md",
|
26
24
|
"Rakefile",
|
27
25
|
"VERSION.yml",
|
28
|
-
"bin/keen_send",
|
29
26
|
"conf/cacert.pem",
|
30
27
|
"examples.rb",
|
31
28
|
"features/add_event.feature",
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: keen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 15
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 10
|
10
|
+
version: 0.1.10
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- dorkitude
|
@@ -16,7 +16,7 @@ bindir: bin
|
|
16
16
|
cert_chain: []
|
17
17
|
|
18
18
|
date: 2012-06-19 00:00:00 -07:00
|
19
|
-
default_executable:
|
19
|
+
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
prerelease: false
|
@@ -143,8 +143,8 @@ dependencies:
|
|
143
143
|
requirement: *id008
|
144
144
|
description: See the github repo or examples.rb for usage information.
|
145
145
|
email: kyle@keen.io
|
146
|
-
executables:
|
147
|
-
|
146
|
+
executables: []
|
147
|
+
|
148
148
|
extensions: []
|
149
149
|
|
150
150
|
extra_rdoc_files:
|
@@ -157,7 +157,6 @@ files:
|
|
157
157
|
- README.md
|
158
158
|
- Rakefile
|
159
159
|
- VERSION.yml
|
160
|
-
- bin/keen_send
|
161
160
|
- conf/cacert.pem
|
162
161
|
- examples.rb
|
163
162
|
- features/add_event.feature
|
data/bin/keen_send
DELETED
@@ -1,51 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
$LOAD_PATH << File.join(File.dirname(__FILE__), "..", "lib")
|
3
|
-
require "rubygems"
|
4
|
-
require "optparse"
|
5
|
-
require "keen"
|
6
|
-
|
7
|
-
options = {
|
8
|
-
:env => "production",
|
9
|
-
}
|
10
|
-
|
11
|
-
required = [
|
12
|
-
:storage_mode, # this has to be something understood by Keen::Client.process_queue(options)
|
13
|
-
]
|
14
|
-
|
15
|
-
begin
|
16
|
-
parser = OptionParser.new()
|
17
|
-
parser.banner = "#{File.basename($0)} [<log_dir>]\n\n"
|
18
|
-
|
19
|
-
parser.on("-e", "--env ENVIRONMENT", "The environment to run in. Default: production") do |e|
|
20
|
-
options[:env] = e
|
21
|
-
end
|
22
|
-
|
23
|
-
parser.on("-p", "--storage_mode redis|flat_file", "Where is the queue you're reading?") do |f|
|
24
|
-
options[:storage_mode] = f
|
25
|
-
end
|
26
|
-
|
27
|
-
parser.on_tail("-h", "--help", "This help.") do
|
28
|
-
puts parser
|
29
|
-
exit
|
30
|
-
end
|
31
|
-
|
32
|
-
opts = parser.parse(ARGV)
|
33
|
-
rescue => e
|
34
|
-
$stderr.puts "\nERROR: #{e.message}\n\n"
|
35
|
-
$stderr.puts parser.help
|
36
|
-
exit(-1)
|
37
|
-
end
|
38
|
-
|
39
|
-
|
40
|
-
# confirm required options:
|
41
|
-
required.each do |key|
|
42
|
-
raise OptionParser::MissingArgument.new("you must send `#{key}` when running this command") if options[key].nil?
|
43
|
-
end
|
44
|
-
|
45
|
-
storage_handler = Keen::Client.create_new_storage_handler(options[:storage_mode])
|
46
|
-
worker = Keen::Async::Worker.new(storage_handler)
|
47
|
-
results = worker.process_queue
|
48
|
-
|
49
|
-
|
50
|
-
puts results
|
51
|
-
|