vault-tools 0.5.18 → 0.5.19

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: 0e062b30975ac7372dc43f0dbaccf752dcaf8363
4
- data.tar.gz: 5df2ef4d9a2de2feb1a82e9b7525617e222d5de3
3
+ metadata.gz: 3f51f3be5a752347a8ef885446f0e0b76b2ff8a1
4
+ data.tar.gz: 3c16227bf70e00b943f36c9672846c49258c03bb
5
5
  SHA512:
6
- metadata.gz: ec39ba5754d9e923579776d09ca95604175377a432e85ecdc9aaa16328a5543a73402e344ee26aca6d98bf5b4fdc8b960caa9557b161dccab89911c7c51e0627
7
- data.tar.gz: aa1055fc11b0e09009e8c251eb7ed70197f240ef11a3c1d04f517a9d5dbe2d08ec38022930d74c2fadd02cd4084b22bb62e2243138d2bdff284db05c28f49f4e
6
+ metadata.gz: a10f64973c7d41cae5487f5857dff36becd60cdff7766d2d268d3ced459ddb7b3cb2b22d56347dc25fe9d20cfe06fa6005698800734297b2567eb407f7537967
7
+ data.tar.gz: ed152fe5980c02303b479a17ceb9e0b8b7ef4e415cfdfde763352a7bd09bc19c0a5fc472a540eb166b28e1008c8eefc49ba8e99ca6710061537c24688e6916f5
data/.gitignore CHANGED
@@ -3,9 +3,9 @@
3
3
  .bundle
4
4
  .config
5
5
  .yardoc
6
+ .env*
6
7
  InstalledFiles
7
8
  _yardoc
8
- bin/*
9
9
  coverage
10
10
  doc/
11
11
  lib/bundler/man
data/.travis.yml CHANGED
@@ -1,4 +1,5 @@
1
1
  language: ruby
2
+ cache: bundler
2
3
  rvm:
3
4
  - 2.2.0
4
5
  - 2.0.0
data/Gemfile.lock CHANGED
@@ -1,15 +1,17 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- vault-tools (0.5.18)
5
- aws-sdk
4
+ vault-tools (0.5.19)
5
+ aws-sdk (~> 1.0)
6
+ coderay
6
7
  excon
7
8
  fernet (= 2.0.rc2)
8
9
  heroku-api
9
- honeybadger
10
+ pry
10
11
  rack (~> 1.6.4)
11
12
  rack-ssl-enforcer
12
13
  rdoc
14
+ rollbar (~> 2.1.2)
13
15
  scrolls
14
16
  sinatra (~> 1.4.4)
15
17
  uuidtools
@@ -19,13 +21,14 @@ GEM
19
21
  remote: https://rubygems.org/
20
22
  specs:
21
23
  ansi (1.5.0)
22
- aws-sdk (2.1.2)
23
- aws-sdk-resources (= 2.1.2)
24
- aws-sdk-core (2.1.2)
25
- jmespath (~> 1.0)
26
- aws-sdk-resources (2.1.2)
27
- aws-sdk-core (= 2.1.2)
28
- excon (0.45.3)
24
+ aws-sdk (1.60.2)
25
+ aws-sdk-v1 (= 1.60.2)
26
+ aws-sdk-v1 (1.60.2)
27
+ json (~> 1.4)
28
+ nokogiri (>= 1.4.4)
29
+ coderay (1.1.0)
30
+ dotenv (2.0.0)
31
+ excon (0.45.4)
29
32
  fernet (2.0.rc2)
30
33
  valcro (= 0.1)
31
34
  guard-compat (1.2.1)
@@ -35,23 +38,27 @@ GEM
35
38
  heroku-api (0.3.23)
36
39
  excon (~> 0.44)
37
40
  multi_json (~> 1.8)
38
- honeybadger (2.1.0)
39
- jmespath (1.0.2)
40
- multi_json (~> 1.0)
41
+ json (1.8.2)
41
42
  logfmt (0.0.7)
43
+ method_source (0.8.2)
42
44
  mini_portile (0.6.2)
43
45
  minitest (4.7.5)
44
- multi_json (1.11.1)
46
+ multi_json (1.11.2)
45
47
  nokogiri (1.6.6.2)
46
48
  mini_portile (~> 0.6.0)
49
+ pry (0.10.1)
50
+ coderay (~> 1.1.0)
51
+ method_source (~> 0.8.1)
52
+ slop (~> 3.4)
47
53
  rack (1.6.4)
48
54
  rack-protection (1.5.3)
49
55
  rack
50
- rack-ssl-enforcer (0.2.8)
56
+ rack-ssl-enforcer (0.2.9)
51
57
  rack-test (0.6.3)
52
58
  rack (>= 1.0)
53
59
  rake (10.4.2)
54
60
  rdoc (4.2.0)
61
+ rollbar (2.1.2)
55
62
  rr (1.1.2)
56
63
  scrolls (0.3.8)
57
64
  shotgun (0.9.1)
@@ -60,6 +67,7 @@ GEM
60
67
  rack (~> 1.4)
61
68
  rack-protection (~> 1.4)
62
69
  tilt (>= 1.3, < 3)
70
+ slop (3.6.0)
63
71
  tilt (2.0.1)
64
72
  turn (0.9.7)
65
73
  ansi
@@ -83,6 +91,7 @@ PLATFORMS
83
91
  ruby
84
92
 
85
93
  DEPENDENCIES
94
+ dotenv
86
95
  guard-minitest
87
96
  rake
88
97
  shotgun
data/bin/console ADDED
@@ -0,0 +1,32 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ ### Bundler ##
4
+ require 'bundler/setup'
5
+ require 'coderay'
6
+ require 'pry'
7
+
8
+ ENV["APP_ENV"] ||= "development"
9
+
10
+ Bundler.require(ENV['APP_ENV'].downcase.gsub(" ","_").to_sym)
11
+
12
+ require 'dotenv'
13
+ Dotenv.load
14
+
15
+ APP_ROOT=File.expand_path(File.dirname(__FILE__)) + "/.."
16
+
17
+ require File.join(APP_ROOT,'/lib/vault-tools.rb')
18
+
19
+ # add ability to reload console
20
+ def reload!
21
+ reload_msg = '# Reloading the console...'
22
+ puts CodeRay.scan(reload_msg, :ruby).term
23
+ Pry.save_history
24
+ exec(File.expand_path(__FILE__), 'bin/console')
25
+ end
26
+
27
+ system('clear')
28
+ welcome = <<eos
29
+ # Welcome to Vault Tools Interactive Console
30
+ eos
31
+ puts CodeRay.scan(welcome, :ruby).term
32
+ Pry.start
data/lib/vault-tools.rb CHANGED
@@ -4,10 +4,11 @@ require 'sinatra/base'
4
4
  require 'scrolls'
5
5
  require 'rack/ssl-enforcer'
6
6
  require 'heroku-api'
7
- require 'honeybadger'
7
+ require 'rollbar'
8
8
 
9
- Honeybadger.configure do |config|
10
- config.api_key = ENV['HONEYBADGER_API_KEY']
9
+ Rollbar.configure do |config|
10
+ config.environment = ENV['RACK_ENV'] || ENV['RAILS_ENV'] || ENV['APP_ENV'] || ENV['ROLLBAR_ENV'] || 'unassigned'
11
+ config.access_token = ENV['ROLLBAR_ACCESS_TOKEN']
11
12
  end
12
13
 
13
14
  # Yes, there's a lot of stuff on STDERR. But its on
@@ -83,3 +84,4 @@ require 'vault-tools/text_processor'
83
84
  require 'vault-tools/time'
84
85
  require 'vault-tools/s3'
85
86
  require 'vault-tools/statement_store'
87
+ require 'vault-tools/rollbar_helper'
@@ -0,0 +1,8 @@
1
+ # Overwrite the Rollbar module
2
+ module Rollbar
3
+ # Store calls to notify in an array instead
4
+ # of calling out to the Rollbar service
5
+ def self.notify(exception, opts = {})
6
+ Rollbar.error(exception, opts)
7
+ end
8
+ end
@@ -1,5 +1,5 @@
1
1
  module Vault
2
2
  module Tools
3
- VERSION = '0.5.18'
3
+ VERSION = '0.5.19'
4
4
  end
5
5
  end
@@ -116,7 +116,7 @@ module Vault
116
116
  # body for easy debugging of errors.
117
117
  error do
118
118
  e = env['sinatra.error']
119
- Honeybadger.notify(e, rack_env: env)
119
+ Rollbar.notify(e, rack_env: env)
120
120
  content = "#{e.class}: #{e.message}\n\n"
121
121
  content << e.backtrace.join("\n")
122
122
  [500, content]
data/test/helper.rb CHANGED
@@ -10,32 +10,32 @@ module LoggedDataHelper
10
10
  end
11
11
  end
12
12
 
13
- # Overwrite the Honeybadger module
14
- module Honeybadger
13
+ # Overwrite the Rollbar module
14
+ module Rollbar
15
15
  # A place to store the exceptions
16
16
  def self.exceptions
17
17
  @exceptions ||= []
18
18
  end
19
19
 
20
20
  # Store calls to notify in an array instead
21
- # of calling out to the Honeybadger service
21
+ # of calling out to the Rollbar service
22
22
  def self.notify(exception, opts = {})
23
23
  self.exceptions << [exception, opts]
24
24
  end
25
25
  end
26
26
 
27
- # Clear the stored exceptions in Honeybadger
27
+ # Clear the stored exceptions in Rollbar
28
28
  # so each test starts w. a clean slate
29
- module HoneybadgerHelper
29
+ module RollbarHelper
30
30
  def setup
31
31
  super
32
- Honeybadger.exceptions.clear
32
+ Rollbar.exceptions.clear
33
33
  end
34
34
  end
35
35
 
36
36
  class Vault::TestCase
37
37
  include Vault::Test::EnvironmentHelpers
38
- include HoneybadgerHelper
38
+ include RollbarHelper
39
39
  end
40
40
 
41
41
  module StubbedS3
data/test/web_test.rb CHANGED
@@ -157,12 +157,12 @@ class WebTest < Vault::TestCase
157
157
  assert_equal(500, last_response.status)
158
158
  end
159
159
 
160
- # Test we register errors with Honeybadger when they happen
161
- def test_error_with_honeybadger
162
- assert_equal(0, Honeybadger.exceptions.size)
160
+ # Test we register errors with Rollbar when they happen
161
+ def test_error_with_rollbar
162
+ assert_equal(0, Rollbar.exceptions.size)
163
163
  get '/boom'
164
- assert_equal(1, Honeybadger.exceptions.size)
165
- error, opts = Honeybadger.exceptions.first
164
+ assert_equal(1, Rollbar.exceptions.size)
165
+ error, _ = Rollbar.exceptions.first
166
166
  assert_equal(RuntimeError, error.class)
167
167
  end
168
168
 
data/vault-tools.gemspec CHANGED
@@ -23,10 +23,14 @@ Gem::Specification.new do |gem|
23
23
  gem.add_dependency 'rack-ssl-enforcer'
24
24
  gem.add_dependency 'heroku-api'
25
25
  gem.add_dependency 'fernet', '2.0.rc2'
26
- gem.add_dependency 'honeybadger'
26
+ gem.add_dependency 'rollbar', '~> 2.1.2'
27
27
  gem.add_dependency 'rdoc'
28
28
  gem.add_dependency 'yard'
29
- gem.add_dependency 'aws-sdk'
29
+ gem.add_dependency 'aws-sdk', '~> 1.0'
30
30
  gem.add_dependency 'excon'
31
31
  gem.add_dependency 'rack', '~> 1.6.4'
32
+ gem.add_dependency 'coderay'
33
+ gem.add_dependency 'pry'
34
+
35
+ gem.add_development_dependency 'dotenv'
32
36
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vault-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.18
4
+ version: 0.5.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Continanza
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-06-26 00:00:00.000000000 Z
12
+ date: 2015-08-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: scrolls
@@ -96,19 +96,19 @@ dependencies:
96
96
  - !ruby/object:Gem::Version
97
97
  version: 2.0.rc2
98
98
  - !ruby/object:Gem::Dependency
99
- name: honeybadger
99
+ name: rollbar
100
100
  requirement: !ruby/object:Gem::Requirement
101
101
  requirements:
102
- - - ">="
102
+ - - "~>"
103
103
  - !ruby/object:Gem::Version
104
- version: '0'
104
+ version: 2.1.2
105
105
  type: :runtime
106
106
  prerelease: false
107
107
  version_requirements: !ruby/object:Gem::Requirement
108
108
  requirements:
109
- - - ">="
109
+ - - "~>"
110
110
  - !ruby/object:Gem::Version
111
- version: '0'
111
+ version: 2.1.2
112
112
  - !ruby/object:Gem::Dependency
113
113
  name: rdoc
114
114
  requirement: !ruby/object:Gem::Requirement
@@ -141,16 +141,16 @@ dependencies:
141
141
  name: aws-sdk
142
142
  requirement: !ruby/object:Gem::Requirement
143
143
  requirements:
144
- - - ">="
144
+ - - "~>"
145
145
  - !ruby/object:Gem::Version
146
- version: '0'
146
+ version: '1.0'
147
147
  type: :runtime
148
148
  prerelease: false
149
149
  version_requirements: !ruby/object:Gem::Requirement
150
150
  requirements:
151
- - - ">="
151
+ - - "~>"
152
152
  - !ruby/object:Gem::Version
153
- version: '0'
153
+ version: '1.0'
154
154
  - !ruby/object:Gem::Dependency
155
155
  name: excon
156
156
  requirement: !ruby/object:Gem::Requirement
@@ -179,6 +179,48 @@ dependencies:
179
179
  - - "~>"
180
180
  - !ruby/object:Gem::Version
181
181
  version: 1.6.4
182
+ - !ruby/object:Gem::Dependency
183
+ name: coderay
184
+ requirement: !ruby/object:Gem::Requirement
185
+ requirements:
186
+ - - ">="
187
+ - !ruby/object:Gem::Version
188
+ version: '0'
189
+ type: :runtime
190
+ prerelease: false
191
+ version_requirements: !ruby/object:Gem::Requirement
192
+ requirements:
193
+ - - ">="
194
+ - !ruby/object:Gem::Version
195
+ version: '0'
196
+ - !ruby/object:Gem::Dependency
197
+ name: pry
198
+ requirement: !ruby/object:Gem::Requirement
199
+ requirements:
200
+ - - ">="
201
+ - !ruby/object:Gem::Version
202
+ version: '0'
203
+ type: :runtime
204
+ prerelease: false
205
+ version_requirements: !ruby/object:Gem::Requirement
206
+ requirements:
207
+ - - ">="
208
+ - !ruby/object:Gem::Version
209
+ version: '0'
210
+ - !ruby/object:Gem::Dependency
211
+ name: dotenv
212
+ requirement: !ruby/object:Gem::Requirement
213
+ requirements:
214
+ - - ">="
215
+ - !ruby/object:Gem::Version
216
+ version: '0'
217
+ type: :development
218
+ prerelease: false
219
+ version_requirements: !ruby/object:Gem::Requirement
220
+ requirements:
221
+ - - ">="
222
+ - !ruby/object:Gem::Version
223
+ version: '0'
182
224
  description: Basic tools for Heroku Vault's Ruby projects
183
225
  email:
184
226
  - christopher.continanza@gmail.com
@@ -190,8 +232,6 @@ extensions: []
190
232
  extra_rdoc_files: []
191
233
  files:
192
234
  - ".gitignore"
193
- - ".ruby-gemset"
194
- - ".ruby-version"
195
235
  - ".travis.yml"
196
236
  - ".yardopts"
197
237
  - Gemfile
@@ -200,6 +240,7 @@ files:
200
240
  - LICENSE.txt
201
241
  - README.md
202
242
  - Rakefile
243
+ - bin/console
203
244
  - lib/vault-tools.rb
204
245
  - lib/vault-tools/analytics_db_tasks.rb
205
246
  - lib/vault-tools/app.rb
@@ -210,6 +251,7 @@ files:
210
251
  - lib/vault-tools/log.rb
211
252
  - lib/vault-tools/pipeline.rb
212
253
  - lib/vault-tools/product.rb
254
+ - lib/vault-tools/rollbar_helper.rb
213
255
  - lib/vault-tools/s3.rb
214
256
  - lib/vault-tools/sinatra_helpers/html_serializer.rb
215
257
  - lib/vault-tools/statement_store.rb
data/.ruby-gemset DELETED
@@ -1 +0,0 @@
1
- vault-tools
data/.ruby-version DELETED
@@ -1 +0,0 @@
1
- 1.9.3-p429