unm 0.0.8 → 0.0.9
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/.gitignore +1 -0
- data/lib/unm.rb +27 -0
- data/lib/unm/version.rb +1 -1
- metadata +3 -4
- data/unm-0.0.7.gem +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 36c14eb019e3e6b2047a40a2c78632c4a4134b7b
|
4
|
+
data.tar.gz: f784a4821acbfc19927f35c9ef41107a5177f371
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a133d78bb674c5b2838ddeabd07d4c922336a59fb1627683b7fce1670e605b58350970f7acb9a7600a228e79fcea0a3461d116ebf6238f2dcaa3acb48e8873a
|
7
|
+
data.tar.gz: 42bd07d1476b914738e289aa50b139902818630c832f1ca070f1397a4799f3377994ae1161ed0234f64b229ed38988b09d7dcda905f98ed66faa36da4d2d148f
|
data/.gitignore
CHANGED
data/lib/unm.rb
CHANGED
@@ -97,4 +97,31 @@ module Unm
|
|
97
97
|
|
98
98
|
end
|
99
99
|
|
100
|
+
class BarRole
|
101
|
+
include Singleton
|
102
|
+
|
103
|
+
def self.check(candidate, bar_role = "STU_GEN_RPTS_COHORT_ANALYTICS")
|
104
|
+
base_uri = "http://baa.unm.edu/rest/auth/netid/"
|
105
|
+
auth = { username: Unm.configuration.netid, password: Unm.configuration.password }
|
106
|
+
HTTParty.get(URI.join(base_uri, candidate + "/", "accessRole/", bar_role), basic_auth: auth).body == "Y"
|
107
|
+
end
|
108
|
+
|
109
|
+
end
|
110
|
+
|
111
|
+
class Configuration
|
112
|
+
attr_accessor :netid, :password
|
113
|
+
end
|
114
|
+
|
115
|
+
|
116
|
+
class << self
|
117
|
+
|
118
|
+
attr_accessor :configuration
|
119
|
+
|
120
|
+
def configure
|
121
|
+
self.configuration ||= Configuration.new
|
122
|
+
yield(configuration) if block_given?
|
123
|
+
end
|
124
|
+
|
125
|
+
end
|
126
|
+
|
100
127
|
end
|
data/lib/unm/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ricardo Piro-Rael
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08
|
11
|
+
date: 2015-10-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -80,7 +80,6 @@ files:
|
|
80
80
|
- Rakefile
|
81
81
|
- lib/unm.rb
|
82
82
|
- lib/unm/version.rb
|
83
|
-
- unm-0.0.7.gem
|
84
83
|
- unm.gemspec
|
85
84
|
homepage: ''
|
86
85
|
licenses:
|
@@ -102,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
102
101
|
version: '0'
|
103
102
|
requirements: []
|
104
103
|
rubyforge_project:
|
105
|
-
rubygems_version: 2.4.
|
104
|
+
rubygems_version: 2.4.6
|
106
105
|
signing_key:
|
107
106
|
specification_version: 4
|
108
107
|
summary: Utilities to interact with UNM Interfaces.
|
data/unm-0.0.7.gem
DELETED
Binary file
|