nagira_active_resource 0.0.3 → 0.0.4
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
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: c6265256f206ded4875191d0be780721d0e11767
|
4
|
+
data.tar.gz: f1f326434127f9c7baf60217902f3747f5bd5f8d
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 9b3534ccc2e804290e04ccaf4d4e8785085115afd7b23fbac1a32898fc4dfc8b86663aa3252882d43e3d7f7ceac7645d23d09372e192503998227a859ad97873
|
7
|
+
data.tar.gz: 03aa7156da0aaaeaaaac001f178c4e11f27dcbae0b9c59009e6045dd0b1893f5f2dd268b0c8f026a28891f43ebfde41064eb06f19848e2bb60f722a9340c1f9a
|
@@ -11,7 +11,7 @@ module NagiraActiveResource
|
|
11
11
|
##
|
12
12
|
# Return all objects as Hash
|
13
13
|
#
|
14
|
-
# @param [Hash] args Extra
|
14
|
+
# @param [Hash] args Extra arguments like :host_name for nested
|
15
15
|
# objects (services) :params => !{'host_name' => 'viy'}
|
16
16
|
def self.to_h args={ }
|
17
17
|
begin
|
@@ -29,7 +29,7 @@ module NagiraActiveResource
|
|
29
29
|
#
|
30
30
|
# @param [String] value
|
31
31
|
#
|
32
|
-
# @param [Hash] args Extra
|
32
|
+
# @param [Hash] args Extra arguments like :host_name for nested
|
33
33
|
# objects (services) :params => !{'host_name' => 'viy'}
|
34
34
|
#
|
35
35
|
def self.find_by attribute, value, args={ }
|
@@ -50,7 +50,7 @@ module NagiraActiveResource
|
|
50
50
|
#
|
51
51
|
# @param [String] value
|
52
52
|
#
|
53
|
-
# @param [Hash] args Extra
|
53
|
+
# @param [Hash] args Extra arguments like :host_name for nested
|
54
54
|
# objects (services) :params => !{'host_name' => 'viy'}
|
55
55
|
#
|
56
56
|
def self.find_all_by attribute, value, args={ }
|
@@ -9,7 +9,7 @@ Since Nagira API in ActiveResource mode is not actually ActiveResource
|
|
9
9
|
compliant, there is a need to have component on the Rails side to
|
10
10
|
provide additional functionality to make it look like ActiveResource.
|
11
11
|
|
12
|
-
This module provides additional methods
|
12
|
+
This module provides additional methods for using Nagira together with
|
13
13
|
Rails and ActiveResource models.
|
14
14
|
|
15
15
|
Usage
|
@@ -40,12 +40,33 @@ Rails::NAGIRA={
|
|
40
40
|
}
|
41
41
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
42
42
|
|
43
|
+
Search objects as:
|
44
|
+
|
45
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ruby
|
46
|
+
|
47
|
+
# Find host
|
48
|
+
@host = Host.find_by_host_name 'web01'
|
49
|
+
|
50
|
+
#
|
51
|
+
# All services in FAILURE state
|
52
|
+
#
|
53
|
+
@services = Service.find_all_by_current_state 2
|
54
|
+
|
55
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
56
|
+
|
43
57
|
Classes
|
44
58
|
===========
|
45
59
|
|
46
60
|
* {Host}
|
47
61
|
* {Service}
|
48
62
|
|
63
|
+
Methods
|
64
|
+
===========
|
65
|
+
|
66
|
+
NagiraActiveResource module provides dynamic methods find_by_* and
|
67
|
+
find_all_by_* similar to Rails find methods, limited however to only
|
68
|
+
one attribute in search.
|
69
|
+
|
49
70
|
=end
|
50
71
|
module NagiraActiveResource
|
51
72
|
end
|
metadata
CHANGED
@@ -1,20 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nagira_active_resource
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.4
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Dmytro Kovalov
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-
|
11
|
+
date: 2013-06-13 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: rails
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - ~>
|
20
18
|
- !ruby/object:Gem::Version
|
@@ -22,7 +20,6 @@ dependencies:
|
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - ~>
|
28
25
|
- !ruby/object:Gem::Version
|
@@ -30,7 +27,6 @@ dependencies:
|
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: nagira
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
31
|
- - ~>
|
36
32
|
- !ruby/object:Gem::Version
|
@@ -38,7 +34,6 @@ dependencies:
|
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
38
|
- - ~>
|
44
39
|
- !ruby/object:Gem::Version
|
@@ -46,20 +41,18 @@ dependencies:
|
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: sqlite3
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - '>='
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: '0'
|
54
48
|
type: :development
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- -
|
52
|
+
- - '>='
|
60
53
|
- !ruby/object:Gem::Version
|
61
54
|
version: '0'
|
62
|
-
description:
|
55
|
+
description: " Rails side to Nagira API. \nSince Nagira API in ActiveResource mode
|
63
56
|
is not actually ActiveResource\ncompliant, there is a need to have component on
|
64
57
|
the Rails side to\nprovide additional functionality to make it look like ActiveResource.\n\nThis
|
65
58
|
module provides additional methods use Nagira together with\nRails and ActiveResource
|
@@ -81,27 +74,26 @@ files:
|
|
81
74
|
- README.md
|
82
75
|
homepage: http://dmytro.github.com
|
83
76
|
licenses: []
|
77
|
+
metadata: {}
|
84
78
|
post_install_message:
|
85
79
|
rdoc_options: []
|
86
80
|
require_paths:
|
87
81
|
- lib
|
88
82
|
required_ruby_version: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
83
|
requirements:
|
91
|
-
- -
|
84
|
+
- - '>='
|
92
85
|
- !ruby/object:Gem::Version
|
93
86
|
version: '0'
|
94
87
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
95
|
-
none: false
|
96
88
|
requirements:
|
97
|
-
- -
|
89
|
+
- - '>='
|
98
90
|
- !ruby/object:Gem::Version
|
99
91
|
version: '0'
|
100
92
|
requirements: []
|
101
93
|
rubyforge_project:
|
102
|
-
rubygems_version:
|
94
|
+
rubygems_version: 2.0.3
|
103
95
|
signing_key:
|
104
|
-
specification_version:
|
96
|
+
specification_version: 4
|
105
97
|
summary: Rails side to Nagira API.
|
106
98
|
test_files: []
|
107
99
|
has_rdoc:
|