edgarj 4.06.00 → 4.06.05

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8a67b275d252a2a12248082ff6c46ad40162d5dd0f34f61554d692870c0b098c
4
- data.tar.gz: 185f251a94005634be489001d8ee5896a29ced7ed2c825059fe91df48280e04c
3
+ metadata.gz: 3e2b4a25bc7fec12ca9810d9d828e941f84f61961ea596ef1dcc1f8491c99a23
4
+ data.tar.gz: 0d50818595fc1b58ad00c3b8a90b6317ae0b6867d3e83b719e0c4c81f2be8e0e
5
5
  SHA512:
6
- metadata.gz: 7002726d8a3fcdd986edfa890e99329a529d91722b0b94e0aeec1a3c5f4133f9684eb5527bb3ac34b7d306586a4f499fbf3d2aff5f90663766ef08f96ff32716
7
- data.tar.gz: bc0e3684c4a6982e69e0e86b66581d5c680553988ffc7b6e06e0e025b07f0f7f2e58a82284a95ae4fc81dd9046eaae0ed7d3ad71b268c9ff597d978a84615117
6
+ metadata.gz: 3cfc7575de7a5b9d44b96135f39435f74857e12a362fcbbe7e13237355c131e50f5300ab1384975a2d2f4447b1e73ba907562588e36875765957ab43c3bd8e34
7
+ data.tar.gz: e830712769b62337b0751b1ad1c6d9808a37ce40b27713a8dad7f39fa72d0003582a796edc3e226a82f2d0d1be35051ec4d91bfbeab6bd86213eee227e0a6d54
@@ -258,15 +258,15 @@ module Edgarj
258
258
  # ModelPermission::READ on this controller is required.
259
259
  #
260
260
  def search_save
261
- svc = SavedVcontext.save(current_user, nil,
262
- params[:saved_page_info_name], page_info)
261
+ SavedVcontext.save(current_user, nil,
262
+ params[:saved_page_info_name], page_info)
263
263
 
264
264
  render :update do |page|
265
265
  page << "Edgarj.SearchSavePopup.close();"
266
266
  page.replace 'edgarj_load_condition_menu',
267
267
  :partial=>'edgarj/load_condition_menu'
268
268
  end
269
- rescue ActiveRecord::ActiveRecordError => ex
269
+ rescue ActiveRecord::ActiveRecordError
270
270
  app_rescue
271
271
  render :update do |page|
272
272
  page.replace_html 'search_save_popup_flash_error', :text=>t('save_fail')
@@ -332,7 +332,6 @@ module Edgarj
332
332
  Time.now.strftime("%Y%m%d-%H%M%S"))
333
333
  file = Tempfile.new(filename, Settings.edgarj.csv_dir)
334
334
  csv_visitor = EdgarjHelper::CsvVisitor.new(view_context)
335
- cond = {:conditions=>page_info.record.conditions}
336
335
  file.write CSV.generate_line(model.columns.map{|c| c.name})
337
336
  for rec in user_scoped.where(page_info.record.conditions).
338
337
  order(
@@ -9,6 +9,6 @@ module Edgarj
9
9
  render '/edgarj/edgarj/search_operator',
10
10
  o: o,
11
11
  method: method
12
- end
12
+ end
13
13
  end
14
14
  end
@@ -243,7 +243,6 @@ module Edgarj
243
243
 
244
244
  def validate_data_type
245
245
  for col in klass.columns do
246
- col_str = col_name(col)
247
246
  encoded_col = encode_name(col)
248
247
  val = @attrs[encoded_col]
249
248
  case col.type
@@ -95,7 +95,7 @@ module Edgarj
95
95
  session_id = s.session_id
96
96
  s.destroy
97
97
  logger.info("deleting session(#{session_id})")
98
- rescue ActiveRecord::RecordNotFound => ex
98
+ rescue ActiveRecord::RecordNotFound
99
99
  logger.warn("session not found(#{session_id})")
100
100
  end
101
101
  end
@@ -20,7 +20,7 @@ module ActionDispatch::Routing::Mapper::Resources
20
20
  # Where, :id is internally used for session so that client application
21
21
  # doesn't have to take care it.
22
22
  def edgarj_resources(*symbols, &block)
23
- resources *symbols do
23
+ resources(*symbols) do
24
24
  yield if block_given?
25
25
 
26
26
  collection do
@@ -59,7 +59,7 @@ module ActionDispatch::Routing::Mapper::Resources
59
59
  # Where, :id is internally used for session so that client application
60
60
  # doesn't have to take care it.
61
61
  def edgarj_popup_resources(*symbols, &block)
62
- resources *symbols, only: [:index] do
62
+ resources(*symbols, only: [:index]) do
63
63
  yield if block_given?
64
64
 
65
65
  collection do
@@ -1,3 +1,3 @@
1
1
  module Edgarj
2
- VERSION = '4.06.00'
2
+ VERSION = '4.06.05'
3
3
  end
@@ -20,7 +20,7 @@ Dummy::Application.configure do
20
20
  # config.action_dispatch.rack_cache = true
21
21
 
22
22
  # Disable Rails's static asset server (Apache or nginx will already do this).
23
- config.serve_static_assets = false
23
+ config.serve_static_files = false
24
24
 
25
25
  # Compress JavaScripts and CSS.
26
26
  config.assets.js_compressor = :uglifier
@@ -1,4 +1,6 @@
1
1
  Dummy::Application.configure do
2
+ config.active_support.test_order = :sorted
3
+
2
4
  # Settings specified here will take precedence over those in config/application.rb.
3
5
 
4
6
  # The test environment is used exclusively to run your application's
@@ -13,7 +15,7 @@ Dummy::Application.configure do
13
15
  config.eager_load = false
14
16
 
15
17
  # Configure static asset server for tests with Cache-Control for performance.
16
- config.serve_static_assets = true
18
+ config.serve_static_files = true
17
19
  config.static_cache_control = "public, max-age=3600"
18
20
 
19
21
  # Show full error reports and disable caching.
@@ -13,47 +13,47 @@
13
13
 
14
14
  ActiveRecord::Schema.define(version: 20160119053447) do
15
15
 
16
- create_table "authors", force: true do |t|
17
- t.string "name"
16
+ create_table "authors", force: :cascade do |t|
17
+ t.string "name", limit: 255
18
18
  t.datetime "created_at"
19
19
  t.datetime "updated_at"
20
- t.integer "user_group_id"
20
+ t.integer "user_group_id", limit: 4
21
21
  end
22
22
 
23
- create_table "books", force: true do |t|
24
- t.integer "author_id"
25
- t.string "name"
23
+ create_table "books", force: :cascade do |t|
24
+ t.integer "author_id", limit: 4
25
+ t.string "name", limit: 255
26
26
  t.datetime "created_at"
27
27
  t.datetime "updated_at"
28
28
  end
29
29
 
30
- create_table "edgarj_model_permissions", force: true do |t|
31
- t.integer "user_group_id"
32
- t.string "name"
33
- t.integer "flags"
34
- t.datetime "created_at", null: false
35
- t.datetime "updated_at", null: false
36
- t.string "model"
30
+ create_table "edgarj_model_permissions", force: :cascade do |t|
31
+ t.integer "user_group_id", limit: 4
32
+ t.string "name", limit: 255
33
+ t.integer "flags", limit: 4
34
+ t.datetime "created_at", null: false
35
+ t.datetime "updated_at", null: false
36
+ t.string "model", limit: 255
37
37
  end
38
38
 
39
39
  add_index "edgarj_model_permissions", ["model"], name: "index_edgarj_model_permissions_on_model", using: :btree
40
40
 
41
- create_table "edgarj_page_infos", force: true do |t|
42
- t.integer "sssn_id"
43
- t.string "view"
44
- t.string "order_by"
45
- t.string "dir"
46
- t.integer "page"
47
- t.integer "lines"
48
- t.text "record_data"
41
+ create_table "edgarj_page_infos", force: :cascade do |t|
42
+ t.integer "sssn_id", limit: 4
43
+ t.string "view", limit: 255
44
+ t.string "order_by", limit: 255
45
+ t.string "dir", limit: 255
46
+ t.integer "page", limit: 4
47
+ t.integer "lines", limit: 4
48
+ t.text "record_data", limit: 65535
49
49
  t.datetime "created_at"
50
50
  t.datetime "updated_at"
51
51
  end
52
52
 
53
- create_table "edgarj_sssns", force: true do |t|
54
- t.string "session_id", null: false
55
- t.text "data"
56
- t.integer "user_id"
53
+ create_table "edgarj_sssns", force: :cascade do |t|
54
+ t.string "session_id", limit: 255, null: false
55
+ t.text "data", limit: 65535
56
+ t.integer "user_id", limit: 4
57
57
  t.datetime "created_at"
58
58
  t.datetime "updated_at"
59
59
  end
@@ -61,19 +61,19 @@ ActiveRecord::Schema.define(version: 20160119053447) do
61
61
  add_index "edgarj_sssns", ["session_id"], name: "index_edgarj_sssns_on_session_id", using: :btree
62
62
  add_index "edgarj_sssns", ["updated_at"], name: "index_edgarj_sssns_on_updated_at", using: :btree
63
63
 
64
- create_table "edgarj_user_group_users", force: true do |t|
65
- t.integer "user_group_id"
66
- t.integer "user_id"
64
+ create_table "edgarj_user_group_users", force: :cascade do |t|
65
+ t.integer "user_group_id", limit: 4
66
+ t.integer "user_id", limit: 4
67
67
  t.datetime "created_at"
68
68
  t.datetime "updated_at"
69
69
  end
70
70
 
71
- create_table "edgarj_user_groups", force: true do |t|
72
- t.integer "kind"
73
- t.string "name"
74
- t.integer "parent_id"
75
- t.integer "lft"
76
- t.integer "rgt"
71
+ create_table "edgarj_user_groups", force: :cascade do |t|
72
+ t.integer "kind", limit: 4
73
+ t.string "name", limit: 255
74
+ t.integer "parent_id", limit: 4
75
+ t.integer "lft", limit: 4
76
+ t.integer "rgt", limit: 4
77
77
  t.datetime "created_at"
78
78
  t.datetime "updated_at"
79
79
  end
@@ -83,9 +83,9 @@ ActiveRecord::Schema.define(version: 20160119053447) do
83
83
  add_index "edgarj_user_groups", ["parent_id"], name: "index_edgarj_user_groups_on_parent_id", using: :btree
84
84
  add_index "edgarj_user_groups", ["rgt"], name: "index_edgarj_user_groups_on_rgt", using: :btree
85
85
 
86
- create_table "users", force: true do |t|
87
- t.string "code"
88
- t.string "name"
86
+ create_table "users", force: :cascade do |t|
87
+ t.string "code", limit: 255
88
+ t.string "name", limit: 255
89
89
  t.datetime "created_at"
90
90
  t.datetime "updated_at"
91
91
  end
@@ -107,8 +107,8 @@ class AuthorsControllerTest < ActionController::TestCase
107
107
  end
108
108
 
109
109
  should 'search with operator' do
110
- xhr :get, :search, edgarj_search_form: {_id: @author.id},
111
- edgarj_search_form: {
110
+ xhr :get, :search, edgarj_search_form: {
111
+ _id: @author.id,
112
112
  edgarj_search_form_operator: {
113
113
  _id: '<>'
114
114
  }
@@ -107,8 +107,8 @@ class BooksControllerTest < ActionController::TestCase
107
107
  end
108
108
 
109
109
  should 'search with operator' do
110
- xhr :get, :search, edgarj_search_form: {_id: @book.id},
111
- edgarj_search_form: {
110
+ xhr :get, :search, edgarj_search_form: {
111
+ _id: @book.id,
112
112
  edgarj_search_form_operator: {
113
113
  _id: '<>'
114
114
  }
data/test/test_helper.rb CHANGED
@@ -1,21 +1,22 @@
1
1
  # Configure Rails Environment
2
2
  ENV["RAILS_ENV"] = "test"
3
3
 
4
- require File.expand_path("../dummy/config/environment.rb", __FILE__)
4
+ require File.expand_path("../../test/dummy/config/environment.rb", __FILE__)
5
+ ActiveRecord::Migrator.migrations_paths = [File.expand_path("../../test/dummy/db/migrate", __FILE__)]
5
6
  require "rails/test_help"
6
7
 
7
- Rails.backtrace_cleaner.remove_silencers!
8
+ # Filter out Minitest backtrace while allowing backtrace from other libraries
9
+ # to be shown.
10
+ Minitest.backtrace_filter = Minitest::BacktraceFilter.new
8
11
 
9
12
  # Load support files
10
13
  Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
11
14
 
12
15
  # Load fixtures from the engine
13
- #if ActiveSupport::TestCase.method_defined?(:fixture_path=)
16
+ if ActiveSupport::TestCase.respond_to?(:fixture_path=)
14
17
  ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
15
- #end
16
-
17
- class ActiveSupport::TestCase
18
- fixtures :all
18
+ ActionDispatch::IntegrationTest.fixture_path = ActiveSupport::TestCase.fixture_path
19
+ ActiveSupport::TestCase.fixtures :all
19
20
  end
20
21
 
21
22
  class ActionController::TestCase
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: edgarj
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.06.00
4
+ version: 4.06.05
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fuminori Ido
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-21 00:00:00.000000000 Z
11
+ date: 2021-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -30,20 +30,20 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '3.1'
33
+ version: '4.4'
34
34
  - - ">="
35
35
  - !ruby/object:Gem::Version
36
- version: 3.1.0
36
+ version: 4.4.0
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: '3.1'
43
+ version: '4.4'
44
44
  - - ">="
45
45
  - !ruby/object:Gem::Version
46
- version: 3.1.0
46
+ version: 4.4.0
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: jquery-ui-rails
49
49
  requirement: !ruby/object:Gem::Requirement
@@ -134,6 +134,20 @@ dependencies:
134
134
  - - "~>"
135
135
  - !ruby/object:Gem::Version
136
136
  version: '0.1'
137
+ - !ruby/object:Gem::Dependency
138
+ name: sprockets
139
+ requirement: !ruby/object:Gem::Requirement
140
+ requirements:
141
+ - - "~>"
142
+ - !ruby/object:Gem::Version
143
+ version: 3.7.2
144
+ type: :runtime
145
+ prerelease: false
146
+ version_requirements: !ruby/object:Gem::Requirement
147
+ requirements:
148
+ - - "~>"
149
+ - !ruby/object:Gem::Version
150
+ version: 3.7.2
137
151
  - !ruby/object:Gem::Dependency
138
152
  name: mysql2
139
153
  requirement: !ruby/object:Gem::Requirement
@@ -358,96 +372,95 @@ required_rubygems_version: !ruby/object:Gem::Requirement
358
372
  - !ruby/object:Gem::Version
359
373
  version: '0'
360
374
  requirements: []
361
- rubyforge_project:
362
- rubygems_version: 2.7.2
375
+ rubygems_version: 3.1.4
363
376
  signing_key:
364
377
  specification_version: 4
365
378
  summary: Scaffold with Ajax, search, sort, 'belongs_to' popup, and more.
366
379
  test_files:
367
- - test/dummy/config.ru
368
- - test/dummy/test/controllers/books_controller_test.rb
369
- - test/dummy/test/controllers/authors_controller_test.rb
370
- - test/dummy/test/controllers/authors_popup_controller_test.rb
371
- - test/dummy/test/helpers/authors_helper_test.rb
372
- - test/dummy/test/models/author_test.rb
373
- - test/dummy/test/models/rails_config_test.rb
374
- - test/dummy/test/models/book_test.rb
380
+ - test/controllers/edgarj/edgarj_controller_test.rb
381
+ - test/controllers/edgarj/model_permissions_controller_test.rb
382
+ - test/controllers/edgarj/user_group_users_controller_test.rb
383
+ - test/dummy/README.rdoc
384
+ - test/dummy/Rakefile
375
385
  - test/dummy/app/assets/javascripts/application.js
376
386
  - test/dummy/app/assets/javascripts/authors.js
387
+ - test/dummy/app/assets/stylesheets/application.css
377
388
  - test/dummy/app/assets/stylesheets/authors.css
378
389
  - test/dummy/app/assets/stylesheets/scaffold.css
379
- - test/dummy/app/assets/stylesheets/application.css
380
- - test/dummy/app/decorators/models/edgarj/user_group_decorator.rb
381
- - test/dummy/app/controllers/authors_popup_controller.rb
382
- - test/dummy/app/controllers/dummy_auth_mixin.rb
383
390
  - test/dummy/app/controllers/application_controller.rb
384
- - test/dummy/app/controllers/books_controller.rb
385
391
  - test/dummy/app/controllers/authors_controller.rb
386
- - test/dummy/app/helpers/authors_popup_helper.rb
392
+ - test/dummy/app/controllers/authors_popup_controller.rb
393
+ - test/dummy/app/controllers/books_controller.rb
394
+ - test/dummy/app/controllers/dummy_auth_mixin.rb
395
+ - test/dummy/app/decorators/models/edgarj/user_group_decorator.rb
396
+ - test/dummy/app/helpers/application_helper.rb
387
397
  - test/dummy/app/helpers/authors_helper.rb
398
+ - test/dummy/app/helpers/authors_popup_helper.rb
388
399
  - test/dummy/app/helpers/books_helper.rb
389
- - test/dummy/app/helpers/application_helper.rb
390
400
  - test/dummy/app/models/author.rb
391
- - test/dummy/app/models/user.rb
392
401
  - test/dummy/app/models/book.rb
402
+ - test/dummy/app/models/user.rb
393
403
  - test/dummy/app/views/layouts/application.html.erb
394
404
  - test/dummy/app/views/layouts/login.html.erb
395
- - test/dummy/Rakefile
396
- - test/dummy/config/database.yml
397
- - test/dummy/config/settings.yml
405
+ - test/dummy/bin/bundle
406
+ - test/dummy/bin/rails
407
+ - test/dummy/bin/rake
408
+ - test/dummy/config.ru
409
+ - test/dummy/config/application.rb
398
410
  - test/dummy/config/boot.rb
411
+ - test/dummy/config/database.yml
412
+ - test/dummy/config/edgarj/menu_config.rb
399
413
  - test/dummy/config/environment.rb
400
- - test/dummy/config/settings/production.yml
401
- - test/dummy/config/settings/development.yml
402
- - test/dummy/config/settings/test.yml
403
- - test/dummy/config/routes.rb
404
- - test/dummy/config/application.rb
405
- - test/dummy/config/locales/en.yml
406
- - test/dummy/config/locales/ja.yml
414
+ - test/dummy/config/environments/development.rb
415
+ - test/dummy/config/environments/production.rb
416
+ - test/dummy/config/environments/test.rb
407
417
  - test/dummy/config/initializers/backtrace_silencers.rb
418
+ - test/dummy/config/initializers/config.rb
408
419
  - test/dummy/config/initializers/filter_parameter_logging.rb
409
- - test/dummy/config/initializers/wrap_parameters.rb
410
- - test/dummy/config/initializers/secret_token.rb
420
+ - test/dummy/config/initializers/inflections.rb
411
421
  - test/dummy/config/initializers/mime_types.rb
422
+ - test/dummy/config/initializers/secret_token.rb
412
423
  - test/dummy/config/initializers/session_store.rb
413
- - test/dummy/config/initializers/inflections.rb
414
- - test/dummy/config/initializers/config.rb
415
- - test/dummy/config/edgarj/menu_config.rb
416
- - test/dummy/config/environments/production.rb
417
- - test/dummy/config/environments/development.rb
418
- - test/dummy/config/environments/test.rb
419
- - test/dummy/public/404.html
420
- - test/dummy/public/favicon.ico
421
- - test/dummy/public/500.html
422
- - test/dummy/public/422.html
423
- - test/dummy/README.rdoc
424
- - test/dummy/bin/bundle
425
- - test/dummy/bin/rake
426
- - test/dummy/bin/rails
427
- - test/dummy/db/schema.rb
428
- - test/dummy/db/migrate/20140807065420_create_users.rb
429
- - test/dummy/db/migrate/20131218011851_create_books.rb
424
+ - test/dummy/config/initializers/wrap_parameters.rb
425
+ - test/dummy/config/locales/en.yml
426
+ - test/dummy/config/locales/ja.yml
427
+ - test/dummy/config/routes.rb
428
+ - test/dummy/config/settings.yml
429
+ - test/dummy/config/settings/development.yml
430
+ - test/dummy/config/settings/production.yml
431
+ - test/dummy/config/settings/test.yml
430
432
  - test/dummy/db/migrate/20131107120635_create_authors.rb
433
+ - test/dummy/db/migrate/20131218011851_create_books.rb
431
434
  - test/dummy/db/migrate/20140201000000_add_user_group_id_to_authors.rb
432
- - test/test_helper.rb
433
- - test/integration/navigation_test.rb
434
- - test/controllers/edgarj/user_group_users_controller_test.rb
435
- - test/controllers/edgarj/edgarj_controller_test.rb
436
- - test/controllers/edgarj/model_permissions_controller_test.rb
435
+ - test/dummy/db/migrate/20140807065420_create_users.rb
436
+ - test/dummy/db/schema.rb
437
+ - test/dummy/public/404.html
438
+ - test/dummy/public/422.html
439
+ - test/dummy/public/500.html
440
+ - test/dummy/public/favicon.ico
441
+ - test/dummy/test/controllers/authors_controller_test.rb
442
+ - test/dummy/test/controllers/authors_popup_controller_test.rb
443
+ - test/dummy/test/controllers/books_controller_test.rb
444
+ - test/dummy/test/helpers/authors_helper_test.rb
445
+ - test/dummy/test/models/author_test.rb
446
+ - test/dummy/test/models/book_test.rb
447
+ - test/dummy/test/models/rails_config_test.rb
448
+ - test/edgarj_test.rb
437
449
  - test/fixtures/authors.yml
438
450
  - test/fixtures/books.yml
439
- - test/fixtures/users.yml
440
- - test/fixtures/edgarj/user_group_users.yml
441
- - test/fixtures/edgarj/user_groups.yml
451
+ - test/fixtures/edgarj/model_permissions.yml
442
452
  - test/fixtures/edgarj/page_infos.yml
443
453
  - test/fixtures/edgarj/sssns.yml
444
- - test/fixtures/edgarj/model_permissions.yml
445
- - test/edgarj_test.rb
446
- - test/support/edgarj/controller_supporter.rb
447
- - test/models/helpers/edgarj/model_permissions_helper_test.rb
448
- - test/models/helpers/edgarj/user_group_users_helper_test.rb
449
- - test/models/edgarj/user_group_test.rb
450
- - test/models/edgarj/sssn_test.rb
454
+ - test/fixtures/edgarj/user_group_users.yml
455
+ - test/fixtures/edgarj/user_groups.yml
456
+ - test/fixtures/users.yml
457
+ - test/integration/navigation_test.rb
451
458
  - test/models/edgarj/model_permission_test.rb
452
459
  - test/models/edgarj/page_info_test.rb
460
+ - test/models/edgarj/sssn_test.rb
461
+ - test/models/edgarj/user_group_test.rb
453
462
  - test/models/edgarj/user_group_user_test.rb
463
+ - test/models/helpers/edgarj/model_permissions_helper_test.rb
464
+ - test/models/helpers/edgarj/user_group_users_helper_test.rb
465
+ - test/support/edgarj/controller_supporter.rb
466
+ - test/test_helper.rb