1. 27 2月, 2016 1 次提交
  2. 26 2月, 2016 1 次提交
  3. 25 2月, 2016 2 次提交
  4. 24 2月, 2016 1 次提交
  5. 17 2月, 2016 1 次提交
  6. 10 2月, 2016 2 次提交
  7. 04 2月, 2016 2 次提交
  8. 02 2月, 2016 1 次提交
  9. 31 1月, 2016 1 次提交
  10. 30 1月, 2016 1 次提交
    • S
      Add Default Puma Config · 5563c329
      schneems 提交于
      When the `puma` command is run without any configuration options it will detect presence of a `config/puma.rb` file and use that. Currently there is discrepancy between `puma` command and `rails server` but Evan said it would be reasonable to add in reading in config from the default location. I am working on that right now as a feature in puma/puma.
      
      Why do we need this? By default Puma uses 16 threads, and by default ActiveRecord only has 5 threads. Due to the architecture of AR it is guaranteed that if you're running with fewer DB connections than your server has threads you will hit `ActiveRecord::ConnectionTimeoutError ` eventually if your app gets modest amounts of traffic. Since we are providing a default webserver, we should provide reasonable configuration for that webserver.
      
      This PR does a few things, first it sets the default Puma thread count to 5 to mach ActiveRecord's default. It sets the default environment to `"development"` and the default port to 300 so that booting the server with `$ puma` will give you the same default port as `rails server`. It is worth mentioning that by reading in from `PORT` environment variable this config can work with containerized deployments, such as on Heroku. 
      
      We are not using worker processes by default, that way JRuby and windows devs can use this configuration without modification. I went ahead and included a default `on_worker_boot`. It won't be used unless a worker count is specified, that means this config will not use it. Even though it's not being used now It will make someone who wants to try modifying their config to run extra workers easier.
      
      cc/ @pixeltrix
      5563c329
  11. 29 1月, 2016 1 次提交
  12. 23 1月, 2016 1 次提交
  13. 22 1月, 2016 2 次提交
  14. 19 1月, 2016 2 次提交
  15. 31 12月, 2015 1 次提交
  16. 22 12月, 2015 2 次提交
  17. 18 12月, 2015 1 次提交
  18. 17 12月, 2015 1 次提交
  19. 16 12月, 2015 1 次提交
    • G
      Introduce ApplicationRecord, an Active Record layer supertype · 2067fff9
      Genadi Samokovarov 提交于
      It's pretty common for folks to monkey patch `ActiveRecord::Base` to
      work around an issue or introduce extra functionality. Instead of
      shoving even more stuff in `ActiveRecord::Base`, `ApplicationRecord` can
      hold all those custom work the apps may need.
      
      Now, we don't wanna encourage all of the application models to inherit
      from `ActiveRecord::Base`, but we can encourage all the models that do,
      to inherit from `ApplicationRecord`.
      
      Newly generated applications have `app/models/application_record.rb`
      present by default. The model generators are smart enough to recognize
      that newly generated models have to inherit from `ApplicationRecord`,
      but only if it's present.
      2067fff9
  20. 15 12月, 2015 1 次提交
  21. 14 12月, 2015 1 次提交
  22. 30 10月, 2015 1 次提交
  23. 24 9月, 2015 1 次提交
  24. 18 6月, 2015 2 次提交
  25. 30 5月, 2015 1 次提交
    • Y
      Generate a `.keep` file in `tmp` folder · f06ce4c1
      Yoong Kang Lim 提交于
      A lot of scripts assumes the existence of this folder and most would fail if it
      is absent.
      
      One example of this is `rake restart` (before the previous commit) – it tries to
      `touch tmp/restart.txt`, which would fail if `tmp` does not exist, which was the
      case for a freshly-cloned project as `tmp` is `.gitignored` by default.
      
      See #20299.
      
      [Yoong Kang Lim, Sunny Juneja]
      f06ce4c1
  26. 20 4月, 2015 1 次提交
  27. 24 3月, 2015 1 次提交
  28. 19 3月, 2015 1 次提交
  29. 22 2月, 2015 1 次提交
  30. 07 2月, 2015 2 次提交
    • X
      README.rdoc -> README.md for newly generated applications · 89a12c93
      Xavier Noria 提交于
      README.rdoc was generated to support the doc:app task. Now that
      this task is gone we can switch to Markdown, which is nowadays
      a better default.
      89a12c93
    • X
      Remove documentation tasks · cd7cc525
      Xavier Noria 提交于
      This patch removes the tasks doc:app, doc:rails, and doc:guides.
      
      In our experience applications do not generate APIs using doc:app.
      Methods may be certainly documented for maintainers, annotated
      with YARD tags, etc. but that is intended to be read with the
      source code, not in a separate website. Then, teams also have
      typically selected topics written down in Markdown files, or in
      a GitHub wiki... that kind of thing.
      
      If a team absolutely needs to generate application documentation
      for internal purposes, they can still easily write their own task.
      
      Regarding doc:rails and doc:guides, we live in 2015. We are used
      to go to online docs all the time. If you really want access to the
      API offline RubyGems generates it for every Rails component unless
      you tell it not to, and you can checkout the Rails source code to
      read the guides as Markdown, or download them for a Kindle reader.
      
      All in all, maintaining this code does not seem to be worthwhile
      anymore.
      
      As a consequence of this, guides (+3 MB uncompressed) won't be
      distributed with the rails gem anymore. Of course, guides and API
      are going to be still part of releases, since documentation is
      maintained alongside code and tests.
      
      Also, time permitting, this will allow us to experiment with novel
      ways to generate documentation in the Rails docs server, since
      right now we were constrained by being able to generate them in
      the user's environment.
      cd7cc525
  31. 28 1月, 2015 2 次提交