wordjelly-auth 1.0.3 → 1.0.4
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/jobs/otp_job.rb +1 -1
- data/app/models/auth/concerns/shopping/product_concern.rb +13 -4
- data/app/models/auth/work/cycle.rb +60 -11
- data/lib/auth/version.rb +1 -1
- data/lib/wordjelly-auth.rb +2 -1
- data/spec/dummy/app/assets/time_hashes.json +1 -1
- data/spec/dummy/bin/delayed_job +5 -0
- data/spec/dummy/log/development.log +1496 -0
- data/spec/dummy/log/test.log +3272 -0
- data/spec/models/auth/shopping/product_spec.rb +11 -7
- data/spec/models/auth/work/cycle_spec.rb +0 -3
- metadata +32 -2
@@ -26,6 +26,8 @@ RSpec.describe Auth::Shopping::Product, type: :model, :product_model => true do
|
|
26
26
|
before(:example) do
|
27
27
|
Auth::Shopping::Product.delete_all
|
28
28
|
Auth.configuration.location_class.constantize.delete_all
|
29
|
+
Auth.configuration.user_class.constantize.delete_all
|
30
|
+
Auth::Work::Schedule.delete_all
|
29
31
|
end
|
30
32
|
|
31
33
|
it " -- adds cycles to appropriate minutes in the schedules -- " do
|
@@ -55,7 +57,10 @@ RSpec.describe Auth::Shopping::Product, type: :model, :product_model => true do
|
|
55
57
|
c.versioned_create
|
56
58
|
u.client_authentication["testappid"] = "testestoken"
|
57
59
|
u.cycle_types = {:person_trained_on_em_200 => true}
|
58
|
-
u.save
|
60
|
+
expect(u.save).to be_truthy
|
61
|
+
|
62
|
+
#puts "---------------- ID OF THE SAVED USER -: #{u.id.to_s}"
|
63
|
+
|
59
64
|
|
60
65
|
## now the next thing is the entity
|
61
66
|
e = Auth::Work::Entity.new
|
@@ -89,7 +94,7 @@ RSpec.describe Auth::Shopping::Product, type: :model, :product_model => true do
|
|
89
94
|
l = Auth.configuration.location_class.constantize.new
|
90
95
|
l.id = "first_location"
|
91
96
|
l.save
|
92
|
-
|
97
|
+
puts l.attributes.to_s
|
93
98
|
## so for the minutes, they are going to be the first and second minute in the duration of the schedules
|
94
99
|
|
95
100
|
minutes = {}
|
@@ -104,11 +109,10 @@ RSpec.describe Auth::Shopping::Product, type: :model, :product_model => true do
|
|
104
109
|
|
105
110
|
## now that we have done that, we can pass in all this and see what happens.
|
106
111
|
returned_minutes = Auth.configuration.product_class.constantize.schedule_cycles(minutes,"first_location")
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
## so now what is supposed to happen ?
|
112
|
+
expect(returned_minutes.size).to eq(2)
|
113
|
+
returned_minutes.keys.each do |time|
|
114
|
+
expect(returned_minutes[time].cycles).not_to be_empty
|
115
|
+
end
|
112
116
|
|
113
117
|
|
114
118
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wordjelly-auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- bhargav
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-06-
|
11
|
+
date: 2018-06-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xpath
|
@@ -486,6 +486,34 @@ dependencies:
|
|
486
486
|
- - ">="
|
487
487
|
- !ruby/object:Gem::Version
|
488
488
|
version: '0'
|
489
|
+
- !ruby/object:Gem::Dependency
|
490
|
+
name: delayed_job_mongoid
|
491
|
+
requirement: !ruby/object:Gem::Requirement
|
492
|
+
requirements:
|
493
|
+
- - ">="
|
494
|
+
- !ruby/object:Gem::Version
|
495
|
+
version: '0'
|
496
|
+
type: :runtime
|
497
|
+
prerelease: false
|
498
|
+
version_requirements: !ruby/object:Gem::Requirement
|
499
|
+
requirements:
|
500
|
+
- - ">="
|
501
|
+
- !ruby/object:Gem::Version
|
502
|
+
version: '0'
|
503
|
+
- !ruby/object:Gem::Dependency
|
504
|
+
name: daemons
|
505
|
+
requirement: !ruby/object:Gem::Requirement
|
506
|
+
requirements:
|
507
|
+
- - ">="
|
508
|
+
- !ruby/object:Gem::Version
|
509
|
+
version: '0'
|
510
|
+
type: :runtime
|
511
|
+
prerelease: false
|
512
|
+
version_requirements: !ruby/object:Gem::Requirement
|
513
|
+
requirements:
|
514
|
+
- - ">="
|
515
|
+
- !ruby/object:Gem::Version
|
516
|
+
version: '0'
|
489
517
|
- !ruby/object:Gem::Dependency
|
490
518
|
name: picasa
|
491
519
|
requirement: !ruby/object:Gem::Requirement
|
@@ -1057,6 +1085,7 @@ files:
|
|
1057
1085
|
- spec/dummy/app/views/worms/new.html.erb
|
1058
1086
|
- spec/dummy/app/views/worms/show.html.erb
|
1059
1087
|
- spec/dummy/bin/bundle
|
1088
|
+
- spec/dummy/bin/delayed_job
|
1060
1089
|
- spec/dummy/bin/rails
|
1061
1090
|
- spec/dummy/bin/rake
|
1062
1091
|
- spec/dummy/bin/setup
|
@@ -3314,6 +3343,7 @@ test_files:
|
|
3314
3343
|
- spec/dummy/tmp/cache/assets/sprockets/v3.0/Yv/YvckBpqdRZ189CuU1q0ptVICAvbUbs60GEz7nHBnUXo.cache
|
3315
3344
|
- spec/dummy/tmp/cache/assets/sprockets/v3.0/Yv/YvTxTAy-_S9rWuHfSihfOVhISoMt8auemuxXQawTJzI.cache
|
3316
3345
|
- spec/dummy/bin/rake
|
3346
|
+
- spec/dummy/bin/delayed_job
|
3317
3347
|
- spec/dummy/bin/setup
|
3318
3348
|
- spec/dummy/bin/bundle
|
3319
3349
|
- spec/dummy/bin/rails
|