databasedotcom_console 0.0.7 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/bin/dbdc CHANGED
@@ -1,8 +1,14 @@
1
1
  #!/usr/bin/env ruby
2
-
2
+ require 'rubygems'
3
3
  require 'databasedotcom_console'
4
4
  require 'irb'
5
- require 'io/console'
5
+
6
+ def supported_ruby
7
+ this_ruby = RUBY_VERSION.dup
8
+ Gem::Version.new(this_ruby) >= Gem::Version.new("1.9.3")
9
+ end
10
+
11
+ require 'io/console' if supported_ruby
6
12
  require 'optparse'
7
13
 
8
14
  ### RANDOM UTIL METHOD
@@ -24,7 +30,8 @@ def get_creds(opts={})
24
30
  creds[:pw] = opts[:pw]
25
31
  else
26
32
  print "PASSWORD (and security token if necessary): "
27
- creds[:pw] = STDIN.noecho(&:gets)
33
+ creds[:pw] = STDIN.noecho(&:gets) if supported_ruby
34
+ creds[:pw] = gets.strip unless supported_ruby
28
35
  end
29
36
  creds
30
37
  end
@@ -1,3 +1,3 @@
1
1
  module DatabasedotcomConsole
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
@@ -0,0 +1,7 @@
1
+ # Console Test
2
+ require 'databasedotcom_console.rb'
3
+
4
+ class TestDatabasedotcomConsole < Test::Unit::TestCase
5
+ def open_dbdc_console
6
+ end
7
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: databasedotcom_console
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-30 00:00:00.000000000 Z
12
+ date: 2013-02-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: databasedotcom
@@ -42,9 +42,9 @@ files:
42
42
  - Rakefile
43
43
  - bin/dbdc
44
44
  - databasedotcom_console.gemspec
45
- - foo.rb
46
45
  - lib/databasedotcom_console.rb
47
46
  - lib/databasedotcom_console/version.rb
47
+ - test/console_test.rb
48
48
  homepage: http://mavens.io/
49
49
  licenses: []
50
50
  post_install_message:
@@ -69,4 +69,5 @@ rubygems_version: 1.8.24
69
69
  signing_key:
70
70
  specification_version: 3
71
71
  summary: Quickly spin up a ruby console that can talk to your salesforce org.
72
- test_files: []
72
+ test_files:
73
+ - test/console_test.rb
data/foo.rb DELETED
@@ -1 +0,0 @@
1
- puts @dbdc.list_sobjects