change_agent 0.2.2 → 0.2.3

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: fbc730c2e2b77b9c74f11271068be748693ed7cc
4
- data.tar.gz: 60235cb602da5ff45a4c81ea326360f1c034b7c5
3
+ metadata.gz: a8e28c65772b9b03e55688d9b8257bc8779e159b
4
+ data.tar.gz: 9b5825e5e3078f601f0e9c3b01dedbe292b38a33
5
5
  SHA512:
6
- metadata.gz: 513344a2125c811e5c7c41d43fab6eddfb8f57e5558bf7b2174bdbdd1792a8113ccdbad000a29e31e7312f64d49f59169bafbe300f340c8bab4fc5c04ffe09b9
7
- data.tar.gz: 4fe65ff532e478f88e084af7f482cb858104f885cf4e26336c8b8a7b3a14bf2458387bbc2efe4bf77200b3226890a6f4bfecc106e21c3d5f3f82e6facc18c2d6
6
+ metadata.gz: 55e78d6a4aa4eb7314be925824857f2de2c337656596566241ec76f72ddf32a431c49971566cd3166395ac2317234c68df6cf22717b56abf917c6dbe08fa06f3
7
+ data.tar.gz: 1c10801f1ff4cbc90660ee848121430d259bd8e53d947ecf50cd9353397589e0704dba0ec8259875272ccece1102edb8e5741bd307cfc82a30cbffd24d6e9a93
data/README.md CHANGED
@@ -16,7 +16,7 @@ Want to see it in action? Check out [this lightweight demo](https://github.com/b
16
16
 
17
17
  ## Okay, I'm sold. How do I use it?
18
18
 
19
- ChangeAgent writes values to the file system based on a given key, and immediately commits the file to Git, providing you with both a snapshot and a timestamp for every change.
19
+ ChangeAgent writes values directly to the Git database based on a given key (path), and immediately triggers a commit, providing you with both a snapshot and a timestamp for every change.
20
20
 
21
21
  ### Basic usage
22
22
 
@@ -59,7 +59,7 @@ module ChangeAgent
59
59
  def blob_contents
60
60
  tree = repo.head.target.tree
61
61
  blob = repo.lookup tree.path(path)[:oid]
62
- blob.content
62
+ blob.content.force_encoding("UTF-8")
63
63
  rescue Rugged::ReferenceError, Rugged::TreeError
64
64
  nil
65
65
  end
@@ -1,3 +1,3 @@
1
1
  module ChangeAgent
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
@@ -65,4 +65,9 @@ class TestChangeAgentClient < Minitest::Test
65
65
  @client.set "foo", "bar"
66
66
  assert_equal sha, @client.repo.last_commit.oid
67
67
  end
68
+
69
+ should "save UTF-8 encoded values" do
70
+ @client.set "foo", "§"
71
+ assert_equal "§", @client.get("foo")
72
+ end
68
73
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: change_agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Balter
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-29 00:00:00.000000000 Z
11
+ date: 2015-04-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rugged