trecs 0.3.1 → 0.3.2

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: 1567faa458d8727e15199ceadb97b6c08c73a05b
4
- data.tar.gz: 336b1cd252fb2b75efd20cd65ca4f11553581ead
3
+ metadata.gz: 6107266d394e28fb21dc987e8765e8c128f559bc
4
+ data.tar.gz: b8561a6a99466ef9132bdab0fad22cc49d2c7428
5
5
  SHA512:
6
- metadata.gz: 2303fc365f90d50cfdea548877847381338cd280dd4a5549e09731d0ec4ae27e4ea9fbf6b01aad0f74eae2f5417a8115e4dafdf18034edd5ae72ce4a3407d1cf
7
- data.tar.gz: afe215e565ddff5f58430548c973716b32482763652b88318bfc299f871e2ec5e67a814d2c65716ac00bbc0396dc37ac166dad61f2428f4272f42199e53a8b23
6
+ metadata.gz: a11db9103866bfe2765e283ae04127959824a8a518e915356326d6b199fc8caf1577c3558ee5ecde82c8c050f9edcfd9d563853e1e08bc376a35040f4b5cc349
7
+ data.tar.gz: 038b7d75f200bcf8a648272df9687a0ca8a180251cdbe131b844748a94f2ccdc758bb4147965426409a40db76e2881667e5d3c8fcfcf988a30a9394cd1c8830d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- trecs (0.3.1)
4
+ trecs (0.3.2)
5
5
  minitar (~> 0.5.4)
6
6
  trollop (~> 2.0)
7
7
 
data/lib/trecs/frame.rb CHANGED
@@ -29,16 +29,17 @@ module TRecs
29
29
  alias :to_str :to_s
30
30
 
31
31
  def ==(other)
32
- to_s == other.to_s
32
+ other = Frame(other)
33
+ to_s == other.to_s && format == other.format
33
34
  end
34
35
  end
35
36
 
36
- def Frame(opts)
37
- case opts
38
- when Frame then opts
39
- else
40
- Frame.new(opts)
41
- end
37
+ end
38
+
39
+ def Frame(opts)
40
+ case opts
41
+ when TRecs::Frame then opts
42
+ else
43
+ TRecs::Frame.new(opts)
42
44
  end
43
- module_function :Frame
44
45
  end
@@ -23,7 +23,7 @@ module TRecs
23
23
  json_string = source.read_entry("frames.json") || "{}"
24
24
  parsed_json = JSON.parse(json_string, symbolize_names: true)
25
25
  parsed_json.each do |time, value|
26
- frames[Integer(time.to_s)] = TRecs::Frame(value)
26
+ frames[Integer(time.to_s)] = Frame(value)
27
27
  end
28
28
  end
29
29
  frames
data/lib/trecs/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module TRecs
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
@@ -35,6 +35,7 @@ FRAME
35
35
  context "equality" do
36
36
  Then { Frame.new(content: "A") == Frame.new("A") }
37
37
  Then { Frame.new(content: "B") == "B" }
38
+ Then { Frame.new(content: "C", format: "raw") != Frame.new(content: "C", format: "html") }
38
39
  end
39
40
 
40
41
  context "height" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trecs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Federico Iachetti
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-04 00:00:00.000000000 Z
11
+ date: 2014-09-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: trollop