spout 0.10.2 → 0.11.0.beta1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +36 -0
- data/README.md +3 -30
- data/lib/spout/commands/coverage.rb +2 -1
- data/lib/spout/commands/deploy.rb +82 -77
- data/lib/spout/commands/exporter.rb +2 -3
- data/lib/spout/commands/graphs.rb +68 -67
- data/lib/spout/commands/help.rb +155 -0
- data/lib/spout/helpers/array_statistics.rb +36 -30
- data/lib/spout/helpers/chart_types.rb +2 -2
- data/lib/spout/helpers/config_reader.rb +5 -5
- data/lib/spout/helpers/json_request.rb +1 -2
- data/lib/spout/helpers/json_request_generic.rb +87 -0
- data/lib/spout/helpers/quietly.rb +2 -4
- data/lib/spout/helpers/semantic.rb +7 -11
- data/lib/spout/helpers/send_file.rb +23 -25
- data/lib/spout/helpers/subject_loader.rb +41 -32
- data/lib/spout/helpers/table_formatting.rb +7 -6
- data/lib/spout/models/bucket.rb +5 -4
- data/lib/spout/models/coverage_result.rb +1 -1
- data/lib/spout/models/dictionary.rb +3 -1
- data/lib/spout/models/domain.rb +7 -6
- data/lib/spout/models/empty.rb +17 -0
- data/lib/spout/models/form.rb +8 -5
- data/lib/spout/models/graphables/default.rb +41 -18
- data/lib/spout/models/graphables/histogram.rb +6 -7
- data/lib/spout/models/graphables.rb +3 -5
- data/lib/spout/models/option.rb +6 -2
- data/lib/spout/models/outlier_result.rb +3 -3
- data/lib/spout/models/record.rb +21 -3
- data/lib/spout/models/subject.rb +4 -7
- data/lib/spout/models/tables/choices_vs_choices.rb +29 -17
- data/lib/spout/models/tables/choices_vs_numeric.rb +19 -12
- data/lib/spout/models/tables/default.rb +19 -32
- data/lib/spout/models/tables/numeric_vs_choices.rb +9 -13
- data/lib/spout/models/tables/numeric_vs_numeric.rb +9 -11
- data/lib/spout/models/tables.rb +4 -6
- data/lib/spout/models/variable.rb +51 -13
- data/lib/spout/tasks/engine.rake +1 -1
- data/lib/spout/templates/ruby-version +1 -1
- data/lib/spout/templates/travis.yml +1 -1
- data/lib/spout/tests/domain_format.rb +2 -2
- data/lib/spout/tests/domain_name_format.rb +15 -0
- data/lib/spout/tests/form_name_format.rb +14 -0
- data/lib/spout/tests/variable_name_format.rb +14 -0
- data/lib/spout/tests.rb +18 -13
- data/lib/spout/version.rb +3 -3
- data/lib/spout/views/index.html.erb +2 -2
- data/lib/spout/views/outliers.html.erb +1 -1
- data/lib/spout.rb +13 -58
- data/spout.gemspec +14 -15
- metadata +25 -25
- data/lib/spout/commands/images.rb +0 -199
- data/lib/spout/support/javascripts/data.js +0 -17
- data/lib/spout/support/javascripts/highcharts-convert.js +0 -583
- data/lib/spout/support/javascripts/highcharts-more.js +0 -50
- data/lib/spout/support/javascripts/highstock.js +0 -353
- data/lib/spout/support/javascripts/jquery.1.9.1.min.js +0 -5
data/lib/spout/models/tables.rb
CHANGED
@@ -4,11 +4,9 @@ require 'spout/models/tables/choices_vs_choices'
|
|
4
4
|
require 'spout/models/tables/numeric_vs_numeric'
|
5
5
|
require 'spout/models/tables/choices_vs_numeric'
|
6
6
|
|
7
|
-
|
8
7
|
module Spout
|
9
8
|
module Models
|
10
9
|
module Tables
|
11
|
-
|
12
10
|
DEFAULT_CLASS = Spout::Models::Tables::Default
|
13
11
|
GRAPHABLE_CLASSES = {
|
14
12
|
'numeric_vs_choices' => Spout::Models::Tables::NumericVsChoices,
|
@@ -17,9 +15,9 @@ module Spout
|
|
17
15
|
'choices_vs_numeric' => Spout::Models::Tables::ChoicesVsNumeric
|
18
16
|
}
|
19
17
|
|
20
|
-
def self.for(variable, chart_variable, subjects, subtitle)
|
18
|
+
def self.for(variable, chart_variable, subjects, subtitle, totals: true)
|
21
19
|
table_type = get_table_type(variable, chart_variable)
|
22
|
-
(GRAPHABLE_CLASSES[table_type] || DEFAULT_CLASS).new(variable, chart_variable, subjects, subtitle)
|
20
|
+
(GRAPHABLE_CLASSES[table_type] || DEFAULT_CLASS).new(variable, chart_variable, subjects, subtitle, totals)
|
23
21
|
end
|
24
22
|
|
25
23
|
def self.get_table_type(variable, chart_variable)
|
@@ -29,13 +27,13 @@ module Spout
|
|
29
27
|
# Identical to graphables, TODO: Refactor
|
30
28
|
def self.variable_to_table_type(variable)
|
31
29
|
variable_type = (variable ? variable.type : nil)
|
32
|
-
case variable_type
|
30
|
+
case variable_type
|
31
|
+
when 'numeric', 'integer'
|
33
32
|
'numeric'
|
34
33
|
else
|
35
34
|
variable_type
|
36
35
|
end
|
37
36
|
end
|
38
|
-
|
39
37
|
end
|
40
38
|
end
|
41
39
|
end
|
@@ -13,29 +13,28 @@ module Spout
|
|
13
13
|
attr_accessor :id, :folder, :display_name, :description, :type, :units, :labels, :commonly_used, :calculation
|
14
14
|
attr_accessor :domain_name, :form_names
|
15
15
|
attr_accessor :domain, :forms
|
16
|
+
attr_accessor :n, :mean, :stddev, :median, :min, :max, :unknown, :total
|
16
17
|
attr_reader :errors
|
17
18
|
|
18
19
|
def initialize(file_name, dictionary_root)
|
19
20
|
@errors = []
|
20
|
-
@id = file_name.to_s.gsub(
|
21
|
-
@folder = file_name.to_s.gsub(
|
21
|
+
@id = file_name.to_s.gsub(%r{^(.*)/|\.json$}, '').downcase
|
22
|
+
@folder = file_name.to_s.gsub(%r{^#{dictionary_root}/variables/|#{@id}\.json$}, '')
|
22
23
|
@form_names = []
|
23
24
|
|
24
25
|
json = begin
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
if json and json.kind_of? Hash
|
26
|
+
JSON.parse(File.read(file_name))
|
27
|
+
rescue => e
|
28
|
+
error = e.message
|
29
|
+
nil
|
30
|
+
end
|
32
31
|
|
33
|
-
|
32
|
+
if json.is_a? Hash
|
33
|
+
%w(display_name description type units commonly_used calculation).each do |method|
|
34
34
|
instance_variable_set("@#{method}", json[method])
|
35
35
|
end
|
36
|
-
|
36
|
+
@commonly_used = false if @commonly_used.nil?
|
37
37
|
@errors << "'id': #{json['id'].inspect} does not match filename #{@id.inspect}" if @id != json['id']
|
38
|
-
|
39
38
|
@domain_name = json['domain'] # Spout::Models::Domain.new(json['domain'], dictionary_root)
|
40
39
|
@labels = (json['labels'] || [])
|
41
40
|
@form_names = (json['forms'] || []).collect do |form_name|
|
@@ -48,13 +47,52 @@ module Spout
|
|
48
47
|
@errors = (@errors + [error]).compact
|
49
48
|
|
50
49
|
@domain = Spout::Models::Domain.find_by_id(@domain_name)
|
51
|
-
@forms = @form_names.collect{|form_name| Spout::Models::Form.find_by_id(form_name)}.compact
|
50
|
+
@forms = @form_names.collect { |form_name| Spout::Models::Form.find_by_id(form_name) }.compact
|
52
51
|
end
|
53
52
|
|
54
53
|
def path
|
55
54
|
File.join(@folder, "#{@id}.json")
|
56
55
|
end
|
57
56
|
|
57
|
+
def known_issues
|
58
|
+
line_found = false
|
59
|
+
lines = []
|
60
|
+
known_issues_file = 'KNOWNISSUES.md'
|
61
|
+
if File.exist?(known_issues_file) && File.file?(known_issues_file)
|
62
|
+
IO.foreach(known_issues_file) do |line|
|
63
|
+
if line_found && Variable.starts_with?(line, ' - ')
|
64
|
+
lines << line
|
65
|
+
elsif Variable.partial_match?(line, "\\[#{id}\\]")
|
66
|
+
line_found = true
|
67
|
+
lines << line
|
68
|
+
else
|
69
|
+
line_found = false
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
lines.join("\n")
|
74
|
+
end
|
75
|
+
|
76
|
+
def self.starts_with?(string, term)
|
77
|
+
!(/^#{term.to_s.downcase}/ =~ string.to_s.downcase).nil?
|
78
|
+
end
|
79
|
+
|
80
|
+
def self.partial_match?(string, term)
|
81
|
+
!(/#{term.to_s.downcase}/ =~ string.to_s.downcase).nil?
|
82
|
+
end
|
83
|
+
|
84
|
+
def deploy_params
|
85
|
+
{ name: id, display_name: display_name, variable_type: type,
|
86
|
+
folder: folder.to_s.gsub(%r{/$}, ''), description: description,
|
87
|
+
units: units, calculation: calculation, commonly_used: commonly_used,
|
88
|
+
labels: labels,
|
89
|
+
stats_n: n, stats_mean: mean, stats_stddev: stddev,
|
90
|
+
stats_median: median, stats_min: min, stats_max: max,
|
91
|
+
stats_unknown: unknown, stats_total: total,
|
92
|
+
known_issues: known_issues,
|
93
|
+
spout_version: Spout::VERSION::STRING
|
94
|
+
}
|
95
|
+
end
|
58
96
|
end
|
59
97
|
end
|
60
98
|
end
|
data/lib/spout/tasks/engine.rake
CHANGED
@@ -1 +1 @@
|
|
1
|
-
ruby-2.
|
1
|
+
ruby-2.3.0
|
@@ -5,8 +5,8 @@ module Spout
|
|
5
5
|
def assert_domain_format(item)
|
6
6
|
result = begin
|
7
7
|
json = JSON.parse(File.read(item))
|
8
|
-
if json.
|
9
|
-
json.empty? or json.select{|o| not o.
|
8
|
+
if json.is_a?(Array)
|
9
|
+
json.empty? or json.select{|o| not o.is_a?(Hash)}.size == 0
|
10
10
|
else
|
11
11
|
false
|
12
12
|
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Spout
|
2
|
+
module Tests
|
3
|
+
# Tests to assure that the domain name starts with a lowercase letter
|
4
|
+
# followed by lowercase letters, numbers, or underscores
|
5
|
+
module DomainNameFormat
|
6
|
+
Dir.glob('domains/**/*.json').each do |file|
|
7
|
+
define_method("test_domain_name_format: #{file}") do
|
8
|
+
message = 'Domain name format error. Name must start with a lowercase letter and be followed by lowercase letters, numbers, or underscores'
|
9
|
+
name = File.basename(file).gsub(/\.json$/, '') rescue name = nil
|
10
|
+
assert_match(/^[a-z]\w*$/, name, message)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module Spout
|
2
|
+
module Tests
|
3
|
+
# Tests to assure that the domain name starts with a lowercase letter
|
4
|
+
# followed by lowercase letters, numbers, or underscores
|
5
|
+
module FormNameFormat
|
6
|
+
Dir.glob('forms/**/*.json').each do |file|
|
7
|
+
define_method("test_form_name_format: #{file}") do
|
8
|
+
message = 'Form name format error. Name must start with a lowercase letter and be followed by lowercase letters, numbers, or underscores'
|
9
|
+
assert_match(/^[a-z]\w*$/, (begin JSON.parse(File.read(file))['id'] rescue nil end), message)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module Spout
|
2
|
+
module Tests
|
3
|
+
# Tests to assure that the variable name starts with a lowercase letter
|
4
|
+
# followed by lowercase letters, numbers, or underscores
|
5
|
+
module VariableNameFormat
|
6
|
+
Dir.glob('variables/**/*.json').each do |file|
|
7
|
+
define_method("test_variable_name_format: #{file}") do
|
8
|
+
message = 'Variable name format error. Name must start with a lowercase letter and be followed by lowercase letters, numbers, or underscores'
|
9
|
+
assert_match(/^[a-z]\w*$/, (begin JSON.parse(File.read(file))['id'] rescue nil end), message)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
data/lib/spout/tests.rb
CHANGED
@@ -37,11 +37,11 @@ module Minitest
|
|
37
37
|
def record(test)
|
38
38
|
super
|
39
39
|
if !test.skipped? && test.failure
|
40
|
-
print
|
40
|
+
print ' '
|
41
41
|
print_colored_status(test)
|
42
42
|
print " #{test.name}"
|
43
43
|
puts
|
44
|
-
print
|
44
|
+
print ' '
|
45
45
|
print test.failure.to_s.gsub("\n", "\n ")
|
46
46
|
puts
|
47
47
|
puts
|
@@ -63,36 +63,41 @@ end
|
|
63
63
|
|
64
64
|
Minitest::Reporters.use! Minitest::Reporters::SpoutReporter.new
|
65
65
|
|
66
|
-
|
67
66
|
require 'spout/tests/json_validation'
|
68
|
-
require 'spout/tests/variable_type_validation'
|
69
|
-
require 'spout/tests/variable_name_uniqueness'
|
70
|
-
require 'spout/tests/variable_name_match'
|
71
|
-
require 'spout/tests/variable_display_name_length'
|
72
67
|
require 'spout/tests/domain_existence_validation'
|
73
68
|
require 'spout/tests/domain_format'
|
69
|
+
require 'spout/tests/domain_name_format'
|
74
70
|
require 'spout/tests/domain_name_uniqueness'
|
75
71
|
require 'spout/tests/domain_specified'
|
76
72
|
require 'spout/tests/form_existence_validation'
|
77
|
-
require 'spout/tests/
|
73
|
+
require 'spout/tests/form_name_format'
|
78
74
|
require 'spout/tests/form_name_match'
|
75
|
+
require 'spout/tests/form_name_uniqueness'
|
76
|
+
require 'spout/tests/variable_display_name_length'
|
77
|
+
require 'spout/tests/variable_name_format'
|
78
|
+
require 'spout/tests/variable_name_match'
|
79
|
+
require 'spout/tests/variable_name_uniqueness'
|
80
|
+
require 'spout/tests/variable_type_validation'
|
79
81
|
|
80
82
|
require 'spout/helpers/iterators'
|
81
83
|
|
82
84
|
module Spout
|
83
85
|
module Tests
|
84
86
|
include Spout::Tests::JsonValidation
|
85
|
-
include Spout::Tests::VariableTypeValidation
|
86
|
-
include Spout::Tests::VariableNameUniqueness
|
87
|
-
include Spout::Tests::VariableNameMatch
|
88
|
-
include Spout::Tests::VariableDisplayNameLength
|
89
87
|
include Spout::Tests::DomainExistenceValidation
|
90
88
|
include Spout::Tests::DomainFormat
|
89
|
+
include Spout::Tests::DomainNameFormat
|
91
90
|
include Spout::Tests::DomainNameUniqueness
|
92
91
|
include Spout::Tests::DomainSpecified
|
93
92
|
include Spout::Tests::FormExistenceValidation
|
94
|
-
include Spout::Tests::
|
93
|
+
include Spout::Tests::FormNameFormat
|
95
94
|
include Spout::Tests::FormNameMatch
|
95
|
+
include Spout::Tests::FormNameUniqueness
|
96
|
+
include Spout::Tests::VariableDisplayNameLength
|
97
|
+
include Spout::Tests::VariableNameFormat
|
98
|
+
include Spout::Tests::VariableNameMatch
|
99
|
+
include Spout::Tests::VariableNameUniqueness
|
100
|
+
include Spout::Tests::VariableTypeValidation
|
96
101
|
end
|
97
102
|
end
|
98
103
|
|
data/lib/spout/version.rb
CHANGED
@@ -262,7 +262,7 @@ tfoot td {
|
|
262
262
|
<% end %>
|
263
263
|
</td>
|
264
264
|
<td>
|
265
|
-
<% if scr.json['type'] == 'choices'
|
265
|
+
<% if scr.json['type'] == 'choices' && scr.file_name_test %>
|
266
266
|
<% if scr.domain_test or scr.json['domain'].to_s.strip == '' %>
|
267
267
|
<code class="<%= 'success' if scr.domain_test %>">"domain": <%= scr.json['domain'].inspect %></code>
|
268
268
|
<% else %>
|
@@ -273,7 +273,7 @@ tfoot td {
|
|
273
273
|
<td style="white-space:nowrap">
|
274
274
|
<% if scr.json['type'] == 'choices' %>
|
275
275
|
<% unused_values = scr.valid_values - scr.csv_values %>
|
276
|
-
<% if scr.values_test
|
276
|
+
<% if scr.values_test && unused_values.size == 0 %>
|
277
277
|
<div class="text-success" style="text-align:center"><span class="glyphicon glyphicon-ok"></span></div>
|
278
278
|
<% else %>
|
279
279
|
<% (scr.valid_values + scr.csv_values.compact.sort).uniq.each do |value| %>
|
@@ -149,7 +149,7 @@ tfoot td {
|
|
149
149
|
<td><%= outlier_result.method %></td>
|
150
150
|
<td><%= outlier_result.display_name.to_s[0..20] %></td>
|
151
151
|
<td>
|
152
|
-
<% if outlier_result.median.
|
152
|
+
<% if outlier_result.median.is_a?(Numeric) %>
|
153
153
|
<code class="default"><%= number_with_delimiter(outlier_result.median.round(2)) %></code>
|
154
154
|
<% end %>
|
155
155
|
<%= outlier_result.units %>
|
data/lib/spout.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require
|
1
|
+
require 'spout/version'
|
2
2
|
|
3
3
|
require 'spout/models/dictionary'
|
4
4
|
|
@@ -9,7 +9,6 @@ Spout::COMMANDS = {
|
|
9
9
|
'i' => :importer,
|
10
10
|
'e' => :exporter,
|
11
11
|
'c' => :coverage_report,
|
12
|
-
'p' => :generate_images,
|
13
12
|
'g' => :generate_charts_and_tables,
|
14
13
|
'o' => :outliers_report,
|
15
14
|
'd' => :deploy
|
@@ -17,7 +16,7 @@ Spout::COMMANDS = {
|
|
17
16
|
|
18
17
|
module Spout
|
19
18
|
def self.launch(argv)
|
20
|
-
|
19
|
+
send((Spout::COMMANDS[argv.first.to_s.scan(/\w/).first] || :help), argv)
|
21
20
|
end
|
22
21
|
|
23
22
|
def self.new_project(argv)
|
@@ -28,6 +27,8 @@ module Spout
|
|
28
27
|
def self.coverage_report(argv)
|
29
28
|
require 'spout/commands/coverage'
|
30
29
|
Spout::Commands::Coverage.new(standard_version, argv)
|
30
|
+
rescue NoMemoryError
|
31
|
+
puts "[NoMemoryError] You made Spout cry... Spout doesn't run on potatoes :'-("
|
31
32
|
end
|
32
33
|
|
33
34
|
def self.exporter(argv)
|
@@ -38,49 +39,12 @@ module Spout
|
|
38
39
|
def self.generate_charts_and_tables(argv)
|
39
40
|
argv = argv.last(argv.size - 1)
|
40
41
|
require 'spout/commands/graphs'
|
41
|
-
|
42
|
-
Spout::Commands::Graphs.new(variables, standard_version)
|
43
|
-
end
|
44
|
-
|
45
|
-
def self.generate_images(argv)
|
46
|
-
argv = argv.last(argv.size - 1)
|
47
|
-
require 'spout/commands/images'
|
48
|
-
types = flag_values(argv, 'type')
|
49
|
-
sizes = flag_values(argv, 'size')
|
50
|
-
variable_ids = non_flag_values(argv)
|
51
|
-
Spout::Commands::Images.new(types, variable_ids, sizes, standard_version, argv)
|
42
|
+
Spout::Commands::Graphs.new(argv, standard_version)
|
52
43
|
end
|
53
44
|
|
54
45
|
def self.help(argv)
|
55
|
-
|
56
|
-
|
57
|
-
Usage: spout COMMAND [ARGS]
|
58
|
-
|
59
|
-
The most common spout commands are:
|
60
|
-
[n]ew Create a new Spout dictionary.
|
61
|
-
`spout new <project_name>` creates a new
|
62
|
-
data dictionary in `./<project_name>`
|
63
|
-
[t]est Run tests and show failing tests
|
64
|
-
[i]mport Import a CSV file into the JSON dictionary
|
65
|
-
[e]xport [1.0.0] Export the JSON dictionary to CSV format
|
66
|
-
[c]overage Coverage report, requires dataset CSVs
|
67
|
-
in `<project_name>/csvs/<version>`
|
68
|
-
[o]utliers Outlier report, requires dataset CSVs
|
69
|
-
in `<project_name>/csvs/<version>`
|
70
|
-
[p]ngs Generates images for each variable in a
|
71
|
-
dataset and places them
|
72
|
-
in `<project_name>/images/<version>/`
|
73
|
-
[g]raphs Generates JSON graphs for each variable
|
74
|
-
in a dataset and places them
|
75
|
-
in `<project_name>/graphs/<version>/`
|
76
|
-
[d]eploy NAME Push dataset and data dictionary to a
|
77
|
-
webserver specified in `.spout.yml`
|
78
|
-
[v]ersion Returns the version of Spout
|
79
|
-
|
80
|
-
Commands can be referenced by the first letter:
|
81
|
-
Ex: `spout t`, for test
|
82
|
-
|
83
|
-
EOT
|
46
|
+
require 'spout/commands/help'
|
47
|
+
Spout::Commands::Help.new(argv)
|
84
48
|
end
|
85
49
|
|
86
50
|
def self.deploy(argv)
|
@@ -98,29 +62,20 @@ EOT
|
|
98
62
|
Spout::Commands::Outliers.new(standard_version, argv)
|
99
63
|
end
|
100
64
|
|
101
|
-
def self.test(
|
102
|
-
system
|
65
|
+
def self.test(_argv)
|
66
|
+
system 'bundle exec rake'
|
103
67
|
# require 'spout/commands/test_runner'
|
104
68
|
# Spout::Commands::TestRunner.new(argv)
|
105
69
|
end
|
106
70
|
|
107
|
-
def self.version(
|
71
|
+
def self.version(_argv)
|
108
72
|
puts "Spout #{Spout::VERSION::STRING}"
|
109
73
|
end
|
110
74
|
|
111
75
|
def self.standard_version
|
112
|
-
version = File.open('VERSION', &:readline).strip
|
76
|
+
version = File.open('VERSION', &:readline).strip
|
113
77
|
version == '' ? '1.0.0' : version
|
78
|
+
rescue
|
79
|
+
'1.0.0'
|
114
80
|
end
|
115
|
-
|
116
|
-
private
|
117
|
-
|
118
|
-
def self.flag_values(flags, param)
|
119
|
-
flags.select{|f| f =~ /^--#{param}-/}.collect{|f| f[(param.size + 3)..-1]}
|
120
|
-
end
|
121
|
-
|
122
|
-
def self.non_flag_values(flags)
|
123
|
-
flags.reject{|f| f =~ /^--/}
|
124
|
-
end
|
125
|
-
|
126
81
|
end
|
data/spout.gemspec
CHANGED
@@ -12,25 +12,24 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
12
12
|
require 'spout/version'
|
13
13
|
|
14
14
|
Gem::Specification.new do |spec|
|
15
|
-
spec.name =
|
15
|
+
spec.name = 'spout'
|
16
16
|
spec.version = Spout::VERSION::STRING
|
17
|
-
spec.authors = [
|
18
|
-
spec.email = [
|
19
|
-
spec.description =
|
20
|
-
spec.summary =
|
21
|
-
spec.homepage =
|
22
|
-
spec.license =
|
17
|
+
spec.authors = ['Remo Mueller']
|
18
|
+
spec.email = ['remosm@gmail.com']
|
19
|
+
spec.description = 'Manage your data dictionary as a JSON repository, and easily export back to CSV.'
|
20
|
+
spec.summary = 'Turn your CSV data dictionary into a JSON repository. Collaborate with others to update the data dictionary in JSON format. Generate new Data Dictionary from the JSON repository. Test and validate your data dictionary using built-in tests, or add your own for further validations.'
|
21
|
+
spec.homepage = 'https://github.com/sleepepi/spout'
|
22
|
+
spec.license = 'CC BY-NC-SA 3.0'
|
23
23
|
|
24
24
|
spec.files = Dir['{bin,lib}/**/*'] + ['CHANGELOG.md', 'LICENSE', 'Rakefile', 'README.md', 'spout.gemspec']
|
25
25
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
26
26
|
spec.test_files = spec.files.grep(%r{^(test)/})
|
27
|
-
spec.require_paths = [
|
27
|
+
spec.require_paths = ['lib']
|
28
28
|
|
29
|
-
spec.add_dependency
|
30
|
-
spec.add_dependency
|
31
|
-
spec.add_dependency
|
32
|
-
spec.add_dependency
|
33
|
-
spec.add_dependency
|
34
|
-
|
35
|
-
spec.add_development_dependency "bundler", "~> 1.3"
|
29
|
+
spec.add_dependency 'bundler', '~> 1.3'
|
30
|
+
spec.add_dependency 'rake'
|
31
|
+
spec.add_dependency 'minitest'
|
32
|
+
spec.add_dependency 'minitest-reporters'
|
33
|
+
spec.add_dependency 'json'
|
34
|
+
spec.add_dependency 'colorize', '~> 0.7.5'
|
36
35
|
end
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spout
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.0.beta1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Remo Mueller
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.3'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.3'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: rake
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -80,20 +94,6 @@ dependencies:
|
|
80
94
|
- - "~>"
|
81
95
|
- !ruby/object:Gem::Version
|
82
96
|
version: 0.7.5
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: bundler
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - "~>"
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '1.3'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - "~>"
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '1.3'
|
97
97
|
description: Manage your data dictionary as a JSON repository, and easily export back
|
98
98
|
to CSV.
|
99
99
|
email:
|
@@ -113,7 +113,7 @@ files:
|
|
113
113
|
- lib/spout/commands/deploy.rb
|
114
114
|
- lib/spout/commands/exporter.rb
|
115
115
|
- lib/spout/commands/graphs.rb
|
116
|
-
- lib/spout/commands/
|
116
|
+
- lib/spout/commands/help.rb
|
117
117
|
- lib/spout/commands/importer.rb
|
118
118
|
- lib/spout/commands/outliers.rb
|
119
119
|
- lib/spout/commands/project_generator.rb
|
@@ -123,6 +123,7 @@ files:
|
|
123
123
|
- lib/spout/helpers/iterators.rb
|
124
124
|
- lib/spout/helpers/json_loader.rb
|
125
125
|
- lib/spout/helpers/json_request.rb
|
126
|
+
- lib/spout/helpers/json_request_generic.rb
|
126
127
|
- lib/spout/helpers/number_helper.rb
|
127
128
|
- lib/spout/helpers/quietly.rb
|
128
129
|
- lib/spout/helpers/semantic.rb
|
@@ -133,6 +134,7 @@ files:
|
|
133
134
|
- lib/spout/models/coverage_result.rb
|
134
135
|
- lib/spout/models/dictionary.rb
|
135
136
|
- lib/spout/models/domain.rb
|
137
|
+
- lib/spout/models/empty.rb
|
136
138
|
- lib/spout/models/form.rb
|
137
139
|
- lib/spout/models/graphables.rb
|
138
140
|
- lib/spout/models/graphables/choices_vs_choices.rb
|
@@ -152,11 +154,6 @@ files:
|
|
152
154
|
- lib/spout/models/tables/numeric_vs_choices.rb
|
153
155
|
- lib/spout/models/tables/numeric_vs_numeric.rb
|
154
156
|
- lib/spout/models/variable.rb
|
155
|
-
- lib/spout/support/javascripts/data.js
|
156
|
-
- lib/spout/support/javascripts/highcharts-convert.js
|
157
|
-
- lib/spout/support/javascripts/highcharts-more.js
|
158
|
-
- lib/spout/support/javascripts/highstock.js
|
159
|
-
- lib/spout/support/javascripts/jquery.1.9.1.min.js
|
160
157
|
- lib/spout/tasks.rb
|
161
158
|
- lib/spout/tasks/engine.rake
|
162
159
|
- lib/spout/templates/Gemfile
|
@@ -171,14 +168,17 @@ files:
|
|
171
168
|
- lib/spout/tests.rb
|
172
169
|
- lib/spout/tests/domain_existence_validation.rb
|
173
170
|
- lib/spout/tests/domain_format.rb
|
171
|
+
- lib/spout/tests/domain_name_format.rb
|
174
172
|
- lib/spout/tests/domain_name_uniqueness.rb
|
175
173
|
- lib/spout/tests/domain_specified.rb
|
176
174
|
- lib/spout/tests/form_existence_validation.rb
|
175
|
+
- lib/spout/tests/form_name_format.rb
|
177
176
|
- lib/spout/tests/form_name_match.rb
|
178
177
|
- lib/spout/tests/form_name_uniqueness.rb
|
179
178
|
- lib/spout/tests/json_helper.rb
|
180
179
|
- lib/spout/tests/json_validation.rb
|
181
180
|
- lib/spout/tests/variable_display_name_length.rb
|
181
|
+
- lib/spout/tests/variable_name_format.rb
|
182
182
|
- lib/spout/tests/variable_name_match.rb
|
183
183
|
- lib/spout/tests/variable_name_uniqueness.rb
|
184
184
|
- lib/spout/tests/variable_type_validation.rb
|
@@ -201,12 +201,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
201
201
|
version: '0'
|
202
202
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
203
203
|
requirements:
|
204
|
-
- - "
|
204
|
+
- - ">"
|
205
205
|
- !ruby/object:Gem::Version
|
206
|
-
version:
|
206
|
+
version: 1.3.1
|
207
207
|
requirements: []
|
208
208
|
rubyforge_project:
|
209
|
-
rubygems_version: 2.
|
209
|
+
rubygems_version: 2.5.1
|
210
210
|
signing_key:
|
211
211
|
specification_version: 4
|
212
212
|
summary: Turn your CSV data dictionary into a JSON repository. Collaborate with others
|