think_feel_do_engine 3.14.7 → 3.14.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/models/think_feel_do_engine/reports/lesson_module.rb +5 -4
- data/app/models/think_feel_do_engine/reports/lesson_viewing.rb +4 -3
- data/db/migrate/20160408185958_add_event_composite_index_participant_kind.rb +5 -0
- data/lib/think_feel_do_engine/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ac82bd61ac77001bfdef60c6c4c401ce5f7180be
|
4
|
+
data.tar.gz: 5bfb5ab62b671bb1d9713600f001530f2eb2e478
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
-
|
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
|
-
|
36
|
-
|
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
|
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.
|
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-
|
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
|