maestrano-rails 1.0.0.pre.RC7 → 1.0.0.pre.RC8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +5 -5
- data/Gemfile.lock +10 -12
- data/maestrano-rails.gemspec +7 -7
- data/test/dummy_activerecord/config/environments/development.rb +0 -7
- data/test/dummy_activerecord/config/environments/production.rb +0 -4
- data/test/dummy_activerecord/db/development.sqlite3 +0 -0
- data/test/dummy_activerecord/db/schema.rb +1 -0
- data/test/dummy_activerecord/log/development.log +29 -0
- data/test/dummy_activerecord/log/test.log +2508 -0
- data/test/dummy_mongoid/config/environments/development.rb +0 -7
- data/test/dummy_mongoid/config/environments/production.rb +0 -4
- data/test/tmp/app/models/monster.rb +11 -17
- data/test/tmp/db/migrate/20161018205552_add_maestrano_to_monsters.rb +16 -0
- metadata +10 -4
@@ -22,13 +22,6 @@ Dummy::Application.configure do
|
|
22
22
|
# Only use best-standards-support built into browsers
|
23
23
|
config.action_dispatch.best_standards_support = :builtin
|
24
24
|
|
25
|
-
# Raise exception on mass assignment protection for Active Record models
|
26
|
-
# config.active_record.mass_assignment_sanitizer = :strict
|
27
|
-
|
28
|
-
# Log the query plan for queries taking more than this (works
|
29
|
-
# with SQLite, MySQL, and PostgreSQL)
|
30
|
-
# config.active_record.auto_explain_threshold_in_seconds = 0.5
|
31
|
-
|
32
25
|
# Do not compress assets
|
33
26
|
config.assets.compress = false
|
34
27
|
|
@@ -60,8 +60,4 @@ Dummy::Application.configure do
|
|
60
60
|
|
61
61
|
# Send deprecation notices to registered listeners
|
62
62
|
config.active_support.deprecation = :notify
|
63
|
-
|
64
|
-
# Log the query plan for queries taking more than this (works
|
65
|
-
# with SQLite, MySQL, and PostgreSQL)
|
66
|
-
# config.active_record.auto_explain_threshold_in_seconds = 0.5
|
67
63
|
end
|
@@ -1,18 +1,12 @@
|
|
1
|
-
class Monster
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
#
|
10
|
-
#
|
1
|
+
class Monster < ActiveRecord::Base
|
2
|
+
# Enable Maestrano for this group
|
3
|
+
maestrano_group_via :provider, :uid, :tenant do |group, maestrano|
|
4
|
+
group.name = (maestrano.company_name || "Default Group name")
|
5
|
+
# group.principal_email = maestrano.email
|
6
|
+
# group.city = maestrano.city
|
7
|
+
# group.olson_tz = maestrano.timezone
|
8
|
+
# group.country_alpha2 = maestrano.country
|
9
|
+
# group.currency_code = maestrano.currency
|
10
|
+
# group.some_required_field = 'some-appropriate-default-value'
|
11
11
|
end
|
12
|
-
|
13
|
-
## User source identification fields
|
14
|
-
field :provider, type: String, default: ""
|
15
|
-
field :uid, type: String, default: ""
|
16
|
-
field :tenant, type: String, default: ""
|
17
|
-
|
18
|
-
end
|
12
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class AddMaestranoToMonsters < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
change_table(:monsters) do |t|
|
4
|
+
## User source identification fields
|
5
|
+
t.string :provider
|
6
|
+
t.string :uid
|
7
|
+
t.string :tenant
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.down
|
12
|
+
# By default, we don't want to make any assumption about how to roll back this migration.
|
13
|
+
# Please edit below which fields you would like to remove in this migration.
|
14
|
+
raise ActiveRecord::IrreversibleMigration
|
15
|
+
end
|
16
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: maestrano-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.pre.
|
4
|
+
version: 1.0.0.pre.RC8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arnaud Lachaume
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - '='
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 1.0.0.pre.
|
75
|
+
version: 1.0.0.pre.RC8
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - '='
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 1.0.0.pre.
|
82
|
+
version: 1.0.0.pre.RC8
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: sqlite3
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -204,12 +204,14 @@ files:
|
|
204
204
|
- test/dummy_activerecord/config/initializers/wrap_parameters.rb
|
205
205
|
- test/dummy_activerecord/config/locales/en.yml
|
206
206
|
- test/dummy_activerecord/config/routes.rb
|
207
|
+
- test/dummy_activerecord/db/development.sqlite3
|
207
208
|
- test/dummy_activerecord/db/migrate/20140526125222_create_monsters.rb
|
208
209
|
- test/dummy_activerecord/db/migrate/20140526125242_create_admin_monsters.rb
|
209
210
|
- test/dummy_activerecord/db/migrate/20140526144828_create_mno_monsters.rb
|
210
211
|
- test/dummy_activerecord/db/migrate/20140526151139_create_mno_crews.rb
|
211
212
|
- test/dummy_activerecord/db/schema.rb
|
212
213
|
- test/dummy_activerecord/db/test.sqlite3
|
214
|
+
- test/dummy_activerecord/log/development.log
|
213
215
|
- test/dummy_activerecord/log/test.log
|
214
216
|
- test/dummy_activerecord/public/404.html
|
215
217
|
- test/dummy_activerecord/public/422.html
|
@@ -472,6 +474,7 @@ files:
|
|
472
474
|
- test/test_files/config/routes.rb
|
473
475
|
- test/test_helper.rb
|
474
476
|
- test/tmp/app/models/monster.rb
|
477
|
+
- test/tmp/db/migrate/20161018205552_add_maestrano_to_monsters.rb
|
475
478
|
homepage: https://maestrano.com
|
476
479
|
licenses:
|
477
480
|
- MIT
|
@@ -542,12 +545,14 @@ test_files:
|
|
542
545
|
- test/dummy_activerecord/config/initializers/wrap_parameters.rb
|
543
546
|
- test/dummy_activerecord/config/locales/en.yml
|
544
547
|
- test/dummy_activerecord/config/routes.rb
|
548
|
+
- test/dummy_activerecord/db/development.sqlite3
|
545
549
|
- test/dummy_activerecord/db/migrate/20140526125222_create_monsters.rb
|
546
550
|
- test/dummy_activerecord/db/migrate/20140526125242_create_admin_monsters.rb
|
547
551
|
- test/dummy_activerecord/db/migrate/20140526144828_create_mno_monsters.rb
|
548
552
|
- test/dummy_activerecord/db/migrate/20140526151139_create_mno_crews.rb
|
549
553
|
- test/dummy_activerecord/db/schema.rb
|
550
554
|
- test/dummy_activerecord/db/test.sqlite3
|
555
|
+
- test/dummy_activerecord/log/development.log
|
551
556
|
- test/dummy_activerecord/log/test.log
|
552
557
|
- test/dummy_activerecord/public/404.html
|
553
558
|
- test/dummy_activerecord/public/422.html
|
@@ -810,3 +815,4 @@ test_files:
|
|
810
815
|
- test/test_files/config/routes.rb
|
811
816
|
- test/test_helper.rb
|
812
817
|
- test/tmp/app/models/monster.rb
|
818
|
+
- test/tmp/db/migrate/20161018205552_add_maestrano_to_monsters.rb
|