Monday, December 23, 2013

Xmas Pet App with Hannah Howard

Hannah and I met up today at Silverlake Coffee to work on an app for her partner Ben for Christmas. We should have gotten together sooner because we ended up spending a lot of time yak shaving but didn't actually get much done. Here is some of the stuff we were dealing with to work together on this project...

Hannah is working on the newest versions of Ruby and Rails which means I have finally reached a point where I need to start using RVM a Ruby version manager.

https://rvm.io/rvm/install 
$ jen@sandinista ~/Desktop/poochpapa $ gvim .ruby-version
$ jen@sandinista ~/Desktop/poochpapa $ gvim .ruby-gemset 
* To start using RVM you need to run `source /home/jen/.rvm/scripts/rvm` in all your open shell windows, in rare cases you need to reopen all shell windows.
http://rvm.io/rvm/basics

Hannah made me a collaborator at https://github.com/hannahhoward/poochpapa.git

Ben's website for his pet sitting service: http://www.poochpapa.com/
Ben's favorite color: brown earth tones orange ocre reese pieces

Hannah is also using Postgres as her database so I downloaded it but couldn't install it. I think I need more permissions and Lars' help.

Saturday, December 21, 2013

Refactoring w/ Cynthia, Frances & REve

Grep-ing is incredibly useful when looking for something in a file you are unfamiliar with
  $ grep -rn "whatever you are looking for" . 
-r means recursively which means your computer will look in a file if it is not there then it will keep looking until there is m=nothing else to look for
n is line number
. the dot at the end means look through everything

git branch -av
   a is all
   v is verbose

git remote add upstream_user https://github.com/user/repo.git

simplecov - ruby gem that reports how much of your code is covered by tests

Add to your Gemfile

group :test, :development do  
  gem 'hpricot'  
  gem 'simplecov', :require => false #code coverage thingy
end

Add to top of tests  test.rb

  # -*- coding: utf-8 -*-
  # Tests designed to run with autotest.
 require 'simplecov'
 SimpleCov.start
  require 'test/unit'
  require 'fileutils' # for saving downloaded XML
  $LOAD_PATH << './lib'
  require 'reve'

cattr_reader so you can read the class level variable in the instance of the class

    module Class #:nodoc:
      def cattr_reader(*syms) #:nodoc:
        syms.flatten.each do |sym|
          next if sym.is_a?(Hash)
          class_eval(<<-EOS, __FILE__, __LINE__)
            unless defined? @@#{sym}
              @@#{sym} = nil
            end

            def self.#{sym}
              @@#{sym}
            end

            def #{sym}
              @@#{sym}
            end
          EOS
        end
      end

      def cattr_writer(*syms) #:nodoc:
        options = syms.last.is_a?(Hash) ? syms.pop : {}
        syms.flatten.each do |sym|
          class_eval(<<-EOS, __FILE__, __LINE__)
            unless defined? @@#{sym}
              @@#{sym} = nil
            end

            def self.#{sym}=(obj)
              @@#{sym} = obj
            end
            #{"
            def #{sym}=(obj)
              @@#{sym} = obj
            end
            " unless options[:instance_writer] == false }
          EOS
        end
      end
      def cattr_accessor(*syms) #:nodoc:
        cattr_reader(*syms)
        cattr_writer(*syms)
      end
    end


Tuesday, December 17, 2013

Rails Tutorial 3.3

Rspec  Should vs. Expect

https://www.relishapp.com/rspec/rspec-expectations/v/2-0/docs/matchers/expect-change
http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
http://betterspecs.org/

In Rspec have_title is a method which checks for an HTML title within the given content

I always forget what .erb stands for. It is embedded Ruby.

Rails method
provide
<% provide(:title, 'Home') %>
<%= yield(:title) %>
The distinction between the two types of embedded Ruby is that <% ... %> executes the code inside, while <%= ... %> executes it and inserts the result into the template.

Thursday, November 7, 2013

Notes - Rails Tutorial Chapter 3.2 - Integration Tests vs. Unit Tests

Integration Tests vs. Unit Tests

Unit Tests

A unit test is a test written by the programmer to verify that a relatively small piece of code is doing what it is intended to do. They are narrow in scope, they should be easy to write and execute, and their effectiveness depends on what the programmer considers to be useful. The tests are intended for the use of the programmer, they are not directly useful to anybody else, though, if they do their job, testers and users downstream should benefit from seeing less bugs.   ~ Nathan Hughes

Integration Tests

An integration test is done to demonstrate that different pieces of the system work together. Integration tests cover whole applications, and they require much more effort to put together. They usually require resources like database instances and hardware to be allocated for them. The integration tests do a more convincing job of demonstrating the system works (especially to non-programmers) than a set of unit tests can, at least to the extent the integration test environment resembles production.
Actually "integration test" gets used for a wide variety of things, from full-on system tests against an environment made to resemble production to any test that uses a resource (like a database or queue) that isn't mocked out.

Wednesday, November 6, 2013

Cal Tech & POODR Ch 1 & 2

Yesterday I started re-reading Practical Object-Oriented Design with Ruby by Sandi Metz. I got through half of Chapter 2. I didn't re-read Chapter 1 because I remember the main ideas from it.

Chapter 2 starts out with a bicycle. A good way to start if you ask me. There is talk about gearing. I never really thought that much about this. I put my bike in a low gear for going up the hill and a large gear for going down the hill. But what does that really mean mechanically? Fixed gear people talk about their gear ratios but I always tuned those conversations out because I am too clumsy for a fixie. I do have a single gear bike but I have no idea what the ratio is. It just goes. And the people who have 2 different sized wheels are just taking it to another level that I have previously been uninterested in.

Sandi Metz has made me think about all of this stuff. The most I can say is at least I knew it existed so that is something. 

We are trying to figure out the gear ratio of a bike.

Friday, October 25, 2013

My Bundler Feature was Merged

My PR to Bundler  was merged!
This fixes the issue: Warn if the same gem (same version) is added twice. bundler/bundler-features#22

Try it out: Open a Gemfile in on of your projects and duplicate one of your gems.
do a bundle install
You should get a warning telling you that you have a duplicated gem and what it is.
This is the warning you'll see:

"Your Gemfile lists the gem #{current.name} (#{current.requirement}) more than once. You should probably keep only one of them. While it's not a problem now, it could cause errors if you change the version of just one of them later."
Yay!!

Wednesday, October 23, 2013

New Relic Rocks

So I am here in San Francisco for the Future Stack Conference because New Relic gave Rails Girls a scholarship. Someone else was supposed to come but she couldn't make it and I was next on the list. So New Relic paid for me to fly here, sent a car for me; a fancy, shiny, black car which dropped me off for a 3 night stay at the Grand Hyatt Hotel in Union Sq. My room is amazing. Then I got an amazing goody bag with a cool Future Stack tote, t-shirt, stickers, other swag and a generous food stipend. Wow. I won the scholarship lottery.

I walked around Union Sq. for hours today shopping for the perfect scarf. The first one I found is the one I ended up buying many hours later. I got a nice lunch and dinner. Now am in my pajamas relaxing and getting ready for the long day and night tomorrow.

Tuesday, October 22, 2013

Github Pages

http://jendiamond.github.io/

Wow, I can't believe that it is finally up! I had an incredible burst of focused energy and in my own house and at my desk even.

I was having a hard time getting the blog to publish and after a while I realized that the layout was not correct. I fixed that and it posted. Then I continued onward to styling and adding pages. I was so happy and proud of myself when it finally worked. There are so few of these moments amidst the struggle that I make sure I acknowledge them.

I am leaving for the Future Stack conference tomorrow morning so I am going to hit the hay.

Hooray!!! Hooray!!! Hooray!!!

Thursday, October 17, 2013

Model View Controller Explanation

Model The classes which are used to store and manipulate state, typically in a database of some kind.

View The user interface bits (in this case, HTML) necessary to render the model to the user.

Controller The brains of the application. The controller decides what the user's input was, how the model needs to change as a result of that input, and which resulting view should be used.


Let's use some of this to make a simple little text editor:
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
filename = ARGV.first
script = $0

puts "We're going to erase #{filename}."
puts "If you don't want that, hit CTRL-C (^C)."
puts "If you do want that, hit RETURN."

print "? "
STDIN.gets

puts "Opening the file..."
target = File.open(filename, 'w')

puts "Truncating the file.  Goodbye!"
target.truncate(target.size)

puts "Now I'm going to ask you for three lines."

print "line 1: "; line1 = STDIN.gets.chomp()
print "line 2: "; line2 = STDIN.gets.chomp()
print "line 3: "; line3 = STDIN.gets.chomp()

puts "I'm going to write these to the file."

target.write(line1)
target.write("\n")
target.write(line2)
target.write("\n")
target.write(line3)
target.write("\n")

puts "And finally, we close it."
target.close()

Notes - Rails Tutorial Chapter 3.1

Sent PR to Bundler  hopefully it will get closed soon.
This fixes the issue: Warn if the same gem (same version) is added twice. bundler/bundler-features#22

To create the static views I am mainly in the app/controllers and the app/views directories

The config directory is where Rails collects files needed for the application configuration.

app/controllers/application_controller.rb

class ApplicationController < ActionController::Base
  # Prevent CSRF attacks by raising an exception.
  # For APIs, you may want to use :null_session instead.
  protect_from_forgery with: :exception
end

New in Rails 4
  • Previous versions of Rails used PUT in place of PATCH, and Rails 4.0 still supports this usage, but PATCH matches the intended HTTP usage better and is preferred for new applications. So GET, POST, PUT, DELETE is now GET, POST, PATCH, DELETE.

    Idempotence  is the property of certain operations in mathematics and computer science, that can be applied multiple times without changing the result beyond the initial application. It literally means "(the quality of having) the same power", from idem + potence (same + power).



Wednesday, October 16, 2013

Notes - Rails Tutorial Chapter 3.1 - Static Pages

I set the sample_app on GitHub and Herouku.

underscore method

Rails' ActiveSupport adds underscore to the String methods using the following code (This is NOT a String method in Ruby)

class String
  def underscore
    self.gsub(/::/, '/').
    gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').
    gsub(/([a-z\d])([A-Z])/,'\1_\2').
    tr("-", "_").
    downcase
  end
end
underscore(camel_cased_word)
Makes an underscored, lowercase form from the expression in the string.

Changes ‘::’ to ‘/’ to convert namespaces to paths.

  'ActiveModel'. underscore    # => "active_model"
  'ActiveModel::Errors'.underscore    # => "active_model/errors"


As a rule of thumb you can think of it as the inverse of camelize, though there are cases where that does not hold:
'SSLError'
.underscore.camelize # => "SslError"

CREATE & DESTROY

$ rails generate controller FooBars baz quux
$ rails destroy controller FooBars baz quux
$ rails generate model Foo bar:string baz:integer
$ rails destroy model Foo
$ rake db:migrate
  We can undo a single migration step using
$ rake db:rollback
  To go all the way back to the beginning, we can use
$ rake db:migrate VERSION=0

Tuesday, October 15, 2013

has_many & belongs_to

The Microposts Resource parallel the User Resources.

config/routes.rb
DemoApp::Application.routes.draw do
  resources:microposts
  resources:users
  .
  .
  .
end

Active Record

Forming associations between different data models with has_many and belongs_to.

app/models/user.rb
class User < ActiveRecord::Base
  has_many :microposts
end
app/models/micropost.rb
class Micropost < ActiveRecord::Base
  belongs_to  :user
  validates, :content, length: { maximum: 140 }
end
micropost_user_association


Hierarchy


demo_controller_inheritance

Middleman Blog

I am working on setting up a new Middleman blog to replace the jekll one I set up and mangled. http://jendiamond.github.io/ I was having a problem with having multiple versions of Middleman installed so I deleted them and started over with the oldest version that I have installed for  working on the RGSOC Team blog and the Bundler website. I may install RVM finally so I can use the newest version. I need some assistance and guidance. Time to check in with Cynthia. She said she'd show me RVM.
http://rubylearning.com/blog/2010/12/20/how-do-i-keep-multiple-ruby-projects-separate/

Friday, October 11, 2013

Users Resource

Back in Griffith Park with Lars. It's a beautiful day, the kids are playing and the crows are making their hollow clicking noises that sound like woodpeckers.

I am working my way through Chapter 2

A break down of 2.2
  1. The browser issues a request for the /users URL.
    a. We start with a request issued from the browser
    i.e., the result of typing a URL in the address bar or clicking on a link.
  2. Rails routes /users to the index action in the Users controller.
    a. This request hits the Rails router which dispatches to the proper controller action based on the URL and the type of request. The code below creates the mapping of user URLs to controller actions for the Users resource. This code effectively sets up the table of URL/action pairs seen in Table 2.1

    config/routes.rb
    DemoApp::Application.routes.draw do
      resources :users
      .
      .
      .
    end
    
  3. The index action asks the User model to retrieve all users (User.all).
    a. This index action has the line @users = User.all

  4. app/controllers/users_controller.rb
    class UsersController < ApplicationController
    
      def index
        @users= User.all
      end
      .
      .
      .
    end
    
  5. The User model pulls all the users from the database.
    a.  @users = User.all  asks the User model to retrieve a list of all the users from the database
  6. The User model returns the list of users to the controller.
    a. Then it places all the users from the database in the variable @users

    app/models/user.rb
  7. class User < ActiveRecord::Base
    end
    
  8. The controller captures the users in the @users variable, which is passed to the index view.
    a. Once the @users variable is defined, the controller calls the view. Instance variables, variables that start with the @ sign, are automatically availablein the view; in this case, the index.html.erb view iterates through the @users list and outputs a line of HTML for each one.

    app/views/users/index.html.erb
  9. The view uses embedded Ruby to render the page as HTML.
    a. The view converts its contents to HTML

    app/views/users/index.html.erb (The view for the user index.) 
  10. <h1>Listing users</h1>
    
    <table>
      <tr>
        <th>Name</th>
        <th>Email</th>
        <th></th>
        <th></th>
        <th></th>
      </tr>
    
    <% @users.each do |user| %>
      <tr>
        <td><%= user.name%></td>
        <td><%=user.email %></td> 
            <td><%=link_to 'Show',user %></td>
            <td><%= link_to 'Edit',edit_user_path(user) %></td>
            <td><%= link_to 'Destroy',user, method  :delete,data:                    { confirm: 'Are you sure?' } %></td> </tr> 
    <% end %> </table> 
    <br /> 
    <%= link_to 'New User', new_user_path %>

  • The controller passes the HTML back to the browser.
    a. The HTML content is then returned by the controller to the browser for display

  • Leaving the park because a modeling shoot just moved in under the gazebo.

    REST Architecture (REpresentational State Transfer) REST is an architectural style for developing distributed, networked systems and software applications such as the World Wide Web and web applications. Although REST theory is rather abstract, in the context of Rails applications REST means that most application components (such as users and microposts) are modeled as that can be created, read, updated, and deleted—operations that correspond both to the HTTP request methods POST GET PATCH and DELETE.

    Thursday, October 10, 2013

    Scaffolding

    I was having a weird zombie day so I used my last sugar scrub at Spa Pura in Montrose. Once I was re-invigorated and totally clean I went to the Coffee Bean next door and started the first part of Chapter 2: 2.1 Planning the application,  2.1.1 Modeling demo users, 2.1.2 Modeling demo micro posts; basically scaffolding.

      No one was signed up for the study group so I stayed home this week. I am going to change the location back to Panera in Glendale.  It's nice that Syrup is downtown and it is open so late but it is kind of hard to concentrate there. It's even harder to concentrate at my house right now.

      Wednesday, October 9, 2013

      Heroku - Yak Shaving

      I haven't pushed to heroku in so long that all my apps were sleeping. I realized that there was not much in there that was useful so I set about with some yak shaving and deleted at least ten apps. I had to install heroku on my laptop. There is now a toolbelt.  My process of adding heroku:

          $ sudo -i     This sets me up as the root user.

          $ wget -qO- https://toolbelt.heroku.com/install-ubuntu.sh | sh  

      This didn't work so Lars did this:

          $ sh ./the-name-of-the-script  

      wget is a program that downloads files from web servers. You could run: $wget http://jendiamond.com/index.html and get the index.html from your site. In this case, you are using wget to download a script from heroku's server and then piping it to "sh" so you're downloading a script from the internet and running it locally as root. For whatever reason it didn't pipe to sh properly so I just ran:   
      $ sh ./the-name-of-the-script
      This worked and I ran $ heroku create Then $ heroku login to check it out. After freaking out that my heroku app url only said: "An error occurred in the application and your page could not be served. Please try again in a few moments." I finally read the part in the tutorial that says: "Unfortunately, the resulting page is an error; as of Rails 4.0, for technical reasons the default Rails page doesn’t work on Heroku." I renamed my heroku app to railstutorial-jendiamond.

      Lars and I are sitting under the gazebo in Griffith Park. We have a lot of layers on so we were pretty comfortable. We are sitting at a table with a woman named Lucia who is studying for her Masters in Psychology at USC. We saw 8 deer wandering around today. It's a lot quieter here in the rain. It's around 2:30 and it is starting to get pretty chilly so we are heading home. I am going to stop off at the Observatory so I can look at the view.

      Team Dysania and Team Bundler were going to meet up tonight to go over the Rails Girls materials so everyone felt comfortable coaching at the upcoming Rails Girls workshop. Jessica got sick and couldn't go so we cancelled until sometime in the future.



      Tuesday, October 8, 2013

      Rails Girls logo

      Happy Birthday Heather Hike (and congrats on getting engaged) with Heather, SoYoung Amy and I at 8am.  I only slept 4+ hours last night but I still managed to hike and now I am working finishing up Ch. 1 of the Rails tutorial at Trails Cafe in Griffith Park. I am getting distracted with everyones request for something different for the logo: the ocean, traffic, palm trees, the Hollywood sign, non-recognition of the buildings, dislike of the girl. I will address this later when I am rested. BTW - The Capital Records Building, The Chinese Mann Theater, The Watts Towers & Griffith Observatory.

      My table neighbors are playing gin rummy game while Curtis the dog with his curly blond hair and caged mouth sniffs around for dropped food. It's a beautiful day in the park.

      I finally got tired, went home and fell asleep until 6pm.  I worked on another design for Rails Girls LA because no one was sold on the first design. I like them both. I tried to add waves but nothing really worked. I don't really want to add traffic and I think it really needs some specific buildings. I made the Rails Girls logo act as the Hollywood sign, seems like a good compromise. If not someone else can take a turn. I just wanted to get something done before we met up on Wednesday.




      Monday, October 7, 2013

      Rails Tutorial Phase 2

      Rails Tutorial Phase 2

      Brand New Day

      I am re-starting Michael HartI's Rails Tutorial. I made it up to Chapter 10 the last time I did it but I never really felt like I was really fully understanding what I was actually doing.

      My plan this time is to go through it as quickly as I can and have some experts from whom I can ask related questions. I also want to try to do some small Rails sites on my own. 

      I was considering installing rbenv on my Linux machine but I realized that I already have Rails 4 installed and my Ruby version is 1.9.3 so there is still no need for it.

      Good advice for today:
      Don’t worry about what you need to know in order to finish a project, you already have everything you need to start.
      Hannah Howard sweetly let me study at her place today which really helped me focus. I met her partner Ben and all their 3 dogs and their parrot. The parrot is so funny. He really wanted some attention so he flipped upside down and flapped his wings frantically. He talks and talks screeching watchout!, thank you, no that's a no, hey no biting,  it's okay, watch out.

      I worked on the preliminary version of a Rails Girls LA logo last night until 3am. I was in the zone.

      Tuesday, August 13, 2013

      No jOBS

      Today Team Bundler worked in Downtown L.A. at the Hub with the whole G5 crew including Jessicard who is visiting from San Francisco. We worked on the documentation for the Bundler website.

      I worked on organizing the content and all the links for the new side bar while Joyce made a skeleton of the side bar and got it to work on the site. We are ready to get rolling and start making changes. Here is what it looks like now. Soon I hope be much better. There is so much information already there it just needs some organizing.

      I want each section to have it's own page and I have found some great information that was buried. The side bar alone will really help make it easier to get around.

      After working we all went to try to see the premier of the Steve Jobs movie. We all had printed out our tickets and signed up on the website. We thought all we had to do was stand in line and we'd see it. Little did we know that there was a good chance we wouldn't get in. We stood on the sidewalk collecting friends, Ashley, Anna and Chris. After 2 hour of the line slowly surge towards the red carpet we realized that we were 20 people away from getting in. Boo.

      Ahsley, Anna, Chris and I managed to salvage the evening by going for some hand made udon in Little Toyko at Monzo.

      Friday, July 26, 2013

      Hierarchy of Exceptions

      Week 2 Day 9

      Pass the Test

      Hierarchy of Exceptions

      Run tests: $ rspec spec/bundle_i_spec.rb
      I got the test to pass after feeling like the ground beneath me had shifted. I was hanging onto a thread of barely even knowing what I was trying to do.
      Hint 1 - Jessica @jendiamond I talked to Andre and he says this spec goes in spec/other/cli_dispatch_spec.rb. Please move it to there! It is a CLI Dispatch because the command line interface is trying to forward the argument 'i' to the proper command.
      Hint 2 - Joyce The order matters. The hierarchy of code.
      "So remember, your application errors should be subclasses of StandardError and if you want to catch everything, just stick will plain old “rescue => ex”. Your application will behave better for it.

      Direct descendants of Exception:

      NoMemoryError
      ScriptError
      StandardError
      SignalException
      fatal
      SystemExit
      

      Direct descendants of StandardError:

      SystemStackError
      LocalJumpError
      IOError
      RegexpError
      ZeroDivisionError
      ThreadError
      SystemCallError
      SecurityError
      RuntimeError
      NameError
      RangeError
      IndexError
      ArgumentError
      TypeError
      

      I got it to pass!

      $ rspec spec/bundle_i_spec.rb
      Run options:
      include {:focused=>true}
      exclude {:ruby=>"1.8", :realworld=>true, :sudo=>true}
      All examples were filtered out; ignoring {:focused=>true}
      bundle i error
      should not raise an error
      Finished in 1.31 seconds
      1 example, 0 failures

      Other Things I Learned

      • empty? is a method some objects respond to. You need to check the documentation for each case. For example, and empty array is one that is not nil (it is an array right?) and has no elements. An empty string is one that is not nil (it is a string right?) and has no bytes, nothing.
      • I did this yesterday; I now realize why this is important.
        irb: StandardError.ancestors => [StandardError, Exception, Object, Kernel, BasicObject]
      Before it was fixed it looked like this
      bundle i
      /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/vendor/thor.rb:405:innormalize_task_name': Ambiguous task i matches [init, inject, install] (ArgumentError) from /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/vendor/thor.rb:321:indispatch'
      from /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/vendor/thor/base.rb:434:instart' from /var/lib/gems/1.9.1/gems/bundler-1.3.5/bin/bundle:20:inblock in '
      from /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/friendly_errors.rb:3:inwith_friendly_errors' from /var/lib/gems/1.9.1/gems/bundler-1.3.5/bin/bundle:20:in' from /usr/local/bin/bundle:19:in load' from /usr/local/bin/bundle:19:in'
      should not raise an error (FAILED - 1)
      Previously when I ran the test $ rspec spec/bundle_i_spec.rb it looked like this:
      Failures:
      1) bundle i error should not raise an error
      Failure/Error: expect(err).to be_empty
      expected empty? to return true, got false
      # ./spec/bundle_i_spec.rb:6:in `block (2 levels) in '
      Finished in 1.16 seconds
      1 example, 1 failure
      Failed examples:
      rspec ./spec/bundle_i_spec.rb:4 # bundle i error should not raise an error

      Wednesday, July 24, 2013

      Grep

      We are working on a Bundler Issues

      https://github.com/bundler/bundler/issues/2550

      grep
      We did grep searches to help us find out what our problem with the testing is. We located a bundler.ui.error and went down the rabbit hole to find out what it meant. We used grep in the command line to search for "def ui" because the convention in Ruby is that the name of the Class is the name of the file which makes it much easier to search. After narrowing it down Jessica eventually found that Bundler handles testing differently then how rspec usually works in other projects. Our searching helped her figure out that the problem was not in what we were doing.

      grep -r "def ui" .      grep -r recursive "whatever you are searching for" where(in this case all  ".")

      http://www.cyberciti.biz/faq/howto-use-grep-command-in-linux-unix/

      Here is the code I came up with so far with the help of Jessica & the other test files.

      Our task: Create a test where "bundle i " does not raise an error
      ______________________________________

      require "spec_helper"
      describe "bundle i error" do
         it "should not raise an error" do
           bundle " i "
           expect(err).to be_empty
        end
      end
      _______________________________________

      Create a test that prints a friendly message
      _______________________________________

      require "spec_helper"
        describe "bundler stuff" do
          it "should explain that bundler needs a specific argument" do
            bundle "i"
            expect(out).to match(/Ambiguous argument. Use bundle --help for a list of commands./i)
          end
      end
      _______________________________________

      These are not working quite right yet but it is what I have so far.

      Monday, July 22, 2013

      Success with Pull request

      Great. So I had removed the .swp files and the correct pull request had not been merged. Once it was it all worked great and I have my jdlinks feature branch up now as well as the changes to my page:
      http://rgsocbundler.github.io/jen-diamond/index.html
      So many links.



      Sunday, July 21, 2013

      Removing .swp files in Git

      I am still having a problem doing my pull request. 
      I deleted the .swp files using the rm *.swp in both my jdlink branch and the source branch just in case. My git log shows that I did

      jen@cinquecento:~/Desktop/railsgirls/rgsocbundler.github.io$ git diff d8e7 ad76
      diff --git a/source/.2013-06-30-hello-world.html.markdown.swp b/source/.2013-06-30-hello-world.htm
      deleted file mode 100644
      index b542810..0000000
      Binary files a/source/.2013-06-30-hello-world.html.markdown.swp and /dev/null differ
      diff --git a/source/.2013-07-16-week1-day1.html.markdown.swp b/source/.2013-07-16-week1-day1.html.
      deleted file mode 100644
      index 13229d4..0000000
      Binary files a/source/.2013-07-16-week1-day1.html.markdown.swp and /dev/null differ
      diff --git a/source/.index.html.erb.swp b/source/.index.html.erb.swp
      deleted file mode 100644
      index 3089049..0000000

      Actually I just noticed that this says that here I am on the source branch but I also definitely deleted the .swp files on my jdlinks branch. I think it's a problem with my pull request.

      Wednesday, July 17, 2013

      Git

      Lars and I had some crazy potent juice this morning. I went to Station Pharmacy for a coffee.

      Joyce and I posted in the Rails Girls IRC channel and setup campfire to chat with the Bundler team.

      Then we worked on Git we:
          •    Created new issues on Github
          •    Fixed issues on our blog
          •    Closed issues
          •    Watched Peepcode Git Screencast
          •    Learn about Branching and Collaborating
          •    Created Branches
          •    Created a Pull Requests

      Lunch- Kale Salad with tomatoes  and walnuts & Fennel Salad
      I came home and cooked until midnight to come down after my first cup of coffee in weeks.

      Tuesday, July 16, 2013

      First Official Day of Rail Girls Summer of Code

      I woke up early and excited. I made juice then Lars and I drove across town together for my first official day of Rail Girls Summer of Code.

      It was a successful first day. We set up our desks and got to work. First I realized that because I just switched computers last night/this morning from my other ThinkPad to my new super speedy, solid state drive ThinkPad that I had to re-install Rails and Bundler.

      When I tried to install bundler I kept getting an error: This post helped me solve it: http://rubygems.org/pages/download

      My next problem: installing node.js  
      my error: 
      sudo apt-get install node.js 
      Reading package lists... Done 
      Building dependency tree Reading state information... Done 
      E: Unable to locate package node.js 
      E: Couldn't find any package by regex 'node.js'

      sudo install node.js 
      install: missing destination file operand after `node.js' 
      Try `install --help' for more information.

      Answer: https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager#ubuntu-mint

      Then we started creating our Team Blog in Github Pages with the Middleman Gem. Jessica set up all the directions in the Read Me file. 
      Of interest: .gitignore files https://help.github.com/articles/ignoring-files 
      I need to set up a global ignore file so my swp files don't get uploaded when I do an add . to git.

      Joyce and I updated our bios on the blog and created separate pages for the link "Read More" to go to.

      The day went by so quickly that it felt like we didn't get much done. but I guess we did. I posted our first log in our Team Blog and Lars came to pick me up.

      Once we finally were home I made a delicious dinner, chilled out for a while and fell asleep.

      The rest of our team blogging will be done at: https://github.com/RGSoCBundler/rgsocbundler.github.io

      Thursday, July 11, 2013

      PaaS - Platform as a Service

      While reading some articles from this week's Ruby Weekly I ran into some unfamiliar terms.

      PaaS -  Platform as a Service (PaaS) is a way to rent hardware, operating systems, storage and network capacity over the Internet. The service delivery model allows the customer to rent virtualized servers and associated services for running existing applications or developing and testing new ones.


      Monday, June 24, 2013

      Team Blog

      Joyce and I met up in Gardena to create our railsgirls team blog
      I went for a massage to try to cure my numb fingers. 
      Then I met up with Anna and we saw After Midnight.

      Thursday, June 20, 2013

      Eastside/Westside Meetup June

      The Eastside and Westside Ruby Study Groups met up at Pivotal Labs in Santa Monica. Anna Mendoza talked about the Serve Gem, Front-end Development, Javascript and CSS, then Ira Herman talked about Heroku. We had a full crowd. There was 30 of us total. It was a totally successful event. New faces and old friends. We are building a community of female programmers and friends. 

      Wednesday, June 19, 2013

      Cal Tech Meetup - Internal & External DSLs

      Anna and I met up at Float in Pasadena to read and study. We went  to the meet up at Cal Tech and discussed internal and external DSLs (Ch. 27& 28 Eloquent Ruby) 
      Russ Olsen states "If you need to build a DSL, the choice is up to you: Do you take the ease and relative low cost of an internal DSL or go for the higher cost --and freedom-- of an external DSL?"

      Monday, June 17, 2013

      Bundler Rails Girls Summer of Code Plan

      Joyce and I met up in Santa Monica and did some pair programming. Then we met with our coach Jessica Suttles. We saw where we are going to be working, met the cats, her flat mate and she gave us a plan for our summer. . .

      Bundler Rails Girls Summer of Code Plan

      1. Use Bundler, and take notes about what is good and what is bad about using it. We want to fix the bad things!
      1. Improve [site documentation](http://gembundler.com)
      1. Improve `bundle help` [man page documentation](http://gembundler.com/v1.3/man/bundle.1.html)
      1. [Triage issues](https://github.com/bundler/bundler/blob/master/CONTRIBUTE.md#bug-triage)
      1. After taking notes about bad things, and starting to reproduce other people's problems, is there anything that you _want_ to work on? because if you're motivated to do it, chances are much higher you will want to stick with it until you figure it out.
      1. If not, we have a bunch of things that would make bundler better but not enough people working on them. Some of these are repeats of the steps above, but that would be fine. They need lots of doing. :)

      Bundler tasks

      (I'm pretty sure we can find a decent number of additional tasks that fall in the easy and medium levels by just going through the open tickets. --andre)

      easy

      ticket triage (try to repro, ask for more information)
      update the documentation if it’s wrong or confusing
      add documentation for things people open tickets about
      help confused people in #bundler on freenode
      add a useful error message when dependencies are circular (https://github.com/bundler/bundler/issues/2506)

      medium

      Patch level support (add :patchlevel argument to the “ruby” Gemfile method)
      Send useful user agent with HTTP requests (@indirect has started this, it's about 80% done in user_agent branch)
      Add read-through caching to the bundler-api server (save local copies of requested gems and serve those next time)
      Plugin-command support (search PATH for a command and run it if it exists)
      Stop saving options passed to install (this confuses people, and we’re hoping to make it better)

      hard

      Source disambiguation (@ckrailo has started this)
      Checksum generation (@hone has started this)
      Plugin callback/hook support (register code that will run when a gemfile is read, resolver is run, gem is installed, etc)
      Ruby API for bundle information (Ruby class that encapsulates a parsed gemfile and provides information about gems, groups, without status, and other handy things)

      Platform support (create separate lockfile entries if install is run on jruby, windows, etc)