time_pieces 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/time_pieces/duration.rb +6 -1
- data/lib/time_pieces/version.rb +1 -1
- data/pkg/time_pieces-1.0.4.gem +0 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 703b165848387af83b733f2eff04abbc25febcf1
|
4
|
+
data.tar.gz: f796a9936fdae9a605b76545c7c03b5fdce9b09b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f5a44a4c3ab936b3de3eabfc247c1a36a54347a65b9dc41c6cebd8b31f06c1a9e5019e206a16588d11bc823d453fc95776fa4cbaf6b11b076eadf5c9cf24db4
|
7
|
+
data.tar.gz: 0f69c8461fe4f77418b27cc449b421f48b5846a4e3bbfd1a83d351d32e01798804f1e145ec2df4865f28bc8790d62dec5b8efe75bf9ff4fe5b636b666b04a0ec
|
data/Gemfile.lock
CHANGED
data/lib/time_pieces/duration.rb
CHANGED
@@ -28,7 +28,12 @@ module TimePieces
|
|
28
28
|
def right_duration_copy
|
29
29
|
duration_copy
|
30
30
|
end
|
31
|
-
|
31
|
+
def clip!(start_at_seconds, end_at_seconds)
|
32
|
+
self.start_at_seconds = start_at_seconds if self.start_at_seconds < start_at_seconds
|
33
|
+
if self.start_at_seconds + self.duration_seconds > end_at_seconds
|
34
|
+
self.duration_seconds = end_at_seconds - start_at_seconds
|
35
|
+
end
|
36
|
+
end
|
32
37
|
|
33
38
|
def overlaps_start?(other_td)
|
34
39
|
return true if (start_at_seconds >= other_td.start_at_seconds) && (start_at_seconds < other_td.end_at_seconds)
|
data/lib/time_pieces/version.rb
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: time_pieces
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Grant R.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04-
|
11
|
+
date: 2016-04-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -100,6 +100,7 @@ files:
|
|
100
100
|
- lib/time_pieces/version.rb
|
101
101
|
- pkg/time_pieces-1.0.2.gem
|
102
102
|
- pkg/time_pieces-1.0.3.gem
|
103
|
+
- pkg/time_pieces-1.0.4.gem
|
103
104
|
- time_pieces.gemspec
|
104
105
|
homepage: http://github.com/riggleg/time_pieces
|
105
106
|
licenses:
|