forked from cucumber-ltd/relish-gem
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
154 additions
and
54 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
.bundle | ||
.DS_Store | ||
.rvmrc | ||
*.gem |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
source :rubygems | ||
gemspec |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
PATH | ||
remote: . | ||
specs: | ||
relish (0.0.1) | ||
|
||
GEM | ||
remote: http://rubygems.org/ | ||
specs: | ||
archive-tar-minitar (0.5.2) | ||
aruba (0.2.2) | ||
builder (2.1.2) | ||
cucumber (0.8.5) | ||
builder (~> 2.1.2) | ||
diff-lcs (~> 1.1.2) | ||
gherkin (~> 2.1.4) | ||
json_pure (~> 1.4.3) | ||
term-ansicolor (~> 1.0.4) | ||
diff-lcs (1.1.2) | ||
gherkin (2.1.5) | ||
trollop (~> 1.16.2) | ||
json_pure (1.4.6) | ||
mime-types (1.16) | ||
rake (0.8.7) | ||
rest-client (1.6.1) | ||
mime-types (>= 1.16) | ||
rspec (2.0.0.beta.22) | ||
rspec-core (= 2.0.0.beta.22) | ||
rspec-expectations (= 2.0.0.beta.22) | ||
rspec-mocks (= 2.0.0.beta.22) | ||
rspec-core (2.0.0.beta.22) | ||
rspec-expectations (2.0.0.beta.22) | ||
diff-lcs (>= 1.1.2) | ||
rspec-mocks (2.0.0.beta.22) | ||
rspec-core (= 2.0.0.beta.22) | ||
rspec-expectations (= 2.0.0.beta.22) | ||
term-ansicolor (1.0.5) | ||
trollop (1.16.2) | ||
|
||
PLATFORMS | ||
ruby | ||
|
||
DEPENDENCIES | ||
archive-tar-minitar (~> 0.5.2) | ||
aruba (~> 0.2.1) | ||
bundler (~> 1.0.0) | ||
cucumber (~> 0.8.5) | ||
rake (~> 0.8.7) | ||
relish! | ||
rest-client (~> 1.6.1) | ||
rspec (~> 2.0.0.beta.22) | ||
trollop (~> 1.16.2) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
require 'bundler' | ||
require 'bundler/setup' | ||
Bundler::GemHelper.install_tasks | ||
|
||
require 'rake' | ||
require 'rspec/core/rake_task' | ||
|
||
RSpec::Core::RakeTask.new(:spec) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
require 'relish/helpers' | ||
require 'relish/command' |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
require 'relish/commands/base' | ||
require 'relish/commands/push' |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module Relish | ||
module Command | ||
class Base | ||
include Relish::Helpers | ||
|
||
def api_token | ||
File.read("#{home_directory}/.relish/api_token") | ||
end | ||
|
||
end | ||
end | ||
end |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
module Relish | ||
module Helpers | ||
def home_directory | ||
running_on_windows? ? ENV['USERPROFILE'] : ENV['HOME'] | ||
end | ||
|
||
def running_on_windows? | ||
RUBY_PLATFORM =~ /mswin32|mingw32/ | ||
end | ||
|
||
def running_on_a_mac? | ||
RUBY_PLATFORM =~ /-darwin\d/ | ||
end | ||
end | ||
end |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
require 'spec_helper' | ||
|
||
module Relish | ||
module Command | ||
describe Base do | ||
|
||
describe '#api_token' do | ||
let(:base) { described_class.new } | ||
|
||
it 'calls File.read with the correct path' do | ||
base.should_receive(:home_directory).and_return('~') | ||
File.should_receive(:read).with('~/.relish/api_token') | ||
base.api_token | ||
end | ||
end | ||
|
||
end | ||
end | ||
end |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
require 'spec_helper' | ||
|
||
module Relish | ||
module Command | ||
describe Push do | ||
end | ||
end | ||
end |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
require 'rubygems' | ||
require 'bundler' | ||
Bundler.setup | ||
|
||
require 'relish' | ||
|
||
RSpec.configure do |config| | ||
config.color_enabled = true | ||
end |