corto 0.80.2 → 0.90.0
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.
- data/VERSION +1 -1
- data/db/corto.db +0 -0
- data/lib/corto.rb +3 -3
- data/spec/corto_spec.rb +1 -1
- metadata +5 -5
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.
|
|
1
|
+
0.90.0
|
data/db/corto.db
CHANGED
|
Binary file
|
data/lib/corto.rb
CHANGED
|
@@ -6,9 +6,9 @@ class Corto
|
|
|
6
6
|
attr_accessor :db_name
|
|
7
7
|
attr_reader :db
|
|
8
8
|
|
|
9
|
-
def initialize (
|
|
10
|
-
@db_name= db_name
|
|
11
|
-
@db_name= './db/corto.db' unless db_name
|
|
9
|
+
def initialize (options={})
|
|
10
|
+
@db_name= options["db_name"]
|
|
11
|
+
@db_name= './db/corto.db' unless options.has_key? "db_name"
|
|
12
12
|
init_db
|
|
13
13
|
end
|
|
14
14
|
|
data/spec/corto_spec.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
|
2
2
|
|
|
3
3
|
describe "Corto" do
|
|
4
|
-
let(:corto) {Corto.new('spec/data/test_db.db')}
|
|
4
|
+
let(:corto) {Corto.new({"db_name"=>'spec/data/test_db.db'})}
|
|
5
5
|
it "should recreate a shortned url db" do
|
|
6
6
|
corto.purge
|
|
7
7
|
corto.count.should == 0
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: corto
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 375
|
|
5
5
|
prerelease: false
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
version: 0.
|
|
8
|
+
- 90
|
|
9
|
+
- 0
|
|
10
|
+
version: 0.90.0
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Paolo Perego
|
|
@@ -15,7 +15,7 @@ autorequire:
|
|
|
15
15
|
bindir: bin
|
|
16
16
|
cert_chain: []
|
|
17
17
|
|
|
18
|
-
date: 2011-
|
|
18
|
+
date: 2011-03-01 00:00:00 +01:00
|
|
19
19
|
default_executable: corto
|
|
20
20
|
dependencies:
|
|
21
21
|
- !ruby/object:Gem::Dependency
|