Dahistory 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -20,9 +20,7 @@ Useage
20
20
 
21
21
  require "Dahistory"
22
22
 
23
- path = "some/file.txt"
24
-
25
- Dahistory path
23
+ Dahistory "some/file.txt"
26
24
 
27
25
  # Checks your directory (default "./history").
28
26
  # If not found there, saves copy of file in ./pending dir and
@@ -43,3 +41,6 @@ Override the default settings:
43
41
 
44
42
  }
45
43
 
44
+ **Note:** Both **def Dahistory** and **class Dahistory** are defined.
45
+ All the code is in one file and less than 150 lines: [lib/Dahistory.rb](https://github.com/da99/Dahistory/blob/master/lib/Dahistory.rb)
46
+
@@ -1,3 +1,3 @@
1
1
  class Dahistory
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
data/lib/Dahistory.rb CHANGED
@@ -7,6 +7,7 @@ def Dahistory file = nil
7
7
  }
8
8
 
9
9
  da.save
10
+ da
10
11
  end # === def
11
12
 
12
13
  class Dahistory
@@ -1,4 +1,19 @@
1
1
 
2
+ describe "Dahistory" do
3
+
4
+ it "returns a Dahistory object" do
5
+ file = "files/#{rand 1000}.txt"
6
+ target = rand(10000).to_s
7
+ chdir {
8
+ File.write file, target
9
+ File.write file.sub("files", "history"), target
10
+ o = Dahistory(file)
11
+ o.class.should.be == Object.const_get(:Dahistory)
12
+ }
13
+ end
14
+
15
+ end # === Dahistory
16
+
2
17
  describe "Dahistory: new pending file" do
3
18
 
4
19
  before { reset_dirs }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: Dahistory
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: