rows_controller 2.1.3 → 2.2.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.
Files changed (112) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/rows_controller.rb.bak +88 -0
  3. data/lib/rows/model.rb.bak +30 -0
  4. data/lib/rows/resources.rb.bak +80 -0
  5. data/lib/rows/version.rb +1 -1
  6. data/lib/rows/version.rb.bak +3 -0
  7. metadata +7 -197
  8. data/.gitignore +0 -8
  9. data/.ruby-gemset +0 -1
  10. data/.ruby-version +0 -1
  11. data/.travis.yml +0 -22
  12. data/Appraisals +0 -21
  13. data/Gemfile +0 -14
  14. data/NOTES +0 -87
  15. data/Rakefile +0 -12
  16. data/app/controllers/.keep +0 -0
  17. data/app/views/.keep +0 -0
  18. data/bin/rails +0 -12
  19. data/gemfiles/rails_4.2.0.gemfile +0 -13
  20. data/gemfiles/rails_4.2.4.gemfile +0 -13
  21. data/gemfiles/rails_5.1.gemfile +0 -17
  22. data/gemfiles/rails_5.2.gemfile +0 -17
  23. data/rows_controller.gemspec +0 -25
  24. data/script/rails +0 -8
  25. data/test/.watchr +0 -61
  26. data/test/controllers/order/items_controller_test.rb +0 -64
  27. data/test/controllers/orders_test.rb +0 -96
  28. data/test/controllers/rows_controller_test.rb +0 -52
  29. data/test/controllers/rows_ext_controller_test.rb +0 -25
  30. data/test/dummy3/Rakefile +0 -6
  31. data/test/dummy3/app/controllers/application_controller.rb +0 -3
  32. data/test/dummy3/app/controllers/order/items_controller.rb +0 -8
  33. data/test/dummy3/app/controllers/orders_controller.rb +0 -8
  34. data/test/dummy3/app/models/order.rb +0 -14
  35. data/test/dummy3/app/models/order/item.rb +0 -4
  36. data/test/dummy3/app/views/layouts/application.html.erb +0 -12
  37. data/test/dummy3/app/views/order/items/_form.html.erb +0 -8
  38. data/test/dummy3/app/views/orders/_form.html.erb +0 -8
  39. data/test/dummy3/config.ru +0 -4
  40. data/test/dummy3/config/application.rb +0 -58
  41. data/test/dummy3/config/boot.rb +0 -10
  42. data/test/dummy3/config/database.yml +0 -25
  43. data/test/dummy3/config/environment.rb +0 -5
  44. data/test/dummy3/config/environments/development.rb +0 -37
  45. data/test/dummy3/config/environments/production.rb +0 -67
  46. data/test/dummy3/config/environments/test.rb +0 -37
  47. data/test/dummy3/config/initializers/secret_token.rb +0 -7
  48. data/test/dummy3/config/initializers/session_store.rb +0 -8
  49. data/test/dummy3/config/initializers/wrap_parameters.rb +0 -14
  50. data/test/dummy3/config/routes.rb +0 -9
  51. data/test/dummy3/db/migrate/001_create_orders.rb +0 -9
  52. data/test/dummy3/db/migrate/002_create_order_items.rb +0 -9
  53. data/test/dummy3/db/schema.rb +0 -28
  54. data/test/dummy3/script/rails +0 -6
  55. data/test/dummy4/Rakefile +0 -6
  56. data/test/dummy4/app/controllers/application_controller.rb +0 -3
  57. data/test/dummy4/app/controllers/order/items_controller.rb +0 -8
  58. data/test/dummy4/app/controllers/orders_controller.rb +0 -8
  59. data/test/dummy4/app/models/order.rb +0 -13
  60. data/test/dummy4/app/models/order/item.rb +0 -2
  61. data/test/dummy4/app/views/layouts/application.html.erb +0 -12
  62. data/test/dummy4/app/views/order/items/_form.html.erb +0 -8
  63. data/test/dummy4/app/views/orders/_form.html.erb +0 -8
  64. data/test/dummy4/bin/bundle +0 -3
  65. data/test/dummy4/bin/rails +0 -4
  66. data/test/dummy4/bin/rake +0 -4
  67. data/test/dummy4/bin/setup +0 -29
  68. data/test/dummy4/config.ru +0 -4
  69. data/test/dummy4/config/application.rb +0 -25
  70. data/test/dummy4/config/boot.rb +0 -5
  71. data/test/dummy4/config/database.yml +0 -25
  72. data/test/dummy4/config/environment.rb +0 -5
  73. data/test/dummy4/config/environments/development.rb +0 -41
  74. data/test/dummy4/config/environments/production.rb +0 -79
  75. data/test/dummy4/config/environments/test.rb +0 -42
  76. data/test/dummy4/config/initializers/cookies_serializer.rb +0 -3
  77. data/test/dummy4/config/initializers/filter_parameter_logging.rb +0 -4
  78. data/test/dummy4/config/initializers/session_store.rb +0 -3
  79. data/test/dummy4/config/initializers/wrap_parameters.rb +0 -14
  80. data/test/dummy4/config/routes.rb +0 -9
  81. data/test/dummy4/config/secrets.yml +0 -22
  82. data/test/dummy4/db/migrate/001_create_orders.rb +0 -9
  83. data/test/dummy4/db/migrate/002_create_order_items.rb +0 -9
  84. data/test/dummy4/db/schema.rb +0 -28
  85. data/test/dummy4/log/.keep +0 -0
  86. data/test/dummy5/Rakefile +0 -6
  87. data/test/dummy5/app/controllers/application_controller.rb +0 -3
  88. data/test/dummy5/app/controllers/order/items_controller.rb +0 -8
  89. data/test/dummy5/app/controllers/orders_controller.rb +0 -8
  90. data/test/dummy5/app/models/application_record.rb +0 -3
  91. data/test/dummy5/app/models/order.rb +0 -12
  92. data/test/dummy5/app/models/order/item.rb +0 -2
  93. data/test/dummy5/app/views/layouts/application.html.erb +0 -12
  94. data/test/dummy5/app/views/order/items/_form.html.erb +0 -8
  95. data/test/dummy5/app/views/orders/_form.html.erb +0 -8
  96. data/test/dummy5/bin/rails +0 -9
  97. data/test/dummy5/config.ru +0 -5
  98. data/test/dummy5/config/application.rb +0 -19
  99. data/test/dummy5/config/boot.rb +0 -6
  100. data/test/dummy5/config/database.yml +0 -25
  101. data/test/dummy5/config/environment.rb +0 -5
  102. data/test/dummy5/config/environments/test.rb +0 -42
  103. data/test/dummy5/config/routes.rb +0 -9
  104. data/test/dummy5/config/secrets.yml +0 -32
  105. data/test/dummy5/config/spring.rb +0 -6
  106. data/test/dummy5/db/migrate/001_create_orders.rb +0 -9
  107. data/test/dummy5/db/migrate/002_create_order_items.rb +0 -9
  108. data/test/dummy5/db/schema.rb +0 -27
  109. data/test/dummy5/log/.keep +0 -0
  110. data/test/fixtures/order/items.yml +0 -5
  111. data/test/fixtures/orders.yml +0 -5
  112. data/test/test_helper.rb +0 -31
@@ -1,3 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- Rails.application.config.action_dispatch.cookies_serializer = :json
@@ -1,4 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Configure sensitive parameters which will be filtered from the log file.
4
- Rails.application.config.filter_parameters += [:password]
@@ -1,3 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- Rails.application.config.session_store :cookie_store, key: '_dummy_session'
@@ -1,14 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # This file contains settings for ActionController::ParamsWrapper which
4
- # is enabled by default.
5
-
6
- # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
- ActiveSupport.on_load(:action_controller) do
8
- wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
9
- end
10
-
11
- # To enable root element in JSON for ActiveRecord objects.
12
- # ActiveSupport.on_load(:active_record) do
13
- # self.include_root_in_json = true
14
- # end
@@ -1,9 +0,0 @@
1
- Rails.application.routes.draw do
2
- resources :orders
3
- namespace :order do
4
- resources :items
5
- end
6
-
7
- put '/rows_ext/:id/copy', to: 'orders#copy'
8
- delete '/rows_ext/multi_deletion', to: 'orders#multi_deletion'
9
- end
@@ -1,22 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Your secret key is used for verifying the integrity of signed cookies.
4
- # If you change this key, all old signed cookies will become invalid!
5
-
6
- # Make sure the secret is at least 30 characters and all random,
7
- # no regular words or you'll be exposed to dictionary attacks.
8
- # You can use `rake secret` to generate a secure secret key.
9
-
10
- # Make sure the secrets in this file are kept private
11
- # if you're sharing your code publicly.
12
-
13
- development:
14
- secret_key_base: 1bbbda65cfaef631237017a4cb880b529b7e0de4e0ff541bbf6bcf85d70ab4ec5d1925fbf426423a29e8e50b71ce196f0fb65c4ee6bbbd6ded999a3ddf922fd9
15
-
16
- test:
17
- secret_key_base: cf224a954c393736fe6b57f436e5873d034dda3f7dd4d08d5178b09285ac0eea7c459ab323610575232260f56b17a2dea4711e6cafbbe75df4e8ce3e762fed38
18
-
19
- # Do not keep production secrets in the repository,
20
- # instead read values from the environment.
21
- production:
22
- secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
@@ -1,9 +0,0 @@
1
- class CreateOrders < ActiveRecord::Migration
2
- def change
3
- create_table :orders do |t|
4
- t.string :name
5
-
6
- t.timestamps
7
- end
8
- end
9
- end
@@ -1,9 +0,0 @@
1
- class CreateOrderItems < ActiveRecord::Migration
2
- def change
3
- create_table :order_items do |t|
4
- t.string :price
5
-
6
- t.timestamps
7
- end
8
- end
9
- end
@@ -1,28 +0,0 @@
1
- # encoding: UTF-8
2
- # This file is auto-generated from the current state of the database. Instead
3
- # of editing this file, please use the migrations feature of Active Record to
4
- # incrementally modify your database, and then regenerate this schema definition.
5
- #
6
- # Note that this schema.rb definition is the authoritative source for your
7
- # database schema. If you need to create the application database on another
8
- # system, you should be using db:schema:load, not running all the migrations
9
- # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
- # you'll amass, the slower it'll run and the greater likelihood for issues).
11
- #
12
- # It's strongly recommended that you check this file into your version control system.
13
-
14
- ActiveRecord::Schema.define(version: 20151018122938) do
15
-
16
- create_table "order_items", force: :cascade do |t|
17
- t.string "price"
18
- t.datetime "created_at"
19
- t.datetime "updated_at"
20
- end
21
-
22
- create_table "orders", force: :cascade do |t|
23
- t.string "name"
24
- t.datetime "created_at"
25
- t.datetime "updated_at"
26
- end
27
-
28
- end
File without changes
data/test/dummy5/Rakefile DELETED
@@ -1,6 +0,0 @@
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
@@ -1,3 +0,0 @@
1
- class ApplicationController < ActionController::Base
2
- protect_from_forgery with: :exception
3
- end
@@ -1,8 +0,0 @@
1
- class Order::ItemsController < RowsController
2
-
3
- private
4
- def resource_whitelist
5
- %i{ price }
6
- end
7
-
8
- end
@@ -1,8 +0,0 @@
1
- class OrdersController < RowsExtController
2
-
3
- private
4
- def resource_whitelist
5
- %i{ name }
6
- end
7
-
8
- end
@@ -1,3 +0,0 @@
1
- class ApplicationRecord < ActiveRecord::Base
2
- self.abstract_class = true
3
- end
@@ -1,12 +0,0 @@
1
- class Order < ApplicationRecord
2
-
3
- before_save :err
4
-
5
- protected
6
- def err
7
- if name == 'error'
8
- throw :abort
9
- end
10
- end
11
-
12
- end
@@ -1,2 +0,0 @@
1
- class Order::Item < ApplicationRecord
2
- end
@@ -1,12 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>Dummy</title>
5
- <%= csrf_meta_tags %>
6
- </head>
7
- <body>
8
-
9
- <%= yield %>
10
-
11
- </body>
12
- </html>
@@ -1,8 +0,0 @@
1
- <%
2
- # This is a typical form
3
- # Requires f
4
- %>
5
- <div class="field">
6
- <%= f.label :price %><br />
7
- <%= f.text_field :price %>
8
- </div>
@@ -1,8 +0,0 @@
1
- <%
2
- # This is a typical form
3
- # Requires f
4
- %>
5
- <div class="field">
6
- <%= f.label :name %><br />
7
- <%= f.text_field :name %>
8
- </div>
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env ruby
2
- begin
3
- load File.expand_path('../spring', __FILE__)
4
- rescue LoadError => e
5
- raise unless e.message.include?('spring')
6
- end
7
- APP_PATH = File.expand_path('../config/application', __dir__)
8
- require_relative '../config/boot'
9
- require 'rails/commands'
@@ -1,5 +0,0 @@
1
- # This file is used by Rack-based servers to start the application.
2
-
3
- require_relative 'config/environment'
4
-
5
- run Rails.application
@@ -1,19 +0,0 @@
1
- require_relative 'boot'
2
-
3
- require 'rails/all'
4
-
5
- # Require the gems listed in Gemfile, including any gems
6
- # you've limited to :test, :development, or :production.
7
- Bundler.require(*Rails.groups)
8
- require "rows_controller"
9
-
10
- module Dummy
11
- class Application < Rails::Application
12
- # Initialize configuration defaults for originally generated Rails version.
13
- config.load_defaults 5.1
14
-
15
- # Settings in config/environments/* take precedence over those specified here.
16
- # Application configuration should go into files in config/initializers
17
- # -- all .rb files in that directory are automatically loaded.
18
- end
19
- end
@@ -1,6 +0,0 @@
1
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
2
- #ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__)
3
-
4
- require 'bundler/setup' # Set up gems listed in the Gemfile.
5
-
6
- #$:.unshift File.expand_path('../../../../lib', __FILE__)
@@ -1,25 +0,0 @@
1
- # SQLite version 3.x
2
- # gem install sqlite3
3
- #
4
- # Ensure the SQLite 3 gem is defined in your Gemfile
5
- # gem 'sqlite3'
6
- #
7
- default: &default
8
- adapter: sqlite3
9
- pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
10
- timeout: 5000
11
-
12
- development:
13
- <<: *default
14
- database: db/development.sqlite3
15
-
16
- # Warning: The database defined as "test" will be erased and
17
- # re-generated from your development database when you run "rake".
18
- # Do not set this db to the same as development or production.
19
- test:
20
- <<: *default
21
- database: db/test.sqlite3
22
-
23
- production:
24
- <<: *default
25
- database: db/production.sqlite3
@@ -1,5 +0,0 @@
1
- # Load the Rails application.
2
- require_relative 'application'
3
-
4
- # Initialize the Rails application.
5
- Rails.application.initialize!
@@ -1,42 +0,0 @@
1
- Rails.application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb.
3
-
4
- # The test environment is used exclusively to run your application's
5
- # test suite. You never need to work with it otherwise. Remember that
6
- # your test database is "scratch space" for the test suite and is wiped
7
- # and recreated between test runs. Don't rely on the data there!
8
- config.cache_classes = true
9
-
10
- # Do not eager load code on boot. This avoids loading your whole application
11
- # just for the purpose of running a single test. If you are using a tool that
12
- # preloads Rails for running tests, you may have to set it to true.
13
- config.eager_load = false
14
-
15
- # Configure public file server for tests with Cache-Control for performance.
16
- config.public_file_server.enabled = true
17
- config.public_file_server.headers = {
18
- 'Cache-Control' => "public, max-age=#{1.hour.seconds.to_i}"
19
- }
20
-
21
- # Show full error reports and disable caching.
22
- config.consider_all_requests_local = true
23
- config.action_controller.perform_caching = false
24
-
25
- # Raise exceptions instead of rendering exception templates.
26
- config.action_dispatch.show_exceptions = false
27
-
28
- # Disable request forgery protection in test environment.
29
- config.action_controller.allow_forgery_protection = false
30
- config.action_mailer.perform_caching = false
31
-
32
- # Tell Action Mailer not to deliver emails to the real world.
33
- # The :test delivery method accumulates sent emails in the
34
- # ActionMailer::Base.deliveries array.
35
- config.action_mailer.delivery_method = :test
36
-
37
- # Print deprecation notices to the stderr.
38
- config.active_support.deprecation = :stderr
39
-
40
- # Raises error for missing translations
41
- # config.action_view.raise_on_missing_translations = true
42
- end
@@ -1,9 +0,0 @@
1
- Rails.application.routes.draw do
2
- resources :orders
3
- namespace :order do
4
- resources :items
5
- end
6
-
7
- put '/rows_ext/:id/copy', to: 'orders#copy'
8
- delete '/rows_ext/multi_deletion', to: 'orders#multi_deletion'
9
- end
@@ -1,32 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Your secret key is used for verifying the integrity of signed cookies.
4
- # If you change this key, all old signed cookies will become invalid!
5
-
6
- # Make sure the secret is at least 30 characters and all random,
7
- # no regular words or you'll be exposed to dictionary attacks.
8
- # You can use `rails secret` to generate a secure secret key.
9
-
10
- # Make sure the secrets in this file are kept private
11
- # if you're sharing your code publicly.
12
-
13
- # Shared secrets are available across all environments.
14
-
15
- # shared:
16
- # api_key: a1B2c3D4e5F6
17
-
18
- # Environmental secrets are only available for that specific environment.
19
-
20
- development:
21
- secret_key_base: f4208f2fad48e3185e5ce2765e41ecdb510140abf8ab0195a1a53c5428134993976e6ff6085f60962fe995e5f3472737b47502631952c857f2edeb79c2b69553
22
-
23
- test:
24
- secret_key_base: 7201ce8db0b2adba0baefcb61961112d97da542ae97768c2009db79d6c31643eb0df4425b319d8e095fcce7955b0241d77577223110ee5691829a0d683d3880e
25
-
26
- # Do not keep production secrets in the unencrypted secrets file.
27
- # Instead, either read values from the environment.
28
- # Or, use `bin/rails secrets:setup` to configure encrypted secrets
29
- # and move the `production:` environment over there.
30
-
31
- production:
32
- secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
@@ -1,6 +0,0 @@
1
- %w(
2
- .ruby-version
3
- .rbenv-vars
4
- tmp/restart.txt
5
- tmp/caching-dev.txt
6
- ).each { |path| Spring.watch(path) }
@@ -1,9 +0,0 @@
1
- class CreateOrders < ActiveRecord::Migration[5.1]
2
- def change
3
- create_table :orders do |t|
4
- t.string :name
5
-
6
- t.timestamps
7
- end
8
- end
9
- end
@@ -1,9 +0,0 @@
1
- class CreateOrderItems < ActiveRecord::Migration[5.1]
2
- def change
3
- create_table :order_items do |t|
4
- t.string :price
5
-
6
- t.timestamps
7
- end
8
- end
9
- end
@@ -1,27 +0,0 @@
1
- # This file is auto-generated from the current state of the database. Instead
2
- # of editing this file, please use the migrations feature of Active Record to
3
- # incrementally modify your database, and then regenerate this schema definition.
4
- #
5
- # Note that this schema.rb definition is the authoritative source for your
6
- # database schema. If you need to create the application database on another
7
- # system, you should be using db:schema:load, not running all the migrations
8
- # from scratch. The latter is a flawed and unsustainable approach (the more migrations
9
- # you'll amass, the slower it'll run and the greater likelihood for issues).
10
- #
11
- # It's strongly recommended that you check this file into your version control system.
12
-
13
- ActiveRecord::Schema.define(version: 2) do
14
-
15
- create_table "order_items", force: :cascade do |t|
16
- t.string "price"
17
- t.datetime "created_at", null: false
18
- t.datetime "updated_at", null: false
19
- end
20
-
21
- create_table "orders", force: :cascade do |t|
22
- t.string "name"
23
- t.datetime "created_at", null: false
24
- t.datetime "updated_at", null: false
25
- end
26
-
27
- end