tawork 0.0.31 → 0.0.33
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.
- checksums.yaml +8 -8
- data/.gitignore +1 -0
- data/.rvmrc +1 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +2 -0
- data/app/helpers/application_helper.rb +15 -0
- data/app/models/attachment.rb +3 -2
- data/app/views/layouts/application.html.haml +1 -1
- data/app/views/search/_attachment.html.haml +3 -1
- data/app/views/search/_page.html.haml +2 -9
- data/app/views/search/_search_trail.html.haml +5 -0
- data/app/views/search/_space.html.haml +1 -1
- data/app/views/wiki/pages/history.html.haml +1 -0
- data/app/views/wiki/pages/index.html.haml +2 -1
- data/app/views/wiki/pages/new.html.haml +1 -0
- data/app/views/wiki/pages/show.html.haml +1 -0
- data/app/views/wiki/spaces/new.html.haml +1 -0
- data/db/migrate/20140324123647_increase_body_on_pages.rb +5 -0
- data/db/migrate/20140324124211_add_extracted_text_to_attachments.rb +5 -0
- data/db/schema.rb +5 -4
- data/lib/tawork/version.rb +1 -1
- data/tawork.gemspec +1 -1
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MTI1MWUwYTliNTRiNzAxMTY5YjMxYWY4ZGFkM2EwOTdjNjk5OTFkNg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZmE4NjNjODAxYjJiNjZlYmM4OTAxYWY3YmY1YjQ2MjQ1MDdhZDY1ZQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NjdjNWVkZDM5YmY2NDNkYjZmZjYzOGNmYThkMzNkMzliMzYzMDkwYmVjZDE1
|
10
|
+
MDJhMzZjNzU1NmQxNjJmYjE3ZDZiZWM3MjQ3N2I0ZGQwNTQyMTM5MjQwNmM0
|
11
|
+
NmZmNTM4MjIzZTkxMGQ4NGVmMzY3ZTc5NjYwZDI4NTk1YzIxYzM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MzJlNWRiNTkyMjI2YjFlMmIyZWMyMTlkMGU0Zjg3MmM3ZmJiNTRiZjA5OTQw
|
14
|
+
Mzk3ODcxYWE3NDA0MjEzYzExNDEwMzkzOGI4ZDk4Y2EzZmJlYzYwMDc0MTJi
|
15
|
+
YjRjNmQ1NGJiZTgyNTczZThkM2Y0NWQ1OTc4ZTM1OTgyNGRhMzc=
|
data/.gitignore
CHANGED
data/.rvmrc
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
rvm 1.9.3@tawork
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -290,6 +290,7 @@ GEM
|
|
290
290
|
actionpack (>= 4.0.0, < 4.1)
|
291
291
|
activemodel (>= 4.0.0, < 4.1)
|
292
292
|
slop (3.5.0)
|
293
|
+
spring (1.1.2)
|
293
294
|
sprockets (2.11.0)
|
294
295
|
hike (~> 1.2)
|
295
296
|
multi_json (~> 1.0)
|
@@ -369,6 +370,7 @@ DEPENDENCIES
|
|
369
370
|
sass-rails (~> 4.0.0.rc1)
|
370
371
|
sdoc
|
371
372
|
simple_form
|
373
|
+
spring
|
372
374
|
thin
|
373
375
|
tinymce-rails!
|
374
376
|
turbolinks
|
@@ -17,4 +17,19 @@ module ApplicationHelper
|
|
17
17
|
)
|
18
18
|
end
|
19
19
|
end
|
20
|
+
|
21
|
+
def title(page_title)
|
22
|
+
content_for(:title) { page_title }
|
23
|
+
end
|
24
|
+
|
25
|
+
def icon_for(thing)
|
26
|
+
case thing
|
27
|
+
when Space
|
28
|
+
icon = "bullseye"
|
29
|
+
when Page
|
30
|
+
icon = "file"
|
31
|
+
end
|
32
|
+
|
33
|
+
tag(:i, class: "fa fa-#{icon}")
|
34
|
+
end
|
20
35
|
end
|
data/app/models/attachment.rb
CHANGED
@@ -6,6 +6,7 @@ class Attachment < ActiveRecord::Base
|
|
6
6
|
belongs_to :attachable, :polymorphic => true
|
7
7
|
validates_presence_of :attachable
|
8
8
|
after_update :update_version_count
|
9
|
+
before_save :set_extracted_text
|
9
10
|
|
10
11
|
settings analysis: {
|
11
12
|
filter: {
|
@@ -104,7 +105,7 @@ class Attachment < ActiveRecord::Base
|
|
104
105
|
json
|
105
106
|
end
|
106
107
|
|
107
|
-
def
|
108
|
+
def set_extracted_text
|
108
109
|
tmp_dir = File.join Rails.root, "tmp", "#{id}_#{Time.now.to_i}"
|
109
110
|
text_dir = File.join tmp_dir, "text_dump"
|
110
111
|
tmp_filename = File.join tmp_dir, filename
|
@@ -131,7 +132,7 @@ class Attachment < ActiveRecord::Base
|
|
131
132
|
:replace => '', # Use a blank for those replacements
|
132
133
|
:universal_newline => true # Always break lines with \n
|
133
134
|
}
|
134
|
-
text.encode(Encoding.find('ASCII'), encoding_options)
|
135
|
+
self.extracted_text = text.encode(Encoding.find('ASCII'), encoding_options)
|
135
136
|
rescue
|
136
137
|
Rails.logger.info "document not extractable."
|
137
138
|
end
|
@@ -1,12 +1,5 @@
|
|
1
1
|
-# %pre= result.to_yaml
|
2
2
|
= link_to wiki_page_path(result) do
|
3
|
-
|
3
|
+
= icon_for result
|
4
4
|
= result.title
|
5
|
-
|
6
|
-
- if result.parent.present? && !result.parent.is_a?(Space)
|
7
|
-
||
|
8
|
-
%i.fa.fa-file
|
9
|
-
= result.parent.title
|
10
|
-
||
|
11
|
-
%i.fa.fa-bullseye
|
12
|
-
= result.root.title
|
5
|
+
= render 'search_trail', node: result
|
data/db/schema.rb
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
#
|
12
12
|
# It's strongly recommended that you check this file into your version control system.
|
13
13
|
|
14
|
-
ActiveRecord::Schema.define(version:
|
14
|
+
ActiveRecord::Schema.define(version: 20140324124211) do
|
15
15
|
|
16
16
|
create_table "activities", force: true do |t|
|
17
17
|
t.integer "trackable_id"
|
@@ -51,7 +51,8 @@ ActiveRecord::Schema.define(version: 20140319052313) do
|
|
51
51
|
t.integer "attachable_id"
|
52
52
|
t.datetime "created_at"
|
53
53
|
t.datetime "updated_at"
|
54
|
-
t.integer "version_count",
|
54
|
+
t.integer "version_count", default: 1
|
55
|
+
t.text "extracted_text", limit: 2147483647
|
55
56
|
end
|
56
57
|
|
57
58
|
create_table "comments", force: true do |t|
|
@@ -79,9 +80,9 @@ ActiveRecord::Schema.define(version: 20140319052313) do
|
|
79
80
|
t.string "type"
|
80
81
|
t.string "ancestry"
|
81
82
|
t.string "title"
|
82
|
-
t.text "body"
|
83
|
+
t.text "body", limit: 2147483647
|
83
84
|
t.integer "creator_id"
|
84
|
-
t.integer "position",
|
85
|
+
t.integer "position", default: 1000
|
85
86
|
t.datetime "created_at"
|
86
87
|
t.datetime "updated_at"
|
87
88
|
end
|
data/lib/tawork/version.rb
CHANGED
data/tawork.gemspec
CHANGED
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
|
|
14
14
|
s.description = "Wiki and Tickets"
|
15
15
|
s.license = "MIT"
|
16
16
|
|
17
|
-
s.files = `git ls-files`.split($/)
|
17
|
+
s.files = `git ls-files`.split($/).reject{|x| x =~ /^bin/ }
|
18
18
|
s.executables = s.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
19
19
|
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
20
20
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tawork
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.33
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adnan Ali
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -33,6 +33,7 @@ extra_rdoc_files: []
|
|
33
33
|
files:
|
34
34
|
- .DS_Store
|
35
35
|
- .gitignore
|
36
|
+
- .rvmrc
|
36
37
|
- Gemfile
|
37
38
|
- Gemfile.lock
|
38
39
|
- MIT-LICENSE
|
@@ -129,6 +130,7 @@ files:
|
|
129
130
|
- app/views/public_activity/ticket/_update_details.html.haml
|
130
131
|
- app/views/search/_attachment.html.haml
|
131
132
|
- app/views/search/_page.html.haml
|
133
|
+
- app/views/search/_search_trail.html.haml
|
132
134
|
- app/views/search/_space.html.haml
|
133
135
|
- app/views/search/index.html.haml
|
134
136
|
- app/views/tickets/_activity.html.haml
|
@@ -221,6 +223,8 @@ files:
|
|
221
223
|
- db/migrate/20140314014649_add_missing_unique_indices.acts_as_taggable_on_engine.rb
|
222
224
|
- db/migrate/20140319050456_add_version_count_to_attachment.rb
|
223
225
|
- db/migrate/20140319052313_create_deleted_items.rb
|
226
|
+
- db/migrate/20140324123647_increase_body_on_pages.rb
|
227
|
+
- db/migrate/20140324124211_add_extracted_text_to_attachments.rb
|
224
228
|
- db/schema.rb
|
225
229
|
- db/seeds.rb
|
226
230
|
- init.rb
|