bit_player 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3e4455d7bf8af7a7f4a309297ecaafc8d3dbd5e9
4
- data.tar.gz: 7393b3ba91eb1256ca5029c60b6954346f4f0b0f
3
+ metadata.gz: 2519fc4a1fc94f6a853a5c805579fb14e90f6184
4
+ data.tar.gz: 1ad14c9bcf84750b0d93331819c98f3834040c48
5
5
  SHA512:
6
- metadata.gz: c58bfb616134fb1ecfebe88c9f1924b6e45ffbe4cc49d79d9979a4ab04bf0af179187f0b6a0668e3d6ab7e1f0372cf6aee8271622983b30ae4b978f71b17f4dc
7
- data.tar.gz: 879bdf6446f42d40233c2b7211d6d9ab1f48eb74c87ff66d15d9671947f81ae856c3d0705a1b872acaab1ed5edbdc464ba34f426eb657a131d647d98d297b758
6
+ metadata.gz: fe590279df0dcbc33aa605a89e82810f5e024438673d34d6427a95c4fae4033f3e5b452fd8bafb0bd881dff717524b93f84bc8b5529303b3791072f6d359a6c5
7
+ data.tar.gz: 38d4dee6e5454c535dd84282cdd5e69a1a6761bb0b9704dc93248d4d9519fc06477aba2ed8a51269d48cc92a19d6bdf480a48cd884f2ea41f2513d1e37da410a
data/Rakefile CHANGED
@@ -14,7 +14,11 @@ RDoc::Task.new(:rdoc) do |rdoc|
14
14
  rdoc.rdoc_files.include('lib/**/*.rb')
15
15
  end
16
16
 
17
+ require 'rspec/core/rake_task'
17
18
 
19
+ RSpec::Core::RakeTask.new(:spec)
20
+
21
+ task :default => :spec
18
22
 
19
23
 
20
24
  Bundler::GemHelper.install_tasks
@@ -12,9 +12,14 @@ module BitPlayer
12
12
  validates_uniqueness_of :position, scope: :bit_player_slideshow_id
13
13
 
14
14
  def render_body
15
- markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML, space_after_headers: true)
15
+ rendered = ""
16
16
 
17
- markdown.render(body).html_safe
17
+ if !body.nil?
18
+ markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML, space_after_headers: true)
19
+ rendered += markdown.render(body).html_safe
20
+ end
21
+
22
+ rendered
18
23
  end
19
24
 
20
25
  def self.update_positions(ids)
@@ -1,3 +1,3 @@
1
1
  module BitPlayer
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -2,3 +2,6 @@
2
2
  # task :bit_player do
3
3
  # # Task goes here
4
4
  # end
5
+ desc "Run specs"
6
+ task :default do
7
+ end
@@ -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: 20140305235008) do
14
+ ActiveRecord::Schema.define(version: 20140306000537) do
15
15
 
16
16
  # These are extensions that must be enabled in order to support this database
17
17
  enable_extension "plpgsql"
@@ -50,11 +50,12 @@ ActiveRecord::Schema.define(version: 20140305235008) do
50
50
 
51
51
  create_table "bit_player_slides", force: true do |t|
52
52
  t.string "title"
53
- t.text "body", null: false
54
- t.integer "position", default: 1, null: false
55
- t.integer "bit_player_slideshow_id", null: false
53
+ t.text "body", null: false
54
+ t.integer "position", default: 1, null: false
55
+ t.integer "bit_player_slideshow_id", null: false
56
56
  t.string "type"
57
57
  t.text "options"
58
+ t.boolean "is_title_visible", default: true, null: false
58
59
  t.datetime "created_at"
59
60
  t.datetime "updated_at"
60
61
  end
@@ -0,0 +1,86 @@
1
+ SQL (3.9ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
2
+  (8.7ms) DROP TABLE "bit_player_content_modules"
3
+ PG::DependentObjectsStillExist: ERROR: cannot drop table bit_player_content_modules because other objects depend on it
4
+ DETAIL: constraint fk_content_providers_modules on table bit_player_content_providers depends on table bit_player_content_modules
5
+ HINT: Use DROP ... CASCADE to drop the dependent objects too.
6
+ : DROP TABLE "bit_player_content_modules"
7
+ ActiveRecord::SchemaMigration Load (3.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
8
+ Migrating to CreateBitPlayerSlides (20140306000537)
9
+  (0.3ms) BEGIN
10
+  (10.1ms) CREATE TABLE "bit_player_slides" ("id" serial primary key, "title" character varying(255), "body" text NOT NULL, "position" integer DEFAULT 1 NOT NULL, "bit_player_slideshow_id" integer NOT NULL, "type" character varying(255), "options" text, "is_title_visible" boolean DEFAULT 't' NOT NULL, "created_at" timestamp, "updated_at" timestamp) 
11
+ PG::DuplicateTable: ERROR: relation "bit_player_slides" already exists
12
+ : CREATE TABLE "bit_player_slides" ("id" serial primary key, "title" character varying(255), "body" text NOT NULL, "position" integer DEFAULT 1 NOT NULL, "bit_player_slideshow_id" integer NOT NULL, "type" character varying(255), "options" text, "is_title_visible" boolean DEFAULT 't' NOT NULL, "created_at" timestamp, "updated_at" timestamp)
13
+  (0.2ms) ROLLBACK
14
+ ActiveRecord::SchemaMigration Load (0.7ms) SELECT "schema_migrations".* FROM "schema_migrations"
15
+ Migrating to CreateBitPlayerSlides (20140306000537)
16
+  (0.2ms) BEGIN
17
+  (4.0ms) CREATE TABLE "bit_player_slides" ("id" serial primary key, "title" character varying(255), "body" text NOT NULL, "position" integer DEFAULT 1 NOT NULL, "bit_player_slideshow_id" integer NOT NULL, "type" character varying(255), "options" text, "is_title_visible" boolean DEFAULT 't' NOT NULL, "created_at" timestamp, "updated_at" timestamp) 
18
+ PG::DuplicateTable: ERROR: relation "bit_player_slides" already exists
19
+ : CREATE TABLE "bit_player_slides" ("id" serial primary key, "title" character varying(255), "body" text NOT NULL, "position" integer DEFAULT 1 NOT NULL, "bit_player_slideshow_id" integer NOT NULL, "type" character varying(255), "options" text, "is_title_visible" boolean DEFAULT 't' NOT NULL, "created_at" timestamp, "updated_at" timestamp)
20
+  (0.2ms) ROLLBACK
21
+  (114.2ms) DROP DATABASE IF EXISTS "dummy_test"
22
+  (246.1ms) CREATE DATABASE "dummy_test" ENCODING = 'unicode'
23
+ SQL (1.2ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
24
+  (13.0ms) CREATE TABLE "bit_player_content_modules" ("id" serial primary key, "title" character varying(255) NOT NULL, "context" character varying(255) NOT NULL, "position" integer DEFAULT 1 NOT NULL, "created_at" timestamp, "updated_at" timestamp)
25
+  (5.5ms) CREATE TABLE "bit_player_content_providers" ("id" serial primary key, "type" character varying(255) NOT NULL, "source_content_type" character varying(255), "source_content_id" integer, "bit_player_content_module_id" integer NOT NULL, "position" integer DEFAULT 1 NOT NULL, "created_at" timestamp, "updated_at" timestamp) 
26
+  (2.0ms) CREATE INDEX "content_module_index" ON "bit_player_content_providers" USING btree ("bit_player_content_module_id")
27
+  (3.9ms) CREATE TABLE "bit_player_participant_statuses" ("id" serial primary key, "context" character varying(255), "module_position" integer, "provider_position" integer, "content_position" integer, "participant_id" integer NOT NULL, "created_at" timestamp, "updated_at" timestamp) 
28
+  (1.9ms) CREATE INDEX "index_participant_statuses_on_participant_id" ON "bit_player_participant_statuses" USING btree ("participant_id")
29
+  (7.5ms) CREATE TABLE "bit_player_slides" ("id" serial primary key, "title" character varying(255), "body" text NOT NULL, "position" integer DEFAULT 1 NOT NULL, "bit_player_slideshow_id" integer NOT NULL, "type" character varying(255), "options" text, "created_at" timestamp, "updated_at" timestamp) 
30
+  (1.8ms) CREATE UNIQUE INDEX "slide_position" ON "bit_player_slides" USING btree ("bit_player_slideshow_id", "position")
31
+  (1.5ms) CREATE INDEX "index_bit_player_slides_on_bit_player_slideshow_id" ON "bit_player_slides" USING btree ("bit_player_slideshow_id")
32
+  (1.5ms) CREATE INDEX "index_bit_player_slides_on_position_and_bit_player_slideshow_id" ON "bit_player_slides" USING btree ("position", "bit_player_slideshow_id")
33
+  (3.7ms) CREATE TABLE "bit_player_slideshows" ("id" serial primary key, "title" character varying(255) NOT NULL, "created_at" timestamp, "updated_at" timestamp) 
34
+  (1.5ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL)
35
+  (1.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
36
+  (0.5ms) SELECT version FROM "schema_migrations"
37
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20140305235008')
38
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20140305231316')
39
+  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20140305231317')
40
+  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140305233110')
41
+  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140305234757')
42
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
43
+  (118.4ms) DROP DATABASE IF EXISTS "dummy_test"
44
+  (241.7ms) CREATE DATABASE "dummy_test" ENCODING = 'unicode'
45
+ SQL (1.2ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
46
+  (9.8ms) CREATE TABLE "bit_player_content_modules" ("id" serial primary key, "title" character varying(255) NOT NULL, "context" character varying(255) NOT NULL, "position" integer DEFAULT 1 NOT NULL, "created_at" timestamp, "updated_at" timestamp)
47
+  (5.4ms) CREATE TABLE "bit_player_content_providers" ("id" serial primary key, "type" character varying(255) NOT NULL, "source_content_type" character varying(255), "source_content_id" integer, "bit_player_content_module_id" integer NOT NULL, "position" integer DEFAULT 1 NOT NULL, "created_at" timestamp, "updated_at" timestamp) 
48
+  (1.4ms) CREATE INDEX "content_module_index" ON "bit_player_content_providers" USING btree ("bit_player_content_module_id")
49
+  (3.6ms) CREATE TABLE "bit_player_participant_statuses" ("id" serial primary key, "context" character varying(255), "module_position" integer, "provider_position" integer, "content_position" integer, "participant_id" integer NOT NULL, "created_at" timestamp, "updated_at" timestamp) 
50
+  (1.3ms) CREATE INDEX "index_participant_statuses_on_participant_id" ON "bit_player_participant_statuses" USING btree ("participant_id")
51
+  (5.2ms) CREATE TABLE "bit_player_slides" ("id" serial primary key, "title" character varying(255), "body" text NOT NULL, "position" integer DEFAULT 1 NOT NULL, "bit_player_slideshow_id" integer NOT NULL, "type" character varying(255), "options" text, "is_title_visible" boolean DEFAULT 't' NOT NULL, "created_at" timestamp, "updated_at" timestamp) 
52
+  (1.3ms) CREATE UNIQUE INDEX "slide_position" ON "bit_player_slides" USING btree ("bit_player_slideshow_id", "position")
53
+  (1.2ms) CREATE INDEX "index_bit_player_slides_on_bit_player_slideshow_id" ON "bit_player_slides" USING btree ("bit_player_slideshow_id")
54
+  (1.3ms) CREATE INDEX "index_bit_player_slides_on_position_and_bit_player_slideshow_id" ON "bit_player_slides" USING btree ("position", "bit_player_slideshow_id")
55
+  (3.5ms) CREATE TABLE "bit_player_slideshows" ("id" serial primary key, "title" character varying(255) NOT NULL, "created_at" timestamp, "updated_at" timestamp) 
56
+  (1.4ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL)
57
+  (1.6ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
58
+  (0.5ms) SELECT version FROM "schema_migrations"
59
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20140306000537')
60
+  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20140305231316')
61
+  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140305231317')
62
+  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140305233110')
63
+  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140305234757')
64
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
65
+  (116.2ms) DROP DATABASE IF EXISTS "dummy_test"
66
+  (244.2ms) CREATE DATABASE "dummy_test" ENCODING = 'unicode'
67
+ SQL (1.2ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
68
+  (9.1ms) CREATE TABLE "bit_player_content_modules" ("id" serial primary key, "title" character varying(255) NOT NULL, "context" character varying(255) NOT NULL, "position" integer DEFAULT 1 NOT NULL, "created_at" timestamp, "updated_at" timestamp)
69
+  (5.3ms) CREATE TABLE "bit_player_content_providers" ("id" serial primary key, "type" character varying(255) NOT NULL, "source_content_type" character varying(255), "source_content_id" integer, "bit_player_content_module_id" integer NOT NULL, "position" integer DEFAULT 1 NOT NULL, "created_at" timestamp, "updated_at" timestamp) 
70
+  (1.4ms) CREATE INDEX "content_module_index" ON "bit_player_content_providers" USING btree ("bit_player_content_module_id")
71
+  (3.6ms) CREATE TABLE "bit_player_participant_statuses" ("id" serial primary key, "context" character varying(255), "module_position" integer, "provider_position" integer, "content_position" integer, "participant_id" integer NOT NULL, "created_at" timestamp, "updated_at" timestamp) 
72
+  (1.3ms) CREATE INDEX "index_participant_statuses_on_participant_id" ON "bit_player_participant_statuses" USING btree ("participant_id")
73
+  (5.1ms) CREATE TABLE "bit_player_slides" ("id" serial primary key, "title" character varying(255), "body" text NOT NULL, "position" integer DEFAULT 1 NOT NULL, "bit_player_slideshow_id" integer NOT NULL, "type" character varying(255), "options" text, "is_title_visible" boolean DEFAULT 't' NOT NULL, "created_at" timestamp, "updated_at" timestamp) 
74
+  (1.3ms) CREATE UNIQUE INDEX "slide_position" ON "bit_player_slides" USING btree ("bit_player_slideshow_id", "position")
75
+  (1.3ms) CREATE INDEX "index_bit_player_slides_on_bit_player_slideshow_id" ON "bit_player_slides" USING btree ("bit_player_slideshow_id")
76
+  (1.4ms) CREATE INDEX "index_bit_player_slides_on_position_and_bit_player_slideshow_id" ON "bit_player_slides" USING btree ("position", "bit_player_slideshow_id")
77
+  (3.5ms) CREATE TABLE "bit_player_slideshows" ("id" serial primary key, "title" character varying(255) NOT NULL, "created_at" timestamp, "updated_at" timestamp) 
78
+  (1.3ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL)
79
+  (1.5ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
80
+  (0.4ms) SELECT version FROM "schema_migrations"
81
+  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20140306000537')
82
+  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20140305231316')
83
+  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140305231317')
84
+  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140305233110')
85
+  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140305234757')
86
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
@@ -84,3 +84,174 @@
84
84
   (0.3ms) ROLLBACK
85
85
   (0.2ms) BEGIN
86
86
   (0.3ms) ROLLBACK
87
+  (0.2ms) BEGIN
88
+ BitPlayer::ContentModule Load (1.7ms) SELECT "bit_player_content_modules".* FROM "bit_player_content_modules" WHERE "bit_player_content_modules"."context" = 'a' AND "bit_player_content_modules"."position" = 1 ORDER BY "bit_player_content_modules"."id" ASC LIMIT 1
89
+  (0.3ms) ROLLBACK
90
+  (0.1ms) BEGIN
91
+  (0.3ms) ROLLBACK
92
+  (0.2ms) BEGIN
93
+  (0.2ms) ROLLBACK
94
+  (0.2ms) BEGIN
95
+ BitPlayer::ContentModule Load (5.2ms) SELECT "bit_player_content_modules".* FROM "bit_player_content_modules" WHERE "bit_player_content_modules"."context" = 'a' AND "bit_player_content_modules"."position" = 1 ORDER BY "bit_player_content_modules"."id" ASC LIMIT 1
96
+  (0.3ms) ROLLBACK
97
+  (0.2ms) BEGIN
98
+  (0.2ms) ROLLBACK
99
+  (0.1ms) BEGIN
100
+  (0.3ms) ROLLBACK
101
+  (0.2ms) BEGIN
102
+ PG::UndefinedTable: ERROR: relation "bit_player_slides" does not exist
103
+ LINE 5: WHERE a.attrelid = '"bit_player_slides"'::reg...
104
+ ^
105
+ : SELECT a.attname, format_type(a.atttypid, a.atttypmod),
106
+ pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
107
+ FROM pg_attribute a LEFT JOIN pg_attrdef d
108
+ ON a.attrelid = d.adrelid AND a.attnum = d.adnum
109
+ WHERE a.attrelid = '"bit_player_slides"'::regclass
110
+ AND a.attnum > 0 AND NOT a.attisdropped
111
+ ORDER BY a.attnum
112
+
113
+  (0.2ms) ROLLBACK
114
+  (0.2ms) BEGIN
115
+ BitPlayer::ContentModule Load (0.5ms) SELECT "bit_player_content_modules".* FROM "bit_player_content_modules" WHERE "bit_player_content_modules"."context" = 'a' AND "bit_player_content_modules"."position" = 1 ORDER BY "bit_player_content_modules"."id" ASC LIMIT 1
116
+ PG::UndefinedTable: ERROR: relation "bit_player_content_modules" does not exist
117
+ LINE 1: SELECT "bit_player_content_modules".* FROM "bit_player_cont...
118
+ ^
119
+ : SELECT "bit_player_content_modules".* FROM "bit_player_content_modules" WHERE "bit_player_content_modules"."context" = 'a' AND "bit_player_content_modules"."position" = 1 ORDER BY "bit_player_content_modules"."id" ASC LIMIT 1
120
+  (0.1ms) ROLLBACK
121
+  (0.1ms) BEGIN
122
+  (0.2ms) ROLLBACK
123
+  (4.3ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL) 
124
+  (2.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
125
+ ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"
126
+ Migrating to CreateBitPlayerContentModules (20140305231316)
127
+  (0.2ms) BEGIN
128
+  (6.0ms) CREATE TABLE "bit_player_content_modules" ("id" serial primary key, "title" character varying(255) NOT NULL, "context" character varying(255) NOT NULL, "position" integer DEFAULT 1 NOT NULL, "created_at" timestamp, "updated_at" timestamp) 
129
+ SQL (1.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20140305231316"]]
130
+  (0.5ms) COMMIT
131
+ Migrating to CreateBitPlayerContentProviders (20140305231317)
132
+  (0.3ms) BEGIN
133
+  (4.7ms) CREATE TABLE "bit_player_content_providers" ("id" serial primary key, "type" character varying(255) NOT NULL, "source_content_type" character varying(255), "source_content_id" integer, "bit_player_content_module_id" integer NOT NULL, "position" integer DEFAULT 1 NOT NULL, "created_at" timestamp, "updated_at" timestamp) 
134
+  (1.2ms) CREATE INDEX "content_module_index" ON "bit_player_content_providers" ("bit_player_content_module_id")
135
+  (5.2ms)  ALTER TABLE bit_player_content_providers
136
+ ADD CONSTRAINT fk_content_providers_modules
137
+ FOREIGN KEY (bit_player_content_module_id)
138
+ REFERENCES bit_player_content_modules(id)
139
+ 
140
+ SQL (0.5ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20140305231317"]]
141
+  (0.9ms) COMMIT
142
+ Migrating to CreateBitPlayerParticipantStatuses (20140305233110)
143
+  (0.5ms) BEGIN
144
+  (4.6ms) CREATE TABLE "bit_player_participant_statuses" ("id" serial primary key, "context" character varying(255), "module_position" integer, "provider_position" integer, "content_position" integer, "participant_id" integer NOT NULL, "created_at" timestamp, "updated_at" timestamp) 
145
+  (1.2ms) CREATE INDEX "index_participant_statuses_on_participant_id" ON "bit_player_participant_statuses" ("participant_id")
146
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20140305233110"]]
147
+  (0.5ms) COMMIT
148
+ Migrating to CreateBitPlayerSlideshows (20140305234757)
149
+  (0.3ms) BEGIN
150
+  (3.4ms) CREATE TABLE "bit_player_slideshows" ("id" serial primary key, "title" character varying(255) NOT NULL, "created_at" timestamp, "updated_at" timestamp)
151
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20140305234757"]]
152
+  (0.4ms) COMMIT
153
+ Migrating to CreateBitPlayerSlides (20140306000537)
154
+  (0.3ms) BEGIN
155
+  (4.8ms) CREATE TABLE "bit_player_slides" ("id" serial primary key, "title" character varying(255), "body" text NOT NULL, "position" integer DEFAULT 1 NOT NULL, "bit_player_slideshow_id" integer NOT NULL, "type" character varying(255), "options" text, "is_title_visible" boolean DEFAULT 't' NOT NULL, "created_at" timestamp, "updated_at" timestamp)
156
+  (1.1ms) CREATE INDEX "index_bit_player_slides_on_bit_player_slideshow_id" ON "bit_player_slides" ("bit_player_slideshow_id")
157
+  (1.2ms) CREATE INDEX "index_bit_player_slides_on_position_and_bit_player_slideshow_id" ON "bit_player_slides" ("position", "bit_player_slideshow_id")
158
+  (1.9ms)  ALTER TABLE bit_player_slides
159
+ ADD CONSTRAINT fk_slides_slideshows
160
+ FOREIGN KEY (bit_player_slideshow_id)
161
+ REFERENCES bit_player_slideshows(id)
162
+ 
163
+  (1.6ms) ALTER TABLE bit_player_slides
164
+ ADD CONSTRAINT slide_position UNIQUE (bit_player_slideshow_id, position)
165
+ DEFERRABLE INITIALLY IMMEDIATE
166
+
167
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20140306000537"]]
168
+  (0.8ms) COMMIT
169
+ ActiveRecord::SchemaMigration Load (0.7ms) SELECT "schema_migrations".* FROM "schema_migrations"
170
+  (0.2ms) BEGIN
171
+ BitPlayer::ContentModule Load (1.9ms) SELECT "bit_player_content_modules".* FROM "bit_player_content_modules" WHERE "bit_player_content_modules"."context" = 'a' AND "bit_player_content_modules"."position" = 1 ORDER BY "bit_player_content_modules"."id" ASC LIMIT 1
172
+  (0.3ms) ROLLBACK
173
+  (0.1ms) BEGIN
174
+  (0.3ms) ROLLBACK
175
+  (0.2ms) BEGIN
176
+  (0.2ms) ROLLBACK
177
+  (3.8ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL) 
178
+  (1.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
179
+ ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"
180
+ Migrating to CreateBitPlayerContentModules (20140305231316)
181
+  (0.2ms) BEGIN
182
+  (6.0ms) CREATE TABLE "bit_player_content_modules" ("id" serial primary key, "title" character varying(255) NOT NULL, "context" character varying(255) NOT NULL, "position" integer DEFAULT 1 NOT NULL, "created_at" timestamp, "updated_at" timestamp) 
183
+ SQL (1.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20140305231316"]]
184
+  (0.5ms) COMMIT
185
+ Migrating to CreateBitPlayerContentProviders (20140305231317)
186
+  (0.3ms) BEGIN
187
+  (4.9ms) CREATE TABLE "bit_player_content_providers" ("id" serial primary key, "type" character varying(255) NOT NULL, "source_content_type" character varying(255), "source_content_id" integer, "bit_player_content_module_id" integer NOT NULL, "position" integer DEFAULT 1 NOT NULL, "created_at" timestamp, "updated_at" timestamp) 
188
+  (1.1ms) CREATE INDEX "content_module_index" ON "bit_player_content_providers" ("bit_player_content_module_id")
189
+  (3.0ms)  ALTER TABLE bit_player_content_providers
190
+ ADD CONSTRAINT fk_content_providers_modules
191
+ FOREIGN KEY (bit_player_content_module_id)
192
+ REFERENCES bit_player_content_modules(id)
193
+ 
194
+ SQL (0.5ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20140305231317"]]
195
+  (0.8ms) COMMIT
196
+ Migrating to CreateBitPlayerParticipantStatuses (20140305233110)
197
+  (0.4ms) BEGIN
198
+  (3.9ms) CREATE TABLE "bit_player_participant_statuses" ("id" serial primary key, "context" character varying(255), "module_position" integer, "provider_position" integer, "content_position" integer, "participant_id" integer NOT NULL, "created_at" timestamp, "updated_at" timestamp) 
199
+  (1.2ms) CREATE INDEX "index_participant_statuses_on_participant_id" ON "bit_player_participant_statuses" ("participant_id")
200
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20140305233110"]]
201
+  (0.5ms) COMMIT
202
+ Migrating to CreateBitPlayerSlideshows (20140305234757)
203
+  (0.3ms) BEGIN
204
+  (3.4ms) CREATE TABLE "bit_player_slideshows" ("id" serial primary key, "title" character varying(255) NOT NULL, "created_at" timestamp, "updated_at" timestamp)
205
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20140305234757"]]
206
+  (0.5ms) COMMIT
207
+ Migrating to CreateBitPlayerSlides (20140306000537)
208
+  (0.3ms) BEGIN
209
+  (4.9ms) CREATE TABLE "bit_player_slides" ("id" serial primary key, "title" character varying(255), "body" text NOT NULL, "position" integer DEFAULT 1 NOT NULL, "bit_player_slideshow_id" integer NOT NULL, "type" character varying(255), "options" text, "is_title_visible" boolean DEFAULT 't' NOT NULL, "created_at" timestamp, "updated_at" timestamp)
210
+  (1.2ms) CREATE INDEX "index_bit_player_slides_on_bit_player_slideshow_id" ON "bit_player_slides" ("bit_player_slideshow_id")
211
+  (1.2ms) CREATE INDEX "index_bit_player_slides_on_position_and_bit_player_slideshow_id" ON "bit_player_slides" ("position", "bit_player_slideshow_id")
212
+  (2.0ms)  ALTER TABLE bit_player_slides
213
+ ADD CONSTRAINT fk_slides_slideshows
214
+ FOREIGN KEY (bit_player_slideshow_id)
215
+ REFERENCES bit_player_slideshows(id)
216
+ 
217
+  (1.5ms) ALTER TABLE bit_player_slides
218
+ ADD CONSTRAINT slide_position UNIQUE (bit_player_slideshow_id, position)
219
+ DEFERRABLE INITIALLY IMMEDIATE
220
+
221
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20140306000537"]]
222
+  (0.6ms) COMMIT
223
+ ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"
224
+  (0.2ms) BEGIN
225
+  (0.3ms) ROLLBACK
226
+  (0.2ms) BEGIN
227
+  (0.2ms) ROLLBACK
228
+  (0.2ms) BEGIN
229
+ BitPlayer::ContentModule Load (1.8ms) SELECT "bit_player_content_modules".* FROM "bit_player_content_modules" WHERE "bit_player_content_modules"."context" = 'a' AND "bit_player_content_modules"."position" = 1 ORDER BY "bit_player_content_modules"."id" ASC LIMIT 1
230
+  (0.3ms) ROLLBACK
231
+  (0.1ms) BEGIN
232
+ BitPlayer::ContentModule Load (2.4ms) SELECT "bit_player_content_modules".* FROM "bit_player_content_modules" WHERE "bit_player_content_modules"."context" = 'a' AND "bit_player_content_modules"."position" = 1 ORDER BY "bit_player_content_modules"."id" ASC LIMIT 1
233
+  (0.3ms) ROLLBACK
234
+  (0.3ms) BEGIN
235
+  (0.2ms) ROLLBACK
236
+  (0.2ms) BEGIN
237
+  (0.3ms) ROLLBACK
238
+  (0.2ms) BEGIN
239
+  (0.2ms) ROLLBACK
240
+  (0.2ms) BEGIN
241
+  (0.3ms) ROLLBACK
242
+  (0.2ms) BEGIN
243
+  (0.2ms) ROLLBACK
244
+  (0.2ms) BEGIN
245
+ BitPlayer::ContentModule Load (1.8ms) SELECT "bit_player_content_modules".* FROM "bit_player_content_modules" WHERE "bit_player_content_modules"."context" = 'a' AND "bit_player_content_modules"."position" = 1 ORDER BY "bit_player_content_modules"."id" ASC LIMIT 1
246
+  (0.3ms) ROLLBACK
247
+  (0.2ms) BEGIN
248
+  (0.2ms) ROLLBACK
249
+  (0.2ms) BEGIN
250
+  (0.3ms) ROLLBACK
251
+  (0.2ms) BEGIN
252
+  (0.2ms) ROLLBACK
253
+  (0.2ms) BEGIN
254
+  (0.2ms) ROLLBACK
255
+  (0.2ms) BEGIN
256
+ BitPlayer::ContentModule Load (2.0ms) SELECT "bit_player_content_modules".* FROM "bit_player_content_modules" WHERE "bit_player_content_modules"."context" = 'a' AND "bit_player_content_modules"."position" = 1 ORDER BY "bit_player_content_modules"."id" ASC LIMIT 1
257
+  (0.3ms) ROLLBACK
@@ -2,9 +2,15 @@ require "spec_helper"
2
2
 
3
3
  describe BitPlayer::Slide do
4
4
  describe "#render_body" do
5
- let(:slide) { BitPlayer::Slide.new(body: "# header") }
5
+ let(:slide) { BitPlayer::Slide.new }
6
+
7
+ it "should render a nil body" do
8
+ expect(slide.render_body).to eq("")
9
+ end
6
10
 
7
11
  it "should render markdown as html" do
12
+ slide.body = "# header"
13
+
8
14
  expect(slide.render_body).to match(/<h1>header<\/h1>/)
9
15
  end
10
16
  end
metadata CHANGED
@@ -1,69 +1,69 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bit_player
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
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: 2014-03-13 00:00:00.000000000 Z
11
+ date: 2014-03-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 4.0.3
19
+ version: '4.0'
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: 4.0.3
26
+ version: '4.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: pg
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0.17'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0.17'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: redcarpet
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '2.3'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '2.3'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec-rails
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: 3.0.0.beta2
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: 3.0.0.beta2
69
69
  description: A Rails engine for presenting a BIT web application
@@ -73,6 +73,9 @@ executables: []
73
73
  extensions: []
74
74
  extra_rdoc_files: []
75
75
  files:
76
+ - MIT-LICENSE
77
+ - README.md
78
+ - Rakefile
76
79
  - app/assets/javascripts/bit_player/application.js
77
80
  - app/assets/stylesheets/bit_player/application.css
78
81
  - app/controllers/bit_player/application_controller.rb
@@ -95,13 +98,12 @@ files:
95
98
  - db/migrate/20140305232705_create_bit_player_participant_statuses.rb
96
99
  - db/migrate/20140305232705_create_bit_player_slideshows.rb
97
100
  - db/migrate/20140305234327_create_bit_player_slides.rb
101
+ - lib/bit_player.rb
98
102
  - lib/bit_player/engine.rb
99
103
  - lib/bit_player/version.rb
100
- - lib/bit_player.rb
101
104
  - lib/tasks/bit_player_tasks.rake
102
- - MIT-LICENSE
103
- - Rakefile
104
- - README.md
105
+ - spec/dummy/README.rdoc
106
+ - spec/dummy/Rakefile
105
107
  - spec/dummy/app/assets/javascripts/application.js
106
108
  - spec/dummy/app/assets/stylesheets/application.css
107
109
  - spec/dummy/app/controllers/application_controller.rb
@@ -110,6 +112,7 @@ files:
110
112
  - spec/dummy/bin/bundle
111
113
  - spec/dummy/bin/rails
112
114
  - spec/dummy/bin/rake
115
+ - spec/dummy/config.ru
113
116
  - spec/dummy/config/application.rb
114
117
  - spec/dummy/config/boot.rb
115
118
  - spec/dummy/config/database.yml
@@ -126,20 +129,18 @@ files:
126
129
  - spec/dummy/config/initializers/wrap_parameters.rb
127
130
  - spec/dummy/config/locales/en.yml
128
131
  - spec/dummy/config/routes.rb
129
- - spec/dummy/config.ru
130
132
  - spec/dummy/db/migrate/20140305231316_create_bit_player_content_modules.bit_player.rb
131
133
  - spec/dummy/db/migrate/20140305231317_create_bit_player_content_providers.bit_player.rb
132
134
  - spec/dummy/db/migrate/20140305233110_create_bit_player_participant_statuses.bit_player.rb
133
135
  - spec/dummy/db/migrate/20140305234757_create_bit_player_slideshows.bit_player.rb
134
136
  - spec/dummy/db/migrate/20140306000537_create_bit_player_slides.bit_player.rb
135
137
  - spec/dummy/db/schema.rb
138
+ - spec/dummy/log/development.log
136
139
  - spec/dummy/log/test.log
137
140
  - spec/dummy/public/404.html
138
141
  - spec/dummy/public/422.html
139
142
  - spec/dummy/public/500.html
140
143
  - spec/dummy/public/favicon.ico
141
- - spec/dummy/Rakefile
142
- - spec/dummy/README.rdoc
143
144
  - spec/models/bit_player/content_providers/view_provider_spec.rb
144
145
  - spec/models/bit_player/navigator_spec.rb
145
146
  - spec/models/bit_player/slide_spec.rb
@@ -153,17 +154,17 @@ require_paths:
153
154
  - lib
154
155
  required_ruby_version: !ruby/object:Gem::Requirement
155
156
  requirements:
156
- - - '>='
157
+ - - ">="
157
158
  - !ruby/object:Gem::Version
158
159
  version: '0'
159
160
  required_rubygems_version: !ruby/object:Gem::Requirement
160
161
  requirements:
161
- - - '>='
162
+ - - ">="
162
163
  - !ruby/object:Gem::Version
163
164
  version: '0'
164
165
  requirements: []
165
166
  rubyforge_project:
166
- rubygems_version: 2.0.3
167
+ rubygems_version: 2.2.2
167
168
  signing_key:
168
169
  specification_version: 4
169
170
  summary: A Rails engine for presenting a BIT web application
@@ -199,6 +200,7 @@ test_files:
199
200
  - spec/dummy/db/migrate/20140305234757_create_bit_player_slideshows.bit_player.rb
200
201
  - spec/dummy/db/migrate/20140306000537_create_bit_player_slides.bit_player.rb
201
202
  - spec/dummy/db/schema.rb
203
+ - spec/dummy/log/development.log
202
204
  - spec/dummy/log/test.log
203
205
  - spec/dummy/public/404.html
204
206
  - spec/dummy/public/422.html