lense 0.1.48 → 0.1.49
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lense.rb +4 -4
- 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: 84e8c0e3a1bebc03b2640eb99a7a0a1e82af65d8
|
4
|
+
data.tar.gz: 99ac8fd56e360cdeb2727e6d0b92c6e97a4b0787
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: adb9c947f36f051a5f9ac82ee9915b06697865fa68f06ff41afeafc915687249092ee21b1b6d3edc4426716de6aa0ebd34372332df05981f035ac536ec20dae6
|
7
|
+
data.tar.gz: 08d23874e642ac36511d5c8f4c091f0b9debd3cb98762ff0ad57abdf2170219d019b7280e58f8820dd09f6b51057f21b445a994d23b3583dad3532b321babf28
|
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.49'
|
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')
|
@@ -163,7 +163,7 @@ class LENSE
|
|
163
163
|
|
164
164
|
files = rows.select do |file|
|
165
165
|
dependency = get_dependency(file[:path])
|
166
|
-
dependency.nil? || dependency
|
166
|
+
dependency.nil? || dependency[:file_hash] != file[:hash]
|
167
167
|
end
|
168
168
|
|
169
169
|
combined_hash = files.map {|f| f[:hash]}.join ''
|
@@ -178,7 +178,7 @@ class LENSE
|
|
178
178
|
@DB.execute 'insert into dependencies (path,added_at) values (?,?);',[file[:path],DateTime.now.to_s]
|
179
179
|
dependency_id = @DB.last_insert_row_id
|
180
180
|
else
|
181
|
-
dependency_id = dependency
|
181
|
+
dependency_id = dependency[:id]
|
182
182
|
end
|
183
183
|
@DB.execute 'insert into revisions (commit_id,dependency_id,hash,created_at) values (?,?,?,?);',[commit_id,dependency_id,file[:hash],DateTime.now.to_s]
|
184
184
|
@DB.commit
|
@@ -202,7 +202,7 @@ class LENSE
|
|
202
202
|
else
|
203
203
|
current_hash = hash_file(file)
|
204
204
|
# is it modified?
|
205
|
-
if dependency
|
205
|
+
if dependency[:file_hash] == current_hash
|
206
206
|
say "Not Staging because we've seen this file"
|
207
207
|
should_stage = false
|
208
208
|
else
|