administrate-field-jsontable 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +7 -0
- data/.rubocop.yml +96 -0
- data/Gemfile +9 -1
- data/Gemfile.lock +153 -118
- data/LICENSE.md +1 -1
- data/README.md +11 -23
- data/Rakefile +11 -0
- data/administrate-field-jsontable.gemspec +8 -6
- data/app/views/fields/jsontable/_index.html.erb +18 -0
- data/app/views/fields/jsontable/_json_table_field.html.erb +30 -0
- data/app/views/fields/jsontable/_show.html.erb +6 -33
- data/lib/administrate/field/jsontable.rb +2 -0
- data/spec/example_app/app/assets/config/manifest.js +2 -0
- data/spec/example_app/app/assets/javascripts/application.js +15 -0
- data/spec/example_app/app/assets/stylesheets/application.css +15 -0
- data/spec/example_app/app/controllers/application_controller.rb +7 -0
- data/spec/example_app/app/models/application_record.rb +5 -0
- data/spec/example_app/app/views/layouts/application.html.erb +31 -0
- data/spec/example_app/app/views/pages/.keep +0 -0
- data/spec/example_app/config.ru +6 -0
- data/spec/example_app/config/application.rb +39 -0
- data/spec/example_app/config/boot.rb +4 -0
- data/spec/example_app/config/database.yml +11 -0
- data/spec/example_app/config/environment.rb +7 -0
- data/spec/example_app/config/environments/development.rb +39 -0
- data/spec/example_app/config/environments/production.rb +78 -0
- data/spec/example_app/config/environments/staging.rb +3 -0
- data/spec/example_app/config/environments/test.rb +43 -0
- data/spec/example_app/config/initializers/assets.rb +13 -0
- data/spec/example_app/config/initializers/backtrace_silencers.rb +8 -0
- data/spec/example_app/config/initializers/cookies_serializer.rb +5 -0
- data/spec/example_app/config/initializers/disable_xml_params.rb +5 -0
- data/spec/example_app/config/initializers/errors.rb +20 -0
- data/spec/example_app/config/initializers/filter_parameter_logging.rb +6 -0
- data/spec/example_app/config/initializers/inflections.rb +18 -0
- data/spec/example_app/config/initializers/json_encoding.rb +3 -0
- data/spec/example_app/config/initializers/mime_types.rb +5 -0
- data/spec/example_app/config/initializers/session_store.rb +5 -0
- data/spec/example_app/config/initializers/wrap_parameters.rb +16 -0
- data/spec/example_app/config/routes.rb +4 -0
- data/spec/example_app/config/secrets.yml +15 -0
- data/spec/example_app/db/schema.rb +18 -0
- data/spec/example_app/db/seeds.rb +8 -0
- data/spec/example_app/public/robots.txt +5 -0
- data/spec/fixtures/jsontable/array_contains_hash.html +1 -0
- data/spec/fixtures/jsontable/hash_contains_array.html +31 -0
- data/spec/fixtures/jsontable/pure_hash.html +58 -0
- data/spec/lib/administrate/field/jsontable_index_spec.rb +95 -0
- data/spec/lib/administrate/field/jsontable_show_spec.rb +95 -0
- data/spec/lib/administrate/field/jsontable_spec.rb +16 -5
- data/spec/rails_helper.rb +6 -0
- data/spec/support/read_fixture.rb +7 -0
- metadata +93 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 3d52f9f6537c4fa827f6bffc6fa4d128493ab1b8ad2021b124c05b83f28a5172
|
4
|
+
data.tar.gz: 0523d9e15436ee8b132ad71cf2b5dc08c85291d82dfcadcb71976b55c2216eaf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f73481e36d991371b123cf24584c2c59d34eb960394f61d87a8789244f6ef138d12eb59f474392ff68244256b1f379d0643bcdf8cd7dfacf73605fcc57eb3870
|
7
|
+
data.tar.gz: c4a82e46dba7122d8ce0803111f08c62b5e4ec7b5591f8a9a7d97b7a105c7ae71651bb48b50e0e8699a5a6a046e76d873572a0e3e5fd70bac1c3a86833a177cb
|
data/.gitignore
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,96 @@
|
|
1
|
+
#############################
|
2
|
+
#
|
3
|
+
# Metrics
|
4
|
+
#
|
5
|
+
#############################
|
6
|
+
|
7
|
+
Metrics/BlockLength:
|
8
|
+
Exclude:
|
9
|
+
- 'spec/lib/administrate/field/*.rb'
|
10
|
+
|
11
|
+
#############################
|
12
|
+
#
|
13
|
+
# Layout
|
14
|
+
#
|
15
|
+
#############################
|
16
|
+
|
17
|
+
Layout/EmptyLinesAroundAttributeAccessor:
|
18
|
+
Enabled: true
|
19
|
+
|
20
|
+
Layout/SpaceAroundMethodCallOperator:
|
21
|
+
Enabled: true
|
22
|
+
|
23
|
+
#############################
|
24
|
+
#
|
25
|
+
# Lint
|
26
|
+
#
|
27
|
+
#############################
|
28
|
+
|
29
|
+
Lint/DeprecatedOpenSSLConstant:
|
30
|
+
Enabled: true
|
31
|
+
|
32
|
+
Lint/DuplicateElsifCondition:
|
33
|
+
Enabled: true
|
34
|
+
|
35
|
+
Lint/MixedRegexpCaptureTypes:
|
36
|
+
Enabled: true
|
37
|
+
|
38
|
+
Lint/RaiseException:
|
39
|
+
Enabled: true
|
40
|
+
|
41
|
+
Lint/StructNewOverride:
|
42
|
+
Enabled: true
|
43
|
+
|
44
|
+
#############################
|
45
|
+
#
|
46
|
+
# Style
|
47
|
+
#
|
48
|
+
#############################
|
49
|
+
|
50
|
+
Style/AccessorGrouping:
|
51
|
+
Enabled: true
|
52
|
+
|
53
|
+
Style/ArrayCoercion:
|
54
|
+
Enabled: true
|
55
|
+
|
56
|
+
Style/BisectedAttrAccessor:
|
57
|
+
Enabled: true
|
58
|
+
|
59
|
+
Style/CaseLikeIf:
|
60
|
+
Enabled: true
|
61
|
+
|
62
|
+
Style/ExponentialNotation:
|
63
|
+
Enabled: true
|
64
|
+
|
65
|
+
Style/HashAsLastArrayItem:
|
66
|
+
Enabled: true
|
67
|
+
|
68
|
+
Style/HashEachMethods:
|
69
|
+
Enabled: true
|
70
|
+
|
71
|
+
Style/HashLikeCase:
|
72
|
+
Enabled: true
|
73
|
+
|
74
|
+
Style/HashTransformKeys:
|
75
|
+
Enabled: true
|
76
|
+
|
77
|
+
Style/HashTransformValues:
|
78
|
+
Enabled: true
|
79
|
+
|
80
|
+
Style/RedundantAssignment:
|
81
|
+
Enabled: true
|
82
|
+
|
83
|
+
Style/RedundantFetchBlock:
|
84
|
+
Enabled: true
|
85
|
+
|
86
|
+
Style/RedundantFileExtensionInRequire:
|
87
|
+
Enabled: true
|
88
|
+
|
89
|
+
Style/RedundantRegexpCharacterClass:
|
90
|
+
Enabled: true
|
91
|
+
|
92
|
+
Style/RedundantRegexpEscape:
|
93
|
+
Enabled: true
|
94
|
+
|
95
|
+
Style/SlicingWithRange:
|
96
|
+
Enabled: true
|
data/Gemfile
CHANGED
@@ -1,7 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
source 'http://rubygems.org'
|
2
4
|
|
3
5
|
gemspec
|
4
6
|
|
5
7
|
group :development, :test do
|
6
|
-
gem '
|
8
|
+
gem 'actionpack', '~> 5.2.0'
|
9
|
+
gem 'actionview', '~> 5.2.0'
|
10
|
+
gem 'activerecord', '~> 5.2.0'
|
11
|
+
gem 'pg', '0.21.0'
|
12
|
+
|
13
|
+
gem 'rspec-rails', '~> 4.0.0'
|
14
|
+
gem 'rubocop', require: false
|
7
15
|
end
|
data/Gemfile.lock
CHANGED
@@ -1,181 +1,216 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
administrate-field-jsontable (0.0.
|
4
|
+
administrate-field-jsontable (0.0.4)
|
5
5
|
administrate
|
6
|
-
rails (>= 4.2
|
6
|
+
rails (>= 4.2)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: http://rubygems.org/
|
10
10
|
specs:
|
11
|
-
actioncable (5.
|
12
|
-
actionpack (= 5.
|
13
|
-
nio4r (
|
14
|
-
websocket-driver (
|
15
|
-
actionmailer (5.
|
16
|
-
actionpack (= 5.
|
17
|
-
actionview (= 5.
|
18
|
-
activejob (= 5.
|
11
|
+
actioncable (5.2.3)
|
12
|
+
actionpack (= 5.2.3)
|
13
|
+
nio4r (~> 2.0)
|
14
|
+
websocket-driver (>= 0.6.1)
|
15
|
+
actionmailer (5.2.3)
|
16
|
+
actionpack (= 5.2.3)
|
17
|
+
actionview (= 5.2.3)
|
18
|
+
activejob (= 5.2.3)
|
19
19
|
mail (~> 2.5, >= 2.5.4)
|
20
20
|
rails-dom-testing (~> 2.0)
|
21
|
-
actionpack (5.
|
22
|
-
actionview (= 5.
|
23
|
-
activesupport (= 5.
|
21
|
+
actionpack (5.2.3)
|
22
|
+
actionview (= 5.2.3)
|
23
|
+
activesupport (= 5.2.3)
|
24
24
|
rack (~> 2.0)
|
25
|
-
rack-test (
|
25
|
+
rack-test (>= 0.6.3)
|
26
26
|
rails-dom-testing (~> 2.0)
|
27
27
|
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
28
|
-
actionview (5.
|
29
|
-
activesupport (= 5.
|
28
|
+
actionview (5.2.3)
|
29
|
+
activesupport (= 5.2.3)
|
30
30
|
builder (~> 3.1)
|
31
|
-
|
31
|
+
erubi (~> 1.4)
|
32
32
|
rails-dom-testing (~> 2.0)
|
33
33
|
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
34
|
-
activejob (5.
|
35
|
-
activesupport (= 5.
|
34
|
+
activejob (5.2.3)
|
35
|
+
activesupport (= 5.2.3)
|
36
36
|
globalid (>= 0.3.6)
|
37
|
-
activemodel (5.
|
38
|
-
activesupport (= 5.
|
39
|
-
activerecord (5.
|
40
|
-
activemodel (= 5.
|
41
|
-
activesupport (= 5.
|
42
|
-
arel (
|
43
|
-
|
37
|
+
activemodel (5.2.3)
|
38
|
+
activesupport (= 5.2.3)
|
39
|
+
activerecord (5.2.3)
|
40
|
+
activemodel (= 5.2.3)
|
41
|
+
activesupport (= 5.2.3)
|
42
|
+
arel (>= 9.0)
|
43
|
+
activestorage (5.2.3)
|
44
|
+
actionpack (= 5.2.3)
|
45
|
+
activerecord (= 5.2.3)
|
46
|
+
marcel (~> 0.3.1)
|
47
|
+
activesupport (5.2.3)
|
44
48
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
45
|
-
i18n (
|
49
|
+
i18n (>= 0.7, < 2)
|
46
50
|
minitest (~> 5.1)
|
47
51
|
tzinfo (~> 1.1)
|
48
|
-
administrate (0.
|
49
|
-
actionpack (>= 4.2
|
50
|
-
actionview (>= 4.2
|
51
|
-
activerecord (>= 4.2
|
52
|
-
autoprefixer-rails (
|
52
|
+
administrate (0.14.0)
|
53
|
+
actionpack (>= 4.2)
|
54
|
+
actionview (>= 4.2)
|
55
|
+
activerecord (>= 4.2)
|
56
|
+
autoprefixer-rails (>= 6.0)
|
53
57
|
datetime_picker_rails (~> 0.0.7)
|
54
58
|
jquery-rails (>= 4.0)
|
55
59
|
kaminari (>= 1.0)
|
56
60
|
momentjs-rails (~> 2.8)
|
57
|
-
|
58
|
-
sass-rails (~> 5.0)
|
61
|
+
sassc-rails (~> 2.1)
|
59
62
|
selectize-rails (~> 0.6)
|
60
|
-
arel (
|
61
|
-
|
63
|
+
arel (9.0.0)
|
64
|
+
ast (2.4.1)
|
65
|
+
autoprefixer-rails (9.8.5)
|
62
66
|
execjs
|
63
67
|
builder (3.2.3)
|
64
|
-
concurrent-ruby (1.
|
68
|
+
concurrent-ruby (1.1.5)
|
69
|
+
crass (1.0.4)
|
65
70
|
datetime_picker_rails (0.0.7)
|
66
71
|
momentjs-rails (>= 2.8.1)
|
67
|
-
diff-lcs (1.
|
68
|
-
|
72
|
+
diff-lcs (1.4.4)
|
73
|
+
erubi (1.8.0)
|
69
74
|
execjs (2.7.0)
|
70
|
-
|
75
|
+
ffi (1.13.1)
|
76
|
+
globalid (0.4.2)
|
71
77
|
activesupport (>= 4.2.0)
|
72
|
-
i18n (
|
73
|
-
|
78
|
+
i18n (1.6.0)
|
79
|
+
concurrent-ruby (~> 1.0)
|
80
|
+
jquery-rails (4.4.0)
|
74
81
|
rails-dom-testing (>= 1, < 3)
|
75
82
|
railties (>= 4.2.0)
|
76
83
|
thor (>= 0.14, < 2.0)
|
77
|
-
kaminari (1.
|
84
|
+
kaminari (1.2.1)
|
78
85
|
activesupport (>= 4.1.0)
|
79
|
-
kaminari-actionview (= 1.
|
80
|
-
kaminari-activerecord (= 1.
|
81
|
-
kaminari-core (= 1.
|
82
|
-
kaminari-actionview (1.
|
86
|
+
kaminari-actionview (= 1.2.1)
|
87
|
+
kaminari-activerecord (= 1.2.1)
|
88
|
+
kaminari-core (= 1.2.1)
|
89
|
+
kaminari-actionview (1.2.1)
|
83
90
|
actionview
|
84
|
-
kaminari-core (= 1.
|
85
|
-
kaminari-activerecord (1.
|
91
|
+
kaminari-core (= 1.2.1)
|
92
|
+
kaminari-activerecord (1.2.1)
|
86
93
|
activerecord
|
87
|
-
kaminari-core (= 1.
|
88
|
-
kaminari-core (1.
|
89
|
-
loofah (2.
|
94
|
+
kaminari-core (= 1.2.1)
|
95
|
+
kaminari-core (1.2.1)
|
96
|
+
loofah (2.2.3)
|
97
|
+
crass (~> 1.0.2)
|
90
98
|
nokogiri (>= 1.5.9)
|
91
|
-
mail (2.
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
99
|
+
mail (2.7.1)
|
100
|
+
mini_mime (>= 0.1.1)
|
101
|
+
marcel (0.3.3)
|
102
|
+
mimemagic (~> 0.3.2)
|
103
|
+
method_source (0.9.2)
|
104
|
+
mimemagic (0.3.5)
|
105
|
+
mini_mime (1.0.2)
|
106
|
+
mini_portile2 (2.4.0)
|
107
|
+
minitest (5.11.3)
|
108
|
+
momentjs-rails (2.20.1)
|
100
109
|
railties (>= 3.1)
|
101
|
-
nio4r (2.
|
102
|
-
nokogiri (1.
|
103
|
-
mini_portile2 (~> 2.
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
110
|
+
nio4r (2.5.2)
|
111
|
+
nokogiri (1.10.3)
|
112
|
+
mini_portile2 (~> 2.4.0)
|
113
|
+
parallel (1.19.2)
|
114
|
+
parser (2.7.1.4)
|
115
|
+
ast (~> 2.4.1)
|
116
|
+
pg (0.21.0)
|
117
|
+
rack (2.0.7)
|
118
|
+
rack-test (1.1.0)
|
119
|
+
rack (>= 1.0, < 3)
|
120
|
+
rails (5.2.3)
|
121
|
+
actioncable (= 5.2.3)
|
122
|
+
actionmailer (= 5.2.3)
|
123
|
+
actionpack (= 5.2.3)
|
124
|
+
actionview (= 5.2.3)
|
125
|
+
activejob (= 5.2.3)
|
126
|
+
activemodel (= 5.2.3)
|
127
|
+
activerecord (= 5.2.3)
|
128
|
+
activestorage (= 5.2.3)
|
129
|
+
activesupport (= 5.2.3)
|
130
|
+
bundler (>= 1.3.0)
|
131
|
+
railties (= 5.2.3)
|
119
132
|
sprockets-rails (>= 2.0.0)
|
120
133
|
rails-dom-testing (2.0.3)
|
121
134
|
activesupport (>= 4.2.0)
|
122
135
|
nokogiri (>= 1.6)
|
123
|
-
rails-html-sanitizer (1.0.
|
124
|
-
loofah (~> 2.
|
125
|
-
railties (5.
|
126
|
-
actionpack (= 5.
|
127
|
-
activesupport (= 5.
|
136
|
+
rails-html-sanitizer (1.0.4)
|
137
|
+
loofah (~> 2.2, >= 2.2.2)
|
138
|
+
railties (5.2.3)
|
139
|
+
actionpack (= 5.2.3)
|
140
|
+
activesupport (= 5.2.3)
|
128
141
|
method_source
|
129
142
|
rake (>= 0.8.7)
|
130
|
-
thor (>= 0.
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
143
|
+
thor (>= 0.19.0, < 2.0)
|
144
|
+
rainbow (3.0.0)
|
145
|
+
rake (12.3.2)
|
146
|
+
regexp_parser (1.7.1)
|
147
|
+
rexml (3.2.4)
|
148
|
+
rspec-core (3.9.2)
|
149
|
+
rspec-support (~> 3.9.3)
|
150
|
+
rspec-expectations (3.9.2)
|
135
151
|
diff-lcs (>= 1.2.0, < 2.0)
|
136
|
-
rspec-support (~> 3.
|
137
|
-
rspec-mocks (3.
|
152
|
+
rspec-support (~> 3.9.0)
|
153
|
+
rspec-mocks (3.9.1)
|
138
154
|
diff-lcs (>= 1.2.0, < 2.0)
|
139
|
-
rspec-support (~> 3.
|
140
|
-
rspec-rails (
|
141
|
-
actionpack (>=
|
142
|
-
activesupport (>=
|
143
|
-
railties (>=
|
144
|
-
rspec-core (~> 3.
|
145
|
-
rspec-expectations (~> 3.
|
146
|
-
rspec-mocks (~> 3.
|
147
|
-
rspec-support (~> 3.
|
148
|
-
rspec-support (3.
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
155
|
+
rspec-support (~> 3.9.0)
|
156
|
+
rspec-rails (4.0.1)
|
157
|
+
actionpack (>= 4.2)
|
158
|
+
activesupport (>= 4.2)
|
159
|
+
railties (>= 4.2)
|
160
|
+
rspec-core (~> 3.9)
|
161
|
+
rspec-expectations (~> 3.9)
|
162
|
+
rspec-mocks (~> 3.9)
|
163
|
+
rspec-support (~> 3.9)
|
164
|
+
rspec-support (3.9.3)
|
165
|
+
rubocop (0.88.0)
|
166
|
+
parallel (~> 1.10)
|
167
|
+
parser (>= 2.7.1.1)
|
168
|
+
rainbow (>= 2.2.2, < 4.0)
|
169
|
+
regexp_parser (>= 1.7)
|
170
|
+
rexml
|
171
|
+
rubocop-ast (>= 0.1.0, < 1.0)
|
172
|
+
ruby-progressbar (~> 1.7)
|
173
|
+
unicode-display_width (>= 1.4.0, < 2.0)
|
174
|
+
rubocop-ast (0.2.0)
|
175
|
+
parser (>= 2.7.0.1)
|
176
|
+
ruby-progressbar (1.10.1)
|
177
|
+
sassc (2.4.0)
|
178
|
+
ffi (~> 1.9)
|
179
|
+
sassc-rails (2.1.2)
|
180
|
+
railties (>= 4.0.0)
|
181
|
+
sassc (>= 2.0)
|
182
|
+
sprockets (> 3.0)
|
183
|
+
sprockets-rails
|
184
|
+
tilt
|
185
|
+
selectize-rails (0.12.6)
|
186
|
+
sprockets (4.0.2)
|
158
187
|
concurrent-ruby (~> 1.0)
|
159
188
|
rack (> 1, < 3)
|
160
|
-
sprockets-rails (3.2.
|
189
|
+
sprockets-rails (3.2.1)
|
161
190
|
actionpack (>= 4.0)
|
162
191
|
activesupport (>= 4.0)
|
163
192
|
sprockets (>= 3.0.0)
|
164
|
-
thor (0.
|
193
|
+
thor (0.20.3)
|
165
194
|
thread_safe (0.3.6)
|
166
|
-
tilt (2.0.
|
167
|
-
tzinfo (1.2.
|
195
|
+
tilt (2.0.10)
|
196
|
+
tzinfo (1.2.5)
|
168
197
|
thread_safe (~> 0.1)
|
169
|
-
|
198
|
+
unicode-display_width (1.7.0)
|
199
|
+
websocket-driver (0.7.3)
|
170
200
|
websocket-extensions (>= 0.1.0)
|
171
|
-
websocket-extensions (0.1.
|
201
|
+
websocket-extensions (0.1.5)
|
172
202
|
|
173
203
|
PLATFORMS
|
174
204
|
ruby
|
175
205
|
|
176
206
|
DEPENDENCIES
|
207
|
+
actionpack (~> 5.2.0)
|
208
|
+
actionview (~> 5.2.0)
|
209
|
+
activerecord (~> 5.2.0)
|
177
210
|
administrate-field-jsontable!
|
178
|
-
|
211
|
+
pg (= 0.21.0)
|
212
|
+
rspec-rails (~> 4.0.0)
|
213
|
+
rubocop
|
179
214
|
|
180
215
|
BUNDLED WITH
|
181
|
-
1.
|
216
|
+
1.17.3
|