lense 0.1.49 → 0.1.50
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/bin/lense +6 -0
- data/lib/lense.rb +2 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d9d715b6fd1d4872b5dfe5a5616351823acc539
|
4
|
+
data.tar.gz: 77f0f7a18717cdc4560e47cd5e2a9c21be7e22f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 59f48076b9ea0933ebd55a8419b9a8f0578946e70f4aaca4fc7277b495fb63f9bfaa6ed3cfdea6ab007526007c6483b1fef7b87474dc97cfe3abe3403bab5d8f
|
7
|
+
data.tar.gz: 0ce003889baafea0885bdc0ad94b41d1a659d6d6d64c0d10cfa97795a037f3c0af67dc6859e64328826aa15016cc308431786afe73a551b57481bd15f39f0345
|
data/bin/lense
CHANGED
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.
|
9
|
+
VERSION = '0.1.50'
|
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')
|
@@ -195,18 +195,15 @@ class LENSE
|
|
195
195
|
def stage(file)
|
196
196
|
if File.file?(file)
|
197
197
|
dependency = get_dependency(file)
|
198
|
-
say "Dependency: #{dependency}"
|
199
198
|
if dependency.nil?
|
200
|
-
say "dependency is nil so we're staging"
|
201
199
|
should_stage = true
|
202
200
|
else
|
203
201
|
current_hash = hash_file(file)
|
202
|
+
|
204
203
|
# is it modified?
|
205
204
|
if dependency[:file_hash] == current_hash
|
206
|
-
say "Not Staging because we've seen this file"
|
207
205
|
should_stage = false
|
208
206
|
else
|
209
|
-
say "Staging because we haven't seen this revision"
|
210
207
|
should_stage = true
|
211
208
|
end
|
212
209
|
end
|
@@ -217,7 +214,6 @@ class LENSE
|
|
217
214
|
@DB.execute "insert into staging (path) values (?);", file
|
218
215
|
@DB.commit
|
219
216
|
rescue
|
220
|
-
say "File already staged!"
|
221
217
|
end
|
222
218
|
end
|
223
219
|
end
|