tddium-preview 0.6.11 → 0.6.12

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tddium-preview (0.6.10)
4
+ tddium-preview (0.6.11)
5
5
  bundler
6
6
  highline
7
7
  json
@@ -3,5 +3,5 @@ Copyright (c) 2011 Solano Labs All Rights Reserved
3
3
  =end
4
4
 
5
5
  module TddiumVersion
6
- VERSION = "0.6.11"
6
+ VERSION = "0.6.12"
7
7
  end
data/lib/tddium.rb CHANGED
@@ -10,6 +10,7 @@ require "tddium_client"
10
10
  require "base64"
11
11
  require 'erb'
12
12
  require File.expand_path("../tddium/constant", __FILE__)
13
+ require File.expand_path("../tddium/version", __FILE__)
13
14
  require File.expand_path("../tddium/heroku", __FILE__)
14
15
 
15
16
  # Usage:
@@ -340,6 +341,12 @@ class Tddium < Thor
340
341
  end
341
342
  end
342
343
 
344
+ map "-v" => :version
345
+ desc "version", "Print the tddium gem version"
346
+ def version
347
+ say TddiumVersion::VERSION
348
+ end
349
+
343
350
  private
344
351
 
345
352
  def call_api(method, api_path, params = {}, api_key = nil, show_error = true)
data/spec/tddium_spec.rb CHANGED
@@ -83,7 +83,7 @@ describe Tddium do
83
83
  send("run_#{method}", tddium, options)
84
84
  end
85
85
 
86
- [:suite, :spec, :status, :account, :login, :logout, :password, :heroku].each do |method|
86
+ [:suite, :spec, :status, :account, :login, :logout, :password, :heroku, :version].each do |method|
87
87
  def prep_params(method, params=nil)
88
88
  options = params.first || {}
89
89
  options[:environment] = "test" unless options.has_key?(:environment)
@@ -1597,4 +1597,11 @@ describe Tddium do
1597
1597
  it_should_behave_like "an unsuccessful api call"
1598
1598
  end
1599
1599
  end
1600
+
1601
+ describe "#version" do
1602
+ it "should print the version" do
1603
+ tddium.should_receive(:say).with(TddiumVersion::VERSION)
1604
+ run_version(tddium)
1605
+ end
1606
+ end
1600
1607
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: tddium-preview
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.6.11
5
+ version: 0.6.12
6
6
  platform: ruby
7
7
  authors:
8
8
  - Solano Labs