mbj-assets 0.0.6 → 0.0.7

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: 79d1542ef2aed78690af3be9cfdd925ab50bb4eb
4
- data.tar.gz: 27dc15a635cec56b509af19cd91767005a2e84ee
3
+ metadata.gz: 554c3d288ae97464363efe96b589accaf9f8ad5c
4
+ data.tar.gz: dd28a39ddc92b708cdddb26df749891adf3d3bbb
5
5
  SHA512:
6
- metadata.gz: db9f17a77b914750ccf744e526dddf0cddcf5bdf0af4d4f2335367673ca1568517979fad9b8ce4e5e1af61da5b15ca11bc1b84ce1d52ca6fbfcc0490e9b5c2eb
7
- data.tar.gz: d5c967f2655042e3cae778fc45d44ab9fd801b5946b193725ce4ff63a2096b7c18d4dd068fb4e2f66de3978c2380ebbfcc0fc9126d64b95614120d8e82b768ed
6
+ metadata.gz: d677bf86629f8a0793adf5caaad4584468b1fc875b500f42d7381f405f71678aac250e31afc14eb828cf3239eb120d1586cf3e8e4cfd2d0036ccb0fb4d2a5ad7
7
+ data.tar.gz: 297f9dd34fc8cad8dc141e56e3a4b143782a329e9652cd9086eb69c45c9800564d844aad7812fc39dffa5e891649c31d587f935651326bc99d2ca2b00373ad39
data/assets.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |gem|
4
4
  gem.name = 'mbj-assets'
5
- gem.version = '0.0.6'
5
+ gem.version = '0.0.7'
6
6
  gem.authors = [ 'Markus Schirp' ]
7
7
  gem.email = [ 'mbj@schirp-dso.com' ]
8
8
  gem.description = 'Playground for a small assets system'
data/config/flay.yml CHANGED
@@ -1,3 +1,3 @@
1
1
  ---
2
2
  threshold: 15
3
- total_score: 119
3
+ total_score: 125
data/config/reek.yml CHANGED
@@ -14,6 +14,7 @@ TooManyMethods:
14
14
  max_instance_variables: 3
15
15
  UncommunicativeMethodName:
16
16
  accept:
17
+ - utf8
17
18
  - sha1
18
19
  exclude: []
19
20
  enabled: true
@@ -29,7 +30,8 @@ LongParameterList:
29
30
  FeatureEnvy:
30
31
  exclude:
31
32
  - Assets::Environment::Cache#miss # False positive
32
- - Assets::Rule#binary # False positive
33
+ - Assets::Rule#binary # Helper method
34
+ - Assets::Rule#utf8 # Helper method
33
35
  enabled: true
34
36
  ClassVariable:
35
37
  exclude: []
@@ -65,6 +67,7 @@ UtilityFunction:
65
67
  max_helper_calls: 0
66
68
  exclude:
67
69
  - Assets::Rule#binary # Okay
70
+ - Assets::Rule#utf8 # Okay
68
71
  enabled: true
69
72
  Attribute:
70
73
  exclude: []
@@ -14,7 +14,7 @@ module Assets
14
14
  # @api private
15
15
  #
16
16
  def body
17
- binary(::CoffeeScript.compile(input.body))
17
+ binary(::CoffeeScript.compile(utf8(input.body)))
18
18
  end
19
19
 
20
20
  end # Coffeescript
data/lib/assets/rule.rb CHANGED
@@ -67,6 +67,18 @@ module Assets
67
67
 
68
68
  private
69
69
 
70
+ # Helper method to tag strings as utf-8
71
+ #
72
+ # @param [String]
73
+ #
74
+ # @return [String]
75
+ #
76
+ # @api private
77
+ #
78
+ def utf8(string)
79
+ string.force_encoding(Encoding::UTF_8)
80
+ end
81
+
70
82
  # Helper method to tag strings as binary
71
83
  #
72
84
  # @param [String]
@@ -1 +1,2 @@
1
1
  alert "Hello World"
2
+ alert "UTF-8 fun: ä"
@@ -107,6 +107,8 @@ describe Assets, 'and spiking around' do
107
107
  (function() {
108
108
  alert("Hello World");
109
109
 
110
+ alert("UTF-8 fun: ä");
111
+
110
112
  }).call(this);
111
113
  JAVASCRIPT
112
114
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mbj-assets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Markus Schirp
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-13 00:00:00.000000000 Z
11
+ date: 2013-08-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: adamantium