Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

And we have a name!

  • Loading branch information...
commit 45c06a95c36e23342597aab5bf9c658e536bbe79 1 parent 752edcc
Carol Nichols authored
2  .rvmrc
@@ -4,7 +4,7 @@
4 4 # development environment upon cd'ing into the directory
5 5
6 6 # First we specify our desired <ruby>[@<gemset>], the @gemset name is optional.
7   -environment_id="ruby-1.9.2@x_proj"
  7 +environment_id="ruby-1.9.2@compatriot"
8 8
9 9 #
10 10 # First we attempt to load the desired environment directly from the environment
2  Gemfile
... ... @@ -1,4 +1,4 @@
1 1 source 'http://rubygems.org'
2 2
3   -# Specify your gem's dependencies in x_proj.gemspec
  3 +# Specify your gem's dependencies in compatriot.gemspec
4 4 gemspec
4 README.md
Source Rendered
... ... @@ -1,3 +1,7 @@
  1 +Compatriot
  2 +----------
  3 +**Compat**ibility + **riot**! It's your **friend** that helps you with browser compatibility!
  4 +
1 5 What this is
2 6 ------------
3 7
6 x_proj.gemspec → compatriot.gemspec
... ... @@ -1,5 +1,5 @@
1 1 # -*- encoding: utf-8 -*-
2   -require File.expand_path('../lib/x_proj/version', __FILE__)
  2 +require File.expand_path('../lib/compatriot/version', __FILE__)
3 3
4 4 Gem::Specification.new do |gem|
5 5 gem.authors = ["Carol Nichols"]
@@ -11,9 +11,9 @@ Gem::Specification.new do |gem|
11 11 gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
12 12 gem.files = `git ls-files`.split("\n")
13 13 gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
14   - gem.name = "x_proj"
  14 + gem.name = "compatriot"
15 15 gem.require_paths = ["lib"]
16   - gem.version = XProj::VERSION
  16 + gem.version = Compatriot::VERSION
17 17
18 18 gem.add_runtime_dependency "capybara", "~> 1.1.2"
19 19 gem.add_runtime_dependency "rake", "~> 0.9.2.2"
4 lib/compatriot.rb
... ... @@ -0,0 +1,4 @@
  1 +require "compatriot/version"
  2 +require "compatriot/runner"
  3 +require "compatriot/browser"
  4 +require "compatriot/results_presenter"
2  lib/x_proj/browser.rb → lib/compatriot/browser.rb
... ... @@ -1,7 +1,7 @@
1 1 require "fileutils"
2 2 require 'capybara/dsl'
3 3
4   -module XProj
  4 +module Compatriot
5 5 class Browser
6 6 include Capybara::DSL
7 7
2  lib/x_proj/results_presenter.rb → lib/compatriot/results_presenter.rb
... ... @@ -1,6 +1,6 @@
1 1 require 'erb'
2 2
3   -module XProj
  3 +module Compatriot
4 4 class ResultsPresenter
5 5 def initialize(results_directory)
6 6 @results_directory = results_directory
6 lib/x_proj/runner.rb → lib/compatriot/runner.rb
... ... @@ -1,6 +1,6 @@
1 1 require "fileutils"
2 2
3   -module XProj
  3 +module Compatriot
4 4 class Runner
5 5 def self.start(app, paths, clock = DateTime)
6 6 runner = new(app, paths, clock)
@@ -22,7 +22,7 @@ def initialize(app, paths, clock)
22 22 def take_screenshots
23 23 @results = {}
24 24 BROWSERS.each do |b|
25   - browser = XProj::Browser.new(b)
  25 + browser = Compatriot::Browser.new(b)
26 26 @results[b] = browser.take_screenshots(
27 27 :app => @app,
28 28 :paths => @paths,
@@ -40,7 +40,7 @@ def results_directory
40 40 end
41 41
42 42 def make_index_page
43   - presenter = XProj::ResultsPresenter.new(results_directory)
  43 + presenter = Compatriot::ResultsPresenter.new(results_directory)
44 44 presenter.make_index_page(@results)
45 45 end
46 46 end
2  lib/x_proj/version.rb → lib/compatriot/version.rb
... ... @@ -1,3 +1,3 @@
1   -module XProj
  1 +module Compatriot
2 2 VERSION = "0.0.1"
3 3 end
8 lib/x_proj.rb
... ... @@ -1,8 +0,0 @@
1   -require "x_proj/version"
2   -require "x_proj/runner"
3   -require "x_proj/browser"
4   -require "x_proj/results_presenter"
5   -
6   -module XProj
7   - # Your code goes here...
8   -end
6 spec/basic_behavior_spec.rb
@@ -21,18 +21,18 @@
21 21 end
22 22
23 23 it "holds onto the app we give it" do
24   - x = XProj::Runner.new(TestApp, ["/"], @fixed_clock)
  24 + x = Compatriot::Runner.new(TestApp, ["/"], @fixed_clock)
25 25 x.app.must_equal(TestApp)
26 26 end
27 27
28 28 it "names a results directory based on the clock" do
29   - x = XProj::Runner.new(TestApp, ["/"], @fixed_clock)
  29 + x = Compatriot::Runner.new(TestApp, ["/"], @fixed_clock)
30 30 x.results_directory.must_equal(@results_directory)
31 31 end
32 32
33 33 describe "self#start" do
34 34 before do
35   - XProj::Runner.start(TestApp, ["/"], @fixed_clock)
  35 + Compatriot::Runner.start(TestApp, ["/"], @fixed_clock)
36 36 end
37 37
38 38 it "creates directories in which to store the results based on the date" do
2  spec/list_of_app_paths_spec.rb
@@ -16,7 +16,7 @@
16 16 @firefox_directory = File.join(@results_directory, "firefox")
17 17 @chrome_directory = File.join(@results_directory, "chrome")
18 18
19   - @x = XProj::Runner.start(TestApp, ["/", "/chrome-css-bug"], @fixed_clock)
  19 + @x = Compatriot::Runner.start(TestApp, ["/", "/chrome-css-bug"], @fixed_clock)
20 20 end
21 21
22 22 after do
2  spec/spec_helper.rb
... ... @@ -1,7 +1,7 @@
1 1 $:.unshift(File.expand_path('../lib', File.dirname(__FILE__)))
2 2
3 3 require 'minitest/autorun'
4   -require 'x_proj'
  4 +require 'compatriot'
5 5
6 6 require_relative "sample_app/test_app"
7 7

0 comments on commit 45c06a9

Please sign in to comment.
Something went wrong with that request. Please try again.