exception_notification 3.0.1 → 4.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Appraisals +7 -0
- data/CHANGELOG.rdoc +129 -1
- data/CODE_OF_CONDUCT.md +22 -0
- data/CONTRIBUTING.md +29 -1
- data/Gemfile +1 -1
- data/MIT-LICENSE +23 -0
- data/README.md +168 -222
- data/Rakefile +5 -11
- data/docs/notifiers/campfire.md +50 -0
- data/docs/notifiers/custom.md +42 -0
- data/docs/notifiers/datadog.md +51 -0
- data/docs/notifiers/email.md +195 -0
- data/docs/notifiers/google_chat.md +31 -0
- data/docs/notifiers/hipchat.md +66 -0
- data/docs/notifiers/irc.md +97 -0
- data/docs/notifiers/mattermost.md +115 -0
- data/docs/notifiers/slack.md +161 -0
- data/docs/notifiers/sns.md +37 -0
- data/docs/notifiers/teams.md +54 -0
- data/docs/notifiers/webhook.md +60 -0
- data/examples/sample_app.rb +54 -0
- data/examples/sinatra/Gemfile +8 -0
- data/examples/sinatra/Gemfile.lock +95 -0
- data/examples/sinatra/Procfile +2 -0
- data/examples/sinatra/README.md +11 -0
- data/examples/sinatra/config.ru +3 -0
- data/examples/sinatra/sinatra_app.rb +36 -0
- data/exception_notification.gemspec +32 -11
- data/gemfiles/rails4_0.gemfile +7 -0
- data/gemfiles/rails4_1.gemfile +7 -0
- data/gemfiles/rails4_2.gemfile +7 -0
- data/gemfiles/rails5_0.gemfile +7 -0
- data/gemfiles/rails5_1.gemfile +7 -0
- data/gemfiles/rails5_2.gemfile +7 -0
- data/gemfiles/rails6_0.gemfile +7 -0
- data/lib/exception_notification.rb +11 -0
- data/lib/exception_notification/rack.rb +55 -0
- data/lib/exception_notification/rails.rb +9 -0
- data/lib/exception_notification/resque.rb +22 -0
- data/lib/exception_notification/sidekiq.rb +27 -0
- data/lib/exception_notification/version.rb +3 -0
- data/lib/exception_notifier.rb +137 -61
- data/lib/exception_notifier/base_notifier.rb +24 -0
- data/lib/exception_notifier/campfire_notifier.rb +16 -11
- data/lib/exception_notifier/datadog_notifier.rb +153 -0
- data/lib/exception_notifier/email_notifier.rb +196 -0
- data/lib/exception_notifier/google_chat_notifier.rb +42 -0
- data/lib/exception_notifier/hipchat_notifier.rb +49 -0
- data/lib/exception_notifier/irc_notifier.rb +57 -0
- data/lib/exception_notifier/mattermost_notifier.rb +72 -0
- data/lib/exception_notifier/modules/backtrace_cleaner.rb +11 -0
- data/lib/exception_notifier/modules/error_grouping.rb +77 -0
- data/lib/exception_notifier/modules/formatter.rb +118 -0
- data/lib/exception_notifier/notifier.rb +9 -179
- data/lib/exception_notifier/slack_notifier.rb +111 -0
- data/lib/exception_notifier/sns_notifier.rb +85 -0
- data/lib/exception_notifier/teams_notifier.rb +193 -0
- data/lib/exception_notifier/views/exception_notifier/_backtrace.html.erb +3 -1
- data/lib/exception_notifier/views/exception_notifier/_data.html.erb +6 -1
- data/lib/exception_notifier/views/exception_notifier/_environment.html.erb +8 -6
- data/lib/exception_notifier/views/exception_notifier/_environment.text.erb +1 -4
- data/lib/exception_notifier/views/exception_notifier/_request.html.erb +36 -5
- data/lib/exception_notifier/views/exception_notifier/_request.text.erb +10 -5
- data/lib/exception_notifier/views/exception_notifier/_session.html.erb +10 -2
- data/lib/exception_notifier/views/exception_notifier/_session.text.erb +2 -2
- data/lib/exception_notifier/views/exception_notifier/_title.html.erb +3 -3
- data/lib/exception_notifier/views/exception_notifier/background_exception_notification.html.erb +38 -11
- data/lib/exception_notifier/views/exception_notifier/background_exception_notification.text.erb +10 -11
- data/lib/exception_notifier/views/exception_notifier/exception_notification.html.erb +38 -22
- data/lib/exception_notifier/views/exception_notifier/exception_notification.text.erb +2 -3
- data/lib/exception_notifier/webhook_notifier.rb +51 -0
- data/lib/generators/exception_notification/install_generator.rb +15 -0
- data/lib/generators/exception_notification/templates/exception_notification.rb.erb +55 -0
- data/test/exception_notification/rack_test.rb +60 -0
- data/test/exception_notification/resque_test.rb +52 -0
- data/test/exception_notifier/campfire_notifier_test.rb +120 -0
- data/test/exception_notifier/datadog_notifier_test.rb +151 -0
- data/test/exception_notifier/email_notifier_test.rb +351 -0
- data/test/exception_notifier/google_chat_notifier_test.rb +181 -0
- data/test/exception_notifier/hipchat_notifier_test.rb +218 -0
- data/test/exception_notifier/irc_notifier_test.rb +137 -0
- data/test/exception_notifier/mattermost_notifier_test.rb +202 -0
- data/test/exception_notifier/modules/error_grouping_test.rb +165 -0
- data/test/exception_notifier/modules/formatter_test.rb +150 -0
- data/test/exception_notifier/sidekiq_test.rb +38 -0
- data/test/exception_notifier/slack_notifier_test.rb +227 -0
- data/test/exception_notifier/sns_notifier_test.rb +121 -0
- data/test/exception_notifier/teams_notifier_test.rb +90 -0
- data/test/exception_notifier/webhook_notifier_test.rb +96 -0
- data/test/exception_notifier_test.rb +182 -0
- data/test/{dummy/app → support}/views/exception_notifier/_new_bkg_section.html.erb +0 -0
- data/test/{dummy/app → support}/views/exception_notifier/_new_bkg_section.text.erb +0 -0
- data/test/{dummy/app → support}/views/exception_notifier/_new_section.html.erb +0 -0
- data/test/{dummy/app → support}/views/exception_notifier/_new_section.text.erb +0 -0
- data/test/test_helper.rb +12 -8
- metadata +333 -164
- data/.gemtest +0 -0
- data/Gemfile.lock +0 -122
- data/test/background_exception_notification_test.rb +0 -82
- data/test/campfire_test.rb +0 -53
- data/test/dummy/.gitignore +0 -4
- data/test/dummy/Gemfile +0 -33
- data/test/dummy/Gemfile.lock +0 -118
- data/test/dummy/Rakefile +0 -7
- data/test/dummy/app/controllers/application_controller.rb +0 -3
- data/test/dummy/app/controllers/posts_controller.rb +0 -30
- data/test/dummy/app/helpers/application_helper.rb +0 -2
- data/test/dummy/app/helpers/posts_helper.rb +0 -2
- data/test/dummy/app/models/post.rb +0 -2
- data/test/dummy/app/views/layouts/application.html.erb +0 -14
- data/test/dummy/app/views/posts/_form.html.erb +0 -0
- data/test/dummy/app/views/posts/new.html.erb +0 -0
- data/test/dummy/app/views/posts/show.html.erb +0 -0
- data/test/dummy/config.ru +0 -4
- data/test/dummy/config/application.rb +0 -42
- data/test/dummy/config/boot.rb +0 -6
- data/test/dummy/config/database.yml +0 -22
- data/test/dummy/config/environment.rb +0 -13
- data/test/dummy/config/environments/development.rb +0 -24
- data/test/dummy/config/environments/production.rb +0 -49
- data/test/dummy/config/environments/test.rb +0 -35
- data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/test/dummy/config/initializers/inflections.rb +0 -10
- data/test/dummy/config/initializers/mime_types.rb +0 -5
- data/test/dummy/config/initializers/secret_token.rb +0 -7
- data/test/dummy/config/initializers/session_store.rb +0 -8
- data/test/dummy/config/locales/en.yml +0 -5
- data/test/dummy/config/routes.rb +0 -3
- data/test/dummy/db/migrate/20110729022608_create_posts.rb +0 -15
- data/test/dummy/db/schema.rb +0 -24
- data/test/dummy/db/seeds.rb +0 -7
- data/test/dummy/lib/tasks/.gitkeep +0 -0
- data/test/dummy/public/404.html +0 -26
- data/test/dummy/public/422.html +0 -26
- data/test/dummy/public/500.html +0 -26
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/public/images/rails.png +0 -0
- data/test/dummy/public/index.html +0 -239
- data/test/dummy/public/javascripts/application.js +0 -2
- data/test/dummy/public/javascripts/controls.js +0 -965
- data/test/dummy/public/javascripts/dragdrop.js +0 -974
- data/test/dummy/public/javascripts/effects.js +0 -1123
- data/test/dummy/public/javascripts/prototype.js +0 -6001
- data/test/dummy/public/javascripts/rails.js +0 -191
- data/test/dummy/public/robots.txt +0 -5
- data/test/dummy/public/stylesheets/.gitkeep +0 -0
- data/test/dummy/public/stylesheets/scaffold.css +0 -56
- data/test/dummy/script/rails +0 -6
- data/test/dummy/test/fixtures/posts.yml +0 -11
- data/test/dummy/test/functional/posts_controller_test.rb +0 -239
- data/test/dummy/test/test_helper.rb +0 -13
- data/test/exception_notification_test.rb +0 -73
data/.gemtest
DELETED
File without changes
|
data/Gemfile.lock
DELETED
@@ -1,122 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
exception_notification (3.0.1)
|
5
|
-
actionmailer (>= 3.0.4)
|
6
|
-
|
7
|
-
GEM
|
8
|
-
remote: http://rubygems.org/
|
9
|
-
specs:
|
10
|
-
actionmailer (3.2.6)
|
11
|
-
actionpack (= 3.2.6)
|
12
|
-
mail (~> 2.4.4)
|
13
|
-
actionpack (3.2.6)
|
14
|
-
activemodel (= 3.2.6)
|
15
|
-
activesupport (= 3.2.6)
|
16
|
-
builder (~> 3.0.0)
|
17
|
-
erubis (~> 2.7.0)
|
18
|
-
journey (~> 1.0.1)
|
19
|
-
rack (~> 1.4.0)
|
20
|
-
rack-cache (~> 1.2)
|
21
|
-
rack-test (~> 0.6.1)
|
22
|
-
sprockets (~> 2.1.3)
|
23
|
-
activemodel (3.2.6)
|
24
|
-
activesupport (= 3.2.6)
|
25
|
-
builder (~> 3.0.0)
|
26
|
-
activerecord (3.2.6)
|
27
|
-
activemodel (= 3.2.6)
|
28
|
-
activesupport (= 3.2.6)
|
29
|
-
arel (~> 3.0.2)
|
30
|
-
tzinfo (~> 0.3.29)
|
31
|
-
activeresource (3.2.6)
|
32
|
-
activemodel (= 3.2.6)
|
33
|
-
activesupport (= 3.2.6)
|
34
|
-
activesupport (3.2.6)
|
35
|
-
i18n (~> 0.6)
|
36
|
-
multi_json (~> 1.0)
|
37
|
-
arel (3.0.2)
|
38
|
-
builder (3.0.0)
|
39
|
-
erubis (2.7.0)
|
40
|
-
eventmachine (1.0.0)
|
41
|
-
faraday (0.8.4)
|
42
|
-
multipart-post (~> 1.1)
|
43
|
-
faraday_middleware (0.8.8)
|
44
|
-
faraday (>= 0.7.4, < 0.9)
|
45
|
-
hashie (1.2.0)
|
46
|
-
hike (1.2.1)
|
47
|
-
http_parser.rb (0.5.3)
|
48
|
-
i18n (0.6.0)
|
49
|
-
journey (1.0.4)
|
50
|
-
json (1.7.3)
|
51
|
-
mail (2.4.4)
|
52
|
-
i18n (>= 0.4.0)
|
53
|
-
mime-types (~> 1.16)
|
54
|
-
treetop (~> 1.4.8)
|
55
|
-
metaclass (0.0.1)
|
56
|
-
mime-types (1.19)
|
57
|
-
mocha (0.12.0)
|
58
|
-
metaclass (~> 0.0.1)
|
59
|
-
multi_json (1.3.6)
|
60
|
-
multipart-post (1.1.5)
|
61
|
-
polyglot (0.3.3)
|
62
|
-
rack (1.4.1)
|
63
|
-
rack-cache (1.2)
|
64
|
-
rack (>= 0.4)
|
65
|
-
rack-ssl (1.3.2)
|
66
|
-
rack
|
67
|
-
rack-test (0.6.1)
|
68
|
-
rack (>= 1.0)
|
69
|
-
rails (3.2.6)
|
70
|
-
actionmailer (= 3.2.6)
|
71
|
-
actionpack (= 3.2.6)
|
72
|
-
activerecord (= 3.2.6)
|
73
|
-
activeresource (= 3.2.6)
|
74
|
-
activesupport (= 3.2.6)
|
75
|
-
bundler (~> 1.0)
|
76
|
-
railties (= 3.2.6)
|
77
|
-
railties (3.2.6)
|
78
|
-
actionpack (= 3.2.6)
|
79
|
-
activesupport (= 3.2.6)
|
80
|
-
rack-ssl (~> 1.3.2)
|
81
|
-
rake (>= 0.8.7)
|
82
|
-
rdoc (~> 3.4)
|
83
|
-
thor (>= 0.14.6, < 2.0)
|
84
|
-
rake (0.9.2.2)
|
85
|
-
rdoc (3.12)
|
86
|
-
json (~> 1.4)
|
87
|
-
simple_oauth (0.1.9)
|
88
|
-
sprockets (2.1.3)
|
89
|
-
hike (~> 1.2)
|
90
|
-
rack (~> 1.0)
|
91
|
-
tilt (~> 1.1, != 1.3.0)
|
92
|
-
sqlite3 (1.3.6)
|
93
|
-
thor (0.15.4)
|
94
|
-
tilt (1.3.3)
|
95
|
-
tinder (1.9.1)
|
96
|
-
eventmachine (>= 0.12.0, < 2)
|
97
|
-
faraday (~> 0.8)
|
98
|
-
faraday_middleware (~> 0.8)
|
99
|
-
hashie (~> 1.0)
|
100
|
-
json (~> 1.6)
|
101
|
-
mime-types (~> 1.16)
|
102
|
-
multi_json (~> 1.0)
|
103
|
-
multipart-post (~> 1.1)
|
104
|
-
twitter-stream (~> 0.1)
|
105
|
-
treetop (1.4.10)
|
106
|
-
polyglot
|
107
|
-
polyglot (>= 0.3.1)
|
108
|
-
twitter-stream (0.1.16)
|
109
|
-
eventmachine (>= 0.12.8)
|
110
|
-
http_parser.rb (~> 0.5.1)
|
111
|
-
simple_oauth (~> 0.1.4)
|
112
|
-
tzinfo (0.3.33)
|
113
|
-
|
114
|
-
PLATFORMS
|
115
|
-
ruby
|
116
|
-
|
117
|
-
DEPENDENCIES
|
118
|
-
exception_notification!
|
119
|
-
mocha (>= 0.11.3)
|
120
|
-
rails (>= 3.0.4)
|
121
|
-
sqlite3 (>= 1.3.4)
|
122
|
-
tinder (~> 1.8)
|
@@ -1,82 +0,0 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
|
3
|
-
class BackgroundExceptionNotificationTest < ActiveSupport::TestCase
|
4
|
-
setup do
|
5
|
-
begin
|
6
|
-
1/0
|
7
|
-
rescue => e
|
8
|
-
@exception = e
|
9
|
-
@time = Time.current
|
10
|
-
@mail = ExceptionNotifier::Notifier.background_exception_notification(@exception,
|
11
|
-
:data => {:job => 'DivideWorkerJob', :payload => '1/0', :message => 'My Custom Message'})
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
test "mail should be plain text and UTF-8 enconded by default" do
|
16
|
-
assert @mail.content_type == "text/plain; charset=UTF-8"
|
17
|
-
end
|
18
|
-
|
19
|
-
test "should have raised an exception" do
|
20
|
-
assert_not_nil @exception
|
21
|
-
end
|
22
|
-
|
23
|
-
test "should have generated a notification email" do
|
24
|
-
assert_not_nil @mail
|
25
|
-
end
|
26
|
-
|
27
|
-
test "mail should have a from address set" do
|
28
|
-
assert @mail.from == ["dummynotifier@example.com"]
|
29
|
-
end
|
30
|
-
|
31
|
-
test "mail should have a to address set" do
|
32
|
-
assert @mail.to == ["dummyexceptions@example.com"]
|
33
|
-
end
|
34
|
-
|
35
|
-
test "mail should have a descriptive subject" do
|
36
|
-
assert @mail.subject == "[Dummy ERROR] (ZeroDivisionError) \"divided by 0\""
|
37
|
-
end
|
38
|
-
|
39
|
-
test "mail should say exception was raised in background at show timestamp" do
|
40
|
-
assert @mail.encoded.include? "A ZeroDivisionError occurred in background at #{@time}"
|
41
|
-
end
|
42
|
-
|
43
|
-
test "mail should prefix exception class with 'an' instead of 'a' when it starts with a vowel" do
|
44
|
-
begin
|
45
|
-
raise ActiveRecord::RecordNotFound
|
46
|
-
rescue => e
|
47
|
-
@vowel_exception = e
|
48
|
-
@vowel_mail = ExceptionNotifier::Notifier.background_exception_notification(@vowel_exception)
|
49
|
-
end
|
50
|
-
|
51
|
-
assert @vowel_mail.encoded.include? "An ActiveRecord::RecordNotFound occurred in background at #{@time}"
|
52
|
-
end
|
53
|
-
|
54
|
-
test "mail should contain backtrace in body" do
|
55
|
-
assert @mail.encoded.include?("test/background_exception_notification_test.rb:6"), "\n#{@mail.inspect}"
|
56
|
-
end
|
57
|
-
|
58
|
-
test "mail should contain data in body" do
|
59
|
-
assert @mail.encoded.include? '* data:'
|
60
|
-
assert @mail.encoded.include? ':payload=>"1/0"'
|
61
|
-
assert @mail.encoded.include? ':job=>"DivideWorkerJob"'
|
62
|
-
assert @mail.encoded.include? "My Custom Message"
|
63
|
-
end
|
64
|
-
|
65
|
-
test "mail should not contain any attachments" do
|
66
|
-
assert @mail.attachments == []
|
67
|
-
end
|
68
|
-
|
69
|
-
test "should not send notification if one of ignored exceptions" do
|
70
|
-
begin
|
71
|
-
raise ActiveRecord::RecordNotFound
|
72
|
-
rescue => e
|
73
|
-
@ignored_exception = e
|
74
|
-
unless ExceptionNotifier.default_ignore_exceptions.include?(@ignored_exception.class.name)
|
75
|
-
@ignored_mail = ExceptionNotifier::Notifier.background_exception_notification(@ignored_exception)
|
76
|
-
end
|
77
|
-
end
|
78
|
-
|
79
|
-
assert @ignored_exception.class.inspect == "ActiveRecord::RecordNotFound"
|
80
|
-
assert_nil @ignored_mail
|
81
|
-
end
|
82
|
-
end
|
data/test/campfire_test.rb
DELETED
@@ -1,53 +0,0 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
require 'tinder'
|
3
|
-
|
4
|
-
class CampfireNotifierTest < ActiveSupport::TestCase
|
5
|
-
|
6
|
-
test "should send campfire notification if properly configured" do
|
7
|
-
ExceptionNotifier::CampfireNotifier.stubs(:new).returns(Object.new)
|
8
|
-
campfire = ExceptionNotifier::CampfireNotifier.new({:subdomain => 'test', :token => 'test_token', :room_name => 'test_room'})
|
9
|
-
campfire.stubs(:exception_notification).returns(fake_notification)
|
10
|
-
notif = campfire.exception_notification(fake_exception)
|
11
|
-
|
12
|
-
assert !notif[:message].empty?
|
13
|
-
assert_equal notif[:message][:type], 'PasteMessage'
|
14
|
-
assert notif[:message][:body].include? "A new exception occurred:"
|
15
|
-
assert notif[:message][:body].include? "divided by 0"
|
16
|
-
assert notif[:message][:body].include? "/exception_notification/test/campfire_test.rb:45"
|
17
|
-
end
|
18
|
-
|
19
|
-
test "should not send campfire notification if badly configured" do
|
20
|
-
wrong_params = {:subdomain => 'test', :token => 'bad_token', :room_name => 'test_room'}
|
21
|
-
Tinder::Campfire.stubs(:new).with('test', {:token => 'bad_token'}).returns(nil)
|
22
|
-
campfire = ExceptionNotifier::CampfireNotifier.new(wrong_params)
|
23
|
-
|
24
|
-
assert_nil campfire.room
|
25
|
-
assert_nil campfire.exception_notification(fake_exception)
|
26
|
-
end
|
27
|
-
|
28
|
-
test "should not send campfire notification if config attr missing" do
|
29
|
-
wrong_params = {:subdomain => 'test', :room_name => 'test_room'}
|
30
|
-
Tinder::Campfire.stubs(:new).with('test', {}).returns(nil)
|
31
|
-
campfire = ExceptionNotifier::CampfireNotifier.new(wrong_params)
|
32
|
-
|
33
|
-
assert_nil campfire.room
|
34
|
-
assert_nil campfire.exception_notification(fake_exception)
|
35
|
-
end
|
36
|
-
|
37
|
-
private
|
38
|
-
|
39
|
-
def fake_notification
|
40
|
-
{:message => {:type => 'PasteMessage',
|
41
|
-
:body => "A new exception occurred: 'divided by 0' on '/Users/sebastian/exception_notification/test/campfire_test.rb:45:in `/'"
|
42
|
-
}
|
43
|
-
}
|
44
|
-
end
|
45
|
-
|
46
|
-
def fake_exception
|
47
|
-
exception = begin
|
48
|
-
5/0
|
49
|
-
rescue Exception => e
|
50
|
-
e
|
51
|
-
end
|
52
|
-
end
|
53
|
-
end
|
data/test/dummy/.gitignore
DELETED
data/test/dummy/Gemfile
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
source 'http://rubygems.org'
|
2
|
-
|
3
|
-
gem 'rails', '3.2.8'
|
4
|
-
|
5
|
-
# Bundle edge Rails instead:
|
6
|
-
# gem 'rails', :git => 'git://github.com/rails/rails.git'
|
7
|
-
|
8
|
-
gem 'sqlite3'
|
9
|
-
|
10
|
-
gem 'tinder'
|
11
|
-
gem 'exception_notification', :path => "../../.."
|
12
|
-
# Use unicorn as the web server
|
13
|
-
# gem 'unicorn'
|
14
|
-
|
15
|
-
# Deploy with Capistrano
|
16
|
-
# gem 'capistrano'
|
17
|
-
|
18
|
-
# To use debugger (ruby-debug for Ruby 1.8.7+, ruby-debug19 for Ruby 1.9.2+)
|
19
|
-
# gem 'ruby-debug'
|
20
|
-
# gem 'ruby-debug19', :require => 'ruby-debug'
|
21
|
-
|
22
|
-
# Bundle the extra gems:
|
23
|
-
# gem 'bj'
|
24
|
-
# gem 'nokogiri'
|
25
|
-
# gem 'sqlite3-ruby', :require => 'sqlite3'
|
26
|
-
# gem 'aws-s3', :require => 'aws/s3'
|
27
|
-
|
28
|
-
# Bundle gems for the local environment. Make sure to
|
29
|
-
# put test-only gems in this group so their generators
|
30
|
-
# and rake tasks are available in development mode:
|
31
|
-
# group :development, :test do
|
32
|
-
# gem 'webrat'
|
33
|
-
# end
|
data/test/dummy/Gemfile.lock
DELETED
@@ -1,118 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: ../../..
|
3
|
-
specs:
|
4
|
-
exception_notification (3.0.0)
|
5
|
-
actionmailer (>= 3.0.4)
|
6
|
-
|
7
|
-
GEM
|
8
|
-
remote: http://rubygems.org/
|
9
|
-
specs:
|
10
|
-
actionmailer (3.2.8)
|
11
|
-
actionpack (= 3.2.8)
|
12
|
-
mail (~> 2.4.4)
|
13
|
-
actionpack (3.2.8)
|
14
|
-
activemodel (= 3.2.8)
|
15
|
-
activesupport (= 3.2.8)
|
16
|
-
builder (~> 3.0.0)
|
17
|
-
erubis (~> 2.7.0)
|
18
|
-
journey (~> 1.0.4)
|
19
|
-
rack (~> 1.4.0)
|
20
|
-
rack-cache (~> 1.2)
|
21
|
-
rack-test (~> 0.6.1)
|
22
|
-
sprockets (~> 2.1.3)
|
23
|
-
activemodel (3.2.8)
|
24
|
-
activesupport (= 3.2.8)
|
25
|
-
builder (~> 3.0.0)
|
26
|
-
activerecord (3.2.8)
|
27
|
-
activemodel (= 3.2.8)
|
28
|
-
activesupport (= 3.2.8)
|
29
|
-
arel (~> 3.0.2)
|
30
|
-
tzinfo (~> 0.3.29)
|
31
|
-
activeresource (3.2.8)
|
32
|
-
activemodel (= 3.2.8)
|
33
|
-
activesupport (= 3.2.8)
|
34
|
-
activesupport (3.2.8)
|
35
|
-
i18n (~> 0.6)
|
36
|
-
multi_json (~> 1.0)
|
37
|
-
arel (3.0.2)
|
38
|
-
builder (3.0.2)
|
39
|
-
erubis (2.7.0)
|
40
|
-
eventmachine (1.0.0)
|
41
|
-
faraday (0.8.4)
|
42
|
-
multipart-post (~> 1.1)
|
43
|
-
faraday_middleware (0.8.8)
|
44
|
-
faraday (>= 0.7.4, < 0.9)
|
45
|
-
hashie (1.2.0)
|
46
|
-
hike (1.2.1)
|
47
|
-
http_parser.rb (0.5.3)
|
48
|
-
i18n (0.6.1)
|
49
|
-
journey (1.0.4)
|
50
|
-
json (1.7.5)
|
51
|
-
mail (2.4.4)
|
52
|
-
i18n (>= 0.4.0)
|
53
|
-
mime-types (~> 1.16)
|
54
|
-
treetop (~> 1.4.8)
|
55
|
-
mime-types (1.19)
|
56
|
-
multi_json (1.3.6)
|
57
|
-
multipart-post (1.1.5)
|
58
|
-
polyglot (0.3.3)
|
59
|
-
rack (1.4.1)
|
60
|
-
rack-cache (1.2)
|
61
|
-
rack (>= 0.4)
|
62
|
-
rack-ssl (1.3.2)
|
63
|
-
rack
|
64
|
-
rack-test (0.6.1)
|
65
|
-
rack (>= 1.0)
|
66
|
-
rails (3.2.8)
|
67
|
-
actionmailer (= 3.2.8)
|
68
|
-
actionpack (= 3.2.8)
|
69
|
-
activerecord (= 3.2.8)
|
70
|
-
activeresource (= 3.2.8)
|
71
|
-
activesupport (= 3.2.8)
|
72
|
-
bundler (~> 1.0)
|
73
|
-
railties (= 3.2.8)
|
74
|
-
railties (3.2.8)
|
75
|
-
actionpack (= 3.2.8)
|
76
|
-
activesupport (= 3.2.8)
|
77
|
-
rack-ssl (~> 1.3.2)
|
78
|
-
rake (>= 0.8.7)
|
79
|
-
rdoc (~> 3.4)
|
80
|
-
thor (>= 0.14.6, < 2.0)
|
81
|
-
rake (0.9.2.2)
|
82
|
-
rdoc (3.12)
|
83
|
-
json (~> 1.4)
|
84
|
-
simple_oauth (0.1.9)
|
85
|
-
sprockets (2.1.3)
|
86
|
-
hike (~> 1.2)
|
87
|
-
rack (~> 1.0)
|
88
|
-
tilt (~> 1.1, != 1.3.0)
|
89
|
-
sqlite3 (1.3.6)
|
90
|
-
thor (0.16.0)
|
91
|
-
tilt (1.3.3)
|
92
|
-
tinder (1.9.1)
|
93
|
-
eventmachine (>= 0.12.0, < 2)
|
94
|
-
faraday (~> 0.8)
|
95
|
-
faraday_middleware (~> 0.8)
|
96
|
-
hashie (~> 1.0)
|
97
|
-
json (~> 1.6)
|
98
|
-
mime-types (~> 1.16)
|
99
|
-
multi_json (~> 1.0)
|
100
|
-
multipart-post (~> 1.1)
|
101
|
-
twitter-stream (~> 0.1)
|
102
|
-
treetop (1.4.10)
|
103
|
-
polyglot
|
104
|
-
polyglot (>= 0.3.1)
|
105
|
-
twitter-stream (0.1.16)
|
106
|
-
eventmachine (>= 0.12.8)
|
107
|
-
http_parser.rb (~> 0.5.1)
|
108
|
-
simple_oauth (~> 0.1.4)
|
109
|
-
tzinfo (0.3.33)
|
110
|
-
|
111
|
-
PLATFORMS
|
112
|
-
ruby
|
113
|
-
|
114
|
-
DEPENDENCIES
|
115
|
-
exception_notification!
|
116
|
-
rails (= 3.2.8)
|
117
|
-
sqlite3
|
118
|
-
tinder
|
data/test/dummy/Rakefile
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
2
|
-
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
3
|
-
|
4
|
-
require File.expand_path('../config/application', __FILE__)
|
5
|
-
require 'rake'
|
6
|
-
|
7
|
-
Dummy::Application.load_tasks
|
@@ -1,30 +0,0 @@
|
|
1
|
-
class PostsController < ApplicationController
|
2
|
-
# GET /posts/1
|
3
|
-
# GET /posts/1.xml
|
4
|
-
def show
|
5
|
-
@post = Post.find(params[:id])
|
6
|
-
|
7
|
-
respond_to do |format|
|
8
|
-
format.html # show.html.erb
|
9
|
-
format.xml { render :xml => @post }
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
# POST /posts
|
14
|
-
# POST /posts.xml
|
15
|
-
def create
|
16
|
-
@sections = Object.new
|
17
|
-
# Have this line raise an exception
|
18
|
-
@post = Post.nw(params[:post])
|
19
|
-
|
20
|
-
respond_to do |format|
|
21
|
-
if @post.save
|
22
|
-
format.html { redirect_to(post_path(@post), :notice => 'Post was successfully created.') }
|
23
|
-
format.xml { render :xml => @post, :status => :created, :location => @post }
|
24
|
-
else
|
25
|
-
format.html { render :action => "new" }
|
26
|
-
format.xml { render :xml => @post.errors, :status => :unprocessable_entity }
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|