NCCConfidence 0.2.0 → 0.2.1
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/README.md +0 -33
- data/lib/nccconfidence.rb +0 -1
- data/lib/nccconfidence/http_client.rb +2 -2
- data/lib/nccconfidence/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c122f74f5f51358c0ef070caaa1c5690153d7c1
|
4
|
+
data.tar.gz: c9ec6e84fa11bde005dfdb8d893c2442d0952be1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 44988c35434416adee13dbc591aa21ea08e5b116f661b71a9690212dbb835da3c959065d998fc0345535a3d57165eace68fd6dbcba4863ccd0131d7a4c0be1b0
|
7
|
+
data.tar.gz: df8321ce767216bea541e31cec2558d71e9d2c5f171a6f53637d750458fd5d51216f35558805cea7ba32dbb9c90706eb8ee42756994f1dcd29cefc690ec4dc16
|
data/README.md
CHANGED
@@ -58,39 +58,6 @@ puts result
|
|
58
58
|
|
59
59
|
```
|
60
60
|
|
61
|
-
You can even store the filter blocks as `Procs` and pass them to the query block like this:
|
62
|
-
|
63
|
-
```ruby
|
64
|
-
|
65
|
-
t_filter = Proc.new do
|
66
|
-
account_id "BN5A64933"
|
67
|
-
id "MA2PG72611"
|
68
|
-
start_date "2015-08-12"
|
69
|
-
start_time "12:00:00"
|
70
|
-
end_date "2015-08-07"
|
71
|
-
end_time "07:05:05"
|
72
|
-
status_code 1
|
73
|
-
end
|
74
|
-
|
75
|
-
d_filter = Proc.new do
|
76
|
-
object "Account" do
|
77
|
-
item "AccountId"
|
78
|
-
object "Pages" do
|
79
|
-
item "Page"
|
80
|
-
end
|
81
|
-
object "ServiceStatus" do
|
82
|
-
item "HighestStatusCode"
|
83
|
-
end
|
84
|
-
end
|
85
|
-
end
|
86
|
-
|
87
|
-
result = NCCConfidence.query do |test_filter,data_filter|
|
88
|
-
[test_filter.make(&t_filter),data_filter.make(&d_filter)]
|
89
|
-
end
|
90
|
-
puts result
|
91
|
-
```
|
92
|
-
|
93
|
-
That way you can make them re-usable or make the query easily changable by just switching which Procs you provide.
|
94
61
|
|
95
62
|
Please note you have to put both test_filter & data_filter into an array otherwise the client will only get one of the filters instead of an array of two two filters.
|
96
63
|
|
data/lib/nccconfidence.rb
CHANGED
@@ -2,8 +2,7 @@ require "curb"
|
|
2
2
|
|
3
3
|
module NCCConfidence
|
4
4
|
class Http
|
5
|
-
class << self
|
6
|
-
|
5
|
+
class << self
|
7
6
|
|
8
7
|
def request &scipt
|
9
8
|
t = self.new
|
@@ -12,6 +11,7 @@ module NCCConfidence
|
|
12
11
|
end
|
13
12
|
|
14
13
|
end
|
14
|
+
|
15
15
|
attr_accessor :curl, :headers,:payload, :username, :password, :auth_type, :uri, :ssl, :redirects
|
16
16
|
[:get, :post, :put, :delete, :head, :options, :patch, :link, :unlink].each do |func_name|
|
17
17
|
define_method func_name do
|