aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix code review commentsJon Moss2016-01-1815-55/+53
| | | | | | | - adapter -> pubsub (re)rename internally - Change variable names to match method names - Add EventMachine `~> 1.0` as a runtime dependency of ActionCable - Refactor dependency loading for adapters
* Add em-hiredis and redis as default Gems for new applicationsJon Moss2016-01-182-0/+20
|
* Small PostgreSQL adapter refactors / cleanupJon Moss2016-01-182-15/+16
| | | | | - Escape the channel name when subscribing in PG - Refactor popping the queue to make it easier to read
* ActionCable::StorageAdapter ==> ActionCable::SubscriptionAdapterJon Moss2016-01-1811-21/+23
|
* All Redis deps are now optional, Postgres --> PostgreSQL adapterJon Moss2016-01-187-15/+17
|
* config_opts => cable, per @kaspthJon Moss2016-01-183-6/+7
|
* Listener no longer needs to be a singletonMatthew Draper2016-01-181-52/+58
| | | | | | | We now only create one adapter instance for the server, so it can hold the listener. This in turn allows the listener to get the PG connection from the adapter, which will be a good place to allow more flexible configuration.
* Tests passing and small refactoringJon Moss2016-01-187-37/+65
|
* Blanket unsubscribe doesn't appear to be usedMatthew Draper2016-01-181-6/+2
|
* Don't execute callbacks on our main listener threadMatthew Draper2016-01-181-1/+1
|
* Pull the action methods directly onto the adapterMatthew Draper2016-01-188-56/+51
|
* Add Postgres adapterJon Moss2016-01-183-0/+111
|
* Refactor storage_adapterJon Moss2016-01-181-11/+3
|
* Adapterize ActionCable storage and extract behaviorJon Moss2016-01-1817-50/+173
|
* Merge pull request #21555 from amitsuroliya/associated_basicsJon Moss2016-01-183-230/+230
|\ | | | | Association Guide replaces Order as example with Author-Book Example …
| * Association Guide replaces Order as example with Author-Book Example [ci skip]amitkumarsuroliya2016-01-183-230/+230
|/ | | fixes #21500
* Merge pull request #22705 from ↵Jon Moss2016-01-181-2/+28
|\ | | | | | | | | RochesterinNYC/add-order-explanation-to-first-last-guides Add clarification about `first` and `last` behavior when using `order` [ci skip]
| * Add clarification about `first` and `last` behavior when using `order` [ci skip]James Wen2015-12-201-2/+28
| |
* | Merge pull request #23088 from prathamesh-sonpatki/update-gemfile-lockSantiago Pastorino2016-01-181-2/+1
|\ \ | | | | | | Checked in changes to Gemfile.lock on latest master
| * | Checked in changes to Gemfile.lock on latest masterPrathamesh Sonpatki2016-01-171-2/+1
| | | | | | | | | | | | - Eventmachine version gets updated when `bundle` is run locally.
* | | Merge pull request #22394 from j-dexx/update_association_basics_guideJon Moss2016-01-181-3/+13
|\ \ \ | | | | | | | | Updated the guides for having a distinct has_many through at the data…
| * | | Updated the guides for having a distinct has_many through at the database levelJames Doyley2016-01-181-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current example add_index :person_articles, :article, unique: true Does not work, the `:article` column does not exist as it will be a join table (based on the prior example) so should use :article_id The documentation seems to suggest that it will allow an article to be added only once to a person via the join table, what actually occurs is that it only allows the article to be added to one person, at which point it should be a `belongs_to` association. Also changed the new example to use readings based on the prior example
* | | | Merge pull request #23096 from HayleyCAnderson/ha-action-cable-docsJon Moss2016-01-181-20/+31
|\ \ \ \ | | | | | | | | | | [ci skip] Improve Action Cable configuration explanations
| * | | | Improve Action Cable configuration explanationsHayley Anderson2016-01-181-20/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Clarify wording around how defaults work * Clarify wording around what formatting versus information is required * Separate consumer configuration section since it is important and wordy * Add additional explanation of options for setting consumer configuration * Consolidate consumer configuration information to reduce confusion
* | | | | Merge pull request #23097 from prathamesh-sonpatki/psql-hstoreYves Senn2016-01-181-0/+4
|\ \ \ \ \ | | | | | | | | | | | | Explain how HStore columns can be queried [ci skip]
| * | | | | Explain how HStore columns can be queried [ci skip]Prathamesh Sonpatki2016-01-181-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | - Fixes #22876.
* | | | | | Merge pull request #23098 from vipulnsward/changelog-passKasper Timm Hansen2016-01-181-2/+2
|\ \ \ \ \ \ | |/ / / / / |/| | | | | Pass through AP CHANGELOG
| * | | | | Pass through AP CHANGELOG [ci skip]Vipul A M2016-01-181-2/+2
|/ / / / /
* | | | | Merge pull request #23085 from maclover7/fix-17030Kasper Timm Hansen2016-01-174-4/+4
|\ \ \ \ \ | | | | | | | | | | | | Remove AV dependence on AP's Mime
| * | | | | Remove ActionView dependence on ActionPack's Mime implementationJon Moss2016-01-174-4/+4
|/ / / / /
* | | | | Merge pull request #23089 from kaspth/better-template-typesKasper Timm Hansen2016-01-171-15/+14
|\ \ \ \ \ | |_|_|/ / |/| | | | Enrich Action View Template types with symbols from Action Dispatch Mime.
| * | | | Store the symbols as an array.Kasper Timm Hansen2016-01-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A Set can't be implicitly converted into an Array: ``` irb(main):012:0> formats = [ :rss ] => [:rss] irb(main):013:0> formats &= SET.symbols TypeError: no implicit conversion of Set into Array from (irb):13:in `&' from (irb):13 from /Users/kasperhansen/.rbenv/versions/2.2.3/bin/irb:11:in `<main>' ``` Besides `Mime::SET.symbols` returns an Array, so we're closer to that.
| * | | | Enrich the SET constant to respond to symbols.Kasper Timm Hansen2016-01-171-1/+5
| | | | | | | | | | | | | | | | | | | | Match `Mime::SET.symbols`.
| * | | | Don't bother looking up the types.Kasper Timm Hansen2016-01-171-3/+3
| | | | | | | | | | | | | | | | | | | | If they aren't symbols, then they aren't likely to be in the set anyway.
| * | | | Replace class attribute with SET constant.Kasper Timm Hansen2016-01-171-3/+2
| | | | | | | | | | | | | | | | | | | | We'll be using this to map over to Action Dispatch's Mime::Set.
| * | | | Remove register abstraction.Kasper Timm Hansen2016-01-171-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | The template types is a private abstraction to fill in basic blanks from Action Dispatch's mime types. As such we can modify the data structure ourselves.
| * | | | Replace delegate calls with standard method defs.Kasper Timm Hansen2016-01-171-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Spares a to_sym call by aliasing to_sym to ref. Then the delegate felt meager for one method; ditch and define method ourselves.
| * | | | Spare to_sym call in `==`.Kasper Timm Hansen2016-01-171-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The @symbol has already been converted to a symbol in initialize, so no need to call to_sym when comparing it. Ditch early return for a simple unless statement.
| * | | | Make ref return the internal symbol.Kasper Timm Hansen2016-01-171-1/+1
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We delegate to_sym to the internal symbol, which we've already called to_sym on in initialize, so we don't need to do that. We also know to_sym will never return a falsy value, so we'll never hit to_s. Just return the symbolized symbol.
* | | | Remove literal? check to fix issue with prefixed optionalseileencodes2016-01-162-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit d993cb3 `build_path` was changed from using `grep` to `find_all` to save array allocations. This change was a little too aggressive in that when the dash comes before the symbol like `/omg-:song` the symbol is skipped. Removing the check for `n.right.left.literal?` fixes this issue, but does add back some allocations. The number of allocations are still well less than before. I've added a regression test to test this behavior for the future. Fixes #23069. Array allocations as of d993cb3: ``` {:T_SYMBOL=>11} {:T_REGEXP=>17} {:T_STRUCT=>6500} {:T_MATCH=>12004} {:T_OBJECT=>91009} {:T_DATA=>100088} {:T_HASH=>114013} {:T_STRING=>159637} {:T_ARRAY=>321056} {:T_IMEMO=>351133} ``` Array allocations after this change: ``` {:T_SYMBOL=>11} {:T_REGEXP=>1017} {:T_STRUCT=>6500} {:T_MATCH=>12004} {:T_DATA=>84092} {:T_OBJECT=>87009} {:T_HASH=>110015} {:T_STRING=>166152} {:T_ARRAY=>322056} {:T_NODE=>343558} ```
* | | | Merge pull request #23008 from tawan/avoid-multiple-default-pathsEileen M. Uchitelle2016-01-162-1/+12
|\ \ \ \ | | | | | | | | | | Avoid multiple default paths to server.pid file
| * | | | Avoid multiple default paths to server.pid fileTawan Sierek2016-01-162-1/+12
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix bug (#22811) that occurs when rails server is started in daemon mode and optional path to the `server.pid` file is omitted. Store default path in a constant instead of evaluating it multiple time using `File.expand_path`. The bug in detail: The server startup procedure crashes, since it tries to open a file at `/tmp/pids/server.pid` instead of `<path to project>/tmp/pids/server.pid`. This bug was introduced in 51211a94bd when Rack was upgraded from version 1.x to 2.x. Since version 2.x, Rack does not memoize the options hash [1], and as a consequence `Rails::Server#default_options` will be evaluated multiple times. The hash returned by `Rails::Server#default_options` holds the default path to the `server.pid` file. The path is generated with the method `File.expand_path`. However, the return value of this method depends on the current working directory [2], which changes once `Process.daemon` is invoked by `Rack::Server#daemonize_app` and the process is detached from the current shell. Close #22811 [1]https://git.io/vzen2 [2]http://ruby-doc.org/core-2.1.5/File.html#method-c-expand_path
* | | | Fix the updated API (this sorts the concurrent-ruby switch with Basecamp)David Heinemeier Hansson2016-01-161-1/+1
| | | |
* | | | Revert "Merge pull request #22977 from rails/revert-22934-master"David Heinemeier Hansson2016-01-1615-36/+46
| | | | | | | | | | | | | | | | | | | | This reverts commit d0393fccffc118a5de37654aa222774b66123393, reversing changes made to 3b7ccadfc1c8dfec61af898167e1300b17f5cf25.
* | | | Merge pull request #20046 from yoongkang/ladidaRafael Mendonça França2016-01-163-1/+20
|\ \ \ \ | | | | | | | | | | | | | | | Use ActiveSupport::SafeBuffer when flushing content_for
| * | | | Use ActiveSupport::SafeBuffer when flushing content_forYoong Kang Lim2015-05-253-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, when content_for is flushed, the content was replaced directly by a new value in ActionView::OutputFlow#set. The problem is this new value passed to the method may not be an instance of ActiveSupport::SafeBuffer. This change forces the value to be set to a new instance of ActiveSupport::SafeBuffer.
* | | | | Merge pull request #20005 from kamipo/default_expression_supportRafael França2016-01-1611-44/+100
|\ \ \ \ \ | | | | | | | | | | | | Add `:expression` option support on the schema default
| * | | | | Fix extract default with CURRENT_TIMESTUMPRyuta Kamizono2016-01-133-2/+24
| | | | | |
| * | | | | Fix extract default with CURRENT_DATERyuta Kamizono2016-01-131-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | The default 'now'::date is CURRENT_DATE.
| * | | | | Add expression support on the schema defaultRyuta Kamizono2016-01-138-39/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Example: create_table :posts do |t| t.datetime :published_at, default: -> { 'NOW()' } end