Trouble running Rake command - "undefined method to_hash" - ruby

To give context, following this tutorial - https://docs.aws.amazon.com/codepipeline/latest/userguide/tutorials-four-stage-pipeline.html
The following is outputted when I perform a rake shell command on my jenkins directory. All of the files are located within the following Github - https://github.com/nd9dy/aws-codepipeline-jenkins-aws-codedeploy_linux/blob/master/Rakefile
rake aborted!
NoMethodError: undefined method `to_hash' for "!!!
%html
%head
%meta{:charset => \"utf-8\"}
%title Sample Deployment
:css
body {
color: #ffffff;
background-color: #007f3f;
font-family: Arial, sans-serif;
font-size: 14px;
}
h1 {
font-size: 500%;
font-weight: normal;
margin-bottom: 0;
}
h2 {
font-size: 200%;
font-weight: normal;
margin-bottom: 0;
}
%body
%div{:align => \"center\"}
%h1 Congratulations!
%h2 You have successfully completed the second tutorial for AWS CodePipeline.
%p
For next steps, read the
%a{:href => \"http://docs.aws.amazon.com/codepipeline/latest/userguide/welcome.html\"} AWS CodePipeline Documentation
":String
Did you mean? to_s

Related

How to correctly show the closing } on rules?

I've been playing with SCSS to try and clean up a new stylesheet I'm working on. I love it so far! Simple, yet powerful. One issue I'm finding though, is the closing } brackets. For example, I'm compiling it with:
sass --watch ./main.scss:../main.css
...and with the following SCSS:
#moreFilterOptionsBtn {
text-align: center;font-size: 1.6em;
a {
background: none;
padding: 0;
}
}
You get:
#moreFilterOptionsBtn {
text-align: center;
font-size: 1.6em; }
#moreFilterOptionsBtn a {
background: none;
padding: 0; }
How can I get it to format it better? ie
#moreFilterOptionsBtn {
text-align: center;
font-size: 1.6em;
}
#moreFilterOptionsBtn a {
background: none;
padding: 0;
}
i.e putting the closing } on a new line, instead of squished up on the end of the rule? For me, this is much more readble!
Thanks
Typical! I just found out about the --style value in CLI:
http://sass-lang.com/documentation/file.SASS_REFERENCE.html#output_style
Just add --style expanded to the end, and it will format correctly:
sass --watch ./main.scss:../main.css --style expanded

Is there a SASS equivalent for this LESS code? Variable with multiple styles

Is there something similar in Sass than I can use to achieve this?
#discount-title:{
text-transform: uppercase;
font-weight: 600;
line-height: 14px;
margin-bottom: 10px;
};
.discount {
#discount-title();
}
They're known as mixins in Sass.
http://sass-lang.com/guide#topic-6
This is how the same code will look in sass:
#mixin discount-title() {
text-transform: uppercase;
font-weight: 600;
line-height: 14px;
margin-bottom: 10px;
}
.discount {
#include discount-title();
}

wakanda database query error when testing in bootstrap.js

I created a new project in wakanda studio 1.1.3, then I created a model called Users with one attribute email of string type.
I passed on a query in my bootstrap.js to check if i am getting any value from the database.
The query command is the following
ds.Users.query({select: "email"});
The model is global access
When i run this is my console i am getting an error
"Some error occurred while parsing:
503 - Service Unavailable body { margin: 0px;
padding: 0px; font: 90% "Lucida Grande", Lucida, Verdana, sans-serif;
} div#title { background-color: #2c4b79; padding: 15px 15px 15px 20px;
margin: 0px; } div#message { padding: 20px; } div#details { padding:
10px; } h2 { color: #fff; font-size: 1.3em; margin: 0; padding: 0; } p
{ padding: 0px; margin: 0px; } 503 - Service Unavailable
"
Can anyone help in this issue
Don't use your bootstrap.js file for testing purposes. Create a new file that is not bootstrapped (ex. test.js, serverside.js, ...) and run (Run Button) a valid query (http://doc.wakanda.org/home2.en.html#/Wakanda-Server-Side-Concepts/Programming-in-Wakanda-Server/Queries-and-Finds.300-720609.en.html) in that file. You will then see the output in the output area:
Query Example:
ds.Users.all();
ds.Users.query('ID > 0');
ds.Users.query('ID > :1', 0);
Inside Wakanda studio:

SASS #at-root directive not compiling

I have the following code in an .scss file:
*[data-toggle="popover"]{
font-weight: bold;
#at-root .list-group-item & {
margin-left: 2rem;
}
}
On http://sassmeister.com it compiles as I want:
*[data-toggle="popover"] {
font-weight: bold;
}
.list-group-item *[data-toggle="popover"] {
margin-left: 2rem;
}
But locally it doesn't do anything with the #at-root directive, so I get:
*[data-toggle="popover"] {
font-weight: bold;
#at-root .list-group-item & {
margin-left: 2rem;
}
}
I'm not sure how to troubleshoot this. I've updated my sass and compass to the latest versions. What else can I do?

How to reference previously defined styles

I am new to sass, and I have h1, h2, h3 defined in a .sass file, and I want to do something like the following:
h1 {
font-size: 25px;
}
.section {
h1 { font-size: h1.font-size - 5px; }
}
I know the syntax is incorrect, but I think you get the gist. Would really appreciate it.
You'll have to store the value in a variable:
$h1-font-size: 25px;
h1 {
font-size: $h1-font-size;
.section & {
font-size: $h1-font-size - 5;
}
}
This'll produce the following CSS:
h1 { font-size: 25px; }
.section h1 { font-size: 20px; }

Resources