sinatra-assetpack 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/.travis.yml +6 -4
- data/CONTRIBUTING.md +27 -0
- data/Gemfile.lock +4 -4
- data/HISTORY.md +8 -1
- data/README.md +13 -10
- data/lib/sinatra/assetpack/helpers.rb +1 -1
- data/lib/sinatra/assetpack/version.rb +1 -1
- data/test/img_test.rb +2 -2
- data/test/mime_type_test.rb +0 -5
- data/test/unit_test.rb +2 -2
- metadata +3 -2
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
language: ruby
|
2
2
|
rvm:
|
3
|
-
-
|
4
|
-
-
|
5
|
-
-
|
3
|
+
- 1.8.7
|
4
|
+
- 1.9.2
|
5
|
+
- 1.9.3
|
6
|
+
- 2.0.0
|
6
7
|
- rbx-18mode
|
7
8
|
- rbx-19mode
|
8
9
|
- jruby-18mode
|
@@ -12,4 +13,5 @@ rvm:
|
|
12
13
|
matrix:
|
13
14
|
allow_failures:
|
14
15
|
- rvm: jruby-head
|
15
|
-
- rvm: ruby-head
|
16
|
+
- rvm: ruby-head
|
17
|
+
- rvm: 2.0.0
|
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
# Contributing
|
2
|
+
|
3
|
+
> If I have seen further it is by standing on the shoulders of giants. - Isaac Newton
|
4
|
+
|
5
|
+
Please follow theses simples steps to contribute to this project :
|
6
|
+
|
7
|
+
1. Fork the repo.
|
8
|
+
|
9
|
+
2. Run the tests before doing anything.
|
10
|
+
|
11
|
+
3. Add test(s) for your code modification.
|
12
|
+
|
13
|
+
4. Rebase your code onto upstream master (this repository) if not up to date.
|
14
|
+
|
15
|
+
5. Squash or fixup your commits to achieve a clean commit log.
|
16
|
+
|
17
|
+
6. Submit a pull request and ensure tests passes on travis-ci for all supported ruby versions.
|
18
|
+
|
19
|
+
## Running the tests
|
20
|
+
|
21
|
+
As simple as running the `rake` command.
|
22
|
+
|
23
|
+
The default `rake` task is `rake test`.
|
24
|
+
|
25
|
+
## Syntax
|
26
|
+
|
27
|
+
Follow [Ruby Styleguide](https://github.com/styleguide/ruby) by Github and existing code.
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
sinatra-assetpack (0.1.
|
4
|
+
sinatra-assetpack (0.1.6)
|
5
5
|
jsmin
|
6
6
|
rack-test
|
7
7
|
sinatra
|
@@ -32,13 +32,13 @@ GEM
|
|
32
32
|
multi_json (1.6.0)
|
33
33
|
open4 (1.3.0)
|
34
34
|
rack (1.5.2)
|
35
|
-
rack-protection (1.
|
35
|
+
rack-protection (1.4.0)
|
36
36
|
rack
|
37
37
|
rack-test (0.6.2)
|
38
38
|
rack (>= 1.0)
|
39
39
|
rake (10.0.3)
|
40
40
|
sass (3.2.5)
|
41
|
-
sinatra (1.3.
|
41
|
+
sinatra (1.3.5)
|
42
42
|
rack (~> 1.4)
|
43
43
|
rack-protection (~> 1.3)
|
44
44
|
tilt (~> 1.3, >= 1.3.3)
|
@@ -46,7 +46,7 @@ GEM
|
|
46
46
|
execjs
|
47
47
|
stylus-source
|
48
48
|
stylus-source (0.31.0)
|
49
|
-
tilt (1.3.
|
49
|
+
tilt (1.3.4)
|
50
50
|
uglifier (1.3.0)
|
51
51
|
execjs (>= 0.3.0)
|
52
52
|
multi_json (~> 1.0, >= 1.0.2)
|
data/HISTORY.md
CHANGED
@@ -1,8 +1,15 @@
|
|
1
|
+
v0.1.6 - March 1, 2013
|
2
|
+
----------------------
|
3
|
+
|
4
|
+
### Fixed
|
5
|
+
|
6
|
+
* Do not use instance helpers for environment check. (#79)
|
7
|
+
|
1
8
|
v0.1.5 - Feb 12, 2013
|
2
9
|
----------------------
|
3
10
|
|
4
11
|
### Fixed
|
5
|
-
*
|
12
|
+
* Stylus 0.7.1 support.
|
6
13
|
|
7
14
|
v0.1.4 - Feb 12, 2013
|
8
15
|
----------------------
|
data/README.md
CHANGED
@@ -672,25 +672,28 @@ class Main
|
|
672
672
|
end
|
673
673
|
```
|
674
674
|
|
675
|
-
|
676
|
-
|
675
|
+
Contributing
|
676
|
+
------------
|
677
677
|
|
678
|
-
|
678
|
+
See [CONTRIBUTING.md](https://github.com/rstacruz/sinatra-assetpack/blob/master/CONTRIBUTING.md) for details on contributing and running test.
|
679
679
|
|
680
680
|
Acknowledgements
|
681
681
|
----------------
|
682
682
|
|
683
|
-
© 2011, Rico Sta. Cruz. Released under the [MIT
|
683
|
+
© 2011-2013, Rico Sta. Cruz. Released under the [MIT
|
684
684
|
License](http://www.opensource.org/licenses/mit-license.php).
|
685
685
|
|
686
|
-
Sinatra-AssetPack is authored
|
687
|
-
from it's [contributors][c]. It is sponsored by
|
686
|
+
Sinatra-AssetPack is authored by [Rico Sta. Cruz][rsc] with help
|
687
|
+
from it's [contributors][c]. It is sponsored by [Sinefunc, Inc][sf].
|
688
|
+
|
689
|
+
Sinatra-AssetPack is maintained by [Jean-Philipe Doyle][j15e] at [Hookt Studios][hookt].
|
690
|
+
|
691
|
+
Github : [@rstacruz](http://github.com/rstacruz), [@j15e](http://github.com/j15e)
|
688
692
|
|
689
|
-
|
690
|
-
* [Sinefunc, Inc.](http://sinefunc.com) (sinefunc.com)
|
691
|
-
* [Github](http://github.com/rstacruz) (@rstacruz)
|
692
|
-
* [Twitter](http://twitter.com/rstacruz) (@rstacruz)
|
693
|
+
Twitter : [@rstacruz](http://twitter.com/rstacruz), [@j15e](http://twitter.com/j15e)
|
693
694
|
|
694
695
|
[rsc]: http://ricostacruz.com
|
695
696
|
[c]: http://github.com/rstacruz/sinatra-assetpack/contributors
|
696
697
|
[sf]: http://sinefunc.com
|
698
|
+
[j15e]: http://github.com/j15e
|
699
|
+
[hookt]: http://github.com/hooktstudios
|
data/test/img_test.rb
CHANGED
@@ -13,14 +13,14 @@ class ImgTest < UnitTest
|
|
13
13
|
assert_equal last_response.headers['Content-Length'], File.size(r("/app/images/email.png")).to_s
|
14
14
|
end
|
15
15
|
|
16
|
-
test "
|
16
|
+
test "compare" do
|
17
17
|
i = Image['/app/images/email.png']
|
18
18
|
j = Image['/app/images/email.png']
|
19
19
|
|
20
20
|
assert j === i
|
21
21
|
end
|
22
22
|
|
23
|
-
test "
|
23
|
+
test "dimensions" do
|
24
24
|
i = Image['/app/images/email.png']
|
25
25
|
j = Image['/app/images/email.png']
|
26
26
|
|
data/test/mime_type_test.rb
CHANGED
@@ -50,9 +50,4 @@ class AppTest < UnitTest
|
|
50
50
|
get '/fonts/cantarell-regular-webfont.woff'
|
51
51
|
assert last_response.content_type =~ %r[^application/font-woff]
|
52
52
|
end
|
53
|
-
|
54
|
-
test 'woff' do
|
55
|
-
get '/fonts/cantarell-regular-webfont.woff'
|
56
|
-
assert last_response.content_type =~ %r[^application/font-woff]
|
57
|
-
end
|
58
53
|
end
|
data/test/unit_test.rb
CHANGED
@@ -77,7 +77,7 @@ class AppTest < UnitTest
|
|
77
77
|
end
|
78
78
|
|
79
79
|
test "helpers in production (compressed html thingie)" do
|
80
|
-
app.expects(:
|
80
|
+
app.expects(:environment).returns(:production)
|
81
81
|
get '/index.html'
|
82
82
|
assert body =~ /<script src='\/js\/app.[0-9]+.js'><\/script>/
|
83
83
|
end
|
@@ -130,7 +130,7 @@ class AppTest < UnitTest
|
|
130
130
|
assert_equal (Time.now + (86400*30)).httpdate, last_response.headers['Expires']
|
131
131
|
end
|
132
132
|
|
133
|
-
test 'custom expiration of
|
133
|
+
test 'custom expiration of packed assets' do
|
134
134
|
app.settings.assets.expires 86400*365, :public
|
135
135
|
|
136
136
|
get '/js/app.js'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sinatra-assetpack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-02
|
12
|
+
date: 2013-03-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: tilt
|
@@ -244,6 +244,7 @@ extra_rdoc_files: []
|
|
244
244
|
files:
|
245
245
|
- .gitignore
|
246
246
|
- .travis.yml
|
247
|
+
- CONTRIBUTING.md
|
247
248
|
- Gemfile
|
248
249
|
- Gemfile.lock
|
249
250
|
- HISTORY.md
|