bit_player 0.4.3 → 0.4.4

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: f6d6f4fbf713a02dc588ccab736b31dd9ae84bfd
4
- data.tar.gz: f1a489fc142a4f18fd9d77cdca8e4d6adc9b7049
3
+ metadata.gz: 93668073bd4cd59d4ff144df3da7928526edd42a
4
+ data.tar.gz: 3fd3091fec7e265fc5e97f1216b90693d6f52f67
5
5
  SHA512:
6
- metadata.gz: 46db0b7782df8ce58ed9e4ee8954626a7bed53c07dc609bea619227190553d63057dccd5379336b3ce5db135b640ccd7ea8c1b1bcb2075d4c1e3f48af45151e8
7
- data.tar.gz: 92cb094e34776d217f049d9d71827de835386efa0625e4db4b8b2301aae1e6a4122e7294a3ae2f593a70ae08615684f3a0ca6adab809d925a241e042b3fdae70
6
+ metadata.gz: 5c409e5d32101ee17db89b651cff1f13f9729252bf6fcf46e0aedc6b794fceb7a1b61343dda2ca2743302c034f86b3623b4dc71e24c28ed10d5d83ce326a2a95
7
+ data.tar.gz: a660160524c372a13b09ff6f05e7b3a6ae25b64d022f444c4f41b0b2b6c84e3fdfed662103f1132d4e6616ed72fcf4bcf65a4b30d8ac6a00ae7882d84610081b
@@ -54,6 +54,16 @@ module BitPlayer
54
54
  end
55
55
  end
56
56
 
57
+ def fetch_previous_content
58
+ if previous_content?
59
+ @status.decrement_content_position
60
+ end
61
+ end
62
+
63
+ def previous_content?
64
+ current_content_provider.exists?(content_position - 1)
65
+ end
66
+
57
67
  def initialize_context(context)
58
68
  @status.initialize_context(context)
59
69
  end
@@ -12,6 +12,10 @@ module BitPlayer
12
12
  )
13
13
  end
14
14
 
15
+ def decrement_content_position
16
+ update(content_position: content_position - 1)
17
+ end
18
+
15
19
  def increment_content_position
16
20
  update(content_position: content_position + 1)
17
21
  end
@@ -1,3 +1,3 @@
1
1
  module BitPlayer
2
- VERSION = "0.4.3"
2
+ VERSION = "0.4.4"
3
3
  end
@@ -3130,3 +3130,169 @@ Migrating to ConvertToolsModulesPresentersToBitCore (20140620222851)
3130
3130
   (0.3ms) ROLLBACK
3131
3131
   (0.2ms) BEGIN
3132
3132
   (0.2ms) ROLLBACK
3133
+ ActiveRecord::SchemaMigration Load (1.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
3134
+ PG::InsufficientPrivilege: ERROR: permission denied for relation schema_migrations
3135
+ : SELECT "schema_migrations".* FROM "schema_migrations"
3136
+  (9.0ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL) 
3137
+  (4.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
3138
+ ActiveRecord::SchemaMigration Load (0.7ms) SELECT "schema_migrations".* FROM "schema_migrations"
3139
+ Migrating to CreateBitPlayerContentModules (20140305200438)
3140
+  (0.3ms) BEGIN
3141
+  (7.2ms) 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) 
3142
+ SQL (0.6ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20140305200438"]]
3143
+  (0.8ms) COMMIT
3144
+ Migrating to CreateBitPlayerContentProviders (20140305201300)
3145
+  (0.3ms) BEGIN
3146
+  (6.0ms) 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) 
3147
+  (1.4ms) CREATE INDEX "content_module_index" ON "bit_player_content_providers" ("bit_player_content_module_id")
3148
+  (6.1ms)  ALTER TABLE bit_player_content_providers
3149
+ ADD CONSTRAINT fk_content_providers_modules
3150
+ FOREIGN KEY (bit_player_content_module_id)
3151
+ REFERENCES bit_player_content_modules(id)
3152
+ 
3153
+ SQL (1.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20140305201300"]]
3154
+  (0.8ms) COMMIT
3155
+ Migrating to CreateBitPlayerParticipantStatuses (20140305232705)
3156
+  (0.3ms) BEGIN
3157
+  (3.8ms) 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) 
3158
+  (2.2ms) CREATE INDEX "index_participant_statuses_on_participant_id" ON "bit_player_participant_statuses" ("participant_id")
3159
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20140305232705"]]
3160
+  (0.8ms) COMMIT
3161
+ Migrating to CreateBitPlayerSlideshows (20140305232706)
3162
+  (0.5ms) BEGIN
3163
+  (5.0ms) CREATE TABLE "bit_player_slideshows" ("id" serial primary key, "title" character varying(255) NOT NULL, "created_at" timestamp, "updated_at" timestamp)
3164
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20140305232706"]]
3165
+  (0.6ms) COMMIT
3166
+ Migrating to CreateBitPlayerSlides (20140305234327)
3167
+  (0.5ms) BEGIN
3168
+  (6.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)
3169
+  (1.5ms) CREATE INDEX "index_bit_player_slides_on_bit_player_slideshow_id" ON "bit_player_slides" ("bit_player_slideshow_id")
3170
+  (2.6ms) ALTER TABLE bit_player_slides
3171
+ ADD CONSTRAINT fk_slides_slideshows
3172
+ FOREIGN KEY (bit_player_slideshow_id)
3173
+ REFERENCES bit_player_slideshows(id)
3174
+
3175
+  (2.0ms)  ALTER TABLE bit_player_slides
3176
+ ADD CONSTRAINT bit_player_slide_position UNIQUE (bit_player_slideshow_id, position)
3177
+ DEFERRABLE INITIALLY IMMEDIATE
3178
+ 
3179
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20140305234327"]]
3180
+  (0.6ms) COMMIT
3181
+ Migrating to CreateBitPlayerTools (20140402224913)
3182
+  (0.4ms) BEGIN
3183
+  (3.7ms) CREATE TABLE "bit_player_tools" ("id" serial primary key, "title" character varying(255) NOT NULL, "position" integer, "is_home" boolean DEFAULT 'f' NOT NULL, "created_at" timestamp, "updated_at" timestamp) 
3184
+  (1.5ms) CREATE UNIQUE INDEX "index_bit_player_tools_on_title" ON "bit_player_tools" ("title")
3185
+  (2.1ms) CREATE UNIQUE INDEX "index_bit_player_tools_on_position" ON "bit_player_tools" ("position")
3186
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20140402224913"]]
3187
+  (0.6ms) COMMIT
3188
+ Migrating to ConvertSlidesSlideshowsToBitCore (20140620182756)
3189
+  (0.7ms) BEGIN
3190
+ BitPlayer::Slideshow Load (1.0ms) SELECT "bit_player_slideshows".* FROM "bit_player_slideshows"
3191
+ BitPlayer::Slide Load (1.1ms) SELECT "bit_player_slides".* FROM "bit_player_slides"
3192
+  (1.7ms)  ALTER TABLE bit_player_slides
3193
+ DROP CONSTRAINT IF EXISTS fk_slides_slideshows
3194
+ 
3195
+  (0.9ms) ALTER TABLE bit_player_slides
3196
+ DROP CONSTRAINT IF EXISTS bit_player_slide_position
3197
+
3198
+  (2.5ms) DROP TABLE "bit_player_slides"
3199
+  (1.3ms) DROP TABLE "bit_player_slideshows"
3200
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20140620182756"]]
3201
+  (2.1ms) COMMIT
3202
+ Migrating to CreateBitCoreTools (20140620222614)
3203
+  (0.4ms) BEGIN
3204
+  (5.1ms) CREATE TABLE "bit_core_tools" ("id" serial primary key, "title" character varying(255) NOT NULL, "position" integer DEFAULT 0 NOT NULL, "created_at" timestamp, "updated_at" timestamp)
3205
+  (1.7ms)  ALTER TABLE bit_core_tools
3206
+ ADD CONSTRAINT bit_core_tool_position UNIQUE (position)
3207
+ DEFERRABLE INITIALLY IMMEDIATE
3208
+ 
3209
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20140620222614"]]
3210
+  (0.6ms) COMMIT
3211
+ Migrating to CreateBitCoreContentModules (20140620222615)
3212
+  (0.3ms) BEGIN
3213
+  (3.6ms) CREATE TABLE "bit_core_content_modules" ("id" serial primary key, "title" character varying(255) NOT NULL, "position" integer DEFAULT 1 NOT NULL, "bit_core_tool_id" integer NOT NULL, "created_at" timestamp, "updated_at" timestamp) 
3214
+  (1.6ms) ALTER TABLE bit_core_content_modules
3215
+ ADD CONSTRAINT bit_core_content_module_position UNIQUE (bit_core_tool_id, position)
3216
+ DEFERRABLE INITIALLY IMMEDIATE
3217
+
3218
+  (2.1ms)  ALTER TABLE bit_core_content_modules
3219
+ ADD CONSTRAINT fk_content_modules_tools
3220
+ FOREIGN KEY (bit_core_tool_id)
3221
+ REFERENCES bit_core_tools(id)
3222
+ 
3223
+ SQL (0.5ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20140620222615"]]
3224
+  (0.9ms) COMMIT
3225
+ Migrating to CreateBitCoreContentProviders (20140620222616)
3226
+  (0.7ms) BEGIN
3227
+  (7.3ms) CREATE TABLE "bit_core_content_providers" ("id" serial primary key, "type" character varying(255) NOT NULL, "source_content_type" character varying(255), "source_content_id" integer, "bit_core_content_module_id" integer NOT NULL, "position" integer DEFAULT 1 NOT NULL, "created_at" timestamp, "updated_at" timestamp) 
3228
+  (2.4ms) ALTER TABLE bit_core_content_providers
3229
+ ADD CONSTRAINT bit_core_content_provider_position UNIQUE (bit_core_content_module_id, position)
3230
+ DEFERRABLE INITIALLY IMMEDIATE
3231
+
3232
+  (2.8ms)  ALTER TABLE bit_core_content_providers
3233
+ ADD CONSTRAINT fk_content_providers_modules
3234
+ FOREIGN KEY (bit_core_content_module_id)
3235
+ REFERENCES bit_core_content_modules(id)
3236
+ 
3237
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20140620222616"]]
3238
+  (0.7ms) COMMIT
3239
+ Migrating to CreateBitCoreSlideshows (20140620222617)
3240
+  (0.5ms) BEGIN
3241
+  (4.2ms) CREATE TABLE "bit_core_slideshows" ("id" serial primary key, "title" character varying(255) NOT NULL, "created_at" timestamp, "updated_at" timestamp) 
3242
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20140620222617"]]
3243
+  (0.5ms) COMMIT
3244
+ Migrating to CreateBitCoreSlides (20140620222618)
3245
+  (0.3ms) BEGIN
3246
+  (5.4ms) CREATE TABLE "bit_core_slides" ("id" serial primary key, "title" character varying(255) NOT NULL, "body" text NOT NULL, "position" integer DEFAULT 1 NOT NULL, "bit_core_slideshow_id" integer NOT NULL, "type" character varying(255), "is_title_visible" boolean DEFAULT 't' NOT NULL, "created_at" timestamp, "updated_at" timestamp) 
3247
+  (1.6ms) ALTER TABLE bit_core_slides
3248
+ ADD CONSTRAINT bit_core_slide_position UNIQUE (bit_core_slideshow_id, position)
3249
+ DEFERRABLE INITIALLY IMMEDIATE
3250
+
3251
+  (2.0ms)  ALTER TABLE bit_core_slides
3252
+ ADD CONSTRAINT fk_slideshows_slides
3253
+ FOREIGN KEY (bit_core_slideshow_id)
3254
+ REFERENCES bit_core_slideshows(id)
3255
+ 
3256
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20140620222618"]]
3257
+  (0.6ms) COMMIT
3258
+ Migrating to AddOptionsToSlides (20140620222619)
3259
+  (0.3ms) BEGIN
3260
+  (0.6ms) ALTER TABLE "bit_core_slides" ADD COLUMN "options" text
3261
+ SQL (0.5ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20140620222619"]]
3262
+  (0.9ms) COMMIT
3263
+ Migrating to AddConfigFieldsToProviders (20140620222620)
3264
+  (0.4ms) BEGIN
3265
+  (0.6ms) ALTER TABLE "bit_core_content_providers" ADD COLUMN "template_path" character varying(255)
3266
+  (0.5ms) ALTER TABLE "bit_core_content_providers" ADD COLUMN "data_class_name" character varying(255)
3267
+  (0.6ms) ALTER TABLE "bit_core_content_providers" ADD COLUMN "data_attributes" text
3268
+  (0.7ms) ALTER TABLE "bit_core_content_providers" ADD COLUMN "show_next_nav" boolean
3269
+  (0.7ms) ALTER TABLE "bit_core_content_providers" ADD COLUMN "locals" text
3270
+ SQL (0.5ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20140620222620"]]
3271
+  (0.7ms) COMMIT
3272
+ Migrating to ConvertToolsModulesPresentersToBitCore (20140620222851)
3273
+  (0.3ms) BEGIN
3274
+ BitPlayer::Tool Load (1.1ms) SELECT "bit_player_tools".* FROM "bit_player_tools"
3275
+ BitPlayer::ContentModule Load (0.8ms) SELECT "bit_player_content_modules".* FROM "bit_player_content_modules"
3276
+ BitPlayer::ContentProvider Load (0.9ms) SELECT "bit_player_content_providers".* FROM "bit_player_content_providers"
3277
+  (0.3ms) ALTER TABLE bit_player_content_modules
3278
+ DROP CONSTRAINT IF EXISTS fk_content_modules_tools
3279
+
3280
+  (0.9ms)  ALTER TABLE bit_player_content_providers
3281
+ DROP CONSTRAINT IF EXISTS fk_content_providers_modules
3282
+ 
3283
+  (1.8ms) DROP TABLE "bit_player_tools"
3284
+  (1.8ms) DROP TABLE "bit_player_content_modules"
3285
+  (2.0ms) DROP TABLE "bit_player_content_providers"
3286
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20140620222851"]]
3287
+  (2.0ms) COMMIT
3288
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
3289
+  (0.2ms) BEGIN
3290
+ BitCore::ContentModule Load (1.5ms) SELECT "bit_core_content_modules".* FROM "bit_core_content_modules" WHERE "bit_core_content_modules"."bit_core_tool_id" = 1 AND "bit_core_content_modules"."position" = 1 ORDER BY "bit_core_content_modules"."id" ASC LIMIT 1
3291
+  (0.3ms) ROLLBACK
3292
+  (0.1ms) BEGIN
3293
+  (0.3ms) ROLLBACK
3294
+  (0.1ms) BEGIN
3295
+  (0.2ms) ROLLBACK
3296
+  (0.1ms) BEGIN
3297
+ BitCore::ContentModule Load (2.5ms) SELECT "bit_core_content_modules".* FROM "bit_core_content_modules" WHERE "bit_core_content_modules"."bit_core_tool_id" = 1 AND "bit_core_content_modules"."position" = 1 ORDER BY "bit_core_content_modules"."id" ASC LIMIT 1
3298
+  (0.3ms) ROLLBACK
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bit_player
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
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-06-24 00:00:00.000000000 Z
11
+ date: 2014-07-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails