rad_kit 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/components/captcha.rb +4 -4
- data/lib/components/kit.rb +5 -5
- data/lib/components/kit.yml +0 -2
- data/lib/components/models.rb +2 -5
- data/lib/components/models.yml +3 -0
- data/lib/kit/controller/authorized.rb +9 -8
- data/lib/kit/controller/captcha.rb +6 -6
- data/lib/kit/controller/localized.rb +2 -2
- data/lib/kit/gems.rb +12 -8
- data/lib/kit/i18n.rb +3 -3
- data/lib/kit/i18n/locales/ru/pluralization.rb +3 -3
- data/lib/kit/kit.rb +7 -7
- data/lib/kit/kit_text_utils.rb +6 -6
- data/lib/kit/misc/prepare_model.rb +4 -4
- data/lib/kit/models.rb +22 -5
- data/lib/kit/models/attachment_file.rb +27 -0
- data/lib/kit/models/{attachments_uploader_helper.rb → attachments_helper.rb} +34 -28
- data/lib/kit/models/authorized.rb +64 -63
- data/lib/kit/models/authorized_object.rb +70 -73
- data/lib/kit/models/base_file.rb +37 -0
- data/lib/kit/models/config.rb +30 -0
- data/lib/kit/models/indexes.rb +30 -0
- data/lib/kit/models/miscellaneous.rb +7 -1
- data/lib/kit/models/role.rb +17 -17
- data/lib/kit/models/tags.rb +71 -0
- data/lib/kit/models/tags_mixin.rb +39 -0
- data/lib/kit/mongodb_model.rb +13 -0
- data/lib/kit/mongodb_model/text_processor.rb +32 -0
- data/lib/kit/spec.rb +30 -30
- data/lib/kit/spec/items_controller_crud.rb +9 -9
- data/lib/kit/support.rb +1 -1
- data/lib/kit/tasks.rb +3 -7
- data/lib/text_utils.rb +2 -2
- data/lib/text_utils/code_highlighter.rb +17 -17
- data/lib/text_utils/custom_markdown.rb +7 -7
- data/lib/text_utils/ensure_utf.rb +3 -3
- data/lib/text_utils/format_qualifier.rb +2 -2
- data/lib/text_utils/html_sanitizer.rb +9 -9
- data/lib/text_utils/markdown.rb +9 -9
- data/lib/text_utils/pipe.rb +1 -1
- data/lib/text_utils/processor.rb +3 -3
- data/lib/text_utils/support.rb +3 -3
- data/lib/text_utils/truncate.rb +4 -4
- data/readme.md +3 -1
- data/spec/controller/authorization_spec.rb +45 -45
- data/spec/controller/captcha_spec.rb +18 -18
- data/spec/controller/comments_spec.rb +16 -14
- data/spec/controller/items_spec.rb +16 -17
- data/spec/i18n/i18n_spec.rb +5 -5
- data/spec/misc/kit_text_utils_spec.rb +5 -5
- data/spec/misc/prepare_model_spec.rb +6 -6
- data/spec/misc/user_error_spec.rb +8 -8
- data/spec/models/{attachments_uploader_helper_spec.rb → attachments_helper_spec.rb} +46 -50
- data/spec/models/{attachments_uploader_helper_spec → attachments_helper_spec}/v1/a.txt +0 -0
- data/spec/models/{attachments_uploader_helper_spec → attachments_helper_spec}/v1/b.txt +0 -0
- data/spec/models/{attachments_uploader_helper_spec → attachments_helper_spec}/v2/a.txt +0 -0
- data/spec/models/attachments_spec.rb +4 -7
- data/spec/models/authorization_spec.rb +15 -15
- data/spec/models/authorized_object_spec.rb +75 -75
- data/spec/models/item_spec.rb +44 -40
- data/spec/models/role_spec.rb +4 -4
- data/spec/models/tags_spec.rb +47 -21
- data/spec/models/uploader_spec.rb +13 -23
- data/spec/mongodb_model/text_processor_spec.rb +26 -0
- data/spec/spec_helper.rb +6 -4
- data/spec/spec_helper/factories.rb +3 -3
- data/spec/spec_helper/user.rb +4 -7
- data/spec/text_utils/code_highlighter_spec.rb +7 -7
- data/spec/text_utils/custom_markdown_spec.rb +14 -14
- data/spec/text_utils/format_qualifier_spec.rb +6 -6
- data/spec/text_utils/html_sanitizer_spec.rb +15 -15
- data/spec/text_utils/markdown_spec.rb +17 -17
- data/spec/text_utils/pipe_spec.rb +5 -5
- data/spec/text_utils/spec_helper.rb +1 -1
- data/spec/text_utils/text_processor_shared.rb +1 -1
- data/spec/text_utils/truncate_spec.rb +5 -5
- metadata +118 -114
- data/lib/kit/models/attachment_uploader.rb +0 -15
- data/lib/kit/models/file_uploader.rb +0 -26
- data/lib/kit/models_after.rb +0 -27
- data/lib/kit/mongoid.rb +0 -22
- data/lib/kit/mongoid/rad_miscellaneous.rb +0 -36
- data/lib/kit/mongoid/text_processor.rb +0 -44
- data/spec/mongoid/basic_spec.rb +0 -36
@@ -4,9 +4,9 @@ describe "FormatQualifier" do
|
|
4
4
|
before do
|
5
5
|
@processor = TextUtils::FormatQualifier.new
|
6
6
|
end
|
7
|
-
|
7
|
+
|
8
8
|
it_should_behave_like 'text processor'
|
9
|
-
|
9
|
+
|
10
10
|
it "should qualify format" do
|
11
11
|
[
|
12
12
|
'<b>some</b>', :html,
|
@@ -21,17 +21,17 @@ describe "FormatQualifier" do
|
|
21
21
|
env[:format].should == format
|
22
22
|
end
|
23
23
|
end
|
24
|
-
|
24
|
+
|
25
25
|
it "should qualify :html (from error)" do
|
26
26
|
html = <<HTML
|
27
27
|
<h2>Title</h2>
|
28
28
|
|
29
|
-
<p>body</p>
|
29
|
+
<p>body</p>
|
30
30
|
HTML
|
31
31
|
|
32
32
|
env = {}
|
33
33
|
@processor.call(html, env)
|
34
|
-
env[:format].should == :html
|
34
|
+
env[:format].should == :html
|
35
35
|
end
|
36
|
-
|
36
|
+
|
37
37
|
end
|
@@ -2,21 +2,21 @@ require 'text_utils/spec_helper'
|
|
2
2
|
|
3
3
|
describe "HtmlSanitizer" do
|
4
4
|
include RSpec::TextUtilsHelper
|
5
|
-
|
5
|
+
|
6
6
|
before do
|
7
7
|
@processor = TextUtils::HtmlSanitizer.new
|
8
8
|
@options = {format: :html}
|
9
9
|
end
|
10
|
-
|
10
|
+
|
11
11
|
it_should_behave_like 'text processor'
|
12
|
-
|
12
|
+
|
13
13
|
it "should escape restricted tags" do
|
14
14
|
%w(script object).each do |tag|
|
15
15
|
html = "<#{tag}}>some text</#{tag}>"
|
16
16
|
process(html).should_not include(tag)
|
17
17
|
end
|
18
18
|
end
|
19
|
-
|
19
|
+
|
20
20
|
it "shouldn't escape non-restricted tags" do
|
21
21
|
common_attr_names = %w(class style)
|
22
22
|
{
|
@@ -24,14 +24,14 @@ describe "HtmlSanitizer" do
|
|
24
24
|
a: %w(href title rel)
|
25
25
|
}.each do |tag, attr_names|
|
26
26
|
attrs = {}; (common_attr_names + attr_names).each{|n| attrs[n] = 'value'}
|
27
|
-
|
27
|
+
|
28
28
|
attrs_html = ""; attrs.each{|n, v| attrs_html << "#{n}='#{v}'"}
|
29
29
|
html = "<#{tag} #{attrs_html}}>some text</#{tag}>"
|
30
|
-
|
30
|
+
|
31
31
|
to_doc(html).css(tag.to_s).first.to_fuzzy_hash.should == attrs
|
32
32
|
end
|
33
33
|
end
|
34
|
-
|
34
|
+
|
35
35
|
it "should allow image inside of link (from error)" do
|
36
36
|
html = <<HTML
|
37
37
|
<a rel="images" class="image_box" href="/some_image">
|
@@ -43,7 +43,7 @@ HTML
|
|
43
43
|
doc.css('a').first.to_fuzzy_hash.should == {href: "/some_image", class: "image_box"}
|
44
44
|
doc.css('a img').first.to_fuzzy_hash.should == {src: "/some_image"}
|
45
45
|
end
|
46
|
-
|
46
|
+
|
47
47
|
it "should allow 'a' elements (from error)" do
|
48
48
|
html = <<HTML
|
49
49
|
<a href="http://www.some.com/some">Absolute Link</a>
|
@@ -54,13 +54,13 @@ HTML
|
|
54
54
|
doc.css("a").first[:href].should == "http://www.some.com/some"
|
55
55
|
doc.css("a").last[:href].should == "/some"
|
56
56
|
end
|
57
|
-
|
57
|
+
|
58
58
|
it "should allow div with any classes (from error)" do
|
59
59
|
html = %{<div class="col3 left"><a href='#'>text</a></div>}
|
60
60
|
to_doc(html).css("div.col3.left a").size.should == 1
|
61
61
|
end
|
62
|
-
|
63
|
-
it "should embed YouTube Videos" do
|
62
|
+
|
63
|
+
it "should embed YouTube Videos" do
|
64
64
|
html =<<HTML
|
65
65
|
<object width="425" height="344">
|
66
66
|
<param name="movie" value="http://www.youtube.com/v/s8hYKKXV5wU&hl=en_US&fs=1&"></param>
|
@@ -77,11 +77,11 @@ HTML
|
|
77
77
|
p2.to_fuzzy_hash.should == {name: 'allowFullScreen', value: 'true'}
|
78
78
|
p3.to_fuzzy_hash.should == {name: 'allowscriptaccess', value: 'always'}
|
79
79
|
embed.to_fuzzy_hash.should == {
|
80
|
-
src: 'http://www.youtube.com/v/s8hYKKXV5wU&hl=en_US&fs=1&',
|
81
|
-
type: 'application/x-shockwave-flash',
|
80
|
+
src: 'http://www.youtube.com/v/s8hYKKXV5wU&hl=en_US&fs=1&',
|
81
|
+
type: 'application/x-shockwave-flash',
|
82
82
|
allowscriptaccess: 'always',
|
83
|
-
allowfullscreen: 'true',
|
84
|
-
width: '425',
|
83
|
+
allowfullscreen: 'true',
|
84
|
+
width: '425',
|
85
85
|
height: '344'
|
86
86
|
}
|
87
87
|
end
|
@@ -2,22 +2,22 @@ require 'text_utils/spec_helper'
|
|
2
2
|
|
3
3
|
describe "Markdown" do
|
4
4
|
include RSpec::TextUtilsHelper
|
5
|
-
|
5
|
+
|
6
6
|
before do
|
7
7
|
@processor = TextUtils::Markdown.new
|
8
8
|
@options = {format: :markdown}
|
9
9
|
end
|
10
|
-
|
10
|
+
|
11
11
|
it_should_behave_like 'text processor'
|
12
|
-
|
12
|
+
|
13
13
|
it "should not touch single underscores inside words" do
|
14
14
|
process("foo_bar").should include("foo_bar")
|
15
15
|
end
|
16
|
-
|
16
|
+
|
17
17
|
it "should correctly guess links (from error)" do
|
18
18
|
to_doc("http://some_domain.com http://some_domain.com").css('a').size == 2
|
19
19
|
end
|
20
|
-
|
20
|
+
|
21
21
|
it "basic test" do
|
22
22
|
text = <<MARKDOWN
|
23
23
|
# Title
|
@@ -29,18 +29,18 @@ MARKDOWN
|
|
29
29
|
doc.css('h1').first.content.should == 'Title'
|
30
30
|
doc.css("p b, p strong").first.content.should == 'text'
|
31
31
|
end
|
32
|
-
|
33
|
-
it "should guess urls" do
|
32
|
+
|
33
|
+
it "should guess urls" do
|
34
34
|
doc = to_doc "This is a http://www.some.com/some link"
|
35
35
|
doc.content.strip.should == "This is a http://www.some.com/some link"
|
36
36
|
doc.css("p a").first.to_fuzzy_hash.should == {href: "http://www.some.com/some"}
|
37
|
-
|
37
|
+
|
38
38
|
# from error
|
39
39
|
doc = to_doc "http://www.some.com/some"
|
40
40
|
doc.content.strip.should == "http://www.some.com/some"
|
41
41
|
doc.css("p a").first.to_fuzzy_hash.should == {href: "http://www.some.com/some"}
|
42
42
|
end
|
43
|
-
|
43
|
+
|
44
44
|
it "code blocks" do
|
45
45
|
text = <<MARKDOWN
|
46
46
|
``` ruby
|
@@ -50,7 +50,7 @@ MARKDOWN
|
|
50
50
|
|
51
51
|
to_doc(text).css('code').first.to_fuzzy_hash.should == {class: 'ruby'}
|
52
52
|
end
|
53
|
-
|
53
|
+
|
54
54
|
it "definitions" do
|
55
55
|
text = <<MARKDOWN
|
56
56
|
Ruby IoC [Micon][micon]
|
@@ -60,7 +60,7 @@ MARKDOWN
|
|
60
60
|
|
61
61
|
to_doc(text).css('a').first.to_fuzzy_hash.should == {href: 'https://github.com/alexeypetrushin/micon'}
|
62
62
|
end
|
63
|
-
|
63
|
+
|
64
64
|
describe "new lines" do
|
65
65
|
it "should correctly insert newline (from error)" do
|
66
66
|
html = <<HTML
|
@@ -72,7 +72,7 @@ HTML
|
|
72
72
|
|
73
73
|
to_doc(html).css('br').size.should == 1
|
74
74
|
end
|
75
|
-
|
75
|
+
|
76
76
|
it "shouldn't add new lines after image (from error)" do
|
77
77
|
html = <<HTML
|
78
78
|
a ![img] b
|
@@ -82,7 +82,7 @@ HTML
|
|
82
82
|
|
83
83
|
to_doc(html).css('br').size.should == 0
|
84
84
|
end
|
85
|
-
|
85
|
+
|
86
86
|
it "d" do
|
87
87
|
html = <<HTML
|
88
88
|
a
|
@@ -91,10 +91,10 @@ b
|
|
91
91
|
|
92
92
|
[img]: /some_link
|
93
93
|
HTML
|
94
|
-
|
94
|
+
|
95
95
|
to_doc(html).css('br').size.should == 2
|
96
96
|
end
|
97
|
-
|
97
|
+
|
98
98
|
it "should convert \n to <br/>" do
|
99
99
|
to_doc("foo\nbar").css('br').size.should == 1
|
100
100
|
end
|
@@ -106,9 +106,9 @@ HTML
|
|
106
106
|
|
107
107
|
to_doc(html).css('br').size.should == 0
|
108
108
|
end
|
109
|
-
|
109
|
+
|
110
110
|
it "shouldn't add empty <p> before first line (from error)" do
|
111
111
|
process("<span>text</span>text").should_not =~ /<p>\s*<\/p>/
|
112
112
|
end
|
113
|
-
end
|
113
|
+
end
|
114
114
|
end
|
@@ -2,18 +2,18 @@ require 'text_utils/spec_helper'
|
|
2
2
|
|
3
3
|
describe "FormatQualifier" do
|
4
4
|
before :all do
|
5
|
-
class TextProcA < TextUtils::Processor
|
5
|
+
class TextProcA < TextUtils::Processor
|
6
6
|
def call data, env
|
7
7
|
call_next "#{data} a", env
|
8
8
|
end
|
9
9
|
end
|
10
|
-
|
10
|
+
|
11
11
|
class TextProcB < TextUtils::Processor
|
12
12
|
def initialize processor, text
|
13
13
|
super(processor)
|
14
14
|
@text = text
|
15
15
|
end
|
16
|
-
|
16
|
+
|
17
17
|
def call data, env
|
18
18
|
call_next "#{data} #{@text}", env
|
19
19
|
end
|
@@ -22,13 +22,13 @@ describe "FormatQualifier" do
|
|
22
22
|
after :all do
|
23
23
|
remove_constants :TextProcA, :TextProcB
|
24
24
|
end
|
25
|
-
|
25
|
+
|
26
26
|
before do
|
27
27
|
@pipe = TextUtils::Pipe.new \
|
28
28
|
TextProcA,
|
29
29
|
[TextProcB, 'b']
|
30
30
|
end
|
31
|
-
|
31
|
+
|
32
32
|
it "should qualify :html format" do
|
33
33
|
@pipe.call('text').should == "text a b"
|
34
34
|
end
|
@@ -4,19 +4,19 @@ describe "Truncate" do
|
|
4
4
|
before do
|
5
5
|
@processor = TextUtils::Truncate.new nil, 20
|
6
6
|
end
|
7
|
-
|
7
|
+
|
8
8
|
it_should_behave_like 'text processor'
|
9
|
-
|
9
|
+
|
10
10
|
it "should truncate text" do
|
11
11
|
text = %{Hi there, I have a page that will list news articles}
|
12
12
|
@processor.call(text, {format: :text}).should == "Hi there, I have a ..."
|
13
13
|
end
|
14
|
-
|
14
|
+
|
15
15
|
it "should truncate html" do
|
16
16
|
text = %{Hi <div><b>there</b>, I have a page that will list news articles</div>}
|
17
17
|
@processor.call(text, {format: :html}).should == "Hi there, I have a ..."
|
18
|
-
|
18
|
+
|
19
19
|
text = %{a<br/>b}
|
20
20
|
@processor.call(text, {format: :html}).should == "a b" # from error
|
21
|
-
end
|
21
|
+
end
|
22
22
|
end
|
metadata
CHANGED
@@ -1,137 +1,143 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: rad_kit
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.9
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- Alexey Petrushin
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
dependencies:
|
16
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2011-09-22 00:00:00.000000000Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
17
15
|
name: i18n
|
18
|
-
requirement: &
|
16
|
+
requirement: &2843350 !ruby/object:Gem::Requirement
|
19
17
|
none: false
|
20
|
-
requirements:
|
21
|
-
- -
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version: 0.5
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0.5'
|
24
22
|
type: :runtime
|
25
23
|
prerelease: false
|
26
|
-
version_requirements: *
|
27
|
-
- !ruby/object:Gem::Dependency
|
24
|
+
version_requirements: *2843350
|
25
|
+
- !ruby/object:Gem::Dependency
|
28
26
|
name: redcarpet
|
29
|
-
requirement: &
|
27
|
+
requirement: &2843110 !ruby/object:Gem::Requirement
|
30
28
|
none: false
|
31
|
-
requirements:
|
32
|
-
- -
|
33
|
-
- !ruby/object:Gem::Version
|
34
|
-
version: 1.17
|
29
|
+
requirements:
|
30
|
+
- - ~>
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '1.17'
|
35
33
|
type: :runtime
|
36
34
|
prerelease: false
|
37
|
-
version_requirements: *
|
38
|
-
- !ruby/object:Gem::Dependency
|
35
|
+
version_requirements: *2843110
|
36
|
+
- !ruby/object:Gem::Dependency
|
39
37
|
name: sanitize
|
40
|
-
requirement: &
|
38
|
+
requirement: &2842870 !ruby/object:Gem::Requirement
|
41
39
|
none: false
|
42
|
-
requirements:
|
43
|
-
- -
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
version: 1.2
|
40
|
+
requirements:
|
41
|
+
- - ~>
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '1.2'
|
46
44
|
type: :runtime
|
47
45
|
prerelease: false
|
48
|
-
version_requirements: *
|
49
|
-
- !ruby/object:Gem::Dependency
|
46
|
+
version_requirements: *2842870
|
47
|
+
- !ruby/object:Gem::Dependency
|
50
48
|
name: stringex
|
51
|
-
requirement: &
|
49
|
+
requirement: &2842630 !ruby/object:Gem::Requirement
|
52
50
|
none: false
|
53
|
-
requirements:
|
54
|
-
- -
|
55
|
-
- !ruby/object:Gem::Version
|
56
|
-
version: 1.2
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.2'
|
57
55
|
type: :runtime
|
58
56
|
prerelease: false
|
59
|
-
version_requirements: *
|
60
|
-
- !ruby/object:Gem::Dependency
|
61
|
-
name:
|
62
|
-
requirement: &
|
57
|
+
version_requirements: *2842630
|
58
|
+
- !ruby/object:Gem::Dependency
|
59
|
+
name: nokogiri
|
60
|
+
requirement: &2842390 !ruby/object:Gem::Requirement
|
63
61
|
none: false
|
64
|
-
requirements:
|
65
|
-
- -
|
66
|
-
- !ruby/object:Gem::Version
|
67
|
-
version:
|
62
|
+
requirements:
|
63
|
+
- - ~>
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: '1.4'
|
68
66
|
type: :runtime
|
69
67
|
prerelease: false
|
70
|
-
version_requirements: *
|
71
|
-
- !ruby/object:Gem::Dependency
|
68
|
+
version_requirements: *2842390
|
69
|
+
- !ruby/object:Gem::Dependency
|
72
70
|
name: recaptcha
|
73
|
-
requirement: &
|
71
|
+
requirement: &2842150 !ruby/object:Gem::Requirement
|
74
72
|
none: false
|
75
|
-
requirements:
|
76
|
-
- -
|
77
|
-
- !ruby/object:Gem::Version
|
78
|
-
version: 0.3
|
73
|
+
requirements:
|
74
|
+
- - ~>
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0.3'
|
79
77
|
type: :runtime
|
80
78
|
prerelease: false
|
81
|
-
version_requirements: *
|
82
|
-
- !ruby/object:Gem::Dependency
|
79
|
+
version_requirements: *2842150
|
80
|
+
- !ruby/object:Gem::Dependency
|
81
|
+
name: mini_magick
|
82
|
+
requirement: &2841910 !ruby/object:Gem::Requirement
|
83
|
+
none: false
|
84
|
+
requirements:
|
85
|
+
- - ~>
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '3.2'
|
88
|
+
type: :runtime
|
89
|
+
prerelease: false
|
90
|
+
version_requirements: *2841910
|
91
|
+
- !ruby/object:Gem::Dependency
|
83
92
|
name: rad_core
|
84
|
-
requirement: &
|
93
|
+
requirement: &2841670 !ruby/object:Gem::Requirement
|
85
94
|
none: false
|
86
|
-
requirements:
|
87
|
-
- -
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version:
|
95
|
+
requirements:
|
96
|
+
- - ! '>='
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: '0'
|
90
99
|
type: :runtime
|
91
100
|
prerelease: false
|
92
|
-
version_requirements: *
|
93
|
-
- !ruby/object:Gem::Dependency
|
101
|
+
version_requirements: *2841670
|
102
|
+
- !ruby/object:Gem::Dependency
|
94
103
|
name: rad_common_interface
|
95
|
-
requirement: &
|
104
|
+
requirement: &2841430 !ruby/object:Gem::Requirement
|
96
105
|
none: false
|
97
|
-
requirements:
|
98
|
-
- -
|
99
|
-
- !ruby/object:Gem::Version
|
100
|
-
version:
|
106
|
+
requirements:
|
107
|
+
- - ! '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
101
110
|
type: :runtime
|
102
111
|
prerelease: false
|
103
|
-
version_requirements: *
|
104
|
-
- !ruby/object:Gem::Dependency
|
112
|
+
version_requirements: *2841430
|
113
|
+
- !ruby/object:Gem::Dependency
|
105
114
|
name: rad_assets
|
106
|
-
requirement: &
|
115
|
+
requirement: &2841190 !ruby/object:Gem::Requirement
|
107
116
|
none: false
|
108
|
-
requirements:
|
109
|
-
- -
|
110
|
-
- !ruby/object:Gem::Version
|
111
|
-
version:
|
117
|
+
requirements:
|
118
|
+
- - ! '>='
|
119
|
+
- !ruby/object:Gem::Version
|
120
|
+
version: '0'
|
112
121
|
type: :runtime
|
113
122
|
prerelease: false
|
114
|
-
version_requirements: *
|
115
|
-
- !ruby/object:Gem::Dependency
|
116
|
-
name:
|
117
|
-
requirement: &
|
123
|
+
version_requirements: *2841190
|
124
|
+
- !ruby/object:Gem::Dependency
|
125
|
+
name: mongodb_model
|
126
|
+
requirement: &2840950 !ruby/object:Gem::Requirement
|
118
127
|
none: false
|
119
|
-
requirements:
|
120
|
-
- -
|
121
|
-
- !ruby/object:Gem::Version
|
122
|
-
version:
|
128
|
+
requirements:
|
129
|
+
- - ! '>='
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
123
132
|
type: :runtime
|
124
133
|
prerelease: false
|
125
|
-
version_requirements: *
|
134
|
+
version_requirements: *2840950
|
126
135
|
description:
|
127
136
|
email:
|
128
137
|
executables: []
|
129
|
-
|
130
138
|
extensions: []
|
131
|
-
|
132
139
|
extra_rdoc_files: []
|
133
|
-
|
134
|
-
files:
|
140
|
+
files:
|
135
141
|
- Rakefile
|
136
142
|
- readme.md
|
137
143
|
- lib/components/captcha.rb
|
@@ -139,6 +145,7 @@ files:
|
|
139
145
|
- lib/components/kit.rb
|
140
146
|
- lib/components/kit.yml
|
141
147
|
- lib/components/models.rb
|
148
|
+
- lib/components/models.yml
|
142
149
|
- lib/kit/controller/authorized.rb
|
143
150
|
- lib/kit/controller/captcha.rb
|
144
151
|
- lib/kit/controller/localized.rb
|
@@ -151,19 +158,21 @@ files:
|
|
151
158
|
- lib/kit/kit_text_utils.rb
|
152
159
|
- lib/kit/misc/prepare_model.rb
|
153
160
|
- lib/kit/misc/user_error.rb
|
154
|
-
- lib/kit/models/
|
155
|
-
- lib/kit/models/
|
161
|
+
- lib/kit/models/attachment_file.rb
|
162
|
+
- lib/kit/models/attachments_helper.rb
|
156
163
|
- lib/kit/models/authorized.rb
|
157
164
|
- lib/kit/models/authorized_object.rb
|
165
|
+
- lib/kit/models/base_file.rb
|
166
|
+
- lib/kit/models/config.rb
|
158
167
|
- lib/kit/models/default_permissions.yml
|
159
|
-
- lib/kit/models/
|
168
|
+
- lib/kit/models/indexes.rb
|
160
169
|
- lib/kit/models/miscellaneous.rb
|
161
170
|
- lib/kit/models/role.rb
|
171
|
+
- lib/kit/models/tags.rb
|
172
|
+
- lib/kit/models/tags_mixin.rb
|
162
173
|
- lib/kit/models.rb
|
163
|
-
- lib/kit/
|
164
|
-
- lib/kit/
|
165
|
-
- lib/kit/mongoid/text_processor.rb
|
166
|
-
- lib/kit/mongoid.rb
|
174
|
+
- lib/kit/mongodb_model/text_processor.rb
|
175
|
+
- lib/kit/mongodb_model.rb
|
167
176
|
- lib/kit/spec/items_controller_crud.rb
|
168
177
|
- lib/kit/spec.rb
|
169
178
|
- lib/kit/support/string.rb
|
@@ -190,21 +199,21 @@ files:
|
|
190
199
|
- spec/misc/kit_text_utils_spec.rb
|
191
200
|
- spec/misc/prepare_model_spec.rb
|
192
201
|
- spec/misc/user_error_spec.rb
|
202
|
+
- spec/models/attachments_helper_spec/v1/a.txt
|
203
|
+
- spec/models/attachments_helper_spec/v1/b.txt
|
204
|
+
- spec/models/attachments_helper_spec/v2/a.txt
|
205
|
+
- spec/models/attachments_helper_spec.rb
|
193
206
|
- spec/models/attachments_spec/a.txt
|
194
207
|
- spec/models/attachments_spec.rb
|
195
|
-
- spec/models/attachments_uploader_helper_spec/v1/a.txt
|
196
|
-
- spec/models/attachments_uploader_helper_spec/v1/b.txt
|
197
|
-
- spec/models/attachments_uploader_helper_spec/v2/a.txt
|
198
|
-
- spec/models/attachments_uploader_helper_spec.rb
|
199
208
|
- spec/models/authorization_spec.rb
|
200
209
|
- spec/models/authorized_object_spec.rb
|
201
210
|
- spec/models/comments_spec.rb
|
202
211
|
- spec/models/item_spec.rb
|
203
212
|
- spec/models/role_spec.rb
|
204
213
|
- spec/models/tags_spec.rb
|
205
|
-
-
|
214
|
+
- spec/models/uploader_spec/файл с пробелами.txt
|
206
215
|
- spec/models/uploader_spec.rb
|
207
|
-
- spec/
|
216
|
+
- spec/mongodb_model/text_processor_spec.rb
|
208
217
|
- spec/spec_helper/controller.rb
|
209
218
|
- spec/spec_helper/factories.rb
|
210
219
|
- spec/spec_helper/user.rb
|
@@ -218,33 +227,28 @@ files:
|
|
218
227
|
- spec/text_utils/spec_helper.rb
|
219
228
|
- spec/text_utils/text_processor_shared.rb
|
220
229
|
- spec/text_utils/truncate_spec.rb
|
221
|
-
has_rdoc: true
|
222
230
|
homepage: http://github.com/alexeypetrushin/rad_kit
|
223
231
|
licenses: []
|
224
|
-
|
225
232
|
post_install_message:
|
226
233
|
rdoc_options: []
|
227
|
-
|
228
|
-
require_paths:
|
234
|
+
require_paths:
|
229
235
|
- lib
|
230
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
236
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
231
237
|
none: false
|
232
|
-
requirements:
|
233
|
-
- -
|
234
|
-
- !ruby/object:Gem::Version
|
235
|
-
version:
|
236
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
238
|
+
requirements:
|
239
|
+
- - ! '>='
|
240
|
+
- !ruby/object:Gem::Version
|
241
|
+
version: '0'
|
242
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
237
243
|
none: false
|
238
|
-
requirements:
|
239
|
-
- -
|
240
|
-
- !ruby/object:Gem::Version
|
241
|
-
version:
|
244
|
+
requirements:
|
245
|
+
- - ! '>='
|
246
|
+
- !ruby/object:Gem::Version
|
247
|
+
version: '0'
|
242
248
|
requirements: []
|
243
|
-
|
244
249
|
rubyforge_project:
|
245
|
-
rubygems_version: 1.
|
250
|
+
rubygems_version: 1.8.6
|
246
251
|
signing_key:
|
247
252
|
specification_version: 3
|
248
253
|
summary: Rapid Application Development Kit for Rad Framework
|
249
254
|
test_files: []
|
250
|
-
|