panda_pal 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/panda_pal/organization.rb +1 -0
- data/db/migrate/20170106165533_add_salesforce_id_to_organizations.rb +5 -0
- data/lib/panda_pal/version.rb +1 -1
- data/spec/dummy/log/test.log +0 -0
- data/spec/factories/panda_pal_organizations.rb +1 -0
- data/spec/models/panda_pal/organization_spec.rb +11 -0
- metadata +6 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c68a57ecb743fa849235f9e53feb06fa22fe32e5
|
4
|
+
data.tar.gz: 917536c27ecb5affea946a64027f8e0fcc2b6e5b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ffb9deec03a9f6bad6c4bad63ffb884b4d409b1148b1d5f20caf0908c08f09f798798313e3d9696d5a93d476107d4100676f5460a49f32c6d7b3073201b8dee9
|
7
|
+
data.tar.gz: 822f12e7100b4e5140ac58d91b9be5f1605ca2e8f50f72be07ce90fe2630da4f05ba1fe1ea9c121ea421cf815266c459f4e7d72648089246ce88f06db0d0649a
|
@@ -5,6 +5,7 @@ module PandaPal
|
|
5
5
|
validates :secret, presence: true
|
6
6
|
validates :name, uniqueness: { case_sensitive: false }, presence: true, format: { with: /\A[a-z0-9_]+\z/i }
|
7
7
|
validates :canvas_account_id, presence: true
|
8
|
+
validates :salesforce_id, presence: true, uniqueness: true
|
8
9
|
|
9
10
|
after_create :create_schema
|
10
11
|
after_commit :destroy_schema, on: :destroy
|
data/lib/panda_pal/version.rb
CHANGED
File without changes
|
@@ -22,5 +22,16 @@ module PandaPal
|
|
22
22
|
org.name = 'test123'
|
23
23
|
expect(org.valid?).to be_falsey
|
24
24
|
end
|
25
|
+
|
26
|
+
it 'requires a salesforce_id' do
|
27
|
+
org = build :panda_pal_organization, salesforce_id: nil
|
28
|
+
expect(org.valid?).to be_falsey
|
29
|
+
end
|
30
|
+
|
31
|
+
it 'does not allow duplicate salesforce ids' do
|
32
|
+
org = create :panda_pal_organization, salesforce_id: 'salesforce'
|
33
|
+
org2 = build :panda_pal_organization, salesforce_id: 'salesforce'
|
34
|
+
expect(org2.valid?).to be_falsey
|
35
|
+
end
|
25
36
|
end
|
26
37
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: panda_pal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Young
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-01-
|
11
|
+
date: 2017-01-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -163,6 +163,7 @@ files:
|
|
163
163
|
- db/migrate/20160413132229_create_delayed_jobs.rb
|
164
164
|
- db/migrate/20160413135653_create_panda_pal_sessions.rb
|
165
165
|
- db/migrate/20160425130344_add_panda_pal_organization_to_session.rb
|
166
|
+
- db/migrate/20170106165533_add_salesforce_id_to_organizations.rb
|
166
167
|
- lib/panda_pal.rb
|
167
168
|
- lib/panda_pal/engine.rb
|
168
169
|
- lib/panda_pal/helpers.rb
|
@@ -207,6 +208,7 @@ files:
|
|
207
208
|
- spec/dummy/db/migrate/20160415162153_create_delayed_jobs.panda_pal.rb
|
208
209
|
- spec/dummy/db/migrate/20160415162154_create_panda_pal_sessions.panda_pal.rb
|
209
210
|
- spec/dummy/db/schema.rb
|
211
|
+
- spec/dummy/log/test.log
|
210
212
|
- spec/dummy/public/404.html
|
211
213
|
- spec/dummy/public/422.html
|
212
214
|
- spec/dummy/public/500.html
|
@@ -237,7 +239,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
237
239
|
version: '0'
|
238
240
|
requirements: []
|
239
241
|
rubyforge_project:
|
240
|
-
rubygems_version: 2.4.5
|
242
|
+
rubygems_version: 2.4.5.2
|
241
243
|
signing_key:
|
242
244
|
specification_version: 4
|
243
245
|
summary: LTI mountable engine
|
@@ -274,6 +276,7 @@ test_files:
|
|
274
276
|
- spec/dummy/db/migrate/20160415162153_create_delayed_jobs.panda_pal.rb
|
275
277
|
- spec/dummy/db/migrate/20160415162154_create_panda_pal_sessions.panda_pal.rb
|
276
278
|
- spec/dummy/db/schema.rb
|
279
|
+
- spec/dummy/log/test.log
|
277
280
|
- spec/dummy/public/404.html
|
278
281
|
- spec/dummy/public/422.html
|
279
282
|
- spec/dummy/public/500.html
|