redis_importer 1.1.6 → 1.1.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ NWVmZGMzYWQwYWExZjBlNDA4ZDBiNTM4M2I2MTVlNGEzYWY1NGI2YQ==
5
+ data.tar.gz: !binary |-
6
+ MmMzZjg0NmJkNTdiMTU3ZjZhNGE4MGQyZjM0NDQ1NTU2MjhhMzJmMQ==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ NjNiYzYxNDM1ZjA0MWRiYmYxOGYzODIwNjAwOGY0YjJmNDg4YzU4MTlkYjI3
10
+ YzczMGJhYjYwMjAwY2ZjMTE0YTYzZjk0ZGI5ZGZiOWJhYjIwODJkMjVlMTli
11
+ NzM3YWNkNTZkMmFjNjIyMzIxOTIxMGEyY2MyZjMwYzRmNGIzNDI=
12
+ data.tar.gz: !binary |-
13
+ OWE4MDUxNGViNjBmMDJhZGFmY2UxNTRhYWIzY2VlMzhiYWI5MjU5YjcyM2Rm
14
+ ZGRiMDBjOWM0ZDU5MTYxNGVkZGY2Nzc4YmM5ZGFmZGFhMDlmY2ViM2YzOGQw
15
+ ZTI2MGVjYjZhZTI0M2Q3ZTQwYTE2YzUwOGRlMjUwN2UzYmUwZDY=
data/.gitignore CHANGED
@@ -15,3 +15,4 @@ spec/reports
15
15
  test/tmp
16
16
  test/version_tmp
17
17
  .rvmrc
18
+ config/
data/lib/extensions/s3.rb CHANGED
@@ -7,7 +7,7 @@ module AWS
7
7
  # Returns the class represented by the csv file.
8
8
  # person.csv => Person
9
9
  def to_class_name
10
- self.key.gsub('.csv','').capitalize
10
+ self.key.gsub('.csv','').split('_').map { |word| word.capitalize}.join
11
11
  end
12
12
 
13
13
  # Copies the S3 Object to a local directory.
@@ -1,3 +1,3 @@
1
1
  module RedisImporter
2
- VERSION = "1.1.6"
2
+ VERSION = "1.1.7"
3
3
  end
@@ -0,0 +1,25 @@
1
+ require "spec_helper"
2
+ module AWS
3
+ module S3
4
+ describe S3Object do
5
+ before(:each) do
6
+ @s3 = S3Object.new
7
+ end
8
+ describe "to_class_name" do
9
+ it "removes the .csv from the end of the name" do
10
+ @s3.stub(:key).and_return('something.csv')
11
+ @s3.to_class_name.should_not include('.csv')
12
+ end
13
+ it "capitalizes the name" do
14
+ @s3.stub(:key).and_return('lowercase.csv')
15
+ @s3.to_class_name.start_with?('l').should eq false
16
+ @s3.to_class_name.start_with?('L').should eq true
17
+ end
18
+ it "converts snake_case to CamelCase" do
19
+ @s3.stub(:key).and_return('multi_word_class.csv')
20
+ @s3.to_class_name.should eq 'MultiWordClass'
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
@@ -1,5 +1,6 @@
1
1
  require "spec_helper"
2
2
  require 'redis_backed_model'
3
+ require 'yaml'
3
4
  require_relative '../test/lib/person.rb'
4
5
 
5
6
  describe RedisImporter do
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redis_importer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.6
5
- prerelease:
4
+ version: 1.1.7
6
5
  platform: ruby
7
6
  authors:
8
7
  - Ian Whitney
@@ -10,12 +9,11 @@ authors:
10
9
  autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2013-04-24 00:00:00.000000000 Z
12
+ date: 2013-10-21 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: rspec
17
16
  requirement: !ruby/object:Gem::Requirement
18
- none: false
19
17
  requirements:
20
18
  - - ! '>='
21
19
  - !ruby/object:Gem::Version
@@ -23,7 +21,6 @@ dependencies:
23
21
  type: :development
24
22
  prerelease: false
25
23
  version_requirements: !ruby/object:Gem::Requirement
26
- none: false
27
24
  requirements:
28
25
  - - ! '>='
29
26
  - !ruby/object:Gem::Version
@@ -31,7 +28,6 @@ dependencies:
31
28
  - !ruby/object:Gem::Dependency
32
29
  name: redis_backed_model
33
30
  requirement: !ruby/object:Gem::Requirement
34
- none: false
35
31
  requirements:
36
32
  - - ~>
37
33
  - !ruby/object:Gem::Version
@@ -39,7 +35,6 @@ dependencies:
39
35
  type: :development
40
36
  prerelease: false
41
37
  version_requirements: !ruby/object:Gem::Requirement
42
- none: false
43
38
  requirements:
44
39
  - - ~>
45
40
  - !ruby/object:Gem::Version
@@ -47,7 +42,6 @@ dependencies:
47
42
  - !ruby/object:Gem::Dependency
48
43
  name: gem_configurator
49
44
  requirement: !ruby/object:Gem::Requirement
50
- none: false
51
45
  requirements:
52
46
  - - ~>
53
47
  - !ruby/object:Gem::Version
@@ -55,7 +49,6 @@ dependencies:
55
49
  type: :runtime
56
50
  prerelease: false
57
51
  version_requirements: !ruby/object:Gem::Requirement
58
- none: false
59
52
  requirements:
60
53
  - - ~>
61
54
  - !ruby/object:Gem::Version
@@ -63,7 +56,6 @@ dependencies:
63
56
  - !ruby/object:Gem::Dependency
64
57
  name: csv_to_object
65
58
  requirement: !ruby/object:Gem::Requirement
66
- none: false
67
59
  requirements:
68
60
  - - ~>
69
61
  - !ruby/object:Gem::Version
@@ -71,7 +63,6 @@ dependencies:
71
63
  type: :runtime
72
64
  prerelease: false
73
65
  version_requirements: !ruby/object:Gem::Requirement
74
- none: false
75
66
  requirements:
76
67
  - - ~>
77
68
  - !ruby/object:Gem::Version
@@ -79,7 +70,6 @@ dependencies:
79
70
  - !ruby/object:Gem::Dependency
80
71
  name: redis_pipeline
81
72
  requirement: !ruby/object:Gem::Requirement
82
- none: false
83
73
  requirements:
84
74
  - - ~>
85
75
  - !ruby/object:Gem::Version
@@ -87,7 +77,6 @@ dependencies:
87
77
  type: :runtime
88
78
  prerelease: false
89
79
  version_requirements: !ruby/object:Gem::Requirement
90
- none: false
91
80
  requirements:
92
81
  - - ~>
93
82
  - !ruby/object:Gem::Version
@@ -95,7 +84,6 @@ dependencies:
95
84
  - !ruby/object:Gem::Dependency
96
85
  name: aws-s3
97
86
  requirement: !ruby/object:Gem::Requirement
98
- none: false
99
87
  requirements:
100
88
  - - ~>
101
89
  - !ruby/object:Gem::Version
@@ -103,7 +91,6 @@ dependencies:
103
91
  type: :runtime
104
92
  prerelease: false
105
93
  version_requirements: !ruby/object:Gem::Requirement
106
- none: false
107
94
  requirements:
108
95
  - - ~>
109
96
  - !ruby/object:Gem::Version
@@ -136,6 +123,7 @@ files:
136
123
  - lib/redis_importer/tasks.rb
137
124
  - lib/redis_importer/version.rb
138
125
  - redis_importer.gemspec
126
+ - spec/extensions/s3_spec.rb
139
127
  - spec/redis_importer_spec.rb
140
128
  - spec/spec_helper.rb
141
129
  - test/csv/foo.csv
@@ -144,29 +132,29 @@ files:
144
132
  - tmp/.gitignore
145
133
  homepage: https://github.com/SeniorServiceAmerica/redis_importer
146
134
  licenses: []
135
+ metadata: {}
147
136
  post_install_message:
148
137
  rdoc_options: []
149
138
  require_paths:
150
139
  - lib
151
140
  required_ruby_version: !ruby/object:Gem::Requirement
152
- none: false
153
141
  requirements:
154
142
  - - ! '>='
155
143
  - !ruby/object:Gem::Version
156
144
  version: '0'
157
145
  required_rubygems_version: !ruby/object:Gem::Requirement
158
- none: false
159
146
  requirements:
160
147
  - - ! '>='
161
148
  - !ruby/object:Gem::Version
162
149
  version: '0'
163
150
  requirements: []
164
151
  rubyforge_project:
165
- rubygems_version: 1.8.24
152
+ rubygems_version: 2.1.3
166
153
  signing_key:
167
- specification_version: 3
154
+ specification_version: 4
168
155
  summary: Creates objects, converts them to Redis commands and executes the redis commands.
169
156
  test_files:
157
+ - spec/extensions/s3_spec.rb
170
158
  - spec/redis_importer_spec.rb
171
159
  - spec/spec_helper.rb
172
160
  - test/csv/foo.csv