forest_liana 2.15.8 → 3.0.0.pre.beta.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +1 -1
- data/app/controllers/forest_liana/resources_controller.rb +9 -17
- data/app/controllers/forest_liana/stats_controller.rb +4 -14
- data/app/models/forest_liana/model/action.rb +57 -3
- data/app/models/forest_liana/model/collection.rb +37 -9
- data/app/models/forest_liana/model/segment.rb +1 -1
- data/app/serializers/forest_liana/schema_serializer.rb +83 -0
- data/app/serializers/forest_liana/serializer_factory.rb +13 -48
- data/app/services/forest_liana/apimap_sorter.rb +88 -48
- data/app/services/forest_liana/base_getter.rb +1 -7
- data/app/services/forest_liana/has_many_getter.rb +14 -15
- data/app/services/forest_liana/line_stat_getter.rb +5 -1
- data/app/services/forest_liana/operator_value_parser.rb +1 -46
- data/app/services/forest_liana/pie_stat_getter.rb +2 -2
- data/app/services/forest_liana/query_stat_getter.rb +3 -25
- data/app/services/forest_liana/resource_getter.rb +8 -2
- data/app/services/forest_liana/resources_getter.rb +13 -27
- data/app/services/forest_liana/schema_adapter.rb +65 -64
- data/app/services/forest_liana/search_query_builder.rb +24 -5
- data/app/services/forest_liana/stat_getter.rb +8 -1
- data/app/services/forest_liana/value_stat_getter.rb +2 -2
- data/lib/forest_liana.rb +2 -0
- data/lib/forest_liana/bootstraper.rb +119 -122
- data/lib/forest_liana/collection.rb +41 -12
- data/lib/forest_liana/engine.rb +16 -11
- data/lib/forest_liana/json_printer.rb +54 -0
- data/lib/forest_liana/schema_file_updater.rb +141 -0
- data/lib/forest_liana/version.rb +1 -1
- data/test/dummy/config/routes.rb +1 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/test.log +116056 -3826
- data/test/integration/navigation_test.rb +10 -0
- data/test/routing/route_test.rb +2 -0
- data/test/services/forest_liana/resources_getter_test.rb +3 -3
- data/test/services/forest_liana/schema_adapter_test.rb +50 -49
- metadata +11 -111
- data/app/helpers/forest_liana/query_helper.rb +0 -30
- data/app/helpers/forest_liana/schema_helper.rb +0 -8
- data/app/serializers/forest_liana/action_serializer.rb +0 -21
- data/app/serializers/forest_liana/collection_serializer.rb +0 -33
- data/app/serializers/forest_liana/segment_serializer.rb +0 -15
- data/app/services/forest_liana/leaderboard_stat_getter.rb +0 -44
- data/app/services/forest_liana/objective_stat_getter.rb +0 -10
- data/spec/dummy/README.rdoc +0 -28
- data/spec/dummy/Rakefile +0 -6
- data/spec/dummy/app/assets/javascripts/application.js +0 -13
- data/spec/dummy/app/assets/stylesheets/application.css +0 -15
- data/spec/dummy/app/config/routes.rb +0 -3
- data/spec/dummy/app/controllers/application_controller.rb +0 -5
- data/spec/dummy/app/helpers/application_helper.rb +0 -2
- data/spec/dummy/app/models/island.rb +0 -5
- data/spec/dummy/app/models/tree.rb +0 -5
- data/spec/dummy/app/models/user.rb +0 -4
- data/spec/dummy/app/views/layouts/application.html.erb +0 -14
- data/spec/dummy/bin/bundle +0 -3
- data/spec/dummy/bin/rails +0 -4
- data/spec/dummy/bin/rake +0 -4
- data/spec/dummy/bin/setup +0 -29
- data/spec/dummy/config.ru +0 -4
- data/spec/dummy/config/application.rb +0 -26
- data/spec/dummy/config/boot.rb +0 -5
- data/spec/dummy/config/database.yml +0 -25
- data/spec/dummy/config/environment.rb +0 -5
- data/spec/dummy/config/environments/development.rb +0 -41
- data/spec/dummy/config/environments/production.rb +0 -79
- data/spec/dummy/config/environments/test.rb +0 -42
- data/spec/dummy/config/initializers/assets.rb +0 -11
- data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/dummy/config/initializers/cookies_serializer.rb +0 -3
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +0 -4
- data/spec/dummy/config/initializers/forest_liana.rb +0 -2
- data/spec/dummy/config/initializers/inflections.rb +0 -16
- data/spec/dummy/config/initializers/mime_types.rb +0 -4
- data/spec/dummy/config/initializers/session_store.rb +0 -3
- data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/spec/dummy/config/routes.rb +0 -3
- data/spec/dummy/config/secrets.yml +0 -22
- data/spec/dummy/db/migrate/20190226172951_create_user.rb +0 -9
- data/spec/dummy/db/migrate/20190226173051_create_isle.rb +0 -10
- data/spec/dummy/db/migrate/20190226174951_create_tree.rb +0 -12
- data/spec/dummy/db/schema.rb +0 -42
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +0 -80
- data/spec/dummy/log/test.log +0 -26139
- data/spec/helpers/forest_liana/query_helper_spec.rb +0 -74
- data/spec/helpers/forest_liana/schema_helper_spec.rb +0 -13
- data/spec/rails_helper.rb +0 -61
- data/spec/requests/resources_spec.rb +0 -97
- data/spec/services/forest_liana/apimap_sorter_spec.rb +0 -172
- data/spec/services/forest_liana/ip_whitelist_checker_spec.rb +0 -203
- data/spec/services/forest_liana/schema_adapter_spec.rb +0 -17
- data/spec/spec_helper.rb +0 -99
@@ -1,17 +0,0 @@
|
|
1
|
-
module ForestLiana
|
2
|
-
describe SchemaAdapter do
|
3
|
-
describe 'perform' do
|
4
|
-
context 'with an "unhandled" column types (binary, postgis geography, ...)' do
|
5
|
-
it 'should not define theses column in the schema' do
|
6
|
-
collection = ForestLiana.apimap.find do |object|
|
7
|
-
object.name.to_s == ForestLiana.name_for(Island)
|
8
|
-
end
|
9
|
-
|
10
|
-
expect(collection.fields.map { |field| field[:field] }).to eq(
|
11
|
-
["id", "name", "created_at", "updated_at", "trees"]
|
12
|
-
);
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
data/spec/spec_helper.rb
DELETED
@@ -1,99 +0,0 @@
|
|
1
|
-
# This file was generated by the `rails generate rspec:install` command. Conventionally, all
|
2
|
-
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
3
|
-
# The generated `.rspec` file contains `--require spec_helper` which will cause
|
4
|
-
# this file to always be loaded, without a need to explicitly require it in any
|
5
|
-
# files.
|
6
|
-
#
|
7
|
-
# Given that it is always loaded, you are encouraged to keep this file as
|
8
|
-
# light-weight as possible. Requiring heavyweight dependencies from this file
|
9
|
-
# will add to the boot time of your test suite on EVERY test run, even for an
|
10
|
-
# individual file that may not need all of that loaded. Instead, consider making
|
11
|
-
# a separate helper file that requires the additional dependencies and performs
|
12
|
-
# the additional setup, and require it from the spec files that actually need
|
13
|
-
# it.
|
14
|
-
#
|
15
|
-
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
16
|
-
RSpec.configure do |config|
|
17
|
-
ENV['RAILS_ENV'] = 'test'
|
18
|
-
require File.expand_path('../dummy/config/environment', __FILE__)
|
19
|
-
|
20
|
-
# rspec-expectations config goes here. You can use an alternate
|
21
|
-
# assertion/expectation library such as wrong or the stdlib/minitest
|
22
|
-
# assertions if you prefer.
|
23
|
-
config.expect_with :rspec do |expectations|
|
24
|
-
# This option will default to `true` in RSpec 4. It makes the `description`
|
25
|
-
# and `failure_message` of custom matchers include text for helper methods
|
26
|
-
# defined using `chain`, e.g.:
|
27
|
-
# be_bigger_than(2).and_smaller_than(4).description
|
28
|
-
# # => "be bigger than 2 and smaller than 4"
|
29
|
-
# ...rather than:
|
30
|
-
# # => "be bigger than 2"
|
31
|
-
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
32
|
-
end
|
33
|
-
|
34
|
-
# rspec-mocks config goes here. You can use an alternate test double
|
35
|
-
# library (such as bogus or mocha) by changing the `mock_with` option here.
|
36
|
-
config.mock_with :rspec do |mocks|
|
37
|
-
# Prevents you from mocking or stubbing a method that does not exist on
|
38
|
-
# a real object. This is generally recommended, and will default to
|
39
|
-
# `true` in RSpec 4.
|
40
|
-
mocks.verify_partial_doubles = true
|
41
|
-
end
|
42
|
-
|
43
|
-
# This option will default to `:apply_to_host_groups` in RSpec 4 (and will
|
44
|
-
# have no way to turn it off -- the option exists only for backwards
|
45
|
-
# compatibility in RSpec 3). It causes shared context metadata to be
|
46
|
-
# inherited by the metadata hash of host groups and examples, rather than
|
47
|
-
# triggering implicit auto-inclusion in groups with matching metadata.
|
48
|
-
config.shared_context_metadata_behavior = :apply_to_host_groups
|
49
|
-
|
50
|
-
# The settings below are suggested to provide a good initial experience
|
51
|
-
# with RSpec, but feel free to customize to your heart's content.
|
52
|
-
=begin
|
53
|
-
# This allows you to limit a spec run to individual examples or groups
|
54
|
-
# you care about by tagging them with `:focus` metadata. When nothing
|
55
|
-
# is tagged with `:focus`, all examples get run. RSpec also provides
|
56
|
-
# aliases for `it`, `describe`, and `context` that include `:focus`
|
57
|
-
# metadata: `fit`, `fdescribe` and `fcontext`, respectively.
|
58
|
-
config.filter_run_when_matching :focus
|
59
|
-
|
60
|
-
# Allows RSpec to persist some state between runs in order to support
|
61
|
-
# the `--only-failures` and `--next-failure` CLI options. We recommend
|
62
|
-
# you configure your source control system to ignore this file.
|
63
|
-
config.example_status_persistence_file_path = "spec/examples.txt"
|
64
|
-
|
65
|
-
# Limits the available syntax to the non-monkey patched syntax that is
|
66
|
-
# recommended. For more details, see:
|
67
|
-
# - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
|
68
|
-
# - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
|
69
|
-
# - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
|
70
|
-
config.disable_monkey_patching!
|
71
|
-
|
72
|
-
# Many RSpec users commonly either run the entire suite or an individual
|
73
|
-
# file, and it's useful to allow more verbose output when running an
|
74
|
-
# individual spec file.
|
75
|
-
if config.files_to_run.one?
|
76
|
-
# Use the documentation formatter for detailed output,
|
77
|
-
# unless a formatter has already been configured
|
78
|
-
# (e.g. via a command-line flag).
|
79
|
-
config.default_formatter = "doc"
|
80
|
-
end
|
81
|
-
|
82
|
-
# Print the 10 slowest examples and example groups at the
|
83
|
-
# end of the spec run, to help surface which specs are running
|
84
|
-
# particularly slow.
|
85
|
-
config.profile_examples = 10
|
86
|
-
|
87
|
-
# Run specs in random order to surface order dependencies. If you find an
|
88
|
-
# order dependency and want to debug it, you can fix the order by providing
|
89
|
-
# the seed, which is printed after each run.
|
90
|
-
# --seed 1234
|
91
|
-
config.order = :random
|
92
|
-
|
93
|
-
# Seed global randomization in this process using the `--seed` CLI option.
|
94
|
-
# Setting this allows you to use `--seed` to deterministically reproduce
|
95
|
-
# test failures related to randomization by passing the same `--seed` value
|
96
|
-
# as the one that triggered the failure.
|
97
|
-
Kernel.srand config.seed
|
98
|
-
=end
|
99
|
-
end
|