better_record 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. checksums.yaml +4 -4
  2. data/{spec/dummy/app/assets/javascripts → app/assets/javascripts/better_record}/application.js +0 -0
  3. data/app/assets/javascripts/better_record/table_sizes.js +2 -0
  4. data/{spec/dummy/app/assets/stylesheets → app/assets/stylesheets/better_record}/application.css +0 -0
  5. data/app/assets/stylesheets/better_record/table_sizes.css +4 -0
  6. data/app/views/better_record/table_sizes/index.html.erb +34 -0
  7. data/app/views/better_record/table_sizes/show.html.erb +28 -0
  8. data/app/views/layouts/better_record/application.html.erb +16 -0
  9. data/lib/better_record/version.rb +1 -1
  10. data/lib/generators/better_record/setup/USAGE +15 -0
  11. data/lib/generators/better_record/setup/setup_generator.rb +91 -0
  12. data/lib/generators/better_record/setup/templates/gitattributes +20 -0
  13. data/lib/generators/better_record/setup/templates/gitignore +44 -0
  14. data/{spec/dummy/config/initializers/better_record.rb → lib/generators/better_record/setup/templates/initializer.rb} +0 -0
  15. data/lib/generators/better_record/setup/templates/irbrc +7 -0
  16. data/lib/generators/better_record/setup/templates/jsbeautifyrc +18 -0
  17. data/lib/generators/better_record/setup/templates/pryrc +42 -0
  18. data/lib/generators/better_record/setup/templates/rspec +3 -0
  19. data/lib/generators/better_record/setup/templates/ruby-version +1 -0
  20. data/{spec/dummy/lib → lib}/templates/active_record/model/model.rb +0 -0
  21. data/lib/templates/migration/templates/create_table_migration.rb +19 -0
  22. data/{spec/dummy/lib → lib}/templates/rspec/model/model_spec.rb +0 -0
  23. metadata +22 -168
  24. data/spec/dummy/Rakefile +0 -6
  25. data/spec/dummy/app/assets/config/manifest.js +0 -4
  26. data/spec/dummy/app/assets/javascripts/cable.js +0 -13
  27. data/spec/dummy/app/channels/application_cable/channel.rb +0 -4
  28. data/spec/dummy/app/channels/application_cable/connection.rb +0 -4
  29. data/spec/dummy/app/controllers/application_controller.rb +0 -2
  30. data/spec/dummy/app/helpers/application_helper.rb +0 -2
  31. data/spec/dummy/app/jobs/application_job.rb +0 -2
  32. data/spec/dummy/app/mailers/application_mailer.rb +0 -4
  33. data/spec/dummy/app/models/application_record.rb +0 -3
  34. data/spec/dummy/app/models/test_audit.rb +0 -2
  35. data/spec/dummy/app/models/test_custom_audit.rb +0 -2
  36. data/spec/dummy/app/views/layouts/application.html.erb +0 -15
  37. data/spec/dummy/app/views/layouts/mailer.html.erb +0 -13
  38. data/spec/dummy/app/views/layouts/mailer.text.erb +0 -1
  39. data/spec/dummy/bin/bundle +0 -3
  40. data/spec/dummy/bin/rails +0 -4
  41. data/spec/dummy/bin/rake +0 -4
  42. data/spec/dummy/bin/setup +0 -36
  43. data/spec/dummy/bin/update +0 -31
  44. data/spec/dummy/bin/yarn +0 -11
  45. data/spec/dummy/config.ru +0 -5
  46. data/spec/dummy/config/application.rb +0 -19
  47. data/spec/dummy/config/boot.rb +0 -5
  48. data/spec/dummy/config/cable.yml +0 -10
  49. data/spec/dummy/config/database.yml +0 -25
  50. data/spec/dummy/config/environment.rb +0 -5
  51. data/spec/dummy/config/environments/development.rb +0 -61
  52. data/spec/dummy/config/environments/production.rb +0 -94
  53. data/spec/dummy/config/environments/test.rb +0 -46
  54. data/spec/dummy/config/initializers/application_controller_renderer.rb +0 -8
  55. data/spec/dummy/config/initializers/assets.rb +0 -14
  56. data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
  57. data/spec/dummy/config/initializers/content_security_policy.rb +0 -25
  58. data/spec/dummy/config/initializers/cookies_serializer.rb +0 -5
  59. data/spec/dummy/config/initializers/filter_parameter_logging.rb +0 -4
  60. data/spec/dummy/config/initializers/inflections.rb +0 -16
  61. data/spec/dummy/config/initializers/mime_types.rb +0 -4
  62. data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
  63. data/spec/dummy/config/locales/en.yml +0 -33
  64. data/spec/dummy/config/puma.rb +0 -34
  65. data/spec/dummy/config/routes.rb +0 -3
  66. data/spec/dummy/config/spring.rb +0 -6
  67. data/spec/dummy/config/storage.yml +0 -34
  68. data/spec/dummy/db/migrate/20180725233004_create_test_audits.rb +0 -11
  69. data/spec/dummy/db/migrate/20180725233007_create_test_custom_audits.rb +0 -12
  70. data/spec/dummy/db/migrate/20180725235254_create_better_record_db_functions.better_record.rb +0 -95
  71. data/spec/dummy/db/migrate/20180725235255_create_better_record_table_sizes.better_record.rb +0 -25
  72. data/spec/dummy/db/structure.sql +0 -781
  73. data/spec/dummy/log/development.log +0 -2495
  74. data/spec/dummy/log/test.log +0 -197
  75. data/spec/dummy/package.json +0 -5
  76. data/spec/dummy/public/404.html +0 -67
  77. data/spec/dummy/public/422.html +0 -67
  78. data/spec/dummy/public/500.html +0 -66
  79. data/spec/dummy/public/apple-touch-icon-precomposed.png +0 -0
  80. data/spec/dummy/public/apple-touch-icon.png +0 -0
  81. data/spec/dummy/public/favicon.ico +0 -0
  82. data/spec/dummy/spec/factories/test_audits.rb +0 -7
  83. data/spec/dummy/spec/factories/test_custom_audits.rb +0 -8
  84. data/spec/dummy/spec/models/test_audit_spec.rb +0 -5
  85. data/spec/dummy/spec/models/test_custom_audit_spec.rb +0 -5
  86. data/spec/factories/better_record_table_sizes.rb +0 -16
  87. data/spec/factories/test_audits.rb +0 -7
  88. data/spec/factories/test_custom_audits.rb +0 -8
  89. data/spec/lib/generators/better_record/install_generator_test.rb +0 -16
  90. data/spec/method_helper.rb +0 -7
  91. data/spec/method_helper/functions.rb +0 -9
  92. data/spec/method_helper/functions/boolean_column.rb +0 -52
  93. data/spec/method_helper/functions/has_valid_factory.rb +0 -20
  94. data/spec/method_helper/functions/optional_column.rb +0 -17
  95. data/spec/method_helper/functions/required_column.rb +0 -35
  96. data/spec/models/better_record/logged_action_spec.rb +0 -35
  97. data/spec/models/better_record/table_size_spec.rb +0 -26
  98. data/spec/models/test_audit_spec.rb +0 -5
  99. data/spec/models/test_custom_audit_spec.rb +0 -5
  100. data/spec/rails_helper.rb +0 -36
  101. data/spec/tmp/testes +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 13ce1aa3a062c924a936fea3c3fcb1f4e10fba5e775e0af7ff0a23aad74e9cd0
4
- data.tar.gz: b89dc1cbe073de860b99c0389eada900eeab147b775d4fe6887f2a1860b8f248
3
+ metadata.gz: f55b373249d94d0c3897696ebcd255ee63195ad676e6fce7e00d60d6bd042c1c
4
+ data.tar.gz: eec66e18958e1cdd9961220c5bd1992553ecb2b8a6eb4e96f1a7cb295bef574d
5
5
  SHA512:
6
- metadata.gz: 566ba8d84f32b08046359cbccac6edccc2d8e1e1a47598c94a16fbc6c9a4808bc28c56128f546d08f48fc70bd5e6148590ba41224bc7c39336e5a8cc79289dbb
7
- data.tar.gz: 65f4d70fb45fd202dc99e094a1ff4609884d6fcfb3983cdbbd38e990343888ac0ac668d26390b69313499f9507203aa492c8a904421450b0620c30702c102629
6
+ metadata.gz: 1d6cec87644e2201c977029d872a801f7eec6619eccdd705af3b534ddb193c248939923722568fc13af14b23add0f41332d01026bc25c056a7245fe1f1cfbc27
7
+ data.tar.gz: ccdbbb3bea4fd5343e6a8fa1e138f0b3731ea1505299b65421042d01720381213ee9090ab2ba92f4396c1fdd998e26579dc93ebeb3e6159da30b4ee1e2a3824a
@@ -0,0 +1,2 @@
1
+ // Place all the behaviors and hooks related to the matching controller here.
2
+ // All this logic will automatically be available in application.js.
@@ -0,0 +1,4 @@
1
+ /*
2
+ Place all the styles related to the matching controller here.
3
+ They will automatically be included in application.css.
4
+ */
@@ -0,0 +1,34 @@
1
+ <div id="better_record-table_sizes">
2
+ <h1>
3
+ <%= BetterRecord::TableSize.polymorphic_name %> Summary
4
+ </h1>
5
+
6
+ <table style='border-collapse: collapse'>
7
+ <thead>
8
+ <tr style='border-bottom: 1px solid #222'>
9
+ <td style='padding: .5em; border-right: 1px solid #222'>
10
+ Name
11
+ </td>
12
+ <td>
13
+ Total Size
14
+ </td>
15
+ </tr>
16
+ </thead>
17
+ <tbody>
18
+ <% BetterRecord::TableSize.all.each do |table_size| %>
19
+ <%- if table_size.oid == @table_sizes.last.oid -%>
20
+ <tr>
21
+ <%- else -%>
22
+ <tr style="border-bottom: 1px solid #222">
23
+ <%- end -%>
24
+ <td style='padding: .5em; border-right: 1px solid #222'>
25
+ <%= link_to table_size.name, table_size %>
26
+ </td>
27
+ <td style='padding: .5em'>
28
+ <%= table_size.total %>
29
+ </td>
30
+ </tr>
31
+ <% end %>
32
+ </tbody>
33
+ </table>
34
+ </div>
@@ -0,0 +1,28 @@
1
+ <div id="better_record-table_sizes">
2
+ <%= link_to 'Back', table_sizes_path %>
3
+
4
+ <h1>
5
+ <%= @table_size.class.polymorphic_name %> Stats For <%= @table_size.name %>
6
+ </h1>
7
+
8
+ <table style='width: 100%; border-collapse: collapse'>
9
+ <thead>
10
+ <tr style='text-align: center; border-bottom: 1px solid #222'>
11
+ <%- @table_size.default_print.each do |col| -%>
12
+ <td style='border-right: 1px solid #222'>
13
+ <%= col %>
14
+ </td>
15
+ <%- end -%>
16
+ </tr>
17
+ </thead>
18
+ <tbody>
19
+ <tr style='text-align: center'>
20
+ <%- @table_size.default_print.each do |col| -%>
21
+ <td style='border-right: 1px solid #222'>
22
+ <%= @table_size.__send__ col %>
23
+ </td>
24
+ <%- end -%>
25
+ </tr>
26
+ </tbody>
27
+ </table>
28
+ </div>
@@ -0,0 +1,16 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Better record</title>
5
+ <%= csrf_meta_tags %>
6
+ <%= csp_meta_tag %>
7
+
8
+ <%= stylesheet_link_tag "better_record/application", media: "all" %>
9
+ <%= javascript_include_tag "better_record/application" %>
10
+ </head>
11
+ <body>
12
+
13
+ <%= yield %>
14
+
15
+ </body>
16
+ </html>
@@ -1,3 +1,3 @@
1
1
  module BetterRecord
2
- VERSION = '0.2.0'
2
+ VERSION = '0.3.0'
3
3
  end
@@ -0,0 +1,15 @@
1
+ Description:
2
+ Explain the generator
3
+
4
+ Example:
5
+ rails generate better_record:install
6
+
7
+ This will create:
8
+ .gitattributes
9
+ .gitignore
10
+ .irbrc
11
+ .jsbeautifyrc
12
+ .pryrc
13
+ .ruby_version
14
+ db/migrate/TIMESTAMP_create_better_record_db_functions
15
+
@@ -0,0 +1,91 @@
1
+ require 'rails/generators/active_record'
2
+
3
+ class BetterRecord::SetupGenerator < ActiveRecord::Generators::Base
4
+ source_root File.expand_path('templates', __dir__)
5
+
6
+ argument :name, type: :string, default: 'testes'
7
+ class_option :eject, type: :boolean, default: false
8
+
9
+ def copy_migrations
10
+ rake("better_record:install:migrations")
11
+ end
12
+
13
+ def copy_templates
14
+ template 'gitattributes', '.gitattributes'
15
+ template 'gitignore', '.gitignore'
16
+ template 'irbrc', '.irbrc'
17
+ template 'jsbeautifyrc', '.jsbeautifyrc'
18
+ template 'pryrc', '.pryrc'
19
+ template 'rspec', '.rspec'
20
+ template 'ruby-version', '.ruby-version'
21
+ template 'initializer.rb', 'config/initializers/better_record.rb'
22
+ directory "#{BetterRecord::Engine.root}/lib/templates", 'lib/templates'
23
+ template "#{BetterRecord::Engine.root}/spec/method_helper.rb", 'spec/method_helper.rb'
24
+ directory "#{BetterRecord::Engine.root}/spec/method_helper", 'spec/method_helper'
25
+ directory "tasks", 'lib/tasks'
26
+
27
+ eject_files if !!options['eject']
28
+ end
29
+
30
+ def gsub_files
31
+ eager_line = 'config.eager_load_paths += Dir["#{config.root}/lib/modules/**/"]'
32
+ structure_line = 'config.active_record.schema_format'
33
+
34
+ gsub_file 'config/application.rb', /([ \t]*?(#{Regexp.escape(eager_line)}|#{Regexp.escape(structure_line)})[ ='":]*?(rb|sql)?['"]?[ \t0-9\.]*?)\n/mi do |match|
35
+ ""
36
+ end
37
+
38
+ gsub_file 'config/application.rb', /#{Regexp.escape("config.load_defaults")}[ 0-9\.]+\n/mi do |match|
39
+ "#{match} #{eager_line}\n #{structure_line} = :sql"
40
+ end
41
+
42
+ gsub_file 'app/models/application_record.rb', /(#{Regexp.escape("class ApplicationRecord < ActiveRecord::Base")})/mi do |match|
43
+ p match
44
+ "class ApplicationRecord < BetterRecord::Base"
45
+ end
46
+ end
47
+
48
+ def copy_migrations
49
+ rake("better_record:install:migrations")
50
+ end
51
+
52
+ private
53
+ def audit_schema
54
+ @audit_schema ||= options['audit_schema'].presence || 'auditing'
55
+ end
56
+
57
+ def eject_files
58
+ template "#{BetterRecord::Engine.root}/db/postgres-audit-trigger.psql", 'db/postgres-audit-trigger.psql'
59
+ template "#{BetterRecord::Engine.root}/lib/better_record.rb", 'lib/better_record.rb'
60
+ directory "#{BetterRecord::Engine.root}/lib/better_record", 'lib/better_record'
61
+ directory "#{BetterRecord::Engine.root}/config/initializers", 'config/initializers/better_record'
62
+ directory "#{BetterRecord::Engine.root}/app", 'app'
63
+
64
+ gsub_file 'config/application.rb', /[ \t]*?require ['"]better_record['"][ \t0-9\.]*?\n/mi do |match|
65
+ ""
66
+ end
67
+
68
+ r_line = 'require File.join(Rails.root, "lib", "better_record.rb")'
69
+ gsub_file 'config/application.rb', /([ \t]*?#{Regexp.escape(r_line)}[ \t0-9\.]*?)\n/mi do |match|
70
+ ""
71
+ end
72
+
73
+ gsub_file 'config/application.rb', /class Application.*?\n/mi do |match|
74
+ "#{match} #{r_line}\n"
75
+ end
76
+ end
77
+
78
+ def migration_path
79
+ if Rails.version >= '5.0.3'
80
+ db_migrate_path
81
+ else
82
+ @migration_path ||= File.join("db", "migrate")
83
+ end
84
+ end
85
+
86
+ def migration_version
87
+ if Rails.version.start_with? '5'
88
+ "[#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}]"
89
+ end
90
+ end
91
+ end
@@ -0,0 +1,20 @@
1
+ # Automatically normalize line endings for all text-based files
2
+ # http://git-scm.com/docs/gitattributes#_end_of_line_conversion
3
+ * text=auto
4
+
5
+ # For the following file types, normalize line endings to LF on
6
+ # checkin and prevent conversion to CRLF when they are checked out
7
+ # (this is required in order to prevent newline related issues like,
8
+ # for example, after the build script is run)
9
+ .* text eol=lf
10
+ *.css text eol=lf
11
+ *.html text eol=lf
12
+ *.jade text eol=lf
13
+ *.js text eol=lf
14
+ *.json text eol=lf
15
+ *.less text eol=lf
16
+ *.md text eol=lf
17
+ *.rb text eol=lf
18
+ *.sh text eol=lf
19
+ *.txt text eol=lf
20
+ *.xml text eol=lf
@@ -0,0 +1,44 @@
1
+ # See https://help.github.com/articles/ignoring-files for more about ignoring files.
2
+ #
3
+ # If you find yourself ignoring temporary files generated by your text editor
4
+ # or operating system, you probably want to add a global ignore instead:
5
+ # git config --global core.excludesfile '~/.gitignore_global'
6
+
7
+ # Ignore bundler config.
8
+ /.bundle
9
+ # Ignore the default SQLite database.
10
+ /db/*.sqlite3
11
+ /db/*.sqlite3-journal
12
+
13
+ # Ignore all logfiles and tempfiles.
14
+ /log/*
15
+ /tmp/*
16
+ !/log/.keep
17
+ !/tmp/.keep
18
+
19
+ # Ignore uploaded files in development and files that will be compiled in production
20
+ /public/*
21
+ /storage/*
22
+ !/public/.keep
23
+ !/storage/.keep
24
+
25
+ .byebug_history
26
+
27
+ # Ignore master key for decrypting credentials and more.
28
+ *.key
29
+ *.env
30
+ *.env.*
31
+ !*.env.base
32
+
33
+
34
+ /**/node_modules/
35
+ /**/node_modules/*
36
+ /**/coverage/
37
+ /**/coverage/*
38
+ /**/build/
39
+ /**/build/*
40
+ *.lock
41
+ *.DS_Store
42
+ *.log*
43
+ *.rdb
44
+ !Gemfile.lock
@@ -0,0 +1,7 @@
1
+ begin
2
+ require "pry"
3
+ Pry.start
4
+ exit
5
+ rescue LoadError => e
6
+ warn "=> Unable to load pry"
7
+ end
@@ -0,0 +1,18 @@
1
+ {
2
+ "indent_size": 2,
3
+ "html": {
4
+ "end_with_newline": true,
5
+ "js": {
6
+ "indent_size": 2
7
+ },
8
+ "css": {
9
+ "indent_size": 2
10
+ }
11
+ },
12
+ "css": {
13
+ "indent_size": 2
14
+ },
15
+ "js": {
16
+ "preserve-newlines": true
17
+ }
18
+ }
@@ -0,0 +1,42 @@
1
+ og_print = Pry.config.print
2
+
3
+ Pry.config.print = proc do |output, value, *args|
4
+ if (ActiveRecord::Base === value) ||
5
+ (ActiveRecord::Relation === value)
6
+ is_relation = ActiveRecord::Relation === value
7
+ base = (is_relation ? value.limit(1).first : value)
8
+ i = 0
9
+ idx = {' #' => ->(*args) { " #{i += 1}" }}
10
+ keys = [
11
+ idx, *(
12
+ (
13
+ base ? (
14
+ (
15
+ (base.class.first).present? &&
16
+ (base.class.first.attributes.keys - base.attributes.keys).present?
17
+ ) ?
18
+ base.attributes.keys :
19
+ (base.class.respond_to?(:default_print) ? base.class.default_print : base.class.column_names)
20
+ ) : (value.klass.respond_to?(:default_print) ? value.klass.default_print : value.klass.column_names)
21
+ )
22
+ )
23
+ ]
24
+ puts "\n"
25
+ if is_relation
26
+ sz = 0
27
+ begin
28
+ tp value, keys if value.size > 0
29
+ sz = value.size
30
+ rescue
31
+ tp value, keys if value.size.size > 0
32
+ sz = value.size.size
33
+ end
34
+ puts "\n #{sz} rows returned" if is_relation
35
+ else
36
+ tp value, keys
37
+ end
38
+ puts "\n"
39
+ else
40
+ og_print.call output, value, *args
41
+ end
42
+ end
@@ -0,0 +1,3 @@
1
+ --color
2
+ --require rails_helper
3
+ --format d
@@ -0,0 +1,19 @@
1
+ class <%= migration_class_name %> < ActiveRecord::Migration
2
+ def change
3
+ create_table :<%= table_name %> do |t|
4
+ <% attributes.each do |attribute| -%>
5
+ <% if attribute.password_digest? -%>
6
+ t.string :password_digest<%= attribute.inject_options %>
7
+ <% else -%>
8
+ t.<%= attribute.type %> :<%= attribute.name %><%= attribute.type == :references ? ', null: false' : '' %><%= attribute.inject_options %>
9
+ <% end -%>
10
+ <% end -%>
11
+ <% if options[:timestamps] %>
12
+ t.timestamps default: -> { 'NOW()' }
13
+ <% end -%>
14
+ end
15
+ <% attributes_with_index.each do |attribute| -%>
16
+ add_index :<%= table_name %>, :<%= attribute.index_name %><%= attribute.inject_index_options %>
17
+ <% end -%>
18
+ end
19
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: better_record
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sampson Crowley
@@ -153,6 +153,10 @@ files:
153
153
  - README.md
154
154
  - Rakefile
155
155
  - app/assets/config/better_record_manifest.js
156
+ - app/assets/javascripts/better_record/application.js
157
+ - app/assets/javascripts/better_record/table_sizes.js
158
+ - app/assets/stylesheets/better_record/application.css
159
+ - app/assets/stylesheets/better_record/table_sizes.css
156
160
  - app/assets/stylesheets/scaffold.css
157
161
  - app/controllers/better_record/application_controller.rb
158
162
  - app/controllers/better_record/table_sizes_controller.rb
@@ -164,6 +168,9 @@ files:
164
168
  - app/models/better_record/current.rb
165
169
  - app/models/better_record/logged_action.rb
166
170
  - app/models/better_record/table_size.rb
171
+ - app/views/better_record/table_sizes/index.html.erb
172
+ - app/views/better_record/table_sizes/show.html.erb
173
+ - app/views/layouts/better_record/application.html.erb
167
174
  - config/initializers/active_record/associations.rb
168
175
  - config/initializers/active_record/money_type.rb
169
176
  - config/initializers/active_record/reflection.rb
@@ -190,90 +197,20 @@ files:
190
197
  - lib/better_record/reflection.rb
191
198
  - lib/better_record/relation.rb
192
199
  - lib/better_record/version.rb
200
+ - lib/generators/better_record/setup/USAGE
201
+ - lib/generators/better_record/setup/setup_generator.rb
202
+ - lib/generators/better_record/setup/templates/gitattributes
203
+ - lib/generators/better_record/setup/templates/gitignore
204
+ - lib/generators/better_record/setup/templates/initializer.rb
205
+ - lib/generators/better_record/setup/templates/irbrc
206
+ - lib/generators/better_record/setup/templates/jsbeautifyrc
207
+ - lib/generators/better_record/setup/templates/pryrc
208
+ - lib/generators/better_record/setup/templates/rspec
209
+ - lib/generators/better_record/setup/templates/ruby-version
193
210
  - lib/tasks/spec/attributes.rake
194
- - spec/dummy/Rakefile
195
- - spec/dummy/app/assets/config/manifest.js
196
- - spec/dummy/app/assets/javascripts/application.js
197
- - spec/dummy/app/assets/javascripts/cable.js
198
- - spec/dummy/app/assets/stylesheets/application.css
199
- - spec/dummy/app/channels/application_cable/channel.rb
200
- - spec/dummy/app/channels/application_cable/connection.rb
201
- - spec/dummy/app/controllers/application_controller.rb
202
- - spec/dummy/app/helpers/application_helper.rb
203
- - spec/dummy/app/jobs/application_job.rb
204
- - spec/dummy/app/mailers/application_mailer.rb
205
- - spec/dummy/app/models/application_record.rb
206
- - spec/dummy/app/models/test_audit.rb
207
- - spec/dummy/app/models/test_custom_audit.rb
208
- - spec/dummy/app/views/layouts/application.html.erb
209
- - spec/dummy/app/views/layouts/mailer.html.erb
210
- - spec/dummy/app/views/layouts/mailer.text.erb
211
- - spec/dummy/bin/bundle
212
- - spec/dummy/bin/rails
213
- - spec/dummy/bin/rake
214
- - spec/dummy/bin/setup
215
- - spec/dummy/bin/update
216
- - spec/dummy/bin/yarn
217
- - spec/dummy/config.ru
218
- - spec/dummy/config/application.rb
219
- - spec/dummy/config/boot.rb
220
- - spec/dummy/config/cable.yml
221
- - spec/dummy/config/database.yml
222
- - spec/dummy/config/environment.rb
223
- - spec/dummy/config/environments/development.rb
224
- - spec/dummy/config/environments/production.rb
225
- - spec/dummy/config/environments/test.rb
226
- - spec/dummy/config/initializers/application_controller_renderer.rb
227
- - spec/dummy/config/initializers/assets.rb
228
- - spec/dummy/config/initializers/backtrace_silencers.rb
229
- - spec/dummy/config/initializers/better_record.rb
230
- - spec/dummy/config/initializers/content_security_policy.rb
231
- - spec/dummy/config/initializers/cookies_serializer.rb
232
- - spec/dummy/config/initializers/filter_parameter_logging.rb
233
- - spec/dummy/config/initializers/inflections.rb
234
- - spec/dummy/config/initializers/mime_types.rb
235
- - spec/dummy/config/initializers/wrap_parameters.rb
236
- - spec/dummy/config/locales/en.yml
237
- - spec/dummy/config/puma.rb
238
- - spec/dummy/config/routes.rb
239
- - spec/dummy/config/spring.rb
240
- - spec/dummy/config/storage.yml
241
- - spec/dummy/db/migrate/20180725233004_create_test_audits.rb
242
- - spec/dummy/db/migrate/20180725233007_create_test_custom_audits.rb
243
- - spec/dummy/db/migrate/20180725235254_create_better_record_db_functions.better_record.rb
244
- - spec/dummy/db/migrate/20180725235255_create_better_record_table_sizes.better_record.rb
245
- - spec/dummy/db/structure.sql
246
- - spec/dummy/lib/templates/active_record/model/model.rb
247
- - spec/dummy/lib/templates/rspec/model/model_spec.rb
248
- - spec/dummy/log/development.log
249
- - spec/dummy/log/test.log
250
- - spec/dummy/package.json
251
- - spec/dummy/public/404.html
252
- - spec/dummy/public/422.html
253
- - spec/dummy/public/500.html
254
- - spec/dummy/public/apple-touch-icon-precomposed.png
255
- - spec/dummy/public/apple-touch-icon.png
256
- - spec/dummy/public/favicon.ico
257
- - spec/dummy/spec/factories/test_audits.rb
258
- - spec/dummy/spec/factories/test_custom_audits.rb
259
- - spec/dummy/spec/models/test_audit_spec.rb
260
- - spec/dummy/spec/models/test_custom_audit_spec.rb
261
- - spec/factories/better_record_table_sizes.rb
262
- - spec/factories/test_audits.rb
263
- - spec/factories/test_custom_audits.rb
264
- - spec/lib/generators/better_record/install_generator_test.rb
265
- - spec/method_helper.rb
266
- - spec/method_helper/functions.rb
267
- - spec/method_helper/functions/boolean_column.rb
268
- - spec/method_helper/functions/has_valid_factory.rb
269
- - spec/method_helper/functions/optional_column.rb
270
- - spec/method_helper/functions/required_column.rb
271
- - spec/models/better_record/logged_action_spec.rb
272
- - spec/models/better_record/table_size_spec.rb
273
- - spec/models/test_audit_spec.rb
274
- - spec/models/test_custom_audit_spec.rb
275
- - spec/rails_helper.rb
276
- - spec/tmp/testes
211
+ - lib/templates/active_record/model/model.rb
212
+ - lib/templates/migration/templates/create_table_migration.rb
213
+ - lib/templates/rspec/model/model_spec.rb
277
214
  homepage: https://github.com/SampsonCrowley/multi_app_active_record
278
215
  licenses:
279
216
  - MIT
@@ -299,87 +236,4 @@ signing_key:
299
236
  specification_version: 4
300
237
  summary: Fix functions that are lacking in Active record to be compatible with multi-app
301
238
  databases
302
- test_files:
303
- - spec/rails_helper.rb
304
- - spec/method_helper/functions/boolean_column.rb
305
- - spec/method_helper/functions/optional_column.rb
306
- - spec/method_helper/functions/required_column.rb
307
- - spec/method_helper/functions/has_valid_factory.rb
308
- - spec/method_helper/functions.rb
309
- - spec/models/test_audit_spec.rb
310
- - spec/models/test_custom_audit_spec.rb
311
- - spec/models/better_record/table_size_spec.rb
312
- - spec/models/better_record/logged_action_spec.rb
313
- - spec/method_helper.rb
314
- - spec/tmp/testes
315
- - spec/dummy/public/apple-touch-icon-precomposed.png
316
- - spec/dummy/public/404.html
317
- - spec/dummy/public/apple-touch-icon.png
318
- - spec/dummy/public/422.html
319
- - spec/dummy/public/500.html
320
- - spec/dummy/public/favicon.ico
321
- - spec/dummy/config/cable.yml
322
- - spec/dummy/config/initializers/application_controller_renderer.rb
323
- - spec/dummy/config/initializers/wrap_parameters.rb
324
- - spec/dummy/config/initializers/filter_parameter_logging.rb
325
- - spec/dummy/config/initializers/backtrace_silencers.rb
326
- - spec/dummy/config/initializers/better_record.rb
327
- - spec/dummy/config/initializers/content_security_policy.rb
328
- - spec/dummy/config/initializers/mime_types.rb
329
- - spec/dummy/config/initializers/assets.rb
330
- - spec/dummy/config/initializers/cookies_serializer.rb
331
- - spec/dummy/config/initializers/inflections.rb
332
- - spec/dummy/config/database.yml
333
- - spec/dummy/config/environment.rb
334
- - spec/dummy/config/boot.rb
335
- - spec/dummy/config/spring.rb
336
- - spec/dummy/config/application.rb
337
- - spec/dummy/config/puma.rb
338
- - spec/dummy/config/environments/development.rb
339
- - spec/dummy/config/environments/production.rb
340
- - spec/dummy/config/environments/test.rb
341
- - spec/dummy/config/locales/en.yml
342
- - spec/dummy/config/routes.rb
343
- - spec/dummy/config/storage.yml
344
- - spec/dummy/Rakefile
345
- - spec/dummy/spec/models/test_audit_spec.rb
346
- - spec/dummy/spec/models/test_custom_audit_spec.rb
347
- - spec/dummy/spec/factories/test_audits.rb
348
- - spec/dummy/spec/factories/test_custom_audits.rb
349
- - spec/dummy/log/test.log
350
- - spec/dummy/log/development.log
351
- - spec/dummy/bin/setup
352
- - spec/dummy/bin/yarn
353
- - spec/dummy/bin/rake
354
- - spec/dummy/bin/update
355
- - spec/dummy/bin/rails
356
- - spec/dummy/bin/bundle
357
- - spec/dummy/db/migrate/20180725233004_create_test_audits.rb
358
- - spec/dummy/db/migrate/20180725233007_create_test_custom_audits.rb
359
- - spec/dummy/db/migrate/20180725235255_create_better_record_table_sizes.better_record.rb
360
- - spec/dummy/db/migrate/20180725235254_create_better_record_db_functions.better_record.rb
361
- - spec/dummy/db/structure.sql
362
- - spec/dummy/app/controllers/application_controller.rb
363
- - spec/dummy/app/models/test_custom_audit.rb
364
- - spec/dummy/app/models/application_record.rb
365
- - spec/dummy/app/models/test_audit.rb
366
- - spec/dummy/app/mailers/application_mailer.rb
367
- - spec/dummy/app/channels/application_cable/channel.rb
368
- - spec/dummy/app/channels/application_cable/connection.rb
369
- - spec/dummy/app/helpers/application_helper.rb
370
- - spec/dummy/app/assets/javascripts/cable.js
371
- - spec/dummy/app/assets/javascripts/application.js
372
- - spec/dummy/app/assets/config/manifest.js
373
- - spec/dummy/app/assets/stylesheets/application.css
374
- - spec/dummy/app/views/layouts/application.html.erb
375
- - spec/dummy/app/views/layouts/mailer.html.erb
376
- - spec/dummy/app/views/layouts/mailer.text.erb
377
- - spec/dummy/app/jobs/application_job.rb
378
- - spec/dummy/config.ru
379
- - spec/dummy/lib/templates/rspec/model/model_spec.rb
380
- - spec/dummy/lib/templates/active_record/model/model.rb
381
- - spec/dummy/package.json
382
- - spec/factories/test_audits.rb
383
- - spec/factories/test_custom_audits.rb
384
- - spec/factories/better_record_table_sizes.rb
385
- - spec/lib/generators/better_record/install_generator_test.rb
239
+ test_files: []