rails_db 1.4.1 → 1.5.0

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: ff34b55cfe0e4c05c484f798d5316a515f85b0e2
4
- data.tar.gz: f13ecb2575d9c568bebc7948d508c2e5c4cdd193
3
+ metadata.gz: 87353b44c67c392f75cda69ed969c15f3e2ea4dd
4
+ data.tar.gz: 529f95a838ea1eeb648a7276f85750ad32ec6175
5
5
  SHA512:
6
- metadata.gz: bb3257a27ae20fd285b9eeb0bb064a6406841dae107b3378126f16485d23ec9783d62a77ab63edcad21ac6bec7be199623aa4031b7c26acd12d0f3bf34d5f169
7
- data.tar.gz: 715ec7c95f75f06a942a0a9f71bab57e09a10ce2e8ad2bce708cc2429b45ae9b1655c3d6deac698d437675b6a130f326be07396d19c6f1ea6eeae4b2154e5426
6
+ metadata.gz: dcc5f291b54eb0316b3f102be24da718ea79956e4bd0a9bf6dce48ef485bfe8b721b9f638673b6e1a881df1a9f9c96f2cf9e29ea6924a5c01d896182a9676bb5
7
+ data.tar.gz: a5d5d9bc1fa56c0341b22eab3ae91167518da3e4aeca7ab6ca9702892a0a05ce717823847b23fcc5b5594d3c27b29a7501bd8dcf1ef3b18fb4c8442b9ccc854b
@@ -25,14 +25,6 @@ table th .current {
25
25
  background-position: right center;
26
26
  }
27
27
 
28
- table.custom_sorting th .asc {
29
- background-image: asset-path('rails_db/up_arrow.gif');
30
- }
31
-
32
- table.custom_sorting th .desc {
33
- background-image: asset-path('rails_db/down_arrow.gif');
34
- }
35
-
36
28
  table th, table td {
37
29
  white-space: nowrap;
38
30
  vertical-align: top;
@@ -61,6 +61,14 @@ module RailsDb
61
61
  end
62
62
 
63
63
  klass.class_eval(&block) if block_given?
64
+
65
+ if Rails::VERSION::MAJOR == 3
66
+ klass.class_eval do
67
+ klass.columns.each do |e|
68
+ attr_accessor e.name
69
+ end
70
+ end
71
+ end
64
72
  klass
65
73
  end
66
74
 
@@ -1,3 +1,3 @@
1
1
  module RailsDb
2
- VERSION = "1.4.1"
2
+ VERSION = "1.5.0"
3
3
  end
@@ -1,5 +1,5 @@
1
1
  Rails.application.routes.draw do
2
2
  root :to => 'home#index'
3
3
 
4
- mount RailsDb::Engine => "/rails/db"
4
+ mount RailsDb::Engine => "/rails/db", as: 'rails_db'
5
5
  end
@@ -1,4 +1,3 @@
1
- # encoding: UTF-8
2
1
  # This file is auto-generated from the current state of the database. Instead
3
2
  # of editing this file, please use the migrations feature of Active Record to
4
3
  # incrementally modify your database, and then regenerate this schema definition.
@@ -33,10 +32,9 @@ ActiveRecord::Schema.define(version: 20170126124628) do
33
32
  t.text "message"
34
33
  t.datetime "created_at", null: false
35
34
  t.datetime "updated_at", null: false
35
+ t.index ["name", "email"], name: "index_contacts_on_name_and_email"
36
36
  end
37
37
 
38
- add_index "contacts", ["name", "email"], name: "index_contacts_on_name_and_email"
39
-
40
38
  create_table "legacy_accounts", primary_key: "uuid", force: :cascade do |t|
41
39
  t.string "name"
42
40
  end
@@ -46,52 +44,51 @@ ActiveRecord::Schema.define(version: 20170126124628) do
46
44
  t.integer "project_id"
47
45
  t.datetime "created_at", null: false
48
46
  t.datetime "updated_at", null: false
47
+ t.index ["project_id"], name: "index_payments_on_project_id"
49
48
  end
50
49
 
51
- add_index "payments", ["project_id"], name: "index_payments_on_project_id"
52
-
53
50
  create_table "projects", force: :cascade do |t|
54
51
  t.string "name"
55
- t.string "description_579223"
56
- t.string "description_345401"
57
- t.string "description_422932"
58
- t.string "description_70065"
59
- t.string "description_482605"
60
- t.string "description_940447"
61
- t.string "description_740033"
62
- t.string "description_671952"
63
- t.string "description_596531"
64
- t.string "description_86379"
65
- t.string "description_677943"
66
- t.string "description_811919"
67
- t.string "description_46326"
68
- t.string "description_871123"
69
- t.string "description_308496"
70
- t.string "description_725688"
71
- t.string "description_630564"
72
- t.string "description_529706"
73
- t.string "description_580432"
74
- t.string "description_135352"
75
- t.integer "amount_148947"
76
- t.integer "amount_389744"
77
- t.integer "amount_957940"
78
- t.integer "amount_236149"
79
- t.integer "amount_507850"
80
- t.integer "amount_892431"
81
- t.integer "amount_362618"
82
- t.integer "amount_275585"
83
- t.integer "amount_577887"
84
- t.integer "amount_125612"
85
- t.integer "amount_510527"
86
- t.integer "amount_302316"
87
- t.integer "amount_505272"
88
- t.integer "amount_339402"
89
- t.integer "amount_23870"
90
- t.integer "amount_730520"
91
- t.integer "amount_770590"
92
- t.integer "amount_242937"
93
- t.integer "amount_825518"
94
- t.integer "amount_490791"
52
+ t.string "description_880941"
53
+ t.string "description_609312"
54
+ t.string "description_45120"
55
+ t.string "description_646956"
56
+ t.string "description_359190"
57
+ t.string "description_414526"
58
+ t.string "description_126104"
59
+ t.string "description_21394"
60
+ t.string "description_200553"
61
+ t.string "description_47383"
62
+ t.string "description_817819"
63
+ t.string "description_297200"
64
+ t.string "description_732496"
65
+ t.string "description_578733"
66
+ t.string "description_181448"
67
+ t.string "description_591849"
68
+ t.string "description_29523"
69
+ t.string "description_859516"
70
+ t.string "description_607626"
71
+ t.string "description_634417"
72
+ t.integer "amount_96786"
73
+ t.integer "amount_118208"
74
+ t.integer "amount_354589"
75
+ t.integer "amount_529364"
76
+ t.integer "amount_2748"
77
+ t.integer "amount_265448"
78
+ t.integer "amount_87259"
79
+ t.integer "amount_69192"
80
+ t.integer "amount_400320"
81
+ t.integer "amount_981344"
82
+ t.integer "amount_724725"
83
+ t.integer "amount_233529"
84
+ t.integer "amount_10548"
85
+ t.integer "amount_918245"
86
+ t.integer "amount_400389"
87
+ t.integer "amount_630390"
88
+ t.integer "amount_183655"
89
+ t.integer "amount_83287"
90
+ t.integer "amount_252578"
91
+ t.integer "amount_147921"
95
92
  t.datetime "created_at", null: false
96
93
  t.datetime "updated_at", null: false
97
94
  end
@@ -99,11 +96,10 @@ ActiveRecord::Schema.define(version: 20170126124628) do
99
96
  create_table "projects_users", id: false, force: :cascade do |t|
100
97
  t.integer "project_id"
101
98
  t.integer "user_id"
99
+ t.index ["project_id"], name: "index_projects_users_on_project_id"
100
+ t.index ["user_id"], name: "index_projects_users_on_user_id"
102
101
  end
103
102
 
104
- add_index "projects_users", ["project_id"], name: "index_projects_users_on_project_id"
105
- add_index "projects_users", ["user_id"], name: "index_projects_users_on_user_id"
106
-
107
103
  create_table "users", force: :cascade do |t|
108
104
  t.string "name"
109
105
  t.integer "age"
@@ -115,10 +111,9 @@ ActiveRecord::Schema.define(version: 20170126124628) do
115
111
  t.date "dob"
116
112
  t.boolean "active", default: true
117
113
  t.string "type"
114
+ t.index ["account_id"], name: "index_users_on_account_id"
115
+ t.index ["name"], name: "index_users_on_name"
116
+ t.index ["salary"], name: "index_users_on_salary"
118
117
  end
119
118
 
120
- add_index "users", ["account_id"], name: "index_users_on_account_id"
121
- add_index "users", ["name"], name: "index_users_on_name"
122
- add_index "users", ["salary"], name: "index_users_on_salary"
123
-
124
119
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_db
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.1
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Kasyanchuk
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-26 00:00:00.000000000 Z
11
+ date: 2017-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -420,6 +420,7 @@ files:
420
420
  - test/dummy/config/locales/en.yml
421
421
  - test/dummy/config/routes.rb
422
422
  - test/dummy/config/secrets.yml
423
+ - test/dummy/db/development.sqlite3
423
424
  - test/dummy/db/migrate/20151013203739_create_users.rb
424
425
  - test/dummy/db/migrate/20151013203757_create_comments.rb
425
426
  - test/dummy/db/migrate/20151013204027_populate_data.rb
@@ -530,150 +531,151 @@ required_rubygems_version: !ruby/object:Gem::Requirement
530
531
  version: '0'
531
532
  requirements: []
532
533
  rubyforge_project:
533
- rubygems_version: 2.6.8
534
+ rubygems_version: 2.6.10
534
535
  signing_key:
535
536
  specification_version: 4
536
537
  summary: Inspect your Rails DB (table content viewer, execute sql queries, export
537
538
  & import data
538
539
  test_files:
539
- - test/sql_import_test.rb
540
- - test/table_test.rb
541
- - test/test_sql_mysql.sql
542
- - test/dummy/db/schema.rb
543
- - test/dummy/db/rails_db_dev.sqlite3
544
- - test/dummy/db/migrate/20151027223149_add_non_pk_table.rb
545
- - test/dummy/db/migrate/20151014074655_create_contacts.rb
546
- - test/dummy/db/migrate/20151027192250_create_payments.rb
547
- - test/dummy/db/migrate/20151014074454_create_accounts.rb
548
- - test/dummy/db/migrate/20151015145740_populate_db.rb
549
- - test/dummy/db/migrate/20151014152932_add_bd.rb
550
- - test/dummy/db/migrate/20151028191429_create_legacy_accounts.rb
551
- - test/dummy/db/migrate/20151013204027_populate_data.rb
552
- - test/dummy/db/migrate/20151013203757_create_comments.rb
553
- - test/dummy/db/migrate/20151121125538_add_boolean_field_to_user.rb
554
- - test/dummy/db/migrate/20151014183823_create_projects.rb
555
- - test/dummy/db/migrate/20170126124628_add_sti_model.rb
556
- - test/dummy/db/migrate/20151013203739_create_users.rb
557
- - test/dummy/db/migrate/20151014184243_add_long_text.rb
558
- - test/dummy/db/rails_db.sqlite3
559
- - test/dummy/README.rdoc
560
- - test/dummy/Rakefile
561
- - test/dummy/test/fixtures/legacy_accounts.yml
562
- - test/dummy/test/fixtures/users.yml
563
- - test/dummy/test/fixtures/contacts.yml
564
- - test/dummy/test/fixtures/projects.yml
565
- - test/dummy/test/fixtures/comments.yml
566
- - test/dummy/test/fixtures/accounts.yml
567
- - test/dummy/test/models/project_test.rb
568
- - test/dummy/test/models/user_test.rb
569
- - test/dummy/test/models/comment_test.rb
570
- - test/dummy/test/models/legacy_account_test.rb
571
- - test/dummy/test/models/contact_test.rb
572
- - test/dummy/test/models/account_test.rb
573
- - test/dummy/app/assets/javascripts/application.js
574
- - test/dummy/app/assets/stylesheets/bootstrap-theme.min.css
575
- - test/dummy/app/assets/stylesheets/bootstrap.min.css
576
- - test/dummy/app/assets/stylesheets/application.css
540
+ - test/dashboard_controller_test.rb
541
+ - test/database_test.rb
577
542
  - test/dummy/app/assets/fonts/glyphicons-halflings-regular.eot
578
543
  - test/dummy/app/assets/fonts/glyphicons-halflings-regular.svg
579
- - test/dummy/app/assets/fonts/glyphicons-halflings-regular.woff2
580
544
  - test/dummy/app/assets/fonts/glyphicons-halflings-regular.ttf
581
545
  - test/dummy/app/assets/fonts/glyphicons-halflings-regular.woff
546
+ - test/dummy/app/assets/fonts/glyphicons-halflings-regular.woff2
547
+ - test/dummy/app/assets/javascripts/application.js
548
+ - test/dummy/app/assets/stylesheets/application.css
549
+ - test/dummy/app/assets/stylesheets/bootstrap-theme.min.css
550
+ - test/dummy/app/assets/stylesheets/bootstrap.min.css
551
+ - test/dummy/app/controllers/application_controller.rb
552
+ - test/dummy/app/controllers/home_controller.rb
582
553
  - test/dummy/app/helpers/application_helper.rb
583
- - test/dummy/app/views/home/index.html.erb
584
- - test/dummy/app/views/layouts/application.html.erb
585
- - test/dummy/app/models/project.rb
586
- - test/dummy/app/models/customer.rb
587
- - test/dummy/app/models/comment.rb
588
554
  - test/dummy/app/models/account.rb
555
+ - test/dummy/app/models/comment.rb
589
556
  - test/dummy/app/models/contact.rb
590
- - test/dummy/app/models/populate.rb
557
+ - test/dummy/app/models/customer.rb
591
558
  - test/dummy/app/models/legacy_account.rb
592
559
  - test/dummy/app/models/payment.rb
560
+ - test/dummy/app/models/populate.rb
561
+ - test/dummy/app/models/project.rb
593
562
  - test/dummy/app/models/user.rb
594
- - test/dummy/app/controllers/application_controller.rb
595
- - test/dummy/app/controllers/home_controller.rb
596
- - test/dummy/bin/rake
597
- - test/dummy/bin/setup
563
+ - test/dummy/app/views/home/index.html.erb
564
+ - test/dummy/app/views/layouts/application.html.erb
598
565
  - test/dummy/bin/bundle
599
566
  - test/dummy/bin/rails
600
- - test/dummy/config/boot.rb
567
+ - test/dummy/bin/rake
568
+ - test/dummy/bin/setup
601
569
  - test/dummy/config/application.rb
570
+ - test/dummy/config/boot.rb
602
571
  - test/dummy/config/database.yml
572
+ - test/dummy/config/environment.rb
573
+ - test/dummy/config/environments/development.rb
603
574
  - test/dummy/config/environments/production.rb
604
575
  - test/dummy/config/environments/test.rb
605
- - test/dummy/config/environments/development.rb
606
- - test/dummy/config/routes.rb
607
- - test/dummy/config/locales/en.yml
608
- - test/dummy/config/secrets.yml
609
- - test/dummy/config/initializers/session_store.rb
576
+ - test/dummy/config/initializers/assets.rb
577
+ - test/dummy/config/initializers/backtrace_silencers.rb
578
+ - test/dummy/config/initializers/cookies_serializer.rb
579
+ - test/dummy/config/initializers/filter_parameter_logging.rb
610
580
  - test/dummy/config/initializers/inflections.rb
611
- - test/dummy/config/initializers/rails_db.rb
612
581
  - test/dummy/config/initializers/mime_types.rb
582
+ - test/dummy/config/initializers/rails_db.rb
583
+ - test/dummy/config/initializers/session_store.rb
613
584
  - test/dummy/config/initializers/wrap_parameters.rb
614
- - test/dummy/config/initializers/backtrace_silencers.rb
615
- - test/dummy/config/initializers/filter_parameter_logging.rb
616
- - test/dummy/config/initializers/assets.rb
617
- - test/dummy/config/initializers/cookies_serializer.rb
618
- - test/dummy/config/environment.rb
585
+ - test/dummy/config/locales/en.yml
586
+ - test/dummy/config/routes.rb
587
+ - test/dummy/config/secrets.yml
619
588
  - test/dummy/config.ru
620
- - test/dummy/public/500.html
621
- - test/dummy/public/favicon.ico
589
+ - test/dummy/db/development.sqlite3
590
+ - test/dummy/db/migrate/20151013203739_create_users.rb
591
+ - test/dummy/db/migrate/20151013203757_create_comments.rb
592
+ - test/dummy/db/migrate/20151013204027_populate_data.rb
593
+ - test/dummy/db/migrate/20151014074454_create_accounts.rb
594
+ - test/dummy/db/migrate/20151014074655_create_contacts.rb
595
+ - test/dummy/db/migrate/20151014152932_add_bd.rb
596
+ - test/dummy/db/migrate/20151014183823_create_projects.rb
597
+ - test/dummy/db/migrate/20151014184243_add_long_text.rb
598
+ - test/dummy/db/migrate/20151015145740_populate_db.rb
599
+ - test/dummy/db/migrate/20151027192250_create_payments.rb
600
+ - test/dummy/db/migrate/20151027223149_add_non_pk_table.rb
601
+ - test/dummy/db/migrate/20151028191429_create_legacy_accounts.rb
602
+ - test/dummy/db/migrate/20151121125538_add_boolean_field_to_user.rb
603
+ - test/dummy/db/migrate/20170126124628_add_sti_model.rb
604
+ - test/dummy/db/rails_db.sqlite3
605
+ - test/dummy/db/rails_db_dev.sqlite3
606
+ - test/dummy/db/schema.rb
622
607
  - test/dummy/public/404.html
623
608
  - test/dummy/public/422.html
624
- - test/dashboard_controller_test.rb
609
+ - test/dummy/public/500.html
610
+ - test/dummy/public/favicon.ico
611
+ - test/dummy/Rakefile
612
+ - test/dummy/README.rdoc
613
+ - test/dummy/test/fixtures/accounts.yml
614
+ - test/dummy/test/fixtures/comments.yml
615
+ - test/dummy/test/fixtures/contacts.yml
616
+ - test/dummy/test/fixtures/legacy_accounts.yml
617
+ - test/dummy/test/fixtures/projects.yml
618
+ - test/dummy/test/fixtures/users.yml
619
+ - test/dummy/test/models/account_test.rb
620
+ - test/dummy/test/models/comment_test.rb
621
+ - test/dummy/test/models/contact_test.rb
622
+ - test/dummy/test/models/legacy_account_test.rb
623
+ - test/dummy/test/models/project_test.rb
624
+ - test/dummy/test/models/user_test.rb
625
625
  - test/rails_db_data_table_helper_test.rb
626
- - test/database_test.rb
627
- - test/test_sql_sqlite.sql
628
- - test/test_sql_postgres.sql
629
626
  - test/rails_db_test.rb
630
- - test/standalone/Gemfile.lock
631
- - test/standalone/README.rdoc
632
- - test/standalone/Rakefile
633
- - test/standalone/app/assets/javascripts/application.js
634
- - test/standalone/app/assets/stylesheets/bootstrap-theme.min.css
635
- - test/standalone/app/assets/stylesheets/bootstrap.min.css
636
- - test/standalone/app/assets/stylesheets/application.css
627
+ - test/sql_import_test.rb
628
+ - test/sql_query_test.rb
637
629
  - test/standalone/app/assets/fonts/glyphicons-halflings-regular.eot
638
630
  - test/standalone/app/assets/fonts/glyphicons-halflings-regular.svg
639
- - test/standalone/app/assets/fonts/glyphicons-halflings-regular.woff2
640
631
  - test/standalone/app/assets/fonts/glyphicons-halflings-regular.ttf
641
632
  - test/standalone/app/assets/fonts/glyphicons-halflings-regular.woff
633
+ - test/standalone/app/assets/fonts/glyphicons-halflings-regular.woff2
634
+ - test/standalone/app/assets/javascripts/application.js
635
+ - test/standalone/app/assets/stylesheets/application.css
636
+ - test/standalone/app/assets/stylesheets/bootstrap-theme.min.css
637
+ - test/standalone/app/assets/stylesheets/bootstrap.min.css
638
+ - test/standalone/app/controllers/application_controller.rb
639
+ - test/standalone/app/controllers/home_controller.rb
642
640
  - test/standalone/app/helpers/application_helper.rb
643
641
  - test/standalone/app/views/home/index.html.erb
644
642
  - test/standalone/app/views/layouts/application.html.erb
645
- - test/standalone/app/controllers/application_controller.rb
646
- - test/standalone/app/controllers/home_controller.rb
647
- - test/standalone/bin/rake
648
- - test/standalone/bin/setup
649
643
  - test/standalone/bin/bundle
650
644
  - test/standalone/bin/rails
651
- - test/standalone/config/boot.rb
645
+ - test/standalone/bin/rake
646
+ - test/standalone/bin/setup
652
647
  - test/standalone/config/application.rb
648
+ - test/standalone/config/boot.rb
653
649
  - test/standalone/config/database.yml
650
+ - test/standalone/config/environment.rb
651
+ - test/standalone/config/environments/development.rb
654
652
  - test/standalone/config/environments/production.rb
655
653
  - test/standalone/config/environments/test.rb
656
- - test/standalone/config/environments/development.rb
657
- - test/standalone/config/routes.rb
658
- - test/standalone/config/locales/en.yml
659
- - test/standalone/config/secrets.yml
660
- - test/standalone/config/initializers/session_store.rb
654
+ - test/standalone/config/initializers/assets.rb
655
+ - test/standalone/config/initializers/backtrace_silencers.rb
656
+ - test/standalone/config/initializers/cookies_serializer.rb
657
+ - test/standalone/config/initializers/filter_parameter_logging.rb
661
658
  - test/standalone/config/initializers/inflections.rb
662
- - test/standalone/config/initializers/rails_db.rb
663
659
  - test/standalone/config/initializers/mime_types.rb
664
660
  - test/standalone/config/initializers/quiet_assets.rb
661
+ - test/standalone/config/initializers/rails_db.rb
662
+ - test/standalone/config/initializers/session_store.rb
665
663
  - test/standalone/config/initializers/wrap_parameters.rb
666
- - test/standalone/config/initializers/backtrace_silencers.rb
667
- - test/standalone/config/initializers/filter_parameter_logging.rb
668
- - test/standalone/config/initializers/assets.rb
669
- - test/standalone/config/initializers/cookies_serializer.rb
670
- - test/standalone/config/environment.rb
664
+ - test/standalone/config/locales/en.yml
665
+ - test/standalone/config/routes.rb
666
+ - test/standalone/config/secrets.yml
671
667
  - test/standalone/config.ru
672
- - test/standalone/public/500.html
673
- - test/standalone/public/favicon.ico
668
+ - test/standalone/Gemfile
669
+ - test/standalone/Gemfile.lock
674
670
  - test/standalone/public/404.html
675
671
  - test/standalone/public/422.html
676
- - test/standalone/Gemfile
672
+ - test/standalone/public/500.html
673
+ - test/standalone/public/favicon.ico
674
+ - test/standalone/Rakefile
675
+ - test/standalone/README.rdoc
676
+ - test/table_test.rb
677
677
  - test/tables_helper_test.rb
678
678
  - test/test_helper.rb
679
- - test/sql_query_test.rb
679
+ - test/test_sql_mysql.sql
680
+ - test/test_sql_postgres.sql
681
+ - test/test_sql_sqlite.sql