roger_yuicompressor 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/CHANGELOG.md +4 -0
- data/Gemfile +5 -1
- data/Rakefile +1 -1
- data/lib/roger_yuicompressor/processor.rb +3 -3
- data/roger_yuicompressor.gemspec +1 -1
- data/test/unit/processor_test.rb +24 -3
- metadata +2 -3
- data/Gemfile.lock +0 -32
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MDIzZjQ5YjRkM2ZjY2Y0OWU1YjgzYTQ2MmQ3ZmZlZDk4NTExZTI4NA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NTgzMjk3NTZiYThlZGY1MmY3MTM5MzJiZmU0Mzg0ZDhkOTg2ZGEzNQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NjEwOTI5NmJjY2U1ZmYwODQzZDAzNWZmMzBlYmU1ODVjZTM3Yjc5Y2IwYjJi
|
10
|
+
ZDM2ODVhNDkxMmJlODVkNGNmNjQ5MDYwZTQ3MzkwMGI5M2Q3ZjM5NzdhZjJm
|
11
|
+
MjRlOGEyMThmOWQ0MTYzNjVhYjc4YjI4NzQzYTI4YjA5YTQxZDY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ODQxMDI0OTBhZTQ3NjEyODAyNzFiNDI2MDUyYWU5NzRiODg3MmZhYTQ4NDVi
|
14
|
+
NTUzNmJhNTQ0ZWNlYzY0NmQ4MTY0YmNhOWEzZjk2YTMyZDFkODhmZGNmNzIy
|
15
|
+
NGQ5NzZkMTViMzRhMzgwMDE4NGMzNDU2YzBjYjI4MjRjYjM3YTE=
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## Version 1.1.1
|
4
|
+
* Fixed typo-bugs in call-method of the processor, use default options and typo checking valid suffix
|
5
|
+
* Added test for call method
|
6
|
+
|
3
7
|
## Version 1.1.0
|
4
8
|
* Add support for minifying files with a suffix without overwriting the original.
|
5
9
|
|
data/Gemfile
CHANGED
data/Rakefile
CHANGED
@@ -33,12 +33,12 @@ module RogerYuicompressor
|
|
33
33
|
def call(release, options={})
|
34
34
|
@options.update(options)
|
35
35
|
|
36
|
-
release.log self, "Minifying #{options[:match].inspect}"
|
36
|
+
release.log self, "Minifying #{@options[:match].inspect}"
|
37
37
|
|
38
|
-
raise(RuntimeError, "The given suffix #{@options[:suffix]} is invalid.") unless valid_suffix?(@options[:
|
38
|
+
raise(RuntimeError, "The given suffix #{@options[:suffix]} is invalid.") unless valid_suffix?(@options[:suffix])
|
39
39
|
|
40
40
|
# Add version numbers and minify the files
|
41
|
-
release.get_files(options[:match], options[:skip]).each do |filename|
|
41
|
+
release.get_files(@options[:match], @options[:skip]).each do |filename|
|
42
42
|
minify_file(filename, release)
|
43
43
|
end
|
44
44
|
end
|
data/roger_yuicompressor.gemspec
CHANGED
data/test/unit/processor_test.rb
CHANGED
@@ -1,11 +1,13 @@
|
|
1
1
|
require File.dirname(__FILE__) + "/../../lib/roger_yuicompressor/processor"
|
2
2
|
require "test/unit"
|
3
|
+
require "rspec/mocks/standalone"
|
3
4
|
|
4
5
|
class ProcessorTest < Test::Unit::TestCase
|
6
|
+
include RSpec::Mocks::ExampleMethods
|
5
7
|
|
6
8
|
def setup
|
7
9
|
@processor = RogerYuicompressor::Yuicompressor.new
|
8
|
-
@tmp_file = 'file.css'
|
10
|
+
@tmp_file = 'file.css'
|
9
11
|
|
10
12
|
# TEMP file creation
|
11
13
|
File.open(@tmp_file, 'w') do |tmp_file|
|
@@ -51,8 +53,27 @@ class ProcessorTest < Test::Unit::TestCase
|
|
51
53
|
assert(File.exists?('file.css'))
|
52
54
|
end
|
53
55
|
|
56
|
+
def test_call_method
|
57
|
+
options = {:suffix => '.testsuffix', :match => ["file.css"]}
|
58
|
+
processor = RogerYuicompressor::Yuicompressor.new(options)
|
59
|
+
|
60
|
+
# Mock
|
61
|
+
release = double('Roger::Release')
|
62
|
+
|
63
|
+
# Expectations
|
64
|
+
expect(release).to receive(:log)
|
65
|
+
expect(release).to receive(:get_files).with(processor.options[:match], processor.options[:skip]).and_return(processor.options[:match])
|
66
|
+
|
67
|
+
# Call method
|
68
|
+
processor.call(release)
|
69
|
+
|
70
|
+
assert(File.exists?('file.testsuffix.css'), "File 'file.testsuffix.css' doesn't exist using Processor::Call method")
|
71
|
+
assert(File.exists?('file.css'), "File 'file.css' doesn't exist using Processor::Call method")
|
72
|
+
end
|
73
|
+
|
54
74
|
def teardown
|
55
|
-
|
56
|
-
|
75
|
+
Dir['file.*.css', 'file.css'].each do |file|
|
76
|
+
File.delete(file)
|
77
|
+
end
|
57
78
|
end
|
58
79
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: roger_yuicompressor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Flurin Egger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: roger
|
@@ -49,7 +49,6 @@ files:
|
|
49
49
|
- .travis.yml
|
50
50
|
- CHANGELOG.md
|
51
51
|
- Gemfile
|
52
|
-
- Gemfile.lock
|
53
52
|
- LICENSE
|
54
53
|
- README.md
|
55
54
|
- Rakefile
|
data/Gemfile.lock
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
roger_yuicompressor (1.0.1)
|
5
|
-
roger (>= 0.11.0)
|
6
|
-
yui-compressor
|
7
|
-
|
8
|
-
GEM
|
9
|
-
remote: https://rubygems.org/
|
10
|
-
specs:
|
11
|
-
hpricot (0.8.6)
|
12
|
-
mime-types (2.3)
|
13
|
-
rack (1.5.2)
|
14
|
-
rake (10.3.2)
|
15
|
-
redcarpet (3.1.2)
|
16
|
-
roger (0.12.2)
|
17
|
-
hpricot (>= 0.6.4)
|
18
|
-
mime-types (~> 2.2)
|
19
|
-
rack (>= 1.0.0)
|
20
|
-
redcarpet (>= 3.1.1)
|
21
|
-
thor (~> 0.16.0)
|
22
|
-
tilt (~> 2.0.1)
|
23
|
-
thor (0.16.0)
|
24
|
-
tilt (2.0.1)
|
25
|
-
yui-compressor (0.12.0)
|
26
|
-
|
27
|
-
PLATFORMS
|
28
|
-
ruby
|
29
|
-
|
30
|
-
DEPENDENCIES
|
31
|
-
rake
|
32
|
-
roger_yuicompressor!
|