openstax_salesforce 2.1.0 → 3.0.0

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
  SHA256:
3
- metadata.gz: c5de74fddbd9bb9d8be00ed8f3376179e5dbc3e01ef161d5f9981146a49bab09
4
- data.tar.gz: e0dd61f57ad125177943567c89bdffc2155b08f313572c39c49f7c573875f016
3
+ metadata.gz: 495928f3786d517d310b02425a165feb2793a1ce5d779926e9fabba7720a169c
4
+ data.tar.gz: 880717a2884911133d5e80ab64b93b62a707a31bd37e804a4affb132ea9f75c9
5
5
  SHA512:
6
- metadata.gz: da16e0f290d835369333d8b240b910d0da0c3123f53d52da983d03365e415ae05a6201ff5ebf4b0adcb2541e2044668ae64eed0845e8f7eb9a315570bdb1641b
7
- data.tar.gz: 5e9c2945eda7655af954d37ef844d3778e4411c28071fb9e0a354297977427622409b52c658c0a5940621fa757399046cb8e5b1b4bf4f3494f8df01fd3f81de3
6
+ metadata.gz: '091355843b386c1a6277ceeeeca6da42fbb057026055ddac97fe9a987346e925523c4425c1435b1e00e2dd70e16b257a6134277394103f0cb051f5ffc206468e'
7
+ data.tar.gz: d394a7a63310def542a9d64edb6129522f47bfc38d6d5f73d222da22e6eaf870f4870fa1234d09103c5f6d8175c044d0095285f1c02cf69fdcf4055b59ba55cd
@@ -6,7 +6,7 @@ module OpenStax::Salesforce
6
6
  end
7
7
 
8
8
  def callback
9
- OpenStax::Salesforce::User.save_from_omniauth!(env["omniauth.auth"])
9
+ OpenStax::Salesforce::User.save_from_omniauth!(request.env["omniauth.auth"])
10
10
  redirect_to root_path
11
11
  end
12
12
 
@@ -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
- t.timestamps
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.select{|bb| bb.name == name}.first
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.select{|ss| ss.name == name}.first
117
+ schools.find { |ss| ss.name == name }
118
118
  end
119
119
 
120
120
  end
@@ -1,5 +1,5 @@
1
1
  module OpenStax
2
2
  module Salesforce
3
- VERSION = "2.1.0"
3
+ VERSION = "3.0.0"
4
4
  end
5
5
  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
@@ -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 "name"
18
- t.string "uid", null: false
19
- t.string "oauth_token", null: false
20
- t.string "refresh_token", null: false
21
- t.string "instance_url", null: false
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
Binary file
@@ -0,0 +1,15 @@
1
+  (0.0ms) SELECT sqlite_version(*)
2
+  (11.0ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
3
+  (16.2ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
4
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
5
+ Migrating to InstallOpenStaxSalesforce (0)
6
+  (0.0ms) begin transaction
7
+  (0.2ms) CREATE 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)
8
+ ActiveRecord::SchemaMigration Create (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "0"]]
9
+  (10.8ms) commit transaction
10
+ ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
11
+  (0.0ms) begin transaction
12
+ ActiveRecord::InternalMetadata Create (0.1ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "development"], ["created_at", "2019-05-24 16:34:24.986512"], ["updated_at", "2019-05-24 16:34:24.986512"]]
13
+  (9.7ms) commit transaction
14
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
15
+  (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC