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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8f89f304c615525b700fc94ad333c501d19481cf
4
- data.tar.gz: 9b1843b77e57aa7cde942051c899d21941ed83bc
3
+ metadata.gz: c68a57ecb743fa849235f9e53feb06fa22fe32e5
4
+ data.tar.gz: 917536c27ecb5affea946a64027f8e0fcc2b6e5b
5
5
  SHA512:
6
- metadata.gz: 4d5afedccc2f194d2b144495588f336091c18c103ed2fea74e73a816d6865d53b6f5a907c3ff948d822cac8479a3cb79e5abb7e747310baa9bac1f88cf1369ef
7
- data.tar.gz: 5222ed93f58d7b414f80bd8b89804508361f303e5980ffb89f9a9443e6ebfd53b39ad81220335f2138b5f90fc8bd2d0919593bee927c3b51df81ed20148f6982
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
@@ -0,0 +1,5 @@
1
+ class AddSalesforceIdToOrganizations < ActiveRecord::Migration
2
+ def change
3
+ add_column :panda_pal_organizations, :salesforce_id, :string, unique: true
4
+ end
5
+ end
@@ -1,3 +1,3 @@
1
1
  module PandaPal
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
File without changes
@@ -4,5 +4,6 @@ FactoryGirl.define do
4
4
  key { SecureRandom.hex }
5
5
  secret { SecureRandom.hex }
6
6
  canvas_account_id { SecureRandom.random_number(10000) }
7
+ salesforce_id { SecureRandom.hex }
7
8
  end
8
9
  end
@@ -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.1
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-03 00:00:00.000000000 Z
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