README.md in ridley-0.0.6 vs README.md in ridley-0.1.0
- old
+ new
@@ -272,10 +272,17 @@
conn = Ridley.connection(...)
conn.search(:node)
conn.search(:node, "name:ridley-test.local")
+Search will return an array of Ridley resource objects if one of the default indices is specified. Chef's default indices are
+
+* node
+* role
+* client
+* environment
+
## Manipulating Attributes
Using Ridley you can quickly manipulate node or environment attributes. Attributes are identified by a dotted path notation.
default[:my_app][:billing][:enabled] => "my_app.billing.enabled"
@@ -298,10 +305,11 @@
conn = Ridley.connection
conn.sync do
obj = node.find("jwinsor-1")
obj.set_override_attribute("my_app.proxy.enabled", false)
obj.set_normal_attribute("my_app.webapp.enabled", false)
+ obj.save
end
### Environment Attributes
Setting a default environment attribute is just like setting a node level default attribute
@@ -316,9 +324,24 @@
And the same goes for setting an environment level override attribute
conn = Ridley.connection
conn.sync do
obj = environment.find("production")
+ obj.set_override_attribute("my_app.webapp.enabled", false)
+ obj.save
+ end
+
+### Role Attributes
+
+ conn = Ridley.connection
+ conn.sync do
+ obj = role.find("why_god_why")
+ obj.set_default_attribute("my_app.proxy.enabled", false)
+ obj.save
+ end
+
+ conn.sync do
+ obj = role.find("why_god_why")
obj.set_override_attribute("my_app.webapp.enabled", false)
obj.save
end
# Authors and Contributors