furoshiki 0.3.0 → 0.3.1

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: 28682823686b0e99c68d8e89e8dda278cedcbd7f
4
- data.tar.gz: 35eaf912683fd1e7f183d21cf55f998652f04348
3
+ metadata.gz: b06f70e3280753e54b88135f40c8e83a42f95d9d
4
+ data.tar.gz: 110d5572d7a5a4a18cce5a07ee194e4a36781ac3
5
5
  SHA512:
6
- metadata.gz: 98811a3dfc69cda04149f26361b3b31d7b8525bb79b7151db8bba034c88e4468e93ebff266f9472026741c27b2ca53b72179c015822bee0c16461b5060aa4cc0
7
- data.tar.gz: dec72fe9319649dfb226b22946b3bb2678443b0e83a8f39411e02b346d4d805c639d22d69b9fc678eb7aa931d78b89606deb906c12f6058e9f759e550ce88c00
6
+ metadata.gz: 004ef5299847879a64e4e21427adc2ee2cd61af23e8889ecd778a849f24a0e88399e0f2516698397f35a72a2866d79e879ea9f68041c46f838e3414c1a62aeaa
7
+ data.tar.gz: 2653762668554500ad8330d0f4e7865b53cf79230d758ddc94f8659714ca63e4b572b9af42935e38f7747a36e95e15f567a151619e6ae5e8d291a27b2a4a6985
@@ -15,7 +15,7 @@ module Furoshiki
15
15
  # after initialization, dump it with #to_hash, make your changes,
16
16
  # and instantiate a new object.
17
17
  class Configuration
18
- JAR_APP_TEMPLATE_URL = 'https://s3.amazonaws.com/net.wasnotrice.shoes/wrappers/shoes-app-template-0.0.1.zip'
18
+ JAR_APP_TEMPLATE_URL = 'https://s3.amazonaws.com/net.wasnotrice.shoes/wrappers/shoes-app-template-0.0.2.zip'
19
19
 
20
20
  include Util
21
21
 
@@ -79,10 +79,12 @@ module Furoshiki
79
79
  children = Dir.glob("#{path}/**/*") if File.directory?(path)
80
80
  [path, *children]
81
81
  end.flatten
82
- config.excludes.add FileList.new(ignore.flatten).pathmap(config.pathmaps.application.first)
83
82
  config.gem_excludes += [/^samples/, /^examples/, /^test/, /^spec/]
84
83
 
85
84
  warbler_extensions.customize(config) if warbler_extensions.respond_to? :customize
85
+
86
+ # Important this is after extensions can alter pathmaps.application
87
+ config.excludes.add FileList.new(ignore.flatten).pathmap(config.pathmaps.application.first)
86
88
  end
87
89
  end
88
90
  warbler_config
@@ -86,11 +86,11 @@ module Furoshiki
86
86
  end
87
87
 
88
88
  def template_filename
89
- "#{template_basename}#{template_extension}"
89
+ "#{template_basename}-#{latest_template_version}#{template_extension}"
90
90
  end
91
91
 
92
92
  def latest_template_version
93
- '0.0.1'
93
+ '0.0.2'
94
94
  end
95
95
 
96
96
  def download_template
@@ -158,7 +158,7 @@ module Furoshiki
158
158
  # @param [Pathname, String] jar_path the location of the JAR to inject
159
159
  def inject_jar(jar_path)
160
160
  jar_dir = tmp_app_path.join('Contents/Java')
161
- jar_dir.rmtree
161
+ jar_dir.rmtree if File.exist?(jar_dir)
162
162
  jar_dir.mkdir
163
163
  cp Pathname.new(jar_path), jar_dir
164
164
  end
@@ -1,4 +1,4 @@
1
1
  module Furoshiki
2
- VERSION = '0.3.0'
2
+ VERSION = '0.3.1'
3
3
  end
4
4
 
data/spec/app_spec.rb CHANGED
@@ -41,7 +41,9 @@ describe Furoshiki::JarApp do
41
41
  end
42
42
  end
43
43
 
44
- its(:template_path) { should eq(cache_dir.join('shoes-app-template.zip')) }
44
+ it "caches current version of template" do
45
+ expect(subject.template_path).to eq(cache_dir.join('shoes-app-template-0.0.2.zip'))
46
+ end
45
47
  its(:remote_template_url) { should eq(Furoshiki::Configuration::JAR_APP_TEMPLATE_URL) }
46
48
  end
47
49
 
@@ -2,11 +2,27 @@ require 'spec_helper'
2
2
  require 'furoshiki/configuration'
3
3
 
4
4
  describe Furoshiki::Configuration do
5
- context "defaults" do
6
- let(:config) { Furoshiki::Configuration.new }
5
+ subject(:config) { Furoshiki::Configuration.new(raw_config) }
7
6
 
8
- it "is valid" do
9
- expect(config).to be_valid
7
+ let(:raw_config) { { warbler_extensions: OtherCustomization,
8
+ ignore: "pkg" } }
9
+
10
+ class OtherCustomization < Furoshiki::WarblerExtensions
11
+ def customize(config)
12
+ # Actual behavior with shoes-package overrides the application name, so
13
+ # for testing purposes reset it here too.
14
+ config.pathmaps.application = ["shoes-app/%p"]
10
15
  end
11
16
  end
17
+
18
+ it "is valid by default" do
19
+ expect(config).to be_valid
20
+ end
21
+
22
+ it "uses correct application path for exclusions" do
23
+ raw_config[:warbler_extensions] = OtherCustomization
24
+ raw_config[:ignore] = "pkg"
25
+
26
+ expect(config.to_warbler_config.excludes).to include("shoes-app/pkg")
27
+ end
12
28
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: furoshiki
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Klabnik
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-06 00:00:00.000000000 Z
11
+ date: 2015-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement