Skip to content

Commit

Permalink
Drop Support for Ruby < 2.1.0 & Rails < 3.2.0
Browse files Browse the repository at this point in the history
Ruby support
------------

According to [these release notes][1.9.3-eol], Ruby versions prior to `2.0.x`
has been end-of-lifed.

Additionally, this codebase makes use of [(required) keyword arguments][kwargs].

From `ember-cli-rails@0.4.0` and on, we will no longer support versions of Ruby
prior to `2.1.0`.

To use `ember-cli-rails` with older versions of Ruby, try the `0.3.x` series.

[kwargs]: https://robots.thoughtbot.com/ruby-2-keyword-arguments
[1.9.3-eol]: https://www.ruby-lang.org/en/news/2015/02/23/support-for-ruby-1-9-3-has-ended/

Rails support
-------------

According to the [Rails Maintenance Policy][version-policy], Rails versions
prior to `3.2.x` have been end-of-lifed. Additionally, the `4.0.x` series no
longer receives bug fixes of any sort.

From `ember-cli-rails@0.4.0` and on, we will no longer support versions of Rails
prior to `3.2.0`, nor will we support the `4.0.x` series of releases.

To use `ember-cli-rails` with older versions of Rails, try the `0.3.x` series.

[version-policy]: http://guides.rubyonrails.org/maintenance_policy.html
  • Loading branch information
seanpdoyle committed Oct 29, 2015
1 parent 2dda73a commit b757a14
Show file tree
Hide file tree
Showing 8 changed files with 51 additions and 21 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ notifications:
rvm:
- 2.2.0
- 2.1.0
- 2.0.0

before_install:
- qmake -version
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
master
------

* Drop support for Ruby `< 2.1.0`
* Introduce `include_ember_index_html` helper

0.3.5
Expand Down
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,34 @@ end

jQuery and Handlebars are the main use cases for this flag.

## Ruby support

According to [these release notes][1.9.3-eol], Ruby versions prior to `2.0.x`
has been end-of-lifed.

Additionally, this codebase makes use of [(required) keyword arguments][kwargs].

From `ember-cli-rails@0.4.0` and on, we will no longer support versions of Ruby
prior to `2.1.0`.

To use `ember-cli-rails` with older versions of Ruby, try the `0.3.x` series.

[kwargs]: https://robots.thoughtbot.com/ruby-2-keyword-arguments
[1.9.3-eol]: https://www.ruby-lang.org/en/news/2015/02/23/support-for-ruby-1-9-3-has-ended/

## Rails support

According to the [Rails Maintenance Policy][version-policy], Rails versions
prior to `3.2.x` have been end-of-lifed. Additionally, the `4.0.x` series no
longer receives bug fixes of any sort.

From `ember-cli-rails@0.4.0` and on, we will no longer support versions of Rails
prior to `3.2.0`, nor will we support the `4.0.x` series of releases.

To use `ember-cli-rails` with older versions of Rails, try the `0.3.x` series.

[version-policy]: http://guides.rubyonrails.org/maintenance_policy.html

## Contributing

See the [CONTRIBUTING] document.
Expand Down
4 changes: 2 additions & 2 deletions app/helpers/ember_rails_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ def include_ember_index_html(name)
render inline: EmberCLI[name].index_html(self)
end

def include_ember_script_tags(name, options={})
def include_ember_script_tags(name, **options)
javascript_include_tag *EmberCLI[name].exposed_js_assets, options
end

def include_ember_stylesheet_tags(name, options={})
def include_ember_stylesheet_tags(name, **options)
stylesheet_link_tag *EmberCLI[name].exposed_css_assets, options
end
end
24 changes: 13 additions & 11 deletions lib/ember-cli/app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class BuildError < StandardError; end

delegate :root, to: :paths

def initialize(name, options={})
def initialize(name, **options)
@name, @options = name.to_s, options
@paths = PathSet.new(self)
end
Expand Down Expand Up @@ -254,14 +254,18 @@ def add_assets_to_precompile_list
Rails.configuration.assets.precompile << /\A#{name}\//
end

def command(options={})
watch = ""
if options[:watch]
watch = "--watch"
watch += " --watcher #{watcher}" if watcher
def command(watch: false)
watch_flag = ""

if watch
watch_flag = "--watch"

if watcher
watch_flag += " --watcher #{watcher}"
end
end

"#{ember_path} build #{watch} --environment #{environment} --output-path #{dist_path} #{log_pipe}"
"#{ember_path} build #{watch_flag} --environment #{environment} --output-path #{dist_path} #{log_pipe}"
end

def log_pipe
Expand Down Expand Up @@ -316,11 +320,9 @@ def env_hash
end
end

def exec(cmd, options={})
method_name = options.fetch(:method, :system)

def exec(cmd, method: :system)
Dir.chdir root do
Kernel.public_send(method_name, env_hash, cmd, err: :out)
Kernel.public_send(method, env_hash, cmd, err: :out)
end
end

Expand Down
6 changes: 3 additions & 3 deletions lib/ember-cli/asset_resolver.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module EmberCLI
class AssetResolver
def initialize(options)
@app = options.fetch(:app)
@sprockets = options.fetch(:sprockets)
def initialize(app:, sprockets:)
@app = app
@sprockets = sprockets
end

def resolve_urls(html_content)
Expand Down
2 changes: 1 addition & 1 deletion lib/ember-cli/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module EmberCLI
class Configuration
include Singleton

def app(name, options={})
def app(name, **options)
apps.store name, App.new(name, options)
end

Expand Down
6 changes: 3 additions & 3 deletions lib/ember-cli/html_page.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module EmberCLI
class HtmlPage
def initialize(options)
@content = options.fetch(:content)
@asset_resolver = options.fetch(:asset_resolver)
def initialize(content:, asset_resolver:)
@content = content
@asset_resolver = asset_resolver
end

def render
Expand Down

0 comments on commit b757a14

Please sign in to comment.