jbundle 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -50,7 +50,7 @@ module JBundle
50
50
  end
51
51
 
52
52
  def build(name)
53
- found = config.bundles_and_files.detect {|f| f.name == name}
53
+ found = config.bundles_and_files.detect {|f| f.original_name == name}
54
54
  raise NoBundleError, "No bundle or file found with name #{name}" unless found
55
55
  Builder.new(config).build_one found
56
56
  end
@@ -29,7 +29,7 @@ module JBundle
29
29
  JBundle.config_from_file(options[:jfile])
30
30
  say "Starting test server on http://localhost:#{options[:port]}. Available bundles:", :yellow
31
31
  JBundle.config.bundles_and_files.each do |f|
32
- say "- /#{f.name}", :green
32
+ say "- /#{f.original_name}", :green
33
33
  end
34
34
 
35
35
  handler = Rack::Handler.default
@@ -1,3 +1,3 @@
1
1
  module JBundle
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -141,6 +141,10 @@ describe 'JBundle', 'with no versioned directory and version in bundle name' do
141
141
  @written_files = JBundle.write!
142
142
  end
143
143
 
144
+ it 'should find by original name, not the interpolated version' do
145
+ JBundle.build('foo.js').should be_kind_of(JBundle::Compiler)
146
+ end
147
+
144
148
  it 'should create versioned files in dist dir, with no versioned directories' do
145
149
  @written_files.should == [
146
150
  DIST + '/foo-0.0.1.js',
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: jbundle
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.1
5
+ version: 0.1.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Ismael Celis