tablets 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +90 -0
- data/Rakefile +19 -0
- data/app/assets/javascripts/tablets/callbacks.js.coffee +3 -0
- data/app/assets/javascripts/tablets/tablet.js.coffee +35 -0
- data/app/assets/javascripts/tablets.js.coffee +4 -0
- data/app/controllers/tablets/ajax_controller.rb +31 -0
- data/app/views/tablets/_tablet.html.erb +21 -0
- data/config/routes.rb +3 -0
- data/lib/tablets/data/processing/base.rb +23 -0
- data/lib/tablets/data/processing/filter.rb +47 -0
- data/lib/tablets/data/processing/order.rb +34 -0
- data/lib/tablets/data/processing/paginate.rb +40 -0
- data/lib/tablets/data/query.rb +61 -0
- data/lib/tablets/data.rb +58 -0
- data/lib/tablets/engine.rb +9 -0
- data/lib/tablets/global/configurator.rb +49 -0
- data/lib/tablets/global/loader.rb +37 -0
- data/lib/tablets/global/store.rb +25 -0
- data/lib/tablets/railtie.rb +27 -0
- data/lib/tablets/renderer.rb +84 -0
- data/lib/tablets/tablet.rb +60 -0
- data/lib/tablets/utils/arel.rb +34 -0
- data/lib/tablets/utils/config.rb +75 -0
- data/lib/tablets/version.rb +3 -0
- data/lib/tablets/view_helpers.rb +14 -0
- data/lib/tablets.rb +19 -0
- data/spec/lib/tablets/data/processing/base_spec.rb +19 -0
- data/spec/lib/tablets/data/processing/paginate_spec.rb +73 -0
- data/spec/lib/tablets/global/store_spec.rb +33 -0
- data/spec/lib/tablets/renderer_spec.rb +102 -0
- data/spec/lib/tablets/utils/config_spec.rb +104 -0
- data/spec/lib/tablets/view_helpers_spec.rb +42 -0
- data/spec/spec_helper.rb +92 -0
- metadata +169 -0
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,92 @@
|
|
1
|
+
require 'simplecov'
|
2
|
+
SimpleCov.start do
|
3
|
+
add_filter '/spec/'
|
4
|
+
end
|
5
|
+
|
6
|
+
# This file was generated by the `rails generate rspec:install` command.
|
7
|
+
# Conventionally, all specs live under a `spec` directory, which RSpec adds to
|
8
|
+
# the `$LOAD_PATH`.
|
9
|
+
# The generated `.rspec` file contains `--require spec_helper` which will cause
|
10
|
+
# this file to always be loaded, without a need to explicitly require it in any
|
11
|
+
# files.
|
12
|
+
#
|
13
|
+
# Given that it is always loaded, you are encouraged to keep this file as
|
14
|
+
# light-weight as possible. Requiring heavyweight dependencies from this file
|
15
|
+
# will add to the boot time of your test suite on EVERY test run, even for an
|
16
|
+
# individual file that may not need all of that loaded. Instead, consider making
|
17
|
+
# a separate helper file that requires the additional dependencies and performs
|
18
|
+
# the additional setup, and require it from the spec files that actually need
|
19
|
+
# it.
|
20
|
+
#
|
21
|
+
# The `.rspec` file also contains a few flags that are not defaults but that
|
22
|
+
# users commonly want.
|
23
|
+
#
|
24
|
+
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
25
|
+
RSpec.configure do |config|
|
26
|
+
# rspec-expectations config goes here. You can use an alternate
|
27
|
+
# assertion/expectation library such as wrong or the stdlib/minitest
|
28
|
+
# assertions if you prefer.
|
29
|
+
config.expect_with :rspec do |expectations|
|
30
|
+
# This option will default to `true` in RSpec 4. It makes the `description`
|
31
|
+
# and `failure_message` of custom matchers include text for helper methods
|
32
|
+
# defined using `chain`, e.g.:
|
33
|
+
# be_bigger_than(2).and_smaller_than(4).description
|
34
|
+
# # => "be bigger than 2 and smaller than 4"
|
35
|
+
# ...rather than:
|
36
|
+
# # => "be bigger than 2"
|
37
|
+
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
38
|
+
end
|
39
|
+
|
40
|
+
# rspec-mocks config goes here. You can use an alternate test double
|
41
|
+
# library (such as bogus or mocha) by changing the `mock_with` option here.
|
42
|
+
config.mock_with :rspec do |mocks|
|
43
|
+
# Prevents you from mocking or stubbing a method that does not exist on
|
44
|
+
# a real object. This is generally recommended, and will default to
|
45
|
+
# `true` in RSpec 4.
|
46
|
+
mocks.verify_partial_doubles = true
|
47
|
+
end
|
48
|
+
|
49
|
+
# The settings below are suggested to provide a good initial experience
|
50
|
+
# with RSpec, but feel free to customize to your heart's content.
|
51
|
+
|
52
|
+
# These two settings work together to allow you to limit a spec run
|
53
|
+
# to individual examples or groups you care about by tagging them with
|
54
|
+
# `:focus` metadata. When nothing is tagged with `:focus`, all examples
|
55
|
+
# get run.
|
56
|
+
config.filter_run :focus
|
57
|
+
config.run_all_when_everything_filtered = true
|
58
|
+
|
59
|
+
# Limits the available syntax to the non-monkey patched syntax that is
|
60
|
+
# recommended. For more details, see:
|
61
|
+
# - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
|
62
|
+
# - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
|
63
|
+
# - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
|
64
|
+
config.disable_monkey_patching!
|
65
|
+
|
66
|
+
# Many RSpec users commonly either run the entire suite or an individual
|
67
|
+
# file, and it's useful to allow more verbose output when running an
|
68
|
+
# individual spec file.
|
69
|
+
if config.files_to_run.one?
|
70
|
+
# Use the documentation formatter for detailed output,
|
71
|
+
# unless a formatter has already been configured
|
72
|
+
# (e.g. via a command-line flag).
|
73
|
+
config.default_formatter = 'doc'
|
74
|
+
end
|
75
|
+
|
76
|
+
# Print the 10 slowest examples and example groups at the
|
77
|
+
# end of the spec run, to help surface which specs are running
|
78
|
+
# particularly slow.
|
79
|
+
config.profile_examples = 10
|
80
|
+
|
81
|
+
# Run specs in random order to surface order dependencies. If you find an
|
82
|
+
# order dependency and want to debug it, you can fix the order by providing
|
83
|
+
# the seed, which is printed after each run.
|
84
|
+
# --seed 1234
|
85
|
+
config.order = :random
|
86
|
+
|
87
|
+
# Seed global randomization in this process using the `--seed` CLI option.
|
88
|
+
# Setting this allows you to use `--seed` to deterministically reproduce
|
89
|
+
# test failures related to randomization by passing the same `--seed` value
|
90
|
+
# as the one that triggered the failure.
|
91
|
+
Kernel.srand config.seed
|
92
|
+
end
|
metadata
ADDED
@@ -0,0 +1,169 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: tablets
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Yevhen Shemet
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-05-11 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rails
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 4.2.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 4.2.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: jquery-datatables-rails
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 3.2.0
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 3.2.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: sqlite3
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 1.3.9
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 1.3.9
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 3.2.0
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 3.2.0
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: simplecov
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 0.10.0
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 0.10.0
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rubocop
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 0.30.1
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 0.30.1
|
97
|
+
description:
|
98
|
+
email:
|
99
|
+
- yevhene@gmail.com
|
100
|
+
executables: []
|
101
|
+
extensions: []
|
102
|
+
extra_rdoc_files: []
|
103
|
+
files:
|
104
|
+
- MIT-LICENSE
|
105
|
+
- README.md
|
106
|
+
- Rakefile
|
107
|
+
- app/assets/javascripts/tablets.js.coffee
|
108
|
+
- app/assets/javascripts/tablets/callbacks.js.coffee
|
109
|
+
- app/assets/javascripts/tablets/tablet.js.coffee
|
110
|
+
- app/controllers/tablets/ajax_controller.rb
|
111
|
+
- app/views/tablets/_tablet.html.erb
|
112
|
+
- config/routes.rb
|
113
|
+
- lib/tablets.rb
|
114
|
+
- lib/tablets/data.rb
|
115
|
+
- lib/tablets/data/processing/base.rb
|
116
|
+
- lib/tablets/data/processing/filter.rb
|
117
|
+
- lib/tablets/data/processing/order.rb
|
118
|
+
- lib/tablets/data/processing/paginate.rb
|
119
|
+
- lib/tablets/data/query.rb
|
120
|
+
- lib/tablets/engine.rb
|
121
|
+
- lib/tablets/global/configurator.rb
|
122
|
+
- lib/tablets/global/loader.rb
|
123
|
+
- lib/tablets/global/store.rb
|
124
|
+
- lib/tablets/railtie.rb
|
125
|
+
- lib/tablets/renderer.rb
|
126
|
+
- lib/tablets/tablet.rb
|
127
|
+
- lib/tablets/utils/arel.rb
|
128
|
+
- lib/tablets/utils/config.rb
|
129
|
+
- lib/tablets/version.rb
|
130
|
+
- lib/tablets/view_helpers.rb
|
131
|
+
- spec/lib/tablets/data/processing/base_spec.rb
|
132
|
+
- spec/lib/tablets/data/processing/paginate_spec.rb
|
133
|
+
- spec/lib/tablets/global/store_spec.rb
|
134
|
+
- spec/lib/tablets/renderer_spec.rb
|
135
|
+
- spec/lib/tablets/utils/config_spec.rb
|
136
|
+
- spec/lib/tablets/view_helpers_spec.rb
|
137
|
+
- spec/spec_helper.rb
|
138
|
+
homepage: https://github.com/zenedge/tablets
|
139
|
+
licenses:
|
140
|
+
- MIT
|
141
|
+
metadata: {}
|
142
|
+
post_install_message:
|
143
|
+
rdoc_options: []
|
144
|
+
require_paths:
|
145
|
+
- lib
|
146
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
147
|
+
requirements:
|
148
|
+
- - ">="
|
149
|
+
- !ruby/object:Gem::Version
|
150
|
+
version: '0'
|
151
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
152
|
+
requirements:
|
153
|
+
- - ">="
|
154
|
+
- !ruby/object:Gem::Version
|
155
|
+
version: '0'
|
156
|
+
requirements: []
|
157
|
+
rubyforge_project:
|
158
|
+
rubygems_version: 2.4.5
|
159
|
+
signing_key:
|
160
|
+
specification_version: 4
|
161
|
+
summary: Wrapper around jquery-datatables.
|
162
|
+
test_files:
|
163
|
+
- spec/lib/tablets/utils/config_spec.rb
|
164
|
+
- spec/lib/tablets/view_helpers_spec.rb
|
165
|
+
- spec/lib/tablets/renderer_spec.rb
|
166
|
+
- spec/lib/tablets/data/processing/base_spec.rb
|
167
|
+
- spec/lib/tablets/data/processing/paginate_spec.rb
|
168
|
+
- spec/lib/tablets/global/store_spec.rb
|
169
|
+
- spec/spec_helper.rb
|