easy_save 0.2.0 → 0.3.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.
- checksums.yaml +4 -4
- data/{lib/easy_save/example.sql → example.sql} +0 -0
- data/lib/easy_save/db_connection.rb +3 -2
- data/lib/easy_save/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f86c6567772019207e0b8650c491d018a6f44774
|
4
|
+
data.tar.gz: 8f06b4b6afd654bbfac92d95a8a0d261fddb282a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9292ce9e1d5d99e876e6877897938e15e6def954249df21c5665516b656f9fafcb390b316bc4d04232fc23e064fcf98a729d9aee09ed769890d6d4463a472321
|
7
|
+
data.tar.gz: 76b2da6c75726a84b0df2e86f50bcb00d82df407188505e01b719a56d24de0f6433f86b70d5cf147f519569f65175b1c5666e87756b493a6a7dc19c652a2a908
|
File without changes
|
@@ -1,12 +1,14 @@
|
|
1
1
|
require 'sqlite3'
|
2
|
+
require 'byebug'
|
2
3
|
|
3
4
|
PRINT_QUERIES = ENV['PRINT_QUERIES'] == 'true'
|
4
5
|
# https://tomafro.net/2010/01/tip-relative-paths-with-file-expand-path
|
5
|
-
ROOT_FOLDER =
|
6
|
+
ROOT_FOLDER = Dir.pwd
|
6
7
|
USERS_SQL_FILE = File.join(ROOT_FOLDER, 'example.sql')
|
7
8
|
USERS_DB_FILE = File.join(ROOT_FOLDER, 'example.db')
|
8
9
|
|
9
10
|
class DBConnection
|
11
|
+
|
10
12
|
def self.open(db_file_name)
|
11
13
|
@db = SQLite3::Database.new(db_file_name)
|
12
14
|
@db.results_as_hash = true
|
@@ -27,7 +29,6 @@ class DBConnection
|
|
27
29
|
|
28
30
|
def self.instance
|
29
31
|
reset if @db.nil?
|
30
|
-
|
31
32
|
@db
|
32
33
|
end
|
33
34
|
|
data/lib/easy_save/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: easy_save
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Akshith Yellapragada
|
@@ -99,10 +99,10 @@ files:
|
|
99
99
|
- bin/setup
|
100
100
|
- easy_save.gemspec
|
101
101
|
- example.rb
|
102
|
+
- example.sql
|
102
103
|
- lib/easy_save.rb
|
103
104
|
- lib/easy_save/associatable.rb
|
104
105
|
- lib/easy_save/db_connection.rb
|
105
|
-
- lib/easy_save/example.sql
|
106
106
|
- lib/easy_save/searchable.rb
|
107
107
|
- lib/easy_save/sql_object.rb
|
108
108
|
- lib/easy_save/version.rb
|