wagn 1.16.14 → 1.16.15

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fe7e45ee8b6975ca10ad14a24bb77184ac7924ce
4
- data.tar.gz: 0ac7e94a5403d0c5d8fd8c756516382221c91360
3
+ metadata.gz: 91193f2217c2ee149afd3789dd7d13ef3b87831d
4
+ data.tar.gz: 997c9cb094906484298a44ece969f143282859e8
5
5
  SHA512:
6
- metadata.gz: a862786a7d50d72944490aec4155ca1b55f434c3cf1e60bd971c008e24b291a570d3f9161df20cc7ce5a6df9babc03a4e13396f12748129d92fd118a9a2c7da1
7
- data.tar.gz: b44093733c9a77ce3e9a0664b13ac5a2f003b5b5082d982a36211b6a79f64eda525e78a2d384dffb954a640f09f3501efc75eebd7eac0fb49e578ca46b6d022c
6
+ metadata.gz: b036a8603a038b8cfcdad0594c4aecac81fda0e609e55c9c8f731eef827b21e5dda4487f3cac2d981b71b09442d81838baf5b3bbfb392abe3381ea53e4bae77a
7
+ data.tar.gz: 451b6152b9ef511a1ec0a019b843c3016da86bb2a9d4aa75acdc660482fc2f7fda1efcc4bfd7af89dd5c387b5a2d19f313554af81151d7f2c653003adcf0b745
@@ -1,5 +1,9 @@
1
1
  =Wagn: how pioneers roll
2
2
 
3
+ {<img src="https://semaphoreci.com/api/v1/projects/0d61c1f9-5ef0-4c5c-89c6-7664e247e4be/294670/shields_badge.svg" />}[https://semaphoreci.com/ethan/wagn]
4
+ {<img src="https://badge.fury.io/rb/wagn.svg" alt="Gem Version" />}[https://badge.fury.io/rb/wagn]
5
+ {<img src="https://codeclimate.com/repos/56548cb6fafb98574e013c39/badges/be88db3f72d0fd06ace3/gpa.svg" />}[https://codeclimate.com/repos/56548cb6fafb98574e013c39/feed]
6
+
3
7
  ==Basics
4
8
 
5
9
  Wagn is serious web development made fun.
@@ -4,6 +4,14 @@ Feature: File Upload
4
4
 
5
5
  Background:
6
6
  Given I am signed in as Joe Admin
7
+ And I wait until ajax response done
8
+
9
+ Scenario: Block creating a new empty file
10
+ When I go to new File
11
+ And I fill in "card_name" with "a test file"
12
+ And I press "Submit"
13
+ Then I should see "Problems with"
14
+ And I should see "is missing"
7
15
 
8
16
  Scenario: Uploading a file
9
17
  When I go to new File
@@ -77,4 +85,21 @@ Feature: File Upload
77
85
  Then I should see an image of size "medium" and type "jpg"
78
86
  And I wait until ajax response done
79
87
 
88
+ Scenario: submit a form without updating a file
89
+ When I go to "/new Cardtype"
90
+ And I fill in "card_name" with "complicated_card"
91
+ And I press "Submit"
92
+ And I create HTML card "complicated card+*type+*structure" with content "{{+image}}{{+description}}"
93
+ And I go to "/new complicated_card"
94
+ And I fill in "card_name" with "Vignesh has a complicated relationship"
95
+ And I wait until ajax response done
96
+ And I upload the image "image.png"
97
+ And I wait until ajax response done
98
+ And I press "Submit"
99
+ And I edit "Vignesh has a complicated relationship"
100
+ And I press "Submit"
101
+ And I wait until ajax response done
102
+ Then within ".card-body" I should see an image of size "medium" and type "png"
103
+ And I wait until ajax response done
104
+
80
105
 
@@ -358,6 +358,13 @@ Then /^I should see an image of size "(.+)" and type "(.+)"$/ do |size, type|
358
358
  find("img[src*='#{size}.#{type}']")
359
359
  end
360
360
 
361
+ img_sld = /^within "(.+)" I should see an image of size "(.+)" and type "(.+)"$/
362
+ Then img_sld do |selector, size, type|
363
+ within selector do
364
+ find("img[src*='#{size}.#{type}']")
365
+ end
366
+ end
367
+
361
368
  img_should = /^I should see a non-mod image of size "(.+)" and type "(.+)"$/
362
369
  Then img_should do |size, type|
363
370
  element = find("img[src*='#{size}.#{type}']")
@@ -20,7 +20,7 @@ require 'cucumber/rails'
20
20
  # prefer to use XPath just remove this line and adjust any selectors in your
21
21
  # steps to use the XPath syntax.
22
22
  Capybara.default_selector = :css
23
-
23
+ Capybara.default_wait_time = 60
24
24
  # By default, any exception happening in your Rails application will bubble up
25
25
  # to Cucumber so that your scenario will fail. This is a different from how
26
26
  # your application behaves in the production environment, where an error page will
@@ -9,19 +9,18 @@ if defined?(Bundler)
9
9
  # Bundler.require(:default, :assets, Rails.env)
10
10
  end
11
11
 
12
-
13
12
  module Wagn
14
13
  class Application < Rails::Application
15
-
16
- initializer :load_wagn_environment_config, before: :load_environment_config, group: :all do
17
- add_path paths, "lib/wagn/config/environments", glob: "#{Rails.env}.rb"
18
- paths["lib/wagn/config/environments"].existent.each do |environment|
14
+ initializer :load_wagn_environment_config,
15
+ before: :load_environment_config, group: :all do
16
+ add_path paths, 'lib/wagn/config/environments', glob: "#{Rails.env}.rb"
17
+ paths['lib/wagn/config/environments'].existent.each do |environment|
19
18
  require environment
20
19
  end
21
20
  end
22
21
 
23
22
  class << self
24
- def inherited(base)
23
+ def inherited base
25
24
  super
26
25
  Rails.app_class = base
27
26
  add_lib_to_load_path!(find_root(base.called_from))
@@ -31,37 +30,37 @@ module Wagn
31
30
 
32
31
  def add_path paths, path, options={}
33
32
  root = options.delete(:root) || Wagn.gem_root
34
- #gem_path = File.join( root, path )
35
- options[:with] = File.join(root, (options[:with] || path) )
33
+ options[:with] = File.join(root, (options[:with] || path))
36
34
  paths.add path, options
37
35
  end
38
36
 
39
-
40
37
  def config
41
38
  @config ||= begin
42
39
  config = super
43
40
 
44
41
  Cardio.set_config config
45
42
 
43
+ # any config settings below:
44
+ # (a) do not apply to Card used outside of a Wagn context
45
+ # (b) cannot be overridden in a deck's application.rb, but
46
+ # (c) CAN be overridden in an environment file
47
+
48
+ # therefore, in general, they should be restricted to settings that
49
+ # (1) are specific to the web environment, and
50
+ # (2) should not be overridden
51
+ # ...and we should address (c) above!
52
+
53
+ # general card settings (overridable and not) should be in cardio.rb
54
+ # overridable wagn-specific settings don't have a place yet
55
+ # but should probably follow the cardio pattern.
56
+
46
57
  config.i18n.enforce_available_locales = true
47
- #config.active_record.raise_in_transactional_callbacks = true
58
+ # config.active_record.raise_in_transactional_callbacks = true
48
59
 
49
60
  config.assets.enabled = false
50
61
  config.assets.version = '1.0'
51
62
 
52
63
  config.filter_parameters += [:password]
53
-
54
- config.encoding = 'utf-8'
55
- config.no_authentication = false
56
- config.files_web_path = 'files'
57
-
58
- config.email_defaults = nil
59
-
60
- config.token_expiry = 2.days
61
- config.revisions_per_page = 10
62
- config.request_logger = false
63
- config.performance_logger = false
64
- config.sql_comments = true
65
64
  config
66
65
  end
67
66
  end
@@ -79,11 +78,10 @@ module Wagn
79
78
 
80
79
  add_path paths, 'config/routes.rb', with: 'rails/application-routes.rb'
81
80
 
82
- Cardio.set_mod_paths #really this should happen later
81
+ Cardio.set_mod_paths # really this should happen later
83
82
 
84
83
  paths
85
84
  end
86
85
  end
87
86
  end
88
87
  end
89
-
@@ -273,7 +273,7 @@ describe CardController do
273
273
  end
274
274
 
275
275
  it "handles image with read permission" do
276
- login_as :joe_admin
276
+ login_as 'joe_admin'
277
277
  get :read, id: 'mao2'
278
278
  assert_response 200
279
279
  get :read, id: 'mao2', format: 'jpg'
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.16.14
4
+ version: 1.16.15
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: 2015-12-11 00:00:00.000000000 Z
14
+ date: 2016-01-06 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.16.14
36
+ version: 1.16.15
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.16.14
43
+ version: 1.16.15
44
44
  description: a wiki approach to stuctured data, dynamic interaction, and web design
45
45
  email:
46
46
  - info@wagn.org