This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def parse_date(date) | |
| if date.is_a?(Integer) | |
| parse_date_from_timestamp(date) | |
| elsif date.is_a?(String) | |
| if date.to_i.to_s == date | |
| parse_date_from_timestamp(date.to_i) | |
| else | |
| parse_date_from_string(date) | |
| end | |
| elsif date.acts_like?(:date) || date.acts_like?(:time) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| AllCops: | |
| RunRailsCops: true | |
| Excludes: | |
| - 'db/schema.rb' | |
| - 'vendor' | |
| StringLiterals: | |
| Enabled: false | |
| LineLength: | |
| Max: 100 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Boolean | |
| end | |
| class TrueClass | |
| include Boolean | |
| end | |
| class FalseClass | |
| include Boolean | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def new_method name, &block | |
| define_method(name) { block.call } | |
| end | |
| new_method :ping do | |
| puts "pong" | |
| end | |
| ping |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # DOCKER-VERSION 0.4.8 | |
| FROM ubuntu:12.04 | |
| # install essentials | |
| RUN apt-get install -y -q git | |
| # Install rbenv | |
| RUN git clone https://github.com/sstephenson/rbenv.git /usr/local/rbenv | |
| RUN echo '# rbenv setup' > /etc/profile.d/rbenv.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # DOCKER-VERSION 0.4.8 | |
| FROM ubuntu:12.04 | |
| # install essentials | |
| RUN apt-get install -y -q git | |
| # Install rbenv | |
| RUN git clone https://github.com/sstephenson/rbenv.git /usr/local/rbenv | |
| RUN echo '# rbenv setup' > /etc/profile.d/rbenv.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # DOCKER-VERSION 0.4.8 | |
| FROM ubuntu:12.04 | |
| MAINTAINER Deepak Kannan "[email protected]" | |
| RUN apt-get -y install python-software-properties | |
| RUN apt-add-repository -y ppa:brightbox/ruby-ng-experimental | |
| RUN apt-get -y update |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # DOCKER-VERSION 0.4.8 | |
| # am facing issue | |
| # https://github.com/dotcloud/docker/issues/1123 | |
| FROM ubuntu:12.04 | |
| MAINTAINER Deepak Kannan "[email protected]" | |
| RUN apt-get -y install python-software-properties |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| puts "default" | |
| spawn({}, 'ruby --version') | |
| sleep 2 | |
| puts "ruby2" | |
| spawn({"RBENV_VERSION" => "2.0.0-p195"}, 'rbenv rehash; ruby --version') #~> still shown as 1.9 not 2.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| trying out Apple Diction. the first one was supposed to be a ruby function | |
| none of them are even close. lolwutz all around :-) | |
| - Hey I am making the record no he's done | |
| - Their food and IE easy-going okay | |
| - My name is Leslie | |
| - This diction basics pleasing to let the Buddha | |
| - By all of the sauce again |