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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 271a492c1a771289fbd60feff42a1bef2484ef3e
4
- data.tar.gz: c12cb3e3896b0ca49f2d8122fc061f15cd81c4ef
3
+ metadata.gz: 36c14eb019e3e6b2047a40a2c78632c4a4134b7b
4
+ data.tar.gz: f784a4821acbfc19927f35c9ef41107a5177f371
5
5
  SHA512:
6
- metadata.gz: bd2b11c897fbe49e804dc51f9dc58f39056c4af1d0c5506c94041e34b3869270a2ac20da748ffec70f898f478b132be1d3e2cdecbbb43b4ca827446c5f7ad232
7
- data.tar.gz: 67e293e730c277f0fd4a3fcc591a2ce0789ea5e512f4ecb55f4d43d57a99018526b0f91dd8f3629e6708823f23f3d5af39b692eb7ed1f0325a3e421154ed49b8
6
+ metadata.gz: 0a133d78bb674c5b2838ddeabd07d4c922336a59fb1627683b7fce1670e605b58350970f7acb9a7600a228e79fcea0a3461d116ebf6238f2dcaa3acb48e8873a
7
+ data.tar.gz: 42bd07d1476b914738e289aa50b139902818630c832f1ca070f1397a4799f3377994ae1161ed0234f64b229ed38988b09d7dcda905f98ed66faa36da4d2d148f
data/.gitignore CHANGED
@@ -12,3 +12,4 @@
12
12
  *.o
13
13
  *.a
14
14
  mkmf.log
15
+ *.swp
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
@@ -1,3 +1,3 @@
1
1
  module Unm
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
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.8
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-17 00:00:00.000000000 Z
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.8
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