This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Medium | |
| class PostSerializer < ApplicationSerializer | |
| attributes :title, :description | |
| end | |
| end | |
| describe Medium::PostSerializer do | |
| let(:post) { build :post } | |
| subject { build_serializer post } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "title" : "Hello World", | |
| "description" : "" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "title" : "Hello World", | |
| "description" : null | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Medium | |
| class PostSerializer < ApplicationSerializer | |
| attributes :title, :description | |
| end | |
| end | |
| describe Medium::PostSerializer do | |
| let(:post) { build :post } | |
| subject { build_serializer post } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| { | |
| "name" : "John Doe" | |
| }, | |
| { | |
| "name" : "Jane Doe" | |
| } | |
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "people" : [ | |
| { | |
| "name" : "John Doe" | |
| }, | |
| { | |
| "name" : "Jane Doe" | |
| } | |
| ] | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ApplicationController < ActionController::Base | |
| before_action :authenticate_user! | |
| private | |
| def authenticate_user! | |
| token = params[:token].presence | |
| @current_user = User.find_by(token: token) | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Ember from 'ember'; | |
| export default Ember.Controller.extend({ | |
| appName: 'Ember HABTM' | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| files: | |
| "/tmp/45_nginx_https_rw.sh": | |
| owner: root | |
| group: root | |
| mode: "000644" | |
| content: | | |
| #! /bin/bash | |
| CONFIGURED=`grep -c "return 301 https" /etc/nginx/conf.d/00_elastic_beanstalk_proxy.conf` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| ### BEGIN INIT INFO | |
| # Provides: fastboot | |
| # Required-Start: $local_fs $network $syslog | |
| # Required-Stop: $local_fs $network $syslog | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: Ember Fastboot server. | |
| # Description: Boots up Ember Fastboot from the /var/web/frontend folder targeting the ./dist directory. |