jbundle 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/jbundle.rb +1 -1
- data/lib/jbundle/command_line.rb +1 -1
- data/lib/jbundle/version.rb +1 -1
- data/spec/jbundle_spec.rb +4 -0
- metadata +1 -1
data/lib/jbundle.rb
CHANGED
@@ -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.
|
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
|
data/lib/jbundle/command_line.rb
CHANGED
@@ -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.
|
32
|
+
say "- /#{f.original_name}", :green
|
33
33
|
end
|
34
34
|
|
35
35
|
handler = Rack::Handler.default
|
data/lib/jbundle/version.rb
CHANGED
data/spec/jbundle_spec.rb
CHANGED
@@ -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',
|