iAuditor 0.1.2.17 → 0.1.3
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/lib/iAuditor/audit.rb +1 -2
- data/lib/iAuditor/base_modules.rb +3 -2
- data/lib/iAuditor/version.rb +1 -1
- 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: 9727b8629ce062fc6aac6e91e2d27da3b8e131d9
|
4
|
+
data.tar.gz: 7fb7a4c6a352f5da80f7d54d7df76a186693f259
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 758cf70070f32e1ef18738c51cc469c629cc3cdfda1ae8323b2ee21373ff739c3c404dabeabd23c57eeebdeab8d4c58cc56744bd4c8e08f81a636cb3c7287570
|
7
|
+
data.tar.gz: 7ec412ed80c32fdfd341c01ec8e00efda943f17d9f81318e4960cca02bcd30fe4bcbf4fb8b17a3fea9767b28a8c844da0341e123bcbecb2dbb066c484189c8f8
|
data/lib/iAuditor/audit.rb
CHANGED
@@ -3,10 +3,9 @@ module IAuditor
|
|
3
3
|
class Audit
|
4
4
|
include BaseModules::Methods
|
5
5
|
|
6
|
-
|
7
6
|
# Retrieving all audits with the given search criteria
|
8
7
|
def search(options={})
|
9
|
-
@options.merge!(query: options) if options.
|
8
|
+
@options.merge!(query: options) if options.any?
|
10
9
|
@audits = self.class.get("/audits/search", @options)
|
11
10
|
@audits.parsed_response
|
12
11
|
end
|
@@ -1,9 +1,9 @@
|
|
1
|
+
require 'pry'
|
1
2
|
|
2
3
|
class BaseModules
|
3
4
|
module Methods
|
4
5
|
|
5
6
|
def initialize(token)
|
6
|
-
|
7
7
|
@options = token.is_a?(String) ? {
|
8
8
|
headers: {
|
9
9
|
"Content-Type": "application/json",
|
@@ -19,7 +19,8 @@ class BaseModules
|
|
19
19
|
|
20
20
|
|
21
21
|
def self.included(base)
|
22
|
-
|
22
|
+
# "HTTParty".constantize does not support in plain ruby -- If you have ActiveSupport loaded (e.g. in Rails) you can use
|
23
|
+
base.send :include, Object.const_get("HTTParty")
|
23
24
|
base.send(:base_uri, "https://api.safetyculture.io")
|
24
25
|
end
|
25
26
|
|
data/lib/iAuditor/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iAuditor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Wetteroth
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-
|
12
|
+
date: 2018-06-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|