effective_developer 0.4.9 → 0.4.10
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7312a0f619e59947e286c54a5bfd67f0998da54fa2aa14eb986fdcbaf96b7cf7
|
4
|
+
data.tar.gz: a8db2a374558db05f3d1294ef2c0df57888c7722db577cf5b4b2c9d09e4619b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cce595a567d259e29e9c6292621fefea2d65aa43e2daf586b7799c404c899dc13e17433147d54b72c410149f10003959b340e675d22fca935f0d20ea61de9d2f
|
7
|
+
data.tar.gz: 7172b1c16a95654c491b5bfa04aef87dedf8c86b6b21f28de8c9a4541071aa0557681c1f63daf4d1d75ab60c22515fbc6c69a55eb325b4e7ee4ef60b014a0f69
|
data/README.md
CHANGED
@@ -186,7 +186,7 @@ rake csv:import:foos
|
|
186
186
|
|
187
187
|
## csv:import::scaffold
|
188
188
|
|
189
|
-
Scaffolds an `Effective::
|
189
|
+
Scaffolds an `Effective::CsvImporter` file for each .csv file in `/lib/csv_importers/data/*.csv`
|
190
190
|
|
191
191
|
```ruby
|
192
192
|
rake csv:scaffold
|
@@ -278,7 +278,7 @@ rake validate[post]
|
|
278
278
|
|
279
279
|
## CSV Importer
|
280
280
|
|
281
|
-
Extend a class from `Effective::
|
281
|
+
Extend a class from `Effective::CsvImporter` to quickly build a csv importer.
|
282
282
|
|
283
283
|
Put your importer in `lib/csv_importers/users_importer.rb` and the data in `lib/csv_importers/data/users.csv`. Both filenames should be pluralized.
|
284
284
|
|
@@ -299,7 +299,7 @@ Inside the script, there are a few helpful functions:
|
|
299
299
|
|
300
300
|
```ruby
|
301
301
|
module CsvImporters
|
302
|
-
class UsersImporter < Effective::
|
302
|
+
class UsersImporter < Effective::CsvImporter
|
303
303
|
def columns
|
304
304
|
{
|
305
305
|
email: A,
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module CsvImporters
|
2
|
-
class <%= klass %>Importer < Effective::
|
2
|
+
class <%= klass %>Importer < Effective::CsvImporter
|
3
3
|
def columns
|
4
4
|
{<% columns.each_with_index do |column, index| %>
|
5
5
|
<%= column.to_s.underscore.tap { |name| [' ', '/', '(', ')', '__'].each { |str| name.gsub!(str, '_') } }.to_sym %>: <%= (letters[index] || index) %><%= ',' unless (index+1) == columns.length %><% end %>
|
@@ -51,7 +51,7 @@ namespace :csv do
|
|
51
51
|
|
52
52
|
# rake csv:scaffold
|
53
53
|
# rake csv:scaffold[users]
|
54
|
-
desc 'Scaffold an Effective::
|
54
|
+
desc 'Scaffold an Effective::CsvImporter for each /lib/csv_importers/data/*.csv file, defaults to all'
|
55
55
|
|
56
56
|
task :scaffold, [:file_name] => :environment do |t, args|
|
57
57
|
args.with_defaults(file_name: 'all')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_developer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|