openstax_salesforce 2.1.0 → 3.0.0
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/controllers/openstax/salesforce/settings_controller.rb +1 -1
- data/db/migrate/0_install_openstax_salesforce.rb +3 -2
- data/lib/openstax/salesforce/spec_helpers/salesforce_proxy.rb +4 -4
- data/lib/openstax/salesforce/version.rb +1 -1
- data/spec/dummy/config/application.rb +3 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/schema.rb +7 -8
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +15 -0
- data/spec/dummy/log/test.log +1121 -1656
- data/spec/openstax/salesforce/controllers/settings_controller_spec.rb +3 -9
- metadata +46 -49
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 495928f3786d517d310b02425a165feb2793a1ce5d779926e9fabba7720a169c
|
4
|
+
data.tar.gz: 880717a2884911133d5e80ab64b93b62a707a31bd37e804a4affb132ea9f75c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '091355843b386c1a6277ceeeeca6da42fbb057026055ddac97fe9a987346e925523c4425c1435b1e00e2dd70e16b257a6134277394103f0cb051f5ffc206468e'
|
7
|
+
data.tar.gz: d394a7a63310def542a9d64edb6129522f47bfc38d6d5f73d222da22e6eaf870f4870fa1234d09103c5f6d8175c044d0095285f1c02cf69fdcf4055b59ba55cd
|
@@ -1,4 +1,4 @@
|
|
1
|
-
class InstallOpenStaxSalesforce < ActiveRecord::Migration
|
1
|
+
class InstallOpenStaxSalesforce < ActiveRecord::Migration[4.2]
|
2
2
|
def change
|
3
3
|
create_table :openstax_salesforce_users do |t|
|
4
4
|
t.string :name
|
@@ -6,7 +6,8 @@ class InstallOpenStaxSalesforce < ActiveRecord::Migration
|
|
6
6
|
t.string :oauth_token, null: false
|
7
7
|
t.string :refresh_token, null: false
|
8
8
|
t.string :instance_url, null: false
|
9
|
-
|
9
|
+
|
10
|
+
t.timestamps null: false
|
10
11
|
end
|
11
12
|
end
|
12
13
|
end
|
@@ -75,7 +75,7 @@ module OpenStax::Salesforce::SpecHelpers
|
|
75
75
|
|
76
76
|
def ensure_books_exist(book_names)
|
77
77
|
book_names.each do |book_name|
|
78
|
-
if books.none?{|bb| bb.name == book_name}
|
78
|
+
if books.none? {|bb| bb.name == book_name}
|
79
79
|
book = Book.new(name: book_name)
|
80
80
|
book.save!
|
81
81
|
books.push(book)
|
@@ -85,7 +85,7 @@ module OpenStax::Salesforce::SpecHelpers
|
|
85
85
|
|
86
86
|
def ensure_schools_exist(school_names)
|
87
87
|
school_names.compact.each do |school_name|
|
88
|
-
if schools.none?{|ss| ss.name == school_name}
|
88
|
+
if schools.none? {|ss| ss.name == school_name}
|
89
89
|
school = School.new(name: school_name)
|
90
90
|
school.save!
|
91
91
|
schools.push(school)
|
@@ -98,7 +98,7 @@ module OpenStax::Salesforce::SpecHelpers
|
|
98
98
|
end
|
99
99
|
|
100
100
|
def book(name)
|
101
|
-
books.
|
101
|
+
books.find { |bb| bb.name == name }
|
102
102
|
end
|
103
103
|
|
104
104
|
def book_id(name)
|
@@ -114,7 +114,7 @@ module OpenStax::Salesforce::SpecHelpers
|
|
114
114
|
end
|
115
115
|
|
116
116
|
def school(name)
|
117
|
-
schools.
|
117
|
+
schools.find { |ss| ss.name == name }
|
118
118
|
end
|
119
119
|
|
120
120
|
end
|
@@ -7,6 +7,9 @@ require "openstax_salesforce"
|
|
7
7
|
|
8
8
|
module Dummy
|
9
9
|
class Application < Rails::Application
|
10
|
+
# Initialize configuration defaults for originally generated Rails version.
|
11
|
+
config.load_defaults 5.2
|
12
|
+
|
10
13
|
# Settings in config/environments/* take precedence over those specified here.
|
11
14
|
# Application configuration should go into files in config/initializers
|
12
15
|
# -- all .rb files in that directory are automatically loaded.
|
Binary file
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
# encoding: UTF-8
|
2
1
|
# This file is auto-generated from the current state of the database. Instead
|
3
2
|
# of editing this file, please use the migrations feature of Active Record to
|
4
3
|
# incrementally modify your database, and then regenerate this schema definition.
|
@@ -14,13 +13,13 @@
|
|
14
13
|
ActiveRecord::Schema.define(version: 0) do
|
15
14
|
|
16
15
|
create_table "openstax_salesforce_users", force: :cascade do |t|
|
17
|
-
t.string
|
18
|
-
t.string
|
19
|
-
t.string
|
20
|
-
t.string
|
21
|
-
t.string
|
22
|
-
t.datetime "created_at"
|
23
|
-
t.datetime "updated_at"
|
16
|
+
t.string "name"
|
17
|
+
t.string "uid", null: false
|
18
|
+
t.string "oauth_token", null: false
|
19
|
+
t.string "refresh_token", null: false
|
20
|
+
t.string "instance_url", null: false
|
21
|
+
t.datetime "created_at", null: false
|
22
|
+
t.datetime "updated_at", null: false
|
24
23
|
end
|
25
24
|
|
26
25
|
end
|
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|
@@ -0,0 +1,15 @@
|
|
1
|
+
[1m[35m (0.0ms)[0m [1m[34mSELECT sqlite_version(*)[0m
|
2
|
+
[1m[35m (11.0ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)[0m
|
3
|
+
[1m[35m (16.2ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
4
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
5
|
+
Migrating to InstallOpenStaxSalesforce (0)
|
6
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
7
|
+
[1m[35m (0.2ms)[0m [1m[35mCREATE TABLE "openstax_salesforce_users" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "uid" varchar NOT NULL, "oauth_token" varchar NOT NULL, "refresh_token" varchar NOT NULL, "instance_url" varchar NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
8
|
+
[1m[36mActiveRecord::SchemaMigration Create (0.1ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "0"]]
|
9
|
+
[1m[35m (10.8ms)[0m [1m[36mcommit transaction[0m
|
10
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.1ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ?[0m [["key", "environment"], ["LIMIT", 1]]
|
11
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
12
|
+
[1m[36mActiveRecord::InternalMetadata Create (0.1ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["key", "environment"], ["value", "development"], ["created_at", "2019-05-24 16:34:24.986512"], ["updated_at", "2019-05-24 16:34:24.986512"]]
|
13
|
+
[1m[35m (9.7ms)[0m [1m[36mcommit transaction[0m
|
14
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
15
|
+
[1m[35m (0.0ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|