lense 0.1.34 → 0.1.35

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/lense.rb +14 -14
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3010ba88fcb12b8b493331f7bcb6c9d71e4c53f1
4
- data.tar.gz: aa193db95c186394b22819372554a4ade984b72f
3
+ metadata.gz: be3f12acaccc21f3485bba48d63e0a41e07123f3
4
+ data.tar.gz: 99f4f893f2bcf3470f55220377e8431d0d7a9423
5
5
  SHA512:
6
- metadata.gz: c0e72703044f065238dfd32cafbaea817adaf178fffe4d83ef57cde5792ec414b9185e696933197bbe343b30567b81872091ec7e41302a9c41cb07f232e62afd
7
- data.tar.gz: 16cf54c6cfdc3e947dcd51f89ff8a3ea62efc486c7fa4744ca67db19dde9598999bd5950c7c9717a62f069e6c63d18400c9be470edf9008772e2e005f1d00e36
6
+ metadata.gz: 394affe97a84b904c8db385ba4b81e8c2faf2d348561be06f400e6bbece23566da414e993822604c6c0b7b4b9944d1fda8137821112486e5285d5c02ec43774e
7
+ data.tar.gz: c25d6849d5af275f3b2bf89267487a09532aeb5963f675cf08feff5fa218cf3d7f39882329544e7565ca8be44c48245ebec3f63c9ddc16b8de1a09720f1d8309
data/lib/lense.rb CHANGED
@@ -6,7 +6,7 @@ require 'sqlite3'
6
6
  class LENSE
7
7
  attr_reader :config, :current_course, :lense_file_hash
8
8
 
9
- VERSION = '0.1.34'
9
+ VERSION = '0.1.35'
10
10
  LENSE_DIR = File.join(ENV['HOME'],'.lense')
11
11
  COURSES_DIR = File.join(LENSE_DIR,'courses')
12
12
  CURRENT_COURSE_FILE = File.join(LENSE_DIR,'current_course')
@@ -137,7 +137,7 @@ class LENSE
137
137
  def status()
138
138
  say "Hash : #{@lense_file_hash}"
139
139
  exit_now!("Not a LENSE project: .lense") unless File.directory?(LOCAL_LENSE_DIR)
140
- @db.execute "select path from staging;".each { |p| say "Staged: #{p}"}
140
+ @DB.execute "select path from staging;".each { |p| say "Staged: #{p}"}
141
141
  # check changes in depenancy files
142
142
  # - for each depenceny
143
143
  # - - get the current file hash
@@ -153,11 +153,11 @@ class LENSE
153
153
  end
154
154
 
155
155
  def stage(file)
156
- @db.execute "insert into staging (path) values (?);", file if File.file?(file)
156
+ @DB.execute "insert into staging (path) values (?);", file if File.file?(file)
157
157
  end
158
158
 
159
159
  def unstage(file)
160
- @db.execute "delete from staging where path = '?';", file
160
+ @DB.execute "delete from staging where path = '?';", file
161
161
  end
162
162
 
163
163
  def remove(file)
@@ -165,27 +165,27 @@ class LENSE
165
165
 
166
166
  private
167
167
  def setup_db()
168
- @db.execute <<-SQL
168
+ @DB.execute <<-SQL
169
169
  CREATE TABLE IF NOT EXISTS dependencies (
170
170
  id integer primary key autoincrement,
171
171
  path text not null,
172
172
  added_at datetime not null
173
173
  );
174
174
  SQL
175
- @db.execute <<-SQL
175
+ @DB.execute <<-SQL
176
176
  CREATE UNIQUE INDEX IF NOT EXISTS dependency_path_idx ON dependencies (path);
177
177
  SQL
178
- @db.execute <<-SQL
178
+ @DB.execute <<-SQL
179
179
  CREATE TABLE IF NOT EXISTS commits (
180
180
  id integer primary key autoincrement,
181
181
  hash text not null,
182
182
  created_at datetime not null
183
183
  );
184
184
  SQL
185
- @db.execute <<-SQL
185
+ @DB.execute <<-SQL
186
186
  CREATE INDEX IF NOT EXISTS commits_hash_idx ON commits (hash);
187
187
  SQL
188
- @db.execute <<-SQL
188
+ @DB.execute <<-SQL
189
189
  CREATE TABLE IF NOT EXISTS revisions (
190
190
  id integer primary key autoincrement,
191
191
  dependency_id integer not null,
@@ -194,22 +194,22 @@ class LENSE
194
194
  created_at datetime not null
195
195
  );
196
196
  SQL
197
- @db.execute <<-SQL
197
+ @DB.execute <<-SQL
198
198
  CREATE INDEX IF NOT EXISTS revisions_hash_idx ON revisions (hash);
199
199
  SQL
200
- @db.execute <<-SQL
200
+ @DB.execute <<-SQL
201
201
  CREATE INDEX IF NOT EXISTS revisions_dependency_id_idx ON revisions (dependency_id);
202
202
  SQL
203
- @db.execute <<-SQL
203
+ @DB.execute <<-SQL
204
204
  CREATE INDEX IF NOT EXISTS revisions_commit_id_idx ON revisions (commit_id);
205
205
  SQL
206
- @db.execute <<-SQL
206
+ @DB.execute <<-SQL
207
207
  CREATE TABLE IF NOT EXISTS staging (
208
208
  id integer primary key autoincrement,
209
209
  path text not null
210
210
  );
211
211
  SQL
212
- @db.execute <<-SQL
212
+ @DB.execute <<-SQL
213
213
  CREATE UNIQUE INDEX IF NOT EXISTS staging_path_idx ON staging (path);
214
214
  SQL
215
215
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lense
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.34
4
+ version: 0.1.35
5
5
  platform: ruby
6
6
  authors:
7
7
  - Manuel Zubieta