bit_core 2.0.0.beta1 → 2.0.0.beta2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +17 -2
- data/app/models/bit_core/audio_slide.rb +1 -1
- data/app/models/bit_core/content_module.rb +2 -1
- data/app/models/bit_core/content_provider.rb +5 -4
- data/app/models/bit_core/content_providers/null.rb +2 -1
- data/app/models/bit_core/content_providers/slideshow_provider.rb +2 -1
- data/app/models/bit_core/slide.rb +9 -1
- data/app/models/bit_core/slideshow.rb +1 -0
- data/app/models/bit_core/tool.rb +1 -0
- data/app/models/bit_core/video_slide.rb +1 -1
- data/lib/bit_core/engine.rb +1 -0
- data/lib/bit_core/version.rb +2 -1
- data/lib/bit_core.rb +1 -0
- data/lib/tasks/bit_core_tasks.rake +1 -0
- data/spec/dummy/log/test.log +1759 -0
- data/spec/models/bit_core/content_module_spec.rb +1 -0
- data/spec/models/bit_core/content_provider_spec.rb +1 -0
- data/spec/models/bit_core/content_providers/slideshow_provider_spec.rb +1 -0
- data/spec/models/bit_core/slide_spec.rb +24 -2
- data/spec/models/bit_core/slideshow_spec.rb +1 -0
- data/spec/spec_helper.rb +4 -3
- metadata +43 -15
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
require "spec_helper"
|
2
3
|
|
3
4
|
module BitCore
|
@@ -12,13 +13,34 @@ module BitCore
|
|
12
13
|
it "should render markdown as html" do
|
13
14
|
subject.body = "# header"
|
14
15
|
|
15
|
-
expect(subject.render_body).to match(
|
16
|
+
expect(subject.render_body).to match(%r{<h1>header<\/h1>})
|
16
17
|
end
|
17
18
|
|
18
19
|
it "should escape html" do
|
19
20
|
subject.body = "<div>my content</div>"
|
20
21
|
|
21
|
-
expect(subject.render_body).to match(
|
22
|
+
expect(subject.render_body).to match(%r{<p>my content<\/p>})
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
describe "when validated" do
|
27
|
+
context "if the options attribute is present" do
|
28
|
+
it "normalizes it" do
|
29
|
+
hashable = Struct.new("Hashable", :to_h).new("foo": "bar")
|
30
|
+
subject.options = hashable
|
31
|
+
subject.valid?
|
32
|
+
|
33
|
+
expect(subject.options).to eq("foo": "bar")
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
context "if the options attribute isn't present" do
|
38
|
+
it "leaves it as nil" do
|
39
|
+
subject.options = nil
|
40
|
+
subject.valid?
|
41
|
+
|
42
|
+
expect(subject.options).to be_nil
|
43
|
+
end
|
22
44
|
end
|
23
45
|
end
|
24
46
|
|
data/spec/spec_helper.rb
CHANGED
@@ -1,16 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
ENV["RAILS_ENV"] ||= "test"
|
2
3
|
|
3
|
-
require File.expand_path("../dummy/config/environment.rb",
|
4
|
+
require File.expand_path("../dummy/config/environment.rb", __FILE__)
|
4
5
|
require "rspec/rails"
|
5
6
|
|
6
7
|
Rails.backtrace_cleaner.remove_silencers!
|
7
8
|
|
8
9
|
# Load support files
|
9
|
-
Dir["#{
|
10
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
10
11
|
|
11
12
|
RSpec.configure do |config|
|
12
13
|
config.mock_with :rspec
|
13
|
-
config.fixture_path = "#{
|
14
|
+
config.fixture_path = "#{File.dirname(__FILE__)}/fixtures"
|
14
15
|
config.use_transactional_fixtures = true
|
15
16
|
config.order = "random"
|
16
17
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bit_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0.
|
4
|
+
version: 2.0.0.beta2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Carty-Fickes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|
@@ -16,70 +16,70 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 5.0.0.
|
19
|
+
version: 5.0.0.rc1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 5.0.0.
|
26
|
+
version: 5.0.0.rc1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: actionview
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 5.0.0.
|
33
|
+
version: 5.0.0.rc1
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 5.0.0.
|
40
|
+
version: 5.0.0.rc1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: activerecord
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 5.0.0.
|
47
|
+
version: 5.0.0.rc1
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 5.0.0.
|
54
|
+
version: 5.0.0.rc1
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: activesupport
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 5.0.0.
|
61
|
+
version: 5.0.0.rc1
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 5.0.0.
|
68
|
+
version: 5.0.0.rc1
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: railties
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 5.0.0.
|
75
|
+
version: 5.0.0.rc1
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 5.0.0.
|
82
|
+
version: 5.0.0.rc1
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: redcarpet
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -140,14 +140,42 @@ dependencies:
|
|
140
140
|
requirements:
|
141
141
|
- - "~>"
|
142
142
|
- !ruby/object:Gem::Version
|
143
|
-
version: 3.
|
143
|
+
version: '3.0'
|
144
144
|
type: :development
|
145
145
|
prerelease: false
|
146
146
|
version_requirements: !ruby/object:Gem::Requirement
|
147
147
|
requirements:
|
148
148
|
- - "~>"
|
149
149
|
- !ruby/object:Gem::Version
|
150
|
-
version: 3.
|
150
|
+
version: '3.0'
|
151
|
+
- !ruby/object:Gem::Dependency
|
152
|
+
name: rubocop
|
153
|
+
requirement: !ruby/object:Gem::Requirement
|
154
|
+
requirements:
|
155
|
+
- - '='
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: '0.40'
|
158
|
+
type: :development
|
159
|
+
prerelease: false
|
160
|
+
version_requirements: !ruby/object:Gem::Requirement
|
161
|
+
requirements:
|
162
|
+
- - '='
|
163
|
+
- !ruby/object:Gem::Version
|
164
|
+
version: '0.40'
|
165
|
+
- !ruby/object:Gem::Dependency
|
166
|
+
name: brakeman
|
167
|
+
requirement: !ruby/object:Gem::Requirement
|
168
|
+
requirements:
|
169
|
+
- - ">="
|
170
|
+
- !ruby/object:Gem::Version
|
171
|
+
version: '0'
|
172
|
+
type: :development
|
173
|
+
prerelease: false
|
174
|
+
version_requirements: !ruby/object:Gem::Requirement
|
175
|
+
requirements:
|
176
|
+
- - ">="
|
177
|
+
- !ruby/object:Gem::Version
|
178
|
+
version: '0'
|
151
179
|
description: Models, migrations, etc.
|
152
180
|
email:
|
153
181
|
- ericcf@northwestern.edu
|
@@ -235,7 +263,7 @@ files:
|
|
235
263
|
- spec/models/bit_core/slide_spec.rb
|
236
264
|
- spec/models/bit_core/slideshow_spec.rb
|
237
265
|
- spec/spec_helper.rb
|
238
|
-
homepage: https://github.com/
|
266
|
+
homepage: https://github.com/NU-CBITS/bit_core
|
239
267
|
licenses:
|
240
268
|
- MIT
|
241
269
|
metadata: {}
|