rails_data 1.0.1 → 1.0.2

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.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/app/models/{rails_data/concerns → concerns}/data_cache_service.rb +0 -0
  3. data/app/models/{rails_data/concerns → concerns}/data_export_helper.rb +0 -0
  4. data/app/models/{rails_data/concerns → concerns}/data_import_helper.rb +0 -0
  5. data/app/models/{rails_data/concerns → concerns}/data_import_service.rb +0 -0
  6. data/db/migrate/{20150618053929_create_report_lists.rb → 20150618053929_rails_data_init.rb} +1 -1
  7. data/lib/rails_data/version.rb +1 -1
  8. data/test/dummy/README.md +5 -0
  9. data/test/dummy/Rakefile +6 -0
  10. data/test/dummy/app/assets/config/manifest.js +3 -0
  11. data/test/dummy/app/assets/javascripts/application.js +2 -0
  12. data/test/dummy/app/assets/javascripts/cable.js +13 -0
  13. data/test/dummy/app/assets/stylesheets/application.css +5 -0
  14. data/test/dummy/app/channels/application_cable/channel.rb +4 -0
  15. data/test/dummy/app/channels/application_cable/connection.rb +4 -0
  16. data/test/dummy/app/controllers/admin/base_controller.rb +7 -0
  17. data/test/dummy/app/controllers/application_controller.rb +3 -0
  18. data/test/dummy/app/controllers/home_controller.rb +11 -0
  19. data/test/dummy/app/controllers/my/base_controller.rb +7 -0
  20. data/test/dummy/app/helpers/application_helper.rb +2 -0
  21. data/test/dummy/app/jobs/application_job.rb +2 -0
  22. data/test/dummy/app/mailers/application_mailer.rb +4 -0
  23. data/test/dummy/app/models/application_record.rb +3 -0
  24. data/test/dummy/app/models/user.rb +3 -0
  25. data/test/dummy/app/views/layouts/_navbar.html.erb +18 -0
  26. data/test/dummy/app/views/layouts/_right_menu.html.erb +23 -0
  27. data/test/dummy/app/views/layouts/application.html.erb +19 -0
  28. data/test/dummy/app/views/layouts/mailer.html.erb +13 -0
  29. data/test/dummy/app/views/layouts/mailer.text.erb +1 -0
  30. data/test/dummy/bin/bundle +3 -0
  31. data/test/dummy/bin/rails +4 -0
  32. data/test/dummy/bin/rake +4 -0
  33. data/test/dummy/bin/setup +34 -0
  34. data/test/dummy/bin/update +29 -0
  35. data/test/dummy/config.ru +5 -0
  36. data/test/dummy/config/application.rb +13 -0
  37. data/test/dummy/config/boot.rb +5 -0
  38. data/test/dummy/config/cable.yml +9 -0
  39. data/test/dummy/config/database.yml.mysql +14 -0
  40. data/test/dummy/config/database.yml.sqlite3 +12 -0
  41. data/test/dummy/config/environment.rb +5 -0
  42. data/test/dummy/config/environments/development.rb +54 -0
  43. data/test/dummy/config/environments/production.rb +86 -0
  44. data/test/dummy/config/environments/test.rb +42 -0
  45. data/test/dummy/config/initializers/application_controller_renderer.rb +6 -0
  46. data/test/dummy/config/initializers/assets.rb +6 -0
  47. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  48. data/test/dummy/config/initializers/cookies_serializer.rb +5 -0
  49. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  50. data/test/dummy/config/initializers/inflections.rb +16 -0
  51. data/test/dummy/config/initializers/mime_types.rb +4 -0
  52. data/test/dummy/config/initializers/new_framework_defaults.rb +18 -0
  53. data/test/dummy/config/initializers/session_store.rb +3 -0
  54. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  55. data/test/dummy/config/locales/en.yml +23 -0
  56. data/test/dummy/config/puma.rb +47 -0
  57. data/test/dummy/config/routes.rb +7 -0
  58. data/test/dummy/config/secrets.yml +22 -0
  59. data/test/dummy/config/spring.rb +6 -0
  60. data/test/dummy/db/migrate/20180525090830_create_active_storage_tables.active_storage.rb +26 -0
  61. data/test/dummy/package.json +6 -0
  62. data/test/dummy/public/404.html +67 -0
  63. data/test/dummy/public/422.html +67 -0
  64. data/test/dummy/public/500.html +66 -0
  65. data/test/dummy/public/apple-touch-icon-precomposed.png +0 -0
  66. data/test/dummy/public/apple-touch-icon.png +0 -0
  67. data/test/dummy/public/favicon.ico +0 -0
  68. data/test/dummy/yarn.lock +11 -0
  69. metadata +166 -24
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7ac1e59e3af8b930536884ef0c0ba3e76467dee96096b352973604a00664a26d
4
- data.tar.gz: 1980a0c93b52953beaba7523d1fb2caa2c5dc820e3ae4638838833f77c196090
3
+ metadata.gz: 425c7a3b81ded36ce67cf587dd4860764f7e18fda3c7dc5c503f492608913050
4
+ data.tar.gz: f8e66f35bc4aaf2dd32926a9609f6f9a00eb2e1c2b0c411e51f527fccf589472
5
5
  SHA512:
6
- metadata.gz: '0981e1a019d72281d2da3831fcbf2eb0f8a99d759af7172a1a14fa6715bdb201abbd5221348cab5c3224c30213a9a22dcd1f2387ac3e41ef06a53232120659b9'
7
- data.tar.gz: 2d0a3761770fc897367baec51b740073c8748c698fe91e0da7e627d16927b90fe40c194ad140ef5626e016ea9ac28d4d9ed5b76855edbe41e46bf4c08ae94aa5
6
+ metadata.gz: 122dd9e814e16c429702a8c161ddb5e12bbb55bf8b313de5466d265b32a4886613a7e18060f7598c37592dc79ac0504dc1667d8d3498ea7d63d27fbe44304cf9
7
+ data.tar.gz: f02be6b2959f2961ae12ed333fcff85afe20e64fbdfc948722ac5e7eded739d2fa5c0f385006231af1d9a10310aea28ab1db5e69e3d4a45abc826d08f24c2d9d
@@ -1,4 +1,4 @@
1
- class CreateReportLists < ActiveRecord::Migration
1
+ class RailsDataInit < ActiveRecord::Migration[5.0]
2
2
 
3
3
  def change
4
4
 
@@ -1,3 +1,3 @@
1
1
  module RailsData
2
- VERSION = '1.0.1'
2
+ VERSION = '1.0.2'
3
3
  end
@@ -0,0 +1,5 @@
1
+ # dummy
2
+ 基础rails 项目 for engine test
3
+
4
+ ## Notices
5
+ * Used Sqlite MemoryDB, see https://www.sqlite.org/inmemorydb.html
@@ -0,0 +1,6 @@
1
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
2
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
+
4
+ require_relative 'config/application'
5
+
6
+ Rails.application.load_tasks
@@ -0,0 +1,3 @@
1
+ //= link_tree ../images
2
+ //= link_directory ../javascripts .js
3
+ //= link_directory ../stylesheets .css
@@ -0,0 +1,2 @@
1
+ //= require yigexiangfa_ui/dist/javascripts/semantic
2
+ //= require_tree .
@@ -0,0 +1,13 @@
1
+ // Action Cable provides the framework to deal with WebSockets in Rails.
2
+ // You can generate new channels where WebSocket features live using the rails generate channel command.
3
+ //
4
+ //= require action_cable
5
+ //= require_self
6
+ //= require_tree ./channels
7
+
8
+ (function() {
9
+ this.App || (this.App = {});
10
+
11
+ App.cable = ActionCable.createConsumer();
12
+
13
+ }).call(this);
@@ -0,0 +1,5 @@
1
+ /*
2
+ *= require yigexiangfa_ui/dist/stylesheets/semantic
3
+ *= require_tree .
4
+ *= require_self
5
+ */
@@ -0,0 +1,4 @@
1
+ module ApplicationCable
2
+ class Channel < ActionCable::Channel::Base
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module ApplicationCable
2
+ class Connection < ActionCable::Connection::Base
3
+ end
4
+ end
@@ -0,0 +1,7 @@
1
+ class Admin::BaseController < ApplicationController
2
+
3
+ default_form_builder 'AdminBuilder' do |config|
4
+
5
+ end
6
+
7
+ end
@@ -0,0 +1,3 @@
1
+ class ApplicationController < ActionController::Base
2
+ protect_from_forgery with: :exception
3
+ end
@@ -0,0 +1,11 @@
1
+ class HomeController < ApplicationController
2
+
3
+ def index
4
+
5
+
6
+ head :no_content
7
+ end
8
+
9
+
10
+
11
+ end
@@ -0,0 +1,7 @@
1
+ class My::BaseController < ApplicationController
2
+
3
+ default_form_builder 'MyFormBuilder' do |config|
4
+
5
+ end
6
+
7
+ end
@@ -0,0 +1,2 @@
1
+ module ApplicationHelper
2
+ end
@@ -0,0 +1,2 @@
1
+ class ApplicationJob < ActiveJob::Base
2
+ end
@@ -0,0 +1,4 @@
1
+ class ApplicationMailer < ActionMailer::Base
2
+ default from: 'from@example.com'
3
+ layout 'mailer'
4
+ end
@@ -0,0 +1,3 @@
1
+ class ApplicationRecord < ActiveRecord::Base
2
+ self.abstract_class = true
3
+ end
@@ -0,0 +1,3 @@
1
+ class User < ApplicationRecord
2
+
3
+ end
@@ -0,0 +1,18 @@
1
+ <header class="ui inverted site borderless menu">
2
+ <div class="ui container">
3
+
4
+ <% if current_user %>
5
+ <%= link_to root_path, class: 'item header' do %>
6
+ <span>MDPI</span>
7
+ <% end %>
8
+ <%= link_to 'Team', members_path, class: active_helper(controller: '/members') %>
9
+ <% else %>
10
+ <%= link_to 'MDPI', root_path, class: 'item header' %>
11
+ <% end %>
12
+
13
+ <%= render 'layouts/right_menu' %>
14
+
15
+ </div>
16
+ </header>
17
+
18
+
@@ -0,0 +1,23 @@
1
+ <div class="right menu">
2
+ <%= render partial: 'shared/locales' %>
3
+ <%= render partial: 'the_notify/link' %>
4
+ <% if current_user %>
5
+ <div class="ui simple dropdown item" id="navbar_dropdown">
6
+ <% if current_user.avatar.attached? %>
7
+ <%= image_tag current_user.avatar.variant(resize: '28x28'), class: 'ui avatar image' %>
8
+ <% else %>
9
+ <%= image_tag 'default_avatar.jpg', size: '28x28', class: 'ui avatar image' %>
10
+ <% end %>
11
+ <%= current_user.name %>
12
+ <i class="dropdown icon"></i>
13
+ <div class="menu">
14
+ <%= link_to 'Profile', '/my/profile', class: active_helper(controllers: ['profile']) %>
15
+ <%= link_to 'Logout', logout_path, class: 'item' %>
16
+ </div>
17
+ </div>
18
+ <% else %>
19
+ <%= link_to login_path, class: 'item' do %>
20
+ <i class="icon-user"></i> Login/Join
21
+ <% end %>
22
+ <% end %>
23
+ </div>
@@ -0,0 +1,19 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Dummy</title>
5
+ <%= csrf_meta_tags %>
6
+ <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
7
+ <%= css_load media: 'all' %>
8
+ <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
9
+ <%= js_ready 'data-turbolinks-track': 'reload' %>
10
+ </head>
11
+
12
+ <body>
13
+ <%= render 'layouts/navbar' %>
14
+ <main class="ui container">
15
+ <%= yield %>
16
+ </main>
17
+ <%= js_load %>
18
+ </body>
19
+ </html>
@@ -0,0 +1,13 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
+ <style>
6
+ /* Email styles need to be inline */
7
+ </style>
8
+ </head>
9
+
10
+ <body>
11
+ <%= yield %>
12
+ </body>
13
+ </html>
@@ -0,0 +1 @@
1
+ <%= yield %>
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
+ load Gem.bin_path('bundler', 'bundle')
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ APP_PATH = File.expand_path('../config/application', __dir__)
3
+ require_relative '../config/boot'
4
+ require 'rails/commands'
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ require_relative '../config/boot'
3
+ require 'rake'
4
+ Rake.application.run
@@ -0,0 +1,34 @@
1
+ #!/usr/bin/env ruby
2
+ require 'pathname'
3
+ require 'fileutils'
4
+ include FileUtils
5
+
6
+ # path to your application root.
7
+ APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
8
+
9
+ def system!(*args)
10
+ system(*args) || abort("\n== Command #{args} failed ==")
11
+ end
12
+
13
+ chdir APP_ROOT do
14
+ # This script is a starting point to setup your application.
15
+ # Add necessary setup steps to this file.
16
+
17
+ puts '== Installing dependencies =='
18
+ system! 'gem install bundler --conservative'
19
+ system('bundle check') || system!('bundle install')
20
+
21
+ # puts "\n== Copying sample files =="
22
+ # unless File.exist?('config/database.yml')
23
+ # cp 'config/database.yml.sample', 'config/database.yml'
24
+ # end
25
+
26
+ puts "\n== Preparing database =="
27
+ system! 'bin/rails db:setup'
28
+
29
+ puts "\n== Removing old logs and tempfiles =="
30
+ system! 'bin/rails log:clear tmp:clear'
31
+
32
+ puts "\n== Restarting application server =="
33
+ system! 'bin/rails restart'
34
+ end
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ require 'pathname'
3
+ require 'fileutils'
4
+ include FileUtils
5
+
6
+ # path to your application root.
7
+ APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
8
+
9
+ def system!(*args)
10
+ system(*args) || abort("\n== Command #{args} failed ==")
11
+ end
12
+
13
+ chdir APP_ROOT do
14
+ # This script is a way to update your development environment automatically.
15
+ # Add necessary update steps to this file.
16
+
17
+ puts '== Installing dependencies =='
18
+ system! 'gem install bundler --conservative'
19
+ system('bundle check') || system!('bundle install')
20
+
21
+ puts "\n== Updating database =="
22
+ system! 'bin/rails db:migrate'
23
+
24
+ puts "\n== Removing old logs and tempfiles =="
25
+ system! 'bin/rails log:clear tmp:clear'
26
+
27
+ puts "\n== Restarting application server =="
28
+ system! 'bin/rails restart'
29
+ end
@@ -0,0 +1,5 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require_relative 'config/environment'
4
+
5
+ run Rails.application
@@ -0,0 +1,13 @@
1
+ require_relative 'boot'
2
+
3
+ require 'rails/all'
4
+
5
+ Bundler.require(*Rails.groups)
6
+
7
+ module Dummy
8
+ class Application < Rails::Application
9
+
10
+
11
+
12
+ end
13
+ end
@@ -0,0 +1,5 @@
1
+ # Set up gems listed in the Gemfile.
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../Gemfile', __dir__)
3
+
4
+ require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
5
+ $LOAD_PATH.unshift File.expand_path('../../../lib', __dir__)
@@ -0,0 +1,9 @@
1
+ development:
2
+ adapter: async
3
+
4
+ test:
5
+ adapter: async
6
+
7
+ production:
8
+ adapter: redis
9
+ url: redis://localhost:6379/1
@@ -0,0 +1,14 @@
1
+ default: &default
2
+ adapter: mysql2
3
+ pool: 5
4
+ timeout: 5000
5
+ username: root
6
+ password: root
7
+
8
+ development:
9
+ <<: *default
10
+ database: dummy_development
11
+
12
+ test:
13
+ <<: *default
14
+ database: dummy_test
@@ -0,0 +1,12 @@
1
+ default: &default
2
+ adapter: sqlite3
3
+ pool: 5
4
+ timeout: 5000
5
+
6
+ development:
7
+ <<: *default
8
+ database: db/development.sqlite3
9
+
10
+ test:
11
+ <<: *default
12
+ database: db/test.sqlite3
@@ -0,0 +1,5 @@
1
+ # Load the Rails application.
2
+ require_relative 'application'
3
+
4
+ # Initialize the Rails application.
5
+ Rails.application.initialize!
@@ -0,0 +1,54 @@
1
+ Rails.application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
+
4
+ # In the development environment your application's code is reloaded on
5
+ # every request. This slows down response time but is perfect for development
6
+ # since you don't have to restart the web server when you make code changes.
7
+ config.cache_classes = false
8
+
9
+ # Do not eager load code on boot.
10
+ config.eager_load = false
11
+
12
+ # Show full error reports.
13
+ config.consider_all_requests_local = true
14
+
15
+ # Enable/disable caching. By default caching is disabled.
16
+ if Rails.root.join('tmp/caching-dev.txt').exist?
17
+ config.action_controller.perform_caching = true
18
+
19
+ config.cache_store = :memory_store
20
+ config.public_file_server.headers = {
21
+ 'Cache-Control' => 'public, max-age=172800'
22
+ }
23
+ else
24
+ config.action_controller.perform_caching = false
25
+
26
+ config.cache_store = :null_store
27
+ end
28
+
29
+ # Don't care if the mailer can't send.
30
+ config.action_mailer.raise_delivery_errors = false
31
+
32
+ config.action_mailer.perform_caching = false
33
+
34
+ # Print deprecation notices to the Rails logger.
35
+ config.active_support.deprecation = :log
36
+
37
+ # Raise an error on page load if there are pending migrations.
38
+ config.active_record.migration_error = :page_load
39
+
40
+ # Debug mode disables concatenation and preprocessing of assets.
41
+ # This option may cause significant delays in view rendering with a large
42
+ # number of complex assets.
43
+ config.assets.debug = true
44
+
45
+ # Suppress logger output for asset requests.
46
+ config.assets.quiet = true
47
+
48
+ # Raises error for missing translations
49
+ # config.action_view.raise_on_missing_translations = true
50
+
51
+ # Use an evented file watcher to asynchronously detect changes in source code,
52
+ # routes, locales, etc. This feature depends on the listen gem.
53
+ # config.file_watcher = ActiveSupport::EventedFileUpdateChecker
54
+ end