mbj-assets 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 34583cf1a54e359e7db67d15f1191d2d3d00881d
4
- data.tar.gz: 46485a80f1b0c267ba683d08735c02ffd574ad96
3
+ metadata.gz: e7bb892f77acea2eaba5bed4c187c87ae91f15f5
4
+ data.tar.gz: 82a3ceb222a646a5381c5be3fab50ddd0ef65fdc
5
5
  SHA512:
6
- metadata.gz: c73494fa9667dbe84ea1fd36363ad5bcd3ef7ec83cd702ab72066d43e47323942afab24ee6cb11921a22b2b9f1e54a307ea89f601ee6879ad3eefe2d1bded22a
7
- data.tar.gz: c6f44c87c74d794d4115e2096b2246c84fb34fdaca653a9f118e98563015b8fd3cc1cb8b2126116e194d6df3af68198c04abcc5d817fb24d8f11ee6a501bdb31
6
+ metadata.gz: 00d76caf751333480032402aa82633c2bd6bd5665deee8eb18af604f6f5b64f1fc930c0f31983f42f47b2e5d210e415701fe01f0aae88cc84c74bc51ab216441
7
+ data.tar.gz: 9a7457795473be3e031e481355a2dfc104887e5f6ef53aba151549212b190eecec6bbfd9899582300b4009275f1eeb446d195667353f1e3d0f887832b7b44d17
data/assets.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |gem|
4
4
  gem.name = 'mbj-assets'
5
- gem.version = '0.0.3'
5
+ gem.version = '0.0.4'
6
6
  gem.authors = [ 'Markus Schirp' ]
7
7
  gem.email = [ 'mbj@schirp-dso.com' ]
8
8
  gem.description = 'Playground for a small assets system'
@@ -18,14 +18,13 @@ module Assets
18
18
 
19
19
  # Call handler
20
20
  #
21
- # @param [Application] application
22
21
  # @param [Request] request
23
22
  #
24
23
  # @return [Response]
25
24
  #
26
25
  # @api private
27
26
  #
28
- def call(_application, request)
27
+ def call(request)
29
28
  name = request.path_info.gsub(prefix, '')
30
29
  asset = environment.get(name)
31
30
  if asset
data/lib/assets/mime.rb CHANGED
@@ -44,7 +44,7 @@ module Assets
44
44
  extname(::File.extname(name))
45
45
  end
46
46
 
47
- # Instantiate object
47
+ # Instantiate object
48
48
  #
49
49
  # @return [Mime]
50
50
  #
@@ -70,6 +70,7 @@ module Assets
70
70
  JAVASCRIPT = new('.js', 'application/javascript; charset=UTF-8' )
71
71
  COFFEESCRIPT = new('.coffee', 'application/coffeescript; charset=UTF-8' )
72
72
  SASS = new('.sass', 'text/plain; charset=UTF-8' )
73
+ SCSS = new('.scss', 'text/plain; charset=UTF-8' )
73
74
  HTML = new('.html', 'text/html; charset=UTF-8' )
74
75
 
75
76
  IMAGES = [
@@ -22,6 +22,23 @@ module Assets
22
22
 
23
23
  end # Sass
24
24
 
25
+ # Compiler for sass
26
+ #
27
+ class Scss < self
28
+ handle(Mime::SCSS)
29
+
30
+ # Return body
31
+ #
32
+ # @return [String]
33
+ #
34
+ # @api private
35
+ #
36
+ def body
37
+ ::Sass.compile(input.body, :syntax => :scss)
38
+ end
39
+
40
+ end # Sass
41
+
25
42
  end # Css
26
43
  end # Compile
27
44
  end # Rule
@@ -9,11 +9,11 @@ describe Assets, 'and spiking around' do
9
9
  let(:repository) do
10
10
  Assets::Repository::Directory.new(root)
11
11
  end
12
-
12
+
13
13
  let(:fonts) do
14
14
  repository.file('fonts.css')
15
15
  end
16
-
16
+
17
17
  let(:application) do
18
18
  repository.compile('application.sass')
19
19
  end
@@ -47,8 +47,8 @@ describe Assets, 'and spiking around' do
47
47
  Request::Rack.new({'PATH_INFO' => path_info}.merge(extra_hash))
48
48
  end
49
49
 
50
- subject do
51
- server.call(application, request)
50
+ subject do
51
+ server.call(request)
52
52
  end
53
53
 
54
54
  def strip_indentation(text)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mbj-assets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Markus Schirp
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-03 00:00:00.000000000 Z
11
+ date: 2013-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: adamantium