store-active_record 0.0.1 → 0.0.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: 0130c9a748dcea63ea6c1bb1acc5f2a97b03a911
4
- data.tar.gz: df19da24294e0eda97550232c71359abb660cc2b
3
+ metadata.gz: ced45712e34f5adc309c520e1eba87e0e81f8163
4
+ data.tar.gz: 6f53ae15b28c2185ecb97b06d5d61567da1131ba
5
5
  SHA512:
6
- metadata.gz: 477e0c05c59fffe892be280a7cf679cc083b99c671a133b2bcf6919fbb40d2709fb0a66bdb3e127cab100356268f8cf0d89e6b5c851861befafa35ac0768cc3d
7
- data.tar.gz: 610525c58ff8df0ceb8e99b64572775c5ca05ca6e8ebbef178773a3967b014f91ead97e6b2f24519e09cd819dd139b655cb6b119bf1fd5b7d3a5c9a949377eec
6
+ metadata.gz: 0f955103252120301a4f78679be3d5139028c9eb13814360c06069cf9dc0bac5b3a4806f958d6fe24bc64d958d5109f6903753570fcad0a115798797f9b98b32
7
+ data.tar.gz: 6c03f111256cc5a7a6bb72b89c097424fe259ac487ee7f00810adf48d5bf930ac4384abdd9d66fb80ae14956bbf39aa94e7914ef288e5935fe0b44e4e4ee2853
File without changes
data/README.md CHANGED
@@ -44,6 +44,10 @@ spec = {
44
44
  DataMapper::User::ActiveRecord.new(table, spec)
45
45
  ```
46
46
 
47
+ ## Tests
48
+
49
+ Run against shared specs implemented in [store-spec](https://github.com/janowiesniak/store-spec).
50
+
47
51
  ## Contributing
48
52
 
49
53
  1. Fork it
@@ -1,12 +1,12 @@
1
1
  development:
2
- adapter: sqlite
2
+ adapter: sqlite3
3
3
  encoding: utf8
4
4
  collation: utf8_general_ci
5
5
  reconnect: false
6
6
  database: store_active_record
7
7
 
8
8
  test:
9
- adapter: sqlite
9
+ adapter: sqlite3
10
10
  encoding: utf8
11
11
  collation: utf8_general_ci
12
12
  reconnect: false
@@ -1,5 +1,5 @@
1
1
  class Store
2
2
  class ActiveRecord
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
@@ -14,7 +14,7 @@ class Store
14
14
  end
15
15
 
16
16
  def insert(data)
17
- entity = @cls.create(data)
17
+ entity = cls.create(data)
18
18
  entity.id.to_s
19
19
  end
20
20
 
@@ -35,7 +35,7 @@ class Store
35
35
  end
36
36
 
37
37
  def bulk_find(ids)
38
- entities = @cls.where(:id => ids).to_a
38
+ entities = cls.where(:id => ids).to_a
39
39
  ordered_entities = ids.map do |id|
40
40
  entities.detect {|entity| entity.id == id.to_i }
41
41
  end
@@ -43,7 +43,7 @@ class Store
43
43
  end
44
44
 
45
45
  def count
46
- @cls.count
46
+ cls.count
47
47
  end
48
48
 
49
49
  private
@@ -62,6 +62,10 @@ class Store
62
62
  end
63
63
  end
64
64
 
65
+ def cls
66
+ @cls
67
+ end
68
+
65
69
  def establish_connection
66
70
  base.establish_connection(@spec)
67
71
  end
@@ -71,7 +75,7 @@ class Store
71
75
  end
72
76
 
73
77
  def find_by_id(id)
74
- @cls.find_by_id(id)
78
+ cls.find_by_id(id)
75
79
  end
76
80
 
77
81
  end
@@ -17,7 +17,7 @@ def create_test_table(table, spec)
17
17
  end
18
18
 
19
19
  describe Store::DataMapper::ActiveRecord do
20
- spec = YAML.load_file("#{File.dirname(__FILE__)}/../config/database.yml")['test']
20
+ spec = YAML.load_file("#{File.dirname(__FILE__)}/../config/database.yml.sample")['test']
21
21
  table = 'Bar'
22
22
 
23
23
  create_test_table(table, spec)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: store-active_record
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Owiesniak
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-04 00:00:00.000000000 Z
11
+ date: 2013-08-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -117,7 +117,7 @@ extra_rdoc_files: []
117
117
  files:
118
118
  - .gitignore
119
119
  - .rvmrc
120
- - .travis.yaml
120
+ - .travis.yml
121
121
  - Gemfile
122
122
  - LICENSE.txt
123
123
  - README.md