origen 0.7.38 → 0.7.39
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/config/commands.rb +0 -0
- data/config/version.rb +1 -1
- data/lib/origen.rb +12 -0
- data/lib/origen/users.rb +0 -0
- data/lib/origen/users/user.rb +0 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 82536f91ee909daf412bfaba465244b1f8f68597
|
4
|
+
data.tar.gz: 19414aa9e55e89e81edecefcd282c60a0e91d13a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eca2a5082693bc54ec4ae68c61118b6a8c22301883726fe823220789b45a4d9e813dd74b72753893f3b4d1c6b9f5e2d7b3f249bcc9f21ac178108cd258d989dc
|
7
|
+
data.tar.gz: 10ca5f3d0d27976c0bff50987b31f9b8adb5055da40f0ff5d67721e9c08659b9993e7c23fa72c697eff37223202ca136b69d969d6139afa48892619f815d083d
|
data/config/commands.rb
CHANGED
File without changes
|
data/config/version.rb
CHANGED
data/lib/origen.rb
CHANGED
@@ -56,6 +56,8 @@ unless defined? RGen::ORIGENTRANSITION
|
|
56
56
|
autoload :Models, 'origen/models'
|
57
57
|
autoload :Errata, 'origen/errata'
|
58
58
|
|
59
|
+
attr_reader :switch_user
|
60
|
+
|
59
61
|
APP_CONFIG = File.join('config', 'application.rb')
|
60
62
|
|
61
63
|
class OrigenError < StandardError
|
@@ -313,6 +315,15 @@ unless defined? RGen::ORIGENTRANSITION
|
|
313
315
|
@root_fudge_active = false
|
314
316
|
end
|
315
317
|
|
318
|
+
# This is similar to the command line of 'sudo <user_name>'. The main
|
319
|
+
# use case is when someone is running with a Service Account and needs
|
320
|
+
# to change to an actually user instead of the service account
|
321
|
+
def with_user(user_obj, &block)
|
322
|
+
@switch_user = user_obj
|
323
|
+
block.call
|
324
|
+
@switch_user = nil
|
325
|
+
end
|
326
|
+
|
316
327
|
# Turns off bundler and all plugins if the app is loaded within this block
|
317
328
|
# @api private
|
318
329
|
def with_boot_environment
|
@@ -566,6 +577,7 @@ unless defined? RGen::ORIGENTRANSITION
|
|
566
577
|
# @api private
|
567
578
|
def current_user
|
568
579
|
if app_loaded? || in_app_workspace?
|
580
|
+
return @switch_user unless @switch_user.nil?
|
569
581
|
application.current_user
|
570
582
|
else
|
571
583
|
User.new(User.current_user_id)
|
data/lib/origen/users.rb
CHANGED
File without changes
|
data/lib/origen/users/user.rb
CHANGED
File without changes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: origen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.39
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen McGinty
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-12-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|