bit_player 0.4.10 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/bit_player/content_providers/form_view_provider.rb +5 -4
- data/app/models/bit_player/content_providers/view_provider.rb +5 -4
- data/app/models/bit_player/navigator.rb +2 -1
- data/lib/bit_player/version.rb +1 -1
- data/spec/dummy/config/application.rb +0 -4
- data/spec/dummy/config/environments/development.rb +2 -2
- data/spec/dummy/config/environments/test.rb +1 -1
- data/spec/dummy/db/schema.rb +14 -16
- data/spec/spec_helper.rb +1 -1
- metadata +5 -37
- data/app/assets/javascripts/bit_player/application.js +0 -13
- data/app/assets/stylesheets/bit_player/application.css +0 -13
- data/app/controllers/bit_player/application_controller.rb +0 -4
- data/app/views/layouts/bit_player/application.html.erb +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 71d2e17af9c9cedaa32602284f04d4b3fbae528b
|
4
|
+
data.tar.gz: c2c228c9b2163a1aa90336525cf0208c5929f735
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e673cacf91bda3e0f567c8afaeb8a6acc9cfbca3985314f2a24c1b16c29323c1e388746345df53a8a9e2019bb3a61e500098f9ff01bf95dfdb4809dbee2ee59c
|
7
|
+
data.tar.gz: 8af41424c696c39abc8c2ad11399b6cb6d614e760f38f98b6d4effda57af5ea38b4870670b95a75ba856a7d1dc781050748c3c61ddc648c87a6cb6650c93123f
|
@@ -12,8 +12,9 @@ module BitPlayer
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def self.source_class
|
15
|
-
@source_class ||
|
16
|
-
|
15
|
+
@source_class || raise("Classes inheriting from #{self} must " \
|
16
|
+
"define a source class with " \
|
17
|
+
"`data_class <class>`")
|
17
18
|
end
|
18
19
|
|
19
20
|
def self.show_nav_link
|
@@ -30,7 +31,7 @@ module BitPlayer
|
|
30
31
|
|
31
32
|
def self.view_type(type)
|
32
33
|
unless %w( new edit ).include?(type)
|
33
|
-
|
34
|
+
raise("view type must be one of 'new', 'edit'")
|
34
35
|
end
|
35
36
|
@view_type = type
|
36
37
|
end
|
@@ -45,7 +46,7 @@ module BitPlayer
|
|
45
46
|
end
|
46
47
|
|
47
48
|
def template
|
48
|
-
"#{
|
49
|
+
"#{plural_name}/#{self.class.get_view_type}"
|
49
50
|
end
|
50
51
|
|
51
52
|
private
|
@@ -12,8 +12,9 @@ module BitPlayer
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def self.source_class
|
15
|
-
@source_class ||
|
16
|
-
|
15
|
+
@source_class || raise("Classes inheriting from #{self} must " \
|
16
|
+
"define a source class with " \
|
17
|
+
"`data_class <class>`")
|
17
18
|
end
|
18
19
|
|
19
20
|
def self.show_nav_link
|
@@ -30,7 +31,7 @@ module BitPlayer
|
|
30
31
|
|
31
32
|
def self.view_type(type)
|
32
33
|
unless %w( show index ).include?(type)
|
33
|
-
|
34
|
+
raise "view type must be one of 'show', 'index'"
|
34
35
|
end
|
35
36
|
@view_type = type
|
36
37
|
end
|
@@ -45,7 +46,7 @@ module BitPlayer
|
|
45
46
|
end
|
46
47
|
|
47
48
|
def template
|
48
|
-
"#{
|
49
|
+
"#{plural_name}/#{self.class.get_view_type}"
|
49
50
|
end
|
50
51
|
|
51
52
|
private
|
@@ -77,7 +77,8 @@ module BitPlayer
|
|
77
77
|
@status.provider_position = 1
|
78
78
|
if options[:provider_id]
|
79
79
|
@status.provider_position = content_module.content_providers
|
80
|
-
|
80
|
+
.find(options[:provider_id])
|
81
|
+
.position
|
81
82
|
end
|
82
83
|
@status.content_position = [options[:content_position].to_i, 1].max
|
83
84
|
@status.save
|
data/lib/bit_player/version.rb
CHANGED
@@ -2,10 +2,6 @@ require File.expand_path('../boot', __FILE__)
|
|
2
2
|
|
3
3
|
# Pick the frameworks you want:
|
4
4
|
require "active_record/railtie"
|
5
|
-
require "action_controller/railtie"
|
6
|
-
require "action_mailer/railtie"
|
7
|
-
require "sprockets/railtie"
|
8
|
-
# require "rails/test_unit/railtie"
|
9
5
|
|
10
6
|
Bundler.require(*Rails.groups)
|
11
7
|
require "bit_player"
|
@@ -14,7 +14,7 @@ Dummy::Application.configure do
|
|
14
14
|
config.action_controller.perform_caching = false
|
15
15
|
|
16
16
|
# Don't care if the mailer can't send.
|
17
|
-
config.action_mailer.raise_delivery_errors = false
|
17
|
+
# config.action_mailer.raise_delivery_errors = false
|
18
18
|
|
19
19
|
# Print deprecation notices to the Rails logger.
|
20
20
|
config.active_support.deprecation = :log
|
@@ -25,5 +25,5 @@ Dummy::Application.configure do
|
|
25
25
|
# Debug mode disables concatenation and preprocessing of assets.
|
26
26
|
# This option may cause significant delays in view rendering with a large
|
27
27
|
# number of complex assets.
|
28
|
-
config.assets.debug = true
|
28
|
+
# config.assets.debug = true
|
29
29
|
end
|
@@ -29,7 +29,7 @@ Dummy::Application.configure do
|
|
29
29
|
# Tell Action Mailer not to deliver emails to the real world.
|
30
30
|
# The :test delivery method accumulates sent emails in the
|
31
31
|
# ActionMailer::Base.deliveries array.
|
32
|
-
config.action_mailer.delivery_method = :test
|
32
|
+
# config.action_mailer.delivery_method = :test
|
33
33
|
|
34
34
|
# Print deprecation notices to the stderr.
|
35
35
|
config.active_support.deprecation = :stderr
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -16,17 +16,16 @@ ActiveRecord::Schema.define(version: 20140620222851) do
|
|
16
16
|
# These are extensions that must be enabled in order to support this database
|
17
17
|
enable_extension "plpgsql"
|
18
18
|
|
19
|
-
create_table "bit_core_content_modules", force:
|
19
|
+
create_table "bit_core_content_modules", force: :cascade do |t|
|
20
20
|
t.string "title", null: false
|
21
21
|
t.integer "position", default: 1, null: false
|
22
22
|
t.integer "bit_core_tool_id", null: false
|
23
23
|
t.datetime "created_at"
|
24
24
|
t.datetime "updated_at"
|
25
|
+
t.index ["bit_core_tool_id", "position"], name: "bit_core_content_module_position", unique: true, using: :btree
|
25
26
|
end
|
26
27
|
|
27
|
-
|
28
|
-
|
29
|
-
create_table "bit_core_content_providers", force: true do |t|
|
28
|
+
create_table "bit_core_content_providers", force: :cascade do |t|
|
30
29
|
t.string "type", null: false
|
31
30
|
t.string "source_content_type"
|
32
31
|
t.integer "source_content_id"
|
@@ -39,11 +38,10 @@ ActiveRecord::Schema.define(version: 20140620222851) do
|
|
39
38
|
t.text "data_attributes"
|
40
39
|
t.boolean "show_next_nav"
|
41
40
|
t.text "locals"
|
41
|
+
t.index ["bit_core_content_module_id", "position"], name: "bit_core_content_provider_position", unique: true, using: :btree
|
42
42
|
end
|
43
43
|
|
44
|
-
|
45
|
-
|
46
|
-
create_table "bit_core_slides", force: true do |t|
|
44
|
+
create_table "bit_core_slides", force: :cascade do |t|
|
47
45
|
t.string "title", null: false
|
48
46
|
t.text "body", null: false
|
49
47
|
t.integer "position", default: 1, null: false
|
@@ -53,26 +51,24 @@ ActiveRecord::Schema.define(version: 20140620222851) do
|
|
53
51
|
t.datetime "created_at"
|
54
52
|
t.datetime "updated_at"
|
55
53
|
t.text "options"
|
54
|
+
t.index ["bit_core_slideshow_id", "position"], name: "bit_core_slide_position", unique: true, using: :btree
|
56
55
|
end
|
57
56
|
|
58
|
-
|
59
|
-
|
60
|
-
create_table "bit_core_slideshows", force: true do |t|
|
57
|
+
create_table "bit_core_slideshows", force: :cascade do |t|
|
61
58
|
t.string "title", null: false
|
62
59
|
t.datetime "created_at"
|
63
60
|
t.datetime "updated_at"
|
64
61
|
end
|
65
62
|
|
66
|
-
create_table "bit_core_tools", force:
|
63
|
+
create_table "bit_core_tools", force: :cascade do |t|
|
67
64
|
t.string "title", null: false
|
68
65
|
t.integer "position", default: 0, null: false
|
69
66
|
t.datetime "created_at"
|
70
67
|
t.datetime "updated_at"
|
68
|
+
t.index ["position"], name: "bit_core_tool_position", unique: true, using: :btree
|
71
69
|
end
|
72
70
|
|
73
|
-
|
74
|
-
|
75
|
-
create_table "bit_player_participant_statuses", force: true do |t|
|
71
|
+
create_table "bit_player_participant_statuses", force: :cascade do |t|
|
76
72
|
t.string "context"
|
77
73
|
t.integer "module_position"
|
78
74
|
t.integer "provider_position"
|
@@ -80,8 +76,10 @@ ActiveRecord::Schema.define(version: 20140620222851) do
|
|
80
76
|
t.integer "participant_id", null: false
|
81
77
|
t.datetime "created_at"
|
82
78
|
t.datetime "updated_at"
|
79
|
+
t.index ["participant_id"], name: "index_participant_statuses_on_participant_id", using: :btree
|
83
80
|
end
|
84
81
|
|
85
|
-
|
86
|
-
|
82
|
+
add_foreign_key "bit_core_content_modules", "bit_core_tools", name: "fk_content_modules_tools"
|
83
|
+
add_foreign_key "bit_core_content_providers", "bit_core_content_modules", name: "fk_content_providers_modules"
|
84
|
+
add_foreign_key "bit_core_slides", "bit_core_slideshows", name: "fk_slideshows_slides"
|
87
85
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,29 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bit_player
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
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-05-
|
11
|
+
date: 2016-05-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: rails
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '4.1'
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '4.1'
|
27
13
|
- !ruby/object:Gem::Dependency
|
28
14
|
name: pg
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
@@ -52,34 +38,20 @@ dependencies:
|
|
52
38
|
- - ">="
|
53
39
|
- !ruby/object:Gem::Version
|
54
40
|
version: '0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: redcarpet
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '2.3'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "~>"
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '2.3'
|
69
41
|
- !ruby/object:Gem::Dependency
|
70
42
|
name: rspec-rails
|
71
43
|
requirement: !ruby/object:Gem::Requirement
|
72
44
|
requirements:
|
73
45
|
- - "~>"
|
74
46
|
- !ruby/object:Gem::Version
|
75
|
-
version: 3.0.
|
47
|
+
version: 3.5.0.beta3
|
76
48
|
type: :development
|
77
49
|
prerelease: false
|
78
50
|
version_requirements: !ruby/object:Gem::Requirement
|
79
51
|
requirements:
|
80
52
|
- - "~>"
|
81
53
|
- !ruby/object:Gem::Version
|
82
|
-
version: 3.0.
|
54
|
+
version: 3.5.0.beta3
|
83
55
|
- !ruby/object:Gem::Dependency
|
84
56
|
name: rubocop
|
85
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -118,14 +90,10 @@ files:
|
|
118
90
|
- MIT-LICENSE
|
119
91
|
- README.md
|
120
92
|
- Rakefile
|
121
|
-
- app/assets/javascripts/bit_player/application.js
|
122
|
-
- app/assets/stylesheets/bit_player/application.css
|
123
|
-
- app/controllers/bit_player/application_controller.rb
|
124
93
|
- app/models/bit_player/content_providers/form_view_provider.rb
|
125
94
|
- app/models/bit_player/content_providers/view_provider.rb
|
126
95
|
- app/models/bit_player/navigator.rb
|
127
96
|
- app/models/bit_player/participant_status.rb
|
128
|
-
- app/views/layouts/bit_player/application.html.erb
|
129
97
|
- db/migrate/20140305200438_create_bit_player_content_modules.rb
|
130
98
|
- db/migrate/20140305201300_create_bit_player_content_providers.rb
|
131
99
|
- db/migrate/20140305232705_create_bit_player_participant_statuses.rb
|
@@ -203,7 +171,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
203
171
|
version: '0'
|
204
172
|
requirements: []
|
205
173
|
rubyforge_project:
|
206
|
-
rubygems_version: 2.
|
174
|
+
rubygems_version: 2.5.1
|
207
175
|
signing_key:
|
208
176
|
specification_version: 4
|
209
177
|
summary: A Rails engine for presenting a BIT web application
|
@@ -1,13 +0,0 @@
|
|
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_tree .
|
@@ -1,13 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
-
* listed below.
|
4
|
-
*
|
5
|
-
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
-
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
7
|
-
*
|
8
|
-
* You're free to add application-wide styles to this file and they'll appear at the top of the
|
9
|
-
* compiled file, but it's generally better to create a new file per style scope.
|
10
|
-
*
|
11
|
-
*= require_self
|
12
|
-
*= require_tree .
|
13
|
-
*/
|
@@ -1,14 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>BitPlayer</title>
|
5
|
-
<%= stylesheet_link_tag "bit_player/application", media: "all" %>
|
6
|
-
<%= javascript_include_tag "bit_player/application" %>
|
7
|
-
<%= csrf_meta_tags %>
|
8
|
-
</head>
|
9
|
-
<body>
|
10
|
-
|
11
|
-
<%= yield %>
|
12
|
-
|
13
|
-
</body>
|
14
|
-
</html>
|