Skip to content

Commit a61f249

Browse files
committed
Fix typos and some minor syntax things found by RubyMine inspections
1 parent cf10907 commit a61f249

20 files changed

+35
-41
lines changed

Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ begin
1212
t.pattern = "spec/**/*_spec.rb"
1313
t.rspec_opts =
1414
"--format d"
15-
t.rspec_opts += " --color" if !windows?
15+
t.rspec_opts += " --color" unless windows?
1616
# t.ruby_opts="-w"
1717
end
1818
rescue LoadError # swallow Heroku deploy error

app.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class InstallFest < Sinatra::Application # todo: use Sinatra::Base instead, wi
2525
include Erector::Mixin
2626

2727
# Set available locales in Array of Strings; this is also used when
28-
# checking availability in dynamic locale assigment, so must be as Strings.
28+
# checking availability in dynamic locale assignment, they must be strings.
2929
AVAILABLE_LOCALES = %w(en es)
3030

3131
configure do
@@ -102,7 +102,7 @@ def src
102102
end
103103

104104
def ext
105-
ext = $1 if doc_path.match(/\.(.*)/)
105+
$1 if doc_path.match(/\.(.*)/)
106106
end
107107

108108
def doc_path

lib/contents.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def site_page_files
3232
end
3333

3434
def content_for filename
35-
open("#{site_dir}/#{filename}").read()
35+
open("#{site_dir}/#{filename}").read
3636
end
3737

3838
def subpages_for filename
@@ -45,20 +45,20 @@ def subpages_for filename
4545
content.scan /[^!]\[.*?\]\((.*?)\)/ do |link, _|
4646
next if (link =~ /^http/)
4747
next if (link =~ %r(^//)) # protocol-less absolute links e.g. //google.com
48-
links.push(link) if !links.include? link
48+
links.push(link)
4949
end
5050

5151
# (stepfiles) links of the form: link "next page"
5252
content.scan /link\s*["'](.*?)["']/ do |link, _|
53-
links.push(link) if !links.include? link
53+
links.push(link)
5454
end
5555

5656
# (stepfiles) links of the form: site_desc "some site"
5757
content.scan /site_desc\s*["'](.*?)["']/ do |link, _|
58-
links.push('/' + link) if !links.include? link
58+
links.push('/' + link)
5959
end
6060

61-
links
61+
links.uniq
6262
end
6363

6464
def next_step_for filename

lib/media_wiki.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ def mw2md md
77
gsub(/^\*\*\* /, " * ").
88

99
# square-bullet lists (turn into regular bullets)
10-
gsub(/^\# /, "\n* ").
11-
gsub(/^\#\# /, " * ").
12-
gsub(/^\#\#\# /, " * ").
10+
gsub(/^# /, "\n* ").
11+
gsub(/^## /, " * ").
12+
gsub(/^### /, " * ").
1313

1414
# headings
1515
gsub(/^==== ?(.*)( *====)\s*$/, "### \\1").
@@ -50,7 +50,7 @@ def mw2md md
5050
gsub(/^\{\|(.*)$/) {"<table #{$1}>\n<tr>\n"}.
5151
gsub(/^\|-/, "<tr>").
5252
gsub(/^\|\+(.*)/, "<tr><th>\\1<tr>").
53-
gsub(/^\! /, "<th>").
53+
gsub(/^! /, "<th>").
5454
gsub(/^\| /, "<td>").
5555
gsub(/^\|\}/, "</table>")
5656
end

lib/step.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ def fuzzy_result fuzzed_text
305305
span I18n.t("captions.fuzzy_result")
306306
remaining_text = fuzzed_text
307307
pre do
308-
while match = remaining_text.match(/(.*?){FUZZY}(.*?){\/FUZZY}(.*)/m)
308+
while match = remaining_text.match(/(.*?)\{FUZZY}(.*?)\{\/FUZZY}(.*)/m)
309309
text match[1]
310310
span match[2], :class => 'fuzzy-lightened'
311311
remaining_text = match[3]

public/css/header.scss

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ nav *, nav *:before, nav *:after {
3030
list-style: none;
3131
background-color: #fff;
3232
border: 1px solid #ccc;
33-
border: 1px solid rgba(0, 0, 0, 0.15);
33+
border-color: rgba(0, 0, 0, 0.15);
3434
-webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
3535
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
3636
background-clip: padding-box;
@@ -39,14 +39,13 @@ nav *, nav *:before, nav *:after {
3939

4040
&:before {
4141
content: "";
42-
border-color: transparent transparent white transparent;
4342
position: absolute;
4443
height: 0;
4544
width: 0;
4645
top: -19px;
4746
left: 148px;
48-
border-width: 10px;
49-
border-style: solid;
47+
border: 10px solid transparent;
48+
border-bottom-color: white;
5049
}
5150

5251
li {
@@ -62,7 +61,6 @@ nav *, nav *:before, nav *:after {
6261
padding: 3px 20px;
6362
font-weight: normal;
6463
line-height: 1.428571429;
65-
color: #333;
6664
white-space: nowrap;
6765
}
6866
}
@@ -111,9 +109,7 @@ nav *, nav *:before, nav *:after {
111109
> a {
112110
position: relative;
113111
display: block;
114-
padding: 10px 15px;
115-
padding-top: 15px;
116-
padding-bottom: 15px;
112+
padding: 15px;
117113
line-height: 20px;
118114
}
119115

public/css/step.css

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,7 @@ div.back:before {
163163

164164
table.bordered td,
165165
table.bordered tr {
166-
border-style: solid;
167-
border-width: 1px;
168-
border-color: black;
166+
border: 1px solid black;
169167
padding-left: 5px;
170168
padding-right: 5px;
171169
}

sites/en/frontend/frontend.step

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ message <<-MARKDOWN
22

33
### Goal
44

5-
Our aim is to get you aquainted with HTML, CSS, and JavaScript, the most essential building blocks
5+
Our aim is to get you acquainted with HTML, CSS, and JavaScript, the most essential building blocks
66
of web experiences. You'll create a basic static web page about yourself and possibly deploy
77
it to the web. You'll:
88

sites/en/intermediate-rails/add_other_features_of_your_choosing.step

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Suggestions:
88
* Easy user profile pictures with [Gravatar](https://gravatar.com/).
99
* Add login options with [Omniauth](https://github.com/intridea/omniauth), including Twitter, Facebook, Github, Google, and more.
1010
* Check out the Devise [documentation for integrating with Omniauth](https://github.com/plataformatec/devise/wiki/OmniAuth:-Overview).
11-
* Fiddle with the layout of the show page so it doesnt look bad. If it looks bad. It probably looks great.
11+
* Fiddle with the layout of the show page so it doesn't look bad. If it looks bad. It probably looks great.
1212
* Perhaps fancier post markup with Markdown or something similar.
1313
* Deploy to Heroku and send your message board to all your friends!
1414

sites/en/intermediate-rails/add_pages_to_create_and_look_at_individual_posts.step

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ requirements do
22
message <<-MARKDOWN
33
* The user should be able to create a post with a title, author, date published, and content. The author should be the current user.
44
* The complete post should appear on its own page (aka its show page).
5-
* If the user doesnt submit all required fields, they should see some error messaging, but shouldnt lose any of their work.
5+
* If the user doesn't submit all required fields, they should see some error messaging, but shouldn't lose any of their work.
66
MARKDOWN
77
table do
88
tr do
@@ -50,7 +50,7 @@ message <<-MARKDOWN
5050
* Rails has some built in ways to associate one model with another. See the RailsGuides link above for hints on how to make a user the owner of a post!
5151
* Don't hand code the form! You don't have to! Rails will help. See RailsGuide link above!
5252
* Rails has a built-in way to note when something was stored in the database. Probably handy for showing the date / time a post was created.
53-
* For now, we're going to use the user's email address when displaying a posts's author. You can add names or other identifiers later! (Also, even though you're going to get the current user's email address from the User model, you'll still need a user parameter for your Post resource.)
53+
* For now, we're going to use the user's email address when displaying a post's author. You can add names or other identifiers later! (Also, even though you're going to get the current user's email address from the User model, you'll still need a user parameter for your Post resource.)
5454
* You need a `create` method to store your post data - scroll down a little bit in this section of the Getting Started guide for very helpful information and to see an example of a create method: <http://guides.rubyonrails.org/getting_started.html#creating-new-posts>.
5555
MARKDOWN
5656
end

0 commit comments

Comments
 (0)