think_feel_do_engine 3.14.7 → 3.14.8

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: 6f6254fd47d318dc7d56d53e80c99d4f388d207c
4
- data.tar.gz: b7848c0a7ce18bfe532fa395966886d25f06764e
3
+ metadata.gz: ac82bd61ac77001bfdef60c6c4c401ce5f7180be
4
+ data.tar.gz: 5bfb5ab62b671bb1d9713600f001530f2eb2e478
5
5
  SHA512:
6
- metadata.gz: e95d8aa852da0d28e3cbfd95c0abfa016304c0ff172d5c4ecf3cfe91e3974f38fdb06596d73fef89995d6e2971c81a51a4b65c6fc4c2bcf7d252e5a3bc33e478
7
- data.tar.gz: 0c4d6e1b4233923db7db2d4cd6c8039ae7ae3d1bb67e927fab0300a2c1e8bfb7a34b3e801214b2bcb40dd9c941430d2c8a9909fc2baff326a47ae30f83a2f30a
6
+ metadata.gz: 8d2ee7577bdafbc3f69122e6076ca5dbc24342d19576673364a2d3fa479293b42bdb85fbe233f63f3e89a287e7b9543d09dc066d7f0aeddcb6c41be2c17cd43c
7
+ data.tar.gz: 30c619cdd4a3b376c37ccd5249ccc275c2d9f47671811200de576125aaded08c7a7aa4d671211c534f0f62d37562b54cd6e82481b0c33a398b16f44de2e75280
@@ -3,20 +3,20 @@ module ThinkFeelDoEngine
3
3
  # Shared Lesson Module behavior.
4
4
  module LessonModule
5
5
  URL_ROOT_RE = /^[^\/]*\/\/[^\/]+/
6
-
6
+ # Disabling method length due to nested methods.
7
+ # rubocop:disable Metrics/MethodLength
7
8
  def self.included(klass)
8
9
  class << klass
9
10
  # Returns a hash mapping lesson entry (first slide) path to Lesson
10
11
  # Module id.
11
12
  def lesson_entries_map
12
- lessons = ContentModules::LessonModule.all.map do |m|
13
+ lessons = ContentModules::LessonModule
14
+ .includes(:content_providers).map do |m|
13
15
  first_provider_id = m.provider(1).try(:id)
14
16
  next unless first_provider_id
15
-
16
17
  path = navigator_location_path(module_id: m.id,
17
18
  provider_id: first_provider_id,
18
19
  content_position: 1)
19
-
20
20
  ["#{ path }", m.id]
21
21
  end.compact
22
22
 
@@ -42,6 +42,7 @@ module ThinkFeelDoEngine
42
42
  end
43
43
  end
44
44
  end
45
+ # rubocop:enable Metrics/LineLength
45
46
  end
46
47
  end
47
48
  end
@@ -17,6 +17,7 @@ module ThinkFeelDoEngine
17
17
 
18
18
  def self.all(*ids)
19
19
  lessons = lesson_entries_map
20
+ lessons_default = lessons_with_default_urls
20
21
 
21
22
  Participant.select(:id, :study_id)
22
23
  .where(id: participant_ids(ids)).map do |participant|
@@ -26,14 +27,14 @@ module ThinkFeelDoEngine
26
27
  .select(:participant_id, :emitted_at, :payload)
27
28
  .to_a.select do |e|
28
29
  lessons.keys.include?(e.current_url.gsub(URL_ROOT_RE, "")) ||
29
- lessons_with_default_urls
30
+ lessons_default
30
31
  .keys.include?(e.current_url.gsub(URL_ROOT_RE, ""))
31
32
  end
32
33
 
33
34
  lesson_select_events.map do |e|
34
35
  lesson_id = lessons[e.current_url.gsub(URL_ROOT_RE, "")] ||
35
- lessons_with_default_urls[e.current_url
36
- .gsub(URL_ROOT_RE, "")]
36
+ lessons_default[e.current_url
37
+ .gsub(URL_ROOT_RE, "")]
37
38
  last_page_opened = last_page_opened(e, lesson_id)
38
39
  event_hash(participant, lesson_id, e, last_page_opened)
39
40
  end
@@ -0,0 +1,5 @@
1
+ class AddEventCompositeIndexParticipantKind < ActiveRecord::Migration
2
+ def change
3
+ add_index :event_capture_events, [:participant_id, :kind]
4
+ end
5
+ end
@@ -1,4 +1,4 @@
1
1
  # nodoc
2
2
  module ThinkFeelDoEngine
3
- VERSION = "3.14.7"
3
+ VERSION = "3.14.8"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: think_feel_do_engine
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.14.7
4
+ version: 3.14.8
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-04-08 00:00:00.000000000 Z
11
+ date: 2016-04-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -950,6 +950,7 @@ files:
950
950
  - db/migrate/20160205212840_create_experiences.rb
951
951
  - db/migrate/20160209225643_add_emotions_thoughts_body_feelings_to_experience.rb
952
952
  - db/migrate/20160404195642_change_show_next_nav_column_default.bit_core.rb
953
+ - db/migrate/20160408185958_add_event_composite_index_participant_kind.rb
953
954
  - lib/tasks/lesson_notifications.rake
954
955
  - lib/tasks/seed.rake
955
956
  - lib/tasks/think_feel_do_engine_tasks.rake