trackets 0.0.8 → 0.0.9

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
  SHA1:
3
- metadata.gz: 98193364f1e33659e9070b586b5f4a0806cadc7b
4
- data.tar.gz: 59578ac3678e2d21e72eeca0a7bbb39b21984436
3
+ metadata.gz: fd4c19438ae272a1b3ec7cbe95b36de716a790be
4
+ data.tar.gz: e36ea9aa882fd90fabb014c90ef512dde6f609d8
5
5
  SHA512:
6
- metadata.gz: 5e0123cd90f8b3131972a24fd429938ee35a0f81944a0e602303d68713c35250e8b3beb655d16afd9f4e0538de50ecc272a7bc569d3591397bc8a481ba016937
7
- data.tar.gz: 467b4fbcfe49ca4cd83cf7e32e6df42c7581d3e3cc738eb98d24852e2369300a90f1260f3e56e5926125f51e145f4a3b352be74512cec6091df43ff0d47e0b13
6
+ metadata.gz: 12a2f57daed9581114f6ddd99f3e31122514e2251753e70f18bac4b23c79e1b6905c3de670d9bd90c5e0b350d0092b0cdba50fa87f802dde0ffe75058d95225e
7
+ data.tar.gz: 034fbe85dc64fc484fe35972de56c13604034ea800399bf2129154d47bb4fdd7326ce54a24fff99d73d595565d3699387fb997a5c25da15537b5e00d3bad3508
data/README.md CHANGED
@@ -48,7 +48,8 @@ Can be found in `config/initializers/trackets.rb`
48
48
 
49
49
  ```ruby
50
50
  Trackets.setup do |config|
51
- config.api_key = "ebf6d706b29ca4e176012a3dc3b017a8" # API key for your Project
51
+ config.public_api_key = "ebf6d706b29ca4e176012a3dc3b017a8" # Public API key used by JavaScript for your project
52
+ config.private_api_key = "77773de2325364bcc1d955e7aa3e7e1f" # Private API key used for Ruby notifications
52
53
  config.async = true # [Default: false] Send notification in a separate thread (Uses Sucker Punch gem)
53
54
  end
54
55
  ```
@@ -62,7 +63,7 @@ require 'rack'
62
63
  require 'trackets'
63
64
 
64
65
  Trackets.setup do |config|
65
- config.api_key = "insert-valid-api-key"
66
+ config.private_api_key = "insert-valid-api-key"
66
67
  end
67
68
 
68
69
  app = Rack::Builder.app do
@@ -8,7 +8,7 @@ end
8
8
 
9
9
  When(/^I configure an app to use Trackets$/) do
10
10
  step %{I copy "trackets_interceptor.rb" to apps "config/initializers"}
11
- step "I successfully run `rails g trackets:install my-api-key`"
11
+ step "I successfully run `rails g trackets:install my-public-api-key my-private-api-key`"
12
12
 
13
13
  additions =<<-EOS
14
14
  config.api_url = "http://trackets.com"
@@ -3,7 +3,8 @@ module Trackets
3
3
  class InstallGenerator < Rails::Generators::Base
4
4
  source_root ::File.expand_path('../templates', __FILE__)
5
5
 
6
- argument :api_key
6
+ argument :public_api_key
7
+ argument :private_api_key
7
8
  desc "Creates Trackets configuration file in config/initializers"
8
9
  def install
9
10
  template "initializer.rb", "config/initializers/trackets.rb"
@@ -1,3 +1,4 @@
1
1
  Trackets.setup do |config|
2
- config.api_key = "<%= @api_key %>"
2
+ config.public_api_key = "<%= @public_api_key %>"
3
+ config.private_api_key = "<%= @private_api_key %>"
3
4
  end
@@ -58,7 +58,7 @@ module Trackets
58
58
  end
59
59
 
60
60
  def send
61
- self.class.post "#{config.api_url}/reports/#{config.api_key}", body: { error: payload }
61
+ self.class.post "#{config.api_url}/reports/#{config.private_api_key}", body: { error: payload }
62
62
  end
63
63
  end
64
64
  end
@@ -28,7 +28,8 @@ module Trackets
28
28
  DEFAULT_LOAD_PLUGINS = [:sidekiq]
29
29
  DEFAULT_ENABLED_ENV = [:production]
30
30
 
31
- attr_accessor :api_url, :api_key, :environment_name, :project_root, :framework, :whitelisted_env, :blacklisted_params, :async,
31
+ attr_accessor :api_url, :public_api_key, :private_api_key, :environment_name,
32
+ :project_root, :framework, :whitelisted_env, :blacklisted_params, :async,
32
33
  :load_plugins, :enabled_env, :force
33
34
  alias_method :async?, :async
34
35
  alias_method :force?, :force
@@ -6,7 +6,7 @@
6
6
  # require 'trackets'
7
7
  #
8
8
  # Trackets.setup do |config|
9
- # config.api_key = "insert-valid-api-key"
9
+ # config.private_api_key = "insert-valid-api-key"
10
10
  # end
11
11
  #
12
12
  # app = Rack::Builder.app do
@@ -1,3 +1,3 @@
1
1
  module Trackets
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
@@ -3,7 +3,7 @@ module Trackets
3
3
 
4
4
  def trackets_include_tag
5
5
  if Trackets.configuration.enabled?
6
- javascript_include_tag "//trackets.s3.amazonaws.com/client.js", data: { "trackets-key" => Trackets.configuration.api_key }
6
+ javascript_include_tag "//trackets.s3.amazonaws.com/client.js", data: { "trackets-key" => Trackets.configuration.public_api_key }
7
7
  end
8
8
  end
9
9
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trackets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Trackets
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-14 00:00:00.000000000 Z
11
+ date: 2014-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json