sprockets-nyny 0.0.1 → 0.0.2

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: 21fcc10ddc5e3d1da49460047294549b06742a43
4
- data.tar.gz: b263b63cc69267c05e22198a337090f81bd89a2e
3
+ metadata.gz: ab77b4dd13afa8ffa9742c61b897271c79b2c142
4
+ data.tar.gz: 0cd3f17eb87bf0dddcdefabebd220021dd7dcc82
5
5
  SHA512:
6
- metadata.gz: 3ba563e35d7ef562c49040a2e83b0439135ebef2d05abf399df3d5ee851a83f2b6e46c23073b09942d26b1da2b794acbf6681a341904be4d3cf4fb624eb86bac
7
- data.tar.gz: 2750e6e3a4ca434acc9384e8155216ba56ded6755bc510e803d05b87c564b8a8790549c3db521fabf4a3bc48773358e3d0aa7b754d5a2df83bc06efe04384c7b
6
+ metadata.gz: b8f2c86711e87a0f3d1f44834f55d3ba7b311e0bef1eda5ee3c53d35b7ce5e5c491f18bf3e8995f742d9244c682af16be4e38a2fa30db02112610c22f136cb24
7
+ data.tar.gz: a1c8b468abee1f6b882388b73189d65e1a3f0cd34f557902a2dfb01ca1eae79293d2158fc5a169cb3b26ff90f2027bfb3552a7f265b50ef6202f8bbb2e316a69
@@ -2,21 +2,6 @@ require 'rack'
2
2
  require 'sprockets/nyny/version'
3
3
  require 'sprockets/nyny/builder'
4
4
 
5
- module Rack
6
- class Builder
7
- #1.6 backport
8
- def warmup(prc=nil, &block)
9
- @warmup = prc || block
10
- end
11
-
12
- alias_method :build_app, :to_app
13
- def to_app
14
- @warmup.call if @warmup
15
- build_app
16
- end
17
- end
18
- end
19
-
20
5
  module Sprockets
21
6
  module NYNY
22
7
  def self.load_tasks app
@@ -33,9 +18,6 @@ module Sprockets
33
18
  end
34
19
 
35
20
  def self.registered app
36
- app.send :include, ActiveSupport::Configurable
37
- app.inheritable :before_run_hooks, []
38
-
39
21
  app.helpers ActionView::Helpers::AssetUrlHelper
40
22
  app.helpers ActionView::Helpers::AssetTagHelper
41
23
  app.helpers Sprockets::Rails::Helper
@@ -43,10 +25,6 @@ module Sprockets
43
25
  Builder.build_environment(app)
44
26
  Builder.build_config(app.config)
45
27
  Builder.add_hooks(app)
46
-
47
- app.builder.warmup do
48
- app.before_run_hooks.each {|h| h.call(app)}
49
- end
50
28
  end
51
29
  end
52
30
  end
@@ -5,12 +5,10 @@ module Sprockets
5
5
  class Builder
6
6
  def self.build_config config
7
7
  config.assets = ActiveSupport::OrderedOptions.new
8
- config.assets._blocks = []
9
8
  config.assets.paths = ['app/assets/javascripts',
10
9
  'app/assets/stylesheets', 'app/assets/images']
11
10
  config.assets.prefix = "/assets"
12
11
  config.assets.precompile = [/(?:\/|\\|\A)application\.(css|js)$/]
13
- config.assets.version = ""
14
12
  config.assets.debug = false
15
13
  config.assets.compile = !::NYNY.env.production?
16
14
  config.assets.digest = ::NYNY.env.production?
@@ -48,7 +46,7 @@ module Sprockets
48
46
  end
49
47
 
50
48
  def self.add_hooks app
51
- app.before_run do |app|
49
+ app.before_initialize do
52
50
  config = app.config
53
51
 
54
52
  unless config.assets.version.blank?
@@ -1,5 +1,5 @@
1
1
  module Sprockets
2
2
  module NYNY
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
@@ -21,5 +21,5 @@ Gem::Specification.new do |spec|
21
21
  spec.add_development_dependency "bundler", "~> 1.5"
22
22
  spec.add_development_dependency "rake"
23
23
  spec.add_dependency "sprockets-rails", "~> 2.0.1"
24
- spec.add_dependency "nyny", "~> 3.2.2"
24
+ spec.add_dependency "nyny", "~> 3.3.0"
25
25
  end
data/test/server.rb CHANGED
@@ -7,6 +7,9 @@ require 'sprockets/nyny'
7
7
  class App < NYNY::App
8
8
  register Sprockets::NYNY
9
9
  config.assets.precompile << 'app/assets/javascripts/application.js'
10
+ config.assets.compress = true
11
+ config.assets.js_compressor = :uglify
12
+ config.assets.css_compressor = :sass
10
13
 
11
14
  get '/' do
12
15
  render 'app/views/index.haml'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sprockets-nyny
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrei Lisnic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-03 00:00:00.000000000 Z
11
+ date: 2014-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 3.2.2
61
+ version: 3.3.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 3.2.2
68
+ version: 3.3.0
69
69
  description: Provides integration for asset pipeline into New York, New York
70
70
  email:
71
71
  - andrei.lisnic@gmail.com