Permalink
Browse files

InnoViz proj added

  • Loading branch information...
1 parent 629a01f commit 053395df8e6c5ab59fb4fc24210623d4eaea6e88 @prwteas prwteas committed Sep 3, 2012
Showing with 4,650 additions and 0 deletions.
  1. +76 −0 InnoViz/.gitignore
  2. +30 −0 InnoViz/Gemfile
  3. +240 −0 InnoViz/Gemfile.lock
  4. +3 −0 InnoViz/Procfile
  5. +19 −0 InnoViz/README
  6. +80 −0 InnoViz/README.textile
  7. +7 −0 InnoViz/Rakefile
  8. +16 −0 InnoViz/app/assets/javascripts/application.js
  9. +3 −0 InnoViz/app/assets/javascripts/companies.js.coffee
  10. +3 −0 InnoViz/app/assets/javascripts/gitusers.js.coffee
  11. +3 −0 InnoViz/app/assets/javascripts/groups.js.coffee
  12. +3 −0 InnoViz/app/assets/javascripts/home.js.coffee
  13. +3 −0 InnoViz/app/assets/javascripts/importcentral.js.coffee
  14. +3 −0 InnoViz/app/assets/javascripts/members.js.coffee
  15. +3 −0 InnoViz/app/assets/javascripts/positions.js.coffee
  16. +3 −0 InnoViz/app/assets/javascripts/topickeys.js.coffee
  17. +80 −0 InnoViz/app/assets/stylesheets/application.css.scss
  18. +3 −0 InnoViz/app/assets/stylesheets/bootstrap_and_overrides.css.scss
  19. +3 −0 InnoViz/app/assets/stylesheets/companies.css.scss
  20. +3 −0 InnoViz/app/assets/stylesheets/gitusers.css.scss
  21. +3 −0 InnoViz/app/assets/stylesheets/groups.css.scss
  22. +3 −0 InnoViz/app/assets/stylesheets/home.css.scss
  23. +27 −0 InnoViz/app/assets/stylesheets/importcentral.css.scss
  24. +21 −0 InnoViz/app/assets/stylesheets/members.css.scss
  25. +3 −0 InnoViz/app/assets/stylesheets/positions.css.scss
  26. +69 −0 InnoViz/app/assets/stylesheets/scaffolds.css.scss
  27. +38 −0 InnoViz/app/assets/stylesheets/topickeys.css.scss
  28. +33 −0 InnoViz/app/controllers/application_controller.rb
  29. +83 −0 InnoViz/app/controllers/companies_controller.rb
  30. +83 −0 InnoViz/app/controllers/gitusers_controller.rb
  31. +83 −0 InnoViz/app/controllers/groups_controller.rb
  32. +5 −0 InnoViz/app/controllers/home_controller.rb
  33. +6 −0 InnoViz/app/controllers/importcentral_controller.rb
  34. +85 −0 InnoViz/app/controllers/members_controller.rb
  35. +83 −0 InnoViz/app/controllers/positions_controller.rb
  36. +30 −0 InnoViz/app/controllers/sessions_controller.rb
  37. +107 −0 InnoViz/app/controllers/topickeys_controller.rb
  38. +27 −0 InnoViz/app/controllers/users_controller.rb
  39. +5 −0 InnoViz/app/helpers/application_helper.rb
  40. +2 −0 InnoViz/app/helpers/companies_helper.rb
  41. +2 −0 InnoViz/app/helpers/gitusers_helper.rb
  42. +2 −0 InnoViz/app/helpers/groups_helper.rb
  43. +2 −0 InnoViz/app/helpers/home_helper.rb
  44. +2 −0 InnoViz/app/helpers/importcentral_helper.rb
  45. +2 −0 InnoViz/app/helpers/members_helper.rb
  46. +2 −0 InnoViz/app/helpers/positions_helper.rb
  47. +2 −0 InnoViz/app/helpers/topickeys_helper.rb
  48. 0 InnoViz/app/mailers/.gitkeep
  49. 0 InnoViz/app/models/.gitkeep
  50. +72 −0 InnoViz/app/models/company.rb
  51. +49 −0 InnoViz/app/models/gituser.rb
  52. +50 −0 InnoViz/app/models/group.rb
  53. +55 −0 InnoViz/app/models/linkedin_position.rb
  54. +114 −0 InnoViz/app/models/meetup.rb
  55. +76 −0 InnoViz/app/models/meetup_group.rb
  56. +12 −0 InnoViz/app/models/meetup_member.rb
  57. +192 −0 InnoViz/app/models/member.rb
  58. +30 −0 InnoViz/app/models/position.rb
  59. +21 −0 InnoViz/app/models/stream.rb
  60. +41 −0 InnoViz/app/models/topickey.rb
  61. +41 −0 InnoViz/app/models/topictag.rb
  62. +36 −0 InnoViz/app/models/tweeter_id.rb
  63. +22 −0 InnoViz/app/models/user.rb
  64. +31 −0 InnoViz/app/views/companies/_form.html.haml
  65. +7 −0 InnoViz/app/views/companies/edit.html.haml
  66. +65 −0 InnoViz/app/views/companies/index.html.haml
  67. +5 −0 InnoViz/app/views/companies/new.html.haml
  68. +78 −0 InnoViz/app/views/companies/show.html.haml
  69. +19 −0 InnoViz/app/views/gitusers/_form.html.haml
  70. +7 −0 InnoViz/app/views/gitusers/edit.html.haml
  71. +41 −0 InnoViz/app/views/gitusers/index.html.haml
  72. +5 −0 InnoViz/app/views/gitusers/new.html.haml
  73. +45 −0 InnoViz/app/views/gitusers/show.html.haml
  74. +24 −0 InnoViz/app/views/groups/_form.html.haml
  75. +7 −0 InnoViz/app/views/groups/edit.html.haml
  76. +55 −0 InnoViz/app/views/groups/index.html.haml
  77. +5 −0 InnoViz/app/views/groups/new.html.haml
  78. +64 −0 InnoViz/app/views/groups/show.html.haml
  79. +4 −0 InnoViz/app/views/home/index.html.haml
  80. +61 −0 InnoViz/app/views/importcentral/index.html.haml
  81. +10 −0 InnoViz/app/views/kaminari/_first_page.html.haml
  82. +8 −0 InnoViz/app/views/kaminari/_gap.html.haml
  83. +9 −0 InnoViz/app/views/kaminari/_last_page.html.haml
  84. +9 −0 InnoViz/app/views/kaminari/_next_page.html.haml
  85. +10 −0 InnoViz/app/views/kaminari/_page.html.haml
  86. +18 −0 InnoViz/app/views/kaminari/_paginator.html.haml
  87. +9 −0 InnoViz/app/views/kaminari/_prev_page.html.haml
  88. +4 −0 InnoViz/app/views/layouts/_messages.html.haml
  89. +22 −0 InnoViz/app/views/layouts/_navigation.html.haml
  90. +28 −0 InnoViz/app/views/layouts/application.html.haml
  91. +21 −0 InnoViz/app/views/members/_form.html.haml
  92. +7 −0 InnoViz/app/views/members/edit.html.haml
  93. +45 −0 InnoViz/app/views/members/index.html.haml
  94. +5 −0 InnoViz/app/views/members/new.html.haml
  95. +63 −0 InnoViz/app/views/members/show.html.haml
  96. +14 −0 InnoViz/app/views/positions/_form.html.haml
  97. +7 −0 InnoViz/app/views/positions/edit.html.haml
  98. +31 −0 InnoViz/app/views/positions/index.html.haml
  99. +5 −0 InnoViz/app/views/positions/new.html.haml
  100. +27 −0 InnoViz/app/views/positions/show.html.haml
  101. +11 −0 InnoViz/app/views/topickeys/_form.html.haml
  102. +5 −0 InnoViz/app/views/topickeys/_nav.html.haml
  103. +7 −0 InnoViz/app/views/topickeys/edit.html.haml
  104. +24 −0 InnoViz/app/views/topickeys/filtered.html.haml
  105. +26 −0 InnoViz/app/views/topickeys/index.html.haml
  106. +5 −0 InnoViz/app/views/topickeys/new.html.haml
  107. +21 −0 InnoViz/app/views/topickeys/show.html.haml
  108. +19 −0 InnoViz/app/views/topickeys/tags.html.haml
  109. +5 −0 InnoViz/app/views/users/edit.html.haml
  110. +6 −0 InnoViz/app/views/users/index.html.haml
  111. +5 −0 InnoViz/app/views/users/show.html.haml
  112. +4 −0 InnoViz/config.ru
  113. +70 −0 InnoViz/config/application.rb
  114. +6 −0 InnoViz/config/boot.rb
  115. +5 −0 InnoViz/config/environment.rb
  116. +31 −0 InnoViz/config/environments/development.rb
  117. +64 −0 InnoViz/config/environments/production.rb
  118. +35 −0 InnoViz/config/environments/test.rb
  119. +7 −0 InnoViz/config/initializers/backtrace_silencers.rb
  120. +2 −0 InnoViz/config/initializers/generators.rb
  121. +15 −0 InnoViz/config/initializers/inflections.rb
  122. +9 −0 InnoViz/config/initializers/kaminari_config.rb
  123. +5 −0 InnoViz/config/initializers/mime_types.rb
  124. +3 −0 InnoViz/config/initializers/omniauth.rb
  125. +1 −0 InnoViz/config/initializers/resque.rb
  126. +1 −0 InnoViz/config/initializers/rmeetup.rb
  127. +7 −0 InnoViz/config/initializers/secret_token.rb
  128. +8 −0 InnoViz/config/initializers/session_store.rb
  129. +178 −0 InnoViz/config/initializers/simple_form.rb
  130. +14 −0 InnoViz/config/initializers/tweetstream.rb
  131. +10 −0 InnoViz/config/initializers/wrap_parameters.rb
  132. +12 −0 InnoViz/config/locales/en.yml
  133. +26 −0 InnoViz/config/locales/simple_form.en.yml
  134. +68 −0 InnoViz/config/mongoid.yml
  135. +27 −0 InnoViz/config/routes.rb
  136. BIN InnoViz/data/game_companies.xls
  137. BIN InnoViz/data/innovation_awards_database.xls
  138. +1 −0 InnoViz/data/users.json
  139. +7 −0 InnoViz/db/seeds.rb
  140. 0 InnoViz/lib/assets/.gitkeep
  141. 0 InnoViz/lib/tasks/.gitkeep
  142. +1 −0 InnoViz/lib/tasks/resqu.rake
  143. +1 −0 InnoViz/lib/tasks/resque.rake
  144. +10 −0 InnoViz/lib/templates/haml/scaffold/_form.html.haml
  145. +26 −0 InnoViz/public/404.html
  146. +26 −0 InnoViz/public/422.html
  147. +25 −0 InnoViz/public/500.html
  148. 0 InnoViz/public/favicon.ico
  149. +20 −0 InnoViz/public/humans.txt
  150. +5 −0 InnoViz/public/robots.txt
  151. +6 −0 InnoViz/script/rails
  152. +30 −0 InnoViz/test/factories/companies.rb
  153. +18 −0 InnoViz/test/factories/gitusers.rb
  154. +23 −0 InnoViz/test/factories/groups.rb
  155. +6 −0 InnoViz/test/factories/linkedin_positions.rb
  156. +6 −0 InnoViz/test/factories/meetup_groups.rb
  157. +6 −0 InnoViz/test/factories/meetup_members.rb
  158. +6 −0 InnoViz/test/factories/meetups.rb
  159. +20 −0 InnoViz/test/factories/members.rb
  160. +13 −0 InnoViz/test/factories/positions.rb
  161. +6 −0 InnoViz/test/factories/streams.rb
  162. +10 −0 InnoViz/test/factories/topickeys.rb
  163. +6 −0 InnoViz/test/factories/topictags.rb
  164. +6 −0 InnoViz/test/factories/tweeter_ids.rb
  165. 0 InnoViz/test/fixtures/.gitkeep
  166. 0 InnoViz/test/functional/.gitkeep
  167. +49 −0 InnoViz/test/functional/companies_controller_test.rb
  168. +49 −0 InnoViz/test/functional/gitusers_controller_test.rb
  169. +49 −0 InnoViz/test/functional/groups_controller_test.rb
  170. +9 −0 InnoViz/test/functional/home_controller_test.rb
  171. +9 −0 InnoViz/test/functional/importcentral_controller_test.rb
  172. +49 −0 InnoViz/test/functional/members_controller_test.rb
  173. +49 −0 InnoViz/test/functional/positions_controller_test.rb
  174. +49 −0 InnoViz/test/functional/topickeys_controller_test.rb
  175. 0 InnoViz/test/integration/.gitkeep
  176. +12 −0 InnoViz/test/performance/browsing_test.rb
  177. +7 −0 InnoViz/test/test_helper.rb
  178. 0 InnoViz/test/unit/.gitkeep
  179. +7 −0 InnoViz/test/unit/company_test.rb
  180. +7 −0 InnoViz/test/unit/gituser_test.rb
  181. +7 −0 InnoViz/test/unit/group_test.rb
  182. +4 −0 InnoViz/test/unit/helpers/companies_helper_test.rb
  183. +4 −0 InnoViz/test/unit/helpers/gitusers_helper_test.rb
  184. +4 −0 InnoViz/test/unit/helpers/groups_helper_test.rb
  185. +4 −0 InnoViz/test/unit/helpers/home_helper_test.rb
  186. +4 −0 InnoViz/test/unit/helpers/importcentral_helper_test.rb
  187. +4 −0 InnoViz/test/unit/helpers/members_helper_test.rb
  188. +4 −0 InnoViz/test/unit/helpers/positions_helper_test.rb
  189. +4 −0 InnoViz/test/unit/helpers/topickeys_helper_test.rb
  190. +7 −0 InnoViz/test/unit/linkedin_position_test.rb
  191. +17 −0 InnoViz/test/unit/meetup_group_test.rb
  192. +7 −0 InnoViz/test/unit/meetup_member_test.rb
  193. +62 −0 InnoViz/test/unit/meetup_test.rb
  194. +26 −0 InnoViz/test/unit/member_test.rb
  195. +7 −0 InnoViz/test/unit/position_test.rb
  196. +7 −0 InnoViz/test/unit/stream_test.rb
  197. +13 −0 InnoViz/test/unit/topickey_test.rb
  198. +7 −0 InnoViz/test/unit/topictag_test.rb
  199. +7 −0 InnoViz/test/unit/tweeter_id_test.rb
  200. 0 InnoViz/vendor/assets/javascripts/.gitkeep
  201. 0 InnoViz/vendor/assets/stylesheets/.gitkeep
  202. 0 InnoViz/vendor/plugins/.gitkeep
View
76 InnoViz/.gitignore
@@ -0,0 +1,76 @@
+#----------------------------------------------------------------------------
+# Ignore these files when commiting to a git repository.
+#
+# See http://help.github.com/ignore-files/ for more about ignoring files.
+#
+# The original version of this file is found here:
+# https://github.com/RailsApps/rails3-application-templates/raw/master/files/gitignore.txt
+#
+# Corrections? Improvements? Create a GitHub issue:
+# http://github.com/RailsApps/rails3-application-templates/issues
+#----------------------------------------------------------------------------
+
+# bundler state
+/.bundle
+/vendor/bundle/
+
+# minimal Rails specific artifacts
+db/*.sqlite3
+/log/*
+/tmp/*
+
+# various artifacts
+**.war
+*.rbc
+*.sassc
+.rspec
+.redcar/
+.sass-cache
+/config/config.yml
+/config/database.yml
+/coverage.data
+/coverage/
+/db/*.javadb/
+/db/*.sqlite3
+/doc/api/
+/doc/app/
+/doc/features.html
+/doc/specs.html
+/public/cache
+/public/stylesheets/compiled
+/public/system/*
+/spec/tmp/*
+/cache
+/capybara*
+/capybara-*.html
+/gems
+/spec/requests
+/spec/routing
+/spec/views
+/specifications
+rerun.txt
+pickle-email-*.html
+
+# If you find yourself ignoring temporary files generated by your text editor
+# or operating system, you probably want to add a global ignore instead:
+# git config --global core.excludesfile ~/.gitignore_global
+#
+# Here are some files you may want to ignore globally:
+
+# scm revert files
+**.orig
+
+# Mac finder artifacts
+.DS_Store
+
+# Netbeans project directory
+/nbproject/
+
+# RubyMine project files
+.idea
+
+# Textmate project files
+/*.tmproj
+
+# vim artifacts
+**.swp
View
30 InnoViz/Gemfile
@@ -0,0 +1,30 @@
+source 'https://rubygems.org'
+gem 'rails', '3.2.8'
+group :assets do
+ gem 'sass-rails', '~> 3.2.3'
+ gem 'coffee-rails', '~> 3.2.1'
+ gem 'uglifier', '>= 1.0.3'
+end
+gem 'jquery-rails'
+gem "thin", ">= 1.4.1"
+gem "mongoid", ">= 3.0.3"
+gem 'kaminari'
+gem "haml", ">= 3.1.7"
+gem "haml-rails", ">= 0.3.4", :group => :development
+gem "hpricot", ">= 0.8.6", :group => :development
+gem "ruby_parser", ">= 2.3.1", :group => :development
+gem "factory_girl_rails", ">= 4.0.0", :group => [:development, :test]
+gem "bootstrap-sass", ">= 2.0.4.0"
+gem "omniauth", ">= 1.1.0"
+gem "omniauth-twitter"
+gem "simple_form"
+gem 'rMeetup','1.0', :git=>'git://github.com/prwteas/rmeetup.git'
+gem 'pry-rails'
+gem 'curb'
+gem 'resque'
+gem 'foreman'
+gem 'batch_factory'
+gem 'linkedin'
+gem 'tabler'
+gem 'twitter'
+gem 'tweetstream'
View
240 InnoViz/Gemfile.lock
@@ -0,0 +1,240 @@
+GIT
+ remote: git://github.com/prwteas/rmeetup.git
+ revision: 909a2ebe5fd2b51f45b8f31d8adb13dfb578fb37
+ specs:
+ rMeetup (1.0)
+
+GEM
+ remote: https://rubygems.org/
+ specs:
+ actionmailer (3.2.8)
+ actionpack (= 3.2.8)
+ mail (~> 2.4.4)
+ actionpack (3.2.8)
+ activemodel (= 3.2.8)
+ activesupport (= 3.2.8)
+ builder (~> 3.0.0)
+ erubis (~> 2.7.0)
+ journey (~> 1.0.4)
+ rack (~> 1.4.0)
+ rack-cache (~> 1.2)
+ rack-test (~> 0.6.1)
+ sprockets (~> 2.1.3)
+ activemodel (3.2.8)
+ activesupport (= 3.2.8)
+ builder (~> 3.0.0)
+ activerecord (3.2.8)
+ activemodel (= 3.2.8)
+ activesupport (= 3.2.8)
+ arel (~> 3.0.2)
+ tzinfo (~> 0.3.29)
+ activeresource (3.2.8)
+ activemodel (= 3.2.8)
+ activesupport (= 3.2.8)
+ activesupport (3.2.8)
+ i18n (~> 0.6)
+ multi_json (~> 1.0)
+ arel (3.0.2)
+ batch_factory (0.0.2)
+ activesupport
+ spreadsheet (~> 0.7)
+ bootstrap-sass (2.0.4.0)
+ builder (3.0.0)
+ coderay (1.0.7)
+ coffee-rails (3.2.2)
+ coffee-script (>= 2.2.0)
+ railties (~> 3.2.0)
+ coffee-script (2.2.0)
+ coffee-script-source
+ execjs
+ coffee-script-source (1.3.3)
+ curb (0.8.1)
+ daemons (1.1.9)
+ erubis (2.7.0)
+ eventmachine (0.12.10)
+ execjs (1.4.0)
+ multi_json (~> 1.0)
+ factory_girl (4.0.0)
+ activesupport (>= 3.0.0)
+ factory_girl_rails (4.0.0)
+ factory_girl (~> 4.0.0)
+ railties (>= 3.0.0)
+ faraday (0.8.4)
+ multipart-post (~> 1.1)
+ foreman (0.57.0)
+ thor (>= 0.13.6)
+ haml (3.1.7)
+ haml-rails (0.3.4)
+ actionpack (~> 3.0)
+ activesupport (~> 3.0)
+ haml (~> 3.0)
+ railties (~> 3.0)
+ hashie (1.2.0)
+ hike (1.2.1)
+ hpricot (0.8.6)
+ http_parser.rb (0.5.3)
+ i18n (0.6.0)
+ journey (1.0.4)
+ jquery-rails (2.1.1)
+ railties (>= 3.1.0, < 5.0)
+ thor (~> 0.14)
+ json (1.7.5)
+ kaminari (0.13.0)
+ actionpack (>= 3.0.0)
+ activesupport (>= 3.0.0)
+ railties (>= 3.0.0)
+ linkedin (0.3.7)
+ hashie (~> 1.2)
+ multi_json (~> 1.0)
+ oauth (~> 0.4)
+ mail (2.4.4)
+ i18n (>= 0.4.0)
+ mime-types (~> 1.16)
+ treetop (~> 1.4.8)
+ method_source (0.8)
+ mime-types (1.19)
+ mongoid (3.0.4)
+ activemodel (~> 3.1)
+ moped (~> 1.1)
+ origin (~> 1.0)
+ tzinfo (~> 0.3.22)
+ moped (1.2.0)
+ multi_json (1.3.6)
+ multipart-post (1.1.5)
+ oauth (0.4.6)
+ omniauth (1.1.0)
+ hashie (~> 1.2)
+ rack
+ omniauth-oauth (1.0.1)
+ oauth
+ omniauth (~> 1.0)
+ omniauth-twitter (0.0.12)
+ multi_json (~> 1.3)
+ omniauth-oauth (~> 1.0)
+ origin (1.0.6)
+ polyglot (0.3.3)
+ pry (0.9.10)
+ coderay (~> 1.0.5)
+ method_source (~> 0.8)
+ slop (~> 3.3.1)
+ pry-rails (0.2.1)
+ pry (>= 0.9.10)
+ rack (1.4.1)
+ rack-cache (1.2)
+ rack (>= 0.4)
+ rack-protection (1.2.0)
+ rack
+ rack-ssl (1.3.2)
+ rack
+ rack-test (0.6.1)
+ rack (>= 1.0)
+ rails (3.2.8)
+ actionmailer (= 3.2.8)
+ actionpack (= 3.2.8)
+ activerecord (= 3.2.8)
+ activeresource (= 3.2.8)
+ activesupport (= 3.2.8)
+ bundler (~> 1.0)
+ railties (= 3.2.8)
+ railties (3.2.8)
+ actionpack (= 3.2.8)
+ activesupport (= 3.2.8)
+ rack-ssl (~> 1.3.2)
+ rake (>= 0.8.7)
+ rdoc (~> 3.4)
+ thor (>= 0.14.6, < 2.0)
+ rake (0.9.2.2)
+ rdoc (3.12)
+ json (~> 1.4)
+ redis (3.0.1)
+ redis-namespace (1.2.1)
+ redis (~> 3.0.0)
+ resque (1.22.0)
+ multi_json (~> 1.0)
+ redis-namespace (~> 1.0)
+ sinatra (>= 0.9.2)
+ vegas (~> 0.1.2)
+ ruby-ole (1.2.11.4)
+ ruby_parser (2.3.1)
+ sexp_processor (~> 3.0)
+ sass (3.2.1)
+ sass-rails (3.2.5)
+ railties (~> 3.2.0)
+ sass (>= 3.1.10)
+ tilt (~> 1.3)
+ sexp_processor (3.2.0)
+ simple_form (2.0.2)
+ actionpack (~> 3.0)
+ activemodel (~> 3.0)
+ simple_oauth (0.1.9)
+ sinatra (1.3.3)
+ rack (~> 1.3, >= 1.3.6)
+ rack-protection (~> 1.2)
+ tilt (~> 1.3, >= 1.3.3)
+ slop (3.3.2)
+ spreadsheet (0.7.3)
+ ruby-ole (>= 1.0)
+ sprockets (2.1.3)
+ hike (~> 1.2)
+ rack (~> 1.0)
+ tilt (~> 1.1, != 1.3.0)
+ tabler (0.0.3)
+ thin (1.4.1)
+ daemons (>= 1.0.9)
+ eventmachine (>= 0.12.6)
+ rack (>= 1.0.0)
+ thor (0.16.0)
+ tilt (1.3.3)
+ treetop (1.4.10)
+ polyglot
+ polyglot (>= 0.3.1)
+ tweetstream (1.1.5)
+ daemons (~> 1.1)
+ multi_json (~> 1.3)
+ twitter-stream (>= 0.1.14, < 1)
+ twitter (3.7.0)
+ faraday (~> 0.8)
+ multi_json (~> 1.3)
+ simple_oauth (~> 0.1.6)
+ twitter-stream (0.1.16)
+ eventmachine (>= 0.12.8)
+ http_parser.rb (~> 0.5.1)
+ simple_oauth (~> 0.1.4)
+ tzinfo (0.3.33)
+ uglifier (1.2.7)
+ execjs (>= 0.3.0)
+ multi_json (~> 1.3)
+ vegas (0.1.11)
+ rack (>= 1.0.0)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ batch_factory
+ bootstrap-sass (>= 2.0.4.0)
+ coffee-rails (~> 3.2.1)
+ curb
+ factory_girl_rails (>= 4.0.0)
+ foreman
+ haml (>= 3.1.7)
+ haml-rails (>= 0.3.4)
+ hpricot (>= 0.8.6)
+ jquery-rails
+ kaminari
+ linkedin
+ mongoid (>= 3.0.3)
+ omniauth (>= 1.1.0)
+ omniauth-twitter
+ pry-rails
+ rMeetup (= 1.0)!
+ rails (= 3.2.8)
+ resque
+ ruby_parser (>= 2.3.1)
+ sass-rails (~> 3.2.3)
+ simple_form
+ tabler
+ thin (>= 1.4.1)
+ tweetstream
+ twitter
+ uglifier (>= 1.0.3)
View
3 InnoViz/Procfile
@@ -0,0 +1,3 @@
+web: bundle exec rails s -p $PORT
+redis: redis-server /usr/local/etc/redis.conf
+resque: bundle exec rake resque:work QUEUE=*
View
19 InnoViz/README
@@ -0,0 +1,19 @@
+Innoviz
+========================
+
+This application was generated with the rails_apps_composer gem:
+https://github.com/RailsApps/rails_apps_composer
+provided by the RailsApps Project:
+http://railsapps.github.com/
+
+________________________
+
+Recipes:
+["auth", "controllers", "core", "email", "extras", "frontend", "gems", "git", "init", "models", "railsapps", "readme", "routes", "setup", "testing", "views"]
+
+Preferences:
+{:git=>true, :railsapps=>"none", :dev_webserver=>"thin", :prod_webserver=>"thin", :database=>"mongodb", :orm=>"mongoid", :templates=>"haml", :unit_test=>"test_unit", :integration=>"none", :fixtures=>"factory_girl", :frontend=>"bootstrap", :bootstrap=>"sass", :email=>"none", :authentication=>"omniauth", :omniauth_provider=>"twitter", :authorization=>"none", :starter_app=>"users_app", :form_builder=>"simple_form", :ban_spiders=>true}
+
+________________________
+
+License
View
80 InnoViz/README.textile
@@ -0,0 +1,80 @@
+h1. Innoviz
+
+This application was generated with the "rails_apps_composer":https://github.com/RailsApps/rails_apps_composer gem provided by the "RailsApps Project":http://railsapps.github.com/.
+
+h2. Diagnostics
+
+This application was built with recipes that are NOT known to work together.
+
+This application was built with preferences that are NOT known to work together.
+
+If the application doesn't work as expected, please "report an issue":https://github.com/RailsApps/rails_apps_composer/issues and include these diagnostics:
+
+We'd also like to know if you've found combinations of recipes or preferences that do work together.
+
+Recipes:
+["auth", "controllers", "core", "email", "extras", "frontend", "gems", "git", "init", "models", "railsapps", "readme", "routes", "setup", "testing", "views"]
+
+Preferences:
+{:git=>true, :railsapps=>"none", :dev_webserver=>"thin", :prod_webserver=>"thin", :database=>"mongodb", :orm=>"mongoid", :templates=>"haml", :unit_test=>"test_unit", :integration=>"none", :fixtures=>"factory_girl", :frontend=>"bootstrap", :bootstrap=>"sass", :email=>"none", :authentication=>"omniauth", :omniauth_provider=>"twitter", :authorization=>"none", :starter_app=>"users_app", :form_builder=>"simple_form", :ban_spiders=>true}
+
+h2. Ruby on Rails
+
+This application requires:
+
+* Ruby version 1.9.3
+* Rails version 3.2.8
+
+Learn more about "Installing Rails":http://railsapps.github.com/installing-rails.html.
+
+h2. Database
+
+This application uses MongoDB with the Mongoid ORM.
+
+h2. Development
+
+* Template Engine: Haml
+* Testing Framework: Test::Unit
+* Front-end Framework: Twitter Bootstrap (Sass)
+* Form Builder: SimpleForm
+* Authentication: OmniAuth
+* Authorization: None
+
+
+
+
+
+h2. Getting Started
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit.
+
+h2. Documentation and Support
+
+This is the only documentation.
+
+h4. Issues
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit.
+
+h2. Similar Projects
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit.
+
+h2. Contributing
+
+If you make improvements to this application, please share with others.
+
+* Fork the project on GitHub.
+* Make your feature addition or bug fix.
+* Commit with Git.
+* Send the author a pull request.
+
+If you add functionality to this application, create an alternative implementation, or build an application that is similar, please contact me and I'll add a note to the README so that others can find your work.
+
+h2. Credits
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit.
+
+h2. License
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit.
View
7 InnoViz/Rakefile
@@ -0,0 +1,7 @@
+#!/usr/bin/env rake
+# Add your own tasks in files placed in lib/tasks ending in .rake,
+# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
+
+require File.expand_path('../config/application', __FILE__)
+
+InnoViz::Application.load_tasks
View
16 InnoViz/app/assets/javascripts/application.js
@@ -0,0 +1,16 @@
+// This is a manifest file that'll be compiled into application.js, which will include all the files
+// listed below.
+//
+// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
+// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
+//
+// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
+// the compiled file.
+//
+// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
+// GO AFTER THE REQUIRES BELOW.
+//
+//= require jquery
+//= require jquery_ujs
+//= require bootstrap
+//= require_tree .
View
3 InnoViz/app/assets/javascripts/companies.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
View
3 InnoViz/app/assets/javascripts/gitusers.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
View
3 InnoViz/app/assets/javascripts/groups.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
View
3 InnoViz/app/assets/javascripts/home.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
View
3 InnoViz/app/assets/javascripts/importcentral.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
View
3 InnoViz/app/assets/javascripts/members.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
View
3 InnoViz/app/assets/javascripts/positions.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
View
3 InnoViz/app/assets/javascripts/topickeys.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
View
80 InnoViz/app/assets/stylesheets/application.css.scss
@@ -0,0 +1,80 @@
+/*
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
+ * listed below.
+ *
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
+ * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
+ *
+ * You're free to add application-wide styles to this file and they'll appear at the top of the
+ * compiled file, but it's generally better to create a new file per style scope.
+ *
+ *= require_self
+ *= require_tree .
+*/
+
+.content {
+ background-color: #eee;
+ padding: 20px;
+ margin: 0 -20px; /* negative indent the amount of the padding to maintain the grid system */
+ -webkit-border-radius: 0 0 6px 6px;
+ -moz-border-radius: 0 0 6px 6px;
+ border-radius: 0 0 6px 6px;
+ -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.15);
+ -moz-box-shadow: 0 1px 2px rgba(0,0,0,.15);
+ box-shadow: 0 1px 2px rgba(0,0,0,.15);
+}
+
+
+.photo{
+ position:relative;
+ width:100px;
+ height:100px;
+ float:left;
+}
+
+.name {
+ position: relative;
+ float:right;
+ height:100px;
+}
+
+.container {
+ padding-left: 20px;
+ position: relative;
+ float:left;
+}
+.flickr_pagination {
+ text-align: left;
+ padding: 0.3em;
+ cursor: default;
+ a, span, em {
+ padding: 0.2em 0.5em; }
+ .disabled {
+ color: #aaaaaa; }
+ .current {
+ font-style: normal;
+ font-weight: bold;
+ color: green;
+ font-size: 15px;
+ border-bottom: 1px solid black;
+ border-top: 1px solid black;
+ text-align: center;
+ padding-right:0.2em;}
+ a {
+ border: 1px solid #dddddd;
+ color: #0063dc;
+ text-decoration: none;
+ &:hover, &:focus {
+ border-color: #003366;
+ background: #0063dc;
+ color: white;
+ text-decoration: none; } }
+ .page_info {
+ color: #aaaaaa;
+ padding-top: 0.8em; }
+ .previous_page, .next_page {
+ border-width: 2px; }
+ .previous_page {
+ margin-right: 1em; }
+ .next_page {
+ margin-left: 1em; } }
View
3 InnoViz/app/assets/stylesheets/bootstrap_and_overrides.css.scss
@@ -0,0 +1,3 @@
+@import "bootstrap";
+body { padding-top: 60px; }
+@import "bootstrap-responsive";
View
3 InnoViz/app/assets/stylesheets/companies.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the Companies controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
View
3 InnoViz/app/assets/stylesheets/gitusers.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the Gitusers controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
View
3 InnoViz/app/assets/stylesheets/groups.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the Groups controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
View
3 InnoViz/app/assets/stylesheets/home.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the home controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
View
27 InnoViz/app/assets/stylesheets/importcentral.css.scss
@@ -0,0 +1,27 @@
+// Place all the styles related to the importcentral controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
+
+td.comments {
+ position: relative;
+ margin-left:5px;
+ padding-left:5px;
+ border-left: solid 1px black;
+}
+
+thead {
+ border-bottom: solid 2px black;
+}
+
+tfoot {
+ border-top: solid 2px black;
+ tr {
+ border-bottom: none;
+ }
+}
+
+tbody {
+ tr {
+ border-bottom: 1px solid black;
+ }
+}
View
21 InnoViz/app/assets/stylesheets/members.css.scss
@@ -0,0 +1,21 @@
+// Place all the styles related to the Members controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
+.photo{
+ position:relative;
+ width:100px;
+ height:100px;
+ float:left;
+}
+
+.name {
+ position: relative;
+ float:right;
+ height:100px;
+}
+
+.container {
+ padding-left: 20px;
+ position: relative;
+ float:left;
+}
View
3 InnoViz/app/assets/stylesheets/positions.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the Positions controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
View
69 InnoViz/app/assets/stylesheets/scaffolds.css.scss
@@ -0,0 +1,69 @@
+body {
+ background-color: #fff;
+ color: #333;
+ font-family: verdana, arial, helvetica, sans-serif;
+ font-size: 13px;
+ line-height: 18px;
+}
+
+p, ol, ul, td {
+ font-family: verdana, arial, helvetica, sans-serif;
+ font-size: 13px;
+ line-height: 18px;
+}
+
+pre {
+ background-color: #eee;
+ padding: 10px;
+ font-size: 11px;
+}
+
+a {
+ color: #000;
+ &:visited {
+ color: #666;
+ }
+ &:hover {
+ color: #fff;
+ background-color: #000;
+ }
+}
+
+div {
+ &.field, &.actions {
+ margin-bottom: 10px;
+ }
+}
+
+#notice {
+ color: green;
+}
+
+.field_with_errors {
+ padding: 2px;
+ background-color: red;
+ display: table;
+}
+
+#error_explanation {
+ width: 450px;
+ border: 2px solid red;
+ padding: 7px;
+ padding-bottom: 0;
+ margin-bottom: 20px;
+ background-color: #f0f0f0;
+ h2 {
+ text-align: left;
+ font-weight: bold;
+ padding: 5px 5px 5px 15px;
+ font-size: 12px;
+ margin: -7px;
+ margin-bottom: 0px;
+ background-color: #c00;
+ color: #fff;
+ }
+ ul li {
+ font-size: 12px;
+ list-style: square;
+ }
+}
View
38 InnoViz/app/assets/stylesheets/topickeys.css.scss
@@ -0,0 +1,38 @@
+// Place all the styles related to the Topickeys controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
+
+.menu_box {
+ position:relative;
+ width:101px;
+ height:auto;
+ //background: white;
+ float:left;
+ margin-right:10px;
+ ul.menu {
+ position:relative;
+ width:90px;
+ padding: 2px;
+ margin: 2px;
+ height:100%;
+ float:left;
+ margin-left: 10px;
+ //background: white;
+ li {
+ list-style: none;
+ width:90px;
+ text-align: center;
+ margin:4px;
+ padding:2px;
+ &:hover {
+ background: black;
+ text-decoration: none;
+ border:-2px solid red;
+ }
+ a,a:link {
+ color: green;
+ text-decoration: none;
+ }
+ }
+ }
+}
View
33 InnoViz/app/controllers/application_controller.rb
@@ -0,0 +1,33 @@
+class ApplicationController < ActionController::Base
+ protect_from_forgery
+ helper_method :current_user
+ helper_method :user_signed_in?
+ helper_method :correct_user?
+
+ private
+ def current_user
+ begin
+ @current_user ||= User.find(session[:user_id]) if session[:user_id]
+ rescue Mongoid::Errors::DocumentNotFound
+ nil
+ end
+ end
+
+ def user_signed_in?
+ return true if current_user
+ end
+
+ def correct_user?
+ @user = User.find(params[:id])
+ unless current_user == @user
+ redirect_to root_url, :alert => "Access denied."
+ end
+ end
+
+ def authenticate_user!
+ if !current_user
+ redirect_to root_url, :alert => 'You need to sign in for access to this page.'
+ end
+ end
+
+end
View
83 InnoViz/app/controllers/companies_controller.rb
@@ -0,0 +1,83 @@
+class CompaniesController < ApplicationController
+ # GET /companies
+ # GET /companies.json
+ def index
+ @companies = Company.all.asc(:name).page(params[:page])
+
+ respond_to do |format|
+ format.html # index.html.erb
+ format.json { render json: @companies }
+ end
+ end
+
+ # GET /companies/1
+ # GET /companies/1.json
+ def show
+ @company = Company.find(params[:id])
+
+ respond_to do |format|
+ format.html # show.html.erb
+ format.json { render json: @company }
+ end
+ end
+
+ # GET /companies/new
+ # GET /companies/new.json
+ def new
+ @company = Company.new
+
+ respond_to do |format|
+ format.html # new.html.erb
+ format.json { render json: @company }
+ end
+ end
+
+ # GET /companies/1/edit
+ def edit
+ @company = Company.find(params[:id])
+ end
+
+ # POST /companies
+ # POST /companies.json
+ def create
+ @company = Company.new(params[:company])
+
+ respond_to do |format|
+ if @company.save
+ format.html { redirect_to @company, notice: 'Company was successfully created.' }
+ format.json { render json: @company, status: :created, location: @company }
+ else
+ format.html { render action: "new" }
+ format.json { render json: @company.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # PUT /companies/1
+ # PUT /companies/1.json
+ def update
+ @company = Company.find(params[:id])
+
+ respond_to do |format|
+ if @company.update_attributes(params[:company])
+ format.html { redirect_to @company, notice: 'Company was successfully updated.' }
+ format.json { head :no_content }
+ else
+ format.html { render action: "edit" }
+ format.json { render json: @company.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # DELETE /companies/1
+ # DELETE /companies/1.json
+ def destroy
+ @company = Company.find(params[:id])
+ @company.destroy
+
+ respond_to do |format|
+ format.html { redirect_to companies_url }
+ format.json { head :no_content }
+ end
+ end
+end
View
83 InnoViz/app/controllers/gitusers_controller.rb
@@ -0,0 +1,83 @@
+class GitusersController < ApplicationController
+ # GET /gitusers
+ # GET /gitusers.json
+ def index
+ @gitusers = Gituser.all
+
+ respond_to do |format|
+ format.html # index.html.erb
+ format.json { render json: @gitusers }
+ end
+ end
+
+ # GET /gitusers/1
+ # GET /gitusers/1.json
+ def show
+ @gituser = Gituser.find(params[:id])
+
+ respond_to do |format|
+ format.html # show.html.erb
+ format.json { render json: @gituser }
+ end
+ end
+
+ # GET /gitusers/new
+ # GET /gitusers/new.json
+ def new
+ @gituser = Gituser.new
+
+ respond_to do |format|
+ format.html # new.html.erb
+ format.json { render json: @gituser }
+ end
+ end
+
+ # GET /gitusers/1/edit
+ def edit
+ @gituser = Gituser.find(params[:id])
+ end
+
+ # POST /gitusers
+ # POST /gitusers.json
+ def create
+ @gituser = Gituser.new(params[:gituser])
+
+ respond_to do |format|
+ if @gituser.save
+ format.html { redirect_to @gituser, notice: 'Gituser was successfully created.' }
+ format.json { render json: @gituser, status: :created, location: @gituser }
+ else
+ format.html { render action: "new" }
+ format.json { render json: @gituser.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # PUT /gitusers/1
+ # PUT /gitusers/1.json
+ def update
+ @gituser = Gituser.find(params[:id])
+
+ respond_to do |format|
+ if @gituser.update_attributes(params[:gituser])
+ format.html { redirect_to @gituser, notice: 'Gituser was successfully updated.' }
+ format.json { head :no_content }
+ else
+ format.html { render action: "edit" }
+ format.json { render json: @gituser.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # DELETE /gitusers/1
+ # DELETE /gitusers/1.json
+ def destroy
+ @gituser = Gituser.find(params[:id])
+ @gituser.destroy
+
+ respond_to do |format|
+ format.html { redirect_to gitusers_url }
+ format.json { head :no_content }
+ end
+ end
+end
View
83 InnoViz/app/controllers/groups_controller.rb
@@ -0,0 +1,83 @@
+class GroupsController < ApplicationController
+ # GET /groups
+ # GET /groups.json
+ def index
+ @groups = Group.all.desc(:members_vol).page(params[:page])
+
+ respond_to do |format|
+ format.html # index.html.erb
+ format.json { render json: @groups }
+ end
+ end
+
+ # GET /groups/1
+ # GET /groups/1.json
+ def show
+ @group = Group.find(params[:id])
+
+ respond_to do |format|
+ format.html # show.html.erb
+ format.json { render json: @group }
+ end
+ end
+
+ # GET /groups/new
+ # GET /groups/new.json
+ def new
+ @group = Group.new
+
+ respond_to do |format|
+ format.html # new.html.erb
+ format.json { render json: @group }
+ end
+ end
+
+ # GET /groups/1/edit
+ def edit
+ @group = Group.find(params[:id])
+ end
+
+ # POST /groups
+ # POST /groups.json
+ def create
+ @group = Group.new(params[:group])
+
+ respond_to do |format|
+ if @group.save
+ format.html { redirect_to @group, notice: 'Group was successfully created.' }
+ format.json { render json: @group, status: :created, location: @group }
+ else
+ format.html { render action: "new" }
+ format.json { render json: @group.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # PUT /groups/1
+ # PUT /groups/1.json
+ def update
+ @group = Group.find(params[:id])
+
+ respond_to do |format|
+ if @group.update_attributes(params[:group])
+ format.html { redirect_to @group, notice: 'Group was successfully updated.' }
+ format.json { head :no_content }
+ else
+ format.html { render action: "edit" }
+ format.json { render json: @group.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # DELETE /groups/1
+ # DELETE /groups/1.json
+ def destroy
+ @group = Group.find(params[:id])
+ @group.destroy
+
+ respond_to do |format|
+ format.html { redirect_to groups_url }
+ format.json { head :no_content }
+ end
+ end
+end
View
5 InnoViz/app/controllers/home_controller.rb
@@ -0,0 +1,5 @@
+class HomeController < ApplicationController
+ def index
+ @users = User.all
+ end
+end
View
6 InnoViz/app/controllers/importcentral_controller.rb
@@ -0,0 +1,6 @@
+class ImportcentralController < ApplicationController
+ def index
+ @member_count = Meetup.count_members
+ @remaining = Meetup.remaining_rate
+ end
+end
View
85 InnoViz/app/controllers/members_controller.rb
@@ -0,0 +1,85 @@
+# encoding: UTF-8
+
+class MembersController < ApplicationController
+ # GET /members
+ # GET /members.json
+ def index
+ @members = Member.all.asc(:name).page(params[:page])
+
+ respond_to do |format|
+ format.html # index.html.erb
+ format.json { render json: @members }
+ end
+ end
+
+ # GET /members/1
+ # GET /members/1.json
+ def show
+ @member = Member.find(params[:id])
+
+ respond_to do |format|
+ format.html # show.html.erb
+ format.json { render json: @member }
+ end
+ end
+
+ # GET /members/new
+ # GET /members/new.json
+ def new
+ @member = Member.new
+
+ respond_to do |format|
+ format.html # new.html.erb
+ format.json { render json: @member }
+ end
+ end
+
+ # GET /members/1/edit
+ def edit
+ @member = Member.find(params[:id])
+ end
+
+ # POST /members
+ # POST /members.json
+ def create
+ @member = Member.new(params[:member])
+
+ respond_to do |format|
+ if @member.save
+ format.html { redirect_to @member, notice: 'Member was successfully created.' }
+ format.json { render json: @member, status: :created, location: @member }
+ else
+ format.html { render action: "new" }
+ format.json { render json: @member.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # PUT /members/1
+ # PUT /members/1.json
+ def update
+ @member = Member.find(params[:id])
+
+ respond_to do |format|
+ if @member.update_attributes(params[:member])
+ format.html { redirect_to @member, notice: 'Member was successfully updated.' }
+ format.json { head :no_content }
+ else
+ format.html { render action: "edit" }
+ format.json { render json: @member.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # DELETE /members/1
+ # DELETE /members/1.json
+ def destroy
+ @member = Member.find(params[:id])
+ @member.destroy
+
+ respond_to do |format|
+ format.html { redirect_to members_url }
+ format.json { head :no_content }
+ end
+ end
+end
View
83 InnoViz/app/controllers/positions_controller.rb
@@ -0,0 +1,83 @@
+class PositionsController < ApplicationController
+ # GET /positions
+ # GET /positions.json
+ def index
+ @positions = Position.all
+
+ respond_to do |format|
+ format.html # index.html.erb
+ format.json { render json: @positions }
+ end
+ end
+
+ # GET /positions/1
+ # GET /positions/1.json
+ def show
+ @position = Position.find(params[:id])
+
+ respond_to do |format|
+ format.html # show.html.erb
+ format.json { render json: @position }
+ end
+ end
+
+ # GET /positions/new
+ # GET /positions/new.json
+ def new
+ @position = Position.new
+
+ respond_to do |format|
+ format.html # new.html.erb
+ format.json { render json: @position }
+ end
+ end
+
+ # GET /positions/1/edit
+ def edit
+ @position = Position.find(params[:id])
+ end
+
+ # POST /positions
+ # POST /positions.json
+ def create
+ @position = Position.new(params[:position])
+
+ respond_to do |format|
+ if @position.save
+ format.html { redirect_to @position, notice: 'Position was successfully created.' }
+ format.json { render json: @position, status: :created, location: @position }
+ else
+ format.html { render action: "new" }
+ format.json { render json: @position.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # PUT /positions/1
+ # PUT /positions/1.json
+ def update
+ @position = Position.find(params[:id])
+
+ respond_to do |format|
+ if @position.update_attributes(params[:position])
+ format.html { redirect_to @position, notice: 'Position was successfully updated.' }
+ format.json { head :no_content }
+ else
+ format.html { render action: "edit" }
+ format.json { render json: @position.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # DELETE /positions/1
+ # DELETE /positions/1.json
+ def destroy
+ @position = Position.find(params[:id])
+ @position.destroy
+
+ respond_to do |format|
+ format.html { redirect_to positions_url }
+ format.json { head :no_content }
+ end
+ end
+end
View
30 InnoViz/app/controllers/sessions_controller.rb
@@ -0,0 +1,30 @@
+class SessionsController < ApplicationController
+
+ def new
+ redirect_to '/auth/twitter'
+ end
+
+
+ def create
+ auth = request.env["omniauth.auth"]
+ user = User.where(:provider => auth['provider'],
+ :uid => auth['uid']).first || User.create_with_omniauth(auth)
+ session[:user_id] = user.id
+ if user.email.blank?
+ redirect_to edit_user_path(user), :alert => "Please enter your email address."
+ else
+ redirect_to root_url, :notice => 'Signed in!'
+ end
+
+ end
+
+ def destroy
+ reset_session
+ redirect_to root_url, :notice => 'Signed out!'
+ end
+
+ def failure
+ redirect_to root_url, :alert => "Authentication error: #{params[:message].humanize}"
+ end
+
+end
View
107 InnoViz/app/controllers/topickeys_controller.rb
@@ -0,0 +1,107 @@
+class TopickeysController < ApplicationController
+ # GET /topickeys
+ # GET /topickeys.json
+ def index
+ @topickeys = Topickey.all.desc(:freq).page(params[:page])
+
+ respond_to do |format|
+ format.html # index.html.erb
+ format.json { render json: @topickeys }
+ end
+ end
+
+ # GET /topickeys/1
+ # GET /topickeys/1.json
+ def show
+ @topickey = Topickey.find(params[:id])
+ @members = Member.where("topics.topic_id"=>@topickey.topic_id)
+
+ respond_to do |format|
+ format.html # show.html.erb
+ format.json { render json: @topickey }
+ end
+ end
+
+ def filtered
+ @android_titles=Topickey.android.map(&:name)
+ @ios_titles=Topickey.ios.map(&:name)
+ @android_sum=Topickey.android.map(&:freq).sum
+ @ios_sum=Topickey.ios.map(&:freq).sum
+ @bb_titles=Topickey.blackberry.map(&:name)
+ @bb_sum=Topickey.blackberry.map(&:freq).sum
+ @windows_titles=Topickey.windows.map(&:name)
+ @windows_sum=Topickey.windows.map(&:freq).sum
+
+ end
+
+ def tags
+ @topictags=Topictag.normalized.desc(:freq).page(params[:page])#paginate(:page=>params[:page],:per_page=>5)
+
+ respond_to do |format|
+ format.html # index.html.erb
+ format.json { render json: @topictags,:except=>[:_id] }
+ format.xml { render xml: @topictags,:except=>[:_id]}
+ end
+
+ end
+
+ # GET /topickeys/new
+ # GET /topickeys/new.json
+ def new
+ @topickey = Topickey.new
+
+ respond_to do |format|
+ format.html # new.html.erb
+ format.json { render json: @topickey }
+ end
+ end
+
+ # GET /topickeys/1/edit
+ def edit
+ @topickey = Topickey.find(params[:id])
+ end
+
+ # POST /topickeys
+ # POST /topickeys.json
+ def create
+ @topickey = Topickey.new(params[:topickey])
+
+ respond_to do |format|
+ if @topickey.save
+ format.html { redirect_to @topickey, notice: 'Topickey was successfully created.' }
+ format.json { render json: @topickey, status: :created, location: @topickey }
+ else
+ format.html { render action: "new" }
+ format.json { render json: @topickey.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # PUT /topickeys/1
+ # PUT /topickeys/1.json
+ def update
+ @topickey = Topickey.find(params[:id])
+
+ respond_to do |format|
+ if @topickey.update_attributes(params[:topickey])
+ format.html { redirect_to @topickey, notice: 'Topickey was successfully updated.' }
+ format.json { head :no_content }
+ else
+ format.html { render action: "edit" }
+ format.json { render json: @topickey.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # DELETE /topickeys/1
+ # DELETE /topickeys/1.json
+ def destroy
+ @topickey = Topickey.find(params[:id])
+ @topickey.destroy
+
+ respond_to do |format|
+ format.html { redirect_to topickeys_url }
+ format.json { head :no_content }
+ end
+ end
+end
View
27 InnoViz/app/controllers/users_controller.rb
@@ -0,0 +1,27 @@
+class UsersController < ApplicationController
+ before_filter :authenticate_user!
+ before_filter :correct_user?
+
+ def index
+ @users = User.all
+ end
+
+ def edit
+ @user = User.find(params[:id])
+ end
+
+ def update
+ @user = User.find(params[:id])
+ if @user.update_attributes(params[:user])
+ redirect_to @user
+ else
+ render :edit
+ end
+ end
+
+
+def show
+ @user = User.find(params[:id])
+ end
+
+end
View
5 InnoViz/app/helpers/application_helper.rb
@@ -0,0 +1,5 @@
+module ApplicationHelper
+ def todate(time)
+ Time.at(time/1000).to_date
+ end
+end
View
2 InnoViz/app/helpers/companies_helper.rb
@@ -0,0 +1,2 @@
+module CompaniesHelper
+end
View
2 InnoViz/app/helpers/gitusers_helper.rb
@@ -0,0 +1,2 @@
+module GitusersHelper
+end
View
2 InnoViz/app/helpers/groups_helper.rb
@@ -0,0 +1,2 @@
+module GroupsHelper
+end
View
2 InnoViz/app/helpers/home_helper.rb
@@ -0,0 +1,2 @@
+module HomeHelper
+end
View
2 InnoViz/app/helpers/importcentral_helper.rb
@@ -0,0 +1,2 @@
+module ImportcentralHelper
+end
View
2 InnoViz/app/helpers/members_helper.rb
@@ -0,0 +1,2 @@
+module MembersHelper
+end
View
2 InnoViz/app/helpers/positions_helper.rb
@@ -0,0 +1,2 @@
+module PositionsHelper
+end
View
2 InnoViz/app/helpers/topickeys_helper.rb
@@ -0,0 +1,2 @@
+module TopickeysHelper
+end
View
0 InnoViz/app/mailers/.gitkeep
No changes.
View
0 InnoViz/app/models/.gitkeep
No changes.
View
72 InnoViz/app/models/company.rb
@@ -0,0 +1,72 @@
+class ImportCompanies
+ @queue = :innoviz
+
+ def self.perform
+ Company.destroy_all
+ Company.import_from_xls
+ Company.associate_with_members
+ end
+end
+
+class Company
+ include Mongoid::Document
+ field :name, type: String
+ field :website, type: String
+ field :place, type: String
+ field :founded_at, type: Integer
+ field :fte, type: Integer
+ field :game_devel, type: Boolean
+ field :first_name_owner, type: String
+ field :salutation, type: String
+ field :email_address, type: String
+ field :telephone_number, type: String
+ field :function, type: String
+ field :street, type: String
+ field :postcode, type: String
+ field :year2007, type: Boolean
+ field :year2008, type: Boolean
+ field :year2009, type: Boolean
+ field :console, type: Boolean
+ field :pc, type: Boolean
+ field :adventure, type: Boolean
+ field :serious, type: Boolean
+ field :simulation, type: Boolean
+ field :web, type: Boolean
+ field :type1, type: String
+ field :type2, type: String
+
+ has_and_belongs_to_many :members
+
+
+ def self.import_from_xls
+ game_cmpns=BatchFactory.from_file("data/game_companies.xls")
+ iad =BatchFactory.from_file("data/innovation_awards_database.xls")
+
+ game_cmpns.rows.each do |i|
+ Company.create(i)
+ end
+
+ iad.rows.each do |i|
+ Company.create(i)
+ end
+ # clean up
+ Company.where(:name => "-").destroy
+ Company.where(:name => nil).destroy
+ end
+
+ def match_members
+ Member.all(bio: [/\b#{self.name}\b/i])
+ end
+
+ def self.associate_with_members
+ Company.all.each do |company|
+ company.members << company.match_members
+ end
+ end
+
+ def self.async_import
+ Resque.enqueue(ImportCompanies)
+ end
+
+
+end
View
49 InnoViz/app/models/gituser.rb
@@ -0,0 +1,49 @@
+class ImportGitusers
+ @queue = :innoviz
+
+ def self.perform
+ Gituser.destroy_all
+ Gituser.import_from_file
+ Gituser.associate_with_members
+ end
+end
+
+class Gituser
+ include Mongoid::Document
+ field :username, type: String
+ field :name, type: String
+ field :language, type: String
+ field :url, type: String
+ field :member_since, type: String
+ field :repos, type: Integer
+ field :email, type: String
+ field :followers, type: Integer
+ field :location, type: String
+ field :personal_url, type: String
+ field :company, type: String
+ field :projects, type: Hash
+
+ index({ username: 1 }, { unique: true })
+
+ has_and_belongs_to_many :members
+
+ def self.import_from_file
+ file=File.read('data/users.json')
+ JSON.parse(file)['users'].each { |i| Gituser.create(i) }
+ end
+
+ def match_members
+ Member.all(name: [/\b#{self.name}\b/i])
+ end
+
+ def self.associate_with_members
+ Gituser.each do |gituser|
+ gituser.members << gituser.match_members
+ gituser.save
+ end
+ end
+
+ def self.async_import
+ Resque.enqueue(ImportGitusers)
+ end
+end
View
50 InnoViz/app/models/group.rb
@@ -0,0 +1,50 @@
+class ImportGroups
+ @queue = :innoviz
+
+ def self.perform
+ MeetupGroup.retrieve
+ Group.import
+ end
+end
+
+class Group
+ include Mongoid::Document
+
+ field :group_id, type: Integer
+ field :city, type: String
+ field :country, type: String
+ field :created, type: Integer
+ field :description, type: String
+ field :group_photo, type: Hash
+ field :join_mode, type: String
+ field :lat, type: Float
+ field :link, type: String
+ field :lon, type: Float
+ field :name, type: String
+ field :organizer, type: Hash
+ field :rating, type: String
+ field :state, type: String
+ field :topics, type: Hash
+ field :urlname, type: String
+ field :visibility, type: String
+ field :who, type: String
+ field :member_vol, type: String
+ field :category, type: Hash
+
+ has_and_belongs_to_many :members
+
+
+ index({ group_id: 1 }, { unique: true })
+
+ def members_vol
+ member_vol.to_i
+ end
+
+ def self.import # INFO: imports from temp MeetupGroup model to Group and builds associations Group with Member
+ MeetupGroup.all.each { |i| p i.member_id;i.populate_groups; i.associate_with_members }
+ end
+
+ def self.async_import
+ Resque.enqueue(ImportGroups)
+ end
+end
View
55 InnoViz/app/models/linkedin_position.rb
@@ -0,0 +1,55 @@
+class ImportPositions
+ @queue = :linkedin
+
+ def self.perform
+ LinkedinPosition.destroy_all
+ LinkedinPosition.import
+ end
+end
+
+class LinkedinPosition
+ include Mongoid::Document
+ field :member_id, type: Integer
+ field :positions, type: Hash
+
+
+ def create_position
+ p = Position.new
+ p.name = self.name
+ p.cmp_id = self.cmp_id
+ p.industry = self.industry unless self.industry.nil?
+ p.is_current= self['is_current']
+ p.start_date= self['start_date']
+ p.summary = self['summary'] unless self['summary'].nil?
+ p.title = self['title']
+ p.member = Member.where(:meetup_id => self.member_id).first
+ p.save
+ end
+
+ def self.import
+ Member.all.each { |m| m.retrieve_linkedin_positions }
+ end
+
+ def self.async_import
+ Resque.enqueue(ImportPositions)
+ end
+
+
+ def company
+ positions['company']
+ end
+
+ def name
+ positions['company']['name']
+ end
+
+ def cmp_id
+ positions['company']['id']
+ end
+
+ def industry
+ positions['company']['industry']
+ end
+
+
+end
View
114 InnoViz/app/models/meetup.rb
@@ -0,0 +1,114 @@
+# encoding: UTF-8
+
+class Meetup
+ include Mongoid::Document
+
+ def update # This only updates the whole database
+ Member.async_import_members
+ Group.async_import
+ Topickey.async_import
+ Topictag.async_import
+ Company.async_import
+ Gituser.async_import
+ end
+
+ def reimport # This will destroy the local DB first and then import evrything back, takes time
+ # TODO: Construct an algorithm to overcome the 800hits/hour limitation.
+
+ # Case example: Appsterdam Meetup group members > 1600:
+ # We hit the API at 13:45 and we get 800 members. Rate has reached its max for this window.
+ # We hit again the API at 14:01 and we get another 800 members. Rate has reached its max for this window.
+ # We need to wait until 15:01 to get the rest. Thus it takes around 3 hours to get all of them
+ Member.destroy_all
+ Meetupgroup.destroy_all
+ Group.destroy_all
+ Topickey.destroy_all
+ Topictag.destroy_all
+ Company.destroy_all
+ Gituser.destroy_all
+ Meetup.new.update
+
+ end
+
+ def self.import_meetup_members
+ members = retrieve_members
+
+ MeetupMember.destroy_all
+ Member.destroy_all
+
+ members.each do |mmbr|
+ MeetupMember.create(mmbr.member)
+ Member.create(mmbr.member.correct_member_id.correct_topic_id.restructure_other_services)
+ end
+ end
+
+ def self.count_members # Count the total members Appsterdam has
+ begin
+ return RMeetup::Client.fetch(:groups, { :group_urlname => 'Appsterdam' }).first.members
+ rescue
+ return "Unknown (max rate reached)"
+ end
+ end
+
+ def self.remaining_rate
+ m =ENV['MEETUP']
+ http = Curl::Easy.perform("http://api.meetup.com/members/?relation=self&key="+m)
+ return http.header_str.match(/^(X-RateLimit-Remaining):(..?.?.?.?.?\s)$/)[2].to_i
+ end
+
+ private
+
+ def self.retrieve_members
+ res = []
+ tms = RMeetup::Client.fetch(:groups, { :group_urlname => 'Appsterdam' }).first.members/200
+
+ (0..tms).each do |i|
+ res << RMeetup::Client.fetch(:members, { :group_urlname => 'Appsterdam', :offset => i, :page => 200 })
+ end
+
+ res.flatten
+ end
+
+
+end
+
+class Hash
+
+ # qu: Is that monkey patching?
+ # qu: Is there any way I can set a default value to X if X.nil?
+
+ def restructure_other_services
+ # qu: Is this DRY?
+ if self['other_services']['srv_id'].nil?
+ self['other_services'] = self['other_services'].map { |k, v| Hash['name' => k, 'srv_id' => v.map { |c, n| n }[0].to_s] }
+ end
+ self
+
+ end
+
+
+ def correct_member_id
+
+ change_id = { "id" => "meetup_id" }
+ Hash[self.map { |k, v| [change_id[k]||k, v] }]
+
+ end
+
+ def correct_topic_id
+ unless self['topics'].empty?
+ change_id = { "id" => "topic_id" }
+ self['topics'] = self['topics'].map { |k| Hash[k.map { |c, n| [change_id[c]||c, n] }] }
+ end
+ self
+
+ end
+
+ #def correct_positions_id
+ # change_id = { "id" => "iid" }
+ # self = self.map { |c, n| Hash[change_id[c]||c, n] }
+ # self
+ #end
+
+
+end
+
View
76 InnoViz/app/models/meetup_group.rb
@@ -0,0 +1,76 @@
+class MeetupGroup
+ include Mongoid::Document
+
+ field :member_id, :type => Integer
+
+ embeds_many :grps
+
+ index({ member_id: 1 }, { unique: true })
+
+ def self.still_to_retrieve
+ # retrieves the groups for each member who is still not in the MeetupGroup model
+ all_ids = Member.all.map(&:meetup_id)
+ current_ids = MeetupGroup.all.map(&:member_id)
+ still_to_be_retrieved = all_ids - current_ids
+ end
+
+ def self.retrieve # info: This one actually retrieves the groups from MeetupAPI and saves them to the temp MeetupGroup model
+ rem = Meetup.remaining_rate
+
+ still_to_retrieve[0..rem-100].each do |id| # Do not exhaust all the hit rate to MeetupAPI at once, but 100 less
+ Member.where(:meetup_id => id).first.retrieve_single_member_groups
+
+ end
+ end
+
+ def populate_groups # saves the groups from proxy model to Group model
+
+ self.grps.each do |m|
+ g = Group.new
+ g.lon = m.lon
+ g.visibility = m.visibility
+ g.organizer = m.organizer
+ g.link = m.link
+ g.join_mode = m.join_mode
+ g.who = m.who
+ g.country = m.country
+ g.city = m.city
+ g.group_id = m.group_id
+ g.category = m.category
+ g.topics = m.topics
+ unless g.group_photo.nil?
+ g.group_photo ||= m.group_photo
+ end
+ g.created = m.created
+ unless g.description.nil?
+ g.description = m.description
+ end
+ g.name = m.name
+ g.rating = m.rating
+ g.urlname = m.urlname
+ g.lat = m.lat
+ g.member_vol = m.member_vol
+ g.save
+ end
+
+ end
+
+ def associate_with_members # Associate Group with Member
+ begin
+ m = Member.find_by_mid(self.member_id)
+ self.grps.each do |i|
+ m.groups << Group.where(:group_id => i.group_id).first
+ end
+ m.save
+ rescue
+ end
+
+ end
+
+end
+
+class Grp
+ include Mongoid::Document
+
+ embedded_in :meetup_group, :inverse_of => :grps
+end
View
12 InnoViz/app/models/meetup_member.rb
@@ -0,0 +1,12 @@
+# encoding: UTF-8
+
+class MeetupMember
+ include Mongoid::Document
+
+
+ def correct_name
+ name.parameterize.gsub("-", " ").camelize
+ end
+
+
+end
View
192 InnoViz/app/models/member.rb
@@ -0,0 +1,192 @@
+# encoding: UTF-8
+
+class ImportMember
+ @queue = :innoviz
+
+