tasci_merger 0.0.0 → 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +35 -21
  3. data/tasci_merger.gemspec +2 -2
  4. metadata +15 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 97e75686a322ea2d9d5550c697424ae7dd74ddbf
4
- data.tar.gz: f36602af907f096088e45bc49acc92af4a160bd2
3
+ metadata.gz: fd3e333e1f5e530dc5d787a353b3e0ca9d93b0f9
4
+ data.tar.gz: 5bf68b195adba0290cbd0342d00d7283149eb235
5
5
  SHA512:
6
- metadata.gz: 23b86daf7c2711403d6a9966c2a3a93514cbda5fa5723f7df96e715973e4dc790ed26e9f091897c475cacfd5ad269200e61edefe4b3bc7bb7bf4c3de0a5ef709
7
- data.tar.gz: c737f3f05aaccc74d094908f0d82f67395a5b071b86983d1b2ed01d32b43298e236b4fa800181f3236066bf75ef07dab814c0fe4bcbc4a823c44f90c6cb48a77
6
+ metadata.gz: 591c91f176a71103eb577b8d147cd40a2a6a20519077dde6a4b26f8c6b93c861750678e46960ae80f365d158cc0acb6ef04c06f11a5431b2052aa2e334667a18
7
+ data.tar.gz: a58b5d6d11dadf6e2685348da713c826ef91380352202864b858c3c96c5d9b6ddcf32e92657e758afd182b901fabba0bc84a1a611dee35a73c6520e14fae264c
data/README.md CHANGED
@@ -26,38 +26,52 @@
26
26
  - Open the `ssl_certs` directory, and copy the previously-downloaded `*.pem` file into this directory.
27
27
  - Close and re-open a console window.
28
28
 
29
- 4. Install required gems.
29
+ 4. Install required gem.
30
30
  - Run:
31
31
 
32
- ```
33
- gem install activesupport --no-ri --no-rdoc
34
- gem install 'tzinfo-data' --no-ri --no-rdoc
35
- ```
36
- 5. Download TASCI merger package zipfile from [Github](https://github.com/pmanko/tasci_merger) using the *Download ZIP* button.
32
+ ```
33
+ gem install tasci_merger
34
+ ```
35
+
36
+ ## Usage in IRB
37
37
 
38
- 10. Merge TASCI files.
39
- 6. Unpack to *package_directory*.
38
+ 1. Open console and run `irb` to open interactive ruby console.
40
39
 
41
- 7. Run **IRB** in *package_directory*.
42
- - Open console
43
- - Run `cd unpacked_package_directory` to navigate to package directory
44
- - Run `irb` to open interactive ruby console
40
+ 2. Run `require 'tasci_merger'`
41
+
42
+ 3. Create tasci merger object:
45
43
 
46
- 8. Load package.
47
-
48
44
  ```ruby
49
- load('./tasci_merger.rb')
45
+ tm = TasciMerger.new("SUBJECT_CODE", "TASCI_DIRECTORY", "OUTPUT_DIRECTORY")
50
46
  ```
51
- 9. Generate master file list.
47
+
48
+ 4. Create master file:
52
49
 
53
50
  ```ruby
54
- tasci_merger = ETL::TasciMerger.new
55
- tasci_merger.create_master_list("TASCI_FILE_DIRECTORY", "OUTPUT_DIRECTORY")
51
+ tm.create_master_list
56
52
  ```
57
53
 
54
+ 5. Create merged file:
55
+
58
56
  ```ruby
59
- tm.merge_files(['SUBJECT_CODE'], "MASTER_FILE_PATH", "OUTPUT_DIRECTORY", "TASCI_FILE_DIRECTORY")
57
+ tm.merge_files
60
58
  ```
61
-
62
-
63
59
 
60
+ ## Command-line Usage
61
+
62
+ The ruby gem makes the `tasci_merger` command available.
63
+
64
+ The command takes the following parameters:
65
+ - SUBJECT_CODE
66
+ - TASCI_DIRECTORY
67
+ - OUTPUT_DIRECTORY
68
+
69
+ The command creates a master file and merged file in the output directory.
70
+
71
+ **Example Usage:**
72
+
73
+ ```
74
+ tasci_merger 3441GX X:/TasciFilesFor3441GX C:/Circadian
75
+ ```
76
+
77
+ This command would create the 2 files in the `C:/Circadian` directory.
data/tasci_merger.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'tasci_merger'
3
- s.version = '0.0.0'
3
+ s.version = '0.0.1'
4
4
  s.date = '2015-02-06'
5
5
  s.summary = "Merger utility for TASCI scored sleep files."
6
6
  s.description = "Merger utility for TASCI scored sleep files, built for the Division of Sleep and Circadian Disorders at BWH."
@@ -16,6 +16,6 @@ Gem::Specification.new do |s|
16
16
  s.required_ruby_version = '>= 2.1.0'
17
17
 
18
18
  s.add_dependency "activesupport", '~> 4.2', '>= 4.2.0'
19
-
19
+ s.add_dependency "tzinfo-data"
20
20
  end
21
21
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tasci_merger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Mankowski
@@ -30,6 +30,20 @@ dependencies:
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
32
  version: 4.2.0
33
+ - !ruby/object:Gem::Dependency
34
+ name: tzinfo-data
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: '0'
40
+ type: :runtime
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
33
47
  description: Merger utility for TASCI scored sleep files, built for the Division of
34
48
  Sleep and Circadian Disorders at BWH.
35
49
  email: pmankowski@partners.org