s3_website 2.1.15 → 2.1.16

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: e0aa2ec3f293a6f73f76adf5c6509588438b47a6
4
- data.tar.gz: 28eb160ca8aaaefaf627ca96e951b7b453a4bb40
3
+ metadata.gz: ed15b1ca2ef35ae9db46ac7fb1fe4551ab935457
4
+ data.tar.gz: 2dd43e7bcf6708f25e6ebd178cf91d96777cf244
5
5
  SHA512:
6
- metadata.gz: 75dd879fea4dbc4edce2c5971f04645b0190d6cc7e219ce9440f4f25bfdc65c7094bd761d3c14ebb6337a34c13bf4eb6daa864e29d019c891b6bd82d02aec00c
7
- data.tar.gz: d500de7ae40afadaad2b1307e653fff11db6928b1b8b2f05a5ba2f6b295163b5101d82f3d8dbf0573ec504f247b8dbd7ae1777c7f3e658922024acaf57e065d8
6
+ metadata.gz: 9e94858d9c5de224370e6b91ec88f3eefa62e5662e084ff0ab3e3d8de9bc7162017f050ea7cd00d899265bec303f3d8875f4ad9d78a5bc8f78dde128a5e0dcaf
7
+ data.tar.gz: 99614f6a9649063480a9227a06429ed602eecc6bcedfbaa7eb0b695686a823bbc7c663a4298354a3f2fb4be438ed46359810d75722acbf0642d104d286f042df
data/changelog.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  This project uses [Semantic Versioning](http://semver.org).
4
4
 
5
+ ## 2.1.16
6
+
7
+ * Support non-US-ASCII files when using `ignore_on_server`
8
+
9
+ Fixes https://github.com/laurilehmijoki/s3_website/issues/102
10
+
5
11
  ## 2.1.15
6
12
 
7
13
  * Support non-US-ASCII files when using `max_age`
@@ -1,3 +1,3 @@
1
1
  module S3Website
2
- VERSION = '2.1.15'
2
+ VERSION = '2.1.16'
3
3
  end
@@ -1 +1 @@
1
- d4d98d22a6c83995064859d4f0cc86ad
1
+ 10b4bf761facfdfd43d16cb3131f922b
@@ -3,10 +3,12 @@ package s3.website
3
3
  object Ruby {
4
4
  lazy val rubyRuntime = org.jruby.Ruby.newInstance() // Instantiate heavy object
5
5
 
6
- def rubyRegexMatches(text: String, regex: String) =
7
- rubyRuntime.evalScriptlet(
8
- s"""
9
- !!Regexp.new('$regex').match('$text') # Use !! to force a boolean conversion
10
- """
11
- ).toJava(classOf[Boolean]).asInstanceOf[Boolean]
6
+ def rubyRegexMatches(text: String, regex: String) = {
7
+ val z = rubyRuntime.evalScriptlet(
8
+ s"""# encoding: utf-8
9
+ !!Regexp.new('$regex').match('$text')"""
10
+ )
11
+ z.toJava(classOf[Boolean]).asInstanceOf[Boolean]
12
+ }
13
+
12
14
  }
@@ -157,7 +157,7 @@ object Config {
157
157
  def erbEval(erbString: String, yamlConfigPath: String): Try[String] = Try {
158
158
  val erbStringWithoutComments = erbString.replaceAll("^\\s*#.*", "")
159
159
  rubyRuntime.evalScriptlet(
160
- s"""
160
+ s"""|# encoding: utf-8
161
161
  |require 'erb'
162
162
  |
163
163
  |str = <<-ERBSTR
@@ -338,6 +338,13 @@ class S3WebsiteSpec extends Specification {
338
338
  push
339
339
  noDeletesOccurred must beTrue
340
340
  }
341
+
342
+ "support non-US-ASCII files" in new AllInSameDirectory with EmptySite with MockAWS with DefaultRunMode {
343
+ setS3Files(S3File("tags/笔记/test.html", ""))
344
+ config = "ignore_on_server: tags/笔记/test.html"
345
+ push
346
+ noDeletesOccurred must beTrue
347
+ }
341
348
  }
342
349
 
343
350
  """
@@ -354,6 +361,16 @@ class S3WebsiteSpec extends Specification {
354
361
  push
355
362
  noDeletesOccurred must beTrue
356
363
  }
364
+
365
+ "support non-US-ASCII files" in new AllInSameDirectory with EmptySite with MockAWS with DefaultRunMode {
366
+ setS3Files(S3File("tags/笔记/test.html", ""))
367
+ config = """
368
+ |ignore_on_server:
369
+ | - tags/笔记/test.html
370
+ """.stripMargin
371
+ push
372
+ noDeletesOccurred must beTrue
373
+ }
357
374
  }
358
375
 
359
376
  "max-age in config" can {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: s3_website
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.15
4
+ version: 2.1.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lauri Lehmijoki
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-30 00:00:00.000000000 Z
11
+ date: 2014-07-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor