stitch-plus 1.0.7 → 1.0.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MDg0ZjM0ZWZkOTY0Y2ZkYjhhNzBhYTczOWU2ZjYyNmY2ODBkOTRmZg==
4
+ YTIwYmRiNDJkYmJlYzBlMDY3ZDA2YzBhODJlMTg2NGJjYTVhZjUzNw==
5
5
  data.tar.gz: !binary |-
6
- NDVmZDA0ZGNhOTYzMDFiNWM1YjlkZThjZDY5NmRiYmZlNzY1NDc2Yw==
6
+ NDMwYjZhNWU0MzU1ZWY3NWYxYzNiNDQzNmVjY2M4NTE2OTljZmI2OQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ZGZiOTkyMTlmZmI4NTI1NDFlMzkxZTI2OGY0ODgzYzM2N2MzMThjZDYxNmZh
10
- ZTMzZTk5YTAzYWIyOTMxMzgyYjRjZDA0ZmQ1Mzk3OTc3MjdhNzA3MzdhOGYx
11
- MjdlYzdkZjEyYzQ4ZjE2NmZmODBmMDZiYjJkMTUxZGE4NWRiMDc=
9
+ OGQzN2ViOWE0MWJlOTA1NjFkZDRjYzhjZGYyYWMzNzI4NzllZTcwZjk1NTJj
10
+ N2ZmY2NiOTRlMmUzZmU3MjM0NDViZGRiODIwMWZkMTk4ZDc1NmM5NGY1YmRi
11
+ MjhiNTcyNWZiYWFmN2JiOTc3ODU2NzJmYWJjNjgyN2Y4OTY0MmM=
12
12
  data.tar.gz: !binary |-
13
- ZjgwMTQzMmE5ZWE3OGU3Y2JlNjQ4NTg3MzRmYTk3ZGI0ZTUyMjZjNzAxMGJl
14
- YjU0MzVmNTA0MDlhNWRkNjVlMDQyYzM0M2FhMzk2MWE1YmE2NTdmZmJiMjI5
15
- OTMzZmFlOTlmNGViMzk2ZDJhMzExY2JhZDNjM2QxMzYzZmZjZWM=
13
+ MmI1ODA3NjUzMWU4MWU5NWUyYWYxNTM5ODJhNWE4MmEyYzk0YzI3ODZmOWUw
14
+ MDU2ZTliNGIzZjk4YmU3NmZiMTkyZDEzM2YyZjkwN2U0OTgxMjdiNzU1MmU1
15
+ ZTdjY2NmN2Q5NDE5ZmFkNzljZWQwOTYyZWQxMmRkZDZmNTJkYjM=
data/CHANGELOG.md CHANGED
@@ -28,3 +28,6 @@
28
28
 
29
29
  ## 1.0.7
30
30
  - Paths appearing in messages will now start from the current directory
31
+
32
+ ## 1.0.8
33
+ - Fixes for 1.0.7, removed leading slashes from paths in messages.
data/lib/stitch-plus.rb CHANGED
@@ -88,12 +88,12 @@ class StitchPlus
88
88
  js = "/* Build fingerprint: #{@fingerprint} */\n" + compile
89
89
 
90
90
  if has_fingerprint(@file, @fingerprint)
91
- info "Stitch " + "identical ".green + @file.sub(Dir.pwd, '')
91
+ info "Stitch " + "identical ".green + @file.sub("#{Dir.pwd}/", '')
92
92
  reset_options if options
93
93
  true
94
94
  else
95
95
  begin
96
- write_msg = (File.exists?(@file) ? "overwrite " : "created ").yellow + @file.sub(Dir.pwd, '')
96
+ write_msg = (File.exists?(@file) ? "overwrite " : "created ").yellow + @file.sub("#{Dir.pwd}/", '')
97
97
  cleanup(@file) if @options[:cleanup]
98
98
 
99
99
  File.open(@file, 'w') { |f| f.write js }
@@ -101,7 +101,7 @@ class StitchPlus
101
101
  info "Stitch " + write_msg
102
102
  true
103
103
  rescue StandardError => e
104
- error "Stitch failed to write #{@file.sub(Dir.pwd, '')}".red
104
+ error "Stitch failed to write #{@file.sub("#{Dir.pwd}/", '')}".red
105
105
  error e
106
106
  reset_options if options
107
107
  false
@@ -157,9 +157,9 @@ class StitchPlus
157
157
  def cleanup(file)
158
158
  Dir.glob(@options[:output].sub(/\./, '*')).each do |item|
159
159
  if File.basename(item) != File.basename(file)
160
- info "Stitch " + "deleted ".red + item
160
+ info "Stitch " + "deleted ".red + item.sub("#{Dir.pwd}/", '')
161
161
  FileUtils.rm(item)
162
- @deleted << item.sub(Dir.pwd, '')
162
+ @deleted << item
163
163
  end
164
164
  end
165
165
  end
@@ -1,3 +1,3 @@
1
1
  module StitchPlusVersion
2
- VERSION = "1.0.7"
2
+ VERSION = "1.0.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stitch-plus
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Mathis