lense 0.1.48 → 0.1.49

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/lense.rb +4 -4
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8a0ca49df7aa317a5222db89a5dab870bacb0dd6
4
- data.tar.gz: 9c5353bb925935169a4d86d904797a422707bcba
3
+ metadata.gz: 84e8c0e3a1bebc03b2640eb99a7a0a1e82af65d8
4
+ data.tar.gz: 99ac8fd56e360cdeb2727e6d0b92c6e97a4b0787
5
5
  SHA512:
6
- metadata.gz: bb64d69eb3e6a653048c10f2ef1f3ba366e292964c65b47030be0fb2c37d65fa0b443ab4b0a555584113dbf168933a2d38a2752c9e8c139582fa6593625bfdc3
7
- data.tar.gz: b47d97e2da80778ec6ede77e9dafa592b378b0162ee5a44c7a1ae44b72fc982166e875ed89959c14d49526d5eff4e21c7a9b0127fb976a46ef750fc78f67e571
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.48'
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.file_hash != file[:hash]
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.id
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.file_hash == current_hash
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
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.48
4
+ version: 0.1.49
5
5
  platform: ruby
6
6
  authors:
7
7
  - Manuel Zubieta