bumblebee 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.rubocop.yml +3 -0
- data/.travis.yml +4 -6
- data/CHANGELOG.md +8 -0
- data/Gemfile.lock +2 -2
- data/bumblebee.gemspec +1 -1
- data/lib/bumblebee/template.rb +4 -2
- data/lib/bumblebee/version.rb +1 -1
- data/spec/bumblebee/bumblebee_spec.rb +1 -0
- metadata +4 -6
- data/.ruby-version +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: ed94c671e3c0de3fffbe61034b5979da771247b73055eb3989965764a549d3af
|
4
|
+
data.tar.gz: b7c8f2de14ba3320d73f35f8e6ff35a007193b3d2a72f21716b4c34c585803f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35032779d1572ac92dc76db47ee8c3d9a760b97270c73292c505b0006051bb3d72b2fc0af76585cae9c4a02d7268375cb5c26036cf76f78110d6a91d6ccdfaae
|
7
|
+
data.tar.gz: d89a47ed31790e6f8af24f0894677f9e3e0e871a0815330ad0134fb0bb43cdbac661e66308b50a17e0275b70162491b0417fb4e4dc3653796d02d5f5a014c24b
|
data/.rubocop.yml
CHANGED
data/.travis.yml
CHANGED
@@ -1,12 +1,10 @@
|
|
1
1
|
language: ruby
|
2
2
|
rvm:
|
3
|
-
- 2.3.
|
4
|
-
- 2.
|
3
|
+
- 2.3.8
|
4
|
+
- 2.4.5
|
5
|
+
- 2.5.3
|
6
|
+
- 2.6.0
|
5
7
|
cache: bundler
|
6
8
|
script:
|
7
9
|
- bundle exec rubocop
|
8
10
|
- bundle exec rspec
|
9
|
-
notifications:
|
10
|
-
hipchat:
|
11
|
-
rooms:
|
12
|
-
secure: i6oRaPbul9by4YkFdGOROctO6Clgsn1Q5eTrHGn9SJeKtOtBm79ezCS3w0UBLKGcE1Cso3gMNUjzMmi/i2je9rUUIZFXUaT3COyh1LLHlPU4y6j3ZQReWb/m43AEKL0akW6eiAUnmddc96WyTL6x5zplqHKweZs/kHutAor36x+sPTNumHm5yM795HVFlmUqpLnJu3OAIEC+1EhIHxX6xG5lOveAQ7/8KnyIRJWFQI2sHwZUPyD2YM6o+kYzGTfiXixpuG7sbyN17+u3YuQc8kPWgXkk/5+VF7B0OIuEymm9rnnisGxIU0B3nrDESumdNnhbSMGrItgsmhssICZ1Dr1pa3uBr2CFT3ZbQszuQvPfq1Pavytw5+jTjAqqhq2DQCXQRZT16Mnu1eFvHyu9yWeqFECJGQ8ligDcsckvQe2GU432dAt6Dj6zEnL4CsOi/NhaGkfW+b1hnD2L9LjCV3TGoT1YHuBxP2gxd2mN7ihCaPtaXMwojhzmPClqbdxmu/v8aZv7nF9SiYzXOMG/Hj5/wtQA6dE64LufQIkn2XYxDWeh7pnjye1u0np9LHp0Qw0R8KT8uGm7kL6BRUaN2xynl6O13r8juRk2xDHGry6tse8+/zooOZkB84akZZunKGki9jh1APjza0tylTr0C139N1/VAyeB4cA+GFFRWxY=
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/bumblebee.gemspec
CHANGED
data/lib/bumblebee/template.rb
CHANGED
@@ -26,7 +26,9 @@ module Bumblebee
|
|
26
26
|
def generate_csv(objects, options = {})
|
27
27
|
objects = objects.is_a?(Hash) ? [objects] : Array(objects)
|
28
28
|
|
29
|
-
|
29
|
+
write_options = make_options(options).merge(write_headers: true)
|
30
|
+
|
31
|
+
CSV.generate(write_options) do |csv|
|
30
32
|
objects.each do |object|
|
31
33
|
row = columns.map { |column| column.object_to_csv(object) }
|
32
34
|
|
@@ -52,7 +54,7 @@ module Bumblebee
|
|
52
54
|
private
|
53
55
|
|
54
56
|
def make_options(options = {})
|
55
|
-
options.merge(headers: headers
|
57
|
+
options.merge(headers: headers)
|
56
58
|
end
|
57
59
|
end
|
58
60
|
end
|
data/lib/bumblebee/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bumblebee
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthew Ruggio
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-01-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: acts_as_hashable
|
@@ -78,7 +78,6 @@ files:
|
|
78
78
|
- ".editorconfig"
|
79
79
|
- ".gitignore"
|
80
80
|
- ".rubocop.yml"
|
81
|
-
- ".ruby-version"
|
82
81
|
- ".travis.yml"
|
83
82
|
- CHANGELOG.md
|
84
83
|
- Gemfile
|
@@ -107,15 +106,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
107
106
|
requirements:
|
108
107
|
- - ">="
|
109
108
|
- !ruby/object:Gem::Version
|
110
|
-
version: 2.3.
|
109
|
+
version: 2.3.8
|
111
110
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
112
111
|
requirements:
|
113
112
|
- - ">="
|
114
113
|
- !ruby/object:Gem::Version
|
115
114
|
version: '0'
|
116
115
|
requirements: []
|
117
|
-
|
118
|
-
rubygems_version: 2.5.2.3
|
116
|
+
rubygems_version: 3.0.1
|
119
117
|
signing_key:
|
120
118
|
specification_version: 4
|
121
119
|
summary: Object/CSV Mapper
|
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
2.3.7
|