trix_on_rails 0.1.4 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/trix-core.js +8 -8
  3. data/app/assets/javascripts/trix.js +10 -14
  4. data/app/assets/stylesheets/trix.css +268 -177
  5. data/lib/trix_on_rails/version.rb +1 -1
  6. data/test/dummy/Rakefile +1 -1
  7. data/test/dummy/app/assets/javascripts/application.js +2 -1
  8. data/test/dummy/app/assets/javascripts/cable.js +13 -0
  9. data/test/dummy/app/assets/stylesheets/application.css +1 -0
  10. data/test/dummy/app/channels/application_cable/channel.rb +4 -0
  11. data/test/dummy/app/channels/application_cable/connection.rb +4 -0
  12. data/test/dummy/app/controllers/application_controller.rb +0 -2
  13. data/test/dummy/app/controllers/pages_controller.rb +58 -0
  14. data/test/dummy/app/mailers/application_mailer.rb +4 -0
  15. data/test/dummy/app/models/application_record.rb +3 -0
  16. data/test/dummy/app/models/page.rb +2 -0
  17. data/test/dummy/app/views/layouts/application.html.erb +9 -9
  18. data/test/dummy/app/views/layouts/mailer.html.erb +13 -0
  19. data/test/dummy/app/views/layouts/mailer.text.erb +1 -0
  20. data/test/dummy/app/views/pages/_form.html.erb +34 -0
  21. data/test/dummy/app/views/pages/edit.html.erb +6 -0
  22. data/test/dummy/app/views/pages/index.html.erb +31 -0
  23. data/test/dummy/app/views/pages/new.html.erb +5 -0
  24. data/test/dummy/app/views/pages/show.html.erb +19 -0
  25. data/test/dummy/bin/rails +1 -1
  26. data/test/dummy/bin/setup +8 -4
  27. data/test/dummy/bin/update +4 -4
  28. data/test/dummy/bin/yarn +11 -0
  29. data/test/dummy/config.ru +2 -1
  30. data/test/dummy/config/application.rb +4 -9
  31. data/test/dummy/config/boot.rb +2 -2
  32. data/test/dummy/config/cable.yml +10 -0
  33. data/test/dummy/config/database.yml +15 -8
  34. data/test/dummy/config/environment.rb +1 -1
  35. data/test/dummy/config/environments/development.rb +14 -11
  36. data/test/dummy/config/environments/production.rb +23 -10
  37. data/test/dummy/config/environments/test.rb +4 -6
  38. data/test/dummy/config/initializers/application_controller_renderer.rb +8 -6
  39. data/test/dummy/config/initializers/assets.rb +6 -3
  40. data/test/dummy/config/initializers/cookies_serializer.rb +2 -0
  41. data/test/dummy/config/locales/en.yml +10 -0
  42. data/test/dummy/config/puma.rb +56 -0
  43. data/test/dummy/config/routes.rb +2 -0
  44. data/test/dummy/config/secrets.yml +1 -5
  45. data/test/dummy/config/spring.rb +6 -0
  46. data/test/dummy/db/migrate/20171116134443_create_pages.rb +11 -0
  47. data/test/dummy/db/schema.rb +23 -0
  48. data/test/dummy/package.json +5 -0
  49. data/test/dummy/public/404.html +6 -6
  50. data/test/dummy/public/422.html +6 -6
  51. data/test/dummy/public/500.html +6 -6
  52. data/test/dummy/public/apple-touch-icon-precomposed.png +0 -0
  53. data/test/dummy/public/apple-touch-icon.png +0 -0
  54. data/test/dummy/test/application_system_test_case.rb +5 -0
  55. data/test/dummy/test/controllers/pages_controller_test.rb +48 -0
  56. data/test/dummy/test/fixtures/pages.yml +11 -0
  57. data/test/dummy/test/models/page_test.rb +7 -0
  58. data/test/dummy/test/system/pages_test.rb +9 -0
  59. metadata +82 -38
  60. data/test/dummy/README.md +0 -24
  61. data/test/dummy/config/initializers/active_record_belongs_to_required_by_default.rb +0 -4
  62. data/test/dummy/config/initializers/callback_terminator.rb +0 -4
  63. data/test/dummy/config/initializers/cors.rb +0 -14
  64. data/test/dummy/config/initializers/session_store.rb +0 -3
  65. data/test/dummy/log/test.log +0 -8
File without changes
@@ -0,0 +1,5 @@
1
+ require "test_helper"
2
+
3
+ class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
4
+ driven_by :selenium, using: :chrome, screen_size: [1400, 1400]
5
+ end
@@ -0,0 +1,48 @@
1
+ require 'test_helper'
2
+
3
+ class PagesControllerTest < ActionDispatch::IntegrationTest
4
+ setup do
5
+ @page = pages(:one)
6
+ end
7
+
8
+ test "should get index" do
9
+ get pages_url
10
+ assert_response :success
11
+ end
12
+
13
+ test "should get new" do
14
+ get new_page_url
15
+ assert_response :success
16
+ end
17
+
18
+ test "should create page" do
19
+ assert_difference('Page.count') do
20
+ post pages_url, params: { page: { header: @page.header, page: @page.page, title: @page.title } }
21
+ end
22
+
23
+ assert_redirected_to page_url(Page.last)
24
+ end
25
+
26
+ test "should show page" do
27
+ get page_url(@page)
28
+ assert_response :success
29
+ end
30
+
31
+ test "should get edit" do
32
+ get edit_page_url(@page)
33
+ assert_response :success
34
+ end
35
+
36
+ test "should update page" do
37
+ patch page_url(@page), params: { page: { header: @page.header, page: @page.page, title: @page.title } }
38
+ assert_redirected_to page_url(@page)
39
+ end
40
+
41
+ test "should destroy page" do
42
+ assert_difference('Page.count', -1) do
43
+ delete page_url(@page)
44
+ end
45
+
46
+ assert_redirected_to pages_url
47
+ end
48
+ end
@@ -0,0 +1,11 @@
1
+ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2
+
3
+ one:
4
+ header: MyString
5
+ title: MyString
6
+ page: MyText
7
+
8
+ two:
9
+ header: MyString
10
+ title: MyString
11
+ page: MyText
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class PageTest < ActiveSupport::TestCase
4
+ # test "the truth" do
5
+ # assert true
6
+ # end
7
+ end
@@ -0,0 +1,9 @@
1
+ require "application_system_test_case"
2
+
3
+ class PagesTest < ApplicationSystemTestCase
4
+ # test "visiting the index" do
5
+ # visit pages_url
6
+ #
7
+ # assert_selector "h1", text: "Page"
8
+ # end
9
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trix_on_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - rolf
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-20 00:00:00.000000000 Z
11
+ date: 2017-11-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 5.0.0.alpha
19
+ version: '5.1'
20
20
  type: :development
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: 5.0.0.alpha
26
+ version: '5.1'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: mysql2
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -54,48 +54,70 @@ files:
54
54
  - lib/trix_on_rails.rb
55
55
  - lib/trix_on_rails/engine.rb
56
56
  - lib/trix_on_rails/version.rb
57
- - test/dummy/README.md
58
57
  - test/dummy/Rakefile
59
58
  - test/dummy/app/assets/config/manifest.js
60
59
  - test/dummy/app/assets/javascripts/application.js
60
+ - test/dummy/app/assets/javascripts/cable.js
61
61
  - test/dummy/app/assets/stylesheets/application.css
62
+ - test/dummy/app/channels/application_cable/channel.rb
63
+ - test/dummy/app/channels/application_cable/connection.rb
62
64
  - test/dummy/app/controllers/application_controller.rb
65
+ - test/dummy/app/controllers/pages_controller.rb
63
66
  - test/dummy/app/helpers/application_helper.rb
64
67
  - test/dummy/app/jobs/application_job.rb
68
+ - test/dummy/app/mailers/application_mailer.rb
69
+ - test/dummy/app/models/application_record.rb
70
+ - test/dummy/app/models/page.rb
65
71
  - test/dummy/app/views/layouts/application.html.erb
72
+ - test/dummy/app/views/layouts/mailer.html.erb
73
+ - test/dummy/app/views/layouts/mailer.text.erb
74
+ - test/dummy/app/views/pages/_form.html.erb
75
+ - test/dummy/app/views/pages/edit.html.erb
76
+ - test/dummy/app/views/pages/index.html.erb
77
+ - test/dummy/app/views/pages/new.html.erb
78
+ - test/dummy/app/views/pages/show.html.erb
66
79
  - test/dummy/bin/bundle
67
80
  - test/dummy/bin/rails
68
81
  - test/dummy/bin/rake
69
82
  - test/dummy/bin/setup
70
83
  - test/dummy/bin/update
84
+ - test/dummy/bin/yarn
71
85
  - test/dummy/config.ru
72
86
  - test/dummy/config/application.rb
73
87
  - test/dummy/config/boot.rb
88
+ - test/dummy/config/cable.yml
74
89
  - test/dummy/config/database.yml
75
90
  - test/dummy/config/environment.rb
76
91
  - test/dummy/config/environments/development.rb
77
92
  - test/dummy/config/environments/production.rb
78
93
  - test/dummy/config/environments/test.rb
79
- - test/dummy/config/initializers/active_record_belongs_to_required_by_default.rb
80
94
  - test/dummy/config/initializers/application_controller_renderer.rb
81
95
  - test/dummy/config/initializers/assets.rb
82
96
  - test/dummy/config/initializers/backtrace_silencers.rb
83
- - test/dummy/config/initializers/callback_terminator.rb
84
97
  - test/dummy/config/initializers/cookies_serializer.rb
85
- - test/dummy/config/initializers/cors.rb
86
98
  - test/dummy/config/initializers/filter_parameter_logging.rb
87
99
  - test/dummy/config/initializers/inflections.rb
88
100
  - test/dummy/config/initializers/mime_types.rb
89
- - test/dummy/config/initializers/session_store.rb
90
101
  - test/dummy/config/initializers/wrap_parameters.rb
91
102
  - test/dummy/config/locales/en.yml
103
+ - test/dummy/config/puma.rb
92
104
  - test/dummy/config/routes.rb
93
105
  - test/dummy/config/secrets.yml
94
- - test/dummy/log/test.log
106
+ - test/dummy/config/spring.rb
107
+ - test/dummy/db/migrate/20171116134443_create_pages.rb
108
+ - test/dummy/db/schema.rb
109
+ - test/dummy/package.json
95
110
  - test/dummy/public/404.html
96
111
  - test/dummy/public/422.html
97
112
  - test/dummy/public/500.html
113
+ - test/dummy/public/apple-touch-icon-precomposed.png
114
+ - test/dummy/public/apple-touch-icon.png
98
115
  - test/dummy/public/favicon.ico
116
+ - test/dummy/test/application_system_test_case.rb
117
+ - test/dummy/test/controllers/pages_controller_test.rb
118
+ - test/dummy/test/fixtures/pages.yml
119
+ - test/dummy/test/models/page_test.rb
120
+ - test/dummy/test/system/pages_test.rb
99
121
  - test/test_helper.rb
100
122
  - test/trix_on_rails_test.rb
101
123
  homepage: http://github.com/l-plan/trix_on_rails
@@ -118,52 +140,74 @@ required_rubygems_version: !ruby/object:Gem::Requirement
118
140
  version: '0'
119
141
  requirements: []
120
142
  rubyforge_project:
121
- rubygems_version: 2.4.8
143
+ rubygems_version: 2.6.11
122
144
  signing_key:
123
145
  specification_version: 4
124
146
  summary: this gem adds basecamps's trix.js to the assets-pipeline
125
147
  test_files:
148
+ - test/dummy/app/mailers/application_mailer.rb
149
+ - test/dummy/app/models/page.rb
150
+ - test/dummy/app/models/application_record.rb
151
+ - test/dummy/app/jobs/application_job.rb
152
+ - test/dummy/app/controllers/application_controller.rb
153
+ - test/dummy/app/controllers/pages_controller.rb
154
+ - test/dummy/app/views/layouts/application.html.erb
155
+ - test/dummy/app/views/layouts/mailer.html.erb
156
+ - test/dummy/app/views/layouts/mailer.text.erb
157
+ - test/dummy/app/views/pages/index.html.erb
158
+ - test/dummy/app/views/pages/edit.html.erb
159
+ - test/dummy/app/views/pages/show.html.erb
160
+ - test/dummy/app/views/pages/_form.html.erb
161
+ - test/dummy/app/views/pages/new.html.erb
126
162
  - test/dummy/app/assets/config/manifest.js
163
+ - test/dummy/app/assets/javascripts/cable.js
127
164
  - test/dummy/app/assets/javascripts/application.js
128
165
  - test/dummy/app/assets/stylesheets/application.css
129
- - test/dummy/app/controllers/application_controller.rb
130
166
  - test/dummy/app/helpers/application_helper.rb
131
- - test/dummy/app/jobs/application_job.rb
132
- - test/dummy/app/views/layouts/application.html.erb
133
- - test/dummy/bin/bundle
134
- - test/dummy/bin/rails
167
+ - test/dummy/app/channels/application_cable/connection.rb
168
+ - test/dummy/app/channels/application_cable/channel.rb
169
+ - test/dummy/test/models/page_test.rb
170
+ - test/dummy/test/system/pages_test.rb
171
+ - test/dummy/test/application_system_test_case.rb
172
+ - test/dummy/test/fixtures/pages.yml
173
+ - test/dummy/test/controllers/pages_controller_test.rb
174
+ - test/dummy/bin/update
135
175
  - test/dummy/bin/rake
136
176
  - test/dummy/bin/setup
137
- - test/dummy/bin/update
138
- - test/dummy/config/application.rb
139
- - test/dummy/config/boot.rb
140
- - test/dummy/config/database.yml
141
- - test/dummy/config/environment.rb
142
- - test/dummy/config/environments/development.rb
177
+ - test/dummy/bin/bundle
178
+ - test/dummy/bin/yarn
179
+ - test/dummy/bin/rails
180
+ - test/dummy/config/secrets.yml
181
+ - test/dummy/config/routes.rb
182
+ - test/dummy/config/locales/en.yml
183
+ - test/dummy/config/cable.yml
143
184
  - test/dummy/config/environments/production.rb
185
+ - test/dummy/config/environments/development.rb
144
186
  - test/dummy/config/environments/test.rb
145
- - test/dummy/config/initializers/active_record_belongs_to_required_by_default.rb
187
+ - test/dummy/config/spring.rb
188
+ - test/dummy/config/environment.rb
189
+ - test/dummy/config/application.rb
190
+ - test/dummy/config/puma.rb
191
+ - test/dummy/config/database.yml
192
+ - test/dummy/config/boot.rb
146
193
  - test/dummy/config/initializers/application_controller_renderer.rb
147
- - test/dummy/config/initializers/assets.rb
148
194
  - test/dummy/config/initializers/backtrace_silencers.rb
149
- - test/dummy/config/initializers/callback_terminator.rb
150
- - test/dummy/config/initializers/cookies_serializer.rb
151
- - test/dummy/config/initializers/cors.rb
152
- - test/dummy/config/initializers/filter_parameter_logging.rb
153
- - test/dummy/config/initializers/inflections.rb
154
195
  - test/dummy/config/initializers/mime_types.rb
155
- - test/dummy/config/initializers/session_store.rb
196
+ - test/dummy/config/initializers/filter_parameter_logging.rb
156
197
  - test/dummy/config/initializers/wrap_parameters.rb
157
- - test/dummy/config/locales/en.yml
158
- - test/dummy/config/routes.rb
159
- - test/dummy/config/secrets.yml
198
+ - test/dummy/config/initializers/assets.rb
199
+ - test/dummy/config/initializers/cookies_serializer.rb
200
+ - test/dummy/config/initializers/inflections.rb
160
201
  - test/dummy/config.ru
161
- - test/dummy/log/test.log
162
- - test/dummy/public/404.html
202
+ - test/dummy/Rakefile
203
+ - test/dummy/public/favicon.ico
163
204
  - test/dummy/public/422.html
205
+ - test/dummy/public/apple-touch-icon.png
164
206
  - test/dummy/public/500.html
165
- - test/dummy/public/favicon.ico
166
- - test/dummy/Rakefile
167
- - test/dummy/README.md
207
+ - test/dummy/public/404.html
208
+ - test/dummy/public/apple-touch-icon-precomposed.png
209
+ - test/dummy/package.json
210
+ - test/dummy/db/schema.rb
211
+ - test/dummy/db/migrate/20171116134443_create_pages.rb
168
212
  - test/test_helper.rb
169
213
  - test/trix_on_rails_test.rb
@@ -1,24 +0,0 @@
1
- ## README
2
-
3
- This README would normally document whatever steps are necessary to get the
4
- application up and running.
5
-
6
- Things you may want to cover:
7
-
8
- * Ruby version
9
-
10
- * System dependencies
11
-
12
- * Configuration
13
-
14
- * Database creation
15
-
16
- * Database initialization
17
-
18
- * How to run the test suite
19
-
20
- * Services (job queues, cache servers, search engines, etc.)
21
-
22
- * Deployment instructions
23
-
24
- * ...
@@ -1,4 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Require `belongs_to` associations by default.
4
- Rails.application.config.active_record.belongs_to_required_by_default = true
@@ -1,4 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Do not halt callback chains when a callback returns false.
4
- ActiveSupport.halt_callback_chains_on_return_false = false
@@ -1,14 +0,0 @@
1
- # Avoid CORS issues when API is called from the frontend app
2
- # Handle Cross-Origin Resource Sharing (CORS) in order to accept cross-origin AJAX requests
3
-
4
- # Read more: https://github.com/cyu/rack-cors
5
-
6
- # Rails.application.config.middleware.insert_before 0, Rack::Cors do
7
- # allow do
8
- # origins 'example.com'
9
- #
10
- # resource '*',
11
- # headers: :any,
12
- # methods: [:get, :post, :put, :patch, :delete, :options, :head]
13
- # end
14
- # end
@@ -1,3 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- Rails.application.config.session_store :cookie_store, key: '_dummy_session'
@@ -1,8 +0,0 @@
1
- ActiveRecord::SchemaMigration Load (27.1ms) SELECT `schema_migrations`.* FROM `schema_migrations`
2
-  (143.6ms) DROP DATABASE IF EXISTS `dummy_test`
3
-  (8.8ms) CREATE DATABASE `dummy_test` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`
4
-  (0.2ms) BEGIN
5
- -----------------------------
6
- TrixOnRails::Test: test_truth
7
- -----------------------------
8
-  (0.2ms) ROLLBACK