decko 0.3.3 → 0.3.4

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 (57) hide show
  1. checksums.yaml +4 -4
  2. data/lib/decko/generators/decko/templates/Gemfile +1 -0
  3. metadata +5 -109
  4. data/.rspec +0 -4
  5. data/Guardfile +0 -32
  6. data/decko.gemspec +0 -42
  7. data/features/attach.feature +0 -85
  8. data/features/autonaming.feature +0 -19
  9. data/features/conflict.feature +0 -41
  10. data/features/follow.feature +0 -64
  11. data/features/history.feature +0 -27
  12. data/features/layouts.feature +0 -25
  13. data/features/navbox.feature +0 -34
  14. data/features/notifications.feature +0 -33
  15. data/features/paging.feature +0 -34
  16. data/features/pointer_inputs.feature +0 -81
  17. data/features/presetting_content.feature +0 -13
  18. data/features/reference.feature +0 -26
  19. data/features/reset_password.feature +0 -35
  20. data/features/rules.feature +0 -45
  21. data/features/setup.feature +0 -32
  22. data/features/signup.feature +0 -61
  23. data/features/step_definitions/decko_steps.rb +0 -532
  24. data/features/step_definitions/email_steps.rb +0 -216
  25. data/features/step_definitions/history_steps.rb +0 -5
  26. data/features/step_definitions/web_steps.rb +0 -155
  27. data/features/step_definitions/window_steps.rb +0 -27
  28. data/features/structure.feature +0 -41
  29. data/features/support/debugger.rb +0 -44
  30. data/features/support/delayed_job.rb +0 -20
  31. data/features/support/env.rb +0 -115
  32. data/features/support/file.txt +0 -1
  33. data/features/support/image.png +0 -0
  34. data/features/support/image2.jpg +0 -0
  35. data/features/support/paths.rb +0 -63
  36. data/features/support/scopes.rb +0 -34
  37. data/features/support/wagn_env.rb +0 -11
  38. data/features/table_of_contents.feature +0 -36
  39. data/features/toolbar.feature +0 -29
  40. data/features/update_includers.feature +0 -75
  41. data/lib/decko/tasks/.gitkeep +0 -0
  42. data/spec/controllers/card_controller_spec.rb +0 -407
  43. data/spec/controllers/location_spec.rb +0 -25
  44. data/spec/javascripts/helpers/.gitkeep +0 -0
  45. data/spec/javascripts/helpers/jasmine-jquery.js +0 -812
  46. data/spec/javascripts/support/jasmine.yml.erb +0 -79
  47. data/spec/javascripts/support/jasmine_config.rb +0 -21
  48. data/spec/javascripts/support/jasmine_runner.rb +0 -21
  49. data/spec/javascripts/wagn_spec.coffee +0 -42
  50. data/test/1.10.0-data-dump.sql +0 -359
  51. data/test/performance/card_create_test.rb +0 -21
  52. data/test/performance/fetch_test.rb +0 -9
  53. data/test/performance/homepage_test.rb +0 -9
  54. data/test/performance/render_test.rb +0 -10
  55. data/test/script/run_engine_deck.sh +0 -47
  56. data/test/script/run_mig.sh +0 -29
  57. data/test/test_helper.rb +0 -125
@@ -1,44 +0,0 @@
1
- # `LAUNCHY=1 cucumber` to open page on failure
2
- After do |scenario|
3
- save_and_open_page if scenario.failed? && ENV["LAUNCHY"]
4
- end
5
-
6
- # `FAST=1 cucumber` to stop on first failure
7
- After do |scenario|
8
- Cucumber.wants_to_quit = ENV["FAST"] && scenario.failed?
9
- end
10
-
11
- # `DEBUG=1 cucumber` to drop into debugger on failure
12
- After do |scenario|
13
- next unless ENV["DEBUG"] && scenario.failed?
14
- puts "Debugging scenario: #{scenario.name}"
15
- if respond_to? :debugger
16
- debugger
17
- elsif binding.respond_to? :pry
18
- binding.pry #
19
- else
20
- puts "Can't find debugger or pry to debug"
21
- end
22
- end
23
-
24
- # `STEP=1 cucumber` to pause after each step
25
- AfterStep do |_result, _step|
26
- next unless ENV["STEP"]
27
- unless defined?(@counter)
28
- #puts "Stepping through #{scenario.name}"
29
- @counter = 0
30
- end
31
- @counter += 1
32
- #print "At step ##{@counter} of #{scenario.steps.count}. Press Return to"\
33
- # " execute..."
34
- print "Press Return to execute next step...\n"\
35
- "(d=debug, c=continue, s=step, a=abort)"
36
- case STDIN.getch
37
- when "d" then
38
- binding.pry #
39
- when "c" then
40
- ENV.delete "STEP"
41
- when "a" then
42
- Cucumber.wants_to_quit = true
43
- end
44
- end
@@ -1,20 +0,0 @@
1
- Card.config.active_job.queue_adapter = :delayed_job
2
-
3
- Before("@delayed-jobs") do
4
- Delayed::Worker.delay_jobs = true
5
- end
6
-
7
- After("@delayed-jobs") do
8
- Delayed::Worker.delay_jobs = false
9
- end
10
-
11
- Before("@background-jobs") do
12
- Delayed::Worker.delay_jobs = true
13
- system "env RAILS_ENV=cucumber rake jobs:work &"
14
- end
15
-
16
- After("@background-jobs") do
17
- Delayed::Worker.delay_jobs = false
18
- system "ps -ef | grep 'rake jobs:work' | grep -v grep | awk '{print $2}' | "\
19
- "xargs kill -9"
20
- end
@@ -1,115 +0,0 @@
1
- # -*- encoding : utf-8 -*-
2
- ENV["RAILS_ENV"] = "cucumber"
3
-
4
- require "decko"
5
- require File.join Decko.card_gem_root, "spec/support/simplecov_helper.rb"
6
- require "simplecov"
7
- require "minitest/autorun"
8
- require "rspec"
9
-
10
- World(RSpec::Matchers)
11
- require "rspec-html-matchers"
12
- World(RSpecHtmlMatchers)
13
-
14
- require "pry"
15
-
16
- $feature_seeded ||= ::Set.new
17
-
18
- # IMPORTANT: This file is generated by cucumber-rails - edit at your own peril.
19
- # It is recommended to regenerate this file in the future when you upgrade to a
20
- # newer version of cucumber-rails. Consider adding your own code to a new file
21
- # instead of editing this one. Cucumber will automatically load all
22
- # features/**/*.rb files.
23
- Before("@background-jobs or @delayed-jobs or @javascript") do |scenario|
24
- # DatabaseCleaner.strategy = :truncation
25
- Card.seed_test_db unless $feature_seeded.include?(scenario.feature.name)
26
- end
27
-
28
- Before("@no-db-clean-between-scenarios") do |scenario|
29
- $feature_seeded.add scenario.feature.name
30
- end
31
-
32
- Before("not @background-jobs", "not @delayed-jobs", "not @javascript") do
33
- DatabaseCleaner.strategy = :transaction
34
- DatabaseCleaner.start
35
- end
36
-
37
- After("not @background-jobs", "not @delayed-jobs", "not @javascript") do
38
- DatabaseCleaner.clean
39
- end
40
-
41
- at_exit do
42
- Card.seed_test_db
43
- end
44
-
45
- Before("@javascript") do
46
- @javascript = true
47
- end
48
-
49
- Before do
50
- Capybara.page.current_window.resize_to 1440, 1280
51
- end
52
-
53
- require "cucumber/rails"
54
- Cucumber::Rails::Database.autorun_database_cleaner = false
55
- # require "test_after_commit"
56
-
57
- Capybara.register_driver :selenium do |app|
58
- Capybara::Selenium::Driver.new(app, browser: :chrome)
59
- end
60
- Capybara.default_driver = :selenium
61
-
62
- # Capybara defaults to XPath selectors rather than Webrat's default of CSS3. In
63
- # order to ease the transition to Capybara we set the default here. If you'd
64
- # prefer to use XPath just remove this line and adjust any selectors in your
65
- # steps to use the XPath syntax.
66
- Capybara.default_selector = :css
67
- Capybara.default_max_wait_time = 30
68
- Cardio.config.paging_limit = 10
69
- # By default, any exception happening in your Rails application will bubble up
70
- # to Cucumber so that your scenario will fail. This is a different from how
71
- # your application behaves in the production environment, where an error page
72
- # will be rendered instead.
73
- #
74
- # Sometimes we want to override this default behaviour and allow Rails to rescue
75
- # exceptions and display an error page
76
- # (just like when the app is running in production).
77
- # Typical scenarios where you want to do this is when you test your error pages.
78
- # There are two ways to allow Rails to rescue exceptions:
79
- #
80
- # 1) Tag your scenario (or feature) with @allow-rescue
81
- #
82
- # 2) Set the value below to true. Beware that doing this globally is not
83
- # recommended as it will mask a lot of errors for you!
84
- #
85
- ActionController::Base.allow_rescue = false
86
-
87
- # Remove/comment out the lines below if your app doesn't have a database.
88
- # For some databases (like MongoDB and CouchDB) you may need to
89
- # use :truncation instead.
90
- # begin
91
- # DatabaseCleaner.strategy = :transaction
92
- # rescue NameError
93
- # raise 'You need to add database_cleaner to your Gemfile (in the :test group)
94
- # if you wish to use it.'
95
- # end
96
-
97
- # You may also want to configure DatabaseCleaner to use different strategies for
98
- # certain features and scenarios.
99
- # See the DatabaseCleaner documentation for details. Example:
100
- #
101
- # Before('@no-txn,@selenium,@celerity,@javascript') do
102
- # DatabaseCleaner.strategy = :truncation, {except: %w[widgets]}
103
- # end
104
- #
105
- # Before('~@no-txn', '~@selenium', ~@celerity', '~@javascript') do
106
- # DatabaseCleaner.strategy = :transaction
107
- # end
108
- #
109
-
110
- # Possible values are :truncation and :transaction
111
- # The :transaction strategy is faster, but might give you threading problems.
112
- # See https://github.com/cucumber/cucumber-rails/blob/master/features/choose_javascript_database_strategy.feature
113
- Cucumber::Rails::Database.javascript_strategy = :truncation
114
-
115
-
@@ -1 +0,0 @@
1
- test file
Binary file
Binary file
@@ -1,63 +0,0 @@
1
- # -*- encoding : utf-8 -*-
2
- module NavigationHelpers
3
- # Maps a name to a path. Used by the
4
- #
5
- # When /^I go to (.+)$/ do |page_name|
6
- #
7
- # step definition in web_steps.rb
8
- #
9
- def path_to page_name
10
- case page_name
11
-
12
- when /the home\s?page/
13
- "/"
14
-
15
- # Add more mappings here.
16
- # Here is an example that pulls values out of the Regexp:
17
- #
18
- # when /^(.*)'s profile page$/i
19
- # user_profile_path(Auth.find_account_by_email( $1 ))
20
-
21
- when /card (.*) with (.*) layout$/
22
- "/#{Regexp.last_match(1).to_name.url_key}?layout=$2"
23
-
24
- when /card (.*)$/
25
- "/#{Regexp.last_match(1).to_name.url_key}"
26
-
27
- when /new (.*) presetting name to "(.*)" and author to "(.*)"/
28
- "/new/#{Regexp.last_match(1)}" \
29
- "?card[name]=#{Regexp.last_match(2).to_name.url_key}" \
30
- "&_author=#{CGI.escape(Regexp.last_match(3))}"
31
-
32
- when /new card named (.*)$/
33
- "/card/new?card[name]=#{CGI.escape(Regexp.last_match(1))}"
34
-
35
- when /edit (.*)$/
36
- "/#{Regexp.last_match(1).to_name.url_key}?view=edit"
37
-
38
- when /rename (.*)$/
39
- "/#{$1.to_name.url_key}?view=edit_name"
40
-
41
- when /new (.*)$/
42
- "/new/#{Regexp.last_match(1).to_name.url_key}"
43
-
44
- when /kml source/
45
- "/House+*type+by_name.kml"
46
-
47
- when /url "(.*)"/
48
- Regexp.last_match(1).to_s
49
-
50
- else
51
- begin
52
- page_name =~ /the (.*) page/
53
- path_components = Regexp.last_match(1).split(/\s+/)
54
- send(path_components.push("path").join("_").to_sym)
55
- rescue Object => e
56
- raise "#{e.message} Can't find mapping from \"#{page_name}\" to a path.\n" \
57
- "Now, go and add a mapping in #{__FILE__}"
58
- end
59
- end
60
- end
61
- end
62
-
63
- World(NavigationHelpers)
@@ -1,34 +0,0 @@
1
- # -*- encoding : utf-8 -*-
2
- module ScopeHelpers
3
- def scope_of section
4
- case section
5
-
6
- when /main card content/
7
- "#main > .card-slot > .d0-card-frame > .d0-card-content"
8
-
9
- when /pointer card content/
10
- "#main > .card-slot > .d0-card-frame > .d0-card-content > .pointer-list"
11
-
12
- when /main card header/
13
- "#main > .card-slot > .d0-card-frame > .d0-card-header"
14
-
15
- when /main card menu/
16
- "#main > .card-slot > .menu-slot > .card-menu"
17
-
18
- when /main card toolbar/
19
- "#main > .card-slot > .d0-card-frame > nav.toolbar"
20
-
21
- when /main card frame/
22
- "#main > .card-slot > .d0-card-frame"
23
-
24
- when /main card body/
25
- "#main > .card-slot > .d0-card-frame > .d0-card-body"
26
-
27
- else
28
- raise "Can't find mapping from \"#{section}\" to a scope.\n" \
29
- "Now, go and add a mapping in #{__FILE__}"
30
- end
31
- end
32
- end
33
-
34
- World(ScopeHelpers)
@@ -1,11 +0,0 @@
1
- # -*- encoding : utf-8 -*-
2
- require "email_spec"
3
- require "email_spec/cucumber"
4
-
5
- Capybara.configure do |config|
6
- config.match = :prefer_exact
7
- end
8
-
9
- Before do
10
- Card::Cache.reset
11
- end
@@ -1,36 +0,0 @@
1
- @javascript
2
- Feature: Table of Contents
3
- In order to add a table of contents to a card
4
- As a Decker
5
- I want to be able to set a minimum header number
6
-
7
- Background:
8
- Given I am signed in as Joe Admin
9
- And I create Basic card "Two Header" with content "<h1>I'm a header</h1><h1>me too</h1>"
10
- And I create Basic card "Three Headers" with content "<h1>I'm a header</h1><h2>Me too</h2><h1>same here</h1>"
11
-
12
- Scenario: always on setting
13
- When I edit "Basic+*type+*table of contents" setting content to "1"
14
- When I go to card "Onne Heading"
15
- Then I should see "Table of Contents"
16
-
17
- Scenario: minimum setting
18
- When I edit "Basic+*type+*table of contents" setting content to "2"
19
- And I go to card "Onne Heading"
20
- Then I should not see "Table of Contents"
21
- When I go to card "Three Heading"
22
- Then I should see "Table of Contents"
23
-
24
- Scenario: always off setting
25
- When I edit "Basic+*type+*table of contents" setting content to "0"
26
- And I go to card "Onne Heading"
27
- Then I should not see "Table of Contents"
28
-
29
- # Scenario: header with unwanted html
30
- # When I create a Basic card "One Noisy Header" with content "<h2>I'm <b>sooo</b> NOSY</h2>"
31
- # And I go to card "One Noisy Header"
32
- # Then I should see "<b>sooo</b> NOSY"
33
- # # in the content
34
- # And I should not see "sooo NOSY"
35
- # #in the table
36
-
@@ -1,29 +0,0 @@
1
- @javascript
2
- Feature: Toolbar
3
- In order to edit a card
4
- As a Decker
5
- I want to be able to use the toolbar
6
-
7
- Background:
8
- Given I am signed in as Joe Admin
9
- And I go to card "Home"
10
- And I wait for ajax response
11
- And I open the main card menu
12
- And I wait for ajax response
13
- And I follow "edit"
14
-
15
- Scenario: close toolbar
16
- Then In main card frame I should see a nav with class "toolbar"
17
- When In main card toolbar I find link with icon "close" and click it
18
- Then In main card frame I should not see a nav with class "toolbar"
19
-
20
- #Scenario: pin and unpin toolbar
21
- # When In main card toolbar I find button with icon "pushpin" and click it
22
- # And I wait for ajax response
23
- # And I go to card "Home"
24
- # Then In main card frame I should see a nav with class "toolbar"
25
- # And In main card toolbar I should see a button with class "toolbar-pin.active"
26
- # When In main card toolbar I find button with icon "pushpin" and click it
27
- # And I wait for ajax response
28
- # And I go to card "Home"
29
- # Then In main card frame I should not see a nav with class "toolbar"
@@ -1,75 +0,0 @@
1
- @javascript @delayed-jobs
2
- Feature: Updates for Children of watched cards
3
- In order to keep track of changes that are important to me
4
- As an Editor
5
- I want to be notified when someone changes a child of a card I'm watching
6
-
7
- #should this be in watch?
8
-
9
- Background:
10
- Given I am signed in as Joe User
11
- And I create Book card "Ulysses"
12
- And Joe Camel is watching "Ulysses+*self"
13
- And Joe Admin is watching "Book+*type"
14
-
15
- Scenario: Watcher should be notified of updates to included plus card
16
- When I create card "Ulysses+author" with content "James Joyce"
17
- And I wait for ajax response
18
- #And He should see "added Ulysses+author" in the email -- FIXME need multiline matching
19
- Then Joe Admin should be notified that "Joe User created \"Ulysses\+author\""
20
- And Joe Camel should be notified that "Joe User created \"Ulysses\+author\""
21
- When Joe Admin edits "Ulysses+author" setting content to "Jim"
22
- Then Joe Camel should be notified that "Joe Admin updated \"Ulysses\+author\""
23
- #And Joe Admin should be notified that "Joe User updated \"Ulysses\""
24
-
25
- Scenario: Should not notify of included but not plussed card
26
- When I create card "illustrator" with content "Picasso"
27
- Then No notification should be sent
28
-
29
- Scenario: Should not notify of plussed but not included card
30
- When I create card "Ulysses+random" with content "boo"
31
- Then No notification should be sent
32
-
33
- Scenario: Templated cards should only send one email when added or updated
34
- When I create Book card "Bros Krmzv" with plusses:
35
- |author|illustrator|
36
- |Dostoyevsky|Manet|
37
- Then Joe Admin should be notified that "Joe User created \"Bros Krmzv\""
38
- When I edit "Bros Krmzv" with plusses:
39
- |author|illustrator|
40
- |Rumi|Monet|
41
- Then Joe Admin should be notified that "Joe User updated \"Bros Krmzv\""
42
-
43
- Scenario: Watching a plus card on multiedit; and watching both plus card and including card on multiedit
44
- Given I am signed in as Joe Admin
45
- And I create Cardtype card "Froot"
46
- And I create card "Froot+*type+*structure" with content "{{+color}} {{+flavor}}"
47
- And I am signed in as Joe User
48
- And I create Froot card "Banana" with plusses:
49
- |color|flavor|
50
- |yellow|sweet|
51
- And Joe Camel is watching "Banana+color+*self"
52
- When I edit "Banana" with plusses:
53
- |color|flavor|
54
- |spotted|mushy|
55
- And I wait 1 second
56
- Then Joe Camel should be notified that "Joe User updated \"Banana\""
57
- When Joe Camel is watching "Banana+*self"
58
- And I wait a sec
59
- And I edit "Banana" with plusses:
60
- |color|flavor|
61
- |green|mushy|
62
- And I wait 1 second
63
- Then Joe Camel should be notified that "Joe User updated \"Banana\""
64
- Given a clear email queue
65
- And I edit "Banana" with plusses:
66
- |color|flavor|
67
- |green|mushy|
68
- Then No notification should be sent
69
-
70
- Scenario: Watching a plus card & including card on regular edit
71
- When I create card "Ulysses+author" with content "Joyce"
72
- Then Joe Camel should be notified that "Joe User created \"Ulysses\+author\""
73
- When Joe Camel is watching "Ulysses+author+*self"
74
- And I edit "Ulysses+author" setting content to "Jim"
75
- Then Joe Camel should be notified that "Joe User updated \"Ulysses\+author\""