unidom-score 1.0.2 → 1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eaa607c731316c64167f570f7b5d6f9a9d35377c
4
- data.tar.gz: a2910f4c55f4ce798026fbf5bfcdf03167e9be93
3
+ metadata.gz: 6724ce452edb920cb54f013247b45fb7c44cfb70
4
+ data.tar.gz: 6a746a54f6e650d7dc420bc24c62b0daa1246b7c
5
5
  SHA512:
6
- metadata.gz: 92aeb82df2fbda87c322bad426f8d92fd9cfa1c54966b601eb61add780f63d746d5bd5896ef68419617690a246e9a7e9f7186da78c723049ee9b86a4795952d0
7
- data.tar.gz: e712a734cd42ef93b35099f196150c6b53f03263f5787b9258a441c7f28a1e8c619845501883d6b6140c3b7949ec9142baa5027807c34fa27a792724e31ea267
6
+ metadata.gz: 0c4774fc0b6c963243f037e37eacb4c0c641809de3a19d59cc62fb94e8290516a8dd838a6eea231dbcdff408ce23a0748da7ed9152cf97374adc78d03233fdba
7
+ data.tar.gz: e5b95e970f864035c3673cf507ced80bef47c92611da9fb4f053e609aa15d5c7189d332a5799cc82e4a690723b44a2363594b62d78df41b1cce926a367e3fcc8
data/README.md CHANGED
@@ -69,3 +69,18 @@ Unidom::Common.configure do |options|
69
69
 
70
70
  end
71
71
  ```
72
+
73
+
74
+
75
+ ## RSpec examples
76
+
77
+ ```ruby
78
+ # spec/models/unidom_spec.rb
79
+ require 'unidom/score/models_rspec'
80
+
81
+ # spec/types/unidom_spec.rb
82
+ require 'unidom/score/types_rspec'
83
+
84
+ # spec/validators/unidom_spec.rb
85
+ require 'unidom/score/validators_rspec'
86
+ ```
@@ -0,0 +1,25 @@
1
+ describe Unidom::Score::ScoreItem, type: :model do
2
+
3
+ before :each do
4
+ end
5
+
6
+ after :each do
7
+ end
8
+
9
+ context do
10
+
11
+ model_attributes = {
12
+ sheet_id: SecureRandom.uuid,
13
+ template_id: SecureRandom.uuid,
14
+ scorer_id: SecureRandom.uuid,
15
+ scorer_type: 'Unidom::Score::Scorer::Mock',
16
+ title: 'Some Title',
17
+ score: 95.00,
18
+ scored_on: Date.current
19
+ }
20
+
21
+ it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
22
+
23
+ end
24
+
25
+ end
@@ -0,0 +1,21 @@
1
+ describe Unidom::Score::ScoreItemTemplate, type: :model do
2
+
3
+ before :each do
4
+ end
5
+
6
+ after :each do
7
+ end
8
+
9
+ context do
10
+
11
+ model_attributes = {
12
+ sheet_id: SecureRandom.uuid,
13
+ title: 'Some Title',
14
+ score: 100.00
15
+ }
16
+
17
+ it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
18
+
19
+ end
20
+
21
+ end
@@ -0,0 +1,26 @@
1
+ describe Unidom::Score::ScoreSheet, type: :model do
2
+
3
+ before :each do
4
+ end
5
+
6
+ after :each do
7
+ end
8
+
9
+ context do
10
+
11
+ model_attributes = {
12
+ template_id: SecureRandom.uuid,
13
+ scorer_id: SecureRandom.uuid,
14
+ scorer_type: 'Unidom::Score::Scorer::Mock',
15
+ score_keeper_id: SecureRandom.uuid,
16
+ score_keeper_type: 'Unidom::Score::ScoreKeeper::Mock',
17
+ name: 'Some Name',
18
+ score: 95.00,
19
+ scored_on: Date.current
20
+ }
21
+
22
+ it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
23
+
24
+ end
25
+
26
+ end
@@ -0,0 +1,22 @@
1
+ describe Unidom::Score::ScoreSheetTemplate, type: :model do
2
+
3
+ before :each do
4
+ end
5
+
6
+ after :each do
7
+ end
8
+
9
+ context do
10
+
11
+ model_attributes = {
12
+ subject_id: SecureRandom.uuid,
13
+ subject_type: 'Unidom::Score::Subject::Mock',
14
+ name: 'Some Name',
15
+ score: 100.00
16
+ }
17
+
18
+ it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
19
+
20
+ end
21
+
22
+ end
@@ -0,0 +1,4 @@
1
+ require 'rspec/models/unidom/score/score_sheet_template_spec' unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Score::ScoreSheetTemplate'
2
+ require 'rspec/models/unidom/score/score_item_template_spec' unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Score::ScoreItemTemplate'
3
+ require 'rspec/models/unidom/score/score_sheet_spec' unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Score::ScoreSheet'
4
+ require 'rspec/models/unidom/score/score_item_spec' unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Score::ScoreItem'
File without changes
File without changes
@@ -1,5 +1,5 @@
1
1
  module Unidom
2
2
  module Score
3
- VERSION = '1.0.2'.freeze
3
+ VERSION = '1.1'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unidom-score
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: '1.1'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Topbit Du
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-23 00:00:00.000000000 Z
11
+ date: 2017-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: unidom-common
@@ -54,9 +54,16 @@ files:
54
54
  - db/migrate/20060102000000_create_unidom_score_item_templates.rb
55
55
  - db/migrate/20060111000000_create_unidom_score_sheets.rb
56
56
  - db/migrate/20060112000000_create_unidom_score_items.rb
57
+ - lib/rspec/models/unidom/score/score_item_spec.rb
58
+ - lib/rspec/models/unidom/score/score_item_template_spec.rb
59
+ - lib/rspec/models/unidom/score/score_sheet_spec.rb
60
+ - lib/rspec/models/unidom/score/score_sheet_template_spec.rb
57
61
  - lib/tasks/score_tasks.rake
58
62
  - lib/unidom/score.rb
59
63
  - lib/unidom/score/engine.rb
64
+ - lib/unidom/score/models_rspec.rb
65
+ - lib/unidom/score/types_rspec.rb
66
+ - lib/unidom/score/validators_rspec.rb
60
67
  - lib/unidom/score/version.rb
61
68
  homepage: https://github.com/topbitdu/unidom-score
62
69
  licenses: