easy_save 0.4.0 → 0.5.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 43de1c6f3d6cdd41f228e922141992b5375cf85d
4
- data.tar.gz: 929b8badc55e6cbcc883a8c1e8a5d45cde780249
3
+ metadata.gz: 7c833f0b9ad3e6ef750ea9cb8c2eb48e5843b8e0
4
+ data.tar.gz: 3bb6effadf80a1a970371e09f7bfa901bea51a06
5
5
  SHA512:
6
- metadata.gz: df6cfb4df7c7b646c67fe1dbf5b7f08028259b348744f1841ecbaa7b96148badb9c74ee193efe98b2746e4122c06b1fdb23af7074a178ff58d2b2fcf385bf02b
7
- data.tar.gz: c20cdbf9f16cad339e982af03d562c3c68107cf7b736889c1f43374dd24381828e8292133a775db00e21ba0d772cdd07438a8ee8da8e30f3c683173203e9d5ec
6
+ metadata.gz: ebd0658dc494075002be255067688dc69eab6781f0b6be3fbd46d6790f7a15d804afb3bbe71ee35078461d8b1a820ad605196a28c2cbee46a5ef78dc5ff74604
7
+ data.tar.gz: 4013ca7e5734868f3c619cb5e0f2ca8d0714316b7926bcea6ce1cebffaf9acfee5cee267ce9c03dcbae835d2ad702dd03925ce5ee7c391b933ad491b6bf73a0e
data/README.md CHANGED
@@ -23,16 +23,9 @@ Or install it yourself as:
23
23
 
24
24
  ### Setting up for your own usage:
25
25
 
26
- Place your sql file in the root of the project directory, and in
27
- `lib/easy_save/db_connection.rb` change `'example.sql'` to your sql file's
28
- name.
26
+ Place your sql file in the root of the project directory, and name it
27
+ `schema.sql`.
29
28
 
30
- ```ruby
31
- #lib/easy_save/db_connection.rb
32
- USERS_SQL_FILE = File.join(ROOT_FOLDER, 'example.sql')
33
- USERS_DB_FILE = File.join(ROOT_FOLDER, 'example.db')
34
-
35
- ```
36
29
 
37
30
  Once that's done, in each model that is involved in the database, require
38
31
  'easy_gem', subclass it from SQLObject and `finalize!` it to create the methods.
Binary file
File without changes
File without changes
@@ -3,8 +3,8 @@ require 'sqlite3'
3
3
  PRINT_QUERIES = ENV['PRINT_QUERIES'] == 'true'
4
4
  # https://tomafro.net/2010/01/tip-relative-paths-with-file-expand-path
5
5
  ROOT_FOLDER = Dir.pwd
6
- USERS_SQL_FILE = File.join(ROOT_FOLDER, 'example.sql')
7
- USERS_DB_FILE = File.join(ROOT_FOLDER, 'example.db')
6
+ USERS_SQL_FILE = File.join(ROOT_FOLDER, 'schema.sql')
7
+ USERS_DB_FILE = File.join(ROOT_FOLDER, 'schema.db')
8
8
 
9
9
  class DBConnection
10
10
 
@@ -1,6 +1,7 @@
1
1
  require_relative 'db_connection'
2
2
  require_relative 'associatable'
3
3
  require_relative 'searchable'
4
+ require 'byebug'
4
5
 
5
6
  require 'active_support/inflector'
6
7
 
@@ -1,3 +1,3 @@
1
1
  module EasySave
2
- VERSION = "0.4.0"
2
+ VERSION = "0.5.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easy_save
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Akshith Yellapragada
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-05-16 00:00:00.000000000 Z
11
+ date: 2017-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -97,9 +97,11 @@ files:
97
97
  - bin/setup
98
98
  - easy_save.gemspec
99
99
  - examples/example.rb
100
- - examples/example.sql
100
+ - examples/schema.db
101
+ - examples/schema.sql
101
102
  - lib/easy_save.rb
102
103
  - lib/easy_save/associatable.rb
104
+ - lib/easy_save/configuration.rb
103
105
  - lib/easy_save/db_connection.rb
104
106
  - lib/easy_save/searchable.rb
105
107
  - lib/easy_save/sql_object.rb