dossier-segmenter 0.10.0 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/dossier-segmenter.gemspec +1 -1
- data/lib/dossier/segment/rows.rb +4 -1
- data/lib/dossier/segmenter/version.rb +1 -1
- data/spec/dossier/segmenter_spec.rb +2 -2
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 45113573893155e4c2040fb46129934b97e1b5bc
|
4
|
+
data.tar.gz: 214531ad0c64053ea2c46cd3a7433f83781be7d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8173eaee1367eede8c914c8d441d8f120972d9b8a98deceee9cff8d1bc89faa4f28ecf587fd1dc1107b1880d4ffe5fa1a42a0f779bb3e303444aa4f965db0b76
|
7
|
+
data.tar.gz: 8ac2143c9c31e4bf0b94f693a534e936baa8d2cbf400d7e55da38805767367527e2265ecede018ee4c38faf3c929d03046d0c64d0a30ba1f0d2a27b9efe11544
|
data/dossier-segmenter.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_dependency "dossier", "~> 2.
|
21
|
+
spec.add_dependency "dossier", "~> 2.9"
|
22
22
|
|
23
23
|
spec.add_development_dependency "bundler", "~> 1.3"
|
24
24
|
spec.add_development_dependency "rspec-rails", "~> 2.13"
|
data/lib/dossier/segment/rows.rb
CHANGED
@@ -10,9 +10,12 @@ module Dossier
|
|
10
10
|
self.definition = definition
|
11
11
|
end
|
12
12
|
|
13
|
-
delegate :headers, to: :segmenter
|
14
13
|
delegate :length, :count, :empty?, to: :rows
|
15
14
|
|
15
|
+
def raw_headers
|
16
|
+
segmenter.headers
|
17
|
+
end
|
18
|
+
|
16
19
|
def each
|
17
20
|
segmenter_data.each { |row| yield format(summarize(truncate(row))) }
|
18
21
|
end
|
@@ -13,7 +13,7 @@ describe Dossier::Segmenter do
|
|
13
13
|
}
|
14
14
|
let(:headers) { CuteAnimalsReport::HEADERS.call }
|
15
15
|
let(:rows) { CuteAnimalsReport::ROWS.call }
|
16
|
-
let(:results) {
|
16
|
+
let(:results) { double('Results', headers: headers, rows: rows) }
|
17
17
|
let(:report) { report_class.new.tap { |r| r.stub(:raw_results).and_return(results) } }
|
18
18
|
let(:segmenter) { report.segmenter }
|
19
19
|
|
@@ -116,7 +116,7 @@ describe Dossier::Segmenter do
|
|
116
116
|
|
117
117
|
describe "segment options" do
|
118
118
|
it 'works the way I want it to' do
|
119
|
-
segment =
|
119
|
+
segment = double('Segment', key_path: 'feline.false')
|
120
120
|
options = segmenter.segment_options_for segment
|
121
121
|
expect(options.map { |hash| hash['group_id'] }).to eq [22, 23]
|
122
122
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dossier-segmenter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Hunter
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-07-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dossier
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '2.
|
19
|
+
version: '2.9'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '2.
|
26
|
+
version: '2.9'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -181,7 +181,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
181
181
|
version: '0'
|
182
182
|
requirements: []
|
183
183
|
rubyforge_project:
|
184
|
-
rubygems_version: 2.0.
|
184
|
+
rubygems_version: 2.0.5
|
185
185
|
signing_key:
|
186
186
|
specification_version: 4
|
187
187
|
summary: Extends Dossier to have segmented report functionality.
|