shrift 0.0.4 → 0.0.5

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: 4eeb64716bacd7ebd2be22289e269471ea84fd76
4
- data.tar.gz: 2001efc7af69da9a1d9ab02db1e25375ccafa3c8
3
+ metadata.gz: a2d32acbea26a704d92f24204e11d28e59223ff7
4
+ data.tar.gz: a6e90a56e402097bb90732324de9203837f5141c
5
5
  SHA512:
6
- metadata.gz: 4c8a8a1312e5e394d28f20df2c9f291897a182de3f9eeefab1c8b296995bbf2817c8dd0406f80c20f0cfc3158b376bb8e2f0cf7fc285984d43bb437fa3b10633
7
- data.tar.gz: 9435ca091a66943d39cd4543980f5fa3228e501429d8e8b916f53473c89fc380c74009fa023c9c35e244e19bf0d89e692be1e76d9d0659974bf882c019dc0ba2
6
+ metadata.gz: bd14d9d9b3dbe23a4ef32aa6cfd1f30938e210a22e91639e5b36a65a786bdef00020b59a85ed5f1092a5365d241e54b230298e4e1858afed8cbf95235373054b
7
+ data.tar.gz: 9a708daac62c349b178db3d7860bb90ec33d041e4305e7971becb2d8c745b21472216aca6544e4a7520795d764f5b4d2e5feee4304b797117afa87c01368731c
data/.rubocop.yml CHANGED
@@ -19,5 +19,5 @@ Style/SpaceInsideHashLiteralBraces:
19
19
  Style/IndentHash:
20
20
  Enabled: false
21
21
 
22
- Style/MethodLength:
22
+ Metrics/MethodLength:
23
23
  Enabled: false
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- shrift (0.0.4)
4
+ shrift (0.0.5)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -66,4 +66,4 @@ DEPENDENCIES
66
66
  yamlable
67
67
 
68
68
  BUNDLED WITH
69
- 1.12.3
69
+ 1.12.5
@@ -0,0 +1,5 @@
1
+ require_relative('shrift_cell')
2
+
3
+ # ShriftCell that is a static factory method.
4
+ class ShriftFactory < ShriftCell
5
+ end
@@ -35,12 +35,7 @@ class ShriftMap
35
35
  end
36
36
 
37
37
  def self.to_shrift_map_string(hash)
38
- shrift_map_string = ''
39
- hash.each do |key, val|
40
- shrift_map_string << key.to_s
41
- shrift_map_string << val.to_s
42
- end
43
- shrift_map_string
38
+ hash.map { |key, val| "#{key}#{val}" }.join
44
39
  end
45
40
 
46
41
  private
@@ -18,11 +18,7 @@ class ShriftMapper
18
18
  end
19
19
 
20
20
  def parse(shrift_map_string)
21
- hash = {}
22
- ShriftMap.new(shrift_map_string).schema.each do |key, val|
23
- hash[@schema[key]] = val
24
- end
25
- hash
21
+ Hash[ShriftMap.new(shrift_map_string).schema.map { |key, val| [@schema[key], val] }]
26
22
  end
27
23
 
28
24
  def to_hash
@@ -1,3 +1,3 @@
1
1
  class ShriftVersion
2
- VERSION = '0.0.4'.freeze
2
+ VERSION = '0.0.5'.freeze
3
3
  end
data/lib/shrift.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require 'shrift/shrift_cell'
2
+ require 'shrift/shrift_factory'
2
3
  require 'shrift/shrift_int'
3
4
  require 'shrift/shrift_map'
4
5
  require 'shrift/shrift_mapper'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shrift
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Folkengine
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-06-05 00:00:00.000000000 Z
11
+ date: 2016-07-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -56,6 +56,7 @@ files:
56
56
  - lib/shrift.rb
57
57
  - lib/shrift/shrift_cell.rb
58
58
  - lib/shrift/shrift_exception.rb
59
+ - lib/shrift/shrift_factory.rb
59
60
  - lib/shrift/shrift_int.rb
60
61
  - lib/shrift/shrift_map.rb
61
62
  - lib/shrift/shrift_mapper.rb