tawork 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (239) hide show
  1. checksums.yaml +7 -0
  2. data/.DS_Store +0 -0
  3. data/.gitignore +16 -0
  4. data/Gemfile +91 -0
  5. data/Gemfile.lock +295 -0
  6. data/MIT-LICENSE +20 -0
  7. data/Procfile +2 -0
  8. data/README.md +1 -0
  9. data/Rakefile +6 -0
  10. data/app/assets/images/.keep +0 -0
  11. data/app/assets/javascripts/application.js +31 -0
  12. data/app/assets/javascripts/backbone/models/.gitkeep +0 -0
  13. data/app/assets/javascripts/backbone/routers/.gitkeep +0 -0
  14. data/app/assets/javascripts/backbone/tawork.js.coffee +11 -0
  15. data/app/assets/javascripts/backbone/templates/.gitkeep +0 -0
  16. data/app/assets/javascripts/backbone/views/.gitkeep +0 -0
  17. data/app/assets/javascripts/backbone/views/page.js.coffee +75 -0
  18. data/app/assets/javascripts/backbone/views/ticket.js.coffee +110 -0
  19. data/app/assets/javascripts/backbone/views/tree_node_page.js.coffee +16 -0
  20. data/app/assets/javascripts/backbone/views/tree_node_ticket.js.coffee +14 -0
  21. data/app/assets/javascripts/wiki/pages.js.coffee +3 -0
  22. data/app/assets/stylesheets/application.css +22 -0
  23. data/app/assets/stylesheets/bootstrap_and_overrides.sass +208 -0
  24. data/app/assets/stylesheets/diff.css +14 -0
  25. data/app/assets/stylesheets/wiki/pages.css.scss +3 -0
  26. data/app/controllers/application_controller.rb +15 -0
  27. data/app/controllers/assignments_controller.rb +30 -0
  28. data/app/controllers/attachments_controller.rb +10 -0
  29. data/app/controllers/comments_controller.rb +24 -0
  30. data/app/controllers/concerns/.keep +0 -0
  31. data/app/controllers/home_controller.rb +7 -0
  32. data/app/controllers/projects_controller.rb +31 -0
  33. data/app/controllers/search_controller.rb +49 -0
  34. data/app/controllers/sink_controller.rb +10 -0
  35. data/app/controllers/tickets_controller.rb +147 -0
  36. data/app/controllers/users/omniauth_callbacks_controller.rb +23 -0
  37. data/app/controllers/wiki/pages_controller.rb +115 -0
  38. data/app/controllers/wiki/spaces_controller.rb +37 -0
  39. data/app/helpers/application_helper.rb +20 -0
  40. data/app/helpers/wiki/pages_helper.rb +2 -0
  41. data/app/inputs/fake_input.rb +6 -0
  42. data/app/mailers/.keep +0 -0
  43. data/app/models/.keep +0 -0
  44. data/app/models/assignment.rb +5 -0
  45. data/app/models/attachment.rb +54 -0
  46. data/app/models/bug.rb +2 -0
  47. data/app/models/comment.rb +6 -0
  48. data/app/models/concerns/.keep +0 -0
  49. data/app/models/page.rb +68 -0
  50. data/app/models/project.rb +2 -0
  51. data/app/models/space.rb +2 -0
  52. data/app/models/story.rb +29 -0
  53. data/app/models/story_detail.rb +3 -0
  54. data/app/models/task.rb +2 -0
  55. data/app/models/ticket.rb +127 -0
  56. data/app/models/user.rb +36 -0
  57. data/app/models/user_verifier.rb +2 -0
  58. data/app/views/comments/_comment.html.haml +6 -0
  59. data/app/views/comments/_form.html.haml +4 -0
  60. data/app/views/comments/create.js.coffee +7 -0
  61. data/app/views/devise/confirmations/new.html.erb +12 -0
  62. data/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
  63. data/app/views/devise/mailer/reset_password_instructions.html.erb +8 -0
  64. data/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
  65. data/app/views/devise/passwords/edit.html.erb +16 -0
  66. data/app/views/devise/passwords/new.html.erb +12 -0
  67. data/app/views/devise/registrations/edit.html.erb +29 -0
  68. data/app/views/devise/registrations/new.html.erb +18 -0
  69. data/app/views/devise/sessions/new.html.erb +17 -0
  70. data/app/views/devise/shared/_links.erb +25 -0
  71. data/app/views/devise/unlocks/new.html.erb +12 -0
  72. data/app/views/home/index.html.haml +4 -0
  73. data/app/views/layouts/_activity_wrapper.html.haml +17 -0
  74. data/app/views/layouts/_nav_header.html.haml +26 -0
  75. data/app/views/layouts/_spaces.html.haml +34 -0
  76. data/app/views/layouts/application.html.haml +39 -0
  77. data/app/views/layouts/minimal.html.haml +22 -0
  78. data/app/views/projects/index.html.haml +16 -0
  79. data/app/views/projects/new.html.haml +6 -0
  80. data/app/views/public_activity/ticket/_assignment.html.haml +14 -0
  81. data/app/views/public_activity/ticket/_create_comment.html.haml +10 -0
  82. data/app/views/public_activity/ticket/_created.html.haml +3 -0
  83. data/app/views/public_activity/ticket/_reorder.html.haml +2 -0
  84. data/app/views/public_activity/ticket/_state_change.html.haml +2 -0
  85. data/app/views/public_activity/ticket/_update_details.html.haml +13 -0
  86. data/app/views/tickets/_activity.html.haml +3 -0
  87. data/app/views/tickets/_breadcrumb.html.haml +7 -0
  88. data/app/views/tickets/_bug_form.html.haml +1 -0
  89. data/app/views/tickets/_events_dropdown.html.haml +4 -0
  90. data/app/views/tickets/_form.html.haml +28 -0
  91. data/app/views/tickets/_project_form.html.haml +1 -0
  92. data/app/views/tickets/_story_form.html.haml +15 -0
  93. data/app/views/tickets/_task_form.html.haml +8 -0
  94. data/app/views/tickets/_tickets_listing.html.haml +5 -0
  95. data/app/views/tickets/_title_and_description.html.haml +8 -0
  96. data/app/views/tickets/_tree_node.html.haml +28 -0
  97. data/app/views/tickets/assignment.js.coffee +3 -0
  98. data/app/views/tickets/create.js.coffee +7 -0
  99. data/app/views/tickets/new.html.haml +1 -0
  100. data/app/views/tickets/show.html.haml +64 -0
  101. data/app/views/tickets/trigger_event.js.coffee +12 -0
  102. data/app/views/tickets/update.js.coffee +12 -0
  103. data/app/views/wiki/pages/_attachment.html.haml +5 -0
  104. data/app/views/wiki/pages/_attachments.html.haml +22 -0
  105. data/app/views/wiki/pages/_breadcrumb.html.haml +9 -0
  106. data/app/views/wiki/pages/_child_menu.html.haml +9 -0
  107. data/app/views/wiki/pages/_display.html.haml +138 -0
  108. data/app/views/wiki/pages/_page_header.html.haml +13 -0
  109. data/app/views/wiki/pages/_subpages_dropdown.html.haml +6 -0
  110. data/app/views/wiki/pages/_subtree.html.haml +7 -0
  111. data/app/views/wiki/pages/_tree_node.html.haml +21 -0
  112. data/app/views/wiki/pages/attach.js.coffee +2 -0
  113. data/app/views/wiki/pages/combined.html.haml +8 -0
  114. data/app/views/wiki/pages/create.js.coffee +5 -0
  115. data/app/views/wiki/pages/edit.html.haml +2 -0
  116. data/app/views/wiki/pages/history.html.haml +13 -0
  117. data/app/views/wiki/pages/index.html.haml +2 -0
  118. data/app/views/wiki/pages/new.html.haml +13 -0
  119. data/app/views/wiki/pages/show.html.haml +14 -0
  120. data/app/views/wiki/pages/update.html.haml +2 -0
  121. data/app/views/wiki/spaces/_page_list_item.html.haml +11 -0
  122. data/app/views/wiki/spaces/_space_list.html.haml +4 -0
  123. data/app/views/wiki/spaces/new.html.haml +5 -0
  124. data/app/views/wiki/spaces/space_list.html.haml +1 -0
  125. data/bin/bundle +3 -0
  126. data/bin/rails +4 -0
  127. data/bin/rake +4 -0
  128. data/config/application.rb +30 -0
  129. data/config/boot.rb +4 -0
  130. data/config/database.yml +39 -0
  131. data/config/environment.rb +5 -0
  132. data/config/environments/development.rb +35 -0
  133. data/config/environments/production.rb +80 -0
  134. data/config/environments/test.rb +36 -0
  135. data/config/initializers/backtrace_silencers.rb +7 -0
  136. data/config/initializers/config.rb +4 -0
  137. data/config/initializers/devise.rb +257 -0
  138. data/config/initializers/elasticsearch.rb +9 -0
  139. data/config/initializers/filter_parameter_logging.rb +4 -0
  140. data/config/initializers/gollum.rb +31 -0
  141. data/config/initializers/haml_gfm.rb +66 -0
  142. data/config/initializers/inflections.rb +16 -0
  143. data/config/initializers/mime_types.rb +5 -0
  144. data/config/initializers/secret_token.rb +12 -0
  145. data/config/initializers/session_store.rb +3 -0
  146. data/config/initializers/simple_form.rb +145 -0
  147. data/config/initializers/simple_form_bootstrap.rb +73 -0
  148. data/config/initializers/wrap_parameters.rb +14 -0
  149. data/config/locales/devise.en.yml +59 -0
  150. data/config/locales/en.yml +23 -0
  151. data/config/locales/simple_form.en.yml +26 -0
  152. data/config/routes.rb +101 -0
  153. data/config/tinymce.yml +10 -0
  154. data/config.ru +4 -0
  155. data/db/migrate/20131209041251_create_tickets.rb +13 -0
  156. data/db/migrate/20131210041050_devise_create_users.rb +42 -0
  157. data/db/migrate/20131210043014_add_username_to_users.rb +5 -0
  158. data/db/migrate/20131210045348_add_creator_to_ticket.rb +5 -0
  159. data/db/migrate/20131211034104_create_comments.rb +11 -0
  160. data/db/migrate/20131212073014_create_assignments.rb +12 -0
  161. data/db/migrate/20131215220825_add_position_to_ticket.rb +5 -0
  162. data/db/migrate/20131216044331_create_story_details.rb +12 -0
  163. data/db/migrate/20131218060557_create_activities.rb +23 -0
  164. data/db/migrate/20140109235844_create_pages.rb +14 -0
  165. data/db/migrate/20140112004346_create_attachments.rb +13 -0
  166. data/db/migrate/20140120030547_add_name_to_users.rb +5 -0
  167. data/db/schema.rb +125 -0
  168. data/db/seeds.rb +7 -0
  169. data/init.rb +1 -0
  170. data/lib/assets/.keep +0 -0
  171. data/lib/tasks/.keep +0 -0
  172. data/lib/tawork/engine.rb +13 -0
  173. data/lib/tawork/version.rb +3 -0
  174. data/lib/tawork.rb +4 -0
  175. data/lib/templates/haml/scaffold/_form.html.haml +10 -0
  176. data/lib/ticket_assignment.rb +25 -0
  177. data/log/.keep +0 -0
  178. data/public/401.html +57 -0
  179. data/public/404.html +58 -0
  180. data/public/422.html +58 -0
  181. data/public/500.html +57 -0
  182. data/public/favicon.ico +0 -0
  183. data/public/robots.txt +5 -0
  184. data/tags +279 -0
  185. data/tawork.gemspec +24 -0
  186. data/vendor/.DS_Store +0 -0
  187. data/vendor/assets/.DS_Store +0 -0
  188. data/vendor/assets/javascripts/.keep +0 -0
  189. data/vendor/assets/javascripts/bootstrap-tagsinput.js +503 -0
  190. data/vendor/assets/javascripts/bootstrap-tree.js +15 -0
  191. data/vendor/assets/javascripts/bootstrap-typeahead.js +335 -0
  192. data/vendor/assets/javascripts/hallo.js +2949 -0
  193. data/vendor/assets/javascripts/highlight.pack.js +1 -0
  194. data/vendor/assets/javascripts/jquery.autosize.js +250 -0
  195. data/vendor/assets/javascripts/jquery.mjs.nestedSortable.js +613 -0
  196. data/vendor/assets/javascripts/rangy-core.js +94 -0
  197. data/vendor/assets/javascripts/tinymce/mention/plugin.js +358 -0
  198. data/vendor/assets/stylesheets/.keep +0 -0
  199. data/vendor/assets/stylesheets/bootflat-extensions.css +356 -0
  200. data/vendor/assets/stylesheets/bootflat-square.css +69 -0
  201. data/vendor/assets/stylesheets/bootflat.css +1556 -0
  202. data/vendor/assets/stylesheets/bootstrap-tagsinput.css +45 -0
  203. data/vendor/assets/stylesheets/bootstrap-tree.sass +82 -0
  204. data/vendor/assets/stylesheets/highlight/arta.css +160 -0
  205. data/vendor/assets/stylesheets/highlight/ascetic.css +50 -0
  206. data/vendor/assets/stylesheets/highlight/brown_paper.css +105 -0
  207. data/vendor/assets/stylesheets/highlight/brown_papersq.png +0 -0
  208. data/vendor/assets/stylesheets/highlight/dark.css +105 -0
  209. data/vendor/assets/stylesheets/highlight/default.css +153 -0
  210. data/vendor/assets/stylesheets/highlight/docco.css +132 -0
  211. data/vendor/assets/stylesheets/highlight/far.css +113 -0
  212. data/vendor/assets/stylesheets/highlight/foundation.css +133 -0
  213. data/vendor/assets/stylesheets/highlight/github.css +130 -0
  214. data/vendor/assets/stylesheets/highlight/googlecode.css +146 -0
  215. data/vendor/assets/stylesheets/highlight/idea.css +122 -0
  216. data/vendor/assets/stylesheets/highlight/ir_black.css +105 -0
  217. data/vendor/assets/stylesheets/highlight/magula.css +123 -0
  218. data/vendor/assets/stylesheets/highlight/mono-blue.css +62 -0
  219. data/vendor/assets/stylesheets/highlight/monokai.css +127 -0
  220. data/vendor/assets/stylesheets/highlight/monokai_sublime.css +102 -0
  221. data/vendor/assets/stylesheets/highlight/obsidian.css +154 -0
  222. data/vendor/assets/stylesheets/highlight/pojoaque.css +105 -0
  223. data/vendor/assets/stylesheets/highlight/pojoaque.jpg +0 -0
  224. data/vendor/assets/stylesheets/highlight/railscasts.css +182 -0
  225. data/vendor/assets/stylesheets/highlight/rainbow.css +115 -0
  226. data/vendor/assets/stylesheets/highlight/school_book.css +113 -0
  227. data/vendor/assets/stylesheets/highlight/school_book.png +0 -0
  228. data/vendor/assets/stylesheets/highlight/solarized_dark.css +92 -0
  229. data/vendor/assets/stylesheets/highlight/solarized_light.css +92 -0
  230. data/vendor/assets/stylesheets/highlight/sunburst.css +160 -0
  231. data/vendor/assets/stylesheets/highlight/tomorrow-night-blue.css +52 -0
  232. data/vendor/assets/stylesheets/highlight/tomorrow-night-bright.css +51 -0
  233. data/vendor/assets/stylesheets/highlight/tomorrow-night-eighties.css +51 -0
  234. data/vendor/assets/stylesheets/highlight/tomorrow-night.css +52 -0
  235. data/vendor/assets/stylesheets/highlight/tomorrow.css +49 -0
  236. data/vendor/assets/stylesheets/highlight/vs.css +89 -0
  237. data/vendor/assets/stylesheets/highlight/xcode.css +157 -0
  238. data/vendor/assets/stylesheets/highlight/zenburn.css +117 -0
  239. metadata +299 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 6f482c1e29d6c711eea8b45b09ff7d4312201011
4
+ data.tar.gz: 48e5240343bb768e6595f52b4b8401a4d82fbd6f
5
+ SHA512:
6
+ metadata.gz: 5ecb1437b701279fc55e3c490bc2df9b8ec1c62a02ab73c402a2ddd06be0157b6badf444513a99b355b3638923a1c52e113f4801d638f67efb1f04fb780fe582
7
+ data.tar.gz: a5cc232110a6758d02f0f49be3d6fda01d2ac7677e55264aca2c047758806cf176db289b1c7d3e909dd03d665c7618d9a9c8409090a6ac2c62f7724dc2154f63
data/.DS_Store ADDED
Binary file
data/.gitignore ADDED
@@ -0,0 +1,16 @@
1
+ # See https://help.github.com/articles/ignoring-files for more about ignoring files.
2
+ #
3
+ # If you find yourself ignoring temporary files generated by your text editor
4
+ # or operating system, you probably want to add a global ignore instead:
5
+ # git config --global core.excludesfile '~/.gitignore_global'
6
+
7
+ # Ignore bundler config.
8
+ /.bundle
9
+
10
+ # Ignore the default SQLite database.
11
+ /db/*.sqlite3
12
+ /db/*.sqlite3-journal
13
+
14
+ # Ignore all logfiles and tempfiles.
15
+ /log/*.log
16
+ /tmp
data/Gemfile ADDED
@@ -0,0 +1,91 @@
1
+ source 'https://rubygems.org'
2
+ source 'https://rails-assets.org'
3
+
4
+ # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
5
+ # gem 'rails', '4.1.0.beta1'
6
+ # gem 'rails', github: 'rails/rails'
7
+
8
+ # Use mysql as the database for Active Record
9
+ gem 'mysql2'
10
+ gem 'bootstrap-sass'
11
+
12
+ gem "haml-rails"
13
+ gem 'haml-contrib'
14
+
15
+ gem 'ancestry'
16
+ gem 'devise'
17
+ gem 'omniauth-openid'
18
+ gem 'simple_form'
19
+ gem 'aasm'
20
+ gem 'acts_as_list', git: "git@github.com:swanandp/acts_as_list.git"
21
+ gem 'public_activity'
22
+ gem 'diffy'
23
+ gem 'gollum-lib'
24
+ gem 'tire'
25
+
26
+ gem 'RedCloth'
27
+ gem 'github-markdown'
28
+ gem 'redcarpet'
29
+ gem 'kramdown'
30
+
31
+ # assets
32
+ gem 'tinymce-rails', git: "git@github.com:spohlenz/tinymce-rails.git", branch: "tinymce-4"
33
+ gem 'plupload-rails'
34
+ gem 'rails-timeago'
35
+ gem 'rails-assets-underscore'
36
+ gem 'rails-assets-backbone'
37
+ gem 'rails-assets-jquery-ui'
38
+ gem 'rails-assets-components-font-awesome'
39
+ gem 'rails-assets-jquery-autosize'
40
+ gem 'rails-assets-highlightjs'
41
+
42
+
43
+ # Use SCSS for stylesheets
44
+ gem 'sass-rails', '~> 4.0.0.rc1'
45
+
46
+ # Use Uglifier as compressor for JavaScript assets
47
+ gem 'uglifier', '>= 1.3.0'
48
+
49
+ # Use CoffeeScript for .js.coffee assets and views
50
+ gem 'coffee-rails', '~> 4.0.0'
51
+
52
+ # See https://github.com/sstephenson/execjs#readme for more supported runtimes
53
+ # gem 'therubyracer', platforms: :ruby
54
+
55
+ # Use jquery as the JavaScript library
56
+ gem 'jquery-rails'
57
+
58
+ # Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
59
+ gem 'turbolinks'
60
+
61
+ # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
62
+ gem 'jbuilder', '~> 1.2'
63
+
64
+ group :doc do
65
+ # bundle exec rake doc:rails generates the API under doc/api.
66
+ gem 'sdoc', require: false
67
+ end
68
+
69
+ group :development do
70
+ gem "better_errors"
71
+ gem "binding_of_caller"
72
+ gem 'rack-mini-profiler'
73
+ gem 'foreman'
74
+ gem "thin"
75
+ gem "awesome_print"
76
+ gem 'pry'
77
+ gem 'pry-remote'
78
+ end
79
+
80
+
81
+ # Use ActiveModel has_secure_password
82
+ # gem 'bcrypt-ruby', '~> 3.1.2'
83
+
84
+ # Use unicorn as the app server
85
+ # gem 'unicorn'
86
+
87
+ # Use Capistrano for deployment
88
+ # gem 'capistrano', group: :development
89
+
90
+ # Use debugger
91
+ # gem 'debugger', group: [:development, :test]
data/Gemfile.lock ADDED
@@ -0,0 +1,295 @@
1
+ GIT
2
+ remote: git@github.com:spohlenz/tinymce-rails.git
3
+ revision: b398df1b434d56e20d1c2ae65fa0715cb6bf16e5
4
+ branch: tinymce-4
5
+ specs:
6
+ tinymce-rails (4.0.12)
7
+ railties (>= 3.1.1)
8
+
9
+ GIT
10
+ remote: git@github.com:swanandp/acts_as_list.git
11
+ revision: 799465c459a65f33bdb460ff1d64b215a631289f
12
+ specs:
13
+ acts_as_list (0.3.0)
14
+ activerecord (>= 3.0)
15
+
16
+ GEM
17
+ remote: https://rubygems.org/
18
+ remote: https://rails-assets.org/
19
+ specs:
20
+ RedCloth (4.2.9)
21
+ aasm (3.0.23)
22
+ actionmailer (4.0.2)
23
+ actionpack (= 4.0.2)
24
+ mail (~> 2.5.4)
25
+ actionpack (4.0.2)
26
+ activesupport (= 4.0.2)
27
+ builder (~> 3.1.0)
28
+ erubis (~> 2.7.0)
29
+ rack (~> 1.5.2)
30
+ rack-test (~> 0.6.2)
31
+ activemodel (4.0.2)
32
+ activesupport (= 4.0.2)
33
+ builder (~> 3.1.0)
34
+ activerecord (4.0.2)
35
+ activemodel (= 4.0.2)
36
+ activerecord-deprecated_finders (~> 1.0.2)
37
+ activesupport (= 4.0.2)
38
+ arel (~> 4.0.0)
39
+ activerecord-deprecated_finders (1.0.3)
40
+ activesupport (4.0.2)
41
+ i18n (~> 0.6, >= 0.6.4)
42
+ minitest (~> 4.2)
43
+ multi_json (~> 1.3)
44
+ thread_safe (~> 0.1)
45
+ tzinfo (~> 0.3.37)
46
+ ancestry (2.0.0)
47
+ activerecord (>= 3.0.0)
48
+ ansi (1.4.3)
49
+ arel (4.0.1)
50
+ atomic (1.1.14)
51
+ awesome_print (1.1.0)
52
+ bcrypt-ruby (3.1.2)
53
+ better_errors (0.3.2)
54
+ coderay (>= 1.0.0)
55
+ erubis (>= 2.7.0)
56
+ binding_of_caller (0.7.2)
57
+ debug_inspector (>= 0.0.1)
58
+ bootstrap-sass (3.0.3.0)
59
+ sass (~> 3.2)
60
+ builder (3.1.4)
61
+ charlock_holmes (0.6.9.4)
62
+ coderay (1.0.8)
63
+ coffee-rails (4.0.1)
64
+ coffee-script (>= 2.2.0)
65
+ railties (>= 4.0.0, < 5.0)
66
+ coffee-script (2.2.0)
67
+ coffee-script-source
68
+ execjs
69
+ coffee-script-source (1.6.3)
70
+ daemons (1.1.9)
71
+ debug_inspector (0.0.2)
72
+ devise (3.2.2)
73
+ bcrypt-ruby (~> 3.0)
74
+ orm_adapter (~> 0.1)
75
+ railties (>= 3.2.6, < 5)
76
+ thread_safe (~> 0.1)
77
+ warden (~> 1.2.3)
78
+ diff-lcs (1.2.5)
79
+ diffy (3.0.1)
80
+ erubis (2.7.0)
81
+ eventmachine (1.0.3)
82
+ execjs (2.0.2)
83
+ foreman (0.61.0)
84
+ thor (>= 0.13.6)
85
+ github-markdown (0.6.3)
86
+ github-markup (0.7.5)
87
+ gitlab-grit (2.6.0)
88
+ charlock_holmes (~> 0.6.9)
89
+ diff-lcs (~> 1.1)
90
+ mime-types (~> 1.15)
91
+ posix-spawn (~> 0.3.6)
92
+ gollum-lib (1.0.9)
93
+ github-markup (>= 0.7.5, < 1.0.0)
94
+ gitlab-grit (= 2.6.0)
95
+ nokogiri (~> 1.6.0)
96
+ pygments.rb (~> 0.5.2)
97
+ sanitize (~> 2.0.6)
98
+ stringex (~> 2.1.0)
99
+ haml (4.0.4)
100
+ tilt
101
+ haml-contrib (1.0.0.1)
102
+ haml (>= 3.2.0.alpha.13)
103
+ haml-rails (0.5.3)
104
+ actionpack (>= 4.0.1)
105
+ activesupport (>= 4.0.1)
106
+ haml (>= 3.1, < 5.0)
107
+ railties (>= 4.0.1)
108
+ hashie (2.0.5)
109
+ hashr (0.0.22)
110
+ hike (1.2.3)
111
+ i18n (0.6.9)
112
+ jbuilder (1.5.3)
113
+ activesupport (>= 3.0.0)
114
+ multi_json (>= 1.2.0)
115
+ jquery-rails (3.0.4)
116
+ railties (>= 3.0, < 5.0)
117
+ thor (>= 0.14, < 2.0)
118
+ json (1.8.1)
119
+ kramdown (1.3.1)
120
+ mail (2.5.4)
121
+ mime-types (~> 1.16)
122
+ treetop (~> 1.4.8)
123
+ method_source (0.8.2)
124
+ mime-types (1.25.1)
125
+ mini_portile (0.5.2)
126
+ minitest (4.7.5)
127
+ multi_json (1.8.4)
128
+ mysql2 (0.3.14)
129
+ nokogiri (1.6.1)
130
+ mini_portile (~> 0.5.0)
131
+ omniauth (1.1.4)
132
+ hashie (>= 1.2, < 3)
133
+ rack
134
+ omniauth-openid (1.0.1)
135
+ omniauth (~> 1.0)
136
+ rack-openid (~> 1.3.1)
137
+ orm_adapter (0.5.0)
138
+ plupload-rails (1.1.0)
139
+ rails (>= 3.1)
140
+ polyglot (0.3.3)
141
+ posix-spawn (0.3.8)
142
+ pry (0.9.12.4)
143
+ coderay (~> 1.0)
144
+ method_source (~> 0.8)
145
+ slop (~> 3.4)
146
+ pry-remote (0.1.7)
147
+ pry (~> 0.9)
148
+ slop (~> 3.0)
149
+ public_activity (1.4.0)
150
+ actionpack (>= 3.0.0)
151
+ activerecord (>= 3.0)
152
+ i18n (>= 0.5.0)
153
+ railties (>= 3.0.0)
154
+ pygments.rb (0.5.4)
155
+ posix-spawn (~> 0.3.6)
156
+ yajl-ruby (~> 1.1.0)
157
+ rack (1.5.2)
158
+ rack-mini-profiler (0.1.23)
159
+ rack (>= 1.1.3)
160
+ rack-openid (1.3.1)
161
+ rack (>= 1.1.0)
162
+ ruby-openid (>= 2.1.8)
163
+ rack-test (0.6.2)
164
+ rack (>= 1.0)
165
+ rails (4.0.2)
166
+ actionmailer (= 4.0.2)
167
+ actionpack (= 4.0.2)
168
+ activerecord (= 4.0.2)
169
+ activesupport (= 4.0.2)
170
+ bundler (>= 1.3.0, < 2.0)
171
+ railties (= 4.0.2)
172
+ sprockets-rails (~> 2.0.0)
173
+ rails-assets-backbone (1.1.0)
174
+ rails-assets-components-font-awesome (4.0.3)
175
+ rails-assets-highlightjs (7.5.0)
176
+ rails-assets-jquery (2.0.3)
177
+ rails-assets-jquery-autosize (1.18.2)
178
+ rails-assets-jquery (>= 1.7)
179
+ rails-assets-jquery-ui (1.10.3)
180
+ rails-assets-jquery (>= 1.6)
181
+ rails-assets-underscore (1.5.2)
182
+ rails-timeago (2.8.0)
183
+ actionpack (>= 3.1)
184
+ activesupport (>= 3.1)
185
+ railties (4.0.2)
186
+ actionpack (= 4.0.2)
187
+ activesupport (= 4.0.2)
188
+ rake (>= 0.8.7)
189
+ thor (>= 0.18.1, < 2.0)
190
+ rake (10.1.1)
191
+ rdoc (3.12.2)
192
+ json (~> 1.4)
193
+ redcarpet (3.0.0)
194
+ rest-client (1.6.7)
195
+ mime-types (>= 1.16)
196
+ ruby-openid (2.3.0)
197
+ sanitize (2.0.6)
198
+ nokogiri (>= 1.4.4)
199
+ sass (3.2.13)
200
+ sass-rails (4.0.1)
201
+ railties (>= 4.0.0, < 5.0)
202
+ sass (>= 3.1.10)
203
+ sprockets-rails (~> 2.0.0)
204
+ sdoc (0.3.20)
205
+ json (>= 1.1.3)
206
+ rdoc (~> 3.10)
207
+ simple_form (3.0.1)
208
+ actionpack (>= 4.0.0, < 4.1)
209
+ activemodel (>= 4.0.0, < 4.1)
210
+ slop (3.4.7)
211
+ sprockets (2.10.1)
212
+ hike (~> 1.2)
213
+ multi_json (~> 1.0)
214
+ rack (~> 1.0)
215
+ tilt (~> 1.1, != 1.3.0)
216
+ sprockets-rails (2.0.1)
217
+ actionpack (>= 3.0)
218
+ activesupport (>= 3.0)
219
+ sprockets (~> 2.8)
220
+ stringex (2.1.2)
221
+ thin (1.5.1)
222
+ daemons (>= 1.0.9)
223
+ eventmachine (>= 0.12.6)
224
+ rack (>= 1.0.0)
225
+ thor (0.18.1)
226
+ thread_safe (0.1.3)
227
+ atomic
228
+ tilt (1.4.1)
229
+ tire (0.6.1)
230
+ activemodel (>= 3.0)
231
+ activesupport
232
+ ansi
233
+ hashr (~> 0.0.19)
234
+ multi_json (~> 1.3)
235
+ rake
236
+ rest-client (~> 1.6)
237
+ treetop (1.4.15)
238
+ polyglot
239
+ polyglot (>= 0.3.1)
240
+ turbolinks (2.0.0)
241
+ coffee-rails
242
+ tzinfo (0.3.38)
243
+ uglifier (2.3.2)
244
+ execjs (>= 0.3.0)
245
+ json (>= 1.8.0)
246
+ warden (1.2.3)
247
+ rack (>= 1.0)
248
+ yajl-ruby (1.1.0)
249
+
250
+ PLATFORMS
251
+ ruby
252
+
253
+ DEPENDENCIES
254
+ RedCloth
255
+ aasm
256
+ acts_as_list!
257
+ ancestry
258
+ awesome_print
259
+ better_errors
260
+ binding_of_caller
261
+ bootstrap-sass
262
+ coffee-rails (~> 4.0.0)
263
+ devise
264
+ diffy
265
+ foreman
266
+ github-markdown
267
+ gollum-lib
268
+ haml-contrib
269
+ haml-rails
270
+ jbuilder (~> 1.2)
271
+ jquery-rails
272
+ kramdown
273
+ mysql2
274
+ omniauth-openid
275
+ plupload-rails
276
+ pry
277
+ pry-remote
278
+ public_activity
279
+ rack-mini-profiler
280
+ rails-assets-backbone
281
+ rails-assets-components-font-awesome
282
+ rails-assets-highlightjs
283
+ rails-assets-jquery-autosize
284
+ rails-assets-jquery-ui
285
+ rails-assets-underscore
286
+ rails-timeago
287
+ redcarpet
288
+ sass-rails (~> 4.0.0.rc1)
289
+ sdoc
290
+ simple_form
291
+ thin
292
+ tinymce-rails!
293
+ tire
294
+ turbolinks
295
+ uglifier (>= 1.3.0)
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2014 YOURNAME
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Procfile ADDED
@@ -0,0 +1,2 @@
1
+ web: thin start -p $PORT
2
+ devlog: tail -f log/development.log
data/README.md ADDED
@@ -0,0 +1 @@
1
+ blank right now.
data/Rakefile ADDED
@@ -0,0 +1,6 @@
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
+
6
+ Rails.application.class.load_tasks
File without changes
@@ -0,0 +1,31 @@
1
+ // This is a manifest file that'll be compiled into application.js, which will include all the files
2
+ // listed below.
3
+ //
4
+ // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
+ // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6
+ //
7
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
+ // compiled file.
9
+ //
10
+ // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
11
+ // about supported directives.
12
+ //
13
+ //= require jquery
14
+ //= require jquery_ujs
15
+ //= require jquery-ui
16
+ //= require jquery.mjs.nestedSortable
17
+ //
18
+ //= require bootstrap
19
+ //= require bootstrap-typeahead
20
+ // require bootstrap-tree
21
+ //= require bootstrap-tagsinput
22
+ //
23
+ //= require moxie
24
+ //= require plupload.dev
25
+ //= require tinymce-jquery
26
+ //= require tinymce/mention/plugin
27
+ //= require jquery-autosize
28
+ //= require jquery.timeago
29
+ //= require underscore
30
+ //= require backbone
31
+ //= require backbone/tawork
File without changes
File without changes
@@ -0,0 +1,11 @@
1
+ #= require_self
2
+ #= require_tree ./templates
3
+ #= require_tree ./models
4
+ #= require_tree ./views
5
+ #= require_tree ./routers
6
+
7
+ window.Tawork =
8
+ Models: {}
9
+ Collections: {}
10
+ Routers: {}
11
+ Views: {}
File without changes
@@ -0,0 +1,75 @@
1
+ class Tawork.Views.PageView extends Backbone.View
2
+ events: {}
3
+
4
+ initialize: (options = {}) ->
5
+ @page_id = @$el.data("page-id")
6
+ @initialize_sortable_tree()
7
+ @setup_uploader()
8
+ @$("[data-toggle=tooltip]").tooltip()
9
+
10
+ initialize_sortable_tree: ->
11
+ $self = @
12
+ $( "#sortable_#{@page_id}" ).nestedSortable
13
+ handle: ".node-handle"
14
+ items: "li"
15
+ start: (e, ui) ->
16
+ ui.placeholder.height ui.item.height()
17
+ placeholder: 'page-placeholder'
18
+ isTree: true
19
+ startCollapsed: false
20
+ update: (e, ui) ->
21
+ page_id = ui.item.data("page-id")
22
+ $parent = ui.item.parent()
23
+ parent_id = $parent.closest(".page").data("page-id")
24
+ position = $parent.find("> li").index(ui.item.get(0))
25
+ $.ajax
26
+ method: "POST"
27
+ url: "/wiki/pages/#{page_id}/reorder"
28
+ data:
29
+ parent_id: parent_id
30
+ position: position
31
+
32
+
33
+ setup_uploader: ->
34
+ uploader = new plupload.Uploader(
35
+ runtimes: "html5"
36
+ browse_button: "pickfiles" # you can pass in id...
37
+ container: document.getElementById("attachments") # ... or DOM Element itself
38
+ url: "/wiki/pages/#{@page_id}/attach"
39
+ filters:
40
+ max_file_size: "50mb"
41
+ multipart_params:
42
+ authenticity_token: $("meta[name=csrf-token]").attr('content')
43
+
44
+ init:
45
+ PostInit: ->
46
+ $("#filelist").html("")
47
+ # document.getElementById("uploadfiles").onclick = ->
48
+ # uploader.start()
49
+ # false
50
+
51
+ FilesAdded: (up, files) ->
52
+ plupload.each files, (file) ->
53
+ $template = $($("#upload_template").clone().html())
54
+ $template.attr("id", file.id).find(".filename").text(file.name + "(#{plupload.formatSize(file.size)})")
55
+ $("#filelist").append $template
56
+ uploader.start()
57
+
58
+
59
+ UploadProgress: (up, file) ->
60
+ $("##{file.id}").find(".bar").css(width: "#{file.percent}%")
61
+
62
+ FileUploaded: (up, file, response) ->
63
+ try
64
+ $("##{file.id}").fadeOut complete: ->
65
+ eval response.response
66
+ catch err
67
+ console.log err
68
+
69
+ Error: (up, err) ->
70
+ document.getElementById("console").innerHTML += "\nError #" + err.code + ": " + err.message
71
+ )
72
+
73
+ uploader.init()
74
+
75
+
@@ -0,0 +1,110 @@
1
+ class Tawork.Views.TicketView extends Backbone.View
2
+ events:
3
+ "click .trigger-event": "trigger_event"
4
+ "dblclick .ticket-details .panel-heading": "show_edit_form"
5
+ "click .cancel-edit-form": "cancel_edit_form"
6
+
7
+ initialize: (options = {}) ->
8
+ @ticket_id = @$el.data("ticket-id")
9
+ @initialize_user_assignment()
10
+ @initialize_sortable_tree()
11
+ @$('textarea').autosize()
12
+
13
+ show_edit_form: ->
14
+ @$(".ticket-details").hide()
15
+ @$(".edit-ticket-details").show()
16
+
17
+ cancel_edit_form: ->
18
+ @$(".edit-ticket-details").hide()
19
+ @$(".ticket-details").show()
20
+ false
21
+
22
+ trigger_event: (event) ->
23
+ # FIXME: this is using a hack right now
24
+ event_name = $(event.target).data("event")
25
+ console.log "even here?"
26
+ closest_ticket_id = $(event.target).closest(".ticket").data("ticket-id")
27
+ return if @ticket_id != closest_ticket_id
28
+
29
+ event.preventDefault()
30
+
31
+ $.ajax
32
+ method: "POST"
33
+ url: "/tickets/#{@ticket_id}/trigger_event"
34
+ data:
35
+ event: event_name
36
+
37
+ initialize_user_assignment: ->
38
+ $input = @$('.user-assignment-tags')
39
+ return if $input.length == 0
40
+
41
+ $input.tagsinput(
42
+ itemText: "name"
43
+ itemValue: "id"
44
+ )
45
+ $input.tagsinput("input").typeahead
46
+ source: (query, process) ->
47
+ processItems = (items) ->
48
+ texts = []
49
+ i = 0
50
+
51
+ while i < items.length
52
+ text = items[i].value
53
+ map[text] = items[i]
54
+ texts.push text
55
+ i++
56
+ process texts
57
+ @map = {}
58
+ map = @map
59
+ # data = typeahead.source(query)
60
+ data = $.get('/tickets/user_search', {query: query}, (data) ->
61
+ processItems(data)
62
+ )
63
+
64
+ updater: (text) ->
65
+ $input.tagsinput('add', @map[text]);
66
+
67
+ matcher: (text) ->
68
+ text.toLowerCase().indexOf(@query.trim().toLowerCase()) isnt -1
69
+
70
+ sorter: (texts) ->
71
+ texts.sort()
72
+
73
+ highlighter: (text) ->
74
+ regex = new RegExp("(" + @query + ")", "gi")
75
+ text.replace regex, "<strong>$1</strong>"
76
+
77
+ assignments = @$el.data("assignments")
78
+ $.each assignments, (_, assignment) ->
79
+ $input.tagsinput('add', assignment)
80
+
81
+ $input.on("change", (event) ->
82
+ $element = $(event.target)
83
+ return unless $element.data("tagsinput")
84
+ # $element.tagsinput("items")
85
+ val = $element.val()
86
+ val = "" if val is null
87
+ $input.closest("form").submit()
88
+ )
89
+
90
+ initialize_sortable_tree: ->
91
+ $( "#sortable_#{@ticket_id}" ).nestedSortable
92
+ handle: ".node-handle"
93
+ items: "li"
94
+ start: (e, ui) ->
95
+ ui.placeholder.height ui.item.height()
96
+ placeholder: 'ticket-placeholder'
97
+ isTree: true
98
+ startCollapsed: false
99
+ update: (e, ui) ->
100
+ ticket_id = ui.item.data("ticket-id")
101
+ $parent = ui.item.parent()
102
+ parent_id = $parent.closest(".ticket").data("ticket-id")
103
+ position = $parent.find("> li").index(ui.item.get(0))
104
+ $.ajax
105
+ method: "POST"
106
+ url: "/tickets/#{ticket_id}/reorder"
107
+ data:
108
+ parent_id: parent_id
109
+ position: position
110
+