appygram-rails 0.9.1 → 0.9.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/{appygram.gemspec → appygram-rails.gemspec} +4 -4
- data/lib/{appygram → appygram-rails}/rack_exception_data.rb +3 -3
- data/lib/appygram-rails/railtie.rb +16 -0
- data/lib/{appygram → appygram-rails}/version.rb +1 -1
- data/lib/{appygram.rb → appygram-rails.rb} +17 -17
- metadata +25 -28
- data/init.rb +0 -39
- data/lib/appygram/railtie.rb +0 -20
- data/rails/init.rb +0 -1
- /data/lib/{appygram → appygram-rails}/alert_data.rb +0 -0
- /data/lib/{appygram → appygram-rails}/application_environment.rb +0 -0
- /data/lib/{appygram → appygram-rails}/catcher.rb +0 -0
- /data/lib/{appygram → appygram-rails}/config.rb +0 -0
- /data/lib/{appygram → appygram-rails}/controller_exception_data.rb +0 -0
- /data/lib/{appygram → appygram-rails}/exception_data.rb +0 -0
- /data/lib/{appygram → appygram-rails}/integration/alerter.rb +0 -0
- /data/lib/{appygram → appygram-rails}/integration/debug_exceptions.rb +0 -0
- /data/lib/{appygram → appygram-rails}/integration/rack.rb +0 -0
- /data/lib/{appygram → appygram-rails}/integration/rack_rails.rb +0 -0
- /data/lib/{appygram → appygram-rails}/log_factory.rb +0 -0
- /data/lib/{appygram → appygram-rails}/monkeypatches.rb +0 -0
- /data/lib/{appygram → appygram-rails}/remote.rb +0 -0
- /data/lib/{appygram → appygram-rails}/startup.rb +0 -0
@@ -1,15 +1,15 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
require File.expand_path('../lib/appygram/version', __FILE__)
|
2
|
+
require File.expand_path('../lib/appygram-rails/version', __FILE__)
|
3
3
|
|
4
4
|
Gem::Specification.new do |gem|
|
5
5
|
gem.name = %q{appygram-rails}
|
6
6
|
gem.version = Appygram::VERSION
|
7
7
|
gem.authors = ["rfc2616"]
|
8
8
|
gem.summary = %q{ appygram is a hosted service for sending messages from mobile/web apps }
|
9
|
-
gem.description = %q{
|
9
|
+
gem.description = %q{appygram-rails sends exceptions and feedback to the hosted messaging service at http://www.appygram.com}
|
10
10
|
gem.email = %q{heittman.rob@gmail.com}
|
11
|
-
gem.files = Dir['lib/**/*'] + Dir['spec/**/*'] + Dir['spec/**/*'] + Dir['rails/**/*'] + Dir['tasks/**/*'] + Dir['*.rb'] + ["appygram.gemspec"]
|
12
|
-
gem.homepage = %q{http://appygram.com/}
|
11
|
+
gem.files = Dir['lib/**/*'] + Dir['spec/**/*'] + Dir['spec/**/*'] + Dir['rails/**/*'] + Dir['tasks/**/*'] + Dir['*.rb'] + ["appygram-rails.gemspec"]
|
12
|
+
gem.homepage = %q{http://www.appygram.com/}
|
13
13
|
gem.require_paths = ["lib"]
|
14
14
|
gem.requirements << "json_pure, json-jruby or json gem required"
|
15
15
|
gem.add_dependency 'rack'
|
@@ -3,7 +3,7 @@ require 'digest/md5'
|
|
3
3
|
module Appygram
|
4
4
|
class RackExceptionData < ExceptionData
|
5
5
|
def initialize(exception, environment, request)
|
6
|
-
super(exception)
|
6
|
+
super(exception)
|
7
7
|
@environment = environment
|
8
8
|
@request = request
|
9
9
|
end
|
@@ -16,7 +16,7 @@ module Appygram
|
|
16
16
|
return {} if @request.nil?
|
17
17
|
{
|
18
18
|
'request' => {
|
19
|
-
'url' => "#{@request.url}",
|
19
|
+
'url' => "#{@request.url}",
|
20
20
|
'parameters' => @request.params,
|
21
21
|
'request_method' => @request.request_method.to_s,
|
22
22
|
'remote_ip' => @request.ip,
|
@@ -26,4 +26,4 @@ module Appygram
|
|
26
26
|
}
|
27
27
|
end
|
28
28
|
end
|
29
|
-
end
|
29
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'appygram-rails'
|
2
|
+
require 'rails'
|
3
|
+
|
4
|
+
module Appygram
|
5
|
+
class Railtie < Rails::Railtie
|
6
|
+
|
7
|
+
initializer "appygram.middleware" do |app|
|
8
|
+
Appygram.logger.info("Loading Appygram #{Appygram::VERSION} for #{Rails::VERSION::STRING}")
|
9
|
+
if defined?(ActionDispatch::DebugExceptions)
|
10
|
+
ActionDispatch::DebugExceptions.send(:include,Appygram::DebugExceptions)
|
11
|
+
else
|
12
|
+
app.config.middleware.use "Rack::RailsAppygram"
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -1,23 +1,23 @@
|
|
1
1
|
$:.unshift File.dirname(__FILE__)
|
2
2
|
|
3
|
-
require 'appygram/monkeypatches'
|
4
|
-
require 'appygram/catcher'
|
5
|
-
require 'appygram/startup'
|
6
|
-
require 'appygram/log_factory'
|
7
|
-
require 'appygram/config'
|
8
|
-
require 'appygram/application_environment'
|
9
|
-
require 'appygram/exception_data'
|
10
|
-
require 'appygram/controller_exception_data'
|
11
|
-
require 'appygram/rack_exception_data'
|
12
|
-
require 'appygram/alert_data'
|
13
|
-
require 'appygram/remote'
|
14
|
-
require 'appygram/integration/rack'
|
15
|
-
require 'appygram/integration/rack_rails'
|
16
|
-
require 'appygram/integration/alerter'
|
17
|
-
require 'appygram/version'
|
18
|
-
require 'appygram/integration/debug_exceptions'
|
3
|
+
require 'appygram-rails/monkeypatches'
|
4
|
+
require 'appygram-rails/catcher'
|
5
|
+
require 'appygram-rails/startup'
|
6
|
+
require 'appygram-rails/log_factory'
|
7
|
+
require 'appygram-rails/config'
|
8
|
+
require 'appygram-rails/application_environment'
|
9
|
+
require 'appygram-rails/exception_data'
|
10
|
+
require 'appygram-rails/controller_exception_data'
|
11
|
+
require 'appygram-rails/rack_exception_data'
|
12
|
+
require 'appygram-rails/alert_data'
|
13
|
+
require 'appygram-rails/remote'
|
14
|
+
require 'appygram-rails/integration/rack'
|
15
|
+
require 'appygram-rails/integration/rack_rails'
|
16
|
+
require 'appygram-rails/integration/alerter'
|
17
|
+
require 'appygram-rails/version'
|
18
|
+
require 'appygram-rails/integration/debug_exceptions'
|
19
19
|
|
20
|
-
require 'appygram/railtie' if defined?(Rails::Railtie)
|
20
|
+
require 'appygram-rails/railtie' if defined?(Rails::Railtie)
|
21
21
|
|
22
22
|
module Appygram
|
23
23
|
PROTOCOL_VERSION = 5
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appygram-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-07-13 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rack
|
16
|
-
requirement: &
|
16
|
+
requirement: &70353867102960 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,37 +21,34 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
25
|
-
description:
|
26
|
-
|
27
|
-
and this Ruby gem, forked from the Exceptional gem, emulates Exceptional functionality.
|
24
|
+
version_requirements: *70353867102960
|
25
|
+
description: appygram-rails sends exceptions and feedback to the hosted messaging
|
26
|
+
service at http://www.appygram.com
|
28
27
|
email: heittman.rob@gmail.com
|
29
28
|
executables: []
|
30
29
|
extensions: []
|
31
30
|
extra_rdoc_files: []
|
32
31
|
files:
|
33
|
-
- lib/appygram/alert_data.rb
|
34
|
-
- lib/appygram/application_environment.rb
|
35
|
-
- lib/appygram/catcher.rb
|
36
|
-
- lib/appygram/config.rb
|
37
|
-
- lib/appygram/controller_exception_data.rb
|
38
|
-
- lib/appygram/exception_data.rb
|
39
|
-
- lib/appygram/integration/alerter.rb
|
40
|
-
- lib/appygram/integration/debug_exceptions.rb
|
41
|
-
- lib/appygram/integration/rack.rb
|
42
|
-
- lib/appygram/integration/rack_rails.rb
|
43
|
-
- lib/appygram/log_factory.rb
|
44
|
-
- lib/appygram/monkeypatches.rb
|
45
|
-
- lib/appygram/rack_exception_data.rb
|
46
|
-
- lib/appygram/railtie.rb
|
47
|
-
- lib/appygram/remote.rb
|
48
|
-
- lib/appygram/startup.rb
|
49
|
-
- lib/appygram/version.rb
|
50
|
-
- lib/appygram.rb
|
51
|
-
- rails
|
52
|
-
|
53
|
-
- appygram.gemspec
|
54
|
-
homepage: http://appygram.com/
|
32
|
+
- lib/appygram-rails/alert_data.rb
|
33
|
+
- lib/appygram-rails/application_environment.rb
|
34
|
+
- lib/appygram-rails/catcher.rb
|
35
|
+
- lib/appygram-rails/config.rb
|
36
|
+
- lib/appygram-rails/controller_exception_data.rb
|
37
|
+
- lib/appygram-rails/exception_data.rb
|
38
|
+
- lib/appygram-rails/integration/alerter.rb
|
39
|
+
- lib/appygram-rails/integration/debug_exceptions.rb
|
40
|
+
- lib/appygram-rails/integration/rack.rb
|
41
|
+
- lib/appygram-rails/integration/rack_rails.rb
|
42
|
+
- lib/appygram-rails/log_factory.rb
|
43
|
+
- lib/appygram-rails/monkeypatches.rb
|
44
|
+
- lib/appygram-rails/rack_exception_data.rb
|
45
|
+
- lib/appygram-rails/railtie.rb
|
46
|
+
- lib/appygram-rails/remote.rb
|
47
|
+
- lib/appygram-rails/startup.rb
|
48
|
+
- lib/appygram-rails/version.rb
|
49
|
+
- lib/appygram-rails.rb
|
50
|
+
- appygram-rails.gemspec
|
51
|
+
homepage: http://www.appygram.com/
|
55
52
|
licenses: []
|
56
53
|
post_install_message:
|
57
54
|
rdoc_options: []
|
data/init.rb
DELETED
@@ -1,39 +0,0 @@
|
|
1
|
-
require 'appygram'
|
2
|
-
|
3
|
-
# If old plugin still installed then we don't want to install this one.
|
4
|
-
# In production environments we should continue to work as before, but in development/test we should
|
5
|
-
# advise how to correct the problem and exit
|
6
|
-
if (defined?(Appygram::VERSION::STRING) rescue nil) && %w(development test).include?(RAILS_ENV)
|
7
|
-
message = %Q(
|
8
|
-
***********************************************************************
|
9
|
-
You seem to still have an old version of the Appygram plugin installed.
|
10
|
-
Remove it from /vendor/plugins and try again.
|
11
|
-
***********************************************************************
|
12
|
-
)
|
13
|
-
puts message
|
14
|
-
exit -1
|
15
|
-
else
|
16
|
-
begin
|
17
|
-
|
18
|
-
if (Rails::VERSION::MAJOR < 3)
|
19
|
-
Appygram::Config.load(File.join(RAILS_ROOT, "/config/Appygram.yml"))
|
20
|
-
if Appygram::Config.should_send_to_api?
|
21
|
-
Appygram.logger.info("Loading Appygram #{Appygram::VERSION} for #{Rails::VERSION::STRING}")
|
22
|
-
require File.join('Appygram', 'integration', 'rails')
|
23
|
-
require File.join('Appygram', 'integration', 'dj') if defined?(Delayed::Job)
|
24
|
-
end
|
25
|
-
else
|
26
|
-
Appygram::Config.load(File.join(Rails.root, "/config/Appygram.yml"))
|
27
|
-
|
28
|
-
if Appygram::Config.should_send_to_api?
|
29
|
-
Appygram.logger.info("Loading Appygram #{Appygram::VERSION} for #{Rails::VERSION::STRING}")
|
30
|
-
Rails.configuration.middleware.use "Rack::RailsAppygram"
|
31
|
-
require File.join('Appygram', 'integration', 'dj') if defined?(Delayed::Job)
|
32
|
-
end
|
33
|
-
end
|
34
|
-
rescue => e
|
35
|
-
STDERR.puts "Problem starting Appygram Plugin. Your app will run as normal. #{e.message}"
|
36
|
-
Appygram.logger.error(e.message)
|
37
|
-
Appygram.logger.error(e.backtrace)
|
38
|
-
end
|
39
|
-
end
|
data/lib/appygram/railtie.rb
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
require 'appygram'
|
2
|
-
require 'rails'
|
3
|
-
|
4
|
-
module Appygram
|
5
|
-
class Railtie < Rails::Railtie
|
6
|
-
|
7
|
-
initializer "appygram.middleware" do |app|
|
8
|
-
|
9
|
-
if Appygram::Config.should_send_to_api?
|
10
|
-
Appygram.logger.info("Loading Appygram #{Appygram::VERSION} for #{Rails::VERSION::STRING}")
|
11
|
-
if defined?(ActionDispatch::DebugExceptions)
|
12
|
-
ActionDispatch::DebugExceptions.send(:include,Appygram::DebugExceptions)
|
13
|
-
else
|
14
|
-
app.config.middleware.use "Rack::RailsAppygram"
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
data/rails/init.rb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
require File.join(File.dirname(__FILE__) , '../init.rb')
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|