activeadmin 1.4.3 → 2.0.0
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 +92 -11
- data/CONTRIBUTING.md +12 -11
- data/README.md +34 -8
- data/app/assets/javascripts/active_admin/base.es6 +23 -0
- data/app/assets/javascripts/active_admin/ext/jquery-ui.es6 +7 -0
- data/app/assets/javascripts/active_admin/ext/jquery.es6 +9 -0
- data/app/assets/javascripts/active_admin/initializers/datepicker.es6 +16 -0
- data/app/assets/javascripts/active_admin/initializers/filters.es6 +45 -0
- data/app/assets/javascripts/active_admin/initializers/tabs.es6 +6 -0
- data/app/assets/javascripts/active_admin/lib/active_admin.es6 +41 -0
- data/app/assets/javascripts/active_admin/lib/batch_actions.es6 +55 -0
- data/app/assets/javascripts/active_admin/lib/checkbox-toggler.es6 +49 -0
- data/app/assets/javascripts/active_admin/lib/dropdown-menu.es6 +123 -0
- data/app/assets/javascripts/active_admin/lib/has_many.es6 +95 -0
- data/app/assets/javascripts/active_admin/lib/modal_dialog.es6 +61 -0
- data/app/assets/javascripts/active_admin/lib/per_page.es6 +47 -0
- data/app/assets/javascripts/active_admin/lib/table-checkbox-toggler.es6 +36 -0
- data/app/assets/stylesheets/active_admin/_forms.scss +2 -14
- data/app/assets/stylesheets/active_admin/components/_status_tags.scss +0 -5
- data/app/assets/stylesheets/active_admin/components/_tabs.scss +1 -1
- data/app/assets/stylesheets/active_admin/mixins/_gradients.scss +1 -1
- data/app/views/active_admin/devise/confirmations/new.html.erb +1 -1
- data/app/views/active_admin/devise/passwords/edit.html.erb +1 -1
- data/app/views/active_admin/devise/passwords/new.html.erb +1 -1
- data/app/views/active_admin/devise/registrations/new.html.erb +1 -2
- data/app/views/active_admin/devise/shared/_error_messages.html.erb +15 -0
- data/app/views/active_admin/devise/unlocks/new.html.erb +1 -1
- data/app/views/layouts/active_admin_logged_out.html.erb +1 -1
- data/config/locales/bg.yml +0 -1
- data/config/locales/he.yml +0 -1
- data/config/locales/hu.yml +4 -0
- data/config/locales/lt.yml +2 -2
- data/config/locales/uk.yml +2 -0
- data/docs/0-installation.md +2 -2
- data/docs/13-authorization-adapter.md +4 -4
- data/docs/CNAME +1 -1
- data/docs/index.html +2 -2
- data/lib/active_admin/application.rb +8 -14
- data/lib/active_admin/application_settings.rb +3 -0
- data/lib/active_admin/asset_registration.rb +0 -8
- data/lib/active_admin/base_controller/authorization.rb +2 -4
- data/lib/active_admin/base_controller.rb +6 -6
- data/lib/active_admin/batch_actions/controller.rb +1 -1
- data/lib/active_admin/batch_actions/resource_extension.rb +4 -4
- data/lib/active_admin/callbacks.rb +1 -1
- data/lib/active_admin/csv_builder.rb +1 -1
- data/lib/active_admin/dependency.rb +7 -75
- data/lib/active_admin/dsl.rb +1 -8
- data/lib/active_admin/error.rb +1 -1
- data/lib/active_admin/filters/active_filter.rb +3 -1
- data/lib/active_admin/filters/active_sidebar.rb +5 -1
- data/lib/active_admin/filters/forms.rb +2 -2
- data/lib/active_admin/filters/formtastic_addons.rb +1 -1
- data/lib/active_admin/filters/resource_extension.rb +3 -3
- data/lib/active_admin/form_builder.rb +3 -3
- data/lib/active_admin/generators/boilerplate.rb +1 -1
- data/lib/active_admin/helpers/scope_chain.rb +1 -0
- data/lib/active_admin/inputs/datepicker_input.rb +1 -1
- data/lib/active_admin/inputs/filters/base/search_method_select.rb +2 -2
- data/lib/active_admin/menu_item.rb +1 -1
- data/lib/active_admin/namespace.rb +2 -2
- data/lib/active_admin/namespace_settings.rb +7 -4
- data/lib/active_admin/orm/active_record/comments/comment.rb +2 -2
- data/lib/active_admin/orm/active_record/comments/views/active_admin_comments.rb +10 -5
- data/lib/active_admin/orm/active_record/comments.rb +4 -4
- data/lib/active_admin/page_dsl.rb +1 -1
- data/lib/active_admin/pundit_adapter.rb +13 -4
- data/lib/active_admin/resource/action_items.rb +1 -1
- data/lib/active_admin/resource/attributes.rb +7 -4
- data/lib/active_admin/resource/menu.rb +3 -3
- data/lib/active_admin/resource/naming.rb +3 -3
- data/lib/active_admin/resource/routes.rb +9 -4
- data/lib/active_admin/resource/scopes.rb +3 -3
- data/lib/active_admin/resource/sidebars.rb +1 -1
- data/lib/active_admin/resource.rb +2 -2
- data/lib/active_admin/resource_collection.rb +2 -2
- data/lib/active_admin/resource_controller/action_builder.rb +10 -0
- data/lib/active_admin/resource_controller/resource_class_methods.rb +2 -0
- data/lib/active_admin/resource_dsl.rb +5 -3
- data/lib/active_admin/router.rb +1 -1
- data/lib/active_admin/scope.rb +4 -4
- data/lib/active_admin/settings_node.rb +1 -1
- data/lib/active_admin/version.rb +1 -1
- data/lib/active_admin/view_helpers/display_helper.rb +10 -2
- data/lib/active_admin/view_helpers/download_format_links_helper.rb +1 -0
- data/lib/active_admin/view_helpers/method_or_proc_helper.rb +2 -0
- data/lib/active_admin/view_helpers.rb +1 -1
- data/lib/active_admin/views/components/active_admin_form.rb +7 -1
- data/lib/active_admin/views/components/attributes_table.rb +3 -3
- data/lib/active_admin/views/components/paginated_collection.rb +1 -1
- data/lib/active_admin/views/components/sidebar_section.rb +0 -3
- data/lib/active_admin/views/components/status_tag.rb +1 -18
- data/lib/active_admin/views/components/table_for.rb +2 -2
- data/lib/active_admin/views/components/tabs.rb +11 -2
- data/lib/active_admin/views/footer.rb +1 -1
- data/lib/active_admin/views/index_as_table.rb +5 -4
- data/lib/active_admin/views/pages/base.rb +3 -0
- data/lib/active_admin/views.rb +1 -1
- data/lib/active_admin.rb +9 -4
- data/lib/generators/active_admin/assets/assets_generator.rb +2 -2
- data/lib/generators/active_admin/assets/templates/active_admin.js +1 -0
- data/lib/generators/active_admin/install/install_generator.rb +6 -2
- data/lib/generators/active_admin/install/templates/active_admin.rb.erb +20 -1
- data/lib/generators/active_admin/install/templates/dashboard.rb +2 -3
- data/lib/generators/active_admin/install/templates/migrations/create_active_admin_comments.rb.erb +1 -15
- data/lib/generators/active_admin/page/page_generator.rb +1 -1
- data/lib/generators/active_admin/resource/resource_generator.rb +1 -1
- data/lib/ransack_ext.rb +3 -3
- data/vendor/assets/javascripts/jquery-ui/form-reset-mixin.js +80 -0
- data/vendor/assets/javascripts/jquery-ui/form.js +22 -0
- data/vendor/assets/javascripts/jquery-ui/labels.js +65 -0
- data/vendor/assets/javascripts/jquery-ui/widgets/checkboxradio.js +274 -283
- metadata +106 -95
- data/.circleci/config.yml +0 -572
- data/.github/ISSUE_TEMPLATE.md +0 -20
- data/.gitignore +0 -16
- data/.mdlrc +0 -1
- data/.rspec +0 -1
- data/.rspec_parallel +0 -2
- data/.rubocop.yml +0 -99
- data/.simplecov +0 -9
- data/.yardopts +0 -7
- data/Gemfile +0 -30
- data/Gemfile.common +0 -26
- data/Gemfile.lock +0 -433
- data/Rakefile +0 -24
- data/activeadmin.gemspec +0 -32
- data/app/assets/javascripts/active_admin/base.js.coffee +0 -13
- data/app/assets/javascripts/active_admin/ext/jquery-ui.js.coffee +0 -6
- data/app/assets/javascripts/active_admin/ext/jquery.js.coffee +0 -7
- data/app/assets/javascripts/active_admin/initializers/batch_actions.js.coffee +0 -11
- data/app/assets/javascripts/active_admin/initializers/datepicker.js.coffee +0 -14
- data/app/assets/javascripts/active_admin/initializers/filters.js.coffee +0 -26
- data/app/assets/javascripts/active_admin/initializers/tabs.js.coffee +0 -7
- data/app/assets/javascripts/active_admin/lib/batch_actions.js.coffee +0 -42
- data/app/assets/javascripts/active_admin/lib/checkbox-toggler.js.coffee +0 -46
- data/app/assets/javascripts/active_admin/lib/dropdown-menu.js.coffee +0 -104
- data/app/assets/javascripts/active_admin/lib/flash.js.coffee +0 -19
- data/app/assets/javascripts/active_admin/lib/has_many.js.coffee +0 -79
- data/app/assets/javascripts/active_admin/lib/modal_dialog.js.coffee +0 -45
- data/app/assets/javascripts/active_admin/lib/per_page.js.coffee +0 -46
- data/app/assets/javascripts/active_admin/lib/table-checkbox-toggler.js.coffee +0 -22
- data/bin/install_chromedriver.sh +0 -17
- data/config/i18n-tasks.yml +0 -26
- data/config/mdl_style.rb +0 -11
- data/cucumber.yml +0 -7
- data/gemfiles/rails_42.gemfile +0 -10
- data/gemfiles/rails_42.gemfile.lock +0 -339
- data/gemfiles/rails_50.gemfile +0 -10
- data/gemfiles/rails_50.gemfile.lock +0 -353
- data/gemfiles/rails_51.gemfile +0 -10
- data/gemfiles/rails_51.gemfile.lock +0 -353
- data/lib/active_admin/event.rb +0 -24
- data/lib/active_admin/helpers/output_safety_helper.rb +0 -35
- data/lib/bug_report_templates/active_admin_master.rb +0 -111
- data/lib/generators/active_admin/assets/templates/active_admin.js.coffee +0 -1
- data/tasks/application_generator.rb +0 -50
- data/tasks/docs.rake +0 -64
- data/tasks/gemfiles.rake +0 -8
- data/tasks/lint.rake +0 -110
- data/tasks/local.rake +0 -27
- data/tasks/release.rake +0 -6
- data/tasks/test.rake +0 -42
|
@@ -1,353 +0,0 @@
|
|
|
1
|
-
PATH
|
|
2
|
-
remote: ..
|
|
3
|
-
specs:
|
|
4
|
-
activeadmin (1.4.3)
|
|
5
|
-
arbre (>= 1.1.1)
|
|
6
|
-
coffee-rails
|
|
7
|
-
formtastic (~> 3.1)
|
|
8
|
-
formtastic_i18n
|
|
9
|
-
inherited_resources (>= 1.9.0)
|
|
10
|
-
jquery-rails (>= 4.2.0)
|
|
11
|
-
kaminari (>= 0.15)
|
|
12
|
-
railties (>= 4.2, < 5.3)
|
|
13
|
-
ransack (>= 1.8.7)
|
|
14
|
-
sass (~> 3.1)
|
|
15
|
-
sprockets (< 4.1)
|
|
16
|
-
|
|
17
|
-
GEM
|
|
18
|
-
remote: https://rubygems.org/
|
|
19
|
-
specs:
|
|
20
|
-
actioncable (5.1.6.1)
|
|
21
|
-
actionpack (= 5.1.6.1)
|
|
22
|
-
nio4r (~> 2.0)
|
|
23
|
-
websocket-driver (~> 0.6.1)
|
|
24
|
-
actionmailer (5.1.6.1)
|
|
25
|
-
actionpack (= 5.1.6.1)
|
|
26
|
-
actionview (= 5.1.6.1)
|
|
27
|
-
activejob (= 5.1.6.1)
|
|
28
|
-
mail (~> 2.5, >= 2.5.4)
|
|
29
|
-
rails-dom-testing (~> 2.0)
|
|
30
|
-
actionpack (5.1.6.1)
|
|
31
|
-
actionview (= 5.1.6.1)
|
|
32
|
-
activesupport (= 5.1.6.1)
|
|
33
|
-
rack (~> 2.0)
|
|
34
|
-
rack-test (>= 0.6.3)
|
|
35
|
-
rails-dom-testing (~> 2.0)
|
|
36
|
-
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
|
37
|
-
actionview (5.1.6.1)
|
|
38
|
-
activesupport (= 5.1.6.1)
|
|
39
|
-
builder (~> 3.1)
|
|
40
|
-
erubi (~> 1.4)
|
|
41
|
-
rails-dom-testing (~> 2.0)
|
|
42
|
-
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
|
43
|
-
activejob (5.1.6.1)
|
|
44
|
-
activesupport (= 5.1.6.1)
|
|
45
|
-
globalid (>= 0.3.6)
|
|
46
|
-
activemodel (5.1.6.1)
|
|
47
|
-
activesupport (= 5.1.6.1)
|
|
48
|
-
activemodel-serializers-xml (1.0.2)
|
|
49
|
-
activemodel (> 5.x)
|
|
50
|
-
activesupport (> 5.x)
|
|
51
|
-
builder (~> 3.1)
|
|
52
|
-
activerecord (5.1.6.1)
|
|
53
|
-
activemodel (= 5.1.6.1)
|
|
54
|
-
activesupport (= 5.1.6.1)
|
|
55
|
-
arel (~> 8.0)
|
|
56
|
-
activerecord-jdbc-adapter (51.2-java)
|
|
57
|
-
activerecord (~> 5.1.0)
|
|
58
|
-
activerecord-jdbcsqlite3-adapter (51.2-java)
|
|
59
|
-
activerecord-jdbc-adapter (= 51.2)
|
|
60
|
-
jdbc-sqlite3 (~> 3.8, < 3.30)
|
|
61
|
-
activesupport (5.1.6.1)
|
|
62
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
63
|
-
i18n (>= 0.7, < 2)
|
|
64
|
-
minitest (~> 5.1)
|
|
65
|
-
tzinfo (~> 1.1)
|
|
66
|
-
addressable (2.5.2)
|
|
67
|
-
public_suffix (>= 2.0.2, < 4.0)
|
|
68
|
-
arbre (1.1.1)
|
|
69
|
-
activesupport (>= 3.0.0)
|
|
70
|
-
arel (8.0.0)
|
|
71
|
-
backports (3.11.4)
|
|
72
|
-
bcrypt (3.1.12)
|
|
73
|
-
bcrypt (3.1.12-java)
|
|
74
|
-
builder (3.2.3)
|
|
75
|
-
byebug (10.0.2)
|
|
76
|
-
cancan (1.6.10)
|
|
77
|
-
capybara (3.12.0)
|
|
78
|
-
addressable
|
|
79
|
-
mini_mime (>= 0.1.3)
|
|
80
|
-
nokogiri (~> 1.8)
|
|
81
|
-
rack (>= 1.6.0)
|
|
82
|
-
rack-test (>= 0.6.3)
|
|
83
|
-
regexp_parser (~> 1.2)
|
|
84
|
-
xpath (~> 3.2)
|
|
85
|
-
childprocess (0.9.0)
|
|
86
|
-
ffi (~> 1.0, >= 1.0.11)
|
|
87
|
-
coderay (1.1.2)
|
|
88
|
-
coffee-rails (4.2.2)
|
|
89
|
-
coffee-script (>= 2.2.0)
|
|
90
|
-
railties (>= 4.0.0)
|
|
91
|
-
coffee-script (2.4.1)
|
|
92
|
-
coffee-script-source
|
|
93
|
-
execjs
|
|
94
|
-
coffee-script-source (1.12.2)
|
|
95
|
-
concurrent-ruby (1.1.3)
|
|
96
|
-
crass (1.0.4)
|
|
97
|
-
cucumber (3.1.2)
|
|
98
|
-
builder (>= 2.1.2)
|
|
99
|
-
cucumber-core (~> 3.2.0)
|
|
100
|
-
cucumber-expressions (~> 6.0.1)
|
|
101
|
-
cucumber-wire (~> 0.0.1)
|
|
102
|
-
diff-lcs (~> 1.3)
|
|
103
|
-
gherkin (~> 5.1.0)
|
|
104
|
-
multi_json (>= 1.7.5, < 2.0)
|
|
105
|
-
multi_test (>= 0.1.2)
|
|
106
|
-
cucumber-core (3.2.1)
|
|
107
|
-
backports (>= 3.8.0)
|
|
108
|
-
cucumber-tag_expressions (~> 1.1.0)
|
|
109
|
-
gherkin (~> 5.0)
|
|
110
|
-
cucumber-expressions (6.0.1)
|
|
111
|
-
cucumber-rails (1.6.0)
|
|
112
|
-
capybara (>= 1.1.2, < 4)
|
|
113
|
-
cucumber (>= 3.0.2, < 4)
|
|
114
|
-
mime-types (>= 1.17, < 4)
|
|
115
|
-
nokogiri (~> 1.8)
|
|
116
|
-
railties (>= 4, < 6)
|
|
117
|
-
cucumber-tag_expressions (1.1.1)
|
|
118
|
-
cucumber-wire (0.0.1)
|
|
119
|
-
database_cleaner (1.7.0)
|
|
120
|
-
devise (4.5.0)
|
|
121
|
-
bcrypt (~> 3.0)
|
|
122
|
-
orm_adapter (~> 0.1)
|
|
123
|
-
railties (>= 4.1.0, < 6.0)
|
|
124
|
-
responders
|
|
125
|
-
warden (~> 1.2.3)
|
|
126
|
-
diff-lcs (1.3)
|
|
127
|
-
docile (1.3.1)
|
|
128
|
-
draper (3.0.1)
|
|
129
|
-
actionpack (~> 5.0)
|
|
130
|
-
activemodel (~> 5.0)
|
|
131
|
-
activemodel-serializers-xml (~> 1.0)
|
|
132
|
-
activesupport (~> 5.0)
|
|
133
|
-
request_store (~> 1.0)
|
|
134
|
-
erubi (1.7.1)
|
|
135
|
-
execjs (2.7.0)
|
|
136
|
-
ffi (1.9.25)
|
|
137
|
-
ffi (1.9.25-java)
|
|
138
|
-
formtastic (3.1.5)
|
|
139
|
-
actionpack (>= 3.2.13)
|
|
140
|
-
formtastic_i18n (0.6.0)
|
|
141
|
-
gherkin (5.1.0)
|
|
142
|
-
globalid (0.4.1)
|
|
143
|
-
activesupport (>= 4.2.0)
|
|
144
|
-
has_scope (0.7.2)
|
|
145
|
-
actionpack (>= 4.1)
|
|
146
|
-
activesupport (>= 4.1)
|
|
147
|
-
i18n (1.1.1)
|
|
148
|
-
concurrent-ruby (~> 1.0)
|
|
149
|
-
inherited_resources (1.9.0)
|
|
150
|
-
actionpack (>= 4.2, < 5.3)
|
|
151
|
-
has_scope (~> 0.6)
|
|
152
|
-
railties (>= 4.2, < 5.3)
|
|
153
|
-
responders
|
|
154
|
-
jasmine (2.9.0)
|
|
155
|
-
jasmine-core (>= 2.9.0, < 3.0.0)
|
|
156
|
-
phantomjs
|
|
157
|
-
rack (>= 1.2.1)
|
|
158
|
-
rake
|
|
159
|
-
jasmine-core (2.9.1)
|
|
160
|
-
jdbc-sqlite3 (3.20.1)
|
|
161
|
-
jquery-rails (4.3.3)
|
|
162
|
-
rails-dom-testing (>= 1, < 3)
|
|
163
|
-
railties (>= 4.2.0)
|
|
164
|
-
thor (>= 0.14, < 2.0)
|
|
165
|
-
jruby-openssl (0.10.1-java)
|
|
166
|
-
json (2.1.0)
|
|
167
|
-
json (2.1.0-java)
|
|
168
|
-
kaminari (1.1.1)
|
|
169
|
-
activesupport (>= 4.1.0)
|
|
170
|
-
kaminari-actionview (= 1.1.1)
|
|
171
|
-
kaminari-activerecord (= 1.1.1)
|
|
172
|
-
kaminari-core (= 1.1.1)
|
|
173
|
-
kaminari-actionview (1.1.1)
|
|
174
|
-
actionview
|
|
175
|
-
kaminari-core (= 1.1.1)
|
|
176
|
-
kaminari-activerecord (1.1.1)
|
|
177
|
-
activerecord
|
|
178
|
-
kaminari-core (= 1.1.1)
|
|
179
|
-
kaminari-core (1.1.1)
|
|
180
|
-
launchy (2.4.3)
|
|
181
|
-
addressable (~> 2.3)
|
|
182
|
-
launchy (2.4.3-java)
|
|
183
|
-
addressable (~> 2.3)
|
|
184
|
-
spoon (~> 0.0.1)
|
|
185
|
-
loofah (2.2.3)
|
|
186
|
-
crass (~> 1.0.2)
|
|
187
|
-
nokogiri (>= 1.5.9)
|
|
188
|
-
mail (2.7.1)
|
|
189
|
-
mini_mime (>= 0.1.1)
|
|
190
|
-
method_source (0.9.2)
|
|
191
|
-
mime-types (3.2.2)
|
|
192
|
-
mime-types-data (~> 3.2015)
|
|
193
|
-
mime-types-data (3.2018.0812)
|
|
194
|
-
mini_mime (1.0.1)
|
|
195
|
-
mini_portile2 (2.3.0)
|
|
196
|
-
minitest (5.11.3)
|
|
197
|
-
multi_json (1.13.1)
|
|
198
|
-
multi_test (0.1.2)
|
|
199
|
-
nio4r (2.3.1)
|
|
200
|
-
nio4r (2.3.1-java)
|
|
201
|
-
nokogiri (1.8.5)
|
|
202
|
-
mini_portile2 (~> 2.3.0)
|
|
203
|
-
nokogiri (1.8.5-java)
|
|
204
|
-
orm_adapter (0.5.0)
|
|
205
|
-
parallel (1.12.1)
|
|
206
|
-
parallel_tests (2.26.0)
|
|
207
|
-
parallel
|
|
208
|
-
phantomjs (2.1.1.0)
|
|
209
|
-
pry (0.11.3)
|
|
210
|
-
coderay (~> 1.1.0)
|
|
211
|
-
method_source (~> 0.9.0)
|
|
212
|
-
pry (0.11.3-java)
|
|
213
|
-
coderay (~> 1.1.0)
|
|
214
|
-
method_source (~> 0.9.0)
|
|
215
|
-
spoon (~> 0.0)
|
|
216
|
-
pry-byebug (3.6.0)
|
|
217
|
-
byebug (~> 10.0)
|
|
218
|
-
pry (~> 0.10)
|
|
219
|
-
public_suffix (3.0.3)
|
|
220
|
-
pundit (2.0.0)
|
|
221
|
-
activesupport (>= 3.0.0)
|
|
222
|
-
rack (2.0.6)
|
|
223
|
-
rack-test (1.1.0)
|
|
224
|
-
rack (>= 1.0, < 3)
|
|
225
|
-
rails (5.1.6.1)
|
|
226
|
-
actioncable (= 5.1.6.1)
|
|
227
|
-
actionmailer (= 5.1.6.1)
|
|
228
|
-
actionpack (= 5.1.6.1)
|
|
229
|
-
actionview (= 5.1.6.1)
|
|
230
|
-
activejob (= 5.1.6.1)
|
|
231
|
-
activemodel (= 5.1.6.1)
|
|
232
|
-
activerecord (= 5.1.6.1)
|
|
233
|
-
activesupport (= 5.1.6.1)
|
|
234
|
-
bundler (>= 1.3.0)
|
|
235
|
-
railties (= 5.1.6.1)
|
|
236
|
-
sprockets-rails (>= 2.0.0)
|
|
237
|
-
rails-dom-testing (2.0.3)
|
|
238
|
-
activesupport (>= 4.2.0)
|
|
239
|
-
nokogiri (>= 1.6)
|
|
240
|
-
rails-html-sanitizer (1.0.4)
|
|
241
|
-
loofah (~> 2.2, >= 2.2.2)
|
|
242
|
-
rails-i18n (5.1.1)
|
|
243
|
-
i18n (>= 0.7, < 2)
|
|
244
|
-
railties (>= 5.0, < 6)
|
|
245
|
-
railties (5.1.6.1)
|
|
246
|
-
actionpack (= 5.1.6.1)
|
|
247
|
-
activesupport (= 5.1.6.1)
|
|
248
|
-
method_source
|
|
249
|
-
rake (>= 0.8.7)
|
|
250
|
-
thor (>= 0.18.1, < 2.0)
|
|
251
|
-
rake (12.3.1)
|
|
252
|
-
ransack (2.1.0)
|
|
253
|
-
actionpack (>= 5.0)
|
|
254
|
-
activerecord (>= 5.0)
|
|
255
|
-
activesupport (>= 5.0)
|
|
256
|
-
i18n
|
|
257
|
-
rb-fsevent (0.10.3)
|
|
258
|
-
rb-inotify (0.9.10)
|
|
259
|
-
ffi (>= 0.5.0, < 2)
|
|
260
|
-
regexp_parser (1.3.0)
|
|
261
|
-
request_store (1.4.1)
|
|
262
|
-
rack (>= 1.4)
|
|
263
|
-
responders (2.4.0)
|
|
264
|
-
actionpack (>= 4.2.0, < 5.3)
|
|
265
|
-
railties (>= 4.2.0, < 5.3)
|
|
266
|
-
rspec-core (3.8.0)
|
|
267
|
-
rspec-support (~> 3.8.0)
|
|
268
|
-
rspec-expectations (3.8.2)
|
|
269
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
270
|
-
rspec-support (~> 3.8.0)
|
|
271
|
-
rspec-mocks (3.8.0)
|
|
272
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
273
|
-
rspec-support (~> 3.8.0)
|
|
274
|
-
rspec-rails (3.8.0)
|
|
275
|
-
actionpack (>= 3.0)
|
|
276
|
-
activesupport (>= 3.0)
|
|
277
|
-
railties (>= 3.0)
|
|
278
|
-
rspec-core (~> 3.8.0)
|
|
279
|
-
rspec-expectations (~> 3.8.0)
|
|
280
|
-
rspec-mocks (~> 3.8.0)
|
|
281
|
-
rspec-support (~> 3.8.0)
|
|
282
|
-
rspec-support (3.8.0)
|
|
283
|
-
rubyzip (1.2.2)
|
|
284
|
-
sass (3.7.2)
|
|
285
|
-
sass-listen (~> 4.0.0)
|
|
286
|
-
sass-listen (4.0.0)
|
|
287
|
-
rb-fsevent (~> 0.9, >= 0.9.4)
|
|
288
|
-
rb-inotify (~> 0.9, >= 0.9.7)
|
|
289
|
-
selenium-webdriver (3.141.0)
|
|
290
|
-
childprocess (~> 0.5)
|
|
291
|
-
rubyzip (~> 1.2, >= 1.2.2)
|
|
292
|
-
simplecov (0.16.1)
|
|
293
|
-
docile (~> 1.1)
|
|
294
|
-
json (>= 1.8, < 3)
|
|
295
|
-
simplecov-html (~> 0.10.0)
|
|
296
|
-
simplecov-html (0.10.2)
|
|
297
|
-
spoon (0.0.6)
|
|
298
|
-
ffi
|
|
299
|
-
sprockets (3.7.2)
|
|
300
|
-
concurrent-ruby (~> 1.0)
|
|
301
|
-
rack (> 1, < 3)
|
|
302
|
-
sprockets-rails (3.2.1)
|
|
303
|
-
actionpack (>= 4.0)
|
|
304
|
-
activesupport (>= 4.0)
|
|
305
|
-
sprockets (>= 3.0.0)
|
|
306
|
-
sqlite3 (1.3.13)
|
|
307
|
-
thor (0.20.3)
|
|
308
|
-
thread_safe (0.3.6)
|
|
309
|
-
thread_safe (0.3.6-java)
|
|
310
|
-
tzinfo (1.2.5)
|
|
311
|
-
thread_safe (~> 0.1)
|
|
312
|
-
warden (1.2.7)
|
|
313
|
-
rack (>= 1.0)
|
|
314
|
-
websocket-driver (0.6.5)
|
|
315
|
-
websocket-extensions (>= 0.1.0)
|
|
316
|
-
websocket-driver (0.6.5-java)
|
|
317
|
-
websocket-extensions (>= 0.1.0)
|
|
318
|
-
websocket-extensions (0.1.3)
|
|
319
|
-
xpath (3.2.0)
|
|
320
|
-
nokogiri (~> 1.8)
|
|
321
|
-
|
|
322
|
-
PLATFORMS
|
|
323
|
-
java
|
|
324
|
-
ruby
|
|
325
|
-
|
|
326
|
-
DEPENDENCIES
|
|
327
|
-
activeadmin!
|
|
328
|
-
activerecord-jdbcsqlite3-adapter (~> 51.0)
|
|
329
|
-
cancan
|
|
330
|
-
capybara (~> 3.10)
|
|
331
|
-
cucumber
|
|
332
|
-
cucumber-rails (~> 1.5)
|
|
333
|
-
database_cleaner
|
|
334
|
-
devise (~> 4.3)
|
|
335
|
-
draper (~> 3.0)
|
|
336
|
-
jasmine
|
|
337
|
-
jasmine-core (= 2.9.1)
|
|
338
|
-
jruby-openssl (~> 0.10.1)
|
|
339
|
-
launchy
|
|
340
|
-
parallel_tests (~> 2.26)
|
|
341
|
-
pry
|
|
342
|
-
pry-byebug
|
|
343
|
-
pundit
|
|
344
|
-
rails (~> 5.1.6)
|
|
345
|
-
rails-i18n
|
|
346
|
-
rake
|
|
347
|
-
rspec-rails
|
|
348
|
-
selenium-webdriver
|
|
349
|
-
simplecov
|
|
350
|
-
sqlite3
|
|
351
|
-
|
|
352
|
-
BUNDLED WITH
|
|
353
|
-
1.17.1
|
data/lib/active_admin/event.rb
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
module ActiveAdmin
|
|
2
|
-
|
|
3
|
-
class EventDispatcher
|
|
4
|
-
def subscribe(*event_names, &block)
|
|
5
|
-
Deprecation.warn "`ActiveAdmin::Event.subscribe` is deprecated, use `ActiveSupport::Notifications.subscribe`"
|
|
6
|
-
event_names.each do |event|
|
|
7
|
-
ActiveSupport::Notifications.subscribe event,
|
|
8
|
-
&wrap_block_for_active_support_notifications(block)
|
|
9
|
-
end
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
def dispatch(event, *args)
|
|
13
|
-
Deprecation.warn "`ActiveAdmin::Event.dispatch` is deprecated, use `ActiveSupport::Notifications.publish`"
|
|
14
|
-
ActiveSupport::Notifications.publish event, *args
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
def wrap_block_for_active_support_notifications block
|
|
18
|
-
proc { |event, *args| block.call *args }
|
|
19
|
-
end
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
# ActiveAdmin::Event is set to a dispatcher
|
|
23
|
-
Event = EventDispatcher.new
|
|
24
|
-
end
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
module ActiveAdmin
|
|
2
|
-
module OutputSafetyHelper
|
|
3
|
-
# Converts the array to a comma-separated sentence where the last element is
|
|
4
|
-
# joined by the connector word. This is the html_safe-aware version of
|
|
5
|
-
# ActiveSupport's {Array#to_sentence}[http://api.rubyonrails.org/classes/Array.html#method-i-to_sentence].
|
|
6
|
-
#
|
|
7
|
-
# Copied from Rails 5 to support Rails 4.
|
|
8
|
-
# https://github.com/rails/rails/blob/9c35bf2a6a27431c6aa283db781c19f61c5155be/actionview/lib/action_view/helpers/output_safety_helper.rb#L43
|
|
9
|
-
def to_sentence(array, options = {})
|
|
10
|
-
options.assert_valid_keys(:words_connector, :two_words_connector, :last_word_connector, :locale)
|
|
11
|
-
|
|
12
|
-
default_connectors = {
|
|
13
|
-
words_connector: ", ",
|
|
14
|
-
two_words_connector: " and ",
|
|
15
|
-
last_word_connector: ", and "
|
|
16
|
-
}
|
|
17
|
-
if defined?(::I18n)
|
|
18
|
-
i18n_connectors = ::I18n.translate(:'support.array', locale: options[:locale], default: {})
|
|
19
|
-
default_connectors.merge!(i18n_connectors)
|
|
20
|
-
end
|
|
21
|
-
options = default_connectors.merge!(options)
|
|
22
|
-
|
|
23
|
-
case array.length
|
|
24
|
-
when 0
|
|
25
|
-
"".html_safe
|
|
26
|
-
when 1
|
|
27
|
-
ERB::Util.html_escape(array[0])
|
|
28
|
-
when 2
|
|
29
|
-
safe_join([array[0], array[1]], options[:two_words_connector])
|
|
30
|
-
else
|
|
31
|
-
safe_join([safe_join(array[0...-1], options[:words_connector]), options[:last_word_connector], array[-1]], nil)
|
|
32
|
-
end
|
|
33
|
-
end
|
|
34
|
-
end
|
|
35
|
-
end
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
begin
|
|
2
|
-
require 'bundler/inline'
|
|
3
|
-
rescue LoadError => e
|
|
4
|
-
STDERR.puts 'Bundler version 1.10 or later is required. Please update your Bundler'
|
|
5
|
-
raise e
|
|
6
|
-
end
|
|
7
|
-
|
|
8
|
-
gemfile(true) do
|
|
9
|
-
source 'https://rubygems.org'
|
|
10
|
-
|
|
11
|
-
# Use local changes or ActiveAdmin master.
|
|
12
|
-
if ENV['ACTIVE_ADMIN_PATH']
|
|
13
|
-
gem 'activeadmin', path: ENV['ACTIVE_ADMIN_PATH'], require: false
|
|
14
|
-
else
|
|
15
|
-
gem 'activeadmin', github: 'activeadmin/activeadmin', require: false
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
# Change Rails version if necessary.
|
|
19
|
-
gem 'rails', '~> 5.1.0'
|
|
20
|
-
|
|
21
|
-
gem 'sass-rails'
|
|
22
|
-
gem 'sqlite3', platform: :mri
|
|
23
|
-
gem 'activerecord-jdbcsqlite3-adapter', "~> 51.0", platform: :jruby
|
|
24
|
-
gem 'jruby-openssl', '~> 0.10.1', platforms: :jruby
|
|
25
|
-
end
|
|
26
|
-
|
|
27
|
-
require 'active_record'
|
|
28
|
-
|
|
29
|
-
ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: ':memory:')
|
|
30
|
-
ActiveRecord::Base.logger = Logger.new(STDOUT)
|
|
31
|
-
|
|
32
|
-
ActiveRecord::Schema.define do
|
|
33
|
-
create_table :active_admin_comments, force: true do |_t|
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
create_table :users, force: true do |t|
|
|
37
|
-
t.string :full_name
|
|
38
|
-
end
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
require 'action_controller/railtie'
|
|
42
|
-
require 'action_view/railtie'
|
|
43
|
-
require 'active_admin'
|
|
44
|
-
|
|
45
|
-
class TestApp < Rails::Application
|
|
46
|
-
config.root = __dir__
|
|
47
|
-
config.session_store :cookie_store, key: "cookie_store_key"
|
|
48
|
-
secrets.secret_token = 'secret_token'
|
|
49
|
-
secrets.secret_key_base = 'secret_key_base'
|
|
50
|
-
|
|
51
|
-
config.eager_load = false
|
|
52
|
-
config.logger = Logger.new($stdout)
|
|
53
|
-
Rails.logger = config.logger
|
|
54
|
-
end
|
|
55
|
-
|
|
56
|
-
class ApplicationController < ActionController::Base
|
|
57
|
-
include Rails.application.routes.url_helpers
|
|
58
|
-
end
|
|
59
|
-
|
|
60
|
-
class User < ActiveRecord::Base
|
|
61
|
-
end
|
|
62
|
-
|
|
63
|
-
ActiveAdmin.setup do |config|
|
|
64
|
-
# Authentication disabled by default. Override if necessary.
|
|
65
|
-
config.authentication_method = false
|
|
66
|
-
config.current_user_method = false
|
|
67
|
-
end
|
|
68
|
-
|
|
69
|
-
Rails.application.initialize!
|
|
70
|
-
|
|
71
|
-
ActiveAdmin.register_page 'Dashboard' do
|
|
72
|
-
menu priority: 1, label: proc { I18n.t('active_admin.dashboard') }
|
|
73
|
-
content do
|
|
74
|
-
'Test Me'
|
|
75
|
-
end
|
|
76
|
-
end
|
|
77
|
-
|
|
78
|
-
ActiveAdmin.register User do
|
|
79
|
-
end
|
|
80
|
-
|
|
81
|
-
Rails.application.routes.draw do
|
|
82
|
-
ActiveAdmin.routes(self)
|
|
83
|
-
end
|
|
84
|
-
|
|
85
|
-
require 'minitest/autorun'
|
|
86
|
-
require 'rack/test'
|
|
87
|
-
require 'rails/test_help'
|
|
88
|
-
|
|
89
|
-
# Replace this with the code necessary to make your test fail.
|
|
90
|
-
class BugTest < ActionDispatch::IntegrationTest
|
|
91
|
-
|
|
92
|
-
def test_admin_root_success?
|
|
93
|
-
get admin_root_url
|
|
94
|
-
assert_response :success
|
|
95
|
-
assert_match 'Test Me', response.body # has content
|
|
96
|
-
assert_match 'Users', response.body # has 'Your Models' in menu
|
|
97
|
-
end
|
|
98
|
-
|
|
99
|
-
def test_admin_users
|
|
100
|
-
User.create! full_name: 'John Doe'
|
|
101
|
-
get admin_users_url
|
|
102
|
-
assert_response :success
|
|
103
|
-
assert_match 'John Doe', response.body # has created row
|
|
104
|
-
end
|
|
105
|
-
|
|
106
|
-
private
|
|
107
|
-
|
|
108
|
-
def app
|
|
109
|
-
Rails.application
|
|
110
|
-
end
|
|
111
|
-
end
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
#= require active_admin/base
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
require 'fileutils'
|
|
2
|
-
|
|
3
|
-
module ActiveAdmin
|
|
4
|
-
class ApplicationGenerator
|
|
5
|
-
attr_reader :rails_env, :template
|
|
6
|
-
|
|
7
|
-
def initialize(opts = {})
|
|
8
|
-
@rails_env = opts[:rails_env] || 'test'
|
|
9
|
-
@template = opts[:template] || 'rails_template'
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
def generate
|
|
13
|
-
if File.exist? app_dir
|
|
14
|
-
puts "test app #{app_dir} already exists; skipping test app generation"
|
|
15
|
-
else
|
|
16
|
-
FileUtils.mkdir_p base_dir
|
|
17
|
-
args = %W(
|
|
18
|
-
-m spec/support/#{template}.rb
|
|
19
|
-
--skip-bootsnap
|
|
20
|
-
--skip-bundle
|
|
21
|
-
--skip-gemfile
|
|
22
|
-
--skip-listen
|
|
23
|
-
--skip-turbolinks
|
|
24
|
-
--skip-test-unit
|
|
25
|
-
)
|
|
26
|
-
|
|
27
|
-
command = ['bundle', 'exec', 'rails', 'new', app_dir, *args].join(' ')
|
|
28
|
-
|
|
29
|
-
env = { 'BUNDLE_GEMFILE' => ENV['BUNDLE_GEMFILE'], 'RAILS_ENV' => rails_env }
|
|
30
|
-
|
|
31
|
-
Bundler.with_original_env { abort unless Kernel.system(env, command) }
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
app_dir
|
|
35
|
-
end
|
|
36
|
-
|
|
37
|
-
private
|
|
38
|
-
|
|
39
|
-
def base_dir
|
|
40
|
-
@base_dir ||= rails_env == 'test' ? 'spec/rails' : '.test-rails-apps'
|
|
41
|
-
end
|
|
42
|
-
|
|
43
|
-
def app_dir
|
|
44
|
-
@app_dir ||= begin
|
|
45
|
-
require 'rails/version'
|
|
46
|
-
"#{base_dir}/rails-#{Rails::VERSION::STRING}"
|
|
47
|
-
end
|
|
48
|
-
end
|
|
49
|
-
end
|
|
50
|
-
end
|
data/tasks/docs.rake
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
require 'yard'
|
|
2
|
-
require 'yard/rake/yardoc_task'
|
|
3
|
-
|
|
4
|
-
namespace :docs do
|
|
5
|
-
|
|
6
|
-
YARD::Rake::YardocTask.new do |t|
|
|
7
|
-
t.files = ['lib/**/*.rb']
|
|
8
|
-
t.options = ['--no-output']
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
def jekyll_redirect_string(filename)
|
|
12
|
-
<<-EOD.strip_heredoc
|
|
13
|
-
---
|
|
14
|
-
redirect_from: /docs/3-index-pages/#{filename}
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
EOD
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
def filename_from_module(mod)
|
|
21
|
-
mod.name.to_s.underscore.tr('_', '-')
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
def write_docstrings_to(path, mods)
|
|
25
|
-
mods.each do |mod|
|
|
26
|
-
filename = filename_from_module(mod)
|
|
27
|
-
|
|
28
|
-
File.open("#{path}/#{filename}.md", 'w+') do |f|
|
|
29
|
-
f << jekyll_redirect_string("#{filename}.html") + mod.docstring + "\n"
|
|
30
|
-
end
|
|
31
|
-
end
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
def docs_syncronized?
|
|
35
|
-
# Do not print diff and yield whether exit code was zero
|
|
36
|
-
sh('git diff --quiet docs/3-index-pages') do |outcome, _|
|
|
37
|
-
return if outcome
|
|
38
|
-
|
|
39
|
-
# Output diff before raising error
|
|
40
|
-
sh('git diff docs/3-index-pages')
|
|
41
|
-
|
|
42
|
-
raise <<-MSG.strip_heredoc
|
|
43
|
-
The docs/3-index-pages directory is out of sync.
|
|
44
|
-
Run rake generate_cops_documentation and commit the results.
|
|
45
|
-
MSG
|
|
46
|
-
end
|
|
47
|
-
end
|
|
48
|
-
|
|
49
|
-
desc "Update docs in the docs folder"
|
|
50
|
-
task build: :yard do
|
|
51
|
-
require 'yard'
|
|
52
|
-
require 'active_support/all'
|
|
53
|
-
|
|
54
|
-
YARD::Registry.load!
|
|
55
|
-
views = YARD::Registry.at("ActiveAdmin::Views")
|
|
56
|
-
|
|
57
|
-
# Index Types
|
|
58
|
-
index_types = views.children.select{|obj| obj.name.to_s =~ /^IndexAs/ }
|
|
59
|
-
write_docstrings_to "docs/3-index-pages", index_types
|
|
60
|
-
|
|
61
|
-
docs_syncronized? if ENV["CI"]
|
|
62
|
-
end
|
|
63
|
-
|
|
64
|
-
end
|