traitify 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/traitify/client/connection.rb +1 -0
- data/lib/traitify/version.rb +1 -1
- data/spec/support/mocks/aggregate.json +7 -0
- data/spec/traitify/client/examples/analytics_spec.rb +16 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ac1ecd58611516c2f31b6e56e290c1efc0ee7e1842cce7b48a0157c8b5687acf
|
4
|
+
data.tar.gz: 84f2887d1ae2bd1fd6ded295cb864596d41fa3a3aad1b1a9dcffe02e22142015
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 535343ccff192c9a91c2b3fa4f1495e38c3fbd9bc02d30312718f6a36d230262a280ae8b59947b4f97104c4d6926cf1f88e5c303f71ca9acacb1afc613c2c546
|
7
|
+
data.tar.gz: a882126511dbb26e8dc2bb92a78393943296488b97a246799fe187b51e2e6ac58c8a9d499d50fd9229c1c28125cf03d8bf62ef6ae0222268af616b966100bb59
|
data/Gemfile.lock
CHANGED
@@ -11,6 +11,7 @@ module Traitify
|
|
11
11
|
faraday.request :authorization, :basic, secret_key || public_key, "x"
|
12
12
|
faraday.request :json
|
13
13
|
faraday.headers["Accept"] = "application/json"
|
14
|
+
faraday.options.params_encoder = Faraday::FlatParamsEncoder
|
14
15
|
faraday.response :logger, Traitify.logger, formatter: Traitify::Middleware::Formatter
|
15
16
|
faraday.response :raise_traitify_error
|
16
17
|
faraday.response :json
|
data/lib/traitify/version.rb
CHANGED
@@ -14,6 +14,22 @@ describe Traitify::Client do
|
|
14
14
|
let(:client){ Traitify.new }
|
15
15
|
|
16
16
|
describe ".analytics" do
|
17
|
+
context ".aggregate" do
|
18
|
+
let(:data){
|
19
|
+
client.analytics.decks("big-five")
|
20
|
+
.aggregate(stats: [:created_count, :started_count, :completed_count]).data
|
21
|
+
}
|
22
|
+
|
23
|
+
before(:each) do
|
24
|
+
query = "locale_key=en-us&stats=created_count&stats=started_count&stats=completed_count"
|
25
|
+
stub_it(:get, "/analytics/decks/big-five/aggregate?#{query}", "aggregate")
|
26
|
+
end
|
27
|
+
|
28
|
+
it "returns assessments" do
|
29
|
+
expect(data.assessments.started_count).to eq(10)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
17
33
|
context ".assessments" do
|
18
34
|
let(:assessments){ client.analytics.decks("deck-id").assessments.data }
|
19
35
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: traitify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom Prats
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2022-09-
|
13
|
+
date: 2022-09-16 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|
@@ -187,6 +187,7 @@ files:
|
|
187
187
|
- lib/traitify/version.rb
|
188
188
|
- paths.yml
|
189
189
|
- spec/spec_helper.rb
|
190
|
+
- spec/support/mocks/aggregate.json
|
190
191
|
- spec/support/mocks/assessment.json
|
191
192
|
- spec/support/mocks/assessment_analytics.json
|
192
193
|
- spec/support/mocks/assessment_with_results.json
|
@@ -251,6 +252,7 @@ specification_version: 4
|
|
251
252
|
summary: Traitify Gem
|
252
253
|
test_files:
|
253
254
|
- spec/spec_helper.rb
|
255
|
+
- spec/support/mocks/aggregate.json
|
254
256
|
- spec/support/mocks/assessment.json
|
255
257
|
- spec/support/mocks/assessment_analytics.json
|
256
258
|
- spec/support/mocks/assessment_with_results.json
|