spout 0.9.1 → 0.10.0.beta1

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: 5aa175a9c88175151e110e61d919f9b9efbab211
4
- data.tar.gz: 99f1b6074eb563c2a186b206d07357e901a54309
3
+ metadata.gz: aa9a7d6801f34e91f39a406e6c6b41b5715273fb
4
+ data.tar.gz: 62cc95026834eb9578f9b6b2f582a99cb6546c73
5
5
  SHA512:
6
- metadata.gz: 18a9e7dccef8463e1bea40ac24112b1a0e769dc4e69afd6092d2e07dc9481776d60b4ff7579fbfe1061e67c92d41f7c3bc2e5aa0194ab0778aa762bab094e9f2
7
- data.tar.gz: 1a591b187ad98b90537888ad2dccef9a20474fdc844c472aaeff3bdffba2414dd8ca2e6b438b7441eb989b966920dfe0606d8cd7f3e63a85caeead0fca168458
6
+ metadata.gz: 308b811fa460fa4676ddf8e6c8086d78a684010202d84361d9a64da5b94547d797d4b5e400d187247021932bbe2af750a33648acfa8258a2b8ff7d01ad9e0c7b
7
+ data.tar.gz: eba85e739b407e89c9fb46b8b0b732cd235bba0f5945204ad071dcd8ff771504c8aeb28d77b4bef47270c3a1373cc376257457abbd8de4e7701e671e7048599d
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## 0.10.0
2
+
3
+ ### Enhancements
4
+ - **Import Command**
5
+ - `spout import` now changes variables with all caps `display_name` to use title case instead
6
+ - Display names that use mixed case are unaffected
7
+
1
8
  ## 0.9.1 (October 14, 2014)
2
9
 
3
10
  ### Bug Fix
@@ -48,7 +48,7 @@ EOT
48
48
  hash = {}
49
49
  id = row.delete('id').to_s.downcase
50
50
  hash['id'] = id
51
- hash['display_name'] = row.delete('display_name')
51
+ hash['display_name'] = tenderize(row.delete('display_name').to_s)
52
52
  hash['description'] = row.delete('description').to_s
53
53
  hash['type'] = row.delete('type')
54
54
  domain = row.delete('domain').to_s.downcase
@@ -116,6 +116,17 @@ EOT
116
116
 
117
117
  end
118
118
 
119
+ # Converts ALL-CAPS display names to title case
120
+ # Ex: BODY MASS INDEX changes to Body Mass Index
121
+ # Ex: Patient ID stays the same as Patient ID
122
+ def tenderize(text)
123
+ if text.match(/[a-z]/)
124
+ text
125
+ else
126
+ text.downcase.gsub(/\b\w/) { $&.upcase }
127
+ end
128
+ end
129
+
119
130
  private
120
131
 
121
132
  def additional_csv_info
data/lib/spout/version.rb CHANGED
@@ -1,9 +1,9 @@
1
1
  module Spout
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
- MINOR = 9
5
- TINY = 1
6
- BUILD = nil # nil, "pre", "rc", "rc2"
4
+ MINOR = 10
5
+ TINY = 0
6
+ BUILD = "beta1" # nil, "pre", "rc", "rc2"
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY, BUILD].compact.join('.')
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spout
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.10.0.beta1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Remo Mueller
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-14 00:00:00.000000000 Z
11
+ date: 2014-10-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -181,9 +181,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
181
181
  version: '0'
182
182
  required_rubygems_version: !ruby/object:Gem::Requirement
183
183
  requirements:
184
- - - ">="
184
+ - - ">"
185
185
  - !ruby/object:Gem::Version
186
- version: '0'
186
+ version: 1.3.1
187
187
  requirements: []
188
188
  rubyforge_project:
189
189
  rubygems_version: 2.2.2