smurf 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +9 -0
- data/Gemfile +1 -4
- data/Rakefile +6 -24
- data/lib/smurf/javascript.rb +1 -1
- data/lib/smurf/version.rb +4 -0
- data/smurf.gemspec +16 -69
- data/test/javascript_test.rb +13 -0
- metadata +30 -21
data/.gitignore
ADDED
data/Gemfile
CHANGED
data/Rakefile
CHANGED
@@ -1,32 +1,14 @@
|
|
1
|
-
require '
|
1
|
+
require 'bundler'
|
2
|
+
Bundler::GemHelper.install_tasks
|
3
|
+
|
2
4
|
require 'rake/testtask'
|
3
|
-
require 'rake/rdoctask'
|
4
5
|
|
5
|
-
|
6
|
-
task :default => :test
|
6
|
+
task :default => ["test"]
|
7
7
|
|
8
|
-
desc 'Test the smurf plugin
|
9
|
-
Rake::TestTask.new(
|
8
|
+
desc 'Test the smurf plugin'
|
9
|
+
Rake::TestTask.new("test") do |t|
|
10
10
|
t.libs += ['test']
|
11
11
|
t.pattern = 'test/**/*_test.rb'
|
12
12
|
t.verbose = false # Verbose is just dumb
|
13
13
|
end
|
14
14
|
|
15
|
-
#
|
16
|
-
# Some monks like diamonds. I like gems.
|
17
|
-
|
18
|
-
begin
|
19
|
-
require 'jeweler'
|
20
|
-
Jeweler::Tasks.new do |gem|
|
21
|
-
gem.name = "smurf"
|
22
|
-
gem.summary = "Rails plugin to automatically minify JS and CSS when their bundles get cached"
|
23
|
-
gem.description = "Rails plugin to automatically minify JS and CSS when their bundles get cached. Send in those patches!"
|
24
|
-
gem.email = "gus@thumblemonks.com"
|
25
|
-
gem.homepage = "http://github.com/thumblemonks/smurf"
|
26
|
-
gem.authors = ["Justin 'Gus' Knowlden"]
|
27
|
-
gem.add_development_dependency "riot"
|
28
|
-
end
|
29
|
-
Jeweler::GemcutterTasks.new
|
30
|
-
rescue LoadError
|
31
|
-
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
|
32
|
-
end
|
data/lib/smurf/javascript.rb
CHANGED
data/smurf.gemspec
CHANGED
@@ -1,76 +1,23 @@
|
|
1
|
-
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
1
|
# -*- encoding: utf-8 -*-
|
2
|
+
$:.unshift(File.expand_path("../lib", __FILE__))
|
3
|
+
require "smurf/version"
|
5
4
|
|
6
5
|
Gem::Specification.new do |s|
|
7
|
-
s.name
|
8
|
-
s.version
|
9
|
-
|
10
|
-
s.
|
11
|
-
s.
|
12
|
-
s.
|
13
|
-
s.
|
14
|
-
s.
|
15
|
-
s.
|
16
|
-
"README.markdown"
|
17
|
-
]
|
18
|
-
s.files = [
|
19
|
-
"Gemfile",
|
20
|
-
"MIT-LICENSE",
|
21
|
-
"README.markdown",
|
22
|
-
"Rakefile",
|
23
|
-
"VERSION",
|
24
|
-
"lib/smurf.rb",
|
25
|
-
"lib/smurf/javascript.rb",
|
26
|
-
"lib/smurf/noop.rb",
|
27
|
-
"lib/smurf/stylesheet.rb",
|
28
|
-
"smurf.gemspec",
|
29
|
-
"test/integration_test.rb",
|
30
|
-
"test/javascript_test.rb",
|
31
|
-
"test/rails/app/controllers/application.rb",
|
32
|
-
"test/rails/config/application.rb",
|
33
|
-
"test/rails/config/boot.rb",
|
34
|
-
"test/rails/config/environment.rb",
|
35
|
-
"test/rails/config/environments/test.rb",
|
36
|
-
"test/rails/config/routes.rb",
|
37
|
-
"test/rails/public/javascripts/cache/expected.js",
|
38
|
-
"test/rails/public/javascripts/projwcss/jscss.css",
|
39
|
-
"test/rails/public/javascripts/testing.js",
|
40
|
-
"test/rails/public/stylesheets/bar.css",
|
41
|
-
"test/rails/public/stylesheets/cache/expected-basic.css",
|
42
|
-
"test/rails/public/stylesheets/foo.css",
|
43
|
-
"test/stylesheet_test.rb",
|
44
|
-
"test/test_helper.rb"
|
45
|
-
]
|
46
|
-
s.homepage = %q{http://github.com/thumblemonks/smurf}
|
6
|
+
s.name = %q{smurf}
|
7
|
+
s.version = Smurf::VERSION
|
8
|
+
s.platform = Gem::Platform::RUBY
|
9
|
+
s.authors = ["Justin 'Gus' Knowlden"]
|
10
|
+
s.summary = %q{Rails plugin to automatically minify JS and CSS when their bundles get cached.}
|
11
|
+
s.description = %q{Rails plugin to automatically minify JS and CSS when their bundles get cached. Send in those patches!}
|
12
|
+
s.email = %q{gus@gusg.us}
|
13
|
+
s.files = `git ls-files`.split("\n")
|
14
|
+
s.homepage = %q{http://github.com/thumblemonks/smurf}
|
47
15
|
s.require_paths = ["lib"]
|
48
|
-
s.
|
49
|
-
s.
|
50
|
-
s.test_files = [
|
51
|
-
"test/integration_test.rb",
|
52
|
-
"test/javascript_test.rb",
|
53
|
-
"test/rails/app/controllers/application.rb",
|
54
|
-
"test/rails/config/application.rb",
|
55
|
-
"test/rails/config/boot.rb",
|
56
|
-
"test/rails/config/environment.rb",
|
57
|
-
"test/rails/config/environments/test.rb",
|
58
|
-
"test/rails/config/routes.rb",
|
59
|
-
"test/stylesheet_test.rb",
|
60
|
-
"test/test_helper.rb"
|
61
|
-
]
|
62
|
-
|
63
|
-
if s.respond_to? :specification_version then
|
64
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
65
|
-
s.specification_version = 3
|
16
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
17
|
+
s.extra_rdoc_files = ["README.markdown"]
|
66
18
|
|
67
|
-
|
68
|
-
|
69
|
-
else
|
70
|
-
s.add_dependency(%q<riot>, [">= 0"])
|
71
|
-
end
|
72
|
-
else
|
73
|
-
s.add_dependency(%q<riot>, [">= 0"])
|
74
|
-
end
|
19
|
+
s.add_dependency 'rails', '3.0.3'
|
20
|
+
s.add_dependency 'riot', '>=0.12.0'
|
75
21
|
end
|
76
22
|
|
23
|
+
|
data/test/javascript_test.rb
CHANGED
@@ -28,6 +28,19 @@ context "Javascript minifier" do
|
|
28
28
|
Smurf::Javascript.new(topic).minified
|
29
29
|
end.equals("\nvar foo='bar bar baz';")
|
30
30
|
end # working with multi-line strings
|
31
|
+
|
32
|
+
context "working with single-line comments without EOL." do
|
33
|
+
setup do
|
34
|
+
input = StringIO.new()
|
35
|
+
input.write("// I should not crash")
|
36
|
+
input.rewind
|
37
|
+
input.read
|
38
|
+
end
|
39
|
+
|
40
|
+
should "handle a single line comment at the end of the file without an EOL" do
|
41
|
+
Smurf::Javascript.new(topic).minified
|
42
|
+
end.equals("")
|
43
|
+
end
|
31
44
|
|
32
45
|
context "working with conditional compilation on IE" do
|
33
46
|
setup do
|
metadata
CHANGED
@@ -1,12 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smurf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
5
|
-
|
6
|
-
- 1
|
7
|
-
- 0
|
8
|
-
- 6
|
9
|
-
version: 1.0.6
|
4
|
+
prerelease:
|
5
|
+
version: 1.0.7
|
10
6
|
platform: ruby
|
11
7
|
authors:
|
12
8
|
- Justin 'Gus' Knowlden
|
@@ -14,24 +10,33 @@ autorequire:
|
|
14
10
|
bindir: bin
|
15
11
|
cert_chain: []
|
16
12
|
|
17
|
-
date: 2011-02
|
13
|
+
date: 2011-08-02 00:00:00 -05:00
|
18
14
|
default_executable:
|
19
15
|
dependencies:
|
20
16
|
- !ruby/object:Gem::Dependency
|
21
|
-
name:
|
17
|
+
name: rails
|
18
|
+
prerelease: false
|
22
19
|
requirement: &id001 !ruby/object:Gem::Requirement
|
23
20
|
none: false
|
24
21
|
requirements:
|
25
|
-
- - "
|
22
|
+
- - "="
|
26
23
|
- !ruby/object:Gem::Version
|
27
|
-
|
28
|
-
|
29
|
-
version: "0"
|
30
|
-
type: :development
|
31
|
-
prerelease: false
|
24
|
+
version: 3.0.3
|
25
|
+
type: :runtime
|
32
26
|
version_requirements: *id001
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: riot
|
29
|
+
prerelease: false
|
30
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
31
|
+
none: false
|
32
|
+
requirements:
|
33
|
+
- - ">="
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: 0.12.0
|
36
|
+
type: :runtime
|
37
|
+
version_requirements: *id002
|
33
38
|
description: Rails plugin to automatically minify JS and CSS when their bundles get cached. Send in those patches!
|
34
|
-
email: gus@
|
39
|
+
email: gus@gusg.us
|
35
40
|
executables: []
|
36
41
|
|
37
42
|
extensions: []
|
@@ -39,6 +44,7 @@ extensions: []
|
|
39
44
|
extra_rdoc_files:
|
40
45
|
- README.markdown
|
41
46
|
files:
|
47
|
+
- .gitignore
|
42
48
|
- Gemfile
|
43
49
|
- MIT-LICENSE
|
44
50
|
- README.markdown
|
@@ -48,6 +54,7 @@ files:
|
|
48
54
|
- lib/smurf/javascript.rb
|
49
55
|
- lib/smurf/noop.rb
|
50
56
|
- lib/smurf/stylesheet.rb
|
57
|
+
- lib/smurf/version.rb
|
51
58
|
- smurf.gemspec
|
52
59
|
- test/integration_test.rb
|
53
60
|
- test/javascript_test.rb
|
@@ -79,24 +86,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
79
86
|
requirements:
|
80
87
|
- - ">="
|
81
88
|
- !ruby/object:Gem::Version
|
82
|
-
segments:
|
83
|
-
- 0
|
84
89
|
version: "0"
|
85
90
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
86
91
|
none: false
|
87
92
|
requirements:
|
88
93
|
- - ">="
|
89
94
|
- !ruby/object:Gem::Version
|
90
|
-
segments:
|
91
|
-
- 0
|
92
95
|
version: "0"
|
93
96
|
requirements: []
|
94
97
|
|
95
98
|
rubyforge_project:
|
96
|
-
rubygems_version: 1.
|
99
|
+
rubygems_version: 1.6.2
|
97
100
|
signing_key:
|
98
101
|
specification_version: 3
|
99
|
-
summary: Rails plugin to automatically minify JS and CSS when their bundles get cached
|
102
|
+
summary: Rails plugin to automatically minify JS and CSS when their bundles get cached.
|
100
103
|
test_files:
|
101
104
|
- test/integration_test.rb
|
102
105
|
- test/javascript_test.rb
|
@@ -106,5 +109,11 @@ test_files:
|
|
106
109
|
- test/rails/config/environment.rb
|
107
110
|
- test/rails/config/environments/test.rb
|
108
111
|
- test/rails/config/routes.rb
|
112
|
+
- test/rails/public/javascripts/cache/expected.js
|
113
|
+
- test/rails/public/javascripts/projwcss/jscss.css
|
114
|
+
- test/rails/public/javascripts/testing.js
|
115
|
+
- test/rails/public/stylesheets/bar.css
|
116
|
+
- test/rails/public/stylesheets/cache/expected-basic.css
|
117
|
+
- test/rails/public/stylesheets/foo.css
|
109
118
|
- test/stylesheet_test.rb
|
110
119
|
- test/test_helper.rb
|