rollex 1.0.0.pre.rc.3 → 1.0.0.pre.rc.4

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: 33637c95180b914ae5241f2995cc617d3b22a180
4
- data.tar.gz: d4223bc0f521d7112991422122d712866fe4d841
3
+ metadata.gz: 7c9c5c3ed40a255aa2904eeb984bbd3064b7c28d
4
+ data.tar.gz: 588780ee7033644ca10d3d026236b73286d83fbc
5
5
  SHA512:
6
- metadata.gz: '099d2622a38c712289b42690e2a5eaafe7412724c307e59a81091f03346ebc355b5a45703ef4ac87cd29ddb6f3880aee9f3d8518c0540503937ff0f9628f654e'
7
- data.tar.gz: 3a017b20f6224a319ea4a51aed75684692177320215e1a842fda3555dbcee576c100e2851e00e7690263de2edf4cc2ca51ca5de12a235b9276809b9b68ce5969
6
+ metadata.gz: b37c58d54b3b22fe5d07a0e8e3777032344492c19e75a7b234e0dc867cc058d6732d947741b6cba4b74919850e2afa2d5422f165cd0ef4cda802687fbfc30715
7
+ data.tar.gz: 7da4580a3e199357124bf2487b2018adff8e1aaaf32f608d7231dfb0d684cf7b9fc80e19091f9f1a4c5e22134d897fe59b3e63fc9f3bac3c78f1e67dcac43008
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  module Rollex
3
3
  module Rails
4
- VERSION = "1.0.0-rc.3"
4
+ VERSION = "1.0.0-rc.4"
5
5
  end
6
6
  end
@@ -1093,13 +1093,9 @@ var CounterBuilder = function () {
1093
1093
  if (props.seconds !== undefined) {
1094
1094
  if (props.to !== undefined || props.from !== undefined) {
1095
1095
  throw new Error('cannot use "to" and "from" with "seconds"');
1096
- } else if (props.seconds < 0) {
1097
- throw new Error('"seconds" must be greater than or equal to zero');
1098
1096
  }
1099
1097
  } else if (props.to === undefined) {
1100
1098
  throw new Error('provide either "seconds" or "to"');
1101
- } else if (props.to < props.from) {
1102
- throw new Error('"to" must be bigger than "from"');
1103
1099
  }
1104
1100
  if (props.digits !== undefined && props.digits < 0) {
1105
1101
  throw new Error('"digits" must not be negative');
@@ -1165,7 +1161,10 @@ var CounterBuilder = function () {
1165
1161
  value: function buildTimeProps() {
1166
1162
  var startTime = new Date().getTime();
1167
1163
  var from = this.props.from === undefined ? startTime : this.props.from;
1164
+
1168
1165
  var timeDiff = this.props.seconds === undefined ? this.props.to - from : this.props.seconds * 1000;
1166
+ if (timeDiff < 0) timeDiff = 0;
1167
+
1169
1168
  this.state = _extends({}, this.state, {
1170
1169
  startTime: startTime,
1171
1170
  from: from,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rollex
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.pre.rc.3
4
+ version: 1.0.0.pre.rc.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Komarov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-21 00:00:00.000000000 Z
11
+ date: 2017-03-29 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: