embork 0.0.8 → 0.0.9

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: 3601ba735e6ca6473e75e8987200bfd24c56a428
4
- data.tar.gz: 52878fbe207f278500f905f2b4c1fe6db7e72bc3
3
+ metadata.gz: c7a3dc2d7ad2150b084ce2c27a7e5614499960e0
4
+ data.tar.gz: d6393eb0b361c354101b206c108c01e551f7c47b
5
5
  SHA512:
6
- metadata.gz: 680565e48196a2eaed41fe6f00f459dd330fafa83eac875059727556998adecc28a6ad75bcdea2fc159ad1b679f38d156e496409a3578200bfc72fae0b4d18a8
7
- data.tar.gz: 4e09a75b8efb8f1ae1e178e3ebdd1be858cf5ca6f96617149538e7b75c943b1c3fe4af15c4d844172c3ba86740e6fbaad1e19ba7d1f097b8b7a71a76be429efc
6
+ metadata.gz: 97a58839b957d3488104b7580f95c6f0a8ea8920d1ffb8ae7ab3b34915fbb87c856aac37facc60a60cdbc3e3d925e25ec3a11cc67ac78fbd3cd4263114cf9861
7
+ data.tar.gz: d8a0cdb1aeae8f8f8fbf21ab3e92ebf40c445bf0beede16f25774c64e974234f802e97383ec7c6f68010c2cc1e79e4085f69acc6558ec53d2ad7ee83b57dd119
@@ -0,0 +1,8 @@
1
+ # 0.0.9
2
+ - Change every instance of 'bundled_version' to 'bundle_version' for
3
+ consistency.
4
+ - Add an extension class for external apps that may need erb helpers.
5
+
6
+ # 0.0.8
7
+ - Bump phrender version to 0.0.4
8
+ - Update bower depends in blueprint. Resolver and loader go up a version
@@ -21,7 +21,7 @@ class Embork::Builder
21
21
  @version = Time.now.to_s.gsub(/( -|-| |:)/, '.')
22
22
 
23
23
  @sprockets_environment.context_class.use_bundled_assets = true
24
- @sprockets_environment.context_class.bundled_version = @version
24
+ @sprockets_environment.context_class.bundle_version = @version
25
25
 
26
26
  Dir.chdir @project_root do
27
27
  config_path = File.join 'config', Embork.env.to_s
@@ -0,0 +1,25 @@
1
+ require 'embork/sprockets/helpers'
2
+ require 'embork/borkfile'
3
+
4
+ class Embork::Extension
5
+ def initialize(borkfile_path, bundled_assets = false, environment = nil)
6
+ @borkfile = Embork::Borkfile.new options[:borkfile], environment
7
+ @environment = environment || Embork.env || ENV['RACK_ENV']
8
+ if bundled_assets
9
+ version_file_path = File.join(@borkfile.project_root, 'build',
10
+ @environment.to_s, 'current-version')
11
+ @bundle_version = File.read(version_file_path)
12
+ @use_bundled_assets = true
13
+ end
14
+ end
15
+
16
+ def helpers
17
+ helpers = Embork::Sprockets::Helpers
18
+ if @use_bundled_assets
19
+ helpers.bundle_version = @bundle_version
20
+ helpers.use_bundled_assets = @use_bundled_assets
21
+ end
22
+ helpers
23
+ end
24
+
25
+ end
@@ -1,7 +1,7 @@
1
1
  module Embork::Sprockets::Helpers
2
2
  module ClassMethods
3
3
  attr_accessor :use_bundled_assets
4
- attr_accessor :bundled_version
4
+ attr_accessor :bundle_version
5
5
  end
6
6
 
7
7
  def javascript_include_tag(path)
@@ -30,7 +30,7 @@ module Embork::Sprockets::Helpers
30
30
 
31
31
  def build_version
32
32
  if self.class.use_bundled_assets
33
- self.class.bundled_version
33
+ self.class.bundle_version
34
34
  else
35
35
  nil
36
36
  end
@@ -69,7 +69,7 @@ module Embork::Sprockets::Helpers
69
69
  path = File.dirname path_to_file
70
70
  path = nil if path == '.'
71
71
 
72
- versioned_name = "%s-%s%s" % [ base, self.class.bundled_version, ext ]
72
+ versioned_name = "%s-%s%s" % [ base, self.class.bundle_version, ext ]
73
73
  (path.nil?) ? versioned_name : File.join(path, versioned_name)
74
74
  end
75
75
 
@@ -1,3 +1,3 @@
1
1
  class Embork
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
@@ -57,7 +57,7 @@ describe 'Embork::Sprockets::helpers' do
57
57
  context 'versioned assets' do
58
58
  before(:each) do
59
59
  context_class.class.use_bundled_assets = true
60
- context_class.class.bundled_version = '12345abcd'
60
+ context_class.class.bundle_version = '12345abcd'
61
61
  end
62
62
 
63
63
  context '#javascript_include_tag' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embork
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mina Smart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-07 00:00:00.000000000 Z
11
+ date: 2014-08-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sprockets
@@ -313,6 +313,7 @@ extensions: []
313
313
  extra_rdoc_files: []
314
314
  files:
315
315
  - ".gitignore"
316
+ - CHANGELOG.md
316
317
  - Gemfile
317
318
  - LICENSE.txt
318
319
  - README.md
@@ -368,6 +369,7 @@ files:
368
369
  - lib/embork/builder.rb
369
370
  - lib/embork/cli.rb
370
371
  - lib/embork/environment.rb
372
+ - lib/embork/extension.rb
371
373
  - lib/embork/forwarder.rb
372
374
  - lib/embork/generator.rb
373
375
  - lib/embork/logger.rb