eotb 0.5.7 → 0.5.8

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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.7
1
+ 0.5.8
data/eotb.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{eotb}
8
- s.version = "0.5.7"
8
+ s.version = "0.5.8"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ragnarson"]
12
- s.date = %q{2010-09-09}
12
+ s.date = %q{2010-09-10}
13
13
  s.description = %q{Rails plugin which allow you easily track and observe your apps}
14
14
  s.email = %q{bartlomiej.kozal@ragnarson.com}
15
15
  s.extra_rdoc_files = [
@@ -32,7 +32,6 @@ Gem::Specification.new do |s|
32
32
  "lib/eotb.rb",
33
33
  "lib/generators/eotb/USAGE",
34
34
  "lib/generators/eotb/eotb_generator.rb",
35
- "lib/generators/eotb/templates/initializer.rb",
36
35
  "spec/eotb_spec.rb",
37
36
  "spec/spec_helper.rb"
38
37
  ]
data/lib/eotb.rb CHANGED
@@ -9,6 +9,7 @@ class Eotb
9
9
  METHODS = [:to_actor, :to_subject, :to_json, :to_hash, :inspect]
10
10
 
11
11
  def self.configure(api_key, events = 1, host = '127.0.0.1', port = '3000')
12
+ @@api_key = api_key
12
13
  @@uri = URI.parse('http://' + host + ':' + port + '/events/' + api_key)
13
14
  @@post = Net::HTTP::Post.new(@@uri.path)
14
15
  @@events = {}
@@ -16,6 +17,9 @@ class Eotb
16
17
  events >= 1 ? @@reset = events : @@reset = 1
17
18
  end
18
19
 
20
+ def self.api_key
21
+ @@api_key
22
+ end
19
23
 
20
24
  def self.register_event(actor, action, subject = {})
21
25
  action = { "event#{@@counter}[action]" => action.to_s }
@@ -3,8 +3,8 @@ require 'rails/generators'
3
3
  class EotbGenerator < Rails::Generators::Base
4
4
 
5
5
  desc "Creates eotb initializer in confing/initializers/eotb.rb, setting your app to work with Beholder."
6
-
7
- source_root File.expand_path('../templates', __FILE__)
6
+
7
+ source_root File.expand_path('../../../../generators/eotb/templates', __FILE__)
8
8
 
9
9
  class_option :api_key, :aliases => "-k", :type => :string, :desc => "Your Beholder API key"
10
10
  class_option :events, :aliases => "-e",:type => :numeric, :desc => "Number of events sent in one package to Beholder", :default => "1"
@@ -26,10 +26,10 @@ class EotbGenerator < Rails::Generators::Base
26
26
  end
27
27
  end
28
28
 
29
- def api_key
29
+ def api_key_exp
30
30
  "#{options[:api_key]}"
31
31
  end
32
- def events
32
+ def events_exp
33
33
  s = if options[:events]
34
34
  "#{options[:events]}"
35
35
  else
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eotb
3
3
  version: !ruby/object:Gem::Version
4
- hash: 5
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 5
9
- - 7
10
- version: 0.5.7
9
+ - 8
10
+ version: 0.5.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ragnarson
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-09-09 00:00:00 +02:00
18
+ date: 2010-09-10 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -107,7 +107,6 @@ files:
107
107
  - lib/eotb.rb
108
108
  - lib/generators/eotb/USAGE
109
109
  - lib/generators/eotb/eotb_generator.rb
110
- - lib/generators/eotb/templates/initializer.rb
111
110
  - spec/eotb_spec.rb
112
111
  - spec/spec_helper.rb
113
112
  has_rdoc: true
@@ -1,3 +0,0 @@
1
- require 'eotb'
2
-
3
- Eotb.configure("<%= api_key %>", <%= events %>, "beta.beholder.ragnarson.com", "80")