iodine 0.4.18 → 0.4.19

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of iodine might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 985f5c140335dc38ff849e93d96d906a322a22699695908e998c07c8ee023053
4
- data.tar.gz: a5b55c180aeb05a109c5f150e013b2832fd25f95f29b729488fb150f41aaa8f2
3
+ metadata.gz: 2b93946ad1ced55f2345f08bb90b3147ba0f8c1262391e34121cfc94b1b43d43
4
+ data.tar.gz: a724632ed98f2aa7998465fba68b4d6115fccdae29c1442b8fcfcecccc0fcbd0
5
5
  SHA512:
6
- metadata.gz: 97061042f83574de4992bacb013083e2eb8172fa79ae9ffea146907e53dfd5240f2fa3e91a213e6d87f90601d017fc4f8d2cf0c07726eb8b35b26f7bf82a8615
7
- data.tar.gz: d9ea0fc7a78a0a4d8d59e391f85a4d228ba0878030a1e97333dee70d7b02a84400f8fc40afbf0a486a71d4fceb1f906cb9a5ed8a4e8da961a3c78c50348654c2
6
+ metadata.gz: 2455dd897c6628120810579c75c6c7c8f235a150ae0c500a60fabf99d99eda81083c39845790723a229c8ab6a4602e7ad16521122c6e4d68b026d6d36d716001
7
+ data.tar.gz: d2fa620f1b1510900c17048c4fd11276d04c218e0ab78775ac067afa041c65a0eac22ec30bbe218c4669d099c16058cf886d92ed2a08e02836a5195fad43139c
@@ -8,6 +8,10 @@ Please notice that this change log contains changes for upcoming releases as wel
8
8
 
9
9
  ---
10
10
 
11
+ #### Change log v.0.4.19
12
+
13
+ **Feature**: (`iodine`) added requested feature in issue #27, `Iodine.running?` will return Iodine's state.
14
+
11
15
  #### Change log v.0.4.18
12
16
 
13
17
  **Fix**: (`iodine pub/bus`) fixed issue #27 (?) where the `block` used for subscriptions would be recycled by the GC and the memory address (retained by `iodine`) would point at invalid Ruby objects (at worst) or become invalid (at best). Credit to Dmitry Davydov (@haukot) for exposing this issue.
@@ -1103,6 +1103,12 @@ void facil_run(struct facil_run_args args) {
1103
1103
  if (FACIL_PRINT_STATE)
1104
1104
  fprintf(stderr, "\n --- Completed Shutdown ---\n");
1105
1105
  }
1106
+
1107
+ /**
1108
+ * returns true (1) if the facil.io engine is already running.
1109
+ */
1110
+ int facil_is_running(void) { return (facil_data && defer_fork_is_active()); }
1111
+
1106
1112
  /* *****************************************************************************
1107
1113
  Setting the protocol
1108
1114
  ***************************************************************************** */
@@ -285,6 +285,11 @@ struct facil_run_args {
285
285
  void facil_run(struct facil_run_args args);
286
286
  #define facil_run(...) facil_run((struct facil_run_args){__VA_ARGS__})
287
287
 
288
+ /**
289
+ * returns true (1) if the facil.io engine is already running.
290
+ */
291
+ int facil_is_running(void);
292
+
288
293
  /**
289
294
  * Attaches (or updates) a protocol object to a socket UUID.
290
295
  *
@@ -317,6 +317,11 @@ static VALUE iodine_start(VALUE self) {
317
317
  return self;
318
318
  }
319
319
 
320
+ static VALUE iodine_is_running(VALUE self) {
321
+ return (facil_is_running() ? Qtrue : Qfalse);
322
+ (void)self;
323
+ }
324
+
320
325
  /* *****************************************************************************
321
326
  Debug
322
327
  ***************************************************************************** */
@@ -374,6 +379,7 @@ void Init_iodine(void) {
374
379
 
375
380
  // the Iodine singleton functions
376
381
  rb_define_module_function(Iodine, "start", iodine_start, 0);
382
+ rb_define_module_function(Iodine, "running?", iodine_is_running, 0);
377
383
  rb_define_singleton_method(Iodine, "count", iodine_count, 0);
378
384
  rb_define_module_function(Iodine, "run", iodine_run, 0);
379
385
  rb_define_module_function(Iodine, "run_after", iodine_run_after, 1);
@@ -1,3 +1,3 @@
1
1
  module Iodine
2
- VERSION = '0.4.18'.freeze
2
+ VERSION = '0.4.19'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iodine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.18
4
+ version: 0.4.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Boaz Segev
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-03-13 00:00:00.000000000 Z
11
+ date: 2018-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack