README.md in service_skeleton-0.0.0.49.g47046b9 vs README.md in service_skeleton-1.0.1
- old
+ new
@@ -242,11 +242,11 @@
variables:
class GenericHelloService
include ServiceSkeleton
- string :RECIPIENT, matches: /\A\w+\z/
+ string :RECIPIENT, match: /\A\w+\z/
def run
loop do
puts "Hello, #{config.recipient}!"
sleep 1
@@ -266,11 +266,11 @@
default for a config variable, like so:
class GenericHelloService
include ServiceSkeleton
- string :RECIPIENT, matches: /\a\w+\z/, default: "Anonymous Coward"
+ string :RECIPIENT, match: /\a\w+\z/, default: "Anonymous Coward"
# ...
*This* version will print "Hello, Anonymous Coward!" if no `RECIPIENT`
environment variable is available.
@@ -297,11 +297,11 @@
extending the above example a little more, you could do something like this:
class GenericHelloService
include ServiceSkeleton
- string :GENERIC_HELLO_SERVICE_RECIPIENT, matches: /\A\w+\z/
+ string :GENERIC_HELLO_SERVICE_RECIPIENT, match: /\A\w+\z/
def run
loop do
puts "Hello, #{config.recipient}!"
sleep 1
@@ -532,11 +532,11 @@
such a metric like this:
class GenericHelloService
include ServiceSkeleton
- string :GENERIC_HELLO_SERVICE_RECIPIENT, matches: /\A\w+\z/
+ string :GENERIC_HELLO_SERVICE_RECIPIENT, match: /\A\w+\z/
counter :greetings_total, docstring: "How many greetings we have sent", labels: %i{recipient}
# ...
@@ -545,11 +545,11 @@
to increment our greeting counter, you simply do:
class GenericHelloService
include ServiceSkeleton
- string :GENERIC_HELLO_SERVICE_RECIPIENT, matches: /\A\w+\z/
+ string :GENERIC_HELLO_SERVICE_RECIPIENT, match: /\A\w+\z/
counter :greetings_total, docstring: "How many greetings we have sent", labels: %i{recipient}
def run
loop do
@@ -566,10 +566,10 @@
before defining the metric accessor method, which keeps typing to a minimum:
class GenericHelloService
include ServiceSkeleton
- string :GENERIC_HELLO_SERVICE_RECIPIENT, matches: /\A\w+\z/
+ string :GENERIC_HELLO_SERVICE_RECIPIENT, match: /\A\w+\z/
counter :generic_hello_service_greetings_total, docstring: "How many greetings we have sent", labels: %i{recipient}
def run
loop do