artifact 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 70c3138e6af3b10a50119c69c86f103813f25cde
4
- data.tar.gz: cef4833fbe9068c304bebc2de133912c4170981b
3
+ metadata.gz: 719a51f999e705cae119974c8879e60e7dd64180
4
+ data.tar.gz: c32be0291f542afec30c81ebb0320641f25ed17e
5
5
  SHA512:
6
- metadata.gz: 25bfe8ce63a82528798cb3d75bc528a969db5a1e74849f72e4c8c9810e21b9d5c13e51c6562d154971a9c1eb01986f7beba1c634c5d9a0b5309db7474d5be75c
7
- data.tar.gz: 1c4314276d771991c8335f91529828d53b5bc695e2d441493d76495f921c67bedd1855c03f7c29da60c46a5cad3b8ee6ac8d08b6f64acde161f7d9b2a550a4dc
6
+ metadata.gz: 61041a7abe7fa3ed30a903dc0cbc1710a162a3a47854ba1cd2e8c49c6af4844e17e77d6f2fc659a6b43896b68203e987e72144121c896931aa020da991b28f25
7
+ data.tar.gz: eaed891f54a4fff5befd17177d979109e128d9d38b9e6c25c15db95f2fcfcb591d0ee6d76e070e4e1c7d184ab11076178dfbea4f751505571b717828864f3c3d
data/lib/artifact.rb CHANGED
@@ -153,10 +153,15 @@ module Artifact
153
153
  end
154
154
 
155
155
  def save(path, author, check = true)
156
+ # index.add expects a clean path, without any leading ./
157
+ # so make sure we're passing a clean pathname
158
+ path = path.sub(/^\.\//, '')
159
+
156
160
  if check && !new_file?(path) && !modified?(path)
157
161
  raise "No changes in file: #{path}"
158
162
  end
159
163
 
164
+ # puts "Adding to index: #{path}"
160
165
  @git.index.add(path)
161
166
  @git.index.write
162
167
  write_commit("Saved #{path}", author)
@@ -1,3 +1,3 @@
1
1
  module Artifact
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: artifact
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomás Pollak