insight_rails 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. data/README.md +43 -0
  2. data/Rakefile +15 -0
  3. data/VERSION +1 -0
  4. data/app/controllers/help/categories_controller.rb +11 -0
  5. data/app/controllers/help/comments_controller.rb +22 -0
  6. data/app/controllers/help/issues_controller.rb +53 -0
  7. data/app/controllers/help/sessions_controller.rb +40 -0
  8. data/app/controllers/help_controller.rb +10 -0
  9. data/app/controllers/insight_controller.rb +32 -0
  10. data/app/controllers/knowledge/article_categories_controller.rb +13 -0
  11. data/app/controllers/knowledge/articles_controller.rb +11 -0
  12. data/app/helpers/help/issues_helper.rb +15 -0
  13. data/app/models/article.rb +11 -0
  14. data/app/models/article_category.rb +11 -0
  15. data/app/models/category.rb +11 -0
  16. data/app/models/category_issue.rb +10 -0
  17. data/app/models/comment.rb +26 -0
  18. data/app/models/insight_user.rb +19 -0
  19. data/app/models/issue.rb +30 -0
  20. data/app/models/lead.rb +15 -0
  21. data/app/views/help/categories/index.html.erb +29 -0
  22. data/app/views/help/comments/_form.html.erb +25 -0
  23. data/app/views/help/index.html.erb +0 -0
  24. data/app/views/help/issues/_form.html.erb +43 -0
  25. data/app/views/help/issues/index.html.erb +42 -0
  26. data/app/views/help/issues/new.html.erb +3 -0
  27. data/app/views/help/issues/show.html.erb +39 -0
  28. data/app/views/help/sessions/new.html.erb +20 -0
  29. data/app/views/knowledge/article_categories/index.html.erb +16 -0
  30. data/app/views/knowledge/articles/show.html.erb +3 -0
  31. data/app/views/layouts/_insight_footer.html.erb +25 -0
  32. data/app/views/layouts/insight_layout.html.erb +56 -0
  33. data/config/routes.rb +42 -0
  34. data/generators/insight/insight_generator.rb +26 -0
  35. data/generators/insight/lib/insert_commands.rb +33 -0
  36. data/generators/insight/templates/README +0 -0
  37. data/generators/insight/templates/insight.rake +26 -0
  38. data/generators/insight/templates/insight.rb +7 -0
  39. data/generators/insight/templates/insight.sass +284 -0
  40. data/generators/insight/templates/migrations/link_users_to_crm_contacts.rb +13 -0
  41. data/lib/insight/configuration.rb +28 -0
  42. data/lib/insight/crm/callbacks/account.rb +39 -0
  43. data/lib/insight/crm/callbacks/user.rb +53 -0
  44. data/lib/insight/crm/models/account.rb +17 -0
  45. data/lib/insight/crm/models/contact.rb +17 -0
  46. data/lib/insight/multi_pass_attributes.rb +32 -0
  47. data/lib/insight.rb +3 -0
  48. metadata +140 -0
@@ -0,0 +1,32 @@
1
+ module Insight
2
+
3
+ module MultiPassAttributes
4
+
5
+ def self.included(base)
6
+ base.extend(ClassMethods)
7
+ end
8
+
9
+ def multipass
10
+ @multipass ||= self.class.multipass.encode({
11
+ :id => id,
12
+ :email => email,
13
+ :title => title,
14
+ :first_name => firstname,
15
+ :last_name => lastname,
16
+ :crm_id => crm_id,
17
+ :expires => 30.minutes.from_now
18
+ })
19
+ end
20
+
21
+ module ClassMethods
22
+
23
+ def multipass
24
+ # @multipass ||= MultiPass.new(FatFreeAuth.configuration.site_name, FatFreeAuth.configuration.secret)
25
+ @multipass ||= MultiPass.new('fatfree', 'abc')
26
+ end
27
+
28
+ end
29
+
30
+ end
31
+
32
+ end
data/lib/insight.rb ADDED
@@ -0,0 +1,3 @@
1
+ require "recaptcha/rails"
2
+ require "insight/configuration"
3
+ require "gravtastic"
metadata ADDED
@@ -0,0 +1,140 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: insight_rails
3
+ version: !ruby/object:Gem::Version
4
+ hash: 25
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 1
9
+ - 1
10
+ version: 0.1.1
11
+ platform: ruby
12
+ authors:
13
+ - Kieran Johnson
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2011-01-18 00:00:00 +00:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: recaptcha
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ hash: 3
30
+ segments:
31
+ - 0
32
+ version: "0"
33
+ type: :runtime
34
+ version_requirements: *id001
35
+ - !ruby/object:Gem::Dependency
36
+ name: gravtastic
37
+ prerelease: false
38
+ requirement: &id002 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ hash: 3
44
+ segments:
45
+ - 0
46
+ version: "0"
47
+ type: :runtime
48
+ version_requirements: *id002
49
+ description: Customer Support and Knowledge Base
50
+ email: support@invisiblelines.com
51
+ executables: []
52
+
53
+ extensions: []
54
+
55
+ extra_rdoc_files:
56
+ - README.md
57
+ files:
58
+ - README.md
59
+ - Rakefile
60
+ - VERSION
61
+ - app/controllers/help/categories_controller.rb
62
+ - app/controllers/help/comments_controller.rb
63
+ - app/controllers/help/issues_controller.rb
64
+ - app/controllers/help/sessions_controller.rb
65
+ - app/controllers/help_controller.rb
66
+ - app/controllers/insight_controller.rb
67
+ - app/controllers/knowledge/article_categories_controller.rb
68
+ - app/controllers/knowledge/articles_controller.rb
69
+ - app/helpers/help/issues_helper.rb
70
+ - app/models/article.rb
71
+ - app/models/article_category.rb
72
+ - app/models/category.rb
73
+ - app/models/category_issue.rb
74
+ - app/models/comment.rb
75
+ - app/models/insight_user.rb
76
+ - app/models/issue.rb
77
+ - app/models/lead.rb
78
+ - app/views/help/categories/index.html.erb
79
+ - app/views/help/comments/_form.html.erb
80
+ - app/views/help/index.html.erb
81
+ - app/views/help/issues/_form.html.erb
82
+ - app/views/help/issues/index.html.erb
83
+ - app/views/help/issues/new.html.erb
84
+ - app/views/help/issues/show.html.erb
85
+ - app/views/help/sessions/new.html.erb
86
+ - app/views/knowledge/article_categories/index.html.erb
87
+ - app/views/knowledge/articles/show.html.erb
88
+ - app/views/layouts/_insight_footer.html.erb
89
+ - app/views/layouts/insight_layout.html.erb
90
+ - config/routes.rb
91
+ - generators/insight/insight_generator.rb
92
+ - generators/insight/lib/insert_commands.rb
93
+ - generators/insight/templates/README
94
+ - generators/insight/templates/insight.rake
95
+ - generators/insight/templates/insight.rb
96
+ - generators/insight/templates/insight.sass
97
+ - generators/insight/templates/migrations/link_users_to_crm_contacts.rb
98
+ - lib/insight.rb
99
+ - lib/insight/configuration.rb
100
+ - lib/insight/crm/callbacks/account.rb
101
+ - lib/insight/crm/callbacks/user.rb
102
+ - lib/insight/crm/models/account.rb
103
+ - lib/insight/crm/models/contact.rb
104
+ - lib/insight/multi_pass_attributes.rb
105
+ has_rdoc: true
106
+ homepage: http://github.com/kieranj/insight
107
+ licenses: []
108
+
109
+ post_install_message:
110
+ rdoc_options: []
111
+
112
+ require_paths:
113
+ - lib
114
+ required_ruby_version: !ruby/object:Gem::Requirement
115
+ none: false
116
+ requirements:
117
+ - - ">="
118
+ - !ruby/object:Gem::Version
119
+ hash: 3
120
+ segments:
121
+ - 0
122
+ version: "0"
123
+ required_rubygems_version: !ruby/object:Gem::Requirement
124
+ none: false
125
+ requirements:
126
+ - - ">="
127
+ - !ruby/object:Gem::Version
128
+ hash: 3
129
+ segments:
130
+ - 0
131
+ version: "0"
132
+ requirements: []
133
+
134
+ rubyforge_project:
135
+ rubygems_version: 1.3.7
136
+ signing_key:
137
+ specification_version: 3
138
+ summary: Customer Support and Knowledge Base
139
+ test_files: []
140
+