wagn 1.18.0 → 1.18.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/features/reference.feature +22 -0
- data/features/step_definitions/email_steps.rb +1 -0
- data/features/step_definitions/history_steps.rb +2 -0
- data/features/step_definitions/wagn_steps.rb +1 -0
- data/features/step_definitions/web_steps.rb +1 -0
- data/features/step_definitions/window_steps.rb +3 -0
- data/features/support/paths.rb +3 -0
- data/features/toolbar.feature +21 -24
- data/lib/decko/engine.rb +12 -9
- data/lib/wagn/config/initializers/session_store.rb +0 -7
- data/lib/wagn/generators/wagn/wagn_generator/interactive.rb +114 -0
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de1abd0d0d7f461155c50a90620b623b88279cda
|
4
|
+
data.tar.gz: 58b8d0a8e23f6b0f2487545d8558e551fd525b2c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 12e8fa83898374a2efed75adb0948f1aad3416c56fef0ceb3f3c37a384b6ff5020f6015e4b25af591f45004803dc3de815042edae9ca0e0327ca107e09c03f8e
|
7
|
+
data.tar.gz: d6d4e8844a2b13e453689451f00ab30ddcd8a171d2bdc5eda63913b37311f287e8ec76daa0d69f7a3f547c554d316213506be99af39936bdbb1a24e1a719500d
|
@@ -0,0 +1,22 @@
|
|
1
|
+
@javascript
|
2
|
+
Feature: Reference
|
3
|
+
In order to connect related cards
|
4
|
+
As a Wagneer
|
5
|
+
|
6
|
+
Background:
|
7
|
+
Given I am signed in as Joe Admin
|
8
|
+
And I wait until ajax response done
|
9
|
+
|
10
|
+
Scenario: Renaming a embed card
|
11
|
+
When I create PlainText card "Vignesh" with content "Indian"
|
12
|
+
And I create PlainText card "Kawaii Man" with content "[[Vignesh]]"
|
13
|
+
And I go to rename "Vignesh"
|
14
|
+
And I fill in "card_name" with "Srivigneshwar"
|
15
|
+
And I press "Rename"
|
16
|
+
And I press "Rename and Update"
|
17
|
+
And I wait until ajax response done
|
18
|
+
Then I go to card "Kawaii Man"
|
19
|
+
And I should see "Srivigneshwar"
|
20
|
+
|
21
|
+
|
22
|
+
|
@@ -1,4 +1,5 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
+
# rubocop:disable Lint/AmbiguousRegexpLiteral
|
2
3
|
# IMPORTANT: This file is generated by cucumber-rails - edit at your own peril.
|
3
4
|
# It is recommended to regenerate this file in the future when you upgrade to a
|
4
5
|
# newer version of cucumber-rails. Consider adding your own code to a new file
|
data/features/support/paths.rb
CHANGED
data/features/toolbar.feature
CHANGED
@@ -4,27 +4,24 @@ Feature: Toolbar
|
|
4
4
|
As a Wagneer
|
5
5
|
I want to be able to use the toolbar
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
7
|
+
Background:
|
8
|
+
Given I am signed in as Joe Admin
|
9
|
+
And I go to card "Home"
|
10
|
+
And I open the main card menu
|
11
|
+
And I follow "edit"
|
12
|
+
|
13
|
+
Scenario: close toolbar
|
14
|
+
Then In main card frame I should see a nav with class "toolbar"
|
15
|
+
When In main card toolbar I find link with icon "remove" and click it
|
16
|
+
Then In main card frame I should not see a nav with class "toolbar"
|
17
|
+
|
18
|
+
Scenario: pin and unpin toolbar
|
19
|
+
When In main card toolbar I find button with icon "pushpin" and click it
|
20
|
+
And I wait until ajax response done
|
21
|
+
And I go to card "Home"
|
22
|
+
Then In main card frame I should see a nav with class "toolbar"
|
23
|
+
And In main card toolbar I should see a button with class "toolbar-pin.active"
|
24
|
+
When In main card toolbar I find button with icon "pushpin" and click it
|
25
|
+
And I wait until ajax response done
|
26
|
+
And I go to card "Home"
|
27
|
+
Then In main card frame I should not see a nav with class "toolbar"
|
data/lib/decko/engine.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
|
2
2
|
require 'rails/all'
|
3
|
-
require 'activerecord/session_store'
|
4
3
|
require 'cardio'
|
5
4
|
|
6
5
|
# TODO: Move these to modules that use them
|
@@ -17,22 +16,26 @@ require 'wagn'
|
|
17
16
|
|
18
17
|
module Decko
|
19
18
|
class Engine < ::Rails::Engine
|
20
|
-
paths.add 'app/controllers',
|
21
|
-
paths.add 'gem-assets',
|
22
|
-
paths.add 'config/routes.rb',
|
23
|
-
paths.add 'lib/tasks',
|
19
|
+
paths.add 'app/controllers', with: 'rails/controllers', eager_load: true
|
20
|
+
paths.add 'gem-assets', with: 'rails/assets'
|
21
|
+
paths.add 'config/routes.rb', with: 'rails/engine-routes.rb'
|
22
|
+
paths.add 'lib/tasks', with: "#{::Wagn.gem_root}/lib/wagn/tasks",
|
23
|
+
glob: '**/*.rake'
|
24
24
|
paths.add 'lib/wagn/config/initializers',
|
25
|
-
with: File.join(Wagn.gem_root, 'lib/wagn/config/initializers'),
|
25
|
+
with: File.join(Wagn.gem_root, 'lib/wagn/config/initializers'),
|
26
|
+
glob: '**/*.rb'
|
26
27
|
|
27
|
-
initializer 'decko.engine.load_config_initializers',
|
28
|
+
initializer 'decko.engine.load_config_initializers',
|
29
|
+
after: :load_config_initializers do
|
28
30
|
paths['lib/wagn/config/initializers'].existent.sort.each do |initializer|
|
29
31
|
load(initializer)
|
30
32
|
end
|
31
33
|
end
|
32
34
|
|
33
|
-
initializer 'engine.copy_configs',
|
35
|
+
initializer 'engine.copy_configs',
|
36
|
+
before: 'decko.engine.load_config_initializers' do
|
34
37
|
# this code should all be in Wagn somewhere, and it is now, gem-wize
|
35
|
-
# Ideally railties would do this for us
|
38
|
+
# Ideally railties would do this for us; this is needed for both use cases
|
36
39
|
Engine.paths['request_log'] = Wagn.paths['request_log']
|
37
40
|
Engine.paths['log'] = Wagn.paths['log']
|
38
41
|
Engine.paths['lib/tasks'] = Wagn.paths['lib/tasks']
|
@@ -1,9 +1,2 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
2
|
# Be sure to restart your server when you modify this file.
|
3
|
-
|
4
|
-
Wagn.config.session_store :active_record_store
|
5
|
-
|
6
|
-
# Use the database for sessions instead of the cookie-based default,
|
7
|
-
# which shouldn't be used to store highly confidential information
|
8
|
-
# (create the session table with "rails generate session_migration")
|
9
|
-
Cardio.config.session_store :active_record_store
|
@@ -0,0 +1,114 @@
|
|
1
|
+
class WagnGenerator
|
2
|
+
# Guides through the wagn deck installation with an interactive menu
|
3
|
+
# Offers the possibilitiy to
|
4
|
+
# - edit database config
|
5
|
+
# - edit application.rb
|
6
|
+
# - seed database
|
7
|
+
# - run server
|
8
|
+
class Interactive
|
9
|
+
def initialize options, destination_root
|
10
|
+
@dev = options['core-dev'] || options['mod-dev']
|
11
|
+
@destination_root = destination_root
|
12
|
+
end
|
13
|
+
|
14
|
+
def run
|
15
|
+
require config_path('application') # need this for Rails.env
|
16
|
+
@menu = ActiveSupport::OrderedHash.new
|
17
|
+
add_config_options
|
18
|
+
add_seed_options
|
19
|
+
add_exit_option
|
20
|
+
while (answer = ask(build_menu)) != 'x'
|
21
|
+
if @menu.key? answer
|
22
|
+
@menu[answer][:code].call
|
23
|
+
else
|
24
|
+
puts 'invalid choice'
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
private
|
30
|
+
|
31
|
+
def dev_options?
|
32
|
+
@dev
|
33
|
+
end
|
34
|
+
|
35
|
+
def config_path file
|
36
|
+
File.join destination_root, 'config', file
|
37
|
+
end
|
38
|
+
|
39
|
+
def bundle_exec command, opts={}
|
40
|
+
rails_env = "RAILS_ENV=#{opts[:rails_env]}" if opts[:rails_env]
|
41
|
+
system "cd #{destination_root} && #{rails_env} bundle exec #{command}"
|
42
|
+
end
|
43
|
+
|
44
|
+
def build_menu
|
45
|
+
lines = ['What would you like to do next?']
|
46
|
+
lines += @menu.map { |key, v| build_option key, v[:desc], v[:command] }
|
47
|
+
lines << "[#{@menu.keys.join}]"
|
48
|
+
"\n#{lines.join("\n")}\n"
|
49
|
+
end
|
50
|
+
|
51
|
+
def build_option key, desc, command
|
52
|
+
command &&= ' ' * (65 - desc.size) + '[' + command + ']'
|
53
|
+
" #{key} - #{desc}#{command if command}"
|
54
|
+
end
|
55
|
+
|
56
|
+
def add_config_options
|
57
|
+
@menu['d'] = {
|
58
|
+
desc: 'edit database configuration file',
|
59
|
+
command: 'nano config/database.yml',
|
60
|
+
code: proc { system "nano #{config_path 'database.yml'}" }
|
61
|
+
}
|
62
|
+
@menu['c'] = {
|
63
|
+
desc: 'configure Wagn (e.g. email settings)',
|
64
|
+
command: 'nano config/application.rb',
|
65
|
+
code: proc { system "nano #{config_path 'application.rb'}" }
|
66
|
+
}
|
67
|
+
end
|
68
|
+
|
69
|
+
def add_seed_options
|
70
|
+
add_common_seed_option
|
71
|
+
add_seed_all_option
|
72
|
+
end
|
73
|
+
|
74
|
+
def add_common_seed_option
|
75
|
+
@menu['s'] = {
|
76
|
+
desc: "seed #{Rails.env}#{' and test' if dev_options?} database",
|
77
|
+
command: 'wagn seed',
|
78
|
+
code: proc do
|
79
|
+
bundle_exec 'rake wagn:seed'
|
80
|
+
bundle_exec 'rake wagn:seed', rails_env: 'test' if dev_options?
|
81
|
+
add_after_seed_options
|
82
|
+
end
|
83
|
+
}
|
84
|
+
end
|
85
|
+
|
86
|
+
def add_seed_all_option
|
87
|
+
@menu['a'] = {
|
88
|
+
desc: 'seed all databases (production, development, and test)',
|
89
|
+
command: 'wagn seed --all',
|
90
|
+
code: proc do
|
91
|
+
%w( production development test ).each do |env|
|
92
|
+
bundle_exec 'rake wagn:seed', rails_env: env
|
93
|
+
end
|
94
|
+
add_after_seed_options
|
95
|
+
end
|
96
|
+
}
|
97
|
+
end
|
98
|
+
|
99
|
+
def add_exit_option
|
100
|
+
@menu['x'] = {
|
101
|
+
desc: "exit (run 'wagn seed' to complete the installation later)"
|
102
|
+
}
|
103
|
+
end
|
104
|
+
|
105
|
+
def add_after_seed_options
|
106
|
+
@menu['x'][:desc] = 'exit'
|
107
|
+
@menu['r'] = {
|
108
|
+
desc: 'run wagn server',
|
109
|
+
command: 'wagn server',
|
110
|
+
code: proc { bundle_exec 'wagn server' }
|
111
|
+
}
|
112
|
+
end
|
113
|
+
end
|
114
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wagn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.18.
|
4
|
+
version: 1.18.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ethan McCutchen
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2016-02-
|
14
|
+
date: 2016-02-26 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rails
|
@@ -33,14 +33,14 @@ dependencies:
|
|
33
33
|
requirements:
|
34
34
|
- - '='
|
35
35
|
- !ruby/object:Gem::Version
|
36
|
-
version: 1.18.
|
36
|
+
version: 1.18.1
|
37
37
|
type: :runtime
|
38
38
|
prerelease: false
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
40
40
|
requirements:
|
41
41
|
- - '='
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version: 1.18.
|
43
|
+
version: 1.18.1
|
44
44
|
description: a wiki approach to stuctured data, dynamic interaction, and web design
|
45
45
|
email:
|
46
46
|
- info@wagn.org
|
@@ -88,6 +88,7 @@ files:
|
|
88
88
|
- features/paging.feature
|
89
89
|
- features/pointer_inputs.feature
|
90
90
|
- features/presetting_content.feature
|
91
|
+
- features/reference.feature
|
91
92
|
- features/reset_password.feature
|
92
93
|
- features/rules.feature
|
93
94
|
- features/setup.feature
|
@@ -771,6 +772,7 @@ test_files:
|
|
771
772
|
- features/paging.feature
|
772
773
|
- features/pointer_inputs.feature
|
773
774
|
- features/presetting_content.feature
|
775
|
+
- features/reference.feature
|
774
776
|
- features/reset_password.feature
|
775
777
|
- features/rules.feature
|
776
778
|
- features/setup.feature
|