papercallio 0.3.0 → 0.4.0

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
  SHA1:
3
- metadata.gz: 7aedc48b66ae9c2dca7fe27b3ace0f7a24297a81
4
- data.tar.gz: bcf865c5b1a615af407c7aa3c88446b17c137474
3
+ metadata.gz: f9c2e52e464d261914720d3230754467c11fc776
4
+ data.tar.gz: 6c0e9fb3c2dd341c51bd900e631559639a727296
5
5
  SHA512:
6
- metadata.gz: b422e7f7f1ed472750a40a39bc67b738efdc51cd493a26f59ffba8ab0a6b7aa91263916da1c94012f5dbf302afb6d8cad7ef587ecb2d1a2969af466d3fc2b0a5
7
- data.tar.gz: d1e6e9519bf0c1183fd9261a9ead8868070ea74bc3318aae47190038dd21ab1f75980597af2f4c2ae50abc4a82320d66038dbb3f011028a954d26c6db4297811
6
+ metadata.gz: 0ed9987cadc658161c692d6d2ae3e6b5cc4605edc541e922a46f6ae12b547ff97974373a515f1facb92b29374cd5901eaeb0c8ceee1d13a169101788924e9e35
7
+ data.tar.gz: cfbb81b183f33559d5bc88c8e8cfd716750089facdea63a274ef5ee491eee906bd2fa6d463504e7bb8d3b0f8f6868598caf98529a8a8ad02905d280d86905e55
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- papercallio (0.3.0)
4
+ papercallio (0.4.0)
5
5
  descriptive_statistics (~> 2.5)
6
6
  gli (= 2.16.0)
7
7
  httparty (~> 0.15)
@@ -56,6 +56,10 @@ command :submissions do |c|
56
56
  c.flag 'order', :default_value => nil,
57
57
  :arg_name => 'order',
58
58
  :desc => 'Sort results. Possible values are: state, rating, ratings_count, title, created_at, talk_format_id, audience_level, confidence'
59
+ c.flag 'filter', :default_value => [],
60
+ :arg_name => 'filter',
61
+ :desc => "Filter results based on comments by reviewers. Can use multiple, ex. --filter='top_talk' --filter='top_ignite' --filter='open_space'" ,
62
+ :multiple => true
59
63
 
60
64
  c.action do |global_options,options,args|
61
65
  pcc = PaperCallClient.new(api_token, options)
@@ -67,6 +71,7 @@ command :submissions do |c|
67
71
  reviewers = {}
68
72
  response.each do |submission|
69
73
  line = {}
74
+ include_line = false
70
75
  id = nil
71
76
  submission.each do |field, value|
72
77
  if value.is_a?(Hash)
@@ -119,9 +124,16 @@ command :submissions do |c|
119
124
  line[:individual_ratings] = individual_ratings
120
125
  line[:raters] = raters
121
126
  line[:comments] = comments
127
+ if options[:filter].empty?
128
+ include_line = true
129
+ elsif options[:filter].any? { |word| comments.include?(word) }
130
+ include_line = true
131
+ end
132
+ else
133
+ include_line = true
122
134
  end
123
135
  headerset = true
124
- submissions << line
136
+ submissions << line if include_line
125
137
  line = {}
126
138
  end
127
139
  File.open(global_options[:file], 'w') do |f|
@@ -1,3 +1,3 @@
1
1
  module Papercallio
2
- VERSION = '0.3.0'
2
+ VERSION = '0.4.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: papercallio
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - aaronblythe