diff --git a/.github/workflows/rspec.yml b/.github/workflows/rspec.yml new file mode 100644 index 000000000..e62589a47 --- /dev/null +++ b/.github/workflows/rspec.yml @@ -0,0 +1,28 @@ +name: RSpec + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + rspec: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + + - name: Install dependencies + run: bundle install + + - name: Run test and linter + run: + bundle exec rake diff --git a/.ruby-version b/.ruby-version index 530cdd91a..be94e6f53 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.2.4 +3.2.2 diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 000000000..f2a971aa7 --- /dev/null +++ b/.tool-versions @@ -0,0 +1 @@ +ruby 3.2.2 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d22fa88f8..000000000 --- a/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: ruby -rvm: - - 2.2.4 -cache: bundler -sudo: false diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e53b2f993..937117101 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -69,7 +69,7 @@ maintainers to love you. :heart:* # It's My First Time on GitHub Ever What Do I Do? -Relax, you came to the right place. In order to contribute you'll need to be +Relax, you came to the right place. In order to contribute, you'll need to be able to familiarize yourself with some concepts from git and GitHub. It's going to be a lot of information, but you're :sparkles:awesome:sparkles:! So you'll be fine. @@ -100,7 +100,7 @@ at . Do it. It's worth it no matter how much git-fu you Also, [Pro Git](http://git-scm.com/book) is a great (and free!) book about Git. -We apologize for how long this document is! Hopefully it addressed +We apologize for how long this document is! Hopefully, it addressed most of your concerns about git, contributing, and GitHub. Feel free to ask more questions on the [railsbridge-workshops](http://groups.google.com/group/railsbridge-workshops) diff --git a/Gemfile b/Gemfile index 142775c8d..32eb465d5 100644 --- a/Gemfile +++ b/Gemfile @@ -1,31 +1,32 @@ source "https://rubygems.org/" -ruby '2.2.4' +ruby '3.2.2' gem 'activesupport' -gem "erector", "~> 0.10.0" -gem "sinatra", "~> 1.4.0" -gem "sinatra-contrib", "~> 1.4.0" +gem "erector", github: "erector/erector" +gem "sinatra" +gem "sinatra-contrib" gem "nokogiri" gem "thin" -gem "eventmachine", "~>1.0.3" gem 'rack-codehighlighter' gem 'coderay' -gem "deckrb", "~> 0.5.2" +gem "deckrb" gem "sass" gem "redcarpet" gem "rubyzip" -gem "i18n", "~> 0.7" +gem "i18n" gem 'font-awesome-sass' gem 'bootstrap-sass' gem 'jquery-cdn' gem 'sprockets' +gem 'ffi' +gem 'backports' group :development do gem "rspec" gem "rerun" gem "rake" gem "rack-test" - gem "files", "~> 0.3.0" + gem 'files', github: "alexch/files" gem 'rb-fsevent', :platform => :ruby end diff --git a/Gemfile.lock b/Gemfile.lock index 1bb062e94..346a686d9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,21 +1,40 @@ +GIT + remote: https://github.com/alexch/files.git + revision: 4938dd85ed79f421b808e8798764661a71cab5a4 + specs: + files (0.4.0) + +GIT + remote: https://github.com/erector/erector.git + revision: 32cb38e3381889295183230caf8bf334d2f0e82a + specs: + erector (0.10.0) + haml + jeweler + nokogiri + sass + treetop (>= 1.2.3) + GEM remote: https://rubygems.org/ specs: - activesupport (4.2.6) - i18n (~> 0.7) - json (~> 1.7, >= 1.7.7) + activesupport (6.0.6.1) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 0.7, < 2) minitest (~> 5.1) - thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) - autoprefixer-rails (6.3.6.2) - execjs - backports (3.6.8) - bootstrap-sass (3.3.6) + zeitwerk (~> 2.2, >= 2.2.2) + addressable (2.4.0) + autoprefixer-rails (10.4.15.0) + execjs (~> 2) + backports (3.23.0) + bootstrap-sass (3.4.1) autoprefixer-rails (>= 5.2.1) - sass (>= 3.3.4) - coderay (1.1.1) - concurrent-ruby (1.0.2) - daemons (1.2.3) + sassc (>= 2.0.0) + builder (3.2.4) + coderay (1.1.3) + concurrent-ruby (1.1.9) + daemons (1.2.4) deckrb (0.5.2) coderay erector (>= 0.9.0) @@ -26,101 +45,157 @@ GEM redcarpet (~> 2) thin trollop - diff-lcs (1.2.5) - erector (0.10.0) - treetop (>= 1.2.3) - eventmachine (1.0.9.1) - execjs (2.7.0) - ffi (1.9.10) - files (0.3.1) - font-awesome-sass (4.6.2) - sass (>= 3.2) - i18n (0.7.0) + descendants_tracker (0.0.4) + thread_safe (~> 0.3, >= 0.3.1) + diff-lcs (1.5.0) + eventmachine (1.2.3) + execjs (2.8.1) + faraday (0.9.2) + multipart-post (>= 1.2, < 3) + ffi (1.15.5) + font-awesome-sass (6.4.2) + sassc (~> 2.0) + git (1.11.0) + rchardet (~> 1.8) + github_api (0.16.0) + addressable (~> 2.4.0) + descendants_tracker (~> 0.0.4) + faraday (~> 0.8, < 0.10) + hashie (>= 3.4) + mime-types (>= 1.16, < 3.0) + oauth2 (~> 1.0) + haml (6.2.3) + temple (>= 0.8.2) + thor + tilt + hashie (5.0.0) + highline (2.1.0) + i18n (0.9.5) + concurrent-ruby (~> 1.0) + jeweler (2.3.9) + builder + bundler + git (>= 1.2.5) + github_api (~> 0.16.0) + highline (>= 1.6.15) + nokogiri (>= 1.5.10) + psych + rake + rdoc + semver2 jquery-cdn (2.2.4) sprockets (>= 2) - json (1.8.3) - listen (3.1.5) + json (2.6.1) + jwt (2.7.1) + listen (3.0.8) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) - ruby_dep (~> 1.2) - mini_portile2 (2.1.0) - minitest (5.9.0) - multi_json (1.12.1) - nokogiri (1.6.8) - mini_portile2 (~> 2.1.0) - pkg-config (~> 1.1.7) - pkg-config (1.1.7) + mime-types (2.99.3) + mini_portile2 (2.8.0) + minitest (5.20.0) + multi_json (1.15.0) + multi_xml (0.6.0) + multipart-post (2.3.0) + mustermann (3.0.0) + ruby2_keywords (~> 0.0.1) + nokogiri (1.14.5) + mini_portile2 (~> 2.8.0) + racc (~> 1.4) + oauth2 (1.4.8) + faraday (>= 0.8, < 3.0) + jwt (>= 1.0, < 3.0) + multi_json (~> 1.3) + multi_xml (~> 0.5) + rack (>= 1.2, < 3) polyglot (0.3.5) - rack (1.6.4) - rack-codehighlighter (0.5.1) + psych (5.1.1.1) + stringio + racc (1.7.2) + rack (2.2.4) + rack-codehighlighter (0.6.0) nokogiri (>= 1.4.1) - rack (>= 1.0.0) - rack-protection (1.5.3) - rack + rack (>= 2.0.0) + rack-protection (3.1.0) + rack (~> 2.2, >= 2.2.4) rack-test (0.6.3) rack (>= 1.0) - rake (11.1.2) - rb-fsevent (0.9.7) - rb-inotify (0.9.7) + rake (13.1.0) + rb-fsevent (0.9.8) + rb-inotify (0.9.8) ffi (>= 0.5.0) + rchardet (1.8.0) + rdoc (6.5.0) + psych (>= 4.0.0) redcarpet (2.3.0) - rerun (0.11.0) + rerun (0.14.0) listen (~> 3.0) - rspec (3.4.0) - rspec-core (~> 3.4.0) - rspec-expectations (~> 3.4.0) - rspec-mocks (~> 3.4.0) - rspec-core (3.4.4) - rspec-support (~> 3.4.0) - rspec-expectations (3.4.0) + rspec (3.5.0) + rspec-core (~> 3.5.0) + rspec-expectations (~> 3.5.0) + rspec-mocks (~> 3.5.0) + rspec-core (3.5.4) + rspec-support (~> 3.5.0) + rspec-expectations (3.5.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.4.0) - rspec-mocks (3.4.1) + rspec-support (~> 3.5.0) + rspec-mocks (3.5.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.4.0) - rspec-support (3.4.1) - ruby_dep (1.3.1) - rubyzip (1.2.0) - sass (3.4.22) - sinatra (1.4.7) - rack (~> 1.5) - rack-protection (~> 1.4) - tilt (>= 1.3, < 3) - sinatra-contrib (1.4.7) - backports (>= 2.0) + rspec-support (~> 3.5.0) + rspec-support (3.5.0) + ruby2_keywords (0.0.5) + rubyzip (2.3.2) + sass (3.7.4) + sass-listen (~> 4.0.0) + sass-listen (4.0.0) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + sassc (2.4.0) + ffi (~> 1.9) + semver2 (3.4.2) + sinatra (3.1.0) + mustermann (~> 3.0) + rack (~> 2.2, >= 2.2.4) + rack-protection (= 3.1.0) + tilt (~> 2.0) + sinatra-contrib (3.1.0) multi_json - rack-protection - rack-test - sinatra (~> 1.4.0) - tilt (>= 1.3, < 3) - sprockets (3.6.0) + mustermann (~> 3.0) + rack-protection (= 3.1.0) + sinatra (= 3.1.0) + tilt (~> 2.0) + sprockets (3.7.2) concurrent-ruby (~> 1.0) rack (> 1, < 3) - thin (1.7.0) + stringio (3.0.8) + temple (0.10.3) + thin (1.8.1) daemons (~> 1.0, >= 1.0.9) eventmachine (~> 1.0, >= 1.0.4) rack (>= 1, < 3) - thread_safe (0.3.5) - tilt (2.0.5) - treetop (1.6.5) + thor (1.3.0) + thread_safe (0.3.6) + tilt (2.0.11) + treetop (1.6.8) polyglot (~> 0.3) trollop (2.1.2) - tzinfo (1.2.2) + tzinfo (1.2.10) thread_safe (~> 0.1) + zeitwerk (2.6.12) PLATFORMS ruby DEPENDENCIES activesupport + backports bootstrap-sass coderay - deckrb (~> 0.5.2) - erector (~> 0.10.0) - eventmachine (~> 1.0.3) - files (~> 0.3.0) + deckrb + erector! + ffi + files! font-awesome-sass - i18n (~> 0.7) + i18n jquery-cdn nokogiri rack-codehighlighter @@ -132,10 +207,13 @@ DEPENDENCIES rspec rubyzip sass - sinatra (~> 1.4.0) - sinatra-contrib (~> 1.4.0) + sinatra + sinatra-contrib sprockets thin +RUBY VERSION + ruby 3.2.2p53 + BUNDLED WITH - 1.11.2 + 2.3.26 diff --git a/app.rb b/app.rb index 1152d9166..9070515e4 100755 --- a/app.rb +++ b/app.rb @@ -28,11 +28,10 @@ class InstallFest < Sinatra::Application # todo: use Sinatra::Base instead, with more explicit config include Erector::Mixin - DEFAULT_SITES = {en: "docs", es: "hola", :"zh-tw" => "nihao" } - # Set available locales in Array of Strings; this is also used when # checking availability in dynamic locale assignment, they must be strings. - AVAILABLE_LOCALES = DEFAULT_SITES.keys.map(&:to_s) + AVAILABLE_LOCALES = %w[en es zh-tw].freeze + DEFAULT_SITE = "docs" set :assets, Sprockets::Environment.new settings.assets.append_path "assets/stylesheets" @@ -47,7 +46,7 @@ class InstallFest < Sinatra::Application # todo: use Sinatra::Base instead, wi configure do I18n::Backend::Simple.include(I18n::Backend::Fallbacks) - I18n.load_path = Dir[File.join(settings.root, 'locales', '*.yml')] + I18n.load_path = Dir[File.join(settings.root, 'locales', '**/*.yml')] I18n.backend.load_translations I18n.available_locales = AVAILABLE_LOCALES @@ -73,7 +72,7 @@ def default_site if host && sites.include?(site = subdomain) site else - DEFAULT_SITES[I18n.locale.to_sym] # no symbol DoS because it's whitelisted + DEFAULT_SITE end end @@ -86,7 +85,7 @@ def site_dir end def sites_dir - Site.sites_dir(I18n.locale) + Site.sites_dir end def sites @@ -100,6 +99,12 @@ def redirect_sites } end + def redirect_pages + { + 'installfest/macintosh' => 'installfest/macOS' + } + end + before do begin I18n.locale = dynamic_locale @@ -117,8 +122,8 @@ def redirect_sites end def dynamic_locale - (params && (params[:locale] or params[:l])) or - (host && AVAILABLE_LOCALES.include?(subdomain) && subdomain) or + (params && (params[:locale] || params[:l])) || + (host && AVAILABLE_LOCALES.include?(subdomain) && subdomain) || (ENV['SITE_LOCALE']) end @@ -142,7 +147,7 @@ def doc_path end def back_path - path_parts = cookies[:docs_back_path].try(:split, '/') + path_parts = cookies[:docs_back_path]&.split('/') return unless path_parts && path_parts.length > 2 current_path_parts = request.fullpath.split('/') @@ -158,7 +163,7 @@ def back_path def render_page begin options = { - site: Site.named(params[:site], I18n.locale), + site: Site.named(params[:site]), page_name: params[:name], doc_title: Titleizer.title_for_page(params[:name]), doc_path: doc_path, @@ -184,7 +189,6 @@ def render_page else raise "unknown file type #{doc_path}" end - rescue Errno::ENOENT => e p e e.backtrace.each do |line| @@ -246,7 +250,7 @@ def render_deck get "/:site/:name.zip" do manifest_path = "#{site_dir}/#{params[:name]}.zip-manifest" - if File.exists?(manifest_path) + if File.exist?(manifest_path) manifest_files = File.read(manifest_path).split("\n") zip_path = File.join(Dir.tmpdir, "#{params[:name]}.zip") FileUtils.rm_rf(zip_path) @@ -287,6 +291,12 @@ def render_deck site_name = params[:site] if redirect_sites[site_name] redirect "#{redirect_sites[site_name]}/#{params[:name]}" + return + end + + page_url = "#{params[:site]}/#{params[:name]}" + if redirect_pages[page_url] + redirect redirect_pages[page_url] else render_page end diff --git a/assets/stylesheets/font_awesome.scss b/assets/stylesheets/font_awesome.scss index 908bb887a..6fccacddb 100644 --- a/assets/stylesheets/font_awesome.scss +++ b/assets/stylesheets/font_awesome.scss @@ -1,3 +1 @@ $fa-font-path: '/fonts/font-awesome/'; - -@import 'http://github.com/font-awesome'; \ No newline at end of file diff --git a/lib/contents.rb b/lib/contents.rb index e47f92001..9527890ec 100755 --- a/lib/contents.rb +++ b/lib/contents.rb @@ -36,6 +36,7 @@ def subpages_for filename # but NOT images of the form ![alt text](image_link.jpg) content.scan /[^!]\[.*?\]\((.*?)\)/ do |link, _| next if (link =~ /^http/) + next if (link =~ %r(^.+/)) # cross-links to other sites, e.g. /installfest/editors next if (link =~ %r(^//)) # protocol-less absolute links e.g. //google.com links.push(link) end diff --git a/lib/doc_page.rb b/lib/doc_page.rb index 0848933b1..9f4d9e813 100644 --- a/lib/doc_page.rb +++ b/lib/doc_page.rb @@ -41,7 +41,7 @@ def file_name end def git_url - "https://github.com/railsbridge/docs/blob/master/sites/#{@locale}/#{site.name}/#{file_name}" + "https://github.com/railsbridge/docs/blob/master/sites/#{site.name}/#{file_name}" end def src_url diff --git a/lib/site.rb b/lib/site.rb index b8fc9b583..d97d8c397 100644 --- a/lib/site.rb +++ b/lib/site.rb @@ -4,18 +4,18 @@ class Site @@here = File.expand_path(File.dirname(__FILE__)) @@project_root = File.dirname(@@here) - def self.sites_dir locale = "en" - sites_dir = File.join(["sites", locale.to_s].compact) - File.expand_path(sites_dir, @@project_root) + def self.sites_dir + File.expand_path('sites', @@project_root) end - def self.all locale = "en" - Dir[File.join(sites_dir(locale), '*')].map{|dir| Site.new(dir)} + def self.all + Dir[File.join(sites_dir, '*')].map{|dir| Site.new(dir)} end - def self.named name, locale = "en" - site = all(locale).detect { |site| site.name == name } - raise "No site found with the name '#{name}' in locale '#{locale}'" unless site + def self.named name + site = all.detect { |folder| folder.name == name } + raise "No site found with the name '#{name}'" unless site + site end diff --git a/lib/site_extensions/installfest.rb b/lib/site_extensions/installfest.rb new file mode 100644 index 000000000..08c157d68 --- /dev/null +++ b/lib/site_extensions/installfest.rb @@ -0,0 +1,16 @@ +module StepExtensions + module Installfest + def version_string(name) + case name + when :ruby_short + '2.3.8' + when :windows_rubygems_min + '2.6.7' + when :windows_rubygems_min_short + '2.6' + else + raise StandardError, "No version string exists for '#{name}'" + end + end + end +end diff --git a/lib/site_extensions/javascript-snake-game.rb b/lib/site_extensions/javascript-snake-game.rb index 07a6d81fa..27a7ad834 100644 --- a/lib/site_extensions/javascript-snake-game.rb +++ b/lib/site_extensions/javascript-snake-game.rb @@ -9,7 +9,7 @@ def js_expected_results(lesson) source_code :js, File.read(src_path) - h4 'How the game should work:' + h4 'How the game should work so far:' canvas id: 'chunk-game', height: '600', width: '800' diff --git a/lib/site_index.rb b/lib/site_index.rb index 6166ea8d2..cfca58976 100644 --- a/lib/site_index.rb +++ b/lib/site_index.rb @@ -4,16 +4,31 @@ class SiteIndex < Erector::Widget def categorized_sites { - 'setup' => ['installfest'], - 'rails' => ['intro-to-rails', 'job-board', 'message-board'], - 'frontend' => ['frontend', 'javascript-snake-game', 'javascript-to-do-list', 'javascript-to-do-list-with-react'], - 'ruby' => ['learn-to-code', 'ruby'] + 'setup' => [ + 'installfest' + ], + 'rails' => [ + 'intro-to-rails', + 'job-board', + 'message-board', + 'testing-rails-applications' + ], + 'frontend' => [ + 'frontend', + 'javascript-snake-game', + 'javascript-to-do-list', + 'javascript-to-do-list-with-react' + ], + 'ruby' => [ + 'learn-to-code', + 'ruby' + ] } end def sites return @sites if @sites - @sites = Dir.glob("#{Site.sites_dir(@locale)}/**").map { |filename| File.basename(filename) }.sort + @sites = Dir.glob("#{Site.sites_dir}/**").map { |filename| File.basename(filename) }.sort end def site_category category diff --git a/lib/step.rb b/lib/step.rb index 2bc69f6a5..9c8154b85 100644 --- a/lib/step.rb +++ b/lib/step.rb @@ -74,7 +74,7 @@ def insert file ## steps %w[ - steps explanation overview discussion hints challenge + steps explanation overview discussion hints challenge tools_and_references requirements ].each do |type| define_method type.to_sym do |&block| @@ -87,7 +87,7 @@ def insert file end end - def step name = nil, options = {} + def step name = nil, options = {}, &block num = next_step_number a(name: "step#{current_anchor_num}") a(name: options[:anchor_name]) if options[:anchor_name] @@ -98,7 +98,7 @@ def step name = nil, options = {} (!name.nil? ? I18n.t("general.step_title_suffix") : '') text name end - _render_inner_content &Proc.new if block_given? + _render_inner_content(&block) if block_given? end end @@ -131,19 +131,19 @@ def next_step name end end - def situation name + def situation name, &block h1 name - _render_inner_content &Proc.new if block_given? + _render_inner_content(&block) if block_given? end - def option name + def option name, &block num = next_step_number a(:name => "step#{current_anchor_num}") h1 :class => "option" do span I18n.t("general.option", :num => num) text name end - _render_inner_content &Proc.new if block_given? + _render_inner_content(&block) if block_given? end def option_half title diff --git a/lib/titleizer.rb b/lib/titleizer.rb index 816fd2c88..b6a5034fb 100644 --- a/lib/titleizer.rb +++ b/lib/titleizer.rb @@ -19,7 +19,8 @@ def self.title_for_page page_name special_cases = { 'jquery' => 'jQuery', - 'osx' => 'OS X' + 'osx' => 'OS X', + 'macos' => 'macOS' } page_name.split(/[-_]/).map do |w| @@ -27,8 +28,8 @@ def self.title_for_page page_name w.upcase elsif to_be_lowercased.include?(w.downcase) w.downcase - elsif special_cases.include?(w) - special_cases[w] + elsif special_cases.include?(w.downcase) + special_cases[w.downcase] else w.capitalize end diff --git a/locales/en.yml b/locales/en.yml deleted file mode 100644 index b00896c93..000000000 --- a/locales/en.yml +++ /dev/null @@ -1,34 +0,0 @@ -en: - captions: - terminal: "Type this in the terminal:" - irb: "Type this in irb:" - result: "Expected result:" - fuzzy_result: "Approximate expected result:" - link: "Go on to" - - general: - type_in_file: "Type this in the file %{filename}:" - further_reading: "Further Reading" - fuzzy_hint: "The greyed-out text may differ and is not important." - step_title: "Step %{num}" - step_title_suffix: ": " - next_step: "Next Step:" - option: "Option %{num}: " - verify: "Verify %{text}" - goals: "Goals" - expand_all: "Expand All" - other_pages: "Other Pages" - back_to: "Back to" - - header_section: - steps: "Steps" - explanation: "Explanation" - overview: "Overview" - discussion: "Discussion Items" - hints: "Hints" - challenge: "Challenge(s)" - tools_and_references: "Tools and References" - requirements: "Requirements to advance" - - sites: - other_categories: Other Stuff \ No newline at end of file diff --git a/locales/en/captions.yml b/locales/en/captions.yml new file mode 100644 index 000000000..4903b86a7 --- /dev/null +++ b/locales/en/captions.yml @@ -0,0 +1,7 @@ +en: + captions: + terminal: "Type this in the terminal:" + irb: "Type this in irb:" + result: "Expected result:" + fuzzy_result: "Approximate expected result:" + link: "Go on to" diff --git a/locales/en/general.yml b/locales/en/general.yml new file mode 100644 index 000000000..71e81ed7f --- /dev/null +++ b/locales/en/general.yml @@ -0,0 +1,14 @@ +en: + general: + type_in_file: "Type this in the file %{filename}:" + further_reading: "Further Reading" + fuzzy_hint: "The greyed-out text may differ and is not important." + step_title: "Step %{num}" + step_title_suffix: ": " + next_step: "Next Step:" + option: "Option %{num}: " + verify: "Verify %{text}" + goals: "Goals" + expand_all: "Expand All" + other_pages: "Other Pages" + back_to: "Back to" diff --git a/locales/en/header_sections.yml b/locales/en/header_sections.yml new file mode 100644 index 000000000..df5b8c68a --- /dev/null +++ b/locales/en/header_sections.yml @@ -0,0 +1,10 @@ +en: + header_section: + steps: "Steps" + explanation: "Explanation" + overview: "Overview" + discussion: "Discussion Items" + hints: "Hints" + challenge: "Challenge(s)" + tools_and_references: "Tools and References" + requirements: "Requirements to advance" diff --git a/locales/en/sites.yml b/locales/en/sites.yml new file mode 100644 index 000000000..906063685 --- /dev/null +++ b/locales/en/sites.yml @@ -0,0 +1,3 @@ +en: + sites: + other_categories: Other Stuff diff --git a/locales/es/captions.yml b/locales/es/captions.yml new file mode 100644 index 000000000..c2e4ea129 --- /dev/null +++ b/locales/es/captions.yml @@ -0,0 +1,7 @@ +es: + captions: + terminal: "Escribe esto en la línea de comandos:" + irb: "Escribe esto en irb:" + result: "Resultado esperado:" + fuzzy_result: "Resultado aproximado esperado:" + link: "Ir a" diff --git a/locales/es/general.yml b/locales/es/general.yml new file mode 100644 index 000000000..116fb0f16 --- /dev/null +++ b/locales/es/general.yml @@ -0,0 +1,14 @@ +es: + general: + type_in_file: "Escribe esto en el archivo %{filename}:" + further_reading: "Lectura adicional" + fuzzy_hint: "El texto en gris puede variar y no es tan importante." + step_title: "Paso %{num}" + step_title_suffix: ": " + next_step: "Próximo paso:" + option: "Opción %{num}: " + verify: "Verifica %{text}" + goals: "Objetivos" + expand_all: "Expandir Todo" + other_pages: "Otras Páginas" + back_to: "Regresar a" diff --git a/locales/es/header_sections.yml b/locales/es/header_sections.yml new file mode 100644 index 000000000..79751c5ab --- /dev/null +++ b/locales/es/header_sections.yml @@ -0,0 +1,10 @@ +es: + header_section: + steps: "Pasos" + explanation: "Explicación" + overview: "Resumen" + discussion: "Elementos para discusión" + hints: "Pistas" + challenge: "Reto(s)" + tools_and_references: "Herramientas y Referencias" + requirements: "Requisitos para avanzar" diff --git a/locales/es/sites.yml b/locales/es/sites.yml new file mode 100644 index 000000000..1cdac0ba2 --- /dev/null +++ b/locales/es/sites.yml @@ -0,0 +1,3 @@ +es: + sites: + other_categories: Otras cosas diff --git a/locales/zh-tw/captions.yml b/locales/zh-tw/captions.yml new file mode 100644 index 000000000..a4947bae8 --- /dev/null +++ b/locales/zh-tw/captions.yml @@ -0,0 +1,7 @@ +zh-tw: + captions: + terminal: "在終端機打這些字:" + irb: "在 irb 打這些字:" + result: "預期的結果:" + fuzzy_result: "大概預期的結果:" + link: "來這裡:" diff --git a/locales/zh-tw/general.yml b/locales/zh-tw/general.yml new file mode 100644 index 000000000..e0437e289 --- /dev/null +++ b/locales/zh-tw/general.yml @@ -0,0 +1,14 @@ +zh-tw: + general: + type_in_file: "在 %{filename} 檔裡面打這些字:" + further_reading: "延伸閱讀" + fuzzy_hint: "塗灰的字可能有所不同,不重要。" + goals: "目標" + verify: "檢查 %{text}" + option: "選項 %{num}:" + next_step: "下一步:" + step_title: "步驟 %{num}" + step_title_suffix: ":" + expand_all: "全部展開" + other_pages: "其他頁面" + back_to: "回到" diff --git a/locales/zh-tw/header_section.yml b/locales/zh-tw/header_section.yml new file mode 100644 index 000000000..645c69d33 --- /dev/null +++ b/locales/zh-tw/header_section.yml @@ -0,0 +1,10 @@ +zh-tw: + header_section: + steps: "步驟" + explanation: "解說" + overview: "摘要" + discussion: "討論" + hints: "秘訣" + challenge: "挑戰" + tools_and_references: "工具、參考資料" + requirements: "通關條件" diff --git a/public/img/macface.jpg b/public/img/macface.jpg deleted file mode 100644 index ad64b2cd7..000000000 Binary files a/public/img/macface.jpg and /dev/null differ diff --git a/public/img/macos.png b/public/img/macos.png new file mode 100644 index 000000000..3cfddbd35 Binary files /dev/null and b/public/img/macos.png differ diff --git a/public/img/windows.png b/public/img/windows.png index 938bf552c..a2ef856f8 100644 Binary files a/public/img/windows.png and b/public/img/windows.png differ diff --git a/sites/en/docs/docs.step b/sites/docs/docs.step similarity index 92% rename from sites/en/docs/docs.step rename to sites/docs/docs.step index af1496f2f..dba228e3a 100644 --- a/sites/en/docs/docs.step +++ b/sites/docs/docs.step @@ -24,6 +24,10 @@ site_desc 'message-board', <<-MARKDOWN Build a message board! This curriculum is for students who have completed the Suggestotron and the Job Board curricula. This curriculum is a challenge because it won't tell you what to type in! MARKDOWN +site_desc 'testing-rails-applications', <<-MARKDOWN +Increase the stability of your Rails app by learning about tests: what they are, why they're used, and how to use them! This curriculum is for students who have completed the Suggestotron, the Job Board, and the Message Board curricula. There will be challenges! +MARKDOWN + h1 'Frontend' site_desc 'frontend', <<-MARKDOWN @@ -71,7 +75,7 @@ Anyone can use this site! It's under a Creative Commons license ([CC-BY, specif Slightly different: if you're organizing an event and wonder if it could be considered a RailsBridge Workshop, we have two requirements: * The event should be free of charge. -* The event should target a group of people that is underrepresented in tech, such as LGBTQ folks, women, black or latin@ people, or others. +* The event should target a group of people that is underrepresented in tech, such as LGBTQ folks, women, black or latinx people, or others. If you're not doing those two things, you can totally still use the site, we just ask that you not call your event a RailsBridge workshop. (Charity workshops have used "Rails Workshop featuring the RailsBridge curriculum" in the past, which is neat.) diff --git a/sites/en/installfest/_install_ruby.step b/sites/en/installfest/_install_ruby.step deleted file mode 100644 index bf3da9bf0..000000000 --- a/sites/en/installfest/_install_ruby.step +++ /dev/null @@ -1,32 +0,0 @@ -console <<-BASH - rvm install 2.2.2 -BASH - -message "This downloads and compiles Ruby, which takes a while." -console <<-BASH - rvm use 2.2.2 - rvm --default use 2.2.2 -BASH - -verify do - console "ruby -v" - fuzzy_result "ruby 2.2.2{FUZZY}p0 (2014-12-25 revision 49005) [x86_64-darwin13]{/FUZZY}" -end - -div do - h1 "Troubleshooting" - important "If `rvm install 2.2.2` says `autoreconf was not found in the PATH`" do - div do - option_half "Mac OS" do - console "brew install automake" - end - - option_half "Ubuntu Linux" do - console "sudo apt-get install automake" - end - end - - message "Once that completes, retry `rvm install 2.2.2`" - end -end - diff --git a/sites/en/installfest/_install_sublime_text_2_for_mac.step b/sites/en/installfest/_install_sublime_text_2_for_mac.step deleted file mode 100644 index 68dfc4fb6..000000000 --- a/sites/en/installfest/_install_sublime_text_2_for_mac.step +++ /dev/null @@ -1,28 +0,0 @@ -message "We'll be using the Sublime Text 2 text editor during the workshop, though you are free to use a different editor if you prefer. It must be a plain-text editor, such as vi or TextMate." - -important <<-MARKDOWN - Microsoft Word and other word processing programs, including TextEdit and Notepad, will not work. - - When in doubt, use Sublime Text 2. - MARKDOWN - -step "Download Sublime Text 2" do - message "Download the [Sublime Text 2 installer](http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%202.0.2.dmg)." -end - -step 'Select "Open with DiskImageMounter" in the file save dialog' do - message "This should be the default." - - message "It will open an installer with a Sublime Text 2 icon and a picture of your Applications folder. Something like this:" - - img src: 'img/install_sublime_text.png', alt: 'Contents of the sublime text package showing a sublime text icon and a shortcut to applications' - -end - -step "Drag Sublime Text 2 into your Applications folder." do - message "It will open an installer with a Sublime Text 2 icon and a picture of your Applications folder. Drag Sublime Text 2 into your Applications folder." -end - -step "Unmount the installer disk image" do - message "by dragging it from your desktop to the trash" -end diff --git a/sites/en/installfest/configure_the_windows_terminal.step b/sites/en/installfest/configure_the_windows_terminal.step deleted file mode 100644 index 504b02cba..000000000 --- a/sites/en/installfest/configure_the_windows_terminal.step +++ /dev/null @@ -1,18 +0,0 @@ -step "Configure the Windows Terminal" do - tip do - message "Make sure that you have the **Command Prompt with Ruby and Rails** open, not just the usual Windows Terminal. To open the special Terminal, choose **All Programs** on the Start menu, then choose **RailsInstaller** and then **Command Prompt with Ruby and Rails**." - end - - message "Right-click on the menu bar and select **Properties**" - - message "Under the *Options* tab, check the box for **QuickEdit Mode**. This will let you visually cut and paste." - - message "Under the *Font* tab, select Lucida Console from the font chooser box. This lets you view non-ascii characters." - - message "In the *Layout* tab, adjust *Window Size* so the window is about half as wide as your screen, and is as tall as possible without covering the task bar (this may require some trial and error)." - - message "In the *Layout* tab, increase **Screen Buffer Size** Height to 1000." - - message "Click OK. In the dialog that comes up, select **Modify shortcut that started this window.**" -end - diff --git a/sites/en/installfest/img/AboutThisMac.png b/sites/en/installfest/img/AboutThisMac.png deleted file mode 100644 index 70096b2cd..000000000 Binary files a/sites/en/installfest/img/AboutThisMac.png and /dev/null differ diff --git a/sites/en/installfest/img/install_sublime_text.png b/sites/en/installfest/img/install_sublime_text.png deleted file mode 100644 index b01c2c4e4..000000000 Binary files a/sites/en/installfest/img/install_sublime_text.png and /dev/null differ diff --git a/sites/en/intro-to-rails/img/Seattle_list_with_topic.png b/sites/en/intro-to-rails/img/Seattle_list_with_topic.png deleted file mode 100644 index f7e518ad2..000000000 Binary files a/sites/en/intro-to-rails/img/Seattle_list_with_topic.png and /dev/null differ diff --git a/sites/en/intro-to-rails/img/Seattle_topic_created.png b/sites/en/intro-to-rails/img/Seattle_topic_created.png deleted file mode 100644 index 86f122160..000000000 Binary files a/sites/en/intro-to-rails/img/Seattle_topic_created.png and /dev/null differ diff --git a/sites/en/intro-to-rails/img/Seattle_topic_list_page.png b/sites/en/intro-to-rails/img/Seattle_topic_list_page.png deleted file mode 100644 index 0de297b07..000000000 Binary files a/sites/en/intro-to-rails/img/Seattle_topic_list_page.png and /dev/null differ diff --git a/sites/en/intro-to-rails/img/finished_app.png b/sites/en/intro-to-rails/img/finished_app.png deleted file mode 100644 index dc197b277..000000000 Binary files a/sites/en/intro-to-rails/img/finished_app.png and /dev/null differ diff --git a/sites/en/intro-to-rails/img/sublime_add_folder_to_project.png b/sites/en/intro-to-rails/img/sublime_add_folder_to_project.png deleted file mode 100644 index cfa3e5873..000000000 Binary files a/sites/en/intro-to-rails/img/sublime_add_folder_to_project.png and /dev/null differ diff --git a/sites/en/intro-to-rails/img/sublime_project_as_folder.png b/sites/en/intro-to-rails/img/sublime_project_as_folder.png deleted file mode 100644 index 97c045e3c..000000000 Binary files a/sites/en/intro-to-rails/img/sublime_project_as_folder.png and /dev/null differ diff --git a/sites/en/javascript-snake-game/lesson-14.step b/sites/en/javascript-snake-game/lesson-14.step deleted file mode 100644 index ee824c591..000000000 --- a/sites/en/javascript-snake-game/lesson-14.step +++ /dev/null @@ -1 +0,0 @@ -insert '../javascript-to-do-list/_deploying_your_site' diff --git a/sites/es/hola/hola.step b/sites/es/hola/hola.step deleted file mode 100644 index f0e5f45b0..000000000 --- a/sites/es/hola/hola.step +++ /dev/null @@ -1 +0,0 @@ -message "Hola! Que tal?" diff --git a/sites/en/frontend/HTML_attributes.step b/sites/frontend/HTML_attributes.step similarity index 100% rename from sites/en/frontend/HTML_attributes.step rename to sites/frontend/HTML_attributes.step diff --git a/sites/en/frontend/HTML_structure.step b/sites/frontend/HTML_structure.step similarity index 100% rename from sites/en/frontend/HTML_structure.step rename to sites/frontend/HTML_structure.step diff --git a/sites/en/frontend/HTML_tags.step b/sites/frontend/HTML_tags.step similarity index 100% rename from sites/en/frontend/HTML_tags.step rename to sites/frontend/HTML_tags.step diff --git a/sites/en/frontend/_consider_deploying_to_github.step b/sites/frontend/_consider_deploying_to_github.step similarity index 100% rename from sites/en/frontend/_consider_deploying_to_github.step rename to sites/frontend/_consider_deploying_to_github.step diff --git a/sites/en/frontend/_consider_deploying_to_github_again.step b/sites/frontend/_consider_deploying_to_github_again.step similarity index 100% rename from sites/en/frontend/_consider_deploying_to_github_again.step rename to sites/frontend/_consider_deploying_to_github_again.step diff --git a/sites/en/frontend/_developer_tools.step b/sites/frontend/_developer_tools.step similarity index 100% rename from sites/en/frontend/_developer_tools.step rename to sites/frontend/_developer_tools.step diff --git a/sites/en/frontend/_working_effectively_and_efficiently.md b/sites/frontend/_working_effectively_and_efficiently.md similarity index 100% rename from sites/en/frontend/_working_effectively_and_efficiently.md rename to sites/frontend/_working_effectively_and_efficiently.md diff --git a/sites/en/frontend/add_more_elements.step b/sites/frontend/add_more_elements.step similarity index 100% rename from sites/en/frontend/add_more_elements.step rename to sites/frontend/add_more_elements.step diff --git a/sites/en/frontend/add_starter_files.step b/sites/frontend/add_starter_files.step similarity index 100% rename from sites/en/frontend/add_starter_files.step rename to sites/frontend/add_starter_files.step diff --git a/sites/en/frontend/basic_CSS.step b/sites/frontend/basic_CSS.step similarity index 100% rename from sites/en/frontend/basic_CSS.step rename to sites/frontend/basic_CSS.step diff --git a/sites/en/frontend/basic_javascript.step b/sites/frontend/basic_javascript.step similarity index 100% rename from sites/en/frontend/basic_javascript.step rename to sites/frontend/basic_javascript.step diff --git a/sites/en/frontend/deploying_to_github.step b/sites/frontend/deploying_to_github.step similarity index 100% rename from sites/en/frontend/deploying_to_github.step rename to sites/frontend/deploying_to_github.step diff --git a/sites/en/frontend/deploying_to_github_again.step b/sites/frontend/deploying_to_github_again.step similarity index 100% rename from sites/en/frontend/deploying_to_github_again.step rename to sites/frontend/deploying_to_github_again.step diff --git a/sites/en/frontend/developer_tools.step b/sites/frontend/developer_tools.step similarity index 100% rename from sites/en/frontend/developer_tools.step rename to sites/frontend/developer_tools.step diff --git a/sites/en/frontend/front-end-lesson.zip-manifest b/sites/frontend/front-end-lesson.zip-manifest similarity index 100% rename from sites/en/frontend/front-end-lesson.zip-manifest rename to sites/frontend/front-end-lesson.zip-manifest diff --git a/sites/en/frontend/frontend.step b/sites/frontend/frontend.step similarity index 90% rename from sites/en/frontend/frontend.step rename to sites/frontend/frontend.step index a60dd1903..e69b4405d 100755 --- a/sites/en/frontend/frontend.step +++ b/sites/frontend/frontend.step @@ -30,8 +30,8 @@ We're going to be working with: * [Chrome](https://www.google.com/chrome) (If you're experienced with the developer tools in another browser, that may work too.); * The code editor of your choice. - * [Sublime Text](http://www.sublimetext.com/) is popular with many Ruby and Rails users. You can use it free for evaluation, then must pay to continue using it. * [Atom](https://atom.io/) is a free, open-source editor that can be customized with HTML, CSS, and JavaScript. A download is available for OS X 10.8+, Windows 7/8, and Ubuntu/RedHat linux. + * [or install a different editor](/installfest/editors) Optional tools if you're deploying to GitHub: diff --git a/sites/en/frontend/get_a_sticker.step b/sites/frontend/get_a_sticker.step similarity index 96% rename from sites/en/frontend/get_a_sticker.step rename to sites/frontend/get_a_sticker.step index 87344521f..c8fb8b9d2 100644 --- a/sites/en/frontend/get_a_sticker.step +++ b/sites/frontend/get_a_sticker.step @@ -10,7 +10,7 @@ end verify "you can open a local webpage in a browser" do message <<-MESSAGE -Create a new file called `sticker.html` by opening it in Sublime Text 2 or your preferred editor. +Create a new file called `sticker.html` by opening it in Atom or your preferred editor. Make a note of where you save it, you'll need to know in a second. Fill it with the following contents: diff --git a/sites/en/frontend/grid.html b/sites/frontend/grid.html similarity index 100% rename from sites/en/frontend/grid.html rename to sites/frontend/grid.html diff --git a/sites/en/frontend/griding_with_bootstrap.step b/sites/frontend/griding_with_bootstrap.step similarity index 100% rename from sites/en/frontend/griding_with_bootstrap.step rename to sites/frontend/griding_with_bootstrap.step diff --git a/sites/en/frontend/html_quick_reference.md b/sites/frontend/html_quick_reference.md similarity index 100% rename from sites/en/frontend/html_quick_reference.md rename to sites/frontend/html_quick_reference.md diff --git a/sites/en/frontend/img/boxmodel.png b/sites/frontend/img/boxmodel.png similarity index 100% rename from sites/en/frontend/img/boxmodel.png rename to sites/frontend/img/boxmodel.png diff --git a/sites/en/frontend/img/css.png b/sites/frontend/img/css.png similarity index 100% rename from sites/en/frontend/img/css.png rename to sites/frontend/img/css.png diff --git a/sites/en/frontend/img/css_bundler.png b/sites/frontend/img/css_bundler.png similarity index 100% rename from sites/en/frontend/img/css_bundler.png rename to sites/frontend/img/css_bundler.png diff --git a/sites/en/frontend/img/css_class.png b/sites/frontend/img/css_class.png similarity index 100% rename from sites/en/frontend/img/css_class.png rename to sites/frontend/img/css_class.png diff --git a/sites/en/frontend/img/css_id.png b/sites/frontend/img/css_id.png similarity index 100% rename from sites/en/frontend/img/css_id.png rename to sites/frontend/img/css_id.png diff --git a/sites/en/frontend/img/css_zen.png b/sites/frontend/img/css_zen.png similarity index 100% rename from sites/en/frontend/img/css_zen.png rename to sites/frontend/img/css_zen.png diff --git a/sites/en/frontend/img/devtools.png b/sites/frontend/img/devtools.png similarity index 100% rename from sites/en/frontend/img/devtools.png rename to sites/frontend/img/devtools.png diff --git a/sites/en/frontend/img/devtools_console.png b/sites/frontend/img/devtools_console.png similarity index 100% rename from sites/en/frontend/img/devtools_console.png rename to sites/frontend/img/devtools_console.png diff --git a/sites/en/frontend/img/devtools_elements.png b/sites/frontend/img/devtools_elements.png similarity index 100% rename from sites/en/frontend/img/devtools_elements.png rename to sites/frontend/img/devtools_elements.png diff --git a/sites/en/frontend/img/devtools_network.png b/sites/frontend/img/devtools_network.png similarity index 100% rename from sites/en/frontend/img/devtools_network.png rename to sites/frontend/img/devtools_network.png diff --git a/sites/en/frontend/img/devtools_script.png b/sites/frontend/img/devtools_script.png similarity index 100% rename from sites/en/frontend/img/devtools_script.png rename to sites/frontend/img/devtools_script.png diff --git a/sites/en/frontend/img/get_a_sticker_fork_button.png b/sites/frontend/img/get_a_sticker_fork_button.png similarity index 100% rename from sites/en/frontend/img/get_a_sticker_fork_button.png rename to sites/frontend/img/get_a_sticker_fork_button.png diff --git a/sites/en/frontend/img/get_a_sticker_https.png b/sites/frontend/img/get_a_sticker_https.png similarity index 100% rename from sites/en/frontend/img/get_a_sticker_https.png rename to sites/frontend/img/get_a_sticker_https.png diff --git a/sites/en/frontend/img/get_a_sticker_output.png b/sites/frontend/img/get_a_sticker_output.png similarity index 100% rename from sites/en/frontend/img/get_a_sticker_output.png rename to sites/frontend/img/get_a_sticker_output.png diff --git a/sites/en/frontend/img/github_create_repo.png b/sites/frontend/img/github_create_repo.png similarity index 100% rename from sites/en/frontend/img/github_create_repo.png rename to sites/frontend/img/github_create_repo.png diff --git a/sites/en/frontend/img/github_name_your_repo.png b/sites/frontend/img/github_name_your_repo.png similarity index 100% rename from sites/en/frontend/img/github_name_your_repo.png rename to sites/frontend/img/github_name_your_repo.png diff --git a/sites/en/frontend/img/hello_html.png b/sites/frontend/img/hello_html.png similarity index 100% rename from sites/en/frontend/img/hello_html.png rename to sites/frontend/img/hello_html.png diff --git a/sites/en/frontend/img/hello_omg.png b/sites/frontend/img/hello_omg.png similarity index 100% rename from sites/en/frontend/img/hello_omg.png rename to sites/frontend/img/hello_omg.png diff --git a/sites/en/frontend/img/hello_structure.png b/sites/frontend/img/hello_structure.png similarity index 100% rename from sites/en/frontend/img/hello_structure.png rename to sites/frontend/img/hello_structure.png diff --git a/sites/en/frontend/img/hello_style.png b/sites/frontend/img/hello_style.png similarity index 100% rename from sites/en/frontend/img/hello_style.png rename to sites/frontend/img/hello_style.png diff --git a/sites/en/frontend/img/hello_title.png b/sites/frontend/img/hello_title.png similarity index 100% rename from sites/en/frontend/img/hello_title.png rename to sites/frontend/img/hello_title.png diff --git a/sites/en/frontend/img/hello_world.png b/sites/frontend/img/hello_world.png similarity index 100% rename from sites/en/frontend/img/hello_world.png rename to sites/frontend/img/hello_world.png diff --git a/sites/en/frontend/img/hello_world_2line.png b/sites/frontend/img/hello_world_2line.png similarity index 100% rename from sites/en/frontend/img/hello_world_2line.png rename to sites/frontend/img/hello_world_2line.png diff --git a/sites/en/frontend/img/hello_world_2line2.png b/sites/frontend/img/hello_world_2line2.png similarity index 100% rename from sites/en/frontend/img/hello_world_2line2.png rename to sites/frontend/img/hello_world_2line2.png diff --git a/sites/en/frontend/img/hello_world_jazzy.png b/sites/frontend/img/hello_world_jazzy.png similarity index 100% rename from sites/en/frontend/img/hello_world_jazzy.png rename to sites/frontend/img/hello_world_jazzy.png diff --git a/sites/en/frontend/img/html_tags_list.png b/sites/frontend/img/html_tags_list.png similarity index 100% rename from sites/en/frontend/img/html_tags_list.png rename to sites/frontend/img/html_tags_list.png diff --git a/sites/en/frontend/img/jquery_result.png b/sites/frontend/img/jquery_result.png similarity index 100% rename from sites/en/frontend/img/jquery_result.png rename to sites/frontend/img/jquery_result.png diff --git a/sites/en/frontend/img/page.png b/sites/frontend/img/page.png similarity index 100% rename from sites/en/frontend/img/page.png rename to sites/frontend/img/page.png diff --git a/sites/en/frontend/img/page_anchors.png b/sites/frontend/img/page_anchors.png similarity index 100% rename from sites/en/frontend/img/page_anchors.png rename to sites/frontend/img/page_anchors.png diff --git a/sites/en/frontend/img/page_html.png b/sites/frontend/img/page_html.png similarity index 100% rename from sites/en/frontend/img/page_html.png rename to sites/frontend/img/page_html.png diff --git a/sites/en/frontend/img/page_img.png b/sites/frontend/img/page_img.png similarity index 100% rename from sites/en/frontend/img/page_img.png rename to sites/frontend/img/page_img.png diff --git a/sites/en/frontend/img/page_sample.jpg b/sites/frontend/img/page_sample.jpg similarity index 100% rename from sites/en/frontend/img/page_sample.jpg rename to sites/frontend/img/page_sample.jpg diff --git a/sites/en/frontend/img/prompt.png b/sites/frontend/img/prompt.png similarity index 100% rename from sites/en/frontend/img/prompt.png rename to sites/frontend/img/prompt.png diff --git a/sites/en/frontend/img/zip.png b/sites/frontend/img/zip.png similarity index 100% rename from sites/en/frontend/img/zip.png rename to sites/frontend/img/zip.png diff --git a/sites/en/frontend/introduction_to_html.step b/sites/frontend/introduction_to_html.step similarity index 100% rename from sites/en/frontend/introduction_to_html.step rename to sites/frontend/introduction_to_html.step diff --git a/sites/en/frontend/jquery.step b/sites/frontend/jquery.step similarity index 100% rename from sites/en/frontend/jquery.step rename to sites/frontend/jquery.step diff --git a/sites/en/frontend/jquery_vs_javascript.step b/sites/frontend/jquery_vs_javascript.step similarity index 100% rename from sites/en/frontend/jquery_vs_javascript.step rename to sites/frontend/jquery_vs_javascript.step diff --git a/sites/en/frontend/make_a_web_page.step b/sites/frontend/make_a_web_page.step similarity index 100% rename from sites/en/frontend/make_a_web_page.step rename to sites/frontend/make_a_web_page.step diff --git a/sites/en/frontend/make_columns.step b/sites/frontend/make_columns.step similarity index 100% rename from sites/en/frontend/make_columns.step rename to sites/frontend/make_columns.step diff --git a/sites/en/frontend/resources.step b/sites/frontend/resources.step similarity index 100% rename from sites/en/frontend/resources.step rename to sites/frontend/resources.step diff --git a/sites/en/frontend/tool_installation.step b/sites/frontend/tool_installation.step similarity index 83% rename from sites/en/frontend/tool_installation.step rename to sites/frontend/tool_installation.step index 4922fcbcd..49778ca1c 100644 --- a/sites/en/frontend/tool_installation.step +++ b/sites/frontend/tool_installation.step @@ -46,10 +46,9 @@ steps do end step "Install a text editor" do - a "Download and install Sublime Text 2", :href => "http://www.sublimetext.com/2" - message "Install Sublime Text 2 by double clicking the file you downloaded, then dragging the Sublime Text 2 icon into the Applications folder. Finish up by clicking the eject icon for Sublime Text 2 in your finder window." + a "Download and install Atom", :href => "https://atom.io/" + message "Install Atom by double clicking the file you downloaded, then dragging the Atom icon into the Applications folder. Finish up by clicking the eject icon for Atom in your finder window." a "or install a different editor", :href => "/installfest/editors" - message "FYI: Sublime Text 2 is a paid program that you can download and try out for free. If you keep using Sublime Text 2 after the workshop, you'll need to buy a license. There are other editors available you can find on [our editors page](/installfest/editors)." end end end diff --git a/sites/en/frontend/zip_content/.gitignore b/sites/frontend/zip_content/.gitignore similarity index 100% rename from sites/en/frontend/zip_content/.gitignore rename to sites/frontend/zip_content/.gitignore diff --git a/sites/en/frontend/zip_content/index.html b/sites/frontend/zip_content/index.html similarity index 100% rename from sites/en/frontend/zip_content/index.html rename to sites/frontend/zip_content/index.html diff --git a/sites/en/frontend/zip_content/resources/javascript.js b/sites/frontend/zip_content/resources/javascript.js similarity index 100% rename from sites/en/frontend/zip_content/resources/javascript.js rename to sites/frontend/zip_content/resources/javascript.js diff --git a/sites/en/frontend/zip_content/resources/layout.css b/sites/frontend/zip_content/resources/layout.css similarity index 100% rename from sites/en/frontend/zip_content/resources/layout.css rename to sites/frontend/zip_content/resources/layout.css diff --git a/sites/en/frontend/zip_content/resources/picture.jpg b/sites/frontend/zip_content/resources/picture.jpg similarity index 100% rename from sites/en/frontend/zip_content/resources/picture.jpg rename to sites/frontend/zip_content/resources/picture.jpg diff --git a/sites/en/installfest/_command-line-glossary.md b/sites/installfest/_command-line-glossary.md similarity index 100% rename from sites/en/installfest/_command-line-glossary.md rename to sites/installfest/_command-line-glossary.md diff --git a/sites/en/installfest/_general-glossary.md b/sites/installfest/_general-glossary.md similarity index 98% rename from sites/en/installfest/_general-glossary.md rename to sites/installfest/_general-glossary.md index 500253e8d..e96914968 100644 --- a/sites/en/installfest/_general-glossary.md +++ b/sites/installfest/_general-glossary.md @@ -6,7 +6,7 @@ **Git:** A type of **Version Control Software (VCS)**. -**Github:** A site that hosts git repositories. Github also adds a number of tools that aid interaction between developers collaborating on software. +**GitHub:** A site that hosts git repositories. GitHub also adds a number of tools that aid interaction between developers collaborating on software. **Grouping:** Indents and whitespaces are used for grouping code together and simplify readability. Ruby also uses do … end to group. diff --git a/sites/installfest/_install_atom_for_mac.step b/sites/installfest/_install_atom_for_mac.step new file mode 100644 index 000000000..983f2a84d --- /dev/null +++ b/sites/installfest/_install_atom_for_mac.step @@ -0,0 +1,21 @@ +message "We'll be using the Atom text editor during the workshop, though you are free to use a different editor if you prefer. It must be a plain-text editor, such as vi or TextMate." + +important <<-MARKDOWN + Microsoft Word and other word processing programs, including TextEdit and Notepad, will not work. + + When in doubt, use Atom. + MARKDOWN + +step "Download Atom" do + message "Download the [Atom installer](https://atom.io/download/mac)." +end + +step 'Find the downloaded file in Finder' do + message "If you weren't asked where to save it, it's probably in the Downloads folder." +end + +step "Extract Atom and move it to your Applications folder." do + message "Double click the Atom `.zip` file to extract it. Drag Atom into your Applications folder." + + img src: 'img/install_atom_mac.gif', alt: 'Animation of extracting the Atom zip file and moving the contents to the Applications folder' +end diff --git a/sites/en/installfest/_install_homebrew.step b/sites/installfest/_install_homebrew.step similarity index 70% rename from sites/en/installfest/_install_homebrew.step rename to sites/installfest/_install_homebrew.step index ba499928c..094167a18 100644 --- a/sites/en/installfest/_install_homebrew.step +++ b/sites/installfest/_install_homebrew.step @@ -7,5 +7,8 @@ important "If that doesn't work, visit 0.18' end RUBY @@ -86,11 +85,16 @@ step "Deploy your app to Heroku" do message "SQLite and PostgreSQL are different kinds of databases. We're using SQLite for our development and test environments because it's simple to install. We're using PostgreSQL in our production environment because Heroku has done the hard work of installing it for us and it's more powerful than SQLite. We have separate test, development and production databases by default in Rails." end - console <<-BASH -bundle install --without production - BASH + console "gem install bundler" - message "Again, wait for the console prompt, and look for the 'Bundle complete!' message just above. If you are on Windows and you get the message 'The system cannot find the path specified.', then you need to first install Bundler. You can do this by typing `gem install bundler`. Once this finishes, then redo the `bundle install --without production` command. If this fails, get a volunteer to help you edit `config/environments/production.rb` " + fuzzy_result <<-OUTPUT + Successfully installed bundler-{FUZZY}1.14.3{/FUZZY} + 1 gem installed + OUTPUT + + console "bundle install --without production" + + message "Again, wait for the console prompt, and look for the 'Bundle complete!' message just above." end step "Set the root route" do @@ -113,10 +117,8 @@ bundle install --without production message "Before running the following command (to add to your local git repository), make sure that you are in the `test_app` directory." - console <<-BASH - git add . - git commit -m "Updates for heroku deployment" - BASH + console 'git add .' + console 'git commit -m "Updates for heroku deployment"' end step "Deploy (push) to heroku" do @@ -149,7 +151,7 @@ bundle install --without production message "This process will probably take about twice as long as your 'bundle install' and then will return you to your console prompt. If it takes longer than that, talk to a TA." - console "heroku run rake db:migrate" + console "heroku run rails db:migrate" result <<-OUTPUT Migrating to CreateDrinks (20160706063236) @@ -181,4 +183,3 @@ bundle install --without production end next_step "get_a_sticker" - diff --git a/sites/en/installfest/editors.step b/sites/installfest/editors.step similarity index 69% rename from sites/en/installfest/editors.step rename to sites/installfest/editors.step index a4ce4f817..102e63955 100644 --- a/sites/en/installfest/editors.step +++ b/sites/installfest/editors.step @@ -1,12 +1,12 @@ message <<-MARKDOWN -There are a number of different editors designed for programming. You may already have a favorite editor; if so you can continue using that editor. If you have never used a programming editor, there are a number of good editors available, several of them free of charge. Most Railsbridge instructors use the Sublime editor, so you may want to install Sublime; if you end up asking for help during your class it may be easier for an instructor or TA to help you if you are using Sublime. Here is a list of some of the more widely used editors: +There are a number of different editors designed for programming. You may already have a favorite editor; if so you can continue using that editor. If you have never used a programming editor, there are a number of good editors available, several of them free of charge. Many RailsBridge instructors use the Atom editor, so you may want to install Atom; if you end up asking for help during your class it may be easier for an instructor or TA to help you if you are using Atom. Here is a list of some of the more widely used editors: +* Atom is a free, open-source editor that can be customized to your liking using its rich ecosystem of add-on packages. A download is available for OS X 10.8+, Windows 7/8, and Ubuntu/RedHat linux. * Sublime Text is popular with many Ruby and Rails users. You can use it free for evaluation, then must pay to continue using it. * Komodo is a very good free programming editor, that is not used as widely as in the past. It is relatively easy to use. * TextMate is very popular in the Ruby and Rails community. It is not free. -* Atom is a free, open-source editor that can be customized with HTML, CSS, and JavaScript. A download is available for OS X 10.8+, Windows 7/8, and Ubuntu/RedHat linux. -* Aptana Studio is a free, full-featured, development IDE (Integrated Development Environment) for Ruby and Rails. It has many powerful features to assist you while you develop your code. You can install Aptana as either a stand-along program or as an Eclipse plugin. +* Aptana Studio is a free, full-featured, development IDE (Integrated Development Environment) for Ruby and Rails. It has many powerful features to assist you while you develop your code. You can install Aptana as either a stand-along program or as an Eclipse plugin. * RubyMine is used by many companies for their Ruby and Rails software development. Is is also a full-featured IDE, very similar to Aptana. RubyMine is not free, but has a 30-day evaluation period. There are other programming editors available, but these are among the most popular. Some people use simple non-programming editors, such as NotePad (or WordPad or TextEdit in "plain text" mode). It is fine to use a simple editor, though at some point you should look into using an editor designed for programming as using a programming editor or IDE will improve your programming productivity. diff --git a/sites/en/installfest/get_a_sticker.step b/sites/installfest/get_a_sticker.step similarity index 85% rename from sites/en/installfest/get_a_sticker.step rename to sites/installfest/get_a_sticker.step index c9c1fc800..7f7c77edd 100644 --- a/sites/en/installfest/get_a_sticker.step +++ b/sites/installfest/get_a_sticker.step @@ -14,9 +14,9 @@ step "Have a volunteer check your tool versions" do h3 "On all operating systems:" console "ruby -v" - fuzzy_result "ruby 2.2.{FUZZY}4p230 (2015-12-16 revision 53155) [x86_64-darwin13]{/FUZZY}" + fuzzy_result "ruby 2.3{FUZZY}.3p222 (2015-12-16 revision 53155) [x86_64-darwin13]{/FUZZY}" - tip "Depending on your environment, your Ruby version might be **2.2** or **2.3**. As long as it's 2.2.2 or above, you're good to go." + tip "As long as your Ruby version is #{version_string(:ruby_short)} or above, you're good to go." console "bundle -v" fuzzy_result "Bundler version 1{FUZZY}.x.x{/FUZZY}" diff --git a/sites/en/installfest/glossary.step b/sites/installfest/glossary.step similarity index 100% rename from sites/en/installfest/glossary.step rename to sites/installfest/glossary.step diff --git a/sites/installfest/img/AboutThisMac.png b/sites/installfest/img/AboutThisMac.png new file mode 100644 index 000000000..b884185dd Binary files /dev/null and b/sites/installfest/img/AboutThisMac.png differ diff --git a/sites/en/installfest/img/WinRailsInstaller.jpg b/sites/installfest/img/WinRailsInstaller.jpg similarity index 100% rename from sites/en/installfest/img/WinRailsInstaller.jpg rename to sites/installfest/img/WinRailsInstaller.jpg diff --git a/sites/en/installfest/img/appstore.jpg b/sites/installfest/img/appstore.jpg similarity index 100% rename from sites/en/installfest/img/appstore.jpg rename to sites/installfest/img/appstore.jpg diff --git a/sites/en/installfest/img/directory.png b/sites/installfest/img/directory.png similarity index 100% rename from sites/en/installfest/img/directory.png rename to sites/installfest/img/directory.png diff --git a/sites/en/installfest/img/get_a_sticker_you_should_see.png b/sites/installfest/img/get_a_sticker_you_should_see.png similarity index 100% rename from sites/en/installfest/img/get_a_sticker_you_should_see.png rename to sites/installfest/img/get_a_sticker_you_should_see.png diff --git a/sites/installfest/img/install_atom_mac.gif b/sites/installfest/img/install_atom_mac.gif new file mode 100644 index 000000000..35a83eb5f Binary files /dev/null and b/sites/installfest/img/install_atom_mac.gif differ diff --git a/sites/en/installfest/img/railsbridge_ubuntu12-checkbox.png b/sites/installfest/img/railsbridge_ubuntu12-checkbox.png similarity index 100% rename from sites/en/installfest/img/railsbridge_ubuntu12-checkbox.png rename to sites/installfest/img/railsbridge_ubuntu12-checkbox.png diff --git a/sites/en/installfest/img/railsbridge_windowsScreenshot-commandprompt-pinnedtotaskbar.png b/sites/installfest/img/railsbridge_windowsScreenshot-commandprompt-pinnedtotaskbar.png similarity index 100% rename from sites/en/installfest/img/railsbridge_windowsScreenshot-commandprompt-pinnedtotaskbar.png rename to sites/installfest/img/railsbridge_windowsScreenshot-commandprompt-pinnedtotaskbar.png diff --git a/sites/en/installfest/img/railsbridge_windowsScreenshot-commandprompt_ror.png b/sites/installfest/img/railsbridge_windowsScreenshot-commandprompt_ror.png similarity index 100% rename from sites/en/installfest/img/railsbridge_windowsScreenshot-commandprompt_ror.png rename to sites/installfest/img/railsbridge_windowsScreenshot-commandprompt_ror.png diff --git a/sites/en/installfest/img/railsbridge_windows_findingCommandPrompt_win7.png b/sites/installfest/img/railsbridge_windows_findingCommandPrompt_win7.png similarity index 100% rename from sites/en/installfest/img/railsbridge_windows_findingCommandPrompt_win7.png rename to sites/installfest/img/railsbridge_windows_findingCommandPrompt_win7.png diff --git a/sites/en/installfest/img/railsbridge_windows_findingCommandPrompt_win8.png b/sites/installfest/img/railsbridge_windows_findingCommandPrompt_win8.png similarity index 100% rename from sites/en/installfest/img/railsbridge_windows_findingCommandPrompt_win8.png rename to sites/installfest/img/railsbridge_windows_findingCommandPrompt_win8.png diff --git a/sites/en/installfest/img/successful_rails_install.png b/sites/installfest/img/successful_rails_install.png similarity index 100% rename from sites/en/installfest/img/successful_rails_install.png rename to sites/installfest/img/successful_rails_install.png diff --git a/sites/en/installfest/img/xcode-prefs.jpg b/sites/installfest/img/xcode-prefs.jpg similarity index 100% rename from sites/en/installfest/img/xcode-prefs.jpg rename to sites/installfest/img/xcode-prefs.jpg diff --git a/sites/en/installfest/img/xcode-tools-install.png b/sites/installfest/img/xcode-tools-install.png similarity index 100% rename from sites/en/installfest/img/xcode-tools-install.png rename to sites/installfest/img/xcode-tools-install.png diff --git a/sites/en/installfest/install_xcode.step b/sites/installfest/install_xcode.step similarity index 100% rename from sites/en/installfest/install_xcode.step rename to sites/installfest/install_xcode.step diff --git a/sites/en/installfest/install_xcode_command_line_tools.step b/sites/installfest/install_xcode_command_line_tools.step similarity index 100% rename from sites/en/installfest/install_xcode_command_line_tools.step rename to sites/installfest/install_xcode_command_line_tools.step diff --git a/sites/en/installfest/install_xcode_from_app_store.step b/sites/installfest/install_xcode_from_app_store.step similarity index 100% rename from sites/en/installfest/install_xcode_from_app_store.step rename to sites/installfest/install_xcode_from_app_store.step diff --git a/sites/en/installfest/install_xcode_from_dvd.step b/sites/installfest/install_xcode_from_dvd.step similarity index 100% rename from sites/en/installfest/install_xcode_from_dvd.step rename to sites/installfest/install_xcode_from_dvd.step diff --git a/sites/en/installfest/installfest.step b/sites/installfest/installfest.step similarity index 66% rename from sites/en/installfest/installfest.step rename to sites/installfest/installfest.step index 933a26844..7aced5e1d 100644 --- a/sites/en/installfest/installfest.step +++ b/sites/installfest/installfest.step @@ -41,18 +41,12 @@ step "Read This Overview" do Here's a list of tools you'll be installing. As you go through the workshop, we'll explain what each one is for and how to use it. * **Ruby**. A programming language. -* **Rails**. A framework for making web applications with Ruby. It does a lot of the setting up work for you and creates a model-view-controller structure for your web application. We'll go into more detail about that later. -* **Git**. A revision or source control system. It creates a repository, which is a complete history of your programming changes, so you can undo changes and roll back to previous versions of your work if something has gone wrong. -* **GitHub**. (optional) -* **Heroku**. An application server, which hosts your application during development. This allows you to get your application online and interact with it from any browser, instead of just on your local machine. -* **Sublime Text 2** (or [some other editor](editors)). To write programs in Ruby, you need a text editor to create, edit and save Ruby files. -* Various useful "**Ruby gems**". Ruby gems are useful bits of Ruby code that someone has created for reuse, so you don't have to write it yourself. Including... - * bundler - * sqlite - -You will also create an account on Heroku, an application hosting platform. - -If you already have an account on Heroku, make sure you know your username and password. +* **Rails**. A framework for making web applications with Ruby. It does a lot of the setting up work for you, which is really handy, but we'll cover this in more detail a little later. +* **Git**. A revision or source control system. It creates a _repository_ (sometimes called a _repo_ for short), which is a complete history of your changes to what you're working on. This means you can undo changes and roll back to previous versions of your work if something has gone wrong. +* **GitHub** (optional). A place to store your Git repository online, so you can access it from any computer. +* **Heroku**. An _application server_, which hosts your application while you're working on it. This allows you to access your app online and interact with it from any browser, instead of just on your local computer. +* **Atom** (or [some other editor](editors)). To write programs in Ruby, you need a text editor to create, edit and save Ruby files. +* A couple of useful **Ruby gems**. Ruby gems are useful bits of Ruby code that someone has created for reuse, so you don't have to write it yourself. If you've already installed the above tools and are confident they are setup correctly, skip ahead to the Get a Sticker step. diff --git a/sites/en/installfest/linux.step b/sites/installfest/linux.step similarity index 81% rename from sites/en/installfest/linux.step rename to sites/installfest/linux.step index c7f512d29..5aedf715a 100644 --- a/sites/en/installfest/linux.step +++ b/sites/installfest/linux.step @@ -77,17 +77,13 @@ step "Install Rails" do console "gem install rails" end -step "Sublime Text 2" do +step "Atom" do message <<-MARKDOWN -If you don't have a preferred code editor, you can install Sublime Text 2. It's available for [32-bit machines](http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%202.0.1.tar.bz2) and [64-bit machines](http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%202.0.1%20x64.tar.bz2) +If you don't have a preferred code editor, you can install Atom. -Check for the latest version. +Checkout this section of the [Atom manual](http://flight-manual.atom.io/getting-started/sections/installing-atom/#platform-linux) for the latest instructions. MARKDOWN - - tip "How many bits?" do - message %q{If you're not sure, you're probably 32-bit. Run `uname -i` and see. "x86" in the filename means 32-bit, and "x86_64" means 64-bit.} - end end next_step "configure_git" diff --git a/sites/en/installfest/macintosh.step b/sites/installfest/macOS.step similarity index 84% rename from sites/en/installfest/macintosh.step rename to sites/installfest/macOS.step index 3c75d2c29..16dd27abc 100644 --- a/sites/en/installfest/macintosh.step +++ b/sites/installfest/macOS.step @@ -4,6 +4,8 @@ step "Learn your Mac OS X Version" do * Click on the Apple icon in the top left of your screen. * Select "About This Mac" * In the window that comes up, under the title "Mac OS X" there will be a version number. + * If it starts with 10.13, you have **High Sierra**. + * If it starts with 10.12, you have **Sierra**. * If it starts with 10.11, you have **El Capitan**. * If it starts with 10.10, you have **Yosemite**. * If it starts with 10.9, you have **Mavericks**. @@ -16,7 +18,7 @@ step "Learn your Mac OS X Version" do * Write down the Mac OS X version you have. * In addition, to the right of the "Processor", there will be the a processor type. - * If it ends with **Intel Core i7**, **Intel Core i5**, or **Intel Core i3**, you are good to go. + * If it ends with **Intel Core i7**, **Intel Core i5**, **Intel Core i3**, or **Intel Core m3** you are good to go. * If it ends with **Intel Core 2 Duo**, you are good to go. * If it ends with **Intel Core Duo** or something else, you are **NOT** good to go. Please flag down a volunteer. @@ -31,7 +33,7 @@ end step "Choose your instructions" do - option "El Capitan/Yosemite/Mavericks/Mountain Lion/Lion/Snow Leopard" do + option "High Sierra/Sierra/El Capitan/Yosemite/Mavericks/Mountain Lion/Lion/Snow Leopard" do link "osx_rvm" end option "Earlier than Snow Leopard" do diff --git a/sites/en/installfest/osx_rvm.step b/sites/installfest/osx_rvm.step similarity index 96% rename from sites/en/installfest/osx_rvm.step rename to sites/installfest/osx_rvm.step index dda81fb2a..da0f3da10 100644 --- a/sites/en/installfest/osx_rvm.step +++ b/sites/installfest/osx_rvm.step @@ -53,8 +53,8 @@ step "Install Rails" do end end -step "Install Sublime Text 2" do - insert "install_sublime_text_2_for_mac" +step "Install Atom" do + insert "install_atom_for_mac" end verify "successful installation" do diff --git a/sites/en/installfest/windows.step b/sites/installfest/windows.step similarity index 77% rename from sites/en/installfest/windows.step rename to sites/installfest/windows.step index dc64fcf2f..729cec802 100644 --- a/sites/en/installfest/windows.step +++ b/sites/installfest/windows.step @@ -6,7 +6,7 @@ MARKDOWN step "Run RailsInstaller" do message "RailsInstaller includes Rails, Ruby, Git and SQLite." - message "Go to , scroll to the 'Downloads' section, and download the RailsInstaller for Windows/Ruby 2.2." + message "Go to , scroll to the 'Downloads' section, and download the RailsInstaller for Windows/Ruby #{version_string(:ruby_short)}." message "Click on the downloaded file to run the install wizard. Click Next at each step to accept the defaults." message "Be sure to check the boxes for *Install git (recommended)* and *Add executables for Ruby, DevKit Git (if checked above) to the PATH*" @@ -82,6 +82,29 @@ step "Open a Terminal" do end end +step "Update RubyGems" do + message "The version of RubyGems that comes with RailsInstaller may be outdated. Follow these steps to upgrade it!" + + step "Check to see if you need to update" do + console "gem -v" + + message "If the output is **#{version_string(:windows_rubygems_min)}** or later, skip to the next step!" + end + + step "Install the latest version of RubyGems" do + message "Otherwise, run the following command:" + + console_without_message "gem update --system --no-document" + + message "**Close and reopen your command prompt**, then verify you have the upgraded RubyGems by typing this in the terminal:" + + console_without_message "gem -v" + fuzzy_result "#{version_string(:windows_rubygems_min_short)}{FUZZY}.9{/FUZZY}" + + message "As long as the version is at least **#{version_string(:windows_rubygems_min)}**, you should be fine!" + end +end + a name: 'install-node' step "Install Node.js" do @@ -94,7 +117,7 @@ step "Install Node.js" do message "Once your computer is back up, load **Command Prompt with Ruby and Rails** and..." console "node -v" - fuzzy_result "v4{FUZZY}.x.x{/FUZZY}" + fuzzy_result "v6{FUZZY}.x.x{/FUZZY}" end step "Update Rails" do @@ -108,7 +131,7 @@ end step "Sanity Check" do console "ruby -v" - fuzzy_result "ruby 2.2{FUZZY}.4{/FUZZY}" + fuzzy_result "ruby #{version_string(:ruby_short)}{FUZZY}.4{/FUZZY}" console "rails -v" fuzzy_result "Rails 5.0{FUZZY}.x{/FUZZY}" @@ -118,9 +141,15 @@ step "Sanity Check" do end step "Configure the Windows Terminal" do - message "Take a moment to configure the *Command Prompt with Ruby and Rails* so that it is a good height and width and has a nice font. Hint -- click to open the link below, and when you finish those steps, hit the **back** button in your browser to resume this procedure." + message "Take a moment to configure the *Command Prompt with Ruby and Rails* so that it is a good height and width and has a nice font." + + message "Right-click on the menu bar and select **Properties**" + + message "Under the *Font* tab, select Lucida Console from the font chooser box. This lets you view non-ascii characters." + + message "In the *Layout* tab, adjust *Window Size* so the window is about half as wide as your screen, and is as tall as possible without covering the task bar (this may require some trial and error)." - link "configure_the_windows_terminal" + message "Click OK." tip "Clearing the Terminal" do message "If you ever want to clear the terminal of all its cluttered output" @@ -144,11 +173,11 @@ step "Install a Text Editor" do message "Notepad is not a good programming editor, but it will work in a pinch." - important "**When in doubt, use Sublime Text 2.**" + important "**When in doubt, use Atom.**" - message "[Sublime Text 2](http://www.sublimetext.com/2) is a good option, if you don't have one yet." + message "[Atom](https://atom.io) is a good option, if you don't have one yet." - message "Download Sublime Text 2 here: " + message "Download Atom here: " end next_step "create_a_heroku_account" diff --git a/sites/en/intro-to-rails/CRUD_with_scaffolding.step b/sites/intro-to-rails/CRUD_with_scaffolding.step similarity index 90% rename from sites/en/intro-to-rails/CRUD_with_scaffolding.step rename to sites/intro-to-rails/CRUD_with_scaffolding.step index bd59c21b0..c4a0fbb6d 100644 --- a/sites/en/intro-to-rails/CRUD_with_scaffolding.step +++ b/sites/intro-to-rails/CRUD_with_scaffolding.step @@ -17,11 +17,13 @@ steps { step { console "rails server" + + tip "Now is a good time to figure out how to have multiple tabs or windows of your terminal or command prompt. Starting and stopping the Rails server all day is tedious, so it's good to have one terminal tab or window for running commands, and a separate one for the server." } step { message "Point your browser to [http://localhost:3000/topics](http://localhost:3000/topics)" - message "You should see the \"Listing topics\" page with headers for title and description, and a link to add a new topic:" + message "You should see the \"Topics\" page with headers for title and description, and a link to add a new topic:" img src: "img/Seattle_topic_list_page.png", alt: "Screenshot of topic list page" } diff --git a/sites/en/intro-to-rails/_consider_deploying.step b/sites/intro-to-rails/_consider_deploying.step similarity index 100% rename from sites/en/intro-to-rails/_consider_deploying.step rename to sites/intro-to-rails/_consider_deploying.step diff --git a/sites/en/intro-to-rails/_consider_deploying_again.step b/sites/intro-to-rails/_consider_deploying_again.step similarity index 100% rename from sites/en/intro-to-rails/_consider_deploying_again.step rename to sites/intro-to-rails/_consider_deploying_again.step diff --git a/sites/en/intro-to-rails/_deploying_to_heroku.step b/sites/intro-to-rails/_deploying_to_heroku.step similarity index 86% rename from sites/en/intro-to-rails/_deploying_to_heroku.step rename to sites/intro-to-rails/_deploying_to_heroku.step index 857bfd0e5..7fd11fb29 100644 --- a/sites/en/intro-to-rails/_deploying_to_heroku.step +++ b/sites/intro-to-rails/_deploying_to_heroku.step @@ -8,7 +8,7 @@ step "Edit the Gemfile" do message "Heroku will run our application slightly differently than our development computer does, which requires us to make a small change to our `Gemfile`." - message "Open the file called `Gemfile` in Sublime Text, or your preferred editor, and find the line containing:" + message "Open the file called `Gemfile` in Atom, or your preferred editor, and find the line containing:" source_code :ruby, <<-RUBY gem 'sqlite3' @@ -22,8 +22,7 @@ group :development, :test do end group :production do - gem 'pg' - gem 'rails_12factor' + gem 'pg', '~> 0.18' end RUBY end @@ -31,6 +30,7 @@ end step "Apply the Gemfile changes" do console "bundle install --without production" message "Every time the `Gemfile` changes, you need to run ``bundle install`` for the changes to be processed. The processed version of the changes is stored in another file called ``Gemfile.lock``." + message "Here we are bundling without the gems in the group ``production``." end step "Commit the Gemfile changes" do diff --git a/sites/en/intro-to-rails/_deploying_to_heroku_again.step b/sites/intro-to-rails/_deploying_to_heroku_again.step similarity index 93% rename from sites/en/intro-to-rails/_deploying_to_heroku_again.step rename to sites/intro-to-rails/_deploying_to_heroku_again.step index 8447d1810..753f43c7a 100644 --- a/sites/en/intro-to-rails/_deploying_to_heroku_again.step +++ b/sites/intro-to-rails/_deploying_to_heroku_again.step @@ -12,14 +12,14 @@ changes are: something like \"Added votes to the topics index\"." end step "Push changes to Heroku" do - console "git push heroku master" + console "git push heroku main" message "This takes all changes you've committed locally and pushes them to Heroku." end step "Run database migrations on Heroku" do - console "heroku run rake db:migrate" + console "heroku run rails db:migrate" message "This tells Heroku to run your migrations on its database, like -running `rake db:migrate` locally." +running `rails db:migrate` locally." message "Heroku's database is separate from the one on your computer, which means it needs to be updated every time you make changes to the structure of your database." @@ -57,5 +57,5 @@ required updating the `Gemfile` and bundling. li { message "Commit your changes (`git commit`)" } li { message "(repeat)" } end - message "Any time your changes are committed, you should feel free to `git push heroku master` and boom! Your changes are live!" + message "Any time your changes are committed, you should feel free to `git push heroku main` and boom! Your changes are live!" end diff --git a/sites/en/intro-to-rails/_switch_to_home_directory.step b/sites/intro-to-rails/_switch_to_home_directory.step similarity index 100% rename from sites/en/intro-to-rails/_switch_to_home_directory.step rename to sites/intro-to-rails/_switch_to_home_directory.step diff --git a/sites/en/intro-to-rails/_working_effectively_and_efficiently.md b/sites/intro-to-rails/_working_effectively_and_efficiently.md similarity index 100% rename from sites/en/intro-to-rails/_working_effectively_and_efficiently.md rename to sites/intro-to-rails/_working_effectively_and_efficiently.md diff --git a/sites/en/intro-to-rails/add_the_project_to_a_git_repo.step b/sites/intro-to-rails/add_the_project_to_a_git_repo.step similarity index 100% rename from sites/en/intro-to-rails/add_the_project_to_a_git_repo.step rename to sites/intro-to-rails/add_the_project_to_a_git_repo.step diff --git a/sites/en/intro-to-rails/allow_people_to_vote.step b/sites/intro-to-rails/allow_people_to_vote.step similarity index 95% rename from sites/en/intro-to-rails/allow_people_to_vote.step rename to sites/intro-to-rails/allow_people_to_vote.step index 4fe37e145..851d1dc94 100644 --- a/sites/en/intro-to-rails/allow_people_to_vote.step +++ b/sites/intro-to-rails/allow_people_to_vote.step @@ -38,7 +38,7 @@ steps { RUBY message <<-MARKDOWN - Verify that upvote route was added successfully by checking the output of `rake routes` or [http://localhost:3000/rails/info](http://localhost:3000/rails/info). You should see a line that looks like this: + Verify that upvote route was added successfully by checking the output of `rails routes` or [http://localhost:3000/rails/info](http://localhost:3000/rails/info). You should see a line that looks like this: ``` Prefix Verb URI Pattern Controller#Action diff --git a/sites/en/intro-to-rails/clean_up_links_on_the_topics_list.step b/sites/intro-to-rails/clean_up_links_on_the_topics_list.step similarity index 100% rename from sites/en/intro-to-rails/clean_up_links_on_the_topics_list.step rename to sites/intro-to-rails/clean_up_links_on_the_topics_list.step diff --git a/sites/en/intro-to-rails/creating_a_migration.step b/sites/intro-to-rails/creating_a_migration.step similarity index 70% rename from sites/en/intro-to-rails/creating_a_migration.step rename to sites/intro-to-rails/creating_a_migration.step index da81c8759..72d30f929 100644 --- a/sites/en/intro-to-rails/creating_a_migration.step +++ b/sites/intro-to-rails/creating_a_migration.step @@ -25,22 +25,19 @@ steps { } step { - console "rake db:migrate" + console "rails db:migrate" message "This tells Rails to update the database to include a table for our new model." } } explanation { - h2 "Rake" message <<-MARKDOWN -`rake` (**r**uby m**ake**) is a tool that allows you to run small Ruby programs (**tasks**) that you use often in your application. - -Here, `rake db:migrate` is a task provided by the Rails framework. It uses the migration file we just created (`db/migrate/201xxxxxxxxxxx_create_topics.rb`) to change the database. Database migration files can be crucial to code collaboration. +Here, `rails db:migrate` is a command provided by the Rails framework. It uses the migration file we just created (`db/migrate/201xxxxxxxxxxx_create_topics.rb`) to change the database. Database migration files can be crucial to code collaboration. MARKDOWN - tip "You can run `rake -T` to see a list of all the `rake` commands your app currently responds to, along with a short description of each task." + tip "You can run `rails --help` to see a list of all the `rails` commands your app currently responds to, along with a short description of each one." } diff --git a/sites/en/intro-to-rails/credits_and_next_steps.step b/sites/intro-to-rails/credits_and_next_steps.step similarity index 100% rename from sites/en/intro-to-rails/credits_and_next_steps.step rename to sites/intro-to-rails/credits_and_next_steps.step diff --git a/sites/en/intro-to-rails/deploying_to_heroku.step b/sites/intro-to-rails/deploying_to_heroku.step similarity index 100% rename from sites/en/intro-to-rails/deploying_to_heroku.step rename to sites/intro-to-rails/deploying_to_heroku.step diff --git a/sites/en/intro-to-rails/deploying_to_heroku_again.step b/sites/intro-to-rails/deploying_to_heroku_again.step similarity index 100% rename from sites/en/intro-to-rails/deploying_to_heroku_again.step rename to sites/intro-to-rails/deploying_to_heroku_again.step diff --git a/sites/en/intro-to-rails/getting_started.step b/sites/intro-to-rails/getting_started.step similarity index 90% rename from sites/en/intro-to-rails/getting_started.step rename to sites/intro-to-rails/getting_started.step index ccd896ad0..01ad21b9f 100644 --- a/sites/en/intro-to-rails/getting_started.step +++ b/sites/intro-to-rails/getting_started.step @@ -60,13 +60,13 @@ Open the suggestotron folder as a project in your text editor. tip "Close any files that are already open. They might be from yesterday's `test_app`, and we want to make sure that we're editing files in today's `suggestotron` app." message <<-MARKDOWN -In **Sublime Text 2**, you can use the `Project > Add Folder to Project...` menu option: +In **Atom**, you can use the `File > Add Project Folder...` menu option: -![Sublime Text Project menu screenshot](img/sublime_add_folder_to_project.png) +![Atom Project menu screenshot](img/atom_add_folder_to_project.png) -Select your `suggestotron` folder from the file picker that opens. If everything works out Sublime should show the directories of your app in a tree structure on the left: +Select your `suggestotron` folder from the file picker that opens. If everything works out Atom should show the directories of your app in a tree structure on the left: -![Screenshot of Suggestotron project folder tree in Sublime Text](img/sublime_project_as_folder.png) +![Screenshot of Suggestotron project folder tree in Atom](img/atom_project_as_folder.png) MARKDOWN end diff --git a/sites/en/intro-to-rails/glossary.step b/sites/intro-to-rails/glossary.step similarity index 100% rename from sites/en/intro-to-rails/glossary.step rename to sites/intro-to-rails/glossary.step diff --git a/sites/en/intro-to-rails/hooking_up_votes_and_topics.step b/sites/intro-to-rails/hooking_up_votes_and_topics.step similarity index 100% rename from sites/en/intro-to-rails/hooking_up_votes_and_topics.step rename to sites/intro-to-rails/hooking_up_votes_and_topics.step diff --git a/sites/intro-to-rails/img/Seattle_list_with_topic.png b/sites/intro-to-rails/img/Seattle_list_with_topic.png new file mode 100644 index 000000000..e693d8f27 Binary files /dev/null and b/sites/intro-to-rails/img/Seattle_list_with_topic.png differ diff --git a/sites/intro-to-rails/img/Seattle_topic_created.png b/sites/intro-to-rails/img/Seattle_topic_created.png new file mode 100644 index 000000000..77a8816f4 Binary files /dev/null and b/sites/intro-to-rails/img/Seattle_topic_created.png differ diff --git a/sites/intro-to-rails/img/Seattle_topic_list_page.png b/sites/intro-to-rails/img/Seattle_topic_list_page.png new file mode 100644 index 000000000..f4ef61124 Binary files /dev/null and b/sites/intro-to-rails/img/Seattle_topic_list_page.png differ diff --git a/sites/en/intro-to-rails/img/Start_page.png b/sites/intro-to-rails/img/Start_page.png similarity index 100% rename from sites/en/intro-to-rails/img/Start_page.png rename to sites/intro-to-rails/img/Start_page.png diff --git a/sites/intro-to-rails/img/atom_add_folder_to_project.png b/sites/intro-to-rails/img/atom_add_folder_to_project.png new file mode 100644 index 000000000..154db6d95 Binary files /dev/null and b/sites/intro-to-rails/img/atom_add_folder_to_project.png differ diff --git a/sites/intro-to-rails/img/atom_project_as_folder.png b/sites/intro-to-rails/img/atom_project_as_folder.png new file mode 100644 index 000000000..0996dd84a Binary files /dev/null and b/sites/intro-to-rails/img/atom_project_as_folder.png differ diff --git a/sites/intro-to-rails/img/finished_app.png b/sites/intro-to-rails/img/finished_app.png new file mode 100644 index 000000000..c24d282e6 Binary files /dev/null and b/sites/intro-to-rails/img/finished_app.png differ diff --git a/sites/en/intro-to-rails/img/mvc.png b/sites/intro-to-rails/img/mvc.png similarity index 100% rename from sites/en/intro-to-rails/img/mvc.png rename to sites/intro-to-rails/img/mvc.png diff --git a/sites/en/intro-to-rails/img/rails4_rails_info_routing.png b/sites/intro-to-rails/img/rails4_rails_info_routing.png similarity index 100% rename from sites/en/intro-to-rails/img/rails4_rails_info_routing.png rename to sites/intro-to-rails/img/rails4_rails_info_routing.png diff --git a/sites/en/intro-to-rails/img/workflow.png b/sites/intro-to-rails/img/workflow.png similarity index 100% rename from sites/en/intro-to-rails/img/workflow.png rename to sites/intro-to-rails/img/workflow.png diff --git a/sites/en/intro-to-rails/intro-to-rails.step b/sites/intro-to-rails/intro-to-rails.step similarity index 96% rename from sites/en/intro-to-rails/intro-to-rails.step rename to sites/intro-to-rails/intro-to-rails.step index b420918b9..69f0a102d 100755 --- a/sites/en/intro-to-rails/intro-to-rails.step +++ b/sites/intro-to-rails/intro-to-rails.step @@ -38,7 +38,7 @@ day. Probably. We're going to be working with: -* Ruby 2.2 or 2.3 installed via RVM (Mac or Linux) or RailsInstaller (Windows) +* Ruby 2.3 or greater installed via RVM (Mac or Linux) or RailsInstaller (Windows) * Rails 5.0.x * Bundler * SQLite diff --git a/sites/en/intro-to-rails/make_the_topic_title_a_link.step b/sites/intro-to-rails/make_the_topic_title_a_link.step similarity index 100% rename from sites/en/intro-to-rails/make_the_topic_title_a_link.step rename to sites/intro-to-rails/make_the_topic_title_a_link.step diff --git a/sites/en/intro-to-rails/rails_architecture.step b/sites/intro-to-rails/rails_architecture.step similarity index 88% rename from sites/en/intro-to-rails/rails_architecture.step rename to sites/intro-to-rails/rails_architecture.step index 3d20142ee..e356d0df2 100644 --- a/sites/en/intro-to-rails/rails_architecture.step +++ b/sites/intro-to-rails/rails_architecture.step @@ -22,8 +22,8 @@ explanation { h3 "Model" message <<-MARKDOWN -* For all the Models we create in RailsBridge, Model objects have a corresponding record in the the database. The name of the table in the database is the plural version of the Model's class name. For example, if the Model is called 'Duck', it will automatically query or write to the 'ducks' table in the database. -* Methods internal to Rails make it easy to automatically write records to the the database and query the database to get the records again later. +* For all the Models we create in RailsBridge, Model objects have a corresponding record in the database. The name of the table in the database is the plural version of the Model's class name. For example, if the Model is called 'Duck', it will automatically query or write to the 'ducks' table in the database. +* Methods internal to Rails make it easy to automatically write records to the database and query the database to get the records again later. * The Model is a bridge between the database and your application's code. MARKDOWN diff --git a/sites/en/intro-to-rails/redirect_to_the_topics_list_after_creating_a_new_topic.step b/sites/intro-to-rails/redirect_to_the_topics_list_after_creating_a_new_topic.step similarity index 100% rename from sites/en/intro-to-rails/redirect_to_the_topics_list_after_creating_a_new_topic.step rename to sites/intro-to-rails/redirect_to_the_topics_list_after_creating_a_new_topic.step diff --git a/sites/en/intro-to-rails/ruby_language.step b/sites/intro-to-rails/ruby_language.step similarity index 100% rename from sites/en/intro-to-rails/ruby_language.step rename to sites/intro-to-rails/ruby_language.step diff --git a/sites/en/intro-to-rails/running_your_application_locally.step b/sites/intro-to-rails/running_your_application_locally.step similarity index 100% rename from sites/en/intro-to-rails/running_your_application_locally.step rename to sites/intro-to-rails/running_your_application_locally.step diff --git a/sites/en/intro-to-rails/setting_the_default_page.step b/sites/intro-to-rails/setting_the_default_page.step similarity index 96% rename from sites/en/intro-to-rails/setting_the_default_page.step rename to sites/intro-to-rails/setting_the_default_page.step index 3fff2a053..a8f3db533 100644 --- a/sites/en/intro-to-rails/setting_the_default_page.step +++ b/sites/intro-to-rails/setting_the_default_page.step @@ -14,7 +14,7 @@ goals { steps { step "Add a root route" do - message "Open the file `config/routes.rb` in an editor (In the InstallFest yesterday, we suggested that you install and use **Sublime Text** as your editor)." + message "Open the file `config/routes.rb` in an editor (In the InstallFest yesterday, we suggested that you install and use **Atom** as your editor)." message "Look for the line `Rails.application.routes.draw` at the beginning of the file, and add the line `root 'topics#index'` after it. When you are done the start of the file should look like this:" @@ -48,11 +48,11 @@ explanation { possible URLs. To explore the URLs in more detail we can use the terminal. - At the terminal type `rake routes`. You should get something that + At the terminal type `rails routes`. You should get something that looks like this: ```` - $ rake routes + $ rails routes Prefix Verb URI Pattern Controller#Action topics GET /topics(.:format) topics#index diff --git a/sites/en/intro-to-rails/voting_on_topics.step b/sites/intro-to-rails/voting_on_topics.step similarity index 97% rename from sites/en/intro-to-rails/voting_on_topics.step rename to sites/intro-to-rails/voting_on_topics.step index 6bc428b68..d4776198b 100644 --- a/sites/en/intro-to-rails/voting_on_topics.step +++ b/sites/intro-to-rails/voting_on_topics.step @@ -10,7 +10,7 @@ goals { steps { console <<-SHELL rails generate model vote topic_id:integer -rake db:migrate +rails db:migrate SHELL } diff --git a/sites/en/javascript-snake-game/img/browser_console.png b/sites/javascript-snake-game/img/browser_console.png similarity index 100% rename from sites/en/javascript-snake-game/img/browser_console.png rename to sites/javascript-snake-game/img/browser_console.png diff --git a/sites/en/javascript-snake-game/javascript-snake-game.step b/sites/javascript-snake-game/javascript-snake-game.step similarity index 100% rename from sites/en/javascript-snake-game/javascript-snake-game.step rename to sites/javascript-snake-game/javascript-snake-game.step diff --git a/sites/en/javascript-snake-game/js-snake-game-tutorial.zip-manifest b/sites/javascript-snake-game/js-snake-game-tutorial.zip-manifest similarity index 100% rename from sites/en/javascript-snake-game/js-snake-game-tutorial.zip-manifest rename to sites/javascript-snake-game/js-snake-game-tutorial.zip-manifest diff --git a/sites/en/javascript-snake-game/js/chunk.js b/sites/javascript-snake-game/js/chunk.js similarity index 100% rename from sites/en/javascript-snake-game/js/chunk.js rename to sites/javascript-snake-game/js/chunk.js diff --git a/sites/en/javascript-snake-game/js/lesson-10.js b/sites/javascript-snake-game/js/lesson-10.js similarity index 100% rename from sites/en/javascript-snake-game/js/lesson-10.js rename to sites/javascript-snake-game/js/lesson-10.js diff --git a/sites/en/javascript-snake-game/js/lesson-11.js b/sites/javascript-snake-game/js/lesson-11.js similarity index 100% rename from sites/en/javascript-snake-game/js/lesson-11.js rename to sites/javascript-snake-game/js/lesson-11.js diff --git a/sites/en/javascript-snake-game/js/lesson-12.js b/sites/javascript-snake-game/js/lesson-12.js similarity index 100% rename from sites/en/javascript-snake-game/js/lesson-12.js rename to sites/javascript-snake-game/js/lesson-12.js diff --git a/sites/en/javascript-snake-game/js/lesson-13.js b/sites/javascript-snake-game/js/lesson-13.js similarity index 100% rename from sites/en/javascript-snake-game/js/lesson-13.js rename to sites/javascript-snake-game/js/lesson-13.js diff --git a/sites/en/javascript-snake-game/js/lesson-2.js b/sites/javascript-snake-game/js/lesson-2.js similarity index 100% rename from sites/en/javascript-snake-game/js/lesson-2.js rename to sites/javascript-snake-game/js/lesson-2.js diff --git a/sites/en/javascript-snake-game/js/lesson-3.js b/sites/javascript-snake-game/js/lesson-3.js similarity index 100% rename from sites/en/javascript-snake-game/js/lesson-3.js rename to sites/javascript-snake-game/js/lesson-3.js diff --git a/sites/en/javascript-snake-game/js/lesson-4.js b/sites/javascript-snake-game/js/lesson-4.js similarity index 100% rename from sites/en/javascript-snake-game/js/lesson-4.js rename to sites/javascript-snake-game/js/lesson-4.js diff --git a/sites/en/javascript-snake-game/js/lesson-5.js b/sites/javascript-snake-game/js/lesson-5.js similarity index 100% rename from sites/en/javascript-snake-game/js/lesson-5.js rename to sites/javascript-snake-game/js/lesson-5.js diff --git a/sites/en/javascript-snake-game/js/lesson-6.js b/sites/javascript-snake-game/js/lesson-6.js similarity index 100% rename from sites/en/javascript-snake-game/js/lesson-6.js rename to sites/javascript-snake-game/js/lesson-6.js diff --git a/sites/en/javascript-snake-game/js/lesson-7.js b/sites/javascript-snake-game/js/lesson-7.js similarity index 100% rename from sites/en/javascript-snake-game/js/lesson-7.js rename to sites/javascript-snake-game/js/lesson-7.js diff --git a/sites/en/javascript-snake-game/js/lesson-8.js b/sites/javascript-snake-game/js/lesson-8.js similarity index 100% rename from sites/en/javascript-snake-game/js/lesson-8.js rename to sites/javascript-snake-game/js/lesson-8.js diff --git a/sites/en/javascript-snake-game/js/lesson-9.js b/sites/javascript-snake-game/js/lesson-9.js similarity index 100% rename from sites/en/javascript-snake-game/js/lesson-9.js rename to sites/javascript-snake-game/js/lesson-9.js diff --git a/sites/en/javascript-snake-game/js/snake.js b/sites/javascript-snake-game/js/snake.js similarity index 100% rename from sites/en/javascript-snake-game/js/snake.js rename to sites/javascript-snake-game/js/snake.js diff --git a/sites/en/javascript-snake-game/lesson-1.step b/sites/javascript-snake-game/lesson-1.step similarity index 97% rename from sites/en/javascript-snake-game/lesson-1.step rename to sites/javascript-snake-game/lesson-1.step index 419c791e2..18b53bc7b 100644 --- a/sites/en/javascript-snake-game/lesson-1.step +++ b/sites/javascript-snake-game/lesson-1.step @@ -23,8 +23,7 @@ steps do When programming, you'll generally want these tools on hand: * Your browser to see the code running (I recommend Chrome) - * A text editor to change the code (I recommend Sublime) + * A text editor to change the code (Railsbridge recommends Atom, but you can try a different editor) * A javascript console so you can experiment and print out debugging messages. This is built into your browser. diff --git a/sites/en/javascript-snake-game/lesson-10.step b/sites/javascript-snake-game/lesson-10.step similarity index 96% rename from sites/en/javascript-snake-game/lesson-10.step rename to sites/javascript-snake-game/lesson-10.step index 27566f669..966eaf991 100644 --- a/sites/en/javascript-snake-game/lesson-10.step +++ b/sites/javascript-snake-game/lesson-10.step @@ -5,7 +5,7 @@ markdown <<-MARKDOWN segment further forward in snake to the current segment when it moves. This way all segments follow the same path! - Let's define a new function called `segmentFurtherDown` which takes a + Let's define a new function called `segmentFurtherForwardThan` which takes a segment index and a snake and returns the segment closer to the head. Let's start with: diff --git a/sites/en/javascript-snake-game/lesson-11.step b/sites/javascript-snake-game/lesson-11.step similarity index 100% rename from sites/en/javascript-snake-game/lesson-11.step rename to sites/javascript-snake-game/lesson-11.step diff --git a/sites/en/javascript-snake-game/lesson-12.step b/sites/javascript-snake-game/lesson-12.step similarity index 100% rename from sites/en/javascript-snake-game/lesson-12.step rename to sites/javascript-snake-game/lesson-12.step diff --git a/sites/en/javascript-snake-game/lesson-13.step b/sites/javascript-snake-game/lesson-13.step similarity index 100% rename from sites/en/javascript-snake-game/lesson-13.step rename to sites/javascript-snake-game/lesson-13.step diff --git a/sites/javascript-snake-game/lesson-14.step b/sites/javascript-snake-game/lesson-14.step new file mode 100644 index 000000000..c45903cde --- /dev/null +++ b/sites/javascript-snake-game/lesson-14.step @@ -0,0 +1,10 @@ +insert '../javascript-to-do-list/_deploying_your_site' + +message <<-MARKDOWN +# Credits + +This curriculum was originally written by +[Zassmin Montes de Oca](http://zassmin.com/) and +[Zee Spencer](http://www.zeespencer.com/), +and has been improved by all sorts of [lovely RailsBridge volunteers](https://github.com/railsbridge/docs/commits/master/sites/en/javascript-snake-game). +MARKDOWN diff --git a/sites/en/javascript-snake-game/lesson-2.step b/sites/javascript-snake-game/lesson-2.step similarity index 86% rename from sites/en/javascript-snake-game/lesson-2.step rename to sites/javascript-snake-game/lesson-2.step index 03a0824cc..ef1924d9f 100644 --- a/sites/en/javascript-snake-game/lesson-2.step +++ b/sites/javascript-snake-game/lesson-2.step @@ -86,9 +86,26 @@ js_expected_results 'lesson-2' MARKDOWN end + step "Comments" do + markdown <<-MARKDOWN + Sometimes it's nice to leave a clarifying note to future readers of the code (this could very well be you!) in plain English. This is called a comment, and it is only intended for humans to read, the computer knows to ignore them. + Here's what comments look like in JavaScript: + + ```js + // this is a one line comment, here we're creating an array + var drawableObjects = [drawableSnake]; + /* + this is a multi line comment + here we're drawing the snake + */ + CHUNK.draw(drawableObjects); + ``` + MARKDOWN + end + step "Play Time!" do markdown <<-MARKDOWN - * Add comments underneath each line explaining what it does in plain old english. + * Add comments above each line explaining what it does in plain old english. * Change the color of the snake. * Make the snake longer than just 1 segment! * Draw something in addition to the snake. Perhaps an apple or a wall? Make diff --git a/sites/en/javascript-snake-game/lesson-3.step b/sites/javascript-snake-game/lesson-3.step similarity index 100% rename from sites/en/javascript-snake-game/lesson-3.step rename to sites/javascript-snake-game/lesson-3.step diff --git a/sites/en/javascript-snake-game/lesson-4.step b/sites/javascript-snake-game/lesson-4.step similarity index 100% rename from sites/en/javascript-snake-game/lesson-4.step rename to sites/javascript-snake-game/lesson-4.step diff --git a/sites/en/javascript-snake-game/lesson-5.step b/sites/javascript-snake-game/lesson-5.step similarity index 100% rename from sites/en/javascript-snake-game/lesson-5.step rename to sites/javascript-snake-game/lesson-5.step diff --git a/sites/en/javascript-snake-game/lesson-6.step b/sites/javascript-snake-game/lesson-6.step similarity index 82% rename from sites/en/javascript-snake-game/lesson-6.step rename to sites/javascript-snake-game/lesson-6.step index 1f45bf777..41e5c5163 100644 --- a/sites/en/javascript-snake-game/lesson-6.step +++ b/sites/javascript-snake-game/lesson-6.step @@ -58,6 +58,25 @@ MARKDOWN js_expected_results 'lesson-6' markdown <<-MARKDOWN + ### Switch statement + + A `switch` statement is another way to organize a seried of `if` and `else if`s. Here's an example: + + ```js + switch(color) { + case "red": + return { action: "stop" }; + case "orange": + return { action: "wait" }; + case "green": + return { action: "go" }; + default: + return { action: "unknown" }; + } + ``` + + Can you figure out how to replace our snake game code above with a `switch` statement? (Don't worry, you'll see how we do it in the next lesson) + ### Play Time! * Use a switch statement instead of a series of ifs diff --git a/sites/en/javascript-snake-game/lesson-7.step b/sites/javascript-snake-game/lesson-7.step similarity index 100% rename from sites/en/javascript-snake-game/lesson-7.step rename to sites/javascript-snake-game/lesson-7.step diff --git a/sites/en/javascript-snake-game/lesson-8.step b/sites/javascript-snake-game/lesson-8.step similarity index 100% rename from sites/en/javascript-snake-game/lesson-8.step rename to sites/javascript-snake-game/lesson-8.step diff --git a/sites/en/javascript-snake-game/lesson-9.step b/sites/javascript-snake-game/lesson-9.step similarity index 100% rename from sites/en/javascript-snake-game/lesson-9.step rename to sites/javascript-snake-game/lesson-9.step diff --git a/sites/en/javascript-snake-game/zip_content/index.html b/sites/javascript-snake-game/zip_content/index.html similarity index 100% rename from sites/en/javascript-snake-game/zip_content/index.html rename to sites/javascript-snake-game/zip_content/index.html diff --git a/sites/en/javascript-snake-game/zip_content/snake.js b/sites/javascript-snake-game/zip_content/snake.js similarity index 100% rename from sites/en/javascript-snake-game/zip_content/snake.js rename to sites/javascript-snake-game/zip_content/snake.js diff --git a/sites/en/javascript-to-do-list-with-react/AdvancedTodoList.zip-manifest b/sites/javascript-to-do-list-with-react/AdvancedTodoList.zip-manifest similarity index 100% rename from sites/en/javascript-to-do-list-with-react/AdvancedTodoList.zip-manifest rename to sites/javascript-to-do-list-with-react/AdvancedTodoList.zip-manifest diff --git a/sites/en/javascript-to-do-list-with-react/adding_an_item.step b/sites/javascript-to-do-list-with-react/adding_an_item.step similarity index 100% rename from sites/en/javascript-to-do-list-with-react/adding_an_item.step rename to sites/javascript-to-do-list-with-react/adding_an_item.step diff --git a/sites/en/javascript-to-do-list-with-react/building_complex_applications_with_react.step b/sites/javascript-to-do-list-with-react/building_complex_applications_with_react.step similarity index 100% rename from sites/en/javascript-to-do-list-with-react/building_complex_applications_with_react.step rename to sites/javascript-to-do-list-with-react/building_complex_applications_with_react.step diff --git a/sites/en/javascript-to-do-list-with-react/creating_a_list.step b/sites/javascript-to-do-list-with-react/creating_a_list.step similarity index 100% rename from sites/en/javascript-to-do-list-with-react/creating_a_list.step rename to sites/javascript-to-do-list-with-react/creating_a_list.step diff --git a/sites/en/javascript-to-do-list-with-react/deploying_your_site.step b/sites/javascript-to-do-list-with-react/deploying_your_site.step similarity index 100% rename from sites/en/javascript-to-do-list-with-react/deploying_your_site.step rename to sites/javascript-to-do-list-with-react/deploying_your_site.step diff --git a/sites/en/javascript-to-do-list-with-react/developer_tools.step b/sites/javascript-to-do-list-with-react/developer_tools.step similarity index 100% rename from sites/en/javascript-to-do-list-with-react/developer_tools.step rename to sites/javascript-to-do-list-with-react/developer_tools.step diff --git a/sites/en/javascript-to-do-list-with-react/javascript-to-do-list-with-react.step b/sites/javascript-to-do-list-with-react/javascript-to-do-list-with-react.step similarity index 92% rename from sites/en/javascript-to-do-list-with-react/javascript-to-do-list-with-react.step rename to sites/javascript-to-do-list-with-react/javascript-to-do-list-with-react.step index 1be72941d..84e4a6b9f 100644 --- a/sites/en/javascript-to-do-list-with-react/javascript-to-do-list-with-react.step +++ b/sites/javascript-to-do-list-with-react/javascript-to-do-list-with-react.step @@ -40,8 +40,7 @@ When programming, you'll generally want these tools on hand: * An internet connection. We're going to be communicating with other websites using JavaScript. * Your browser to see the code running (I recommend Chrome, but any will do!) - * A text editor to change the code (I recommend Sublime) + * A text editor to change the code (Railsbridge recommends Atom, but you can try a different editor) * A javascript console so you can experiment and print out debugging messages. This is built into your browser. diff --git a/sites/en/javascript-to-do-list-with-react/loading_items.step b/sites/javascript-to-do-list-with-react/loading_items.step similarity index 100% rename from sites/en/javascript-to-do-list-with-react/loading_items.step rename to sites/javascript-to-do-list-with-react/loading_items.step diff --git a/sites/en/javascript-to-do-list-with-react/marking_an_item_as_complete.step b/sites/javascript-to-do-list-with-react/marking_an_item_as_complete.step similarity index 100% rename from sites/en/javascript-to-do-list-with-react/marking_an_item_as_complete.step rename to sites/javascript-to-do-list-with-react/marking_an_item_as_complete.step diff --git a/sites/en/javascript-to-do-list/next_steps.step b/sites/javascript-to-do-list-with-react/next_steps.step similarity index 77% rename from sites/en/javascript-to-do-list/next_steps.step rename to sites/javascript-to-do-list-with-react/next_steps.step index 2e327e880..5800a740b 100644 --- a/sites/en/javascript-to-do-list/next_steps.step +++ b/sites/javascript-to-do-list-with-react/next_steps.step @@ -20,3 +20,11 @@ ul do a "http://railsbridge.org/learn/resources", href: "http://railsbridge.org/learn/resources" end end + +message <<-MARKDOWN +# Credits + +This curriculum was originally written by +[Srinivas Rao](https://twitter.com/raorao_) +and has been improved by all sorts of [lovely RailsBridge volunteers](https://github.com/railsbridge/docs/commits/master/sites/en/javascript-to-do-list-with-react). +MARKDOWN diff --git a/sites/en/javascript-to-do-list-with-react/zip_content/app.js b/sites/javascript-to-do-list-with-react/zip_content/app.js similarity index 100% rename from sites/en/javascript-to-do-list-with-react/zip_content/app.js rename to sites/javascript-to-do-list-with-react/zip_content/app.js diff --git a/sites/en/javascript-to-do-list-with-react/zip_content/console-polyfill.js b/sites/javascript-to-do-list-with-react/zip_content/console-polyfill.js similarity index 100% rename from sites/en/javascript-to-do-list-with-react/zip_content/console-polyfill.js rename to sites/javascript-to-do-list-with-react/zip_content/console-polyfill.js diff --git a/sites/en/javascript-to-do-list-with-react/zip_content/debut_light.png b/sites/javascript-to-do-list-with-react/zip_content/debut_light.png similarity index 100% rename from sites/en/javascript-to-do-list-with-react/zip_content/debut_light.png rename to sites/javascript-to-do-list-with-react/zip_content/debut_light.png diff --git a/sites/en/javascript-to-do-list-with-react/zip_content/index.html b/sites/javascript-to-do-list-with-react/zip_content/index.html similarity index 100% rename from sites/en/javascript-to-do-list-with-react/zip_content/index.html rename to sites/javascript-to-do-list-with-react/zip_content/index.html diff --git a/sites/en/javascript-to-do-list-with-react/zip_content/store.js b/sites/javascript-to-do-list-with-react/zip_content/store.js similarity index 100% rename from sites/en/javascript-to-do-list-with-react/zip_content/store.js rename to sites/javascript-to-do-list-with-react/zip_content/store.js diff --git a/sites/en/javascript-to-do-list-with-react/zip_content/styles.css b/sites/javascript-to-do-list-with-react/zip_content/styles.css similarity index 100% rename from sites/en/javascript-to-do-list-with-react/zip_content/styles.css rename to sites/javascript-to-do-list-with-react/zip_content/styles.css diff --git a/sites/en/javascript-to-do-list/IntermediateTodoList.zip-manifest b/sites/javascript-to-do-list/IntermediateTodoList.zip-manifest similarity index 100% rename from sites/en/javascript-to-do-list/IntermediateTodoList.zip-manifest rename to sites/javascript-to-do-list/IntermediateTodoList.zip-manifest diff --git a/sites/en/javascript-to-do-list/_deploying_your_site.md b/sites/javascript-to-do-list/_deploying_your_site.md similarity index 90% rename from sites/en/javascript-to-do-list/_deploying_your_site.md rename to sites/javascript-to-do-list/_deploying_your_site.md index 2277556a1..608d627ed 100644 --- a/sites/en/javascript-to-do-list/_deploying_your_site.md +++ b/sites/javascript-to-do-list/_deploying_your_site.md @@ -7,7 +7,7 @@ There are three hosting options, depending on how much of a challenge you are lo for: * Use a static site hosting service -* Use git and Github Pages +* Use git and GitHub Pages * Roll your own with a hosting provider ### Using a Static Site Hosting Service @@ -24,10 +24,10 @@ javascript and have a working website. An easy one is Now you have a fully functioning site hosted online! Share the link with your friends and family and wow them with your skills! -### Using Git and Github Pages +### Using Git and GitHub Pages If you like with git and github, take a stab at setting up your site -with [Github Pages](http://pages.github.com/). The easiest thing to do is: +with [GitHub Pages](http://pages.github.com/). The easiest thing to do is: cd . 1. From the terminal, `cd` into your project directory @@ -36,7 +36,7 @@ cd . 1. Commit all the files 1. Create a remote repository on github for the project. 1. Follow their instructions for adding the github remote to your existing repo -1. Follow the instructions on [Github Pages](http://pages.github.com) for +1. Follow the instructions on [GitHub Pages](http://pages.github.com) for setting up a project site from scratch. 1. Make the `gh-pages` the default branch 1. Push it on up! diff --git a/sites/en/javascript-to-do-list/_lesson_format.md b/sites/javascript-to-do-list/_lesson_format.md similarity index 100% rename from sites/en/javascript-to-do-list/_lesson_format.md rename to sites/javascript-to-do-list/_lesson_format.md diff --git a/sites/en/javascript-to-do-list/_teachers_note.md b/sites/javascript-to-do-list/_teachers_note.md similarity index 100% rename from sites/en/javascript-to-do-list/_teachers_note.md rename to sites/javascript-to-do-list/_teachers_note.md diff --git a/sites/en/javascript-to-do-list/adding_an_item.step b/sites/javascript-to-do-list/adding_an_item.step similarity index 100% rename from sites/en/javascript-to-do-list/adding_an_item.step rename to sites/javascript-to-do-list/adding_an_item.step diff --git a/sites/en/javascript-to-do-list/creating_a_list.step b/sites/javascript-to-do-list/creating_a_list.step similarity index 100% rename from sites/en/javascript-to-do-list/creating_a_list.step rename to sites/javascript-to-do-list/creating_a_list.step diff --git a/sites/en/javascript-to-do-list/deploying_your_site.step b/sites/javascript-to-do-list/deploying_your_site.step similarity index 100% rename from sites/en/javascript-to-do-list/deploying_your_site.step rename to sites/javascript-to-do-list/deploying_your_site.step diff --git a/sites/en/javascript-to-do-list/developer_tools.step b/sites/javascript-to-do-list/developer_tools.step similarity index 100% rename from sites/en/javascript-to-do-list/developer_tools.step rename to sites/javascript-to-do-list/developer_tools.step diff --git a/sites/en/javascript-to-do-list/img/browser_console.png b/sites/javascript-to-do-list/img/browser_console.png similarity index 100% rename from sites/en/javascript-to-do-list/img/browser_console.png rename to sites/javascript-to-do-list/img/browser_console.png diff --git a/sites/en/javascript-to-do-list/img/finished_app.png b/sites/javascript-to-do-list/img/finished_app.png similarity index 100% rename from sites/en/javascript-to-do-list/img/finished_app.png rename to sites/javascript-to-do-list/img/finished_app.png diff --git a/sites/en/javascript-to-do-list/img/network_tab.png b/sites/javascript-to-do-list/img/network_tab.png similarity index 100% rename from sites/en/javascript-to-do-list/img/network_tab.png rename to sites/javascript-to-do-list/img/network_tab.png diff --git a/sites/en/javascript-to-do-list/img/text_editor_html.png b/sites/javascript-to-do-list/img/text_editor_html.png similarity index 100% rename from sites/en/javascript-to-do-list/img/text_editor_html.png rename to sites/javascript-to-do-list/img/text_editor_html.png diff --git a/sites/en/javascript-to-do-list/javascript-to-do-list.step b/sites/javascript-to-do-list/javascript-to-do-list.step similarity index 91% rename from sites/en/javascript-to-do-list/javascript-to-do-list.step rename to sites/javascript-to-do-list/javascript-to-do-list.step index e4fee9bb9..1aff077ae 100644 --- a/sites/en/javascript-to-do-list/javascript-to-do-list.step +++ b/sites/javascript-to-do-list/javascript-to-do-list.step @@ -38,8 +38,7 @@ When programming, you'll generally want these tools on hand: * An internet connection. We're going to be communicating with other websites using JavaScript. * Your browser to see the code running (I recommend Chrome, but any will do!) - * A text editor to change the code (I recommend Sublime) + * A text editor to change the code (Railsbridge recommends Atom, but you can try a different editor) * A Javascript console so you can experiment and print out debugging messages. This is built into your browser. diff --git a/sites/en/javascript-to-do-list/loading_items.step b/sites/javascript-to-do-list/loading_items.step similarity index 100% rename from sites/en/javascript-to-do-list/loading_items.step rename to sites/javascript-to-do-list/loading_items.step diff --git a/sites/en/javascript-to-do-list/marking_an_item_as_complete.step b/sites/javascript-to-do-list/marking_an_item_as_complete.step similarity index 100% rename from sites/en/javascript-to-do-list/marking_an_item_as_complete.step rename to sites/javascript-to-do-list/marking_an_item_as_complete.step diff --git a/sites/en/javascript-to-do-list-with-react/next_steps.step b/sites/javascript-to-do-list/next_steps.step similarity index 78% rename from sites/en/javascript-to-do-list-with-react/next_steps.step rename to sites/javascript-to-do-list/next_steps.step index 2e327e880..02b8a53cd 100644 --- a/sites/en/javascript-to-do-list-with-react/next_steps.step +++ b/sites/javascript-to-do-list/next_steps.step @@ -20,3 +20,11 @@ ul do a "http://railsbridge.org/learn/resources", href: "http://railsbridge.org/learn/resources" end end + +message <<-MARKDOWN +# Credits + +This curriculum was originally written by +[Srinivas Rao](https://twitter.com/raorao_) +and has been improved by all sorts of [lovely RailsBridge volunteers](https://github.com/railsbridge/docs/commits/master/sites/en/javascript-to-do-list). +MARKDOWN diff --git a/sites/en/javascript-to-do-list/playing_with_jquery.step b/sites/javascript-to-do-list/playing_with_jquery.step similarity index 98% rename from sites/en/javascript-to-do-list/playing_with_jquery.step rename to sites/javascript-to-do-list/playing_with_jquery.step index 4774d0cdc..45159ca1e 100644 --- a/sites/en/javascript-to-do-list/playing_with_jquery.step +++ b/sites/javascript-to-do-list/playing_with_jquery.step @@ -7,7 +7,7 @@ overview do message <<-MARKDOWN In addition to being a powerful programming language, Javascript allows you to make your web site interactive. You can use it to build anything from a simple animation to a giant web application like Twitter -or Github. It gives you total control to add, remove, or modify content you've made with HTML. +or GitHub. It gives you total control to add, remove, or modify content you've made with HTML. You can also use it to change styles and add or remove classes. In this lesson, we'll also be using jQuery to make interacting with the page easier. diff --git a/sites/en/javascript-to-do-list/programming_with_javascript.step b/sites/javascript-to-do-list/programming_with_javascript.step similarity index 100% rename from sites/en/javascript-to-do-list/programming_with_javascript.step rename to sites/javascript-to-do-list/programming_with_javascript.step diff --git a/sites/en/javascript-to-do-list/the_basics_of_a_website.step b/sites/javascript-to-do-list/the_basics_of_a_website.step similarity index 100% rename from sites/en/javascript-to-do-list/the_basics_of_a_website.step rename to sites/javascript-to-do-list/the_basics_of_a_website.step diff --git a/sites/en/javascript-to-do-list/zip_content/app.js b/sites/javascript-to-do-list/zip_content/app.js similarity index 100% rename from sites/en/javascript-to-do-list/zip_content/app.js rename to sites/javascript-to-do-list/zip_content/app.js diff --git a/sites/en/javascript-to-do-list/zip_content/debut_light.png b/sites/javascript-to-do-list/zip_content/debut_light.png similarity index 100% rename from sites/en/javascript-to-do-list/zip_content/debut_light.png rename to sites/javascript-to-do-list/zip_content/debut_light.png diff --git a/sites/en/javascript-to-do-list/zip_content/index.html b/sites/javascript-to-do-list/zip_content/index.html similarity index 100% rename from sites/en/javascript-to-do-list/zip_content/index.html rename to sites/javascript-to-do-list/zip_content/index.html diff --git a/sites/en/javascript-to-do-list/zip_content/styles.css b/sites/javascript-to-do-list/zip_content/styles.css similarity index 100% rename from sites/en/javascript-to-do-list/zip_content/styles.css rename to sites/javascript-to-do-list/zip_content/styles.css diff --git a/sites/en/job-board/add_a_navbar.step b/sites/job-board/add_a_navbar.step similarity index 100% rename from sites/en/job-board/add_a_navbar.step rename to sites/job-board/add_a_navbar.step diff --git a/sites/en/job-board/add_a_new_job_form.step b/sites/job-board/add_a_new_job_form.step similarity index 98% rename from sites/en/job-board/add_a_new_job_form.step rename to sites/job-board/add_a_new_job_form.step index cf30583f9..17520d5a3 100644 --- a/sites/en/job-board/add_a_new_job_form.step +++ b/sites/job-board/add_a_new_job_form.step @@ -78,6 +78,6 @@ RUBY message "Now we should see our mostly unstyled form!" -discussion_box "Form HTML", "What HTML did the form helpers produce? Using the web inspector, look through the form code and compare it to the file you've been working on in Sublime." +discussion_box "Form HTML", "What HTML did the form helpers produce? Using the web inspector, look through the form code and compare it to the file you've been working on in Atom." next_step "make_the_form_work" diff --git a/sites/en/job-board/add_more_things.step b/sites/job-board/add_more_things.step similarity index 72% rename from sites/en/job-board/add_more_things.step rename to sites/job-board/add_more_things.step index 34fb14c95..96322f257 100644 --- a/sites/en/job-board/add_more_things.step +++ b/sites/job-board/add_more_things.step @@ -15,4 +15,8 @@ message <<-MARKDOWN * Add a user model and auth with Devise * Test it! Write a controller spec. + ## Credits + + This curriculum was originally written by [Lillie Chilen](http://www.twitter.com/lilliealbert) + and has been improved by all sorts of [lovely RailsBridge volunteers](https://github.com/railsbridge/docs/commits/master/sites/en/job-board). MARKDOWN diff --git a/sites/en/job-board/create_a_rails_app.step b/sites/job-board/create_a_rails_app.step similarity index 93% rename from sites/en/job-board/create_a_rails_app.step rename to sites/job-board/create_a_rails_app.step index a40950b08..4f03b75e3 100644 --- a/sites/en/job-board/create_a_rails_app.step +++ b/sites/job-board/create_a_rails_app.step @@ -27,21 +27,21 @@ message <<-MARKDOWN Watch all the files that are created! Wow! - # Open the project in Sublime Text + # Open the project in Atom MARKDOWN console_with_message "Move into the directory for your new Rails app:", "cd job_board" message <<-MARKDOWN - And open the project in Sublime: + And open the project in Atom: - * Open Sublime + * Open Atom * Under Project, choose "Add Folder to Project" (You must have at least one window open, so if that option is greyed out, open a window with cmd+n (Mac) or ctl+n (PC)) MARKDOWN -discussion_box "Text Editor vs Command Line", "Review the differences between the the command line and your text editor, even if everyone already knows!" +discussion_box "Text Editor vs Command Line", "Review the differences between the command line and your text editor, even if everyone already knows!" message "# Let's Talk About Dependencies" diff --git a/sites/en/job-board/crud_and_resourceful_routing.step b/sites/job-board/crud_and_resourceful_routing.step similarity index 100% rename from sites/en/job-board/crud_and_resourceful_routing.step rename to sites/job-board/crud_and_resourceful_routing.step diff --git a/sites/en/job-board/delete_job_listings.step b/sites/job-board/delete_job_listings.step similarity index 100% rename from sites/en/job-board/delete_job_listings.step rename to sites/job-board/delete_job_listings.step diff --git a/sites/en/job-board/img/crud_grid.jpg b/sites/job-board/img/crud_grid.jpg similarity index 100% rename from sites/en/job-board/img/crud_grid.jpg rename to sites/job-board/img/crud_grid.jpg diff --git a/sites/en/job-board/img/crud_rails_methods.jpg b/sites/job-board/img/crud_rails_methods.jpg similarity index 100% rename from sites/en/job-board/img/crud_rails_methods.jpg rename to sites/job-board/img/crud_rails_methods.jpg diff --git a/sites/en/job-board/img/rails-routes.png b/sites/job-board/img/rails-routes.png similarity index 100% rename from sites/en/job-board/img/rails-routes.png rename to sites/job-board/img/rails-routes.png diff --git a/sites/en/job-board/img/request-cycle.jpg b/sites/job-board/img/request-cycle.jpg similarity index 100% rename from sites/en/job-board/img/request-cycle.jpg rename to sites/job-board/img/request-cycle.jpg diff --git a/sites/en/job-board/job-board.step b/sites/job-board/job-board.step similarity index 100% rename from sites/en/job-board/job-board.step rename to sites/job-board/job-board.step diff --git a/sites/en/job-board/listing_the_jobs.step b/sites/job-board/listing_the_jobs.step similarity index 96% rename from sites/en/job-board/listing_the_jobs.step rename to sites/job-board/listing_the_jobs.step index 1ecf8742d..1a6eeccd7 100644 --- a/sites/en/job-board/listing_the_jobs.step +++ b/sites/job-board/listing_the_jobs.step @@ -27,7 +27,7 @@ discussion_box "Rails Console", <<-MARKDOWN * Try running `Job.all.to_sql`. What does that do? * Try selecting an individual Job record. - * Try updating an that individual record from the console! + * Try updating that individual record from the console! MARKDOWN message "# Show those jobs!" diff --git a/sites/en/job-board/make_a_jobs_home_page.step b/sites/job-board/make_a_jobs_home_page.step similarity index 95% rename from sites/en/job-board/make_a_jobs_home_page.step rename to sites/job-board/make_a_jobs_home_page.step index 2fa53b5de..896107c53 100644 --- a/sites/en/job-board/make_a_jobs_home_page.step +++ b/sites/job-board/make_a_jobs_home_page.step @@ -21,13 +21,13 @@ message <<-MARKDOWN So it's looking for a route, but can't find one. Let's add one! - Open up the routes file. It's in the config directory, called `routes.rb`. If you're using Sublime Text 2, you can open it using keyboard shortcuts: + Open up the routes file. It's in the config directory, called `routes.rb`. If you're using Atom, you can open it using keyboard shortcuts: * Hitting cmd + p (on Mac) or ctl + p (on PC) * typing in `route` * hitting enter - Magic! (Sublime is using fuzzy search, so you can use the entire file path, or just part of the filename to go to files.) + Magic! (Atom is using fuzzy search, so you can use the entire file path, or just part of the filename to go to files.) MARKDOWN source_code_with_message "We're going to need a resource route, which will create EIGHT different routes for us. Add this to line two:", :ruby, "resources :jobs" diff --git a/sites/en/job-board/make_the_form_work.step b/sites/job-board/make_the_form_work.step similarity index 100% rename from sites/en/job-board/make_the_form_work.step rename to sites/job-board/make_the_form_work.step diff --git a/sites/en/job-board/store_jobs_in_the_database.step b/sites/job-board/store_jobs_in_the_database.step similarity index 89% rename from sites/en/job-board/store_jobs_in_the_database.step rename to sites/job-board/store_jobs_in_the_database.step index ff4b01566..c9aa51357 100644 --- a/sites/en/job-board/store_jobs_in_the_database.step +++ b/sites/job-board/store_jobs_in_the_database.step @@ -48,7 +48,7 @@ RUBY message <<-MARKDOWN Running this code will make a table in our database called jobs. Right now it just has the timestamps (`created_at` and `updated_at`). What else should a job have? Let's start with a title and description. - Add the the title and description so it looks like this: + Add the title and description so it looks like this: MARKDOWN source_code :ruby, <<-RUBY @@ -61,10 +61,10 @@ RUBY message "Now we need to execute this file, so that the database schema gets updated." -console "rake db:migrate" +console "rails db:migrate" message <<-MARKDOWN - This uses a utility called rake to run a task called `db:migrate`, which in turn looks through all of your migration files and runs any that haven't already been run at some point in the past. + This tells Rails to run any migration files that haven't already been run at some point in the past. MARKDOWN discussion_box "Why do we use migrations?", diff --git a/sites/en/job-board/the_request_cycle.step b/sites/job-board/the_request_cycle.step similarity index 100% rename from sites/en/job-board/the_request_cycle.step rename to sites/job-board/the_request_cycle.step diff --git a/sites/en/job-board/update_job_listings.step b/sites/job-board/update_job_listings.step similarity index 96% rename from sites/en/job-board/update_job_listings.step rename to sites/job-board/update_job_listings.step index cb194b6ce..52ceb2803 100644 --- a/sites/en/job-board/update_job_listings.step +++ b/sites/job-board/update_job_listings.step @@ -14,7 +14,7 @@ message "So, it looks like if we want to edit the job description, we should vis error_box "The action 'edit' could not be found for JobsController" -source_code_with_message "We've seen this before, right? Let's add the controller action:", +source_code_with_message "We've seen this before, right? Let's add the controller action above the word `private`:", <<-RUBY def edit end @@ -102,7 +102,7 @@ MARKDOWN error_box "The action 'update' could not be found for JobsController" -source_code_with_message "So it looks like the form is finding the right route, but the method is missing from the controller. Let's add the update method to the file jobs_controller.rb", :ruby, +source_code_with_message "So it looks like the form is finding the right route, but the method is missing from the controller. Let's add the update method--again, above the word `private`--to the file jobs_controller.rb", :ruby, <<-RUBY def update end @@ -148,7 +148,7 @@ source_code_with_message "Here's what the update method should actually look lik <<-RUBY def update @job = Job.find(params[:id]) - @job.update_attributes(job_params) + @job.update(job_params) redirect_to jobs_path end RUBY diff --git a/sites/en/learn-to-code/argv.md b/sites/learn-to-code/argv.md similarity index 100% rename from sites/en/learn-to-code/argv.md rename to sites/learn-to-code/argv.md diff --git a/sites/en/learn-to-code/arrays.md b/sites/learn-to-code/arrays.md similarity index 100% rename from sites/en/learn-to-code/arrays.md rename to sites/learn-to-code/arrays.md diff --git a/sites/en/learn-to-code/computers.md b/sites/learn-to-code/computers.md similarity index 100% rename from sites/en/learn-to-code/computers.md rename to sites/learn-to-code/computers.md diff --git a/sites/en/learn-to-code/extra.md b/sites/learn-to-code/extra.md similarity index 100% rename from sites/en/learn-to-code/extra.md rename to sites/learn-to-code/extra.md diff --git a/sites/en/learn-to-code/functions.md b/sites/learn-to-code/functions.md similarity index 100% rename from sites/en/learn-to-code/functions.md rename to sites/learn-to-code/functions.md diff --git a/sites/en/learn-to-code/hashes.md b/sites/learn-to-code/hashes.md similarity index 100% rename from sites/en/learn-to-code/hashes.md rename to sites/learn-to-code/hashes.md diff --git a/sites/en/learn-to-code/img/cookie-recipe.gif b/sites/learn-to-code/img/cookie-recipe.gif similarity index 100% rename from sites/en/learn-to-code/img/cookie-recipe.gif rename to sites/learn-to-code/img/cookie-recipe.gif diff --git a/sites/en/learn-to-code/img/dot.jpg b/sites/learn-to-code/img/dot.jpg similarity index 100% rename from sites/en/learn-to-code/img/dot.jpg rename to sites/learn-to-code/img/dot.jpg diff --git a/sites/en/learn-to-code/img/fruit-banana-snack-banana.svg b/sites/learn-to-code/img/fruit-banana-snack-banana.svg similarity index 100% rename from sites/en/learn-to-code/img/fruit-banana-snack-banana.svg rename to sites/learn-to-code/img/fruit-banana-snack-banana.svg diff --git a/sites/en/learn-to-code/img/one-infinite-loop.jpg b/sites/learn-to-code/img/one-infinite-loop.jpg similarity index 100% rename from sites/en/learn-to-code/img/one-infinite-loop.jpg rename to sites/learn-to-code/img/one-infinite-loop.jpg diff --git a/sites/en/learn-to-code/img/snack-apple.svg b/sites/learn-to-code/img/snack-apple.svg similarity index 100% rename from sites/en/learn-to-code/img/snack-apple.svg rename to sites/learn-to-code/img/snack-apple.svg diff --git a/sites/en/learn-to-code/img/snack-fruit.svg b/sites/learn-to-code/img/snack-fruit.svg similarity index 100% rename from sites/en/learn-to-code/img/snack-fruit.svg rename to sites/learn-to-code/img/snack-fruit.svg diff --git a/sites/en/learn-to-code/img/spoon.jpg b/sites/learn-to-code/img/spoon.jpg similarity index 100% rename from sites/en/learn-to-code/img/spoon.jpg rename to sites/learn-to-code/img/spoon.jpg diff --git a/sites/en/learn-to-code/img/truthiness.png b/sites/learn-to-code/img/truthiness.png similarity index 100% rename from sites/en/learn-to-code/img/truthiness.png rename to sites/learn-to-code/img/truthiness.png diff --git a/sites/en/learn-to-code/img/warehouse.jpg b/sites/learn-to-code/img/warehouse.jpg similarity index 100% rename from sites/en/learn-to-code/img/warehouse.jpg rename to sites/learn-to-code/img/warehouse.jpg diff --git a/sites/en/learn-to-code/img/wargames-terminal.jpg b/sites/learn-to-code/img/wargames-terminal.jpg similarity index 100% rename from sites/en/learn-to-code/img/wargames-terminal.jpg rename to sites/learn-to-code/img/wargames-terminal.jpg diff --git a/sites/en/learn-to-code/input_and_output.md b/sites/learn-to-code/input_and_output.md similarity index 100% rename from sites/en/learn-to-code/input_and_output.md rename to sites/learn-to-code/input_and_output.md diff --git a/sites/en/learn-to-code/learn-to-code.md b/sites/learn-to-code/learn-to-code.md similarity index 89% rename from sites/en/learn-to-code/learn-to-code.md rename to sites/learn-to-code/learn-to-code.md index 36f731881..fc5c97251 100644 --- a/sites/en/learn-to-code/learn-to-code.md +++ b/sites/learn-to-code/learn-to-code.md @@ -19,7 +19,7 @@ You may have never programmed before. Now you will. * most coding happens in a team * pair programming is awesome - + # What is coding? @@ -70,8 +70,7 @@ Follow along at http://docs.railsbridge.org/learn-to-code * Ruby version 2.3 preferred, but 1.9+ is fine too * run `ruby -v` to check * a text editor - * e.g. Sublime Text 2 - * http://www.sublimetext.com/2 + * we recommend [Atom](https://atom.io/), but you can try a [different editor](/installfest/editors) * If you do not have both of these things, RAISE YOUR HAND * visit http://installfest.railsbridge.org for more instructions diff --git a/sites/en/learn-to-code/logic.md b/sites/learn-to-code/logic.md similarity index 100% rename from sites/en/learn-to-code/logic.md rename to sites/learn-to-code/logic.md diff --git a/sites/en/learn-to-code/loops.md b/sites/learn-to-code/loops.md similarity index 100% rename from sites/en/learn-to-code/loops.md rename to sites/learn-to-code/loops.md diff --git a/sites/en/learn-to-code/methods.md b/sites/learn-to-code/methods.md similarity index 100% rename from sites/en/learn-to-code/methods.md rename to sites/learn-to-code/methods.md diff --git a/sites/en/learn-to-code/next_steps.md b/sites/learn-to-code/next_steps.md similarity index 83% rename from sites/en/learn-to-code/next_steps.md rename to sites/learn-to-code/next_steps.md index e3168f375..211bf927f 100644 --- a/sites/en/learn-to-code/next_steps.md +++ b/sites/learn-to-code/next_steps.md @@ -14,6 +14,8 @@ # Thanks -* to all the TAs +* to all the TAs! * to all the students! +* to [Alex Chaffee](http://alexchaffee.com/), the original author of this curriculum, and +* to all the [RailsBridge volunteers](https://github.com/railsbridge/docs/commits/master/sites/en/learn-to-code) who have helped make it better! diff --git a/sites/en/learn-to-code/nil.md b/sites/learn-to-code/nil.md similarity index 100% rename from sites/en/learn-to-code/nil.md rename to sites/learn-to-code/nil.md diff --git a/sites/en/learn-to-code/numbers.md b/sites/learn-to-code/numbers.md similarity index 100% rename from sites/en/learn-to-code/numbers.md rename to sites/learn-to-code/numbers.md diff --git a/sites/en/learn-to-code/objects.md b/sites/learn-to-code/objects.md similarity index 100% rename from sites/en/learn-to-code/objects.md rename to sites/learn-to-code/objects.md diff --git a/sites/en/learn-to-code/sinatra.md b/sites/learn-to-code/sinatra.md similarity index 100% rename from sites/en/learn-to-code/sinatra.md rename to sites/learn-to-code/sinatra.md diff --git a/sites/en/learn-to-code/strings.md b/sites/learn-to-code/strings.md similarity index 100% rename from sites/en/learn-to-code/strings.md rename to sites/learn-to-code/strings.md diff --git a/sites/en/learn-to-code/the_command_line.md b/sites/learn-to-code/the_command_line.md similarity index 97% rename from sites/en/learn-to-code/the_command_line.md rename to sites/learn-to-code/the_command_line.md index c007e8d0b..6397782d9 100644 --- a/sites/en/learn-to-code/the_command_line.md +++ b/sites/learn-to-code/the_command_line.md @@ -76,8 +76,8 @@ * a text editor is a program that edits a text file * a text editor is *like* a word processor * but a text editor is **not** a word processor -* You probably have *Sublime Text* - * others include *TextMate*, *Notepad++* +* You probably have *Atom* + * or [another text editor](/installfest/editors) * but **NOT** *TextEdit* or *Notepad* or *Microsoft Word* # Source File diff --git a/sites/en/learn-to-code/todo-learntocode.md b/sites/learn-to-code/todo-learntocode.md similarity index 100% rename from sites/en/learn-to-code/todo-learntocode.md rename to sites/learn-to-code/todo-learntocode.md diff --git a/sites/en/learn-to-code/variables.md b/sites/learn-to-code/variables.md similarity index 100% rename from sites/en/learn-to-code/variables.md rename to sites/learn-to-code/variables.md diff --git a/sites/en/message-board/add_other_features_of_your_choosing.step b/sites/message-board/add_other_features_of_your_choosing.step similarity index 68% rename from sites/en/message-board/add_other_features_of_your_choosing.step rename to sites/message-board/add_other_features_of_your_choosing.step index 83987c310..836d3d56b 100644 --- a/sites/en/message-board/add_other_features_of_your_choosing.step +++ b/sites/message-board/add_other_features_of_your_choosing.step @@ -6,11 +6,18 @@ Suggestions: * Profile pages for users (enter user’s name or details, have it display alongside posts). * Post/Comment history for individual users (on their profile page?). * Easy user profile pictures with [Gravatar](https://gravatar.com/). -* Add login options with [Omniauth](https://github.com/intridea/omniauth), including Twitter, Facebook, Github, Google, and more. +* Add login options with [Omniauth](https://github.com/intridea/omniauth), including Twitter, Facebook, GitHub, Google, and more. * Check out the Devise [documentation for integrating with Omniauth](https://github.com/plataformatec/devise/wiki/OmniAuth:-Overview). * Fiddle with the layout of the show page so it doesn't look bad. If it looks bad. It probably looks great. * Perhaps fancier post markup with Markdown or something similar. * Deploy to Heroku and send your message board to all your friends! ## ...and that's that! Good luck! Make more things! Come back again! + +# Credits + +This curriculum was originally written by +[Lillie Chilen](http://www.twitter.com/lilliealbert) and +[Travis Grathwell](https://github.com/tjgrathwell), +and has been improved by all sorts of [lovely RailsBridge volunteers](https://github.com/railsbridge/docs/commits/master/sites/en/message-board). MARKDOWN diff --git a/sites/en/message-board/add_pages_to_create_and_look_at_individual_posts.step b/sites/message-board/add_pages_to_create_and_look_at_individual_posts.step similarity index 100% rename from sites/en/message-board/add_pages_to_create_and_look_at_individual_posts.step rename to sites/message-board/add_pages_to_create_and_look_at_individual_posts.step diff --git a/sites/en/message-board/add_replying.step b/sites/message-board/add_replying.step similarity index 100% rename from sites/en/message-board/add_replying.step rename to sites/message-board/add_replying.step diff --git a/sites/en/message-board/commands.md b/sites/message-board/commands.md similarity index 97% rename from sites/en/message-board/commands.md rename to sites/message-board/commands.md index 83810651c..b61bd3edd 100644 --- a/sites/en/message-board/commands.md +++ b/sites/message-board/commands.md @@ -32,7 +32,7 @@ Create a new [Rails model] Update the database to match what you have described in your code - rake db:migrate + rails db:migrate Run the application locally (Ctrl-C to quit) @@ -44,7 +44,7 @@ Start an interactive Ruby session that knows about your Rails models (type 'exit Print the routes for your application - rake routes + rails routes ## Browser diff --git a/sites/en/message-board/create_a_new_rails_app_with_a_static_home_page.step b/sites/message-board/create_a_new_rails_app_with_a_static_home_page.step similarity index 100% rename from sites/en/message-board/create_a_new_rails_app_with_a_static_home_page.step rename to sites/message-board/create_a_new_rails_app_with_a_static_home_page.step diff --git a/sites/en/message-board/creating_a_new_controller.md b/sites/message-board/creating_a_new_controller.md similarity index 100% rename from sites/en/message-board/creating_a_new_controller.md rename to sites/message-board/creating_a_new_controller.md diff --git a/sites/en/message-board/img/create_post.png b/sites/message-board/img/create_post.png similarity index 100% rename from sites/en/message-board/img/create_post.png rename to sites/message-board/img/create_post.png diff --git a/sites/en/message-board/img/create_reply.png b/sites/message-board/img/create_reply.png similarity index 100% rename from sites/en/message-board/img/create_reply.png rename to sites/message-board/img/create_reply.png diff --git a/sites/en/message-board/img/header.png b/sites/message-board/img/header.png similarity index 100% rename from sites/en/message-board/img/header.png rename to sites/message-board/img/header.png diff --git a/sites/en/message-board/img/inline_reply.png b/sites/message-board/img/inline_reply.png similarity index 100% rename from sites/en/message-board/img/inline_reply.png rename to sites/message-board/img/inline_reply.png diff --git a/sites/en/message-board/img/post_index.png b/sites/message-board/img/post_index.png similarity index 100% rename from sites/en/message-board/img/post_index.png rename to sites/message-board/img/post_index.png diff --git a/sites/en/message-board/img/request-cycle.jpg b/sites/message-board/img/request-cycle.jpg similarity index 100% rename from sites/en/message-board/img/request-cycle.jpg rename to sites/message-board/img/request-cycle.jpg diff --git a/sites/en/message-board/img/show_post.png b/sites/message-board/img/show_post.png similarity index 100% rename from sites/en/message-board/img/show_post.png rename to sites/message-board/img/show_post.png diff --git a/sites/en/message-board/img/show_replies.png b/sites/message-board/img/show_replies.png similarity index 100% rename from sites/en/message-board/img/show_replies.png rename to sites/message-board/img/show_replies.png diff --git a/sites/en/message-board/img/static_home_page.png b/sites/message-board/img/static_home_page.png similarity index 100% rename from sites/en/message-board/img/static_home_page.png rename to sites/message-board/img/static_home_page.png diff --git a/sites/en/message-board/inline_replying_on_a_post.step b/sites/message-board/inline_replying_on_a_post.step similarity index 100% rename from sites/en/message-board/inline_replying_on_a_post.step rename to sites/message-board/inline_replying_on_a_post.step diff --git a/sites/en/message-board/install_devise.step b/sites/message-board/install_devise.step similarity index 94% rename from sites/en/message-board/install_devise.step rename to sites/message-board/install_devise.step index 2a62078f9..ee48163f1 100644 --- a/sites/en/message-board/install_devise.step +++ b/sites/message-board/install_devise.step @@ -16,7 +16,7 @@ discussion do message <<-MARKDOWN * What is Devise? * What files did Devise add to your rails app? -* Someone Who Knows: explain how to read the output of the command `rake routes`. What does it give you? How is it helpful? +* Someone Who Knows: explain how to read the output of the command `rails routes`. What does it give you? How is it helpful? * How will you add the log out link? What's the syntax for a DELETE action? * You're going to be editing your application layout to add error messaging. If you haven't already, discuss the relationship between the application layout and all the other views you'll be creating. MARKDOWN @@ -36,7 +36,7 @@ message <<-MARKDOWN * The convention for naming models is to capitalize the first letter, like: User. * When you run `rails generate devise:install`, you get five instructions for things to configure. 3 & 4 are good to do. * The routes file goes through many common types of routes in the comments. This is also your friend. -* Devise has some magic that will help you with your logout link. Run `rake routes` and look for a route that helps you sign out. +* Devise has some magic that will help you with your logout link. Run `rails routes` and look for a route that helps you sign out. * You'll probably want to show the current user's email address only if they are presently signed in, right? Devise has a helper for you. * Optional: any time you generate a model in rails, you can use Rails Console to look at that model's methods and behavior interactively. MARKDOWN diff --git a/sites/en/message-board/make_a_posts_index_page.step b/sites/message-board/make_a_posts_index_page.step similarity index 100% rename from sites/en/message-board/make_a_posts_index_page.step rename to sites/message-board/make_a_posts_index_page.step diff --git a/sites/en/message-board/make_it_pretty_with_bootstrap.step b/sites/message-board/make_it_pretty_with_bootstrap.step similarity index 100% rename from sites/en/message-board/make_it_pretty_with_bootstrap.step rename to sites/message-board/make_it_pretty_with_bootstrap.step diff --git a/sites/en/message-board/message-board.step b/sites/message-board/message-board.step similarity index 100% rename from sites/en/message-board/message-board.step rename to sites/message-board/message-board.step diff --git a/sites/en/message-board/mvc_overview.md b/sites/message-board/mvc_overview.md similarity index 100% rename from sites/en/message-board/mvc_overview.md rename to sites/message-board/mvc_overview.md diff --git a/sites/en/message-board/the_request_cycle.md b/sites/message-board/the_request_cycle.md similarity index 100% rename from sites/en/message-board/the_request_cycle.md rename to sites/message-board/the_request_cycle.md diff --git a/sites/en/ruby/arrays.step b/sites/ruby/arrays.step similarity index 100% rename from sites/en/ruby/arrays.step rename to sites/ruby/arrays.step diff --git a/sites/en/ruby/booleans.step b/sites/ruby/booleans.step similarity index 100% rename from sites/en/ruby/booleans.step rename to sites/ruby/booleans.step diff --git a/sites/en/ruby/classes.step b/sites/ruby/classes.step similarity index 100% rename from sites/en/ruby/classes.step rename to sites/ruby/classes.step diff --git a/sites/en/ruby/command_line.step b/sites/ruby/command_line.step similarity index 99% rename from sites/en/ruby/command_line.step rename to sites/ruby/command_line.step index 63be32941..d691bb1fe 100755 --- a/sites/en/ruby/command_line.step +++ b/sites/ruby/command_line.step @@ -103,6 +103,7 @@ step do console <<-LINES cd ~ ls +cd workspace cd rai LINES message '... and hit `TAB`.' @@ -159,4 +160,4 @@ tip do message "If your workshop is using a Virtual Machine (ask a TA!) now is the time to take a detour to [Using Virtual Machines](using_virtual_machines)" end -next_step 'irb' \ No newline at end of file +next_step 'irb' diff --git a/sites/en/ruby/conditionals.step b/sites/ruby/conditionals.step similarity index 100% rename from sites/en/ruby/conditionals.step rename to sites/ruby/conditionals.step diff --git a/sites/en/ruby/datatypes.step b/sites/ruby/datatypes.step similarity index 100% rename from sites/en/ruby/datatypes.step rename to sites/ruby/datatypes.step diff --git a/sites/en/ruby/functions.step b/sites/ruby/functions.step similarity index 100% rename from sites/en/ruby/functions.step rename to sites/ruby/functions.step diff --git a/sites/en/ruby/hashes.step b/sites/ruby/hashes.step similarity index 100% rename from sites/en/ruby/hashes.step rename to sites/ruby/hashes.step diff --git a/sites/en/ruby/how_to_write_a_program.step b/sites/ruby/how_to_write_a_program.step similarity index 100% rename from sites/en/ruby/how_to_write_a_program.step rename to sites/ruby/how_to_write_a_program.step diff --git a/sites/en/ruby/input_and_output.step b/sites/ruby/input_and_output.step similarity index 100% rename from sites/en/ruby/input_and_output.step rename to sites/ruby/input_and_output.step diff --git a/sites/en/ruby/irb.step b/sites/ruby/irb.step similarity index 100% rename from sites/en/ruby/irb.step rename to sites/ruby/irb.step diff --git a/sites/en/ruby/loops.step b/sites/ruby/loops.step similarity index 100% rename from sites/en/ruby/loops.step rename to sites/ruby/loops.step diff --git a/sites/en/ruby/nil.step b/sites/ruby/nil.step similarity index 100% rename from sites/en/ruby/nil.step rename to sites/ruby/nil.step diff --git a/sites/en/ruby/numbers_and_arithmetic.step b/sites/ruby/numbers_and_arithmetic.step similarity index 100% rename from sites/en/ruby/numbers_and_arithmetic.step rename to sites/ruby/numbers_and_arithmetic.step diff --git a/sites/en/ruby/overview:_building_blocks.step b/sites/ruby/overview:_building_blocks.step similarity index 100% rename from sites/en/ruby/overview:_building_blocks.step rename to sites/ruby/overview:_building_blocks.step diff --git a/sites/en/ruby/overview:_organizing.step b/sites/ruby/overview:_organizing.step similarity index 100% rename from sites/en/ruby/overview:_organizing.step rename to sites/ruby/overview:_organizing.step diff --git a/sites/en/ruby/ruby.step b/sites/ruby/ruby.step similarity index 100% rename from sites/en/ruby/ruby.step rename to sites/ruby/ruby.step diff --git a/sites/en/ruby/running_programs_from_a_file.step b/sites/ruby/running_programs_from_a_file.step similarity index 97% rename from sites/en/ruby/running_programs_from_a_file.step rename to sites/ruby/running_programs_from_a_file.step index 9063b8e20..7903fc23c 100644 --- a/sites/en/ruby/running_programs_from_a_file.step +++ b/sites/ruby/running_programs_from_a_file.step @@ -10,7 +10,7 @@ A text editor is a word processor that saves in plain text format. This is unlike Word, which saves files in a special format that only Word can read. We may have recommended a particular text editor during the Installfest, such as -SublimeText. You can use any editor you like so long as it saves plain text. +Atom. You can use any editor you like so long as it saves plain text. It'll helpful to keep your text editor running, since you'll be coming back to it often. diff --git a/sites/en/ruby/strings.step b/sites/ruby/strings.step similarity index 100% rename from sites/en/ruby/strings.step rename to sites/ruby/strings.step diff --git a/sites/en/ruby/summary:_basics.step b/sites/ruby/summary:_basics.step similarity index 100% rename from sites/en/ruby/summary:_basics.step rename to sites/ruby/summary:_basics.step diff --git a/sites/en/ruby/summary:_tools.step b/sites/ruby/summary:_tools.step similarity index 100% rename from sites/en/ruby/summary:_tools.step rename to sites/ruby/summary:_tools.step diff --git a/sites/en/ruby/symbols.step b/sites/ruby/symbols.step similarity index 99% rename from sites/en/ruby/symbols.step rename to sites/ruby/symbols.step index 5b57fed96..3eba3993d 100644 --- a/sites/en/ruby/symbols.step +++ b/sites/ruby/symbols.step @@ -95,7 +95,7 @@ explanation do end further_reading do - message "[The Difference Between Ruby Symbols and Strings ](http://www.reactive.io/tips/2009/01/11/the-difference-between-ruby-symbols-and-strings/)" + message "[The Difference Between Ruby Symbols and Strings ](http://www.reactive.io/tips/2009/01/11/the-difference-between-ruby-symbols-and-strings)" message "[The Ruby_Newbie Guide to Symbols](http://www.troubleshooters.com/codecorn/ruby/symbols.htm)" message "[The Ruby documentation says](https://www.ruby-lang.org/en/documentation/ruby-from-other-languages): *If you\’re in doubt whether to use a Symbol or a String, consider what\’s more important: the identity of an object (i.e. a Hash key), or the contents.*" end diff --git a/sites/en/ruby/using_virtual_machines.step b/sites/ruby/using_virtual_machines.step similarity index 100% rename from sites/en/ruby/using_virtual_machines.step rename to sites/ruby/using_virtual_machines.step diff --git a/sites/en/ruby/variables.step b/sites/ruby/variables.step similarity index 100% rename from sites/en/ruby/variables.step rename to sites/ruby/variables.step diff --git a/sites/en/ruby/what_is_ruby.step b/sites/ruby/what_is_ruby.step similarity index 100% rename from sites/en/ruby/what_is_ruby.step rename to sites/ruby/what_is_ruby.step diff --git a/sites/en/ruby/working_with_collections.step b/sites/ruby/working_with_collections.step similarity index 100% rename from sites/en/ruby/working_with_collections.step rename to sites/ruby/working_with_collections.step diff --git a/sites/testing-rails-applications/additional_concepts.step b/sites/testing-rails-applications/additional_concepts.step new file mode 100644 index 000000000..d064404f2 --- /dev/null +++ b/sites/testing-rails-applications/additional_concepts.step @@ -0,0 +1,65 @@ +message <<-MARKDOWN + All right, you're almost at the end! Below are a few additional concepts of testing that may helpful in your future testing adventures. + + ### Doubles and stubs + Doubles are simpler objects that represent objects from your application. + + ```ruby + orange = double(:orange) + ``` + + If you instantiate that double in your test file, you have access to orange in your tests to test with. This is instead of creating an entire Orange model in ActiveRecord. If you need to create many different test objects with different properties, FactoryGirl is a great gem for that purpose and will allow persistence or in-memory object creation, depending on your testing situation. + + Stubs can be used to dictate what is returned when a method is called on a double. + + ```ruby + orange.stub(:name).and_return("Florida Orange") + ``` + + So, when you write a test that calls the title attribute of the orange double, you'll always get back the string Florida Orange. Got it? Good! + + ### Spies + With spies, we are not talking about espionage... at least, not in relation to testing :) Spies can be used to verify whether a method was called on an object a certain number of times. + For instance (assume you already have the orange double from above): + + ```ruby + orange = spy('orange') + orange.name + expect(orange).to receive(:name) + orange.name + expect(orange).to receive(:name).exactly(2).times + ``` + + Obviously, this is a simplified case. Instead of orange.name, you might have a complicated method that executes many functions internally and that's where spies can come in handy; they can check easily whether one specific method was called. Capiche? Ok, let's keep on trucking! + + ### Webmock + What if your app relies on third-party services or applications, known amongst friends as application programming interfaces or APIs? Well, it seems like APIs should also be tested but should our test suite really be dependent on someone else? NOPE! What if the API goes down? Or is slow? Welcome to the stage: Webmock! + Webmock is a gem that stubs out external HTTP requests. Once you include the gem, bundle install, and include the below code snippet in your spec helper file (which is included in every test file), you're good to go. +MARKDOWN + +source_code :ruby, <<-RUBY + require 'webmock/rspec' + WebMock.disable_net_connect!(allow_localhost: true) +RUBY + +message <<-MARKDOWN + Then, you can start stubbing out API requests in your spec helper file. Let's write an example for Bitly, a service that shortens long URLs. This may come in handy when you want to provide external links to info pages about the different types of oranges in your orange tree but the links are too long to display on a line. +MARKDOWN + +source_code :ruby, <<-RUBY + RSpec.configure do |config| + config.before(:each) do + stub_request(:get, /api.bitly.com.v3.shorten/). + with(headers: {'Accept'=>'*/*', 'User-Agent'=>'Ruby'}). + to_return(status: 200, body: "stubbed response", headers: {}) + end + end +RUBY + +message <<-MARKDOWN + So, if you write any tests in your test files that call the Bitly API, then the response will be whatever you defined above. The test will prevent the actual API request from being made. Pretty cool, huh? + + Awesome, you are now equipped with a license to TEST! Go forth and create doubles, stubs, and spies in your app (at least one of each and have a TA verify). And, if you have time for a final challenge (optional), click below... +MARKDOWN + +next_step "final_challenge" diff --git a/sites/testing-rails-applications/final_challenge.step b/sites/testing-rails-applications/final_challenge.step new file mode 100644 index 000000000..5e1655b92 --- /dev/null +++ b/sites/testing-rails-applications/final_challenge.step @@ -0,0 +1,8 @@ +message <<-MARKDOWN + +Congratulations! Take a second and give yourself a pat on your back. You've come far, my young padawan. This is the final test (no pun intended haha!) :) + +# The final challenge +Essentially, you will clone this repo (https://github.com/akanshmurthy/railsbridge-testfest) that has broken tests and fix all the broken tests. The broken tests will consist of a variety of different types of tests, incorporating everything you have learned thus far. Good luck, keep calm, and test on! + +MARKDOWN diff --git a/sites/testing-rails-applications/img/rails-test-types.png b/sites/testing-rails-applications/img/rails-test-types.png new file mode 100644 index 000000000..3cd2b810d Binary files /dev/null and b/sites/testing-rails-applications/img/rails-test-types.png differ diff --git a/sites/testing-rails-applications/testing-rails-applications.step b/sites/testing-rails-applications/testing-rails-applications.step new file mode 100644 index 000000000..abad6177d --- /dev/null +++ b/sites/testing-rails-applications/testing-rails-applications.step @@ -0,0 +1,48 @@ +message <<-MARKDOWN +### Goal + +To teach you testing we are going to start with the basics and have you learn by doing through small challenges and then a final large. + +When you have completed this curriculum you should understand: + +* what tests are +* why they're used +* how they're used +* what types of tests exist +* what types of frameworks exist +* some additional concepts in testing such as doubles, stubs, spies, and Webmock +* how to write tests +* how to break tests +* how to fix tests + +### Requirements + +We're going to be working with: + +* Ruby on Rails +* A command line program +* A text editor of your choice + +MARKDOWN + +tip "This is not a self-paced curriculum. You should use the discussion sections on each page to make sure everyone is together!" + +message <<-MARKDOWN +### Notable things + + As you might have noticed, we're assuming you've already been to a RailsBridge workshop before or have otherwise already explored a Rails app, and are ready for deeper knowledge. + +MARKDOWN + +important "This curriculum is written for Rails 5. Things will get awkward / broken if you're using an earlier version of Rails, so if you skipped the Installfest, you need to upgrade to Rails 5 now." + +message <<-MARKDOWN +### Tips for everyone + + * When adding code, it's awesome for students to walk through the code line by line and say out loud what is happening. (i.e., "The string is being stored in the instance variable" or "The method `snorgle` is being defined"). If you do it every time, you'll get really comfortable with the vocabulary of Rails! + * Error messages are your friend! Read them carefully, and practice understanding what Rails is telling you. Seeing an error and just diving back into your code is a natural reaction, but stop! Then read, think, and talk about what the error means before fixing it. +MARKDOWN + +insert '../intro-to-rails/working_effectively_and_efficiently' + +next_step "what_are_tests" diff --git a/sites/testing-rails-applications/testing_frameworks.step b/sites/testing-rails-applications/testing_frameworks.step new file mode 100644 index 000000000..5e8710b8a --- /dev/null +++ b/sites/testing-rails-applications/testing_frameworks.step @@ -0,0 +1,133 @@ +message <<-MARKDOWN +# What's a testing framework? +A testing framework is an execution environment for automated tests. Testing frameworks help teams organize their test suites and in turn +help improve the efficiency of testing. + +# Types of testing frameworks +There are many testing frameworks that work great. Minitest is the default testing framework in Rails 5. However, we will be using the RSpec testing framework instead. + + +# RSpec +## How to set up RSpec in Rails + +First, create a new Rails app. + +
+rails new testapp
+
+
+ +Then, add rspec-rails to both the :development and :test groups in the Gemfile: + +```ruby +group :development, :test do + gem 'rspec-rails', '~> 3.4' +end +``` + +Download and install by running: + +
+bundle install
+
+
+ +Initialize the spec/ directory (where specs will reside) with: + +
+rails generate rspec:install
+
+
+ +This command will add the spec helper, rails helper, and .rspec configuration files. + +Use the rspec command to run your specs: + +
+bundle exec rspec
+
+
+ +By default, the above code will run all spec files in the spec directory. + +To run only a subset of these specs use the following command: + +
+# Run only a specific folder name
+bundle exec rspec spec/folder_name
+
+# Run only specs for a specific type of test such as the post controller
+bundle exec rspec spec/controllers/post_controller_spec.rb
+
+
+ +## RSpec Basics + +```ruby +RSpec.describe Tree do + it "is able to age by 1 year increments" do + orange_tree = Tree.new + orange_tree.age + expect(orange_tree.age).to eq(1) + end +end +``` + +The 'describe' and 'it' methods come from rspec-core. The Tree class would be from your code. You can think of 'describe' as a header to describe which class you are testing and 'it' as a string/subheader that states what specifically you are testing in the Tree class. Note: you may or may not need the RSpec in front of the describe depending on your RSpec version. + +The last line of the example expresses an expected outcome. If orange_tree.age == 1, then the example passes. If not, it fails with a message like: + +
+
+expected: #< Tree @age=1 >
+     got: #< Tree @age=0 >
+
+
+ +## Matchers +Remember our example in the RSpec Basics section above? The 'to eq' is a matcher! RSpec has many built-in matchers. You can think of them as ways to equate or check certain values or expressions to what you think or expect they would "match" to. In our example, we are saying that we expect orange_tree's age to equal an integer of 1. + +Check out the other built-in matchers! +https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + +# minitest +In case you were curious to see how tests are written in minitest. Minitest also allows you to write tests in 'expectation style' which is very similar to how RSpec tests are written. + +```ruby +class TestTree < Minitest::Test + def setup + @orange_tree = Tree.new + @orange_tree.age + end + + def test_age_by_one_year_increments + assert_equal 1, @orange_tree.age + end +end +``` + +To run the test enter the following in Terminal/Command Prompt: + +
+
+ruby tree_test.rb
+
+
+ +Once you run the test this is how the test looks like: +
+
+$ ruby tree_test.rb
+Run options: --seed 30102
+
+#Running:
+
+.
+Finished in 0.000980s, 1020.4082 runs/s, 1020.4082 assertions/s.
+1 runs, 1 assertions, 0 failures, 0 errors, 0 skips
+
+
+ +MARKDOWN + +next_step "types_of_tests" diff --git a/sites/testing-rails-applications/types_of_tests.step b/sites/testing-rails-applications/types_of_tests.step new file mode 100644 index 000000000..8cd8c7539 --- /dev/null +++ b/sites/testing-rails-applications/types_of_tests.step @@ -0,0 +1,148 @@ +message <<-MARKDOWN + Now, that you know what tests are, let's discuss the different types of tests! + + In your Rails app, you have models, views, and controllers. It should be no surprise that tests can be written for models, views, and controllers. + + As you learned in the previous section, tests are used to verify that your code is working as expected. So, a couple things we can test right off the bat are that a tree should have certain associations and validations. Let's start by writing some model tests also known as unit tests! This link might come in handy to remember singular vs. plural Rails conventions: https://alexander-clark.com/blog/rails-conventions-singular-or-plural/ +MARKDOWN + +steps do + step do + message "First, create a orange model. By creating the model, a spec file will also be added to the models folder of the spec folder. Type this in the terminal:" + + console_without_message "rails generate model Orange" + + message "Then, run the migration to actually create the oranges table." + + console_without_message "bundle exec rake db:migrate" + end + step do + message "Then, run rspec." + + console_without_message "bundle exec rspec" + + message "You will see a report with one pending test. When you generated your Orange model, RSpec also generated a matching spec file. Copy the test below into spec/models/orange_spec.rb and run 'bundle exec rspec' on the terminal again." + + + source_code :ruby, <<-RUBY + RSpec.describe Orange, :type => :model do + context 'ActiveRecord associations' do + it 'belongs to tree' do + expect(Orange.reflect_on_association(:tree).macro).to be (:belongs_to) + end + end + end + RUBY + + message "Run 'bundle exec rspec'. This test fails! Let's add an associaton to our model. Add a belongs_to association to orange.rb:" + + source_code :ruby, <<-RUBY + class Orange < ActiveRecord::Base + belongs_to :tree + end + RUBY + + message "Run 'bundle exec rspec' and now you should see one passing test! That's an example of an association test. Let's modify that test to fail. Then, run 'bundle exec rspec' and see what happens. Cool! Let's revert back to the passing test." + end + + step do + + message "Now let's write a has_many association test for the relationship between the Tree model and the Orange model! (hint: this doesn't exist yet so you'll have to create the model and migrate!)" + + message "On to controller tests! Just like the Orange model, you will create the OrangesController, which will also create spec files in the /spec/controllers folder of your app." + end + + step do + message "First, create the oranges controller and relevant spec files by typing this in the terminal:" + + console_without_message "rails generate controller Oranges" + end + step do + message "Then, run RSpec." + + console_without_message "bundle exec rspec" + + message "You should see a report with some passing tests but those are just the model tests you wrote. So, let's add some controller tests! Copy the below test, paste it into the oranges controller spec file, create the relevant view files and then run 'bundle exec rspec' on the terminal again." + + source_code :ruby, <<-RUBY + RSpec.describe OrangesController do + context '#index' do + it "renders the index view" do + get :index + expect(response).to render_template("index") + end + + it "renders html" do + process :index, method: :get + expect(response.content_type).to eq "text/html" + end + end + end + RUBY + + message "You should see two failing tests. Hint: You'll need to add a route, index action, and a view. Not sure where to start? Read the errors in your failing tests for a hint. Run 'bundle exec rspec' after each change until both tests pass." + + message "Note: as you write the controller tests, you may be prompted to install a missing gem called 'rails-controller-testing' to use the assert_template method. If prompted, please add it to your Gemfile and do a bundle install!" + end + + step do + message "Now, write another controller test for the new action (hint: you might need to look up what a mock is)." + end + + step do + message <<-MARKDOWN + Last but not least: view tests! Below is an short snippet of a possible Orange show HTML page you can create in your app: + MARKDOWN + + source_code :erb, <<-ERB +
+ Orange title: <%= @orange.name %> +
+
+ Orange tree id: <%= @orange.tree_id %> +
+ ERB + + message <<-MARKDOWN + So, based on the orange you create, the show page should render HTML with the orange's name and tree id. Let's verify that with a few tests. + MARKDOWN + + message "First, create a views folder in the spec folder. Then, create an oranges folder in the views folder. Lastly, create an oranges view spec file in the oranges folder. Type these commands in the terminal:" + + console_without_message "mkdir spec/views" + console_without_message "mkdir spec/views/oranges" + console_without_message "cd spec/views/oranges" + console_without_message "touch show.html.erb_spec.rb" + end + step do + message "Change directory back to the root directory of your app. Then, run rspec." + + console_without_message "cd ../../.." + console_without_message "bundle exec rspec" + + message "You should see a report with some passing tests but those are just the model and controller tests you wrote. So, let's add some view tests!" + message "We're going to up the ante a bit here and NOT show you an example :) Google and StackOverflow are your friends here!" + end +end + +message <<-MARKDOWN + Once, you have written some passing view tests, take a deep breath and pat yourself on the back! Testing is hard. But, it's critical in making sure software is stable and functional. + + So, I fibbed a little bit. There are more types of tests than just MVC tests. One of these other important tests is called an integration test. As the name indicates, it tries to assess how well multiple components in an app interact and is written in Rails as a feature spec test. Typically, these tests simulate a user and a user's actions to test end-to-end functionality. + + Here's a diagram from Thoughtbot that may help with understanding how integration tests fit in: + +MARKDOWN + +img src: "img/rails-test-types.png", alt: "Thoughtbot's diagram of types of Rails tests" + +message <<-MARKDOWN + Capybara is a common framework used to write integration tests in Rails. It integrates nicely with RSpec such that you can use the same kind of test language to write integration tests. + + As an added bonus for this section, write an integration test :) + + Use the following link to get started: https://www.sitepoint.com/basics-capybara-improving-tests/ + +MARKDOWN + +next_step "additional_concepts" diff --git a/sites/testing-rails-applications/what_are_tests.step b/sites/testing-rails-applications/what_are_tests.step new file mode 100644 index 000000000..de61e16a6 --- /dev/null +++ b/sites/testing-rails-applications/what_are_tests.step @@ -0,0 +1,25 @@ +message <<-MARKDOWN + +Tests are not exams like the ones you have to take in school. Rather, tests are ways of testing code to see if it is performing the way we expect it to behave. Pretty easy, right? + +# Example + For example, let's say we wanted to create a program that models an orange tree because nature is awesome. Well, what defines an orange tree to us? Is it safe to say that we need at least two objects, an orange object and a tree object? Can our tree mature and bear more fruit at a certain age? Could our oranges ripen and fall from the tree? Sounds like the list can become lengthy, right? Let's stop here for a few minutes and see what we need to fulfill these user stories. + +# What We Need To Test? +Remember that we need to model an orange and a tree. So, we know that there are two objects that need to be created. + +We could say that the tree will not bear fruit until it matures at one year of age and then it will bear X number of oranges. We would need a test to test if the tree ages and a test to see if the tree has created X number of oranges once it has matured. + +How do we determine if an orange is ripe? Well, we can have an orange age and if it is at least 30 days old, then it is ripe and will fall from the tree. We would need to write a test to check for ripeness and a test to check if it falls at ripeness. + +# Why Is It Important That We Test? +You could think of tests as a requirement list. Every time a change is made we want to test to see if our code still meets those requirements. For example, as our program becomes increasingly complex and we want to have our tree to have a certain lifespan, would it make sense for our tree to continue to create oranges after exceeding that lifespan? + +A situation like our tree's lifespan is a prime example of why tests are important. As our program becomes more complex over time with new code added, the tests tell us that the new code negatively affected prior expectations of the behavior of the code. Tests can help keep the original behavior of the code and prevent new bugs from appearing. + +# Test Driven Development +Test-driven development (TDD) is a development technique where you must first write a test that fails before you write new functional code. TDD is a great way to develop your program! Add a test, run all tests, write code, run tests, and then refactor code! + +MARKDOWN + +next_step "testing_frameworks" diff --git a/sites/en/workshop/activities.md b/sites/workshop/activities.md similarity index 92% rename from sites/en/workshop/activities.md rename to sites/workshop/activities.md index aa9e1910b..7b31a627c 100644 --- a/sites/en/workshop/activities.md +++ b/sites/workshop/activities.md @@ -4,9 +4,10 @@ These activities are mostly taken from [Sharon Bowman](http://bowperson.com/)'s ## What you know, and what’s your plan -Send students an email, asking +Send students an email, asking them two of these questions. * What are three things you already know about programming? (Small things or big things! Who does it? What can you make? Why do people write software?) +* What do you want to learn? * What do you plan to do with what you learn? # Just before the workshop begins @@ -17,8 +18,15 @@ Send students an email, asking * Write down your answers to the warm-up questions. * Swap your answers with someone else. * Swap again with someone new. +* Put the sticky notes up on the wall. -# Put the sticky notes
up on the wall +## What's in it for me? + +* Grab a pen and sticky notes. +* Write down what you want to learn today. +* Find someone new and share your answer with them. +* Put the sticky notes up on the wall. +* Come back to them at the end of the day. ## What does a developer look like? diff --git a/sites/en/workshop/beginners.mw b/sites/workshop/beginners.mw similarity index 100% rename from sites/en/workshop/beginners.mw rename to sites/workshop/beginners.mw diff --git a/sites/en/workshop/closing.deck.md b/sites/workshop/closing.deck.md similarity index 100% rename from sites/en/workshop/closing.deck.md rename to sites/workshop/closing.deck.md diff --git a/sites/en/workshop/command_prompt.mw b/sites/workshop/command_prompt.mw similarity index 100% rename from sites/en/workshop/command_prompt.mw rename to sites/workshop/command_prompt.mw diff --git a/sites/en/workshop/diagrams.mw b/sites/workshop/diagrams.mw similarity index 91% rename from sites/en/workshop/diagrams.mw rename to sites/workshop/diagrams.mw index 3651c174a..f32b9112e 100644 --- a/sites/en/workshop/diagrams.mw +++ b/sites/workshop/diagrams.mw @@ -2,7 +2,7 @@ * MVC: http://github.com/alexch/mission/raw/master/mvc.png -* MVC: https://www.railstutorial.org/book/demo_app#sec-mvc_in_action +* MVC: https://www.railstutorial.org/book/toy_app#sec-exercises_mvc_in_action * REST: diff --git a/sites/en/workshop/foundational_skills.deck.md b/sites/workshop/foundational_skills.deck.md similarity index 100% rename from sites/en/workshop/foundational_skills.deck.md rename to sites/workshop/foundational_skills.deck.md diff --git a/sites/en/workshop/helpful_examples.mw b/sites/workshop/helpful_examples.mw similarity index 100% rename from sites/en/workshop/helpful_examples.mw rename to sites/workshop/helpful_examples.mw diff --git a/sites/en/workshop/img/Win7_search_programs.jpg b/sites/workshop/img/Win7_search_programs.jpg similarity index 100% rename from sites/en/workshop/img/Win7_search_programs.jpg rename to sites/workshop/img/Win7_search_programs.jpg diff --git a/sites/en/workshop/img/acrobat.jpg b/sites/workshop/img/acrobat.jpg similarity index 100% rename from sites/en/workshop/img/acrobat.jpg rename to sites/workshop/img/acrobat.jpg diff --git a/sites/en/workshop/img/agile.jpg b/sites/workshop/img/agile.jpg similarity index 100% rename from sites/en/workshop/img/agile.jpg rename to sites/workshop/img/agile.jpg diff --git a/sites/en/workshop/img/cheatsheet.png b/sites/workshop/img/cheatsheet.png similarity index 100% rename from sites/en/workshop/img/cheatsheet.png rename to sites/workshop/img/cheatsheet.png diff --git a/sites/en/workshop/img/ey_logo_rgb.png b/sites/workshop/img/ey_logo_rgb.png similarity index 100% rename from sites/en/workshop/img/ey_logo_rgb.png rename to sites/workshop/img/ey_logo_rgb.png diff --git a/sites/en/workshop/img/firefox.png b/sites/workshop/img/firefox.png similarity index 100% rename from sites/en/workshop/img/firefox.png rename to sites/workshop/img/firefox.png diff --git a/sites/en/workshop/img/git.png b/sites/workshop/img/git.png similarity index 100% rename from sites/en/workshop/img/git.png rename to sites/workshop/img/git.png diff --git a/sites/en/workshop/img/git_bash.png b/sites/workshop/img/git_bash.png similarity index 100% rename from sites/en/workshop/img/git_bash.png rename to sites/workshop/img/git_bash.png diff --git a/sites/en/workshop/img/itunes.png b/sites/workshop/img/itunes.png similarity index 100% rename from sites/en/workshop/img/itunes.png rename to sites/workshop/img/itunes.png diff --git a/sites/en/workshop/img/linux_logo.gif b/sites/workshop/img/linux_logo.gif similarity index 100% rename from sites/en/workshop/img/linux_logo.gif rename to sites/workshop/img/linux_logo.gif diff --git a/sites/en/workshop/img/mac_terminal_sm.png b/sites/workshop/img/mac_terminal_sm.png similarity index 100% rename from sites/en/workshop/img/mac_terminal_sm.png rename to sites/workshop/img/mac_terminal_sm.png diff --git a/sites/en/workshop/img/os_x_logo.jpg b/sites/workshop/img/os_x_logo.jpg similarity index 100% rename from sites/en/workshop/img/os_x_logo.jpg rename to sites/workshop/img/os_x_logo.jpg diff --git a/sites/en/workshop/img/rails_logo.jpg b/sites/workshop/img/rails_logo.jpg similarity index 100% rename from sites/en/workshop/img/rails_logo.jpg rename to sites/workshop/img/rails_logo.jpg diff --git a/sites/en/workshop/img/railsbridge_logo.png b/sites/workshop/img/railsbridge_logo.png similarity index 100% rename from sites/en/workshop/img/railsbridge_logo.png rename to sites/workshop/img/railsbridge_logo.png diff --git a/sites/en/workshop/img/ruby-logo.jpg b/sites/workshop/img/ruby-logo.jpg similarity index 100% rename from sites/en/workshop/img/ruby-logo.jpg rename to sites/workshop/img/ruby-logo.jpg diff --git a/sites/en/workshop/img/rubygems.png b/sites/workshop/img/rubygems.png similarity index 100% rename from sites/en/workshop/img/rubygems.png rename to sites/workshop/img/rubygems.png diff --git a/sites/en/workshop/img/windows_logo.gif b/sites/workshop/img/windows_logo.gif similarity index 100% rename from sites/en/workshop/img/windows_logo.gif rename to sites/workshop/img/windows_logo.gif diff --git a/sites/en/workshop/img/wordpress.jpg b/sites/workshop/img/wordpress.jpg similarity index 100% rename from sites/en/workshop/img/wordpress.jpg rename to sites/workshop/img/wordpress.jpg diff --git a/sites/en/workshop/more_teacher_training.deck.md b/sites/workshop/more_teacher_training.deck.md similarity index 100% rename from sites/en/workshop/more_teacher_training.deck.md rename to sites/workshop/more_teacher_training.deck.md diff --git a/sites/workshop/more_teacher_training_2016.deck.md b/sites/workshop/more_teacher_training_2016.deck.md new file mode 100644 index 000000000..6c48fd9b2 --- /dev/null +++ b/sites/workshop/more_teacher_training_2016.deck.md @@ -0,0 +1,422 @@ +# RailsBridge Teacher and TA Training + +# Why we are here? + +* Get to know each other and RailsBridge +* Know what will happen during a typical RailsBridge workshop +* Be empowered as teachers and TAs +* Practice teaching techniques (checks for understanding, scaffolding) + +### RailsBridge Teacher and TA Training + +# How is this going to happen? + +* Introductions +* Coverage of workshop logistics + * Schedule + * Student levels + * Available curricula + * Volunteer roles +* Facilitated conversations about soft skills, teaching best practices and challenges, specifically for RailsBridge workshops. + +# Introducing RailsBridge! + +* Founded in 2009 as a variety of initiatives, including Rails Mentors, Rails Bug Smashes, and the Open Workshop Project. +* The workshops project was led by Sarah Allen and Sarah Mei. +* Bridge Foundry +* Workshops not just Ruby on Rails, but also teaching Ruby, front-end and mobile development, Clojure, etc. + +# Introducing RailsBridge! + +### Current Level of Experience + +* Have held super-welcoming, fun, free workshops all over the world, over 200 in total! + +# Introducing RailsBridge! + +### Goals for All Workshops Ever + +* Make tech more diverse and welcoming! +* Provide extremely welcoming and useful high quality instruction to students. +* Provide hella networking opportunities for students and volunteers. +* Provide an opportunity for our volunteers to give back while they are also gaining valuable skills and connections. +* We throw super-welcoming, fun, free workshops. +* We help our volunteers become more empathetic and better communicators. +* Have fun! + +# Introductions + +* What is your name? What else would you like to share about yourself? Could be anything... work, hobbies, interests, education, favorite building or music, etc. +* What is your current level of experience with the workshop topic and with teaching? +* What would you like to get out of today's teacher training? Anything specific you want to learn or discuss? + +# Typical RailsBridge Schedule + +First, we get all the necessary technologies onto the students' computers aka the **Installfest**. + +The next day we break into small groups and work through the curriculum. + +# Installfest + +#### Friday 6-10pm-ish + +* Installfest: installing software over pizza & beer +* No formal presentations, a bit like a party, get to know your students and fellow volunteers +* Not necessary for Front-end workshops + +### Keep in mind: + +* There will be people with _all_ kinds of computers. +* Even though Windows is not an ideal Rails development environment, we're here to encourage people and meet them wherever they are right now. +* Do NOT say bad things about Windows, even if it's frustrating. +* If you're not sure about something, grab another volunteer. +* Do NOT just talk to other volunteers, interact with the students. + +### Questions about the Installfest? + +# Workshop + +### Saturday 9-4:30pm-ish plus After-party + +* 9-9:30am: Check-in, coffee, bagels +* 9:30-10am: Opening presentation, student sorting and classroom assignment, volunteer huddle +* 10am-12:30pm: Class! +* 12:30-1:30pm: Lunch +* 1:30pm-4:30pm: Class! +* 4:30-5:00pm: Closing presentation and retros +* 5:00pm-late: After-party + +# Workshop - Start with Introductions!!! + +* What is your name? Work, hobbies, interests, education, anything else you would like to share about yourself? +* What is your current level of experience with writing code/technology in general/the material we are covering in the workshop today? +* What would you like to get out of today's workshop? Anything specific you want to learn or discuss? + +# Introductions - Things to Look For + +* Make sure everyone participates, not just students. +* Look for students who are in the wrong level and find out if they want to move. +* Listen carefully to their goals so you can either realistically adjust them before class or meet them during class. +* Don't rush, even if you have a big class. Getting people talking +* If someone joins the class late, ask them to introduce themselves. +* Get people talking. The more comfortable they are at talking, the more likely they'll speak up when they don't understand something, or to answer someone else's question. + +# Workshop - Establish Ground Rules + +* Questions are always welcome, there are no silly questions. +* Explain that if someone has trouble (e.g., not getting the expected output), the TAs will help troubleshoot. +* If anyone wants to switch classes, tell them they should feel TOTALLY COMFORTABLE switching at any point. + +# Cover Classroom Logistics + +* Planned breaks, lunch time +* Remind students that there is a closing presentation and retrospective at the end +* Make sure they know where the bathroom is +* Encourage them to attend the after-party +* Students might not want to take breaks, but it is best that they do. + +# Student levels + + **Blue** - Totally New to Programming + + **Green** - Somewhat New to Programming + + **Gold** - Some Rails Experience + + **Orange** - Other Programming Experience + + **Purple** - Ready for the Next Challenge + +# Curricula + +#### Where to find the curriculum: http://docs.railsbridge.org + +### You need to read the curriculum through, beginning to end, before teaching or ta'ing it. + +**Rails** + +* Intro to Rails - Classic Suggestotron Curriculum - Blue/Green Levels + +* Job Board - Build a Simple Job Board - Green/Gold levels + +* Message Board - Orange/Purple Levels + +**FrontEnd** + +* Frontend Curriculum - HTML + CSS for beginners - Blue/Green levels + +* JavaScript Snake Game - Beginner Specific Curriculum - Blue/Green level + +* JavaScript To Do LIst - Gold/Orange Levels + +* JavaScript To Do List With React - Orange/Purple Levels + +#   + +## Seriously! You need to read the curriculum through, beginning to end, before teaching or ta'ing it. + + + +# What's a TA? + +### First workshop? Be a TA! + +* At RailsBridge, a TA is a volunteer who isn't leading the class. +* If you're volunteering at your first RailsBridge workshop, you should probably be a TA. +* Sometimes they are the technical experts (rather than the teacher), sometimes not. +* TAs often explain specific concepts for the class or teach a couple of sections to give the teacher a break from talking. +* TAs can ask questions to encourage students to speak up. +* Teachers can ask your TA to explain a concept; they may be more technically advanced than you! +* TAs can help people who get lost. +* Co-teaching is also an option if you feel like you can tag-team. There doesn't have to be a hierarchy. +* If someone falls behind, the TA can take them out of the room to do some 1-on-1, if there's another TA in the room. + + +# RailsBridge Teacher Training - Soft Skills Edition + +# How to make your class awesome + +We've made three quasi-arbitrary categories of ways to make your class awesome: + +##### We want our students to feel: + +* Like you are approachable and can help solve their problems +* Socially comfortable +* Technically capable + +#### Discussion is key! Don't let the presenter(s) do all the talking! + +# Social Comfort - Establishing trust with students aka "Do you know what's up?" + +#### Discussion points + +* How can you help people feel like you know what's going on? +* What are things you can do to help the students trust you? +* What are some things to avoid? + + +# Know What's Up: Ideas + +#### Don't be afraid to: +* Call on people! By name! +* Ask yourself questions and answer them. +* Be vulnerable yourself, discuss your learning process + +# Know What's Up: Even More Ideas +#### Pace yourself! +* Don't go too fast. You will probably go too fast. Check in occasionally to ensure everyone is still with you. +* You can say the same thing THREE TIMES and it will not be boring yet. +* When you ask a question, wait TEN WHOLE SECONDS before saying anything else. People need time to think. +* Don't let the most advanced students dictate the pacing or answer all the questions. +* Get people talking. The more comfortable they are at talking, the more likely they'll speak up when they don't understand something, or to answer someone else's question. +* Allow students time to write and play with code! + +# Social Comfort - Absolutes +* Try to be more aware of your (possible and understandable) culturally-influenced sexism so you don't express it during a class +* Don't hit on people. No sexual advances. None. Even at the after-party. +* DO NOT ask for student contact information. Feel free to share yours, in a non aggressive way, so students can take initiative to contact you. +* Don't make sexist jokes. Or racist, classist, or ableist jokes. Call people out if they do. A simple "That's not funny" and moving on quickly with the conversation will often suffice. +* Don't make gender-based generalizations ("Women are better at X, because ...") +* Don't make references to people's bodies or state your opinion of them. +* Don't use slurs. + +# Social Comfort: Making the students more comfortable with learning process + +#### Imagine: +* You're trying to do something difficult +* You're in a group of strangers, many of whom know how to do it better than you +* You've tried before but got lost or bored or confused +* You don't feel like you can articulate your thoughts and questions +* You don't know the right names for anything + +# Social Comfort: Comprehension + +#### Discussion points + +* How can you tell if they understand the words you're saying? +* What are good questions to ask to check comprehension? +* What did your favorite teachers do to gauge understanding? + +# Student Comprehension: Some Ideas +* Pay attention to body language. +* People ask questions most often when they are actively processing material. If they aren't, it might be that the material is too easy or hard. Try to figure out which it is! + +#### Calling on people +* Calling on people makes the class more interactive and engaging, and less lecture-y. +* Don't always ask questions to the whole class: call on individuals by name. +* Consider breaking the class into two teams and addressing questions to teams. +* Ask people what they expect a command to produce BEFORE you hit enter. +* Ask "How would you do \#\{this\}?" or "If I wanted to do \#\{that\}, what would I do?" + + +# Discussion: Technical Capability +### How can you help people feel technically capable? +### What kinds of insecurities might your student have? +### How can you bolster their confidence? + +# Technical Capability: Ideas +#### Explain that: +* Even professional developers are constantly learning new technologies, so being confused is normal. +* Initial code is often terrible: don't feel bad, just refactor! +* Mistakes == Learning! +* Growth mindset versus fixed mindset + +#### Dealing with technical concepts: +* Define technical terms! Several times! +* Assume anyone you're teaching has zero knowledge but infinite intelligence. +* Remember people's professional and code backgrounds (QA, DBA, C++, Java, JS) and relate where possible. If they are a cook, try a cooking analogy. + +# Technical Capability: More Ideas +#### Encourage collaboration and interaction +* Explicitly encourage students to try to answer each other's questions. +* If a question is asked, ask if anyone in the class thinks they can explain. +* Be especially encouraging of the first few questions, to try to get things rolling. +* Good responses to questions: "I'm glad you asked!" or "I actually wondered that, too." or "Great question!" + +#### Be Super Positive, Always +* Students have diverse backgrounds. Appreciate this fact. +* If they aren't getting a concept, avoid anything that might shame them. +* Don't be surprised when someone hasn't heard of something before. +* Don't grab anyone's keyboard. Avoid taking over unless you think it's *really* necessary. Ask before you do. "Mind if I drive for a sec?" But really, don't. + +# Technical Capability: Even More Ideas +#### Walk the Middle Path +* Don't go too deep for your class level, but also, don't gloss over things. +* When trying to be accurate, it's easy to go down a rabbit hole of specificity. Avoid. +* Work with the TAs to make sure no one goes down that rabbit hole. Accountability! +* Explain the big picture of a command *before* they type it in. + * i.e., before typing the command to deploy to Heroku, explain the difference between localhost and Heroku. + + +# Is RailsBridge Open Source? + +### WHY YES, THANK YOU FOR ASKING! +### RAILSBRIDGE IS VERY OPEN SOURCE! + +All the materials you're using were created by volunteers, and are on GitHub for forking and editing and using! + +If you see something that could be better, make a pull request. Pull requests are the lifeblood of RailsBridge. + +If you don't know how to make one, we'll help! + +#### Where to submit pull requests: https://github.com/railsbridge/docs + +#### How to submit pull requests: http://railsbridge.github.io/bridge_troll/ + +We need your help! Thank you!!! + + +# Very Important, Very Practical Things +#### Where to find the curriculum: http://docs.railsbridge.org + +You need to read the curriculum through, beginning to end, before teaching it. + +# Teaching Techniques +### Answering questions +* Correct people if they're wrong. Be polite and encouraging. For instance: + * "Well, this might work better and this is why." + * "Can you explain how you came to that conclusion?" + * "Does anyone have a different answer?" +* Don't be afraid to tell someone that you don't know +* Don't be afraid to not answer a question if it is out of scope + * Talk with the student during a break + +# Teaching Techniques +#### Checks for understanding +A tool for assessing how well the class understands a topic before moving on + +#### Reasons to check for understanding +* Helps guide your teaching pace +* You get more feedback about which students are more challenged with the material +* Feedback loop during the lesson + +# Avoid These Checks For Understanding +* Do you understand? +* Can I move on? +* Any questions? + +#### These checks tend to have a luke warm response +#### People may think they understand, but don't actually understand + +# Suggested Checks For Understanding +* Fist of five +* Calling on a person by name +* Have students pair on a problem, then explain it to the group +* Checking in with each student individually as they work on a problem +* Teach a concept to your neighbor + +# Discussion: Teach! +#### Incorporate at least one check for understanding and teach the following +* Arrays +* Hashes +* Scrum process +* OOP +* Anything you are passionate about + +# Scaffolding +* A lesson should build upon itself +* Teacher describes or illustrates a concept multiple ways +* Teacher gives a specific example that helps students complete an assignment +* I do, we do, you do + +### Not `rails g scaffold` + +# Discussion: Great learning experience +### Describe a great learning experience you have had +### Why do you think it was so successful? + +# General curriculum levels - detailed + +### **Blue** - Totally New to Programming + +* Student has little or no experience with the terminal or a graphical IDE +* Might be familiar with HTML or CSS, but not necessarily +* Unfamiliar with terms like methids, arrays, lists, hashes, or dictionaries + +### **Green** - Somewhat New to Programming + +* May have used the terminal a little - to change directories for example +* May have done an online programming tutorial or two +* Does not have alot of experience with Rails + +### **Gold** - Some Rails Experience + +* Comfortable using terminal, but not a power user +* Have general understanding of Rails app's strucutre, maybe a prior workshop or tutorial +* Knows how to define a method in Ruby +* Has decent handle on Ruby arrays and hashes + +# General curriculum levels - detailed continued + +### **Orange** - Other Programming Experience + +* Proficient in another language and understand general programming concepts like collections and scope +* New to Ruby on Rails +* Familiar with version control and basic web architecture + +### **Purple** - Ready for the Next Challenge + +* Exhausted fun of Suggestotron/Intro Rails curriculum +* Comfortable with terminal +* Want to problem solve instead of copying other's code +* Build an app without using scaffolds + +# Curriculum levels for JavaScript + +### **Blue** - No programming Experience + +* Totally new to JavaScript itself +* Made a webpage before, maybe at a RailsBridge Front End Workshop +* No experience with programming languages other than HTML and CSS + +### **Orange** - Programmer new to Javascript + +* Comfortable making a complex webpage +* Some experience in programming language like ActionScript, C, Java, Ruby or Python +* Has seen JavaScript, but didn't really understand how it worked + +### **Purple** - Some experience with JavaScript + +* Feel comfortable writing functions and objects in JavaScript +* Used jQuery before, has seen Ajax request, but doesn't understand all the moving parts +* Interested in learning how to organize JavaScript code using models and views diff --git a/sites/en/workshop/noobie-outline.txt b/sites/workshop/noobie-outline.txt similarity index 93% rename from sites/en/workshop/noobie-outline.txt rename to sites/workshop/noobie-outline.txt index 12faef368..bef855eec 100644 --- a/sites/en/workshop/noobie-outline.txt +++ b/sites/workshop/noobie-outline.txt @@ -1,4 +1,4 @@ -RailsBridge Introductory Curriculum for Non-Programmers +RailsBridge Introductory Curriculum for Non-Programmers Target Audience: Students who have not exposure to the command line and/or programming (and may be fuzzy on how the file system works) @@ -14,12 +14,12 @@ File Directories: Use house / rooms / drawers metaphor for how directories store files and keep everything in your ‘house’ organized. Review ./ and ~/ references to self and root directories. Explain where home and root are located in relation to all directories. Explain difference between absolute paths (starting with a /) and relative paths. -.. is the relative path the the parent directory. +.. is the relative path the parent directory. Command Line Basics:: pwd, ls, cd, touch, mv, cp, rm, .. (parent directory) Text Editing: Explain differences between text editor vs. word processor. Have group open editor, create and save file with explanation of how and where files are stored. -Explain file extensions and file types. File types tell the editor how to color the special words in each language. +Explain file extensions and file types. File types tell the editor how to color the special words in each language. Explain difference between the buffer (in the editor’s memory) and the file (stored on disk). Emphasize the importance of saving the buffer to a file before trying to run it with ruby. Compilers, Interpreters and Programming Languages: Use metaphor of programming language as an agreed set of rules about syntax for writing source code that is sent to the interpreter and translated into byte code. @@ -44,10 +44,10 @@ Explain ‘method calls’. Explain to group the important of strings and review string operations. Have group work with strings in IRB. IRB Console: Have group open IRB console and create objects, method calls and variable assignments. -Tie in lecture above on Objects, Methods, Variables with exercises in IRB that allow students to see results line-by-line. +Tie in lecture above on Objects, Methods, Variables with exercises in IRB that allow students to see results line-by-line. Have group query classes for their methods in IRB. HTTP: Lead group exercise in using telnet to query Wikipedia, make GET request and view response in command line, then compare to view source of same page in browser. Sinatra Application -Lead group exercise in writing Sinatra application and run it locally. “Hello, Web!” -Extend to add “the time is Sun Mar 27 09:44:09 PDT 2011” using `date`. \ No newline at end of file +Lead group exercise in writing Sinatra application and run it locally. “Hello, Web!” +Extend to add “the time is Sun Mar 27 09:44:09 PDT 2011” using `date`. diff --git a/sites/en/workshop/resources.md b/sites/workshop/resources.md similarity index 100% rename from sites/en/workshop/resources.md rename to sites/workshop/resources.md diff --git a/sites/en/workshop/ruby_for_beginners.deck.md b/sites/workshop/ruby_for_beginners.deck.md similarity index 100% rename from sites/en/workshop/ruby_for_beginners.deck.md rename to sites/workshop/ruby_for_beginners.deck.md diff --git a/sites/en/workshop/ruby_for_programmers.deck.md b/sites/workshop/ruby_for_programmers.deck.md similarity index 100% rename from sites/en/workshop/ruby_for_programmers.deck.md rename to sites/workshop/ruby_for_programmers.deck.md diff --git a/sites/en/workshop/ta_cheat_sheet.md b/sites/workshop/ta_cheat_sheet.md similarity index 100% rename from sites/en/workshop/ta_cheat_sheet.md rename to sites/workshop/ta_cheat_sheet.md diff --git a/sites/en/workshop/teacher_cheat_sheet.md b/sites/workshop/teacher_cheat_sheet.md similarity index 100% rename from sites/en/workshop/teacher_cheat_sheet.md rename to sites/workshop/teacher_cheat_sheet.md diff --git a/sites/en/workshop/teaching_tips.md b/sites/workshop/teaching_tips.md similarity index 100% rename from sites/en/workshop/teaching_tips.md rename to sites/workshop/teaching_tips.md diff --git a/sites/en/workshop/topics.md b/sites/workshop/topics.md similarity index 100% rename from sites/en/workshop/topics.md rename to sites/workshop/topics.md diff --git a/sites/en/workshop/web_apps.deck.md b/sites/workshop/web_apps.deck.md similarity index 100% rename from sites/en/workshop/web_apps.deck.md rename to sites/workshop/web_apps.deck.md diff --git a/sites/en/workshop/welcome.deck.md b/sites/workshop/welcome.deck.md similarity index 100% rename from sites/en/workshop/welcome.deck.md rename to sites/workshop/welcome.deck.md diff --git a/sites/en/workshop/workshop.md b/sites/workshop/workshop.md similarity index 96% rename from sites/en/workshop/workshop.md rename to sites/workshop/workshop.md index 203e29f83..72f39e8ff 100644 --- a/sites/en/workshop/workshop.md +++ b/sites/workshop/workshop.md @@ -8,6 +8,7 @@ ### Teacher Training * [Teacher Training Deck](more_teacher_training) +* [Teacher Training Deck 2016](more_teacher_training_2016) * [Teacher Cheat Sheet](teacher_cheat_sheet) - A TL;DR version of the deck * [TA Cheat Sheet](ta_cheat_sheet) - A doc geared especially for first-time TAs diff --git a/sites/zh-tw/nihao/nihao.step b/sites/zh-tw/nihao/nihao.step deleted file mode 100644 index 76a2c10f7..000000000 --- a/sites/zh-tw/nihao/nihao.step +++ /dev/null @@ -1 +0,0 @@ -message "世界你好!" diff --git a/spec/app_deck_spec.rb b/spec/app_deck_spec.rb index 27c30efba..2a375105f 100644 --- a/spec/app_deck_spec.rb +++ b/spec/app_deck_spec.rb @@ -41,4 +41,4 @@ def app expect(last_response.body).to include("/* Code ray css */") end end -end \ No newline at end of file +end diff --git a/spec/app_spec.rb b/spec/app_spec.rb index 4bb0ad8b7..910d7efed 100755 --- a/spec/app_spec.rb +++ b/spec/app_spec.rb @@ -100,10 +100,10 @@ def get! *args end describe "in the 'es' locale" do - it "uses the 'es' subdir as the sites_dir" do + it "uses the same subdir as the sites_dir" do get "/", locale: "es" - es_dir = File.expand_path(File.join(__FILE__, "..", "..", "sites", "es")) + es_dir = File.expand_path(File.join(__FILE__, "..", "..", "sites")) expect(true_app.sites_dir).to eq(es_dir) end diff --git a/spec/contents_spec.rb b/spec/contents_spec.rb index 7c77c50db..568fd1279 100644 --- a/spec/contents_spec.rb +++ b/spec/contents_spec.rb @@ -16,8 +16,8 @@ describe "absolute links" do let(:site_name) { 'docs' } - let(:site_dir) { "#{real_sites_dir}/en/#{site_name}" } - let(:page_name) { 'docs' } + let(:site_dir) { "#{real_sites_dir}/#{site_name}" } + let(:page_name) { 'docs' } before do @toc_html = Nokogiri.parse(@toc.to_html) end @@ -30,7 +30,7 @@ describe 'capitalization' do let(:site_name) { 'installfest' } - let(:site_dir) { "#{real_sites_dir}/en/#{site_name}" } + let(:site_dir) { "#{real_sites_dir}/#{site_name}" } let(:page_name) { 'installfest' } before do @toc_html = Nokogiri.parse(@toc.to_html) diff --git a/spec/site_index_spec.rb b/spec/site_index_spec.rb index c69dc0d1d..d25404f52 100644 --- a/spec/site_index_spec.rb +++ b/spec/site_index_spec.rb @@ -9,7 +9,7 @@ end it "lists all sites in the /sites/ directory" do - all_sites = Dir['sites/en/**'].map { |site_path| site_path.sub('sites/en/', '') } + all_sites = Dir['sites/**'].map { |site_path| site_path.sub('sites/', '') } @site_index.sites.should =~ all_sites end diff --git a/spec/site_spec.rb b/spec/site_spec.rb index 2675b0677..599f96cbc 100644 --- a/spec/site_spec.rb +++ b/spec/site_spec.rb @@ -9,18 +9,14 @@ site_names.should include("installfest") site_names.should include("intro-to-rails") end - + it "has doc files" do installfest = Site.named("installfest") doc_filenames = installfest.docs.map(&:filename) doc_filenames.should include("configure_git.step") end - - it "finds the sites_dir" do - Site.sites_dir.should == File.expand_path(File.join(File.dirname(__FILE__), "..", "sites", "en")) - end - it "finds the sites_dir for Spanish locale" do - Site.sites_dir('es').should == File.expand_path(File.join(File.dirname(__FILE__), "..", "sites", "es")) + it "finds the default sites_dir" do + Site.sites_dir.should == File.expand_path(File.join(File.dirname(__FILE__), "..", "sites")) end end diff --git a/spec/site_syntax_spec.rb b/spec/site_syntax_spec.rb index 01fdb923f..d82950982 100644 --- a/spec/site_syntax_spec.rb +++ b/spec/site_syntax_spec.rb @@ -1,3 +1,4 @@ +require "cgi" require "spec_helper" require_relative "../app" @@ -16,7 +17,7 @@ def app InstallFest::AVAILABLE_LOCALES.each do |locale| describe "in locale '#{locale}'" do - Site.all(locale).each do |site| + Site.all.each do |site| describe "#{site.name} pages..." do it 'uses all images in the /img folder' do site_folder = File.expand_path(File.join(here, '..', 'sites', locale, site.name)) @@ -29,7 +30,7 @@ def app site.docs.each do |doc| it "renders #{doc.filename}" do - path = URI.escape "/#{site.name}/#{doc.name}" + path = CGI.escape "/#{site.name}/#{doc.name}" get path, locale: locale if (last_response.status != 200) errors = last_response.errors diff --git a/spec/support/i18n_helper.rb b/spec/support/i18n_helper.rb index 33306b365..502728e6f 100644 --- a/spec/support/i18n_helper.rb +++ b/spec/support/i18n_helper.rb @@ -1,4 +1,5 @@ require 'i18n' +require_relative '../../app' module I18nHelper def setup_test_translations @@ -6,10 +7,10 @@ def setup_test_translations top = File.expand_path "#{here}/../.." I18n::Backend::Simple.include(I18n::Backend::Fallbacks) - I18n.load_path = Dir[File.join(top, 'locales', '*.yml')] + I18n.load_path = Dir[File.join(top, 'locales', '**/*.yml')] I18n.backend.load_translations - I18n.available_locales = Dir['sites/*'].map { |path| File.basename(path).to_sym } + I18n.available_locales = ::InstallFest::AVAILABLE_LOCALES I18n.locale = :en end -end \ No newline at end of file +end