Skip to content

Commit 840e3c0

Browse files
committed
Merge pull request #7 from SirSkidmore/master
Restructured for basic Ruby layout
2 parents 49fd726 + bf8c04a commit 840e3c0

11 files changed

+130
-54
lines changed

.gitignore

-22
This file was deleted.

.rvmrc

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#!/usr/bin/env bash
2+
3+
# This is an RVM Project .rvmrc file, used to automatically load the ruby
4+
# development environment upon cd'ing into the directory
5+
6+
# First we specify our desired <ruby>[@<gemset>], the @gemset name is optional,
7+
# Only full ruby name is supported here, for short names use:
8+
# echo "rvm use 1.9.3" > .rvmrc
9+
environment_id="ruby-1.9.3-p374@hatter"
10+
11+
# Uncomment the following lines if you want to verify rvm version per project
12+
# rvmrc_rvm_version="1.18.3 (stable)" # 1.10.1 seams as a safe start
13+
# eval "$(echo ${rvm_version}.${rvmrc_rvm_version} | awk -F. '{print "[[ "$1*65536+$2*256+$3" -ge "$4*65536+$5*256+$6" ]]"}' )" || {
14+
# echo "This .rvmrc file requires at least RVM ${rvmrc_rvm_version}, aborting loading."
15+
# return 1
16+
# }
17+
18+
# First we attempt to load the desired environment directly from the environment
19+
# file. This is very fast and efficient compared to running through the entire
20+
# CLI and selector. If you want feedback on which environment was used then
21+
# insert the word 'use' after --create as this triggers verbose mode.
22+
if [[ -d "${rvm_path:-$HOME/.rvm}/environments"
23+
&& -s "${rvm_path:-$HOME/.rvm}/environments/$environment_id" ]]
24+
then
25+
\. "${rvm_path:-$HOME/.rvm}/environments/$environment_id"
26+
[[ -s "${rvm_path:-$HOME/.rvm}/hooks/after_use" ]] &&
27+
\. "${rvm_path:-$HOME/.rvm}/hooks/after_use" || true
28+
else
29+
# If the environment file has not yet been created, use the RVM CLI to select.
30+
rvm --create "$environment_id" || {
31+
echo "Failed to create RVM environment '${environment_id}'."
32+
return 1
33+
}
34+
fi
35+
36+
# If you use bundler, this might be useful to you:
37+
# if [[ -s Gemfile ]] && {
38+
# ! builtin command -v bundle >/dev/null ||
39+
# builtin command -v bundle | GREP_OPTIONS= \grep $rvm_path/bin/bundle >/dev/null
40+
# }
41+
# then
42+
# printf "%b" "The rubygem 'bundler' is not installed. Installing it now.\n"
43+
# gem install bundler
44+
# fi
45+
# if [[ -s Gemfile ]] && builtin command -v bundle >/dev/null
46+
# then
47+
# bundle install | GREP_OPTIONS= \grep -vE '^Using|Your bundle is complete'
48+
# fi

Gemfile

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
source 'http://rubygems.org'
2+
3+
group :development, :test do
4+
gem 'rspec'
5+
gem 'pry'
6+
gem 'rake'
7+
end
8+
9+
# Specify your gem's dependencies in hatter.gemspec
10+
gemspec

Gemfile.lock

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
PATH
2+
remote: .
3+
specs:
4+
Hatter (0.0.1)
5+
6+
GEM
7+
remote: http://rubygems.org/
8+
specs:
9+
coderay (1.0.8)
10+
diff-lcs (1.1.3)
11+
method_source (0.8.1)
12+
pry (0.9.11.4)
13+
coderay (~> 1.0.5)
14+
method_source (~> 0.8)
15+
slop (~> 3.4)
16+
pry (0.9.11.4-x86-mingw32)
17+
coderay (~> 1.0.5)
18+
method_source (~> 0.8)
19+
slop (~> 3.4)
20+
win32console (~> 1.3)
21+
rake (10.0.3)
22+
rspec (2.12.0)
23+
rspec-core (~> 2.12.0)
24+
rspec-expectations (~> 2.12.0)
25+
rspec-mocks (~> 2.12.0)
26+
rspec-core (2.12.2)
27+
rspec-expectations (2.12.1)
28+
diff-lcs (~> 1.1.3)
29+
rspec-mocks (2.12.2)
30+
slop (3.4.3)
31+
win32console (1.3.2-x86-mingw32)
32+
33+
PLATFORMS
34+
ruby
35+
x86-mingw32
36+
37+
DEPENDENCIES
38+
Hatter!
39+
pry
40+
rake
41+
rspec

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Hatter
2-
======
3-
1+
Hatter
2+
======
3+
44
An Email Client that's positively Mad!

Rakefile

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
require 'rspec/core/rake_task'
2+
3+
task :default => :spec
4+
5+
desc "Run tests"
6+
RSpec::Core::RakeTask.new do |s|
7+
s.rspec_opts = ["-c", "-f progress"]
8+
end

hatter.gemspec

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Gem::Specification.new do |c|
2+
c.authors = ["Learn Programming Mentoring Group"]
3+
c.email = [""]
4+
c.description = %q{An email client that positively mad!}
5+
c.summary = %q{An email client that positively mad!}
6+
c.homepage = ""
7+
c.name = "Hatter"
8+
c.version = "0.0.1"
9+
c.require_paths = ["lib"]
10+
end

lib/hatter.rb

Whitespace-only changes.

pre-commit.sh

-29
This file was deleted.

spec/hatter_spec.rb

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
require 'spec_helper'
2+
3+
describe "Hatter" do
4+
it "should run tests" do
5+
pending "add some real tests"
6+
end
7+
end

spec/spec_helper.rb

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
require 'rspec'
2+
3+
require './lib/hatter.rb'

0 commit comments

Comments
 (0)