arc 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. data/.gitignore +9 -0
  2. data/.rspec +1 -0
  3. data/Gemfile +21 -0
  4. data/Rakefile +35 -0
  5. data/arc.gemspec +20 -0
  6. data/lib/arc.rb +13 -0
  7. data/lib/arc/casting.rb +66 -0
  8. data/lib/arc/data_stores.rb +9 -0
  9. data/lib/arc/data_stores/abstract/arel_compatibility.rb +50 -0
  10. data/lib/arc/data_stores/abstract/object_definitions.rb +55 -0
  11. data/lib/arc/data_stores/abstract/store.rb +55 -0
  12. data/lib/arc/data_stores/mysql/object_definitions.rb +54 -0
  13. data/lib/arc/data_stores/mysql/store.rb +51 -0
  14. data/lib/arc/data_stores/postgres/object_definitions.rb +70 -0
  15. data/lib/arc/data_stores/postgres/store.rb +38 -0
  16. data/lib/arc/data_stores/sqlite/object_definitions.rb +51 -0
  17. data/lib/arc/data_stores/sqlite/store.rb +43 -0
  18. data/lib/arc/quoting.rb +91 -0
  19. data/lib/arc/reactor.rb +29 -0
  20. data/lib/arc/version.rb +3 -0
  21. data/spec/casting_spec.rb +74 -0
  22. data/spec/data_stores/abstract/arel_compatibility_spec.rb +63 -0
  23. data/spec/data_stores/abstract/object_definitions_spec.rb +75 -0
  24. data/spec/data_stores/abstract/store_spec.rb +59 -0
  25. data/spec/data_stores/integration/crud_spec.rb +79 -0
  26. data/spec/data_stores/integration/schema_spec.rb +47 -0
  27. data/spec/data_stores/mysql/store_spec.rb +11 -0
  28. data/spec/data_stores/postgres/store_spec.rb +11 -0
  29. data/spec/data_stores/sqlite/store_spec.rb +11 -0
  30. data/spec/data_stores_spec.rb +15 -0
  31. data/spec/quoting_spec.rb +97 -0
  32. data/spec/spec_helper.rb +81 -0
  33. data/spec/support/config.yml +16 -0
  34. data/spec/support/resources/rails.png +0 -0
  35. data/spec/support/schemas/drop_mysql.sql +1 -0
  36. data/spec/support/schemas/drop_postgres.sql +1 -0
  37. data/spec/support/schemas/drop_sqlite.sql +1 -0
  38. data/spec/support/schemas/mysql.sql +10 -0
  39. data/spec/support/schemas/postgres.sql +12 -0
  40. data/spec/support/schemas/sqlite.sql +12 -0
  41. metadata +105 -0
@@ -0,0 +1,16 @@
1
+ # Configurations for various database connections used in specs
2
+ #dummy config for use when a connection to an actual database is not necessary for the spec
3
+ sqlite:
4
+ database: 'tmp/sqlite.sqlite3'
5
+ adapter: sqlite
6
+
7
+ postgres:
8
+ database: arc_development
9
+ adapter: postgres
10
+ host: localhost
11
+ user: jacob
12
+
13
+ mysql:
14
+ database: arc_development
15
+ adapter: mysql
16
+ username: root
@@ -0,0 +1 @@
1
+ DROP TABLE superheros;
@@ -0,0 +1 @@
1
+ DROP TABLE superheros;
@@ -0,0 +1 @@
1
+ DROP TABLE superheros;
@@ -0,0 +1,10 @@
1
+ CREATE TABLE superheros (
2
+ id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT,
3
+ name VARCHAR(256) NOT NULL
4
+ );
5
+ INSERT INTO superheros(name)
6
+ VALUES('superman');
7
+ INSERT INTO superheros(name)
8
+ VALUES('spiderman');
9
+ INSERT INTO superheros(name)
10
+ VALUES('batman');
@@ -0,0 +1,12 @@
1
+ BEGIN TRANSACTION;
2
+ CREATE TABLE superheros (
3
+ id SERIAL PRIMARY KEY,
4
+ name VARCHAR(256) NOT NULL
5
+ );
6
+ INSERT INTO superheros(name)
7
+ VALUES('superman');
8
+ INSERT INTO superheros(name)
9
+ VALUES('spiderman');
10
+ INSERT INTO superheros(name)
11
+ VALUES('batman');
12
+ COMMIT;
@@ -0,0 +1,12 @@
1
+ BEGIN TRANSACTION;
2
+ CREATE TABLE superheros (
3
+ id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
4
+ name VARCHAR(256) NOT NULL
5
+ );
6
+ INSERT INTO superheros(name)
7
+ VALUES('superman');
8
+ INSERT INTO superheros(name)
9
+ VALUES('spiderman');
10
+ INSERT INTO superheros(name)
11
+ VALUES('batman');
12
+ COMMIT;
metadata ADDED
@@ -0,0 +1,105 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: arc
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Jacob Morris
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2011-12-21 00:00:00.000000000Z
13
+ dependencies: []
14
+ description: Compatible with mysql, sqlite, and postgres
15
+ email:
16
+ - jacob.s.morris@gmail.com
17
+ executables: []
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - .gitignore
22
+ - .rspec
23
+ - Gemfile
24
+ - Rakefile
25
+ - arc.gemspec
26
+ - lib/arc.rb
27
+ - lib/arc/casting.rb
28
+ - lib/arc/data_stores.rb
29
+ - lib/arc/data_stores/abstract/arel_compatibility.rb
30
+ - lib/arc/data_stores/abstract/object_definitions.rb
31
+ - lib/arc/data_stores/abstract/store.rb
32
+ - lib/arc/data_stores/mysql/object_definitions.rb
33
+ - lib/arc/data_stores/mysql/store.rb
34
+ - lib/arc/data_stores/postgres/object_definitions.rb
35
+ - lib/arc/data_stores/postgres/store.rb
36
+ - lib/arc/data_stores/sqlite/object_definitions.rb
37
+ - lib/arc/data_stores/sqlite/store.rb
38
+ - lib/arc/quoting.rb
39
+ - lib/arc/reactor.rb
40
+ - lib/arc/version.rb
41
+ - spec/casting_spec.rb
42
+ - spec/data_stores/abstract/arel_compatibility_spec.rb
43
+ - spec/data_stores/abstract/object_definitions_spec.rb
44
+ - spec/data_stores/abstract/store_spec.rb
45
+ - spec/data_stores/integration/crud_spec.rb
46
+ - spec/data_stores/integration/schema_spec.rb
47
+ - spec/data_stores/mysql/store_spec.rb
48
+ - spec/data_stores/postgres/store_spec.rb
49
+ - spec/data_stores/sqlite/store_spec.rb
50
+ - spec/data_stores_spec.rb
51
+ - spec/quoting_spec.rb
52
+ - spec/spec_helper.rb
53
+ - spec/support/config.yml
54
+ - spec/support/resources/rails.png
55
+ - spec/support/schemas/drop_mysql.sql
56
+ - spec/support/schemas/drop_postgres.sql
57
+ - spec/support/schemas/drop_sqlite.sql
58
+ - spec/support/schemas/mysql.sql
59
+ - spec/support/schemas/postgres.sql
60
+ - spec/support/schemas/sqlite.sql
61
+ homepage: ''
62
+ licenses: []
63
+ post_install_message:
64
+ rdoc_options: []
65
+ require_paths:
66
+ - lib
67
+ required_ruby_version: !ruby/object:Gem::Requirement
68
+ none: false
69
+ requirements:
70
+ - - ! '>='
71
+ - !ruby/object:Gem::Version
72
+ version: '0'
73
+ required_rubygems_version: !ruby/object:Gem::Requirement
74
+ none: false
75
+ requirements:
76
+ - - ! '>='
77
+ - !ruby/object:Gem::Version
78
+ version: '0'
79
+ requirements: []
80
+ rubyforge_project: arc
81
+ rubygems_version: 1.8.10
82
+ signing_key:
83
+ specification_version: 3
84
+ summary: A lightweight driver for multiple sql backends
85
+ test_files:
86
+ - spec/casting_spec.rb
87
+ - spec/data_stores/abstract/arel_compatibility_spec.rb
88
+ - spec/data_stores/abstract/object_definitions_spec.rb
89
+ - spec/data_stores/abstract/store_spec.rb
90
+ - spec/data_stores/integration/crud_spec.rb
91
+ - spec/data_stores/integration/schema_spec.rb
92
+ - spec/data_stores/mysql/store_spec.rb
93
+ - spec/data_stores/postgres/store_spec.rb
94
+ - spec/data_stores/sqlite/store_spec.rb
95
+ - spec/data_stores_spec.rb
96
+ - spec/quoting_spec.rb
97
+ - spec/spec_helper.rb
98
+ - spec/support/config.yml
99
+ - spec/support/resources/rails.png
100
+ - spec/support/schemas/drop_mysql.sql
101
+ - spec/support/schemas/drop_postgres.sql
102
+ - spec/support/schemas/drop_sqlite.sql
103
+ - spec/support/schemas/mysql.sql
104
+ - spec/support/schemas/postgres.sql
105
+ - spec/support/schemas/sqlite.sql