fae-rails 1.7.1 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +0 -3
  3. data/app/assets/images/fae/tutorial_model_location.png +0 -0
  4. data/app/assets/javascripts/fae/_tables.js +11 -25
  5. data/app/assets/javascripts/fae/application.js +2 -2
  6. data/app/assets/javascripts/fae/fae_init.js +0 -4
  7. data/app/assets/javascripts/fae/form/_ajax.js +3 -6
  8. data/app/assets/javascripts/fae/form/_validator.js +2 -2
  9. data/app/assets/javascripts/fae/navigation/_language.js +1 -1
  10. data/app/assets/javascripts/fae/navigation/_navigation.js +9 -21
  11. data/app/assets/javascripts/fae/navigation/_subnav_highlighter.js +7 -41
  12. data/app/assets/stylesheets/fae/base.scss +2 -6
  13. data/app/assets/stylesheets/fae/globals/imports/_variables.scss +0 -2
  14. data/app/assets/stylesheets/fae/globals/layout/_content-header.scss +9 -29
  15. data/app/assets/stylesheets/fae/pages/_home.scss +18 -0
  16. data/app/controllers/fae/base_controller.rb +1 -1
  17. data/app/controllers/fae/pages_controller.rb +3 -2
  18. data/app/helpers/fae/application_helper.rb +1 -1
  19. data/app/helpers/fae/form_helper.rb +3 -4
  20. data/app/helpers/fae/nested_form_helper.rb +2 -2
  21. data/app/helpers/fae/view_helper.rb +1 -3
  22. data/app/models/concerns/fae/base_model_concern.rb +1 -7
  23. data/app/models/fae/change.rb +1 -1
  24. data/app/models/fae/file.rb +1 -1
  25. data/app/models/fae/image.rb +1 -1
  26. data/app/models/fae/option.rb +1 -1
  27. data/app/models/fae/role.rb +1 -1
  28. data/app/models/fae/static_page.rb +4 -0
  29. data/app/uploaders/fae/file_uploader.rb +1 -4
  30. data/app/uploaders/fae/image_uploader.rb +2 -2
  31. data/app/views/fae/images/_image_uploader.html.slim +2 -2
  32. data/app/views/fae/options/_form.html.slim +1 -1
  33. data/app/views/fae/pages/home.html.slim +32 -21
  34. data/app/views/fae/shared/_form_header.html.slim +33 -33
  35. data/app/views/fae/shared/_nested_table.html.slim +2 -4
  36. data/app/views/fae/users/index.html.slim +1 -1
  37. data/db/migrate/20140809222030_add_user_table.rb +1 -1
  38. data/db/migrate/20140822224029_create_fae_roles.rb +1 -1
  39. data/db/migrate/20141008180718_create_fae_images_table.rb +1 -1
  40. data/db/migrate/20141017194616_create_fae_options.rb +1 -1
  41. data/db/migrate/20141021181327_create_fae_files.rb +1 -1
  42. data/db/migrate/20141021183047_create_fae_text_areas.rb +1 -1
  43. data/db/migrate/20141021184311_create_fae_pages.rb +1 -1
  44. data/db/migrate/20141105214814_create_fae_text_fields.rb +1 -1
  45. data/db/migrate/20150930224821_create_fae_changes.rb +1 -1
  46. data/lib/fae/options.rb +1 -1
  47. data/lib/fae/version.rb +1 -1
  48. data/lib/generators/fae/base_generator.rb +5 -4
  49. data/lib/generators/fae/nested_index_scaffold_generator.rb +0 -1
  50. data/lib/generators/fae/nested_scaffold_generator.rb +2 -2
  51. data/lib/generators/fae/scaffold_generator.rb +0 -1
  52. data/lib/generators/fae/templates/views/_form.html.slim +1 -3
  53. data/lib/generators/fae/templates/views/index_nested.html.slim +1 -0
  54. data/lib/generators/fae/templates/views/static_page_form.html.slim +1 -2
  55. metadata +46 -47
  56. data/app/views/fae/shared/_form_buttons.html.slim +0 -11
  57. data/app/views/fae/shared/_nested_table_advanced.html.slim +0 -18
  58. data/lib/sub_test_task_patch.rb +0 -129
@@ -6,7 +6,6 @@ module Fae
6
6
  def go
7
7
  generate_model
8
8
  generate_nested_index_controller_file
9
- inject_display_field_to_model
10
9
  generate_view_files
11
10
  add_route
12
11
  inject_nav_item
@@ -16,9 +16,9 @@ module Fae
16
16
  def generate_nested_model_file
17
17
  generate "model #{file_name} #{@@attributes_flat}"
18
18
  inject_concern
19
- inject_position_scope
20
- inject_model_attachments
21
19
  inject_display_field_to_model
20
+ inject_model_attachments
21
+ inject_position_scope
22
22
  inject_parent_info if options.parent_model.present?
23
23
  end
24
24
 
@@ -5,7 +5,6 @@ module Fae
5
5
 
6
6
  def go
7
7
  generate_model
8
- inject_display_field_to_model
9
8
  generate_controller_file
10
9
  generate_view_files
11
10
  add_route
@@ -1,7 +1,5 @@
1
1
  = simple_form_for(['admin', @item]) do |f|
2
- header.content-header.js-content-header
3
- == render 'fae/shared/form_header', header: @klass_name
4
- == render 'fae/shared/errors'
2
+ == render 'fae/shared/form_header', header: @klass_name
5
3
 
6
4
  main.content
7
5
  <% @form_attrs.each do |attr| -%>
@@ -4,4 +4,5 @@ section.js-index-addedit-form
4
4
  == render 'fae/shared/nested_table',
5
5
  assoc: :<%= file_name.pluralize %>,
6
6
  index: true,
7
+ ordered: <%= @has_position %>,
7
8
  cols: [<%= @form_attrs.map {|attr| ":#{attr}"}.join(', ') %>]
@@ -1,6 +1,5 @@
1
1
  = simple_form_for @item, url: fae.update_content_block_path(slug: @item.slug), method: :put do |f|
2
- header.content-header.js-content-header
3
- == render 'fae/shared/form_header', header: @item
2
+ == render 'fae/shared/form_header', header: @item
4
3
 
5
4
  main.content
6
5
  = fae_input f, :title
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fae-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.1
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - FINE
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-19 00:00:00.000000000 Z
11
+ date: 2018-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '4.1'
19
+ version: '5.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '4.1'
26
+ version: '5.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: jquery-rails
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 3.1.1
33
+ version: 4.3.1
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 3.1.1
40
+ version: 4.3.1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: sass
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: 5.0.3
61
+ version: 5.0.7
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: 5.0.3
68
+ version: 5.0.7
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: uglifier
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -86,154 +86,154 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 0.9.0
89
+ version: 0.9.11
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 0.9.0
96
+ version: 0.9.11
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: browser
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 0.8.0
103
+ version: 2.5.3
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: 0.8.0
110
+ version: 2.5.3
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: carrierwave
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: 0.11.0
117
+ version: 1.2.2
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: 0.11.0
124
+ version: 1.2.2
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: devise
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - ">="
129
+ - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: 3.4.1
131
+ version: 4.4.3
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - ">="
136
+ - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: 3.4.1
138
+ version: 4.4.3
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: jquery-ui-rails
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: 4.2.1
145
+ version: 6.0.1
146
146
  type: :runtime
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: 4.2.1
152
+ version: 6.0.1
153
153
  - !ruby/object:Gem::Dependency
154
- name: judge
154
+ name: mini_magick
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
- - - "~>"
157
+ - - ">="
158
158
  - !ruby/object:Gem::Version
159
- version: 2.1.1
159
+ version: '0'
160
160
  type: :runtime
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - "~>"
164
+ - - ">="
165
165
  - !ruby/object:Gem::Version
166
- version: 2.1.1
166
+ version: '0'
167
167
  - !ruby/object:Gem::Dependency
168
- name: judge-simple_form
168
+ name: judge
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
171
  - - "~>"
172
172
  - !ruby/object:Gem::Version
173
- version: 1.0.0
173
+ version: 3.0.0
174
174
  type: :runtime
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
178
  - - "~>"
179
179
  - !ruby/object:Gem::Version
180
- version: 1.0.0
180
+ version: 3.0.0
181
181
  - !ruby/object:Gem::Dependency
182
- name: kaminari
182
+ name: judge-simple_form
183
183
  requirement: !ruby/object:Gem::Requirement
184
184
  requirements:
185
185
  - - "~>"
186
186
  - !ruby/object:Gem::Version
187
- version: 1.1.1
187
+ version: 1.1.0
188
188
  type: :runtime
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
192
  - - "~>"
193
193
  - !ruby/object:Gem::Version
194
- version: 1.1.1
194
+ version: 1.1.0
195
195
  - !ruby/object:Gem::Dependency
196
- name: remotipart
196
+ name: kaminari
197
197
  requirement: !ruby/object:Gem::Requirement
198
198
  requirements:
199
199
  - - "~>"
200
200
  - !ruby/object:Gem::Version
201
- version: 1.3.1
201
+ version: 1.1.1
202
202
  type: :runtime
203
203
  prerelease: false
204
204
  version_requirements: !ruby/object:Gem::Requirement
205
205
  requirements:
206
206
  - - "~>"
207
207
  - !ruby/object:Gem::Version
208
- version: 1.3.1
208
+ version: 1.1.1
209
209
  - !ruby/object:Gem::Dependency
210
- name: rmagick
210
+ name: remotipart
211
211
  requirement: !ruby/object:Gem::Requirement
212
212
  requirements:
213
213
  - - "~>"
214
214
  - !ruby/object:Gem::Version
215
- version: 2.16.0
215
+ version: 1.4.0
216
216
  type: :runtime
217
217
  prerelease: false
218
218
  version_requirements: !ruby/object:Gem::Requirement
219
219
  requirements:
220
220
  - - "~>"
221
221
  - !ruby/object:Gem::Version
222
- version: 2.16.0
222
+ version: 1.4.0
223
223
  - !ruby/object:Gem::Dependency
224
224
  name: simple_form
225
225
  requirement: !ruby/object:Gem::Requirement
226
226
  requirements:
227
- - - ">="
227
+ - - "~>"
228
228
  - !ruby/object:Gem::Version
229
- version: 3.1.0
229
+ version: 4.0.0
230
230
  type: :runtime
231
231
  prerelease: false
232
232
  version_requirements: !ruby/object:Gem::Requirement
233
233
  requirements:
234
- - - ">="
234
+ - - "~>"
235
235
  - !ruby/object:Gem::Version
236
- version: 3.1.0
236
+ version: 4.0.0
237
237
  - !ruby/object:Gem::Dependency
238
238
  name: slim
239
239
  requirement: !ruby/object:Gem::Requirement
@@ -393,6 +393,7 @@ files:
393
393
  - app/assets/images/fae/icons/user.svg
394
394
  - app/assets/images/fae/icons/users.svg
395
395
  - app/assets/images/fae/icons/zoom.svg
396
+ - app/assets/images/fae/tutorial_model_location.png
396
397
  - app/assets/images/fae/youtube_helper.jpg
397
398
  - app/assets/javascripts/fae/_modals.js
398
399
  - app/assets/javascripts/fae/_tables.js
@@ -485,6 +486,7 @@ files:
485
486
  - app/assets/stylesheets/fae/modules/tables/_tooltips.scss
486
487
  - app/assets/stylesheets/fae/pages/_error.scss
487
488
  - app/assets/stylesheets/fae/pages/_help.scss
489
+ - app/assets/stylesheets/fae/pages/_home.scss
488
490
  - app/assets/stylesheets/fae/pages/_login.scss
489
491
  - app/assets/stylesheets/fae/vendor/chosen.css
490
492
  - app/assets/stylesheets/fae/vendor/daterangepicker.css
@@ -576,11 +578,9 @@ files:
576
578
  - app/views/fae/pages/home.html.slim
577
579
  - app/views/fae/setup/first_user.html.slim
578
580
  - app/views/fae/shared/_errors.slim
579
- - app/views/fae/shared/_form_buttons.html.slim
580
581
  - app/views/fae/shared/_form_header.html.slim
581
582
  - app/views/fae/shared/_index_header.html.slim
582
583
  - app/views/fae/shared/_nested_table.html.slim
583
- - app/views/fae/shared/_nested_table_advanced.html.slim
584
584
  - app/views/fae/shared/_recent_changes.html.slim
585
585
  - app/views/fae/shared/_shared_nested_table.html.slim
586
586
  - app/views/fae/static_pages/index.html.slim
@@ -665,7 +665,6 @@ files:
665
665
  - lib/generators/fae/templates/views/new_nested.html.slim
666
666
  - lib/generators/fae/templates/views/static_page_form.html.slim
667
667
  - lib/generators/fae/templates/views/table_nested.html.slim
668
- - lib/sub_test_task_patch.rb
669
668
  homepage: https://github.com/wearefine/fae
670
669
  licenses:
671
670
  - MIT
@@ -686,7 +685,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
686
685
  version: '0'
687
686
  requirements: []
688
687
  rubyforge_project:
689
- rubygems_version: 2.6.13
688
+ rubygems_version: 2.4.6
690
689
  signing_key:
691
690
  specification_version: 4
692
691
  summary: CMS for Rails. For Reals.
@@ -1,11 +0,0 @@
1
- / @depreciation - delete this file in v2.0
2
- - save_button_text ||= 'Save'
3
- - cancel_button_text ||= 'Cancel'
4
- - cloneable ||= false
5
- - clone_button_text ||= 'Clone'
6
-
7
- .main_content-header-save
8
- a.button#js-header-cancel href=@index_path = cancel_button_text
9
- - if cloneable.present? && params[:id].present?
10
- a.button< data-method="post" data-confirm=t('fae.clone_confirmation') href="#{@index_path}?from_existing=#{params[:id]}" = clone_button_text
11
- input< name="commit" type="submit" value=save_button_text
@@ -1,18 +0,0 @@
1
- / this file is meant for backwards compatibiliy
2
- / DO NOT delete this partial
3
- / DO NOT intentially use this partial
4
- / 'fae/shared/nested_table' directly
5
-
6
- == render 'fae/shared/nested_table',
7
- assoc: assoc,
8
- parent_item: parent_item,
9
- assoc_name: (assoc_name ||= nil),
10
- title: (title ||= nil),
11
- header: (header ||= nil),
12
- ordered: (ordered ||= nil),
13
- has_thumb: (has_thumb ||= nil),
14
- cols: (cols ||= nil),
15
- assoc_name_singular: (assoc_name_singular ||= nil),
16
- title_singular: (title_singular ||= nil),
17
- new_path: (new_path ||= nil),
18
- edit_path: (edit_path ||= nil)
@@ -1,129 +0,0 @@
1
- # @deprecation - Rails::TestTask was deprecated in Rails 5, but this class is required to run Travis tests in Rails 4
2
- # can deprecate when we drop Rails 4 support
3
-
4
- require 'rake/testtask'
5
-
6
- module Rails
7
- class TestTask < Rake::TestTask # :nodoc: all
8
- # A utility class which is used primarily in "rails/test_unit/testing.rake"
9
- # to help define rake tasks corresponding to <tt>rake test</tt>.
10
- #
11
- # This class takes a TestInfo class and defines the appropriate rake task
12
- # based on the information, then invokes it.
13
- class TestCreator # :nodoc:
14
- def initialize(info)
15
- @info = info
16
- end
17
-
18
- def invoke_rake_task
19
- if @info.files.any?
20
- create_and_run_single_test
21
- reset_application_tasks
22
- else
23
- Rake::Task[ENV['TEST'] ? 'test:single' : 'test:run'].invoke
24
- end
25
- end
26
-
27
- private
28
-
29
- def create_and_run_single_test
30
- Rails::TestTask.new('test:single') { |t|
31
- t.test_files = @info.files
32
- }
33
- ENV['TESTOPTS'] ||= @info.opts
34
- Rake::Task['test:single'].invoke
35
- end
36
-
37
- def reset_application_tasks
38
- Rake.application.top_level_tasks.replace @info.tasks
39
- end
40
- end
41
-
42
- # This is a utility class used by the <tt>TestTask::TestCreator</tt> class.
43
- # This class takes a set of test tasks and checks to see if they correspond
44
- # to test files (or can be transformed into test files). Calling <tt>files</tt>
45
- # provides the set of test files and is used when initializing tests after
46
- # a call to <tt>rake test</tt>.
47
- class TestInfo # :nodoc:
48
- def initialize(tasks)
49
- @tasks = tasks
50
- @files = nil
51
- end
52
-
53
- def files
54
- @files ||= @tasks.map { |task|
55
- [task, translate(task)].find { |file| test_file?(file) }
56
- }.compact
57
- end
58
-
59
- def translate(file)
60
- if file =~ /^app\/(.*)$/
61
- "test/#{$1.sub(/\.rb$/, '')}_test.rb"
62
- else
63
- "test/#{file}_test.rb"
64
- end
65
- end
66
-
67
- def tasks
68
- @tasks - test_file_tasks - opt_names
69
- end
70
-
71
- def opts
72
- opts = opt_names
73
- if opts.any?
74
- "-n #{opts.join ' '}"
75
- end
76
- end
77
-
78
- private
79
-
80
- def test_file_tasks
81
- @tasks.find_all { |task|
82
- [task, translate(task)].any? { |file| test_file?(file) }
83
- }
84
- end
85
-
86
- def test_file?(file)
87
- file =~ /^test/ && File.file?(file) && !File.directory?(file)
88
- end
89
-
90
- def opt_names
91
- (@tasks - test_file_tasks).reject { |t| task_defined? t }
92
- end
93
-
94
- def task_defined?(task)
95
- Rake::Task.task_defined? task
96
- end
97
- end
98
-
99
- def self.test_creator(tasks)
100
- info = TestInfo.new(tasks)
101
- TestCreator.new(info)
102
- end
103
-
104
- def initialize(name = :test)
105
- super
106
- @libs << "test" # lib *and* test seem like a better default
107
- end
108
-
109
- def define
110
- task @name do
111
- if ENV['TESTOPTS']
112
- ARGV.replace Shellwords.split ENV['TESTOPTS']
113
- end
114
- libs = @libs - $LOAD_PATH
115
- $LOAD_PATH.unshift(*libs)
116
- file_list.each { |fl|
117
- FileList[fl].to_a.each { |f| require File.expand_path f }
118
- }
119
- end
120
- end
121
- end
122
-
123
- # Silence the default description to cut down on `rake -T` noise.
124
- class SubTestTask < Rake::TestTask # :nodoc:
125
- def desc(string)
126
- # Ignore the description.
127
- end
128
- end
129
- end