okcomputer 1.9.1 → 1.10.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a8248b8e1e8bc9bf97e4353616d706511cd3a30e
4
- data.tar.gz: aad84c86640e989a6f36027dc3940e99bc0e8181
3
+ metadata.gz: cffefefce81a4dfb7e940984b9da870a89bb2b03
4
+ data.tar.gz: 2e8a2e50d9f589decc65db5e2bc695f1ec10a71b
5
5
  SHA512:
6
- metadata.gz: c239e4dafedb3aa07c08d6dfe6c1ad17bd50c4eb8a3086c6a10cc733cd40bca9566d737421e971fd0a721711a65ffe8faa7165610ff98b86de1380872ac47394
7
- data.tar.gz: acda74509a883a46ef6d577d1584b47dd3f429d6ac956ebdd921a574bf7f821e9625bc7c7f0c980d2098fa12a37a689f0501c87d035fffb4e7308f171e234edc
6
+ metadata.gz: 0e9acf93048fadf4a129af1fc4606b9bca79de89d99f0d284fe88e0d86b7fff3822d396dc915b1c9062bb5fd7ccba89777e816bbc1a56374f17edc646d4092ac
7
+ data.tar.gz: 2758851b5e9f7ca6045de6059d91dc943f5571636ab10c52fb68c3eb572d5b5075b6cebf76e0eb8ac327ce60ec854e7b7a855054b4eedb79830f547dd863b308
data/README.markdown CHANGED
@@ -126,6 +126,15 @@ end
126
126
  OkComputer::Registry.register "check_for_odds", MyCustomCheck.new
127
127
  ```
128
128
 
129
+ ### Customizing plain-text output
130
+
131
+ The plain-text output flows through Rails' internationalization framework.
132
+ Adjust the output as necessary by defining `okcomputer.check.passed` and
133
+ `okcomputer.check.failed` keys in your setup. The default values are available
134
+ [in `okcomputer.en.yml`][i18n].
135
+
136
+ [i18n]:https://github.com/sportngin/okcomputer/blob/eb0be05cc1527e083edd63cfbb0a071f7892c822/config/locales/okcomputer.en.yml#L1-L5
137
+
129
138
  ## Running checks in parallel
130
139
 
131
140
  By default, OkComputer runs checks in sequence. If you'd like to run them in parallel, you can configure it with:
@@ -0,0 +1,5 @@
1
+ en:
2
+ okcomputer:
3
+ check:
4
+ passed: "%{registrant_name}: PASSED %{message}"
5
+ failed: "%{registrant_name}: FAILED %{message}"
@@ -26,8 +26,8 @@ module OkComputer
26
26
  #
27
27
  # Returns a String
28
28
  def to_text
29
- passfail = success? ? "PASSED" : "FAILED"
30
- "#{registrant_name}: #{passfail} #{message}"
29
+ passfail = success? ? "passed" : "failed"
30
+ I18n.t("okcomputer.check.#{passfail}", registrant_name: registrant_name, message: message)
31
31
  end
32
32
 
33
33
  # Public: The JSON output of performing the check
@@ -1,3 +1,3 @@
1
1
  module OkComputer
2
- VERSION = '1.9.1'
2
+ VERSION = '1.10.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: okcomputer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.1
4
+ version: 1.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrick Byrne
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-08-18 00:00:00.000000000 Z
13
+ date: 2016-08-19 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: sqlite3
@@ -70,6 +70,7 @@ files:
70
70
  - README.markdown
71
71
  - Rakefile
72
72
  - app/controllers/ok_computer/ok_computer_controller.rb
73
+ - config/locales/okcomputer.en.yml
73
74
  - config/routes.rb
74
75
  - lib/ok_computer/built_in_checks/active_record_check.rb
75
76
  - lib/ok_computer/built_in_checks/app_version_check.rb