time_pieces 1.0.4 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ecb493c0cd2590abf40b2b7e98daaab1eb2510d5
4
- data.tar.gz: b76a1db6d6e7e3d2a3d1954787e3ed9d59c45827
3
+ metadata.gz: 703b165848387af83b733f2eff04abbc25febcf1
4
+ data.tar.gz: f796a9936fdae9a605b76545c7c03b5fdce9b09b
5
5
  SHA512:
6
- metadata.gz: 4ca9c9c3276a3770a858817ede3b71677f1085f7d132d4f1516ce940ba7b42495a8f64886813134c46780444071367ac80aa96771bc8afe1ee049a0e8a37e2d3
7
- data.tar.gz: 1cf8fe07e291d98cdaebb4857405f96678ed05bae640adfded8cfff01ac5c1cef8b9cd7cc5c268e87c969ca6e999b74aaccc13431dac438ec2b55629d0b81182
6
+ metadata.gz: 7f5a44a4c3ab936b3de3eabfc247c1a36a54347a65b9dc41c6cebd8b31f06c1a9e5019e206a16588d11bc823d453fc95776fa4cbaf6b11b076eadf5c9cf24db4
7
+ data.tar.gz: 0f69c8461fe4f77418b27cc449b421f48b5846a4e3bbfd1a83d351d32e01798804f1e145ec2df4865f28bc8790d62dec5b8efe75bf9ff4fe5b636b666b04a0ec
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- time_pieces (1.0.4)
4
+ time_pieces (1.0.5)
5
5
  bundler
6
6
 
7
7
  GEM
@@ -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)
@@ -1,3 +1,3 @@
1
1
  module TimePieces
2
- VERSION = "1.0.4"
2
+ VERSION = "1.0.5"
3
3
  end
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
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-01 00:00:00.000000000 Z
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: