ffcrm_cloudfuji 0.2.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,32 @@
1
+ module FatFreeCRM
2
+ module Cloudfuji
3
+ module EventObservers
4
+ class ErrorObserver < ::Cloudfuji::EventObserver
5
+ include ActionView::Helpers::TextHelper
6
+
7
+ def error_caught
8
+ email = data['email'] || data['recipient']
9
+ # Look up Lead by ido_id, fall back to email address
10
+ if user_attributes = data['user_attributes']
11
+ lead = Lead.find_by_ido_id(user_attributes['ido_id']) if user_attributes['ido_id'].present?
12
+ lead ||= Lead.find_by_email(user_attributes['email'])
13
+ if lead
14
+ occurence = ActiveSupport::Inflector.ordinalize(data['occurrences'])
15
+ message = "Error occurred in <strong>#{data['app_name']}</strong> [#{data['environment_name']}] (#{occurence} time): "
16
+ message << "<em>" << truncate(data['message'], :length => 75) << "</em>"
17
+ message << "<br />View the error at: #{data['url']}" if data['url']
18
+ lead.versions.create! :event => message
19
+ end
20
+ end
21
+ end
22
+
23
+ private
24
+
25
+ def data
26
+ params['data']
27
+ end
28
+
29
+ end
30
+ end
31
+ end
32
+ end
@@ -1,5 +1,5 @@
1
1
  module FatFreeCRM
2
2
  module Cloudfuji
3
- VERSION = '0.2.4'
3
+ VERSION = '0.2.5'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,82 +1,103 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: ffcrm_cloudfuji
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.5
4
5
  prerelease:
5
- version: 0.2.4
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Sean Grove
9
9
  - Nathan Broadbent
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
-
14
- date: 2012-05-28 00:00:00 Z
15
- dependencies:
16
- - !ruby/object:Gem::Dependency
13
+ date: 2012-05-28 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
17
16
  name: rspec-rails
18
- requirement: &id001 !ruby/object:Gem::Requirement
17
+ requirement: !ruby/object:Gem::Requirement
19
18
  none: false
20
- requirements:
19
+ requirements:
21
20
  - - ~>
22
- - !ruby/object:Gem::Version
23
- version: "2.6"
21
+ - !ruby/object:Gem::Version
22
+ version: '2.6'
24
23
  type: :development
25
24
  prerelease: false
26
- version_requirements: *id001
27
- - !ruby/object:Gem::Dependency
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ none: false
27
+ requirements:
28
+ - - ~>
29
+ - !ruby/object:Gem::Version
30
+ version: '2.6'
31
+ - !ruby/object:Gem::Dependency
28
32
  name: capybara
29
- requirement: &id002 !ruby/object:Gem::Requirement
33
+ requirement: !ruby/object:Gem::Requirement
30
34
  none: false
31
- requirements:
32
- - - ">="
33
- - !ruby/object:Gem::Version
34
- version: "0"
35
+ requirements:
36
+ - - ! '>='
37
+ - !ruby/object:Gem::Version
38
+ version: '0'
35
39
  type: :development
36
40
  prerelease: false
37
- version_requirements: *id002
38
- - !ruby/object:Gem::Dependency
41
+ version_requirements: !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ! '>='
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ - !ruby/object:Gem::Dependency
39
48
  name: combustion
40
- requirement: &id003 !ruby/object:Gem::Requirement
49
+ requirement: !ruby/object:Gem::Requirement
41
50
  none: false
42
- requirements:
43
- - - ">="
44
- - !ruby/object:Gem::Version
45
- version: "0"
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
46
55
  type: :development
47
56
  prerelease: false
48
- version_requirements: *id003
49
- - !ruby/object:Gem::Dependency
57
+ version_requirements: !ruby/object:Gem::Requirement
58
+ none: false
59
+ requirements:
60
+ - - ! '>='
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
63
+ - !ruby/object:Gem::Dependency
50
64
  name: cloudfuji
51
- requirement: &id004 !ruby/object:Gem::Requirement
65
+ requirement: !ruby/object:Gem::Requirement
52
66
  none: false
53
- requirements:
54
- - - ">="
55
- - !ruby/object:Gem::Version
67
+ requirements:
68
+ - - ! '>='
69
+ - !ruby/object:Gem::Version
56
70
  version: 0.0.42
57
71
  type: :runtime
58
72
  prerelease: false
59
- version_requirements: *id004
60
- - !ruby/object:Gem::Dependency
73
+ version_requirements: !ruby/object:Gem::Requirement
74
+ none: false
75
+ requirements:
76
+ - - ! '>='
77
+ - !ruby/object:Gem::Version
78
+ version: 0.0.42
79
+ - !ruby/object:Gem::Dependency
61
80
  name: authlogic_cloudfuji
62
- requirement: &id005 !ruby/object:Gem::Requirement
81
+ requirement: !ruby/object:Gem::Requirement
63
82
  none: false
64
- requirements:
83
+ requirements:
65
84
  - - ~>
66
- - !ruby/object:Gem::Version
67
- version: "0.9"
85
+ - !ruby/object:Gem::Version
86
+ version: '0.9'
68
87
  type: :runtime
69
88
  prerelease: false
70
- version_requirements: *id005
89
+ version_requirements: !ruby/object:Gem::Requirement
90
+ none: false
91
+ requirements:
92
+ - - ~>
93
+ - !ruby/object:Gem::Version
94
+ version: '0.9'
71
95
  description: Integrates Fat Free CRM with the Cloudfuji hosting platform.
72
96
  email: s@cloudfuji.com
73
97
  executables: []
74
-
75
98
  extensions: []
76
-
77
99
  extra_rdoc_files: []
78
-
79
- files:
100
+ files:
80
101
  - .gitignore
81
102
  - .travis.yml
82
103
  - Gemfile
@@ -113,6 +134,7 @@ files:
113
134
  - lib/fat_free_crm/cloudfuji/event_observers/app_observer.rb
114
135
  - lib/fat_free_crm/cloudfuji/event_observers/customer_observer.rb
115
136
  - lib/fat_free_crm/cloudfuji/event_observers/email_observer.rb
137
+ - lib/fat_free_crm/cloudfuji/event_observers/error_observer.rb
116
138
  - lib/fat_free_crm/cloudfuji/event_observers/event_rules_observer.rb
117
139
  - lib/fat_free_crm/cloudfuji/event_observers/payment_observer.rb
118
140
  - lib/fat_free_crm/cloudfuji/event_observers/user_observer.rb
@@ -132,36 +154,32 @@ files:
132
154
  - uninstall.rb
133
155
  homepage: http://cloudfuji.com
134
156
  licenses: []
135
-
136
157
  post_install_message:
137
158
  rdoc_options: []
138
-
139
- require_paths:
159
+ require_paths:
140
160
  - lib
141
- required_ruby_version: !ruby/object:Gem::Requirement
161
+ required_ruby_version: !ruby/object:Gem::Requirement
142
162
  none: false
143
- requirements:
144
- - - ">="
145
- - !ruby/object:Gem::Version
146
- hash: -1685074102180761932
147
- segments:
163
+ requirements:
164
+ - - ! '>='
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
167
+ segments:
148
168
  - 0
149
- version: "0"
150
- required_rubygems_version: !ruby/object:Gem::Requirement
169
+ hash: 1362757599666679150
170
+ required_rubygems_version: !ruby/object:Gem::Requirement
151
171
  none: false
152
- requirements:
153
- - - ">="
154
- - !ruby/object:Gem::Version
155
- hash: -1685074102180761932
156
- segments:
172
+ requirements:
173
+ - - ! '>='
174
+ - !ruby/object:Gem::Version
175
+ version: '0'
176
+ segments:
157
177
  - 0
158
- version: "0"
178
+ hash: 1362757599666679150
159
179
  requirements: []
160
-
161
180
  rubyforge_project:
162
- rubygems_version: 1.8.17
181
+ rubygems_version: 1.8.24
163
182
  signing_key:
164
183
  specification_version: 3
165
184
  summary: Fat Free CRM - Cloudfuji Integration
166
185
  test_files: []
167
-