friendly_id-method_scopes 0.1.7 → 0.1.8

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.
@@ -5,10 +5,10 @@
5
5
 
6
6
  # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
7
  ActiveSupport.on_load(:action_controller) do
8
- wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
8
+ wrap_parameters format: [:json]
9
9
  end
10
10
 
11
11
  # To enable root element in JSON for ActiveRecord objects.
12
12
  # ActiveSupport.on_load(:active_record) do
13
- # self.include_root_in_json = true
13
+ # self.include_root_in_json = true
14
14
  # end
@@ -0,0 +1,47 @@
1
+ # Puma can serve each request in a thread from an internal thread pool.
2
+ # The `threads` method setting takes two numbers a minimum and maximum.
3
+ # Any libraries that use thread pools should be configured to match
4
+ # the maximum value specified for Puma. Default is set to 5 threads for minimum
5
+ # and maximum, this matches the default thread size of Active Record.
6
+ #
7
+ threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }.to_i
8
+ threads threads_count, threads_count
9
+
10
+ # Specifies the `port` that Puma will listen on to receive requests, default is 3000.
11
+ #
12
+ port ENV.fetch("PORT") { 3000 }
13
+
14
+ # Specifies the `environment` that Puma will run in.
15
+ #
16
+ environment ENV.fetch("RAILS_ENV") { "development" }
17
+
18
+ # Specifies the number of `workers` to boot in clustered mode.
19
+ # Workers are forked webserver processes. If using threads and workers together
20
+ # the concurrency of the application would be max `threads` * `workers`.
21
+ # Workers do not work on JRuby or Windows (both of which do not support
22
+ # processes).
23
+ #
24
+ # workers ENV.fetch("WEB_CONCURRENCY") { 2 }
25
+
26
+ # Use the `preload_app!` method when specifying a `workers` number.
27
+ # This directive tells Puma to first boot the application and load code
28
+ # before forking the application. This takes advantage of Copy On Write
29
+ # process behavior so workers use less memory. If you use this option
30
+ # you need to make sure to reconnect any threads in the `on_worker_boot`
31
+ # block.
32
+ #
33
+ # preload_app!
34
+
35
+ # The code in the `on_worker_boot` will be called if you are using
36
+ # clustered mode by specifying a number of `workers`. After each worker
37
+ # process is booted this block will be run, if you are using `preload_app!`
38
+ # option you will want to use this block to reconnect to any threads
39
+ # or connections that may have been created at application boot, Ruby
40
+ # cannot share connections between processes.
41
+ #
42
+ # on_worker_boot do
43
+ # ActiveRecord::Base.establish_connection if defined?(ActiveRecord)
44
+ # end
45
+
46
+ # Allow puma to be restarted by `rails restart` command.
47
+ plugin :tmp_restart
@@ -5,16 +5,16 @@
5
5
 
6
6
  # Make sure the secret is at least 30 characters and all random,
7
7
  # no regular words or you'll be exposed to dictionary attacks.
8
- # You can use `rake secret` to generate a secure secret key.
8
+ # You can use `rails secret` to generate a secure secret key.
9
9
 
10
10
  # Make sure the secrets in this file are kept private
11
11
  # if you're sharing your code publicly.
12
12
 
13
13
  development:
14
- secret_key_base: 8bec2b9266c0e33fbd7886ce708d2639a7dc79bed4d35cd44976e10e47b08d4db98bfbeb41d6820a5332baf9ac8a34dbd6c84ddefa90940a4ce16b5e4e6e1b25
14
+ secret_key_base: 4f36ed6a91c7affe0fb5d6418806c3fb323d2f8deb642d496dab22c05c0266d7c3e40950d8c86c3273122953a0f8e7b116ede62a792cbd07d0cf3986167db8ac
15
15
 
16
16
  test:
17
- secret_key_base: 464dad9c71f0f4a49173465c056d28b20b8853e5b755da9b31b6f11327af1e60169b3e42fb11ba64764c225ae399a1ca70b380a6b3abe3f4a090dcf370073dec
17
+ secret_key_base: 30f84e19e68c85b4d6fbe54a9f1345ac53f4c7f165496a136b184221849c4fb4bbabfcbaff42d8ac6a23f549fc0141c612c367120e26848d57998010cb6ea7a3
18
18
 
19
19
  # Do not keep production secrets in the repository,
20
20
  # instead read values from the environment.
@@ -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.
@@ -23,10 +22,9 @@ ActiveRecord::Schema.define(version: 20150622182214) do
23
22
  create_table "authors_roles", id: false, force: :cascade do |t|
24
23
  t.integer "author_id"
25
24
  t.integer "role_id"
25
+ t.index ["author_id", "role_id"], name: "index_authors_roles_on_author_id_and_role_id"
26
26
  end
27
27
 
28
- add_index "authors_roles", ["author_id", "role_id"], name: "index_authors_roles_on_author_id_and_role_id"
29
-
30
28
  create_table "books", force: :cascade do |t|
31
29
  t.string "title"
32
30
  t.string "slug"
@@ -36,13 +34,12 @@ ActiveRecord::Schema.define(version: 20150622182214) do
36
34
 
37
35
  create_table "roles", force: :cascade do |t|
38
36
  t.string "name"
39
- t.integer "resource_id"
40
37
  t.string "resource_type"
38
+ t.integer "resource_id"
41
39
  t.datetime "created_at"
42
40
  t.datetime "updated_at"
41
+ t.index ["name", "resource_type", "resource_id"], name: "index_roles_on_name_and_resource_type_and_resource_id"
42
+ t.index ["name"], name: "index_roles_on_name"
43
43
  end
44
44
 
45
- add_index "roles", ["name", "resource_type", "resource_id"], name: "index_roles_on_name_and_resource_type_and_resource_id"
46
- add_index "roles", ["name"], name: "index_roles_on_name"
47
-
48
45
  end
metadata CHANGED
@@ -1,41 +1,47 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: friendly_id-method_scopes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Karen Lundgren
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-23 00:00:00.000000000 Z
11
+ date: 2017-04-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - "<"
18
+ - !ruby/object:Gem::Version
19
+ version: '6'
20
+ - - ">="
18
21
  - !ruby/object:Gem::Version
19
22
  version: '4'
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - "<"
28
+ - !ruby/object:Gem::Version
29
+ version: '6'
30
+ - - ">="
25
31
  - !ruby/object:Gem::Version
26
32
  version: '4'
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: friendly_id
29
35
  requirement: !ruby/object:Gem::Requirement
30
36
  requirements:
31
- - - "~>"
37
+ - - ">="
32
38
  - !ruby/object:Gem::Version
33
39
  version: '5'
34
40
  type: :runtime
35
41
  prerelease: false
36
42
  version_requirements: !ruby/object:Gem::Requirement
37
43
  requirements:
38
- - - "~>"
44
+ - - ">="
39
45
  - !ruby/object:Gem::Version
40
46
  version: '5'
41
47
  - !ruby/object:Gem::Dependency
@@ -98,28 +104,28 @@ dependencies:
98
104
  name: shoulda-matchers
99
105
  requirement: !ruby/object:Gem::Requirement
100
106
  requirements:
101
- - - "~>"
107
+ - - ">="
102
108
  - !ruby/object:Gem::Version
103
109
  version: '2.8'
104
110
  type: :development
105
111
  prerelease: false
106
112
  version_requirements: !ruby/object:Gem::Requirement
107
113
  requirements:
108
- - - "~>"
114
+ - - ">="
109
115
  - !ruby/object:Gem::Version
110
116
  version: '2.8'
111
117
  - !ruby/object:Gem::Dependency
112
118
  name: rolify
113
119
  requirement: !ruby/object:Gem::Requirement
114
120
  requirements:
115
- - - "~>"
121
+ - - ">="
116
122
  - !ruby/object:Gem::Version
117
123
  version: '4'
118
124
  type: :development
119
125
  prerelease: false
120
126
  version_requirements: !ruby/object:Gem::Requirement
121
127
  requirements:
122
- - - "~>"
128
+ - - ">="
123
129
  - !ruby/object:Gem::Version
124
130
  version: '4'
125
131
  - !ruby/object:Gem::Dependency
@@ -192,6 +198,20 @@ dependencies:
192
198
  - - "~>"
193
199
  - !ruby/object:Gem::Version
194
200
  version: '1.4'
201
+ - !ruby/object:Gem::Dependency
202
+ name: rails-controller-testing
203
+ requirement: !ruby/object:Gem::Requirement
204
+ requirements:
205
+ - - ">="
206
+ - !ruby/object:Gem::Version
207
+ version: '1'
208
+ type: :development
209
+ prerelease: false
210
+ version_requirements: !ruby/object:Gem::Requirement
211
+ requirements:
212
+ - - ">="
213
+ - !ruby/object:Gem::Version
214
+ version: '1'
195
215
  description: FriendlyId Extension to allow method scopes, in addition to column and
196
216
  relationship scopes.
197
217
  email: karen.e.lundgren@gmail.com
@@ -237,24 +257,28 @@ files:
237
257
  - spec/dummy/bin/rails
238
258
  - spec/dummy/bin/rake
239
259
  - spec/dummy/bin/setup
260
+ - spec/dummy/bin/update
240
261
  - spec/dummy/config.ru
241
262
  - spec/dummy/config/application.rb
242
263
  - spec/dummy/config/boot.rb
264
+ - spec/dummy/config/cable.yml
243
265
  - spec/dummy/config/database.yml
244
266
  - spec/dummy/config/environment.rb
245
267
  - spec/dummy/config/environments/development.rb
246
- - spec/dummy/config/environments/production.rb
247
268
  - spec/dummy/config/environments/test.rb
269
+ - spec/dummy/config/initializers/application_controller_renderer.rb
248
270
  - spec/dummy/config/initializers/assets.rb
249
271
  - spec/dummy/config/initializers/backtrace_silencers.rb
250
272
  - spec/dummy/config/initializers/cookies_serializer.rb
251
273
  - spec/dummy/config/initializers/filter_parameter_logging.rb
252
274
  - spec/dummy/config/initializers/inflections.rb
253
275
  - spec/dummy/config/initializers/mime_types.rb
276
+ - spec/dummy/config/initializers/new_framework_defaults.rb
254
277
  - spec/dummy/config/initializers/rolify.rb
255
278
  - spec/dummy/config/initializers/session_store.rb
256
279
  - spec/dummy/config/initializers/wrap_parameters.rb
257
280
  - spec/dummy/config/locales/en.yml
281
+ - spec/dummy/config/puma.rb
258
282
  - spec/dummy/config/routes.rb
259
283
  - spec/dummy/config/secrets.yml
260
284
  - spec/dummy/db/migrate/20150621221655_create_books.rb
@@ -264,6 +288,7 @@ files:
264
288
  - spec/dummy/db/seeds.rb
265
289
  - spec/dummy/db/seeds/authors.seeds.rb
266
290
  - spec/dummy/db/seeds/books.seeds.rb
291
+ - spec/dummy/db/test.sqlite3
267
292
  - spec/dummy/lib/assets/.keep
268
293
  - spec/dummy/log/.keep
269
294
  - spec/dummy/public/404.html
@@ -300,7 +325,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
300
325
  version: '0'
301
326
  requirements: []
302
327
  rubyforge_project:
303
- rubygems_version: 2.4.5
328
+ rubygems_version: 2.6.11
304
329
  signing_key:
305
330
  specification_version: 4
306
331
  summary: FriendlyId Extension to allow method scopes.
@@ -1,79 +0,0 @@
1
- Rails.application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb.
3
-
4
- # Code is not reloaded between requests.
5
- config.cache_classes = true
6
-
7
- # Eager load code on boot. This eager loads most of Rails and
8
- # your application in memory, allowing both threaded web servers
9
- # and those relying on copy on write to perform better.
10
- # Rake tasks automatically ignore this option for performance.
11
- config.eager_load = true
12
-
13
- # Full error reports are disabled and caching is turned on.
14
- config.consider_all_requests_local = false
15
- config.action_controller.perform_caching = true
16
-
17
- # Enable Rack::Cache to put a simple HTTP cache in front of your application
18
- # Add `rack-cache` to your Gemfile before enabling this.
19
- # For large-scale production use, consider using a caching reverse proxy like
20
- # NGINX, varnish or squid.
21
- # config.action_dispatch.rack_cache = true
22
-
23
- # Disable serving static files from the `/public` folder by default since
24
- # Apache or NGINX already handles this.
25
- config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
26
-
27
- # Compress JavaScripts and CSS.
28
- config.assets.js_compressor = :uglifier
29
- # config.assets.css_compressor = :sass
30
-
31
- # Do not fallback to assets pipeline if a precompiled asset is missed.
32
- config.assets.compile = false
33
-
34
- # Asset digests allow you to set far-future HTTP expiration dates on all assets,
35
- # yet still be able to expire them through the digest params.
36
- config.assets.digest = true
37
-
38
- # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
39
-
40
- # Specifies the header that your server uses for sending files.
41
- # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
42
- # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
43
-
44
- # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
45
- # config.force_ssl = true
46
-
47
- # Use the lowest log level to ensure availability of diagnostic information
48
- # when problems arise.
49
- config.log_level = :debug
50
-
51
- # Prepend all log lines with the following tags.
52
- # config.log_tags = [ :subdomain, :uuid ]
53
-
54
- # Use a different logger for distributed setups.
55
- # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
56
-
57
- # Use a different cache store in production.
58
- # config.cache_store = :mem_cache_store
59
-
60
- # Enable serving of images, stylesheets, and JavaScripts from an asset server.
61
- # config.action_controller.asset_host = 'http://assets.example.com'
62
-
63
- # Ignore bad email addresses and do not raise email delivery errors.
64
- # Set this to true and configure the email server for immediate delivery to raise delivery errors.
65
- # config.action_mailer.raise_delivery_errors = false
66
-
67
- # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
68
- # the I18n.default_locale when a translation cannot be found).
69
- config.i18n.fallbacks = true
70
-
71
- # Send deprecation notices to registered listeners.
72
- config.active_support.deprecation = :notify
73
-
74
- # Use default logging formatter so that PID and timestamp are not suppressed.
75
- config.log_formatter = ::Logger::Formatter.new
76
-
77
- # Do not dump schema after migrations.
78
- config.active_record.dump_schema_after_migration = false
79
- end