chawk 0.1.14 → 0.1.15

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: 07b68b72e9e6307500b9c964ccbf25761159cb01
4
- data.tar.gz: 02061cf62e12d325848cc585a3ce674f4578355e
3
+ metadata.gz: 9e45b7bfdb83f83bc57e9fd40b1ca45d1e7f8093
4
+ data.tar.gz: 58a5800c07914a2ba330d8fc487a4e9dd0976c48
5
5
  SHA512:
6
- metadata.gz: 983b276e02e0fe72ad6ff06b16416dfcf5a9d2d5f6dbba8434718b9c980e660e53cac8b5135a8cd5e3111c954969e8dd07510f00bd338e9f0fb152c2cc5ac466
7
- data.tar.gz: 9658138baf8ac3f6c21c51512d19b22ff2519ef57fd55eb5b05f7bf2a1c1fe48ae60410425615d6fb20a504d8b51f773cc46caff365885c21a4ccd2891234f54
6
+ metadata.gz: f8db6cfd8327facfe80afab263fb7826cfbf97b537975aa5715ff750c3bf01845034ec78339c8fb27d0ae165252c139ca2b7cf35924d3abb09191ff39ff265d8
7
+ data.tar.gz: 1598c3c209cd5590fb187aaa3ae5bea1a224d2b5754c51cb914d96f0489933b17e71c5c397c3120c308a5337227e5b67b8964e771e6e19465d2d11842e3be25d
data/CHANGES ADDED
File without changes
@@ -1,4 +1,4 @@
1
1
  module Chawk
2
2
  # The current version of Chawk
3
- VERSION = "0.1.14"
3
+ VERSION = "0.1.15"
4
4
  end
@@ -62,7 +62,7 @@ module Chawk
62
62
  # @param args [Object, Array of Objects]
63
63
  # @param options [Hash] You can also pass in :meta and :timestamp
64
64
  # Add an item or an array of items (one at a time) to the datastore.
65
- def <<(args,options={})
65
+ def append(args,options={})
66
66
  options[:observed_at] ? dt = options[:observed_at] : dt = Time.now
67
67
  if args.is_a?(Array)
68
68
  args.each do |arg|
@@ -74,6 +74,19 @@ module Chawk
74
74
  self.last
75
75
  end
76
76
 
77
+ def <<(args)
78
+ append(args)
79
+ #options[:observed_at] ? dt = options[:observed_at] : dt = Time.now
80
+ #if args.is_a?(Array)
81
+ # args.each do |arg|
82
+ # insert_recognizer(arg, dt, options)
83
+ # end
84
+ #else
85
+ # insert_recognizer(args, dt, options)
86
+ #end
87
+ #self.last
88
+ end
89
+
77
90
  # @param count [Integer] returns an array with the last [0..count] items in the datastore. If set to 1 or left empty, this returns a single item.
78
91
  # Either the last item added to the datastore or an array of the last n items added to the datastore.
79
92
  def last(count=1)
@@ -124,6 +124,13 @@ describe Chawk::Paddr do
124
124
  @addr.points.last.value.must_equal(100)
125
125
  end
126
126
 
127
+ it "stores meta information" do
128
+ @addr.points.append(10,{:meta=>"Some meta_information"})
129
+ @addr.points.last.value.must_equal(10)
130
+ @addr.points.last.meta.must_equal("Some meta_information")
131
+ end
132
+
133
+
127
134
  it "returns ordinal last" do
128
135
  @addr.points << [10,9,8,7,6,5,4,3,2,1,0]
129
136
  @addr.points.last(5).length.must_equal(5)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chawk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.14
4
+ version: 0.1.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Russell
@@ -132,6 +132,7 @@ extra_rdoc_files: []
132
132
  files:
133
133
  - ".gitignore"
134
134
  - ".travis.yml"
135
+ - CHANGES
135
136
  - Gemfile
136
137
  - LICENSE.txt
137
138
  - README.md