multiparameter_assignable_attr 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 (46) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.md +121 -0
  3. data/Rakefile +38 -0
  4. data/lib/active_record_ext/multiparameter_assignable_attr.rb +34 -0
  5. data/lib/multiparameter_assignable_attr.rb +3 -0
  6. data/lib/multiparameter_assignable_attr/railtie.rb +10 -0
  7. data/lib/multiparameter_assignable_attr/version.rb +3 -0
  8. data/lib/tasks/multiparameter_assignable_attr_tasks.rake +4 -0
  9. data/test/dummy/README.rdoc +261 -0
  10. data/test/dummy/Rakefile +7 -0
  11. data/test/dummy/app/assets/javascripts/application.js +15 -0
  12. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  13. data/test/dummy/app/controllers/application_controller.rb +3 -0
  14. data/test/dummy/app/helpers/application_helper.rb +2 -0
  15. data/test/dummy/app/models/a_model.rb +5 -0
  16. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  17. data/test/dummy/config.ru +4 -0
  18. data/test/dummy/config/application.rb +59 -0
  19. data/test/dummy/config/boot.rb +10 -0
  20. data/test/dummy/config/database.yml +25 -0
  21. data/test/dummy/config/environment.rb +5 -0
  22. data/test/dummy/config/environments/development.rb +37 -0
  23. data/test/dummy/config/environments/production.rb +67 -0
  24. data/test/dummy/config/environments/test.rb +37 -0
  25. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  26. data/test/dummy/config/initializers/inflections.rb +15 -0
  27. data/test/dummy/config/initializers/mime_types.rb +5 -0
  28. data/test/dummy/config/initializers/secret_token.rb +7 -0
  29. data/test/dummy/config/initializers/session_store.rb +8 -0
  30. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  31. data/test/dummy/config/locales/en.yml +5 -0
  32. data/test/dummy/config/routes.rb +58 -0
  33. data/test/dummy/db/development.sqlite3 +0 -0
  34. data/test/dummy/db/migrate/20130127091728_create_schema.rb +9 -0
  35. data/test/dummy/db/schema.rb +22 -0
  36. data/test/dummy/db/test.sqlite3 +0 -0
  37. data/test/dummy/log/development.log +25 -0
  38. data/test/dummy/log/test.log +38 -0
  39. data/test/dummy/public/404.html +26 -0
  40. data/test/dummy/public/422.html +26 -0
  41. data/test/dummy/public/500.html +25 -0
  42. data/test/dummy/public/favicon.ico +0 -0
  43. data/test/dummy/script/rails +6 -0
  44. data/test/multiparameter_assignable_attr_test.rb +7 -0
  45. data/test/test_helper.rb +15 -0
  46. metadata +163 -0
Binary file
@@ -0,0 +1,9 @@
1
+ class CreateSchema < ActiveRecord::Migration
2
+ def change
3
+ create_table :a_models do |t|
4
+ t.datetime :start_date
5
+
6
+ t.timestamps
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,22 @@
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 to check this file into your version control system.
13
+
14
+ ActiveRecord::Schema.define(:version => 20130127091728) do
15
+
16
+ create_table "a_models", :force => true do |t|
17
+ t.datetime "start_date"
18
+ t.datetime "created_at", :null => false
19
+ t.datetime "updated_at", :null => false
20
+ end
21
+
22
+ end
Binary file
@@ -0,0 +1,25 @@
1
+ Connecting to database specified by database.yml
2
+ Connecting to database specified by database.yml
3
+ Connecting to database specified by database.yml
4
+  (0.2ms) select sqlite_version(*)
5
+  (3.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
6
+  (2.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
7
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
8
+ Migrating to CreateSchema (20130127091728)
9
+  (0.0ms) begin transaction
10
+  (0.1ms) rollback transaction
11
+ Connecting to database specified by database.yml
12
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
13
+ Migrating to CreateSchema (20130127091728)
14
+  (0.1ms) select sqlite_version(*)
15
+  (0.0ms) begin transaction
16
+  (0.1ms) rollback transaction
17
+ Connecting to database specified by database.yml
18
+ Connecting to database specified by database.yml
19
+ Connecting to database specified by database.yml
20
+ Connecting to database specified by database.yml
21
+ Connecting to database specified by database.yml
22
+ Connecting to database specified by database.yml
23
+ Connecting to database specified by database.yml
24
+ Connecting to database specified by database.yml
25
+ Connecting to database specified by database.yml
@@ -0,0 +1,38 @@
1
+ Connecting to database specified by database.yml
2
+  (0.2ms) select sqlite_version(*)
3
+  (12.7ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
4
+  (2.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
5
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
6
+ Migrating to CreateSchema (20130127091728)
7
+  (0.0ms) begin transaction
8
+  (0.1ms) rollback transaction
9
+ Connecting to database specified by database.yml
10
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
11
+ Migrating to CreateSchema (20130127091728)
12
+  (0.0ms) select sqlite_version(*)
13
+  (0.1ms) begin transaction
14
+  (1.3ms) CREATE TABLE "a_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "start_date" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
15
+  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130127091728')
16
+  (12.6ms) commit transaction
17
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
18
+ Connecting to database specified by database.yml
19
+ Connecting to database specified by database.yml
20
+ Connecting to database specified by database.yml
21
+ Connecting to database specified by database.yml
22
+ Connecting to database specified by database.yml
23
+ Connecting to database specified by database.yml
24
+ Connecting to database specified by database.yml
25
+ Connecting to database specified by database.yml
26
+ Connecting to database specified by database.yml
27
+ Connecting to database specified by database.yml
28
+ Connecting to database specified by database.yml
29
+ Connecting to database specified by database.yml
30
+ Connecting to database specified by database.yml
31
+ Connecting to database specified by database.yml
32
+ Connecting to database specified by database.yml
33
+ Connecting to database specified by database.yml
34
+ Connecting to database specified by database.yml
35
+ Connecting to database specified by database.yml
36
+ Connecting to database specified by database.yml
37
+ Connecting to database specified by database.yml
38
+ Connecting to database specified by database.yml
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/404.html -->
21
+ <div class="dialog">
22
+ <h1>The page you were looking for doesn't exist.</h1>
23
+ <p>You may have mistyped the address or the page may have moved.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/422.html -->
21
+ <div class="dialog">
22
+ <h1>The change you wanted was rejected.</h1>
23
+ <p>Maybe you tried to change something you didn't have access to.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,25 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/500.html -->
21
+ <div class="dialog">
22
+ <h1>We're sorry, but something went wrong.</h1>
23
+ </div>
24
+ </body>
25
+ </html>
File without changes
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
+
4
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
5
+ require File.expand_path('../../config/boot', __FILE__)
6
+ require 'rails/commands'
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class MultiparameterAssignableAttrTest < ActiveSupport::TestCase
4
+ test "truth" do
5
+ assert_kind_of Module, MultiparameterAssignableAttr
6
+ end
7
+ end
@@ -0,0 +1,15 @@
1
+ # Configure Rails Environment
2
+ ENV["RAILS_ENV"] = "test"
3
+
4
+ require File.expand_path("../dummy/config/environment.rb", __FILE__)
5
+ require "rails/test_help"
6
+
7
+ Rails.backtrace_cleaner.remove_silencers!
8
+
9
+ # Load support files
10
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
11
+
12
+ # Load fixtures from the engine
13
+ if ActiveSupport::TestCase.method_defined?(:fixture_path=)
14
+ ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
15
+ end
metadata ADDED
@@ -0,0 +1,163 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: multiparameter_assignable_attr
3
+ version: !ruby/object:Gem::Version
4
+ version: '0.2'
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - nzaillian
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-01-27 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rails
16
+ requirement: &2154790680 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: 3.2.11
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *2154790680
25
+ - !ruby/object:Gem::Dependency
26
+ name: rspec
27
+ requirement: &2154789980 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '2'
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: *2154789980
36
+ - !ruby/object:Gem::Dependency
37
+ name: sqlite3
38
+ requirement: &2154789240 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
44
+ type: :development
45
+ prerelease: false
46
+ version_requirements: *2154789240
47
+ description: Patch for multiparameter-wise assignment of transient (non-db-backed)
48
+ model attributes.
49
+ email:
50
+ - nzaillian@gmail.com
51
+ executables: []
52
+ extensions: []
53
+ extra_rdoc_files: []
54
+ files:
55
+ - lib/active_record_ext/multiparameter_assignable_attr.rb
56
+ - lib/multiparameter_assignable_attr/railtie.rb
57
+ - lib/multiparameter_assignable_attr/version.rb
58
+ - lib/multiparameter_assignable_attr.rb
59
+ - lib/tasks/multiparameter_assignable_attr_tasks.rake
60
+ - MIT-LICENSE
61
+ - Rakefile
62
+ - README.md
63
+ - test/dummy/app/assets/javascripts/application.js
64
+ - test/dummy/app/assets/stylesheets/application.css
65
+ - test/dummy/app/controllers/application_controller.rb
66
+ - test/dummy/app/helpers/application_helper.rb
67
+ - test/dummy/app/models/a_model.rb
68
+ - test/dummy/app/views/layouts/application.html.erb
69
+ - test/dummy/config/application.rb
70
+ - test/dummy/config/boot.rb
71
+ - test/dummy/config/database.yml
72
+ - test/dummy/config/environment.rb
73
+ - test/dummy/config/environments/development.rb
74
+ - test/dummy/config/environments/production.rb
75
+ - test/dummy/config/environments/test.rb
76
+ - test/dummy/config/initializers/backtrace_silencers.rb
77
+ - test/dummy/config/initializers/inflections.rb
78
+ - test/dummy/config/initializers/mime_types.rb
79
+ - test/dummy/config/initializers/secret_token.rb
80
+ - test/dummy/config/initializers/session_store.rb
81
+ - test/dummy/config/initializers/wrap_parameters.rb
82
+ - test/dummy/config/locales/en.yml
83
+ - test/dummy/config/routes.rb
84
+ - test/dummy/config.ru
85
+ - test/dummy/db/development.sqlite3
86
+ - test/dummy/db/migrate/20130127091728_create_schema.rb
87
+ - test/dummy/db/schema.rb
88
+ - test/dummy/db/test.sqlite3
89
+ - test/dummy/log/development.log
90
+ - test/dummy/log/test.log
91
+ - test/dummy/public/404.html
92
+ - test/dummy/public/422.html
93
+ - test/dummy/public/500.html
94
+ - test/dummy/public/favicon.ico
95
+ - test/dummy/Rakefile
96
+ - test/dummy/README.rdoc
97
+ - test/dummy/script/rails
98
+ - test/multiparameter_assignable_attr_test.rb
99
+ - test/test_helper.rb
100
+ homepage: https://github.com/nzaillian/multiparameter_assignable_attr
101
+ licenses: []
102
+ post_install_message:
103
+ rdoc_options: []
104
+ require_paths:
105
+ - lib
106
+ required_ruby_version: !ruby/object:Gem::Requirement
107
+ none: false
108
+ requirements:
109
+ - - ! '>='
110
+ - !ruby/object:Gem::Version
111
+ version: '0'
112
+ required_rubygems_version: !ruby/object:Gem::Requirement
113
+ none: false
114
+ requirements:
115
+ - - ! '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ requirements: []
119
+ rubyforge_project:
120
+ rubygems_version: 1.8.6
121
+ signing_key:
122
+ specification_version: 3
123
+ summary: Patch for multiparameter-wise assignment of transient (non-db-backed) model
124
+ attributes.
125
+ test_files:
126
+ - test/dummy/app/assets/javascripts/application.js
127
+ - test/dummy/app/assets/stylesheets/application.css
128
+ - test/dummy/app/controllers/application_controller.rb
129
+ - test/dummy/app/helpers/application_helper.rb
130
+ - test/dummy/app/models/a_model.rb
131
+ - test/dummy/app/views/layouts/application.html.erb
132
+ - test/dummy/config/application.rb
133
+ - test/dummy/config/boot.rb
134
+ - test/dummy/config/database.yml
135
+ - test/dummy/config/environment.rb
136
+ - test/dummy/config/environments/development.rb
137
+ - test/dummy/config/environments/production.rb
138
+ - test/dummy/config/environments/test.rb
139
+ - test/dummy/config/initializers/backtrace_silencers.rb
140
+ - test/dummy/config/initializers/inflections.rb
141
+ - test/dummy/config/initializers/mime_types.rb
142
+ - test/dummy/config/initializers/secret_token.rb
143
+ - test/dummy/config/initializers/session_store.rb
144
+ - test/dummy/config/initializers/wrap_parameters.rb
145
+ - test/dummy/config/locales/en.yml
146
+ - test/dummy/config/routes.rb
147
+ - test/dummy/config.ru
148
+ - test/dummy/db/development.sqlite3
149
+ - test/dummy/db/migrate/20130127091728_create_schema.rb
150
+ - test/dummy/db/schema.rb
151
+ - test/dummy/db/test.sqlite3
152
+ - test/dummy/log/development.log
153
+ - test/dummy/log/test.log
154
+ - test/dummy/public/404.html
155
+ - test/dummy/public/422.html
156
+ - test/dummy/public/500.html
157
+ - test/dummy/public/favicon.ico
158
+ - test/dummy/Rakefile
159
+ - test/dummy/README.rdoc
160
+ - test/dummy/script/rails
161
+ - test/multiparameter_assignable_attr_test.rb
162
+ - test/test_helper.rb
163
+ has_rdoc: