blogy 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/blogy/posts_controller.rb +3 -3
- data/app/models/blogy/post.rb +4 -4
- data/app/models/blogy/post/translation.rb +33 -1
- data/db/migrate/20150216204624_add_document_document_tmp_remote_storage_format_to_blogy_post_translations.rb +9 -0
- data/lib/blogy/engine.rb +4 -0
- data/lib/blogy/version.rb +1 -1
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/schema.rb +6 -1
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +3536 -0
- data/test/dummy/log/test.log +2042 -0
- data/test/models/blogy/post/translation_test.rb +23 -3
- data/test/support/factories.rb +8 -0
- metadata +47 -3
- data/README.rdoc +0 -3
@@ -2,8 +2,28 @@ require 'test_helper'
|
|
2
2
|
|
3
3
|
module Blogy
|
4
4
|
class Post::TranslationTest < ActiveSupport::TestCase
|
5
|
-
|
6
|
-
|
7
|
-
|
5
|
+
let(:translation) { build_stubbed(:post_translation) }
|
6
|
+
|
7
|
+
it "is valid" do
|
8
|
+
translation.must_be :valid?
|
9
|
+
end
|
10
|
+
|
11
|
+
it "decide which format to use" do
|
12
|
+
plain = build_stubbed(:post_translation, format: :plain)
|
13
|
+
plain.expects(:value)
|
14
|
+
plain.formated
|
15
|
+
|
16
|
+
html = build_stubbed(:post_translation, format: :html)
|
17
|
+
html.expects(:value)
|
18
|
+
html.formated
|
19
|
+
|
20
|
+
markdown = build_stubbed(:post_translation, format: :markdown)
|
21
|
+
markdown.expects(:markdown)
|
22
|
+
markdown.formated
|
23
|
+
end
|
24
|
+
|
25
|
+
it "show up text, when text is selected" do
|
26
|
+
translation.value.must_equal translation.text
|
27
|
+
end
|
8
28
|
end
|
9
29
|
end
|
data/test/support/factories.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blogy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jiri Kolarik
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-03-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -38,6 +38,48 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '2.1'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: enumerize
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: kramdown
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: coderay
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
41
83
|
- !ruby/object:Gem::Dependency
|
42
84
|
name: active_model_serializers
|
43
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -116,7 +158,6 @@ extensions: []
|
|
116
158
|
extra_rdoc_files: []
|
117
159
|
files:
|
118
160
|
- MIT-LICENSE
|
119
|
-
- README.rdoc
|
120
161
|
- Rakefile
|
121
162
|
- app/controllers/blogy/application_controller.rb
|
122
163
|
- app/controllers/blogy/posts_controller.rb
|
@@ -126,6 +167,7 @@ files:
|
|
126
167
|
- config/routes.rb
|
127
168
|
- db/migrate/20150211002506_create_blogy_posts.rb
|
128
169
|
- db/migrate/20150211205643_create_blogy_post_translations.rb
|
170
|
+
- db/migrate/20150216204624_add_document_document_tmp_remote_storage_format_to_blogy_post_translations.rb
|
129
171
|
- lib/blogy.rb
|
130
172
|
- lib/blogy/engine.rb
|
131
173
|
- lib/blogy/version.rb
|
@@ -162,6 +204,7 @@ files:
|
|
162
204
|
- test/dummy/config/locales/en.yml
|
163
205
|
- test/dummy/config/routes.rb
|
164
206
|
- test/dummy/config/secrets.yml
|
207
|
+
- test/dummy/db/development.sqlite3
|
165
208
|
- test/dummy/db/schema.rb
|
166
209
|
- test/dummy/db/test.sqlite3
|
167
210
|
- test/dummy/log/development.log
|
@@ -232,6 +275,7 @@ test_files:
|
|
232
275
|
- test/dummy/config/routes.rb
|
233
276
|
- test/dummy/config/secrets.yml
|
234
277
|
- test/dummy/config.ru
|
278
|
+
- test/dummy/db/development.sqlite3
|
235
279
|
- test/dummy/db/schema.rb
|
236
280
|
- test/dummy/db/test.sqlite3
|
237
281
|
- test/dummy/log/development.log
|
data/README.rdoc
DELETED