ramaze-asset 0.2 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -221,7 +221,8 @@ module Ramaze
221
221
  end
222
222
 
223
223
  ##
224
- # Loads the given asset group.
224
+ # Loads the given asset group. The first parameter is the name of the
225
+ # group to load, all additional parameters will be passed to the block.
225
226
  #
226
227
  # @example
227
228
  # env = Ramaze::Asset::AssetManager.new(:cache_path => '...')
@@ -237,7 +238,7 @@ module Ramaze
237
238
  # @param [Symbol] name The name of the asset group to load.
238
239
  # @yield self
239
240
  #
240
- def load_asset_group(name)
241
+ def load_asset_group(name, *args)
241
242
  name = name.to_sym unless name.is_a?(Symbol)
242
243
 
243
244
  if !@asset_groups.key?(name)
@@ -247,7 +248,7 @@ module Ramaze
247
248
  )
248
249
  end
249
250
 
250
- @asset_groups[name].call(self)
251
+ @asset_groups[name].call(self, *args)
251
252
  end
252
253
 
253
254
  ##
@@ -1,5 +1,5 @@
1
1
  module Ramaze
2
2
  module Asset
3
- Version = '0.2'
3
+ Version = '0.2.1'
4
4
  end # Asset
5
5
  end # Ramaze
@@ -5,7 +5,7 @@ path = File.expand_path('../', __FILE__)
5
5
  Gem::Specification.new do |s|
6
6
  s.name = 'ramaze-asset'
7
7
  s.version = Ramaze::Asset::Version
8
- s.date = '2011-09-11'
8
+ s.date = '2011-09-14'
9
9
  s.authors = ['Yorick Peterse']
10
10
  s.email = 'yorickpeterse@gmail.com'
11
11
  s.summary = 'A simple yet powerful asset manager for Ramaze.'
@@ -130,14 +130,16 @@ describe('Ramaze::Asset::Environment') do
130
130
  end
131
131
 
132
132
  it('Add an asset group and load it') do
133
- SpecEnv.register_asset_group(:spec) do |env|
133
+ SpecEnv.register_asset_group(:spec) do |env, number|
134
134
  env.serve(:css, ['css/github', 'css/reset'])
135
+
136
+ number.should === 10
135
137
  end
136
138
 
137
139
  SpecEnv.files[:css].nil?.should === true
138
140
 
139
141
  should.not.raise?(Ramaze::Asset::AssetError) do
140
- SpecEnv.load_asset_group(:spec)
142
+ SpecEnv.load_asset_group(:spec, 10)
141
143
  end
142
144
 
143
145
  files = SpecEnv.files[:css][:global][:__all][0].files
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ramaze-asset
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.2'
4
+ version: 0.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,12 +9,12 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-09-11 00:00:00.000000000 +02:00
12
+ date: 2011-09-14 00:00:00.000000000 +02:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: ramaze
17
- requirement: &2153380940 !ruby/object:Gem::Requirement
17
+ requirement: &2156392100 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: 2011.07.25
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *2153380940
25
+ version_requirements: *2156392100
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: rake
28
- requirement: &2153411880 !ruby/object:Gem::Requirement
28
+ requirement: &2156391580 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ! '>='
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: 0.9.2
34
34
  type: :development
35
35
  prerelease: false
36
- version_requirements: *2153411880
36
+ version_requirements: *2156391580
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: yard
39
- requirement: &2153411400 !ruby/object:Gem::Requirement
39
+ requirement: &2156391100 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ! '>='
@@ -44,10 +44,10 @@ dependencies:
44
44
  version: 0.7.2
45
45
  type: :development
46
46
  prerelease: false
47
- version_requirements: *2153411400
47
+ version_requirements: *2156391100
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: bacon
50
- requirement: &2153410920 !ruby/object:Gem::Requirement
50
+ requirement: &2156390620 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ! '>='
@@ -55,10 +55,10 @@ dependencies:
55
55
  version: 1.1.0
56
56
  type: :development
57
57
  prerelease: false
58
- version_requirements: *2153410920
58
+ version_requirements: *2156390620
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: rdiscount
61
- requirement: &2153410440 !ruby/object:Gem::Requirement
61
+ requirement: &2156390140 !ruby/object:Gem::Requirement
62
62
  none: false
63
63
  requirements:
64
64
  - - ! '>='
@@ -66,10 +66,10 @@ dependencies:
66
66
  version: 1.6.8
67
67
  type: :development
68
68
  prerelease: false
69
- version_requirements: *2153410440
69
+ version_requirements: *2156390140
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: rack-test
72
- requirement: &2153409960 !ruby/object:Gem::Requirement
72
+ requirement: &2156389660 !ruby/object:Gem::Requirement
73
73
  none: false
74
74
  requirements:
75
75
  - - ! '>='
@@ -77,7 +77,7 @@ dependencies:
77
77
  version: 0.6.1
78
78
  type: :development
79
79
  prerelease: false
80
- version_requirements: *2153409960
80
+ version_requirements: *2156389660
81
81
  description: A simple yet powerful asset manager for Ramaze.
82
82
  email: yorickpeterse@gmail.com
83
83
  executables: []