mercury-rails 0.8.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. data/app/assets/images/mercury/toolbar/primary/tools.png +0 -0
  2. data/app/assets/images/mercury/toolbar/primary/user.png +0 -0
  3. data/app/assets/javascripts/mercury/dialogs/snippetpanel.js.coffee +1 -1
  4. data/app/assets/javascripts/mercury/lightview.js.coffee +11 -4
  5. data/app/assets/javascripts/mercury/locales/ar.locale.js.coffee +0 -4
  6. data/app/assets/javascripts/mercury/locales/da.locale.js.coffee +0 -4
  7. data/app/assets/javascripts/mercury/locales/de.locale.js.coffee +0 -4
  8. data/app/assets/javascripts/mercury/locales/es.locale.js.coffee +0 -4
  9. data/app/assets/javascripts/mercury/locales/example.local.js.coffee +0 -4
  10. data/app/assets/javascripts/mercury/locales/fr.locale.js.coffee +0 -4
  11. data/app/assets/javascripts/mercury/locales/hu.locale.js.coffee +209 -0
  12. data/app/assets/javascripts/mercury/locales/it.locale.js.coffee +0 -4
  13. data/app/assets/javascripts/mercury/locales/ko.local.js.coffee +0 -4
  14. data/app/assets/javascripts/mercury/locales/nl.locale.js.coffee +0 -4
  15. data/app/assets/javascripts/mercury/locales/pt.locale.js.coffee +0 -4
  16. data/app/assets/javascripts/mercury/locales/ru.locale.js.coffee +200 -0
  17. data/app/assets/javascripts/mercury/locales/sv.local.js.coffee +0 -4
  18. data/app/assets/javascripts/mercury/locales/swedish_chef.locale.js.coffee +0 -4
  19. data/app/assets/javascripts/mercury/locales/zh.local.js.coffee +0 -4
  20. data/app/assets/javascripts/mercury/mercury-compiled.js +10720 -0
  21. data/app/assets/javascripts/mercury/mercury.js.coffee +1 -1
  22. data/app/assets/javascripts/mercury/modal.js.coffee +14 -7
  23. data/app/assets/javascripts/mercury/modals/htmleditor.js.coffee +1 -1
  24. data/app/assets/javascripts/mercury/modals/insertmedia.js.coffee +2 -0
  25. data/app/assets/javascripts/mercury/modals/inserttable.js.coffee +10 -4
  26. data/app/assets/javascripts/mercury/page_editor.js.coffee +9 -9
  27. data/app/assets/javascripts/mercury/palette.js.coffee +1 -1
  28. data/app/assets/javascripts/mercury/panel.js.coffee +1 -0
  29. data/app/assets/javascripts/mercury/region.js.coffee +3 -3
  30. data/app/assets/javascripts/mercury/regions/{full.coffee → full.js.coffee} +2 -2
  31. data/app/assets/javascripts/mercury/regions/{markdown.coffee → markdown.js.coffee} +7 -1
  32. data/app/assets/javascripts/mercury/regions/snippets.js.coffee +1 -1
  33. data/app/assets/javascripts/mercury/select.js.coffee +1 -1
  34. data/app/assets/javascripts/mercury/snippet.js.coffee +40 -21
  35. data/app/assets/javascripts/mercury/toolbar.button.js.coffee +35 -20
  36. data/app/assets/javascripts/mercury/toolbar.expander.js.coffee +4 -3
  37. data/app/assets/javascripts/mercury/toolbar.js.coffee +6 -2
  38. data/app/assets/stylesheets/_mercury-bootstrap-overrides.scss +61 -0
  39. data/app/assets/stylesheets/_mercury-sass.scss +33 -0
  40. data/app/assets/stylesheets/mercury.css +1 -0
  41. data/app/assets/stylesheets/mercury/all_images.css.erb +4 -0
  42. data/app/assets/stylesheets/mercury/dialog.css +5 -2
  43. data/app/assets/stylesheets/mercury/mercury.css +0 -1
  44. data/app/assets/stylesheets/mercury/toolbar.css +3 -0
  45. data/app/assets/stylesheets/mercury/uploader.css +1 -1
  46. data/app/views/mercury/modals/media.html +10 -0
  47. data/app/views/mercury/panels/snippets.html +6 -1
  48. data/app/views/mercury/snippets/example/options.html.erb +1 -1
  49. data/app/views/mercury/snippets/no_options/preview.html.erb +1 -0
  50. data/features/loading/loading.feature +1 -1
  51. data/features/regions/full/basic_editing.feature +2 -2
  52. data/features/regions/full/inserting_media.feature +18 -0
  53. data/features/regions/full/inserting_snippets.feature +11 -0
  54. data/features/step_definitions/custom_web_steps.rb +22 -0
  55. data/features/step_definitions/mercury_steps.rb +1 -439
  56. data/features/support/selectors.rb +23 -0
  57. data/lib/generators/mercury/install/images/templates/ar_paperclip_image.rb +2 -0
  58. data/lib/mercury/cucumber/step_definitions.rb +13 -0
  59. data/lib/mercury/cucumber/step_definitions/mercury_steps.rb +408 -0
  60. data/{features → lib/mercury/cucumber}/support/mercury_contents.rb +1 -1
  61. data/{features → lib/mercury/cucumber}/support/mercury_selectors.rb +0 -20
  62. data/lib/mercury/rails.rb +1 -0
  63. data/lib/mercury/version.rb +1 -1
  64. data/spec/dummy/config/application.rb +4 -1
  65. data/spec/dummy/config/database.yml +10 -0
  66. data/spec/dummy/db/.gitkeep +0 -0
  67. data/spec/dummy/public/index.html +13 -2
  68. data/spec/javascripts/mercury/lightview_spec.js.coffee +33 -1
  69. data/spec/javascripts/mercury/modal_spec.js.coffee +35 -3
  70. data/spec/javascripts/mercury/modals/htmleditor_spec.js.coffee +1 -1
  71. data/spec/javascripts/mercury/modals/insertmedia_spec.js.coffee +6 -2
  72. data/spec/javascripts/mercury/modals/inserttable_spec.js.coffee +10 -0
  73. data/spec/javascripts/mercury/page_editor_spec.js.coffee +6 -5
  74. data/spec/javascripts/mercury/region_spec.js.coffee +4 -0
  75. data/spec/javascripts/mercury/snippet_spec.js.coffee +65 -21
  76. data/spec/javascripts/mercury/toolbar_spec.js.coffee +22 -0
  77. data/spec/javascripts/templates/mercury/modals/insertmedia.html +10 -0
  78. metadata +26 -16
  79. data/spec/dummy/config/database.example.yml +0 -25
  80. data/spec/dummy/config/database.travisci.yml +0 -4
@@ -188,6 +188,28 @@ describe "Mercury.Toolbar", ->
188
188
  it "returns the element outerheight", ->
189
189
  expect(@toolbar.height(true)).toEqual($('.mercury-toolbar-container').outerHeight())
190
190
 
191
+ describe "#top", ->
192
+
193
+ beforeEach ->
194
+ spyOn(Mercury.Toolbar.prototype, 'buildButton').andCallFake(=> $('<div>'))
195
+ spyOn(Mercury.Toolbar.prototype, 'bindEvents').andCallFake(=>)
196
+
197
+ describe "when visible", ->
198
+
199
+ beforeEach ->
200
+ @toolbar = new Mercury.Toolbar({appendTo: '#test', visible: true})
201
+
202
+ it "returns the element offests top", ->
203
+ expect(@toolbar.top()).toEqual($('.mercury-toolbar-container').offset().top)
204
+
205
+ describe "when not visible", ->
206
+
207
+ beforeEach ->
208
+ @toolbar = new Mercury.Toolbar({appendTo: '#test', visible: false})
209
+
210
+ it "returns the element offests top", ->
211
+ expect(@toolbar.top()).toEqual(0)
212
+
191
213
 
192
214
  describe "#show", ->
193
215
 
@@ -41,6 +41,16 @@
41
41
  <option value="absbottom">Absolute Bottom</option>
42
42
  </select>
43
43
  </div>
44
+ <label class="select optional control-label" for="media_image_float">Float</label>
45
+ <div class="controls">
46
+ <select class="select optional" id="media_image_float" name="media[image_float]">
47
+ <option value="">None</option>
48
+ <option value="left">Left</option>
49
+ <option value="right">Right</option>
50
+ <option value="none">None</option>
51
+ <option value="inherit">Inherit</option>
52
+ </select>
53
+ </div>
44
54
  </div>
45
55
  </div>
46
56
  <div class="media-options" id="youtube_url_options" style="display:none">
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mercury-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,10 +9,10 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-05 00:00:00.000000000 Z
12
+ date: 2012-10-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: rails
15
+ name: railties
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
@@ -237,6 +237,10 @@ files:
237
237
  - lib/generators/mercury/install/images/templates/mongoid_paperclip_image.rb
238
238
  - lib/generators/mercury/install/install_generator.rb
239
239
  - lib/mercury/authentication.rb
240
+ - lib/mercury/cucumber/step_definitions/mercury_steps.rb
241
+ - lib/mercury/cucumber/step_definitions.rb
242
+ - lib/mercury/cucumber/support/mercury_contents.rb
243
+ - lib/mercury/cucumber/support/mercury_selectors.rb
240
244
  - lib/mercury/engine.rb
241
245
  - lib/mercury/rails.rb
242
246
  - lib/mercury/version.rb
@@ -264,7 +268,9 @@ files:
264
268
  - app/assets/images/mercury/toolbar/primary/redo.png
265
269
  - app/assets/images/mercury/toolbar/primary/save.png
266
270
  - app/assets/images/mercury/toolbar/primary/snippetpanel.png
271
+ - app/assets/images/mercury/toolbar/primary/tools.png
267
272
  - app/assets/images/mercury/toolbar/primary/undo.png
273
+ - app/assets/images/mercury/toolbar/primary/user.png
268
274
  - app/assets/images/mercury/toolbar/snippets/buttons.png
269
275
  - app/assets/javascripts/jquery-1.7.js
270
276
  - app/assets/javascripts/mercury/dependencies/jquery-ui-1.8.13.custom.js
@@ -287,13 +293,16 @@ files:
287
293
  - app/assets/javascripts/mercury/locales/es.locale.js.coffee
288
294
  - app/assets/javascripts/mercury/locales/example.local.js.coffee
289
295
  - app/assets/javascripts/mercury/locales/fr.locale.js.coffee
296
+ - app/assets/javascripts/mercury/locales/hu.locale.js.coffee
290
297
  - app/assets/javascripts/mercury/locales/it.locale.js.coffee
291
298
  - app/assets/javascripts/mercury/locales/ko.local.js.coffee
292
299
  - app/assets/javascripts/mercury/locales/nl.locale.js.coffee
293
300
  - app/assets/javascripts/mercury/locales/pt.locale.js.coffee
301
+ - app/assets/javascripts/mercury/locales/ru.locale.js.coffee
294
302
  - app/assets/javascripts/mercury/locales/sv.local.js.coffee
295
303
  - app/assets/javascripts/mercury/locales/swedish_chef.locale.js.coffee
296
304
  - app/assets/javascripts/mercury/locales/zh.local.js.coffee
305
+ - app/assets/javascripts/mercury/mercury-compiled.js
297
306
  - app/assets/javascripts/mercury/mercury.js.coffee
298
307
  - app/assets/javascripts/mercury/modal.js.coffee
299
308
  - app/assets/javascripts/mercury/modals/htmleditor.js.coffee
@@ -309,9 +318,9 @@ files:
309
318
  - app/assets/javascripts/mercury/plugins/save_as_xml/mercury/page_editor.js.coffee
310
319
  - app/assets/javascripts/mercury/plugins/save_as_xml/plugin.js
311
320
  - app/assets/javascripts/mercury/region.js.coffee
312
- - app/assets/javascripts/mercury/regions/full.coffee
321
+ - app/assets/javascripts/mercury/regions/full.js.coffee
313
322
  - app/assets/javascripts/mercury/regions/image.js.coffee
314
- - app/assets/javascripts/mercury/regions/markdown.coffee
323
+ - app/assets/javascripts/mercury/regions/markdown.js.coffee
315
324
  - app/assets/javascripts/mercury/regions/simple.js.coffee
316
325
  - app/assets/javascripts/mercury/regions/snippets.js.coffee
317
326
  - app/assets/javascripts/mercury/select.js.coffee
@@ -327,6 +336,8 @@ files:
327
336
  - app/assets/javascripts/mercury/tooltip.js.coffee
328
337
  - app/assets/javascripts/mercury/uploader.js.coffee
329
338
  - app/assets/javascripts/mercury.js
339
+ - app/assets/stylesheets/_mercury-bootstrap-overrides.scss
340
+ - app/assets/stylesheets/_mercury-sass.scss
330
341
  - app/assets/stylesheets/mercury/all_images.css.erb
331
342
  - app/assets/stylesheets/mercury/bootstrap-ish.css
332
343
  - app/assets/stylesheets/mercury/bootstrap-overrides.css
@@ -357,6 +368,7 @@ files:
357
368
  - app/views/mercury/selects/style.html
358
369
  - app/views/mercury/snippets/example/options.html.erb
359
370
  - app/views/mercury/snippets/example/preview.html.erb
371
+ - app/views/mercury/snippets/no_options/preview.html.erb
360
372
  - config/routes.rb
361
373
  - LICENSE
362
374
  - POST_INSTALL
@@ -389,14 +401,13 @@ files:
389
401
  - features/regions/snippets/basic_editing.feature
390
402
  - features/regions/snippets/inserting_snippets.feature
391
403
  - features/saving/saving.feature
404
+ - features/step_definitions/custom_web_steps.rb
392
405
  - features/step_definitions/debug_steps.rb
393
406
  - features/step_definitions/generator_steps.rb
394
407
  - features/step_definitions/mercury_steps.rb
395
408
  - features/step_definitions/web_steps.rb
396
409
  - features/support/aruba.rb
397
410
  - features/support/env.rb
398
- - features/support/mercury_contents.rb
399
- - features/support/mercury_selectors.rb
400
411
  - features/support/paths.rb
401
412
  - features/support/selectors.rb
402
413
  - spec/dummy/Rakefile
@@ -409,8 +420,7 @@ files:
409
420
  - spec/dummy/config.ru
410
421
  - spec/dummy/config/application.rb
411
422
  - spec/dummy/config/boot.rb
412
- - spec/dummy/config/database.example.yml
413
- - spec/dummy/config/database.travisci.yml
423
+ - spec/dummy/config/database.yml
414
424
  - spec/dummy/config/environment.rb
415
425
  - spec/dummy/config/environments/development.rb
416
426
  - spec/dummy/config/environments/production.rb
@@ -424,6 +434,7 @@ files:
424
434
  - spec/dummy/config/initializers/wrap_parameters.rb
425
435
  - spec/dummy/config/locales/en.yml
426
436
  - spec/dummy/config/routes.rb
437
+ - spec/dummy/db/.gitkeep
427
438
  - spec/dummy/public/500.html
428
439
  - spec/dummy/public/blank.html
429
440
  - spec/dummy/public/favicon.ico
@@ -518,7 +529,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
518
529
  version: '0'
519
530
  segments:
520
531
  - 0
521
- hash: -2908225509589390282
532
+ hash: -3496660724334037650
522
533
  required_rubygems_version: !ruby/object:Gem::Requirement
523
534
  none: false
524
535
  requirements:
@@ -527,10 +538,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
527
538
  version: '0'
528
539
  segments:
529
540
  - 0
530
- hash: -2908225509589390282
541
+ hash: -3496660724334037650
531
542
  requirements: []
532
543
  rubyforge_project:
533
- rubygems_version: 1.8.21
544
+ rubygems_version: 1.8.24
534
545
  signing_key:
535
546
  specification_version: 3
536
547
  summary: ! 'Mercury Editor: The Rails HTML5 WYSIWYG editor'
@@ -564,14 +575,13 @@ test_files:
564
575
  - features/regions/snippets/basic_editing.feature
565
576
  - features/regions/snippets/inserting_snippets.feature
566
577
  - features/saving/saving.feature
578
+ - features/step_definitions/custom_web_steps.rb
567
579
  - features/step_definitions/debug_steps.rb
568
580
  - features/step_definitions/generator_steps.rb
569
581
  - features/step_definitions/mercury_steps.rb
570
582
  - features/step_definitions/web_steps.rb
571
583
  - features/support/aruba.rb
572
584
  - features/support/env.rb
573
- - features/support/mercury_contents.rb
574
- - features/support/mercury_selectors.rb
575
585
  - features/support/paths.rb
576
586
  - features/support/selectors.rb
577
587
  - spec/dummy/Rakefile
@@ -584,8 +594,7 @@ test_files:
584
594
  - spec/dummy/config.ru
585
595
  - spec/dummy/config/application.rb
586
596
  - spec/dummy/config/boot.rb
587
- - spec/dummy/config/database.example.yml
588
- - spec/dummy/config/database.travisci.yml
597
+ - spec/dummy/config/database.yml
589
598
  - spec/dummy/config/environment.rb
590
599
  - spec/dummy/config/environments/development.rb
591
600
  - spec/dummy/config/environments/production.rb
@@ -599,6 +608,7 @@ test_files:
599
608
  - spec/dummy/config/initializers/wrap_parameters.rb
600
609
  - spec/dummy/config/locales/en.yml
601
610
  - spec/dummy/config/routes.rb
611
+ - spec/dummy/db/.gitkeep
602
612
  - spec/dummy/public/500.html
603
613
  - spec/dummy/public/blank.html
604
614
  - spec/dummy/public/favicon.ico
@@ -1,25 +0,0 @@
1
- # SQLite version 3.x
2
- # gem install sqlite3
3
- #
4
- # Ensure the SQLite 3 gem is defined in your Gemfile
5
- # gem 'sqlite3'
6
- development:
7
- adapter: sqlite3
8
- database: db/development.sqlite3
9
- pool: 5
10
- timeout: 5000
11
-
12
- # Warning: The database defined as "test" will be erased and
13
- # re-generated from your development database when you run "rake".
14
- # Do not set this db to the same as development or production.
15
- test:
16
- adapter: sqlite3
17
- database: db/test.sqlite3
18
- pool: 5
19
- timeout: 5000
20
-
21
- production:
22
- adapter: sqlite3
23
- database: db/production.sqlite3
24
- pool: 5
25
- timeout: 5000
@@ -1,4 +0,0 @@
1
- test:
2
- adapter: sqlite3
3
- database: ":memory:"
4
- timeout: 500