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 CHANGED
@@ -1,3 +1,4 @@
1
1
  /.rvmrc
2
2
  /.sass-cache
3
3
  /doc/
4
+ *.gem
data/.travis.yml CHANGED
@@ -1,8 +1,9 @@
1
1
  language: ruby
2
2
  rvm:
3
- - "1.8.7"
4
- - "1.9.2"
5
- - "1.9.3"
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)
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.3.2)
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.4)
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.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
- * Fixed stylus 0.7.1 support.
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
- Running the tests
676
- ---------------
675
+ Contributing
676
+ ------------
677
677
 
678
- rake
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 and maintained by [Rico Sta. Cruz][rsc] with help
687
- from it's [contributors][c]. It is sponsored by my startup, [Sinefunc, Inc][sf].
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
- * [My website](http://ricostacruz.com) (ricostacruz.com)
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
@@ -44,7 +44,7 @@ module Sinatra
44
44
  pack = settings.assets.packages["#{name}.#{type}"]
45
45
  return "" unless pack
46
46
 
47
- if settings.production?
47
+ if settings.environment == :production
48
48
  pack.to_production_html options
49
49
  else
50
50
  pack.to_development_html options
@@ -1,7 +1,7 @@
1
1
  module Sinatra
2
2
  module AssetPack
3
3
  def self.version
4
- "0.1.5"
4
+ "0.1.6"
5
5
  end
6
6
  end
7
7
  end
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 "Image[]" do
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 "Image[]" do
23
+ test "dimensions" do
24
24
  i = Image['/app/images/email.png']
25
25
  j = Image['/app/images/email.png']
26
26
 
@@ -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(:production?).returns(true)
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 single assets' do
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.5
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 00:00:00.000000000 Z
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