exception_hub 0.0.1 → 0.0.2

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/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # ExceptionHub
2
2
 
3
+ [![Build Status](https://secure.travis-ci.org/jessedearing/exception_hub.png?branch=master)](http://travis-ci.org/jessedearing/exception_hub)
4
+
3
5
  ExceptionHub will take your applications exceptions as they are thrown
4
6
  and will log them in Github issues.
5
7
 
@@ -20,4 +20,5 @@ Gem::Specification.new do |gem|
20
20
  gem.add_dependency('faraday_middleware')
21
21
 
22
22
  gem.add_development_dependency('rspec', '~> 2.10.0')
23
+ gem.add_development_dependency('simplecov')
23
24
  end
@@ -10,7 +10,7 @@ module ExceptionHub
10
10
  o.create_authorization(:scopes => [:repo], :note => note, :note_url => url)
11
11
  end
12
12
 
13
- def generate_initializer(user, api_token, auth_id)
13
+ def generate_initializer(user, api_token, auth_id, repo_name, repo_owner)
14
14
  t = ERB.new(INITIALIZER_TEMPLATE)
15
15
  t.result binding
16
16
  end
@@ -23,4 +23,6 @@ ExceptionHub.configure do |config|
23
23
  # Github Authorization #<%= auth_id %>
24
24
  config.github_user_name = '<%= user %>'
25
25
  config.github_api_token = '<%= api_token %>'
26
+ config.repo_name = '<%= repo_name %>'
27
+ config.repo_owner = '<%= repo_owner %>'
26
28
  end
@@ -14,12 +14,17 @@ module ExceptionHub
14
14
  system('stty -echo')
15
15
  password = STDIN.gets.chomp
16
16
  system('stty echo')
17
+ puts "Repo name:"
18
+ repo_name = STDIN.gets.chomp
19
+ puts "Repo owner:"
20
+ repo_owner = STDIN.gets.chomp
21
+
17
22
 
18
23
  puts "Getting authorization from Github"
19
24
  auth = ExceptionHub.get_api_token(username, password)
20
25
 
21
26
  puts "Generating initializer"
22
- File.write('./config/initializers/exception_hub.rb', ExceptionHub.generate_initializer(username, auth.token, auth.id))
27
+ File.write('./config/initializers/exception_hub.rb', ExceptionHub.generate_initializer(username, auth.token, auth.id, repo_name, repo_owner))
23
28
  end
24
29
  end
25
30
  end
@@ -1,3 +1,3 @@
1
1
  module ExceptionHub
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -14,7 +14,7 @@ describe ExceptionHub::Client::Authorization do
14
14
  end
15
15
 
16
16
  it "should create an initializer" do
17
- output = ExceptionHub.generate_initializer('jessedearing', 'asdf', 123)
17
+ output = ExceptionHub.generate_initializer('jessedearing', 'asdf', 123, 'exception_hub', 'jessedearing')
18
18
  output.should include "user_name = 'jessedearing'"
19
19
  output.should include "api_token = 'asdf'"
20
20
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: exception_hub
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -75,6 +75,22 @@ dependencies:
75
75
  - - ~>
76
76
  - !ruby/object:Gem::Version
77
77
  version: 2.10.0
78
+ - !ruby/object:Gem::Dependency
79
+ name: simplecov
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ! '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ type: :development
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
78
94
  description: exception_hub logs exceptions in your Rails application to Github issues
79
95
  email:
80
96
  - jesse.dearing@gmail.com