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.
Files changed (54) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +7 -0
  3. data/.rubocop.yml +96 -0
  4. data/Gemfile +9 -1
  5. data/Gemfile.lock +153 -118
  6. data/LICENSE.md +1 -1
  7. data/README.md +11 -23
  8. data/Rakefile +11 -0
  9. data/administrate-field-jsontable.gemspec +8 -6
  10. data/app/views/fields/jsontable/_index.html.erb +18 -0
  11. data/app/views/fields/jsontable/_json_table_field.html.erb +30 -0
  12. data/app/views/fields/jsontable/_show.html.erb +6 -33
  13. data/lib/administrate/field/jsontable.rb +2 -0
  14. data/spec/example_app/app/assets/config/manifest.js +2 -0
  15. data/spec/example_app/app/assets/javascripts/application.js +15 -0
  16. data/spec/example_app/app/assets/stylesheets/application.css +15 -0
  17. data/spec/example_app/app/controllers/application_controller.rb +7 -0
  18. data/spec/example_app/app/models/application_record.rb +5 -0
  19. data/spec/example_app/app/views/layouts/application.html.erb +31 -0
  20. data/spec/example_app/app/views/pages/.keep +0 -0
  21. data/spec/example_app/config.ru +6 -0
  22. data/spec/example_app/config/application.rb +39 -0
  23. data/spec/example_app/config/boot.rb +4 -0
  24. data/spec/example_app/config/database.yml +11 -0
  25. data/spec/example_app/config/environment.rb +7 -0
  26. data/spec/example_app/config/environments/development.rb +39 -0
  27. data/spec/example_app/config/environments/production.rb +78 -0
  28. data/spec/example_app/config/environments/staging.rb +3 -0
  29. data/spec/example_app/config/environments/test.rb +43 -0
  30. data/spec/example_app/config/initializers/assets.rb +13 -0
  31. data/spec/example_app/config/initializers/backtrace_silencers.rb +8 -0
  32. data/spec/example_app/config/initializers/cookies_serializer.rb +5 -0
  33. data/spec/example_app/config/initializers/disable_xml_params.rb +5 -0
  34. data/spec/example_app/config/initializers/errors.rb +20 -0
  35. data/spec/example_app/config/initializers/filter_parameter_logging.rb +6 -0
  36. data/spec/example_app/config/initializers/inflections.rb +18 -0
  37. data/spec/example_app/config/initializers/json_encoding.rb +3 -0
  38. data/spec/example_app/config/initializers/mime_types.rb +5 -0
  39. data/spec/example_app/config/initializers/session_store.rb +5 -0
  40. data/spec/example_app/config/initializers/wrap_parameters.rb +16 -0
  41. data/spec/example_app/config/routes.rb +4 -0
  42. data/spec/example_app/config/secrets.yml +15 -0
  43. data/spec/example_app/db/schema.rb +18 -0
  44. data/spec/example_app/db/seeds.rb +8 -0
  45. data/spec/example_app/public/robots.txt +5 -0
  46. data/spec/fixtures/jsontable/array_contains_hash.html +1 -0
  47. data/spec/fixtures/jsontable/hash_contains_array.html +31 -0
  48. data/spec/fixtures/jsontable/pure_hash.html +58 -0
  49. data/spec/lib/administrate/field/jsontable_index_spec.rb +95 -0
  50. data/spec/lib/administrate/field/jsontable_show_spec.rb +95 -0
  51. data/spec/lib/administrate/field/jsontable_spec.rb +16 -5
  52. data/spec/rails_helper.rb +6 -0
  53. data/spec/support/read_fixture.rb +7 -0
  54. metadata +93 -17
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 59e9d9dd36f223fce8b089fb5598192c8771eb55
4
- data.tar.gz: a6c4258a03ce324cb17a77d2f1e1a7952d59927b
2
+ SHA256:
3
+ metadata.gz: 3d52f9f6537c4fa827f6bffc6fa4d128493ab1b8ad2021b124c05b83f28a5172
4
+ data.tar.gz: 0523d9e15436ee8b132ad71cf2b5dc08c85291d82dfcadcb71976b55c2216eaf
5
5
  SHA512:
6
- metadata.gz: b37c6b4b52af795c212b5b4cd7b99290a57d91a96d28612bb20c6c03d37e3dcefd21495e1527c7459e4dfce21ed13f2ecbdb72d1c950c47af17a87f8a2f775d4
7
- data.tar.gz: 06d409c0c30ef039a892712f6f05abc772bbdf68f11fac58d806c8c098ad6d07133f6fe4bbe0a6a477ee964439a14cb999da1ed4561b89864b56cbc5abd901f3
6
+ metadata.gz: f73481e36d991371b123cf24584c2c59d34eb960394f61d87a8789244f6ef138d12eb59f474392ff68244256b1f379d0643bcdf8cd7dfacf73605fcc57eb3870
7
+ data.tar.gz: c4a82e46dba7122d8ce0803111f08c62b5e4ec7b5591f8a9a7d97b7a105c7ae71651bb48b50e0e8699a5a6a046e76d873572a0e3e5fd70bac1c3a86833a177cb
@@ -0,0 +1,7 @@
1
+ *.gem
2
+
3
+ # Ignore all logfiles and tempfiles.
4
+ /log/*
5
+ /spec/example_app/log/*
6
+ /tmp/*
7
+ /spec/example_app/tmp/*
@@ -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 'rspec-rails', '~> 3.5.0'
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
@@ -1,181 +1,216 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- administrate-field-jsontable (0.0.1)
4
+ administrate-field-jsontable (0.0.4)
5
5
  administrate
6
- rails (>= 4.2, < 5.1)
6
+ rails (>= 4.2)
7
7
 
8
8
  GEM
9
9
  remote: http://rubygems.org/
10
10
  specs:
11
- actioncable (5.0.3)
12
- actionpack (= 5.0.3)
13
- nio4r (>= 1.2, < 3.0)
14
- websocket-driver (~> 0.6.1)
15
- actionmailer (5.0.3)
16
- actionpack (= 5.0.3)
17
- actionview (= 5.0.3)
18
- activejob (= 5.0.3)
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.0.3)
22
- actionview (= 5.0.3)
23
- activesupport (= 5.0.3)
21
+ actionpack (5.2.3)
22
+ actionview (= 5.2.3)
23
+ activesupport (= 5.2.3)
24
24
  rack (~> 2.0)
25
- rack-test (~> 0.6.3)
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.0.3)
29
- activesupport (= 5.0.3)
28
+ actionview (5.2.3)
29
+ activesupport (= 5.2.3)
30
30
  builder (~> 3.1)
31
- erubis (~> 2.7.0)
31
+ erubi (~> 1.4)
32
32
  rails-dom-testing (~> 2.0)
33
33
  rails-html-sanitizer (~> 1.0, >= 1.0.3)
34
- activejob (5.0.3)
35
- activesupport (= 5.0.3)
34
+ activejob (5.2.3)
35
+ activesupport (= 5.2.3)
36
36
  globalid (>= 0.3.6)
37
- activemodel (5.0.3)
38
- activesupport (= 5.0.3)
39
- activerecord (5.0.3)
40
- activemodel (= 5.0.3)
41
- activesupport (= 5.0.3)
42
- arel (~> 7.0)
43
- activesupport (5.0.3)
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 (~> 0.7)
49
+ i18n (>= 0.7, < 2)
46
50
  minitest (~> 5.1)
47
51
  tzinfo (~> 1.1)
48
- administrate (0.7.0)
49
- actionpack (>= 4.2, < 5.1)
50
- actionview (>= 4.2, < 5.1)
51
- activerecord (>= 4.2, < 5.1)
52
- autoprefixer-rails (~> 6.0)
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
- normalize-rails (>= 3.0)
58
- sass-rails (~> 5.0)
61
+ sassc-rails (~> 2.1)
59
62
  selectize-rails (~> 0.6)
60
- arel (7.1.4)
61
- autoprefixer-rails (6.7.7.2)
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.0.5)
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.3)
68
- erubis (2.7.0)
72
+ diff-lcs (1.4.4)
73
+ erubi (1.8.0)
69
74
  execjs (2.7.0)
70
- globalid (0.4.0)
75
+ ffi (1.13.1)
76
+ globalid (0.4.2)
71
77
  activesupport (>= 4.2.0)
72
- i18n (0.8.1)
73
- jquery-rails (4.3.1)
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.0.1)
84
+ kaminari (1.2.1)
78
85
  activesupport (>= 4.1.0)
79
- kaminari-actionview (= 1.0.1)
80
- kaminari-activerecord (= 1.0.1)
81
- kaminari-core (= 1.0.1)
82
- kaminari-actionview (1.0.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.0.1)
85
- kaminari-activerecord (1.0.1)
91
+ kaminari-core (= 1.2.1)
92
+ kaminari-activerecord (1.2.1)
86
93
  activerecord
87
- kaminari-core (= 1.0.1)
88
- kaminari-core (1.0.1)
89
- loofah (2.0.3)
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.6.5)
92
- mime-types (>= 1.16, < 4)
93
- method_source (0.8.2)
94
- mime-types (3.1)
95
- mime-types-data (~> 3.2015)
96
- mime-types-data (3.2016.0521)
97
- mini_portile2 (2.1.0)
98
- minitest (5.10.2)
99
- momentjs-rails (2.17.1)
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.0.0)
102
- nokogiri (1.7.2)
103
- mini_portile2 (~> 2.1.0)
104
- normalize-rails (4.1.1)
105
- rack (2.0.3)
106
- rack-test (0.6.3)
107
- rack (>= 1.0)
108
- rails (5.0.3)
109
- actioncable (= 5.0.3)
110
- actionmailer (= 5.0.3)
111
- actionpack (= 5.0.3)
112
- actionview (= 5.0.3)
113
- activejob (= 5.0.3)
114
- activemodel (= 5.0.3)
115
- activerecord (= 5.0.3)
116
- activesupport (= 5.0.3)
117
- bundler (>= 1.3.0, < 2.0)
118
- railties (= 5.0.3)
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.3)
124
- loofah (~> 2.0)
125
- railties (5.0.3)
126
- actionpack (= 5.0.3)
127
- activesupport (= 5.0.3)
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.18.1, < 2.0)
131
- rake (12.0.0)
132
- rspec-core (3.5.4)
133
- rspec-support (~> 3.5.0)
134
- rspec-expectations (3.5.0)
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.5.0)
137
- rspec-mocks (3.5.0)
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.5.0)
140
- rspec-rails (3.5.2)
141
- actionpack (>= 3.0)
142
- activesupport (>= 3.0)
143
- railties (>= 3.0)
144
- rspec-core (~> 3.5.0)
145
- rspec-expectations (~> 3.5.0)
146
- rspec-mocks (~> 3.5.0)
147
- rspec-support (~> 3.5.0)
148
- rspec-support (3.5.0)
149
- sass (3.4.24)
150
- sass-rails (5.0.6)
151
- railties (>= 4.0.0, < 6)
152
- sass (~> 3.1)
153
- sprockets (>= 2.8, < 4.0)
154
- sprockets-rails (>= 2.0, < 4.0)
155
- tilt (>= 1.1, < 3)
156
- selectize-rails (0.12.4)
157
- sprockets (3.7.1)
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.0)
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.19.4)
193
+ thor (0.20.3)
165
194
  thread_safe (0.3.6)
166
- tilt (2.0.7)
167
- tzinfo (1.2.3)
195
+ tilt (2.0.10)
196
+ tzinfo (1.2.5)
168
197
  thread_safe (~> 0.1)
169
- websocket-driver (0.6.5)
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.2)
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
- rspec-rails (~> 3.5.0)
211
+ pg (= 0.21.0)
212
+ rspec-rails (~> 4.0.0)
213
+ rubocop
179
214
 
180
215
  BUNDLED WITH
181
- 1.14.6
216
+ 1.17.3