wagn 1.18.3 → 1.18.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3cbe6bd1aa55678a8d2ca843b1c373544dece5ed
4
- data.tar.gz: c5b8babf7cfb7acfa9da9f08f542c1f15d15bcc4
3
+ metadata.gz: e933d025e07645dd7f92d25942d0ecc4665355a3
4
+ data.tar.gz: 0658db4a559f088eb629e608568c44da66e5c9e4
5
5
  SHA512:
6
- metadata.gz: b5221880b583ffd25857caef00d67e775e9b40c6632d834b6a0c8d9d3ef7571d338cacab5862493fd308327968a47a83747fbe682cf9a74058759dc82d432024
7
- data.tar.gz: 0bc50056845418d95106848b11fb9975b7205d9a1667a43b9a0221ed6edb0b8153fe7ec8e7037dbcdb4788f38e15efaa6bec6ded1b315760cfd14410f758e7bc
6
+ metadata.gz: 68b1be15a9980ba07e2c8e750b8d1df15ee8f158c67c937dcc27b499d6c097abff25acfa2c8112b51a507b1414368477c8450eea07412fa78f5c353676c2342d
7
+ data.tar.gz: 2cfe84024ef8f98c1bf5f82e9b0694ee38c439335f3a3cb3b90aeec7801f2d25532629a84a8427b69319c814a49266ebb51254026a03559f1333702f815954f8
@@ -7,14 +7,28 @@ Feature: paging
7
7
  Background:
8
8
  Given I am signed in as Joe Admin
9
9
  And I create Search card "basic card search" with content "{\"type\":\"basic\", \"limit\":2}"
10
- And I create HTML card "basic item structure" with content "{{_|name}}"
11
- And I create HTML card "list all basic cards" with content "{{basic card search||content;structure:basic item structure}}"
12
10
 
13
11
  Scenario: jump to pages should keep the item structure
14
- When I go to card "list all basic cards"
15
- And I click "2" within ".paging"
12
+ When I create HTML card "basic item structure" with content "{{_|name}}"
13
+ And I create HTML card "list all basic cards" with content "{{basic card search||content;structure:basic item structure}}"
14
+ And I go to card "list all basic cards"
15
+ And I click "2" within ".paging"
16
16
  And I wait until ajax response done
17
17
  Then I should see css class ".STRUCTURE-basic_item_structure" within ".search-result-item"
18
- And I click "3" within ".paging"
18
+ And I click "3" within ".paging"
19
19
  And I wait until ajax response done
20
20
  Then I should see css class ".STRUCTURE-basic_item_structure" within ".search-result-item"
21
+
22
+ Scenario: jump to pages should keep the item view
23
+ When I create HTML card "list basic types" with content "{{basic card search|open|closed}}"
24
+ And I go to card "list basic types"
25
+ And I click "2" within ".paging"
26
+ And I wait until ajax response done
27
+ Then I should see css class ".closed-view" within ".search-result-item"
28
+ And I click "3" within ".paging"
29
+ And I wait until ajax response done
30
+ Then I should see css class ".TYPE-search.open-view"
31
+ Then I should see css class ".closed-view" within ".search-result-item"
32
+
33
+
34
+
@@ -65,7 +65,7 @@ else
65
65
  end.flatten
66
66
  require_args = "-r #{Wagn.gem_root}/features "
67
67
  require_args += feature_paths.map { |path| "-r #{path}" }.join(' ')
68
- feature_args = ARGV.empty? ? feature_paths.join(' ') : ARGV.join(' ')
68
+ feature_args = ARGV.empty? ? feature_paths.join(' ') : ARGV.shelljoin
69
69
  unless system 'RAILS_ROOT=. bundle exec cucumber ' \
70
70
  "#{require_args} #{feature_args} 2>&1"
71
71
  exit $CHILD_STATUS.exitstatus
@@ -86,9 +86,11 @@ else
86
86
  rspec_args.shift
87
87
  opts = {}
88
88
  Wagn::Parser.rspec(opts).parse!(wagn_args)
89
+
89
90
  rspec_command =
90
91
  "RAILS_ROOT=. #{opts[:simplecov]} #{opts[:executer]} " \
91
- " #{opts[:rescue]} rspec #{rspec_args.join(' ')} #{opts[:files]} 2>&1"
92
+ " #{opts[:rescue]} rspec #{rspec_args.shelljoin} #{opts[:files]}
93
+ 2>&1"
92
94
  exit $CHILD_STATUS.exitstatus unless system rspec_command
93
95
  when '--version', '-v'
94
96
  puts "Wagn #{Card::Version.release}"
@@ -1,6 +1,6 @@
1
1
  # -*- encoding : utf-8 -*-
2
- require 'codeclimate-test-reporter'
3
- CodeClimate::TestReporter.start
2
+ # require 'codeclimate-test-reporter'
3
+ # CodeClimate::TestReporter.start
4
4
  require 'spork'
5
5
 
6
6
  ENV['RAILS_ENV'] = 'test'
@@ -6,7 +6,19 @@ WAGN_SEED_PATH = File.join(
6
6
  ENV['DECKO_SEED_REPO_PATH'] || [Cardio.gem_root, 'db', 'seed'], 'new'
7
7
  )
8
8
 
9
+ def run_card_migration core_or_deck
10
+ prepare_migration
11
+ verbose = ENV['VERBOSE'] ? ENV['VERBOSE'] == 'true' : true
12
+ Cardio.schema_mode(core_or_deck) do |paths|
13
+ ActiveRecord::Migrator.migrations_paths = paths
14
+ ActiveRecord::Migration.verbose = verbose
15
+ ActiveRecord::Migrator.migrate paths, version
16
+ end
17
+ end
18
+
9
19
  def prepare_migration
20
+ Card::Cache.reset_all
21
+ ENV['SCHEMA'] ||= "#{Cardio.gem_root}/db/schema.rb"
10
22
  Card::Cache.reset_all
11
23
  Card.config.action_mailer.perform_deliveries = false
12
24
  Card.reset_column_information
@@ -153,9 +165,9 @@ namespace :wagn do
153
165
  desc 'migrate structure'
154
166
  task structure: :environment do
155
167
  ENV['SCHEMA'] ||= "#{Cardio.gem_root}/db/schema.rb"
156
- Cardio.schema_mode(:structure) do
157
- paths = ActiveRecord::Migrator.migrations_paths = Cardio.migration_paths(:structure)
158
- ActiveRecord::Migrator.migrate paths
168
+ Cardio.schema_mode(:structure) do |paths|
169
+ ActiveRecord::Migrator.migrations_paths = paths
170
+ ActiveRecord::Migrator.migrate paths, version
159
171
  Rake::Task['db:_dump'].invoke # write schema.rb
160
172
  end
161
173
  end
@@ -163,34 +175,23 @@ namespace :wagn do
163
175
  desc 'migrate core cards'
164
176
  task core_cards: :environment do
165
177
  require 'card/core_migration'
166
-
167
- Card::Cache.reset_all
168
- ENV['SCHEMA'] ||= "#{Cardio.gem_root}/db/schema.rb"
169
- prepare_migration
170
- paths = Cardio.migration_paths(:core_cards)
171
- verbose = ENV['VERBOSE'] ? ENV['VERBOSE'] == 'true' : true
172
- version = ENV['VERSION'] ? ENV['VERSION'].to_i : nil
173
-
174
- ActiveRecord::Migrator.migrations_paths = paths
175
- Cardio.schema_mode :core_cards do
176
- ActiveRecord::Migration.verbose = verbose
177
- ActiveRecord::Migrator.migrate paths, version
178
- end
178
+ run_card_migration :core_cards
179
179
  end
180
180
 
181
181
  desc 'migrate deck cards'
182
182
  task deck_cards: :environment do
183
183
  require 'card/migration'
184
+ run_card_migration :deck_cards
185
+ end
184
186
 
185
- Card::Cache.reset_all
186
- ENV['SCHEMA'] ||= "#{Cardio.gem_root}/db/schema.rb"
187
- prepare_migration
188
- paths = ActiveRecord::Migrator.migrations_paths = Cardio.migration_paths(:deck_cards)
189
-
190
- Cardio.schema_mode(:deck_cards) do
191
- ActiveRecord::Migration.verbose = ENV['VERBOSE'] ? ENV['VERBOSE'] == 'true' : true
192
- ActiveRecord::Migrator.migrate paths, ENV['VERSION'] ? ENV['VERSION'].to_i : nil
193
- end
187
+ desc 'Runs the "up" for a given deck cards migration VERSION.'
188
+ task up: :environment do
189
+ version = ENV['VERSION'] ? ENV['VERSION'].to_i : nil
190
+ verbose = ENV['VERBOSE'] ? ENV['VERBOSE'] == 'true' : true
191
+ raise 'VERSION is required' unless version
192
+ ActiveRecord::Migration.verbose = verbose
193
+ ActiveRecord::Migrator.run :up, Cardio.migration_paths(:deck_cards),
194
+ version
194
195
  end
195
196
 
196
197
  # maybe we should move this to a method?
@@ -268,7 +269,7 @@ namespace :wagn do
268
269
  data = ActiveRecord::Base.connection.select_all(
269
270
  "select * from #{table}"
270
271
  )
271
- file.write YAML.dump(data.inject({}) do |hash, record|
272
+ file.write YAML.dump(data.each_with_object({}) do |record, hash|
272
273
  record['trash'] = false if record.key? 'trash'
273
274
  record['draft'] = false if record.key? 'draft'
274
275
  if record.key? 'content'
@@ -277,7 +278,6 @@ namespace :wagn do
277
278
  # would not be needed with psych.
278
279
  end
279
280
  hash["#{table}_#{i.succ!}"] = record
280
- hash
281
281
  end)
282
282
  end
283
283
  end
@@ -348,7 +348,7 @@ end
348
348
 
349
349
  def delete_unwanted_cards
350
350
  Card::Auth.as_bot do
351
- if ignoramus = Card['*ignore']
351
+ if (ignoramus = Card['*ignore'])
352
352
  ignoramus.item_cards.each(&:delete!)
353
353
  end
354
354
  Card::Cache.reset_all
@@ -375,3 +375,7 @@ def clear_history
375
375
  action.update_attributes!(card_act_id: act.id)
376
376
  end
377
377
  end
378
+
379
+ def version
380
+ ENV['VERSION'] ? ENV['VERSION'].to_i : nil
381
+ end
@@ -5,14 +5,16 @@ version = File.open(File.expand_path('../../card/VERSION', __FILE__)).read.chomp
5
5
  Gem::Specification.new do |s|
6
6
  s.name = 'wagn'
7
7
  s.version = version
8
- s.authors = ['Ethan McCutchen', 'Lewis Hoffman', 'Gerry Gleason', "Philipp Kühl"]
8
+ s.authors = ['Ethan McCutchen', 'Lewis Hoffman',
9
+ 'Gerry Gleason', 'Philipp Kühl']
9
10
  s.email = ['info@wagn.org']
10
11
 
11
12
  # s.date = '2013-12-20'
12
13
  s.summary = 'structured wiki web platform'
13
- s.description = 'a wiki approach to stuctured data, dynamic interaction, and web design'
14
+ s.description = 'a wiki approach to stuctured data, dynamic interaction, '\
15
+ ' and web design'
14
16
  s.homepage = 'http://wagn.org'
15
- s.license = 'GPL'
17
+ s.licenses = ['GPL-2.0', 'GPL-3.0']
16
18
 
17
19
  s.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
18
20
 
@@ -27,6 +29,6 @@ Gem::Specification.new do |s|
27
29
  ['rails', '~> 4.2'],
28
30
  ['card', version]
29
31
  ].each do |dep|
30
- s.add_runtime_dependency *dep
32
+ s.add_runtime_dependency(*dep)
31
33
  end
32
34
  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.3
4
+ version: 1.18.4
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-03-04 00:00:00.000000000 Z
14
+ date: 2016-04-08 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rails
@@ -33,15 +33,15 @@ dependencies:
33
33
  requirements:
34
34
  - - '='
35
35
  - !ruby/object:Gem::Version
36
- version: 1.18.3
36
+ version: 1.18.4
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.3
44
- description: a wiki approach to stuctured data, dynamic interaction, and web design
43
+ version: 1.18.4
44
+ description: a wiki approach to stuctured data, dynamic interaction, and web design
45
45
  email:
46
46
  - info@wagn.org
47
47
  executables:
@@ -738,7 +738,8 @@ files:
738
738
  - wagn.gemspec
739
739
  homepage: http://wagn.org
740
740
  licenses:
741
- - GPL
741
+ - GPL-2.0
742
+ - GPL-3.0
742
743
  metadata: {}
743
744
  post_install_message:
744
745
  rdoc_options: []