stitch-plus 1.0.4 → 1.0.5

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
- MzhlZjFmOGVjNzAzNWQ5NDY3MWY0MDEzNzZjZjE1MDQ2Njc0M2YyYg==
4
+ MDExZGRmNzBmNTg5NjE5ZDJjNTQ4N2QxNTU4MzVjZGFlMmU2YTQzYg==
5
5
  data.tar.gz: !binary |-
6
- OTFmYjU5OGE3NmVjZGNkNzY0MTAxYTNkNDUzMjk1Yjc3NGJlNTQ2MA==
6
+ MmQzZjYwZTgzMzk5YzJmN2I0Y2I1NDc1ODk1M2ZkOWM1YjBiYzNhYg==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- NmNiYWM1NmEwN2E3YTAzZjYwMjEyMjNhNjUyMjIxM2M3YzA0NTlkZmE3NTBj
10
- ZDEwOGM0MDIyMDdiMDE0MzBhMDNlMDUwYWU4YTA0NzlmNzc2ODBlNTE1ODQ0
11
- YmVjYTRmZTNmNDRkYzI0MjdkZThmZmQ1OTIyMTI1YTM5ZDA5N2I=
9
+ ZGI3MjFlMjNkZTJkMTQ3YzU0NWY1MGZlNTM1NDM4YjVkOGI4ZjFhOTEzZTZj
10
+ MGM5MjNhYjg2MTY5M2M2YjU2MDA3NmU3Zjc2YWI1NjhmODc4ZWEwNzA3M2Fk
11
+ YmY5ZTIwOTMyYTYyN2YzN2FhYjA0ZTkyNTk5ZjBiNDRiNmI0MDg=
12
12
  data.tar.gz: !binary |-
13
- NmIxZTRiMzJlMDE1Nzc0MzBkNmYzNjg2ZWU2ZDZlZTQwNTVhNjNhZTU0MTZl
14
- N2VkOWI0ZGI4MGJiYTcwYjExY2I1ZTQxMjIxN2QyNjc4ODYzYzc0YjkwNTU3
15
- MjVkNjFkY2E2MTk3ODE0MmFlNzJjZTJiOGNmMDcwZGYyNTY0ODI=
13
+ YTAxODhlMDYzM2U1MmNlZWM3YmQ3OWFiOTQ0ZDMxODg4NmU2YzVjM2ZiOTY3
14
+ Njk1YmUyYmRjNzlkZTIyNjhmZWQyYjljMWQ3YmJjNjA1NjdlMzdjZWEzOGY4
15
+ YjJlZjBkOWU5NDI1YTA0MWI3MDU3YWU5NWI3YTRiNTcwZGIzZDg=
@@ -18,3 +18,6 @@
18
18
 
19
19
  ## 1.0.4
20
20
  - Options hash now accepts `config` which can point to a YAML file to load configurations.
21
+
22
+ ## 1.0.5
23
+ - [instance].last_write returns the path to the last written file.
data/README.md CHANGED
@@ -31,11 +31,14 @@ s = StitchPlus.new(options)
31
31
  # Returns compiled javascript
32
32
  s.compile
33
33
 
34
+ # Get what path to the compiled file will be
35
+ s.output_file #> javascripts/app-f1408932717b4b16eb97969d34961213.js
36
+
34
37
  # Writes compiled javascript to disk (`output` config determines filename)
35
38
  s.write
36
39
 
37
- # Get compiled filename
38
- s.output_file #> javascripts/app-f1408932717b4b16eb97969d34961213.js
40
+ # Get the path to the most recently written file (or nil)
41
+ s.last_write #> javascripts/app-f1408932717b4b16eb97969d34961213.js
39
42
 
40
43
  # Return the array of javascripts to be compiled
41
44
  s.all_files
@@ -109,7 +109,7 @@ class StitchPlus
109
109
 
110
110
  end
111
111
 
112
- # return the compiled js path including fingerprint if necessary
112
+ # return the compiled js path including fingerprint if enabled
113
113
  def output_file(options=nil)
114
114
  temp_options(options) if options
115
115
  file = @options[:output]
@@ -125,6 +125,13 @@ class StitchPlus
125
125
  file
126
126
  end
127
127
 
128
+ # Return the path for the last file written
129
+ # This exists because it's more performant than calling output_file unnecessarily
130
+ #
131
+ def last_write
132
+ @file
133
+ end
134
+
128
135
  # Get a list of all files to be stitched
129
136
  def all_files(options=nil)
130
137
  temp_options(options) if options
@@ -1,3 +1,3 @@
1
1
  module StitchPlusVersion
2
- VERSION = "1.0.4"
2
+ VERSION = "1.0.5"
3
3
  end
@@ -7,3 +7,4 @@ puts "Javascripts to be compiled:"
7
7
  puts s.all_files.map { |f| " #{f}"}
8
8
 
9
9
  s.write
10
+ p s.last_write
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stitch-plus
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Mathis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-17 00:00:00.000000000 Z
11
+ date: 2013-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: stitch-rb