maestrano-rails 1.0.0.pre.RC5 → 1.0.0.pre.RC6

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.
@@ -1,12 +1,18 @@
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'
1
+ class Monster
2
+ include Mongoid::Document
3
+ # Enable Maestrano for this user
4
+ maestrano_user_via :provider, :uid, :tenant do |user,maestrano|
5
+ user.name = maestrano.first_name
6
+ user.surname = maestrano.last_name
7
+ user.email = maestrano.email
8
+
9
+ # user.country_alpha2 = maestrano.country
10
+ # user.some_required_field = 'some-appropriate-default-value'
11
11
  end
12
- 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
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maestrano-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.pre.RC5
4
+ version: 1.0.0.pre.RC6
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-09-18 00:00:00.000000000 Z
11
+ date: 2016-09-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: '4.2'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: '4.2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: jquery-rails
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - '='
74
74
  - !ruby/object:Gem::Version
75
- version: 1.0.0.pre.RC5
75
+ version: 1.0.0.pre.RC6
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.RC5
82
+ version: 1.0.0.pre.RC6
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: sqlite3
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -472,7 +472,6 @@ files:
472
472
  - test/test_files/config/routes.rb
473
473
  - test/test_helper.rb
474
474
  - test/tmp/app/models/monster.rb
475
- - test/tmp/db/migrate/20160918091730_add_maestrano_to_monsters.rb
476
475
  homepage: https://maestrano.com
477
476
  licenses:
478
477
  - MIT
@@ -811,4 +810,3 @@ test_files:
811
810
  - test/test_files/config/routes.rb
812
811
  - test/test_helper.rb
813
812
  - test/tmp/app/models/monster.rb
814
- - test/tmp/db/migrate/20160918091730_add_maestrano_to_monsters.rb
@@ -1,16 +0,0 @@
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