assets_include 1.0.1 → 2.0.0

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: 16379a837a2cd37d76ed90aef3810eb48aac00b2
4
- data.tar.gz: cb221271af3865278aead764a2fa5316bea42104
3
+ metadata.gz: f1895654f59b78b3e0cf7dbd5944ea202ae8e8cd
4
+ data.tar.gz: 9fb2c7b32a568b8b2d8ffaa9546bf1e07931d51c
5
5
  SHA512:
6
- metadata.gz: 377cb0699a3c618097564aa6e9e732963f48b406a507f8366b3188c514b1cdea5b479f597fa24ac09ecaa6d083b180f356b2b1d56ed6946254fbd0e2858270bc
7
- data.tar.gz: 67f5db41f550406079284989c372da930b5ea41462093648aabd6cee14d6fadf9f80f2c00c3dd7540ef153510ba7bd0fbd2e6aaf5a18601181f2c9093fb4a655
6
+ metadata.gz: 61c9c81ad3be531aa53f58f4304de33003b3ffb2eda5a8e768b2fbd166eb6df4645cd5486850e5a45f7af5e73bb75651fbef35bf11e3fcc69bd23950b5bff3a4
7
+ data.tar.gz: 27bcb09fca397d45f488180488bef958f5b7d04c04414f9954761486a49538a6920d733f3e6dcc080f4bcac5e56597aa378414f5a61d67230f34bf5c55188cb0
@@ -2,7 +2,7 @@ language: ruby
2
2
  rvm:
3
3
  - 1.9.3
4
4
  - 2.0.0
5
- - 2.1.0
5
+ - 2.1
6
6
  - rbx
7
7
  - jruby
8
8
  env:
data/History.md CHANGED
@@ -1,3 +1,8 @@
1
+ [2.0.0 / 2014-05-03](https://github.com/GoalSmashers/assets-include-ruby/compare/v2.0.0...v1.0.1)
2
+ ==================
3
+
4
+ * Changes AssetsInclude::Base to accept a hash instead of a block in initializer.
5
+
1
6
  [1.0.1 / 2014-04-27](https://github.com/GoalSmashers/assets-include-ruby/compare/v1.0.0...v1.0.1)
2
7
  ==================
3
8
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../..
3
3
  specs:
4
- assets_include (0.0.1)
4
+ assets_include (2.0.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -3,8 +3,8 @@ require 'assets_include/proxy'
3
3
  require 'assets_include/version'
4
4
 
5
5
  module AssetsInclude
6
- def self.helpers(&block)
7
- Proxy.assets = Base.new(&block)
6
+ def self.helpers(options = {})
7
+ Proxy.assets = Base.new(options)
8
8
  Proxy
9
9
  end
10
10
  end
@@ -6,13 +6,15 @@ module AssetsInclude
6
6
  attr_accessor :bundled, :asset_hosts, :root, :config, :cache_boosters
7
7
  attr_accessor :binary
8
8
 
9
- def initialize(&block)
9
+ def initialize(options = {})
10
10
  @cache = Cache.new
11
11
  @config = default_assets_location
12
12
  @bundled = production?
13
13
  @cache_boosters = true
14
14
 
15
- yield(self) if block_given?
15
+ options.each do |key, value|
16
+ public_send("#{key}=", value)
17
+ end
16
18
  end
17
19
 
18
20
  def group(locator, options = {})
@@ -1,7 +1,7 @@
1
1
  module AssetsInclude
2
- MAJOR = 1
2
+ MAJOR = 2
3
3
  MINOR = 0
4
- PATCH = 1
4
+ PATCH = 0
5
5
 
6
6
  VERSION = [MAJOR, MINOR, PATCH].join('.')
7
7
  end
@@ -29,10 +29,10 @@ describe AssetsInclude::Base do
29
29
  .with([binary, "-c #{File.join(Dir.pwd, 'assets.yml')}", group].join(' '))
30
30
  .and_return(flexmock(read: ''))
31
31
 
32
- described_class.new { |inc|
33
- inc.binary = binary
34
- inc.cache_boosters = false
35
- }.group(group)
32
+ described_class.new(
33
+ binary: binary,
34
+ cache_boosters: false
35
+ ).group(group)
36
36
  end
37
37
 
38
38
  it 'should set `cache_boosters` to true by default' do
@@ -175,17 +175,15 @@ describe AssetsInclude::Base do
175
175
  private
176
176
 
177
177
  def includer(options = {})
178
- @includer ||= described_class.new do |inc|
179
- inc.root = root
180
- inc.config = config
181
- inc.bundled = true
182
- inc.cache_boosters = false
183
- inc.binary = binary
184
-
185
- options.each do |key, value|
186
- inc.public_send("#{key}=", value)
187
- end
188
- end
178
+ defaults = {
179
+ root: root,
180
+ config: config,
181
+ bundled: true,
182
+ cache_boosters: false,
183
+ binary: binary
184
+ }
185
+
186
+ @includer ||= described_class.new(defaults.merge(options))
189
187
  end
190
188
 
191
189
  def should_run_includer_with(opts = {})
@@ -16,8 +16,8 @@ describe AssetsInclude do
16
16
  private
17
17
 
18
18
  def helpers
19
- AssetsInclude.helpers { |h|
20
- h.config = 'test.yml'
21
- }
19
+ AssetsInclude.helpers(
20
+ config: 'test.yml'
21
+ )
22
22
  end
23
23
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: assets_include
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jakub Pawlowicz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-26 00:00:00.000000000 Z
11
+ date: 2014-05-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest