flexite 0.0.4 → 0.0.5

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.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/flexite/tree.js.erb +7 -0
  3. data/app/controllers/flexite/application_controller.rb +0 -6
  4. data/app/controllers/flexite/histories_controller.rb +14 -0
  5. data/app/forms/flexite/config/form.rb +4 -0
  6. data/app/forms/flexite/entry/array_form.rb +4 -0
  7. data/app/forms/flexite/entry/form.rb +8 -0
  8. data/app/helpers/flexite/entries_helper.rb +2 -1
  9. data/app/models/concerns/flexite/with_history.rb +49 -0
  10. data/app/models/flexite/bool_entry.rb +8 -2
  11. data/app/models/flexite/config.rb +6 -1
  12. data/app/models/flexite/entry.rb +6 -1
  13. data/app/models/flexite/history.rb +21 -0
  14. data/app/models/flexite/history_attribute.rb +6 -0
  15. data/app/models/flexite/int_entry.rb +1 -0
  16. data/app/models/flexite/sym_entry.rb +1 -0
  17. data/app/services/flexite/action_service.rb +2 -2
  18. data/app/services/flexite/entry/update_service.rb +6 -1
  19. data/app/views/flexite/configs/_form.html.haml +3 -0
  20. data/app/views/flexite/entries/_form.html.haml +3 -1
  21. data/app/views/flexite/entries/types/_bool_entry.html.haml +2 -0
  22. data/app/views/flexite/entries/types/_int_entry.html.haml +2 -0
  23. data/app/views/flexite/entries/types/_str_entry.html.haml +2 -0
  24. data/app/views/flexite/entries/types/_sym_entry.html.haml +1 -1
  25. data/app/views/flexite/histories/_history.html.haml +11 -0
  26. data/app/views/flexite/histories/index.js.haml +1 -0
  27. data/app/views/flexite/histories/restore.js.haml +4 -0
  28. data/config/routes.rb +2 -0
  29. data/db/migrate/20180618104507_create_flexite_histories.rb +12 -0
  30. data/db/migrate/20180618115057_create_flexite_history_attributes.rb +13 -0
  31. data/lib/flexite/configuration.rb +2 -1
  32. data/lib/flexite/engine.rb +1 -0
  33. data/lib/flexite/version.rb +1 -1
  34. data/test/dummy/config/application.yml +1 -598
  35. data/test/dummy/config/environments/development.rb +0 -2
  36. data/test/dummy/db/development.sqlite3 +0 -0
  37. data/test/dummy/db/schema.rb +21 -1
  38. data/test/dummy/log/development.log +140255 -0
  39. data/test/dummy/tmp/cache/assets/C67/060/sprockets%2Ffaf176441f0544dd2b51901280044b40 +0 -0
  40. data/test/dummy/tmp/cache/assets/C9D/530/sprockets%2Fdcd49c063327c12052812f41c20a8e74 +0 -0
  41. data/test/dummy/tmp/cache/assets/CA3/270/sprockets%2F502b740063f8ec15e7e12811da71c772 +0 -0
  42. data/test/dummy/tmp/cache/assets/CDC/060/sprockets%2F8ff1d307d1b36810549d0829722b7aea +0 -0
  43. data/test/dummy/tmp/cache/assets/CDE/120/sprockets%2F5fd8b3fa3724451579552aed373410ce +0 -0
  44. data/test/dummy/tmp/cache/assets/CF8/980/sprockets%2F4e5077b95460dc34d7c9d7d9880e7b47 +0 -0
  45. data/test/dummy/tmp/cache/assets/D00/4C0/sprockets%2F603c6d7b825c2f4a6422b3d4af4e6203 +0 -0
  46. data/test/dummy/tmp/cache/assets/D00/C40/sprockets%2F999847c008fb4ce26fff5607c39d8358 +0 -0
  47. data/test/dummy/tmp/cache/assets/D09/A30/sprockets%2F2a71e20a2f3544acb51956504cd8d8e9 +0 -0
  48. data/test/dummy/tmp/cache/assets/D0D/E60/sprockets%2F90ea9eaa4671ec2d76703bae31972634 +0 -0
  49. data/test/dummy/tmp/cache/assets/D2A/160/sprockets%2Fbe17d4d0be4b381500e2824bbe273d70 +0 -0
  50. data/test/dummy/tmp/cache/assets/D2E/700/sprockets%2Fb21f85e0940bbcb3a8914c9cb0b07218 +0 -0
  51. data/test/dummy/tmp/cache/assets/D39/CD0/sprockets%2F0e8f6981475e49ea9fe14698fa57e4e9 +0 -0
  52. data/test/dummy/tmp/cache/assets/D40/590/sprockets%2F181dd5673b58f1ec4c89e50028bfad60 +0 -0
  53. data/test/dummy/tmp/cache/assets/D46/870/sprockets%2Fd880bdf72c5d0009b88fda8521439dc8 +0 -0
  54. data/test/dummy/tmp/cache/assets/D48/5F0/sprockets%2Fe6a83afb2d92f4692ffb391b5285a518 +0 -0
  55. data/test/dummy/tmp/cache/assets/D4B/A20/sprockets%2Febde89014596e655c35df9c4a01ee636 +0 -0
  56. data/test/dummy/tmp/cache/assets/D54/A50/sprockets%2Ff49839d906f69fd92904ebac07a3a38e +0 -0
  57. data/test/dummy/tmp/cache/assets/D69/B50/sprockets%2F4186e2787004e19ceb0c4afed46cf04b +0 -0
  58. data/test/dummy/tmp/cache/assets/D6D/C20/sprockets%2F112e96fea93f5f1e31d2077f1cdaf283 +0 -0
  59. data/test/dummy/tmp/cache/assets/D7A/8F0/sprockets%2F8eefc5f9824d950317a5c4a2e68b3c4e +0 -0
  60. data/test/dummy/tmp/cache/assets/DB3/360/sprockets%2F24b1f98ad736884b91d6ebeb2fc68ed8 +0 -0
  61. data/test/dummy/tmp/cache/assets/DD2/E90/sprockets%2Ff01f48c96ba588d15b20dd57ed3ccb7f +0 -0
  62. data/test/dummy/tmp/cache/assets/DEE/0C0/sprockets%2Feedcd74856542eedb5ea3ab1b1502ca4 +0 -0
  63. data/test/dummy/tmp/cache/assets/DF1/210/sprockets%2Ff4fe7dba1445ba1b668aaa1bd34ca984 +0 -0
  64. data/test/dummy/tmp/cache/assets/E44/790/sprockets%2Fefb8d8ea9e97da9d675a8bfa1d5de343 +0 -0
  65. data/test/fixtures/flexite/histories.yml +11 -0
  66. data/test/fixtures/flexite/history_attributes.yml +11 -0
  67. data/test/unit/flexite/history_attribute_test.rb +9 -0
  68. data/test/unit/flexite/history_test.rb +9 -0
  69. metadata +47 -4
  70. data/test/dummy/db/test.sqlite3 +0 -0
@@ -0,0 +1,11 @@
1
+ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
2
+
3
+ # This model initially had no columns defined. If you add columns to the
4
+ # model remove the '{}' from the fixture names and add the columns immediately
5
+ # below each fixture, per the syntax in the comments below
6
+ #
7
+ one: {}
8
+ # column: value
9
+ #
10
+ two: {}
11
+ # column: value
@@ -0,0 +1,11 @@
1
+ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
2
+
3
+ # This model initially had no columns defined. If you add columns to the
4
+ # model remove the '{}' from the fixture names and add the columns immediately
5
+ # below each fixture, per the syntax in the comments below
6
+ #
7
+ one: {}
8
+ # column: value
9
+ #
10
+ two: {}
11
+ # column: value
@@ -0,0 +1,9 @@
1
+ require 'test_helper'
2
+
3
+ module Flexite
4
+ class HistoryAttributeTest < ActiveSupport::TestCase
5
+ # test "the truth" do
6
+ # assert true
7
+ # end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ require 'test_helper'
2
+
3
+ module Flexite
4
+ class HistoryTest < ActiveSupport::TestCase
5
+ # test "the truth" do
6
+ # assert true
7
+ # end
8
+ end
9
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flexite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maksim Rusakovich
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-18 00:00:00.000000000 Z
11
+ date: 2018-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -70,6 +70,34 @@ dependencies:
70
70
  - - ">="
71
71
  - !ruby/object:Gem::Version
72
72
  version: 3.4.6
73
+ - !ruby/object:Gem::Dependency
74
+ name: haml-rails
75
+ requirement: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - "~>"
78
+ - !ruby/object:Gem::Version
79
+ version: 0.4.0
80
+ type: :runtime
81
+ prerelease: false
82
+ version_requirements: !ruby/object:Gem::Requirement
83
+ requirements:
84
+ - - "~>"
85
+ - !ruby/object:Gem::Version
86
+ version: 0.4.0
87
+ - !ruby/object:Gem::Dependency
88
+ name: haml-rails
89
+ requirement: !ruby/object:Gem::Requirement
90
+ requirements:
91
+ - - "~>"
92
+ - !ruby/object:Gem::Version
93
+ version: 0.4.0
94
+ type: :development
95
+ prerelease: false
96
+ version_requirements: !ruby/object:Gem::Requirement
97
+ requirements:
98
+ - - "~>"
99
+ - !ruby/object:Gem::Version
100
+ version: 0.4.0
73
101
  - !ruby/object:Gem::Dependency
74
102
  name: sqlite3
75
103
  requirement: !ruby/object:Gem::Requirement
@@ -137,6 +165,7 @@ files:
137
165
  - app/controllers/flexite/application_controller.rb
138
166
  - app/controllers/flexite/configs_controller.rb
139
167
  - app/controllers/flexite/entries_controller.rb
168
+ - app/controllers/flexite/histories_controller.rb
140
169
  - app/factories/flexite/base_factory.rb
141
170
  - app/factories/flexite/service_factory.rb
142
171
  - app/forms/flexite/base_form.rb
@@ -146,10 +175,13 @@ files:
146
175
  - app/helpers/flexite/application_helper.rb
147
176
  - app/helpers/flexite/configs_helper.rb
148
177
  - app/helpers/flexite/entries_helper.rb
178
+ - app/models/concerns/flexite/with_history.rb
149
179
  - app/models/flexite/arr_entry.rb
150
180
  - app/models/flexite/bool_entry.rb
151
181
  - app/models/flexite/config.rb
152
182
  - app/models/flexite/entry.rb
183
+ - app/models/flexite/history.rb
184
+ - app/models/flexite/history_attribute.rb
153
185
  - app/models/flexite/int_entry.rb
154
186
  - app/models/flexite/str_entry.rb
155
187
  - app/models/flexite/sym_entry.rb
@@ -192,6 +224,9 @@ files:
192
224
  - app/views/flexite/entries/types/_str_entry.html.haml
193
225
  - app/views/flexite/entries/types/_sym_entry.html.haml
194
226
  - app/views/flexite/entries/update.js.haml
227
+ - app/views/flexite/histories/_history.html.haml
228
+ - app/views/flexite/histories/index.js.haml
229
+ - app/views/flexite/histories/restore.js.haml
195
230
  - app/views/flexite/shared/_messages.html.haml
196
231
  - app/views/flexite/shared/_show_flash.js.haml
197
232
  - app/views/layouts/flexite/application.html.haml
@@ -201,6 +236,8 @@ files:
201
236
  - config/routes.rb
202
237
  - db/migrate/20180503102555_create_flexite_configs.rb
203
238
  - db/migrate/20180503103109_create_flexite_entries.rb
239
+ - db/migrate/20180618104507_create_flexite_histories.rb
240
+ - db/migrate/20180618115057_create_flexite_history_attributes.rb
204
241
  - lib/flexite.rb
205
242
  - lib/flexite/cached_node.rb
206
243
  - lib/flexite/configuration.rb
@@ -236,7 +273,6 @@ files:
236
273
  - test/dummy/db/development.sqlite3
237
274
  - test/dummy/db/schema.rb
238
275
  - test/dummy/db/seeds.rb
239
- - test/dummy/db/test.sqlite3
240
276
  - test/dummy/log/development.log
241
277
  - test/dummy/public/404.html
242
278
  - test/dummy/public/422.html
@@ -271,6 +307,8 @@ files:
271
307
  - test/dummy/tmp/cache/assets/E44/790/sprockets%2Fefb8d8ea9e97da9d675a8bfa1d5de343
272
308
  - test/fixtures/flexite/configs.yml
273
309
  - test/fixtures/flexite/entries.yml
310
+ - test/fixtures/flexite/histories.yml
311
+ - test/fixtures/flexite/history_attributes.yml
274
312
  - test/flexite_test.rb
275
313
  - test/functional/flexite/configs_controller_test.rb
276
314
  - test/functional/flexite/entries_controller_test.rb
@@ -278,6 +316,8 @@ files:
278
316
  - test/test_helper.rb
279
317
  - test/unit/flexite/config_test.rb
280
318
  - test/unit/flexite/entry_test.rb
319
+ - test/unit/flexite/history_attribute_test.rb
320
+ - test/unit/flexite/history_test.rb
281
321
  - test/unit/helpers/flexite/configs_helper_test.rb
282
322
  - test/unit/helpers/flexite/entries_helper_test.rb
283
323
  homepage: https://github.com/mrusakovich/flexite
@@ -341,7 +381,6 @@ test_files:
341
381
  - test/dummy/public/500.html
342
382
  - test/dummy/log/development.log
343
383
  - test/dummy/config.ru
344
- - test/dummy/db/test.sqlite3
345
384
  - test/dummy/db/seeds.rb
346
385
  - test/dummy/db/schema.rb
347
386
  - test/dummy/db/development.sqlite3
@@ -370,8 +409,12 @@ test_files:
370
409
  - test/dummy/Rakefile
371
410
  - test/test_helper.rb
372
411
  - test/unit/flexite/config_test.rb
412
+ - test/unit/flexite/history_test.rb
413
+ - test/unit/flexite/history_attribute_test.rb
373
414
  - test/unit/flexite/entry_test.rb
374
415
  - test/unit/helpers/flexite/entries_helper_test.rb
375
416
  - test/unit/helpers/flexite/configs_helper_test.rb
417
+ - test/fixtures/flexite/history_attributes.yml
376
418
  - test/fixtures/flexite/entries.yml
377
419
  - test/fixtures/flexite/configs.yml
420
+ - test/fixtures/flexite/histories.yml
File without changes