Skip to content

Commit 712a3e6

Browse files
committed
Restructure module
* Rename `EmberCLI` to `EmberCli` * Restructure files, moving `ember-cli` to `ember_cli`
1 parent d5b8aca commit 712a3e6

File tree

9 files changed

+29
-29
lines changed

9 files changed

+29
-29
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# EmberCLI::Rails - Deploy Redis
1+
# EmberCli::Deploy::Redis
22

33
[EmberCLI Rails] is an integration story between (surprise suprise) EmberCLI and
44
Rails 3.1 and up.
@@ -36,37 +36,37 @@ This project attempts to streamline the process of pushing and serving
3636
EmberCLI-built static assets.
3737

3838
To integrate with `ember-cli-deploy`'s ["Lightning Fast Deploys"][lightning]
39-
(using the Redis adapter), instantiate an `EmberCLI::Deploy::Redis`
39+
(using the Redis adapter), instantiate an `EmberCli::Deploy::Redis`
4040
in your controller:
4141

4242
```ruby
43-
require "ember-cli/deploy/redis"
43+
require "ember_cli/deploy/redis"
4444

4545
class ApplicationController < ActionController::Base
4646
def index
47-
@deploy = EmberCLI::Deploy::Redis.new(namespace: "frontend")
47+
@deploy = EmberCli::Deploy::Redis.new(namespace: "frontend")
4848

4949
render text: @deploy.html, layout: false
5050
end
5151
end
5252
```
5353

54-
`EmberCLI::Deploy::Redis` takes a `namespace` (the name of your app declared in
54+
`EmberCli::Deploy::Redis` takes a `namespace` (the name of your app declared in
5555
your initializer) and handles all interaction with the Redis instance.
5656

5757
This is great for `staging` and `production` deploys, but introduces an extra
5858
step in the feedback loop during development.
5959

60-
Luckily, `EmberCLI::Deploy::Redis` also accepts an `index_html` override, which
60+
Luckily, `EmberCli::Deploy::Redis` also accepts an `index_html` override, which
6161
will replace the call to the Redis instance. This allows integration with the
6262
normal `ember-cli-rails` workflow:
6363

6464
```ruby
65-
require "ember-cli/deploy/redis"
65+
require "ember_cli/deploy/redis"
6666

6767
class ApplicationController < ActionController::Base
6868
def index
69-
@deploy = EmberCLI::Deploy::Redis.new(
69+
@deploy = EmberCli::Deploy::Redis.new(
7070
namespace: "frontend",
7171
index_html: index_html,
7272
)
@@ -94,11 +94,11 @@ analytics tags:
9494

9595

9696
```ruby
97-
require "ember-cli/deploy"
97+
require "ember_cli/deploy/redis"
9898

9999
class ApplicationController < ActionController::Base
100100
def index
101-
@deploy = EmberCLI::Deploy::Redis.new(
101+
@deploy = EmberCli::Deploy::Redis.new(
102102
namespace: "frontend",
103103
index_html: index_html,
104104
)

ember-cli-rails-deploy-redis.gemspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# coding: utf-8
22
lib = File.expand_path("../lib", __FILE__)
33
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4-
require "ember-cli/deploy/version"
4+
require "ember_cli/deploy/redis/version"
55

66
Gem::Specification.new do |spec|
77
spec.name = "ember-cli-rails-deploy-redis"
8-
spec.version = EmberCLI::Rails::Deploy::VERSION
8+
spec.version = EmberCli::Deploy::Redis::VERSION
99
spec.authors = ["Sean Doyle"]
1010
spec.email = ["sean.p.doyle24@gmail.com"]
1111

lib/ember-cli/deploy/version.rb

Lines changed: 0 additions & 7 deletions
This file was deleted.

lib/ember-cli/deploy/page.rb renamed to lib/ember_cli/deploy/page.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module EmberCLI
1+
module EmberCli
22
module Deploy
33
class Page
44
def initialize(html:)

lib/ember-cli/deploy/redis.rb renamed to lib/ember_cli/deploy/redis.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
require "active_support/core_ext/object/blank"
2-
require "ember-cli/deploy/page"
2+
require "ember_cli/deploy/page"
33
require "redis"
44

5-
module EmberCLI
5+
module EmberCli
66
module Deploy
77
class Redis
88
def initialize(namespace:, index_html: nil, redis_client: build_client)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module EmberCli
2+
module Deploy
3+
class Redis
4+
VERSION = "0.1.0"
5+
end
6+
end
7+
end

spec/lib/ember-cli/deploy/page_spec.rb renamed to spec/lib/ember_cli/deploy/page_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
require "spec_helper"
2-
require "ember-cli/deploy/page"
2+
require "ember_cli/deploy/page"
33

4-
describe EmberCLI::Deploy::Page do
4+
describe EmberCli::Deploy::Page do
55
describe "#build" do
66
it "appends to the body" do
77
page = build_page("<html><body><h1></h1></body></html>")
@@ -28,5 +28,5 @@
2828
end
2929

3030
def build_page(html)
31-
EmberCLI::Deploy::Page.new(html: html)
31+
EmberCli::Deploy::Page.new(html: html)
3232
end

spec/lib/ember-cli/deploy/redis_spec.rb renamed to spec/lib/ember_cli/deploy/redis_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
require "spec_helper"
2-
require "ember-cli/deploy/redis"
2+
require "ember_cli/deploy/redis"
33

4-
describe EmberCLI::Deploy::Redis do
4+
describe EmberCli::Deploy::Redis do
55
describe "#append_to_head" do
66
it "injects the string into the <head> tag" do
77
provided_html = "<html><head><title></title></head></html>"
@@ -85,7 +85,7 @@
8585
end
8686

8787
def build_ember_cli_deploy(index_html: nil)
88-
EmberCLI::Deploy::Redis.new(namespace: namespace, index_html: index_html)
88+
EmberCli::Deploy::Redis.new(namespace: namespace, index_html: index_html)
8989
end
9090

9191
def namespace

spec/spec_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
$LOAD_PATH.unshift File.expand_path("../../lib", __FILE__)
2-
require "ember-cli/deploy/redis"
2+
require "ember_cli/deploy/redis"
33
require "fakeredis"
44
require "climate_control"

0 commit comments

Comments
 (0)