solvebio 1.7.4 → 1.7.5

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/.bumpversion.cfg CHANGED
@@ -1,5 +1,5 @@
1
1
  [bumpversion]
2
- current_version = 1.7.4
2
+ current_version = 1.7.5
3
3
  files = lib/solvebio/version.rb
4
4
  commit = True
5
5
  tag = False
data/README.md CHANGED
@@ -13,7 +13,7 @@ Guided Installation
13
13
 
14
14
  To use the guided installer, open up your terminal and paste this:
15
15
 
16
- curl -kL install.solvebio.com/ruby | bash
16
+ curl -skL install.solvebio.com/ruby | bash
17
17
 
18
18
 
19
19
  Manual Installation
data/lib/solvebio.rb CHANGED
@@ -51,4 +51,28 @@ module SolveBio
51
51
  File::expand_path File.join(dir, 'solvebio.log')
52
52
  end
53
53
  @logger = Logger.new(logfile)
54
+
55
+ def self.login(opts={})
56
+ # Clear any existing auth keys
57
+ @access_token = nil
58
+ @api_key = nil
59
+
60
+ # Helper method to load credentials from local file in Ruby scripts.
61
+ if opts[:access_token]
62
+ @access_token = opts[:access_token]
63
+ elsif opts[:api_key]
64
+ @api_key = opts[:api_key]
65
+ else
66
+ # creds
67
+ require 'solvebio/cli/credentials'
68
+ _, @api_key = SolveBio::CLI::Credentials.get_credentials
69
+ end
70
+
71
+ if @api_key.nil? and @access_token.nil?
72
+ puts "No credentials found. Requests to SolveBio may fail. Use 'solvebio.rb login' to save your API key."
73
+ return false
74
+ end
75
+
76
+ return true
77
+ end
54
78
  end
@@ -82,7 +82,7 @@ module SolveBio
82
82
 
83
83
  module InstanceMethods
84
84
  def help
85
- open_help(self['full_name'])
85
+ open_help('/library/' + self['full_name'])
86
86
  end
87
87
  end
88
88
 
@@ -1,3 +1,3 @@
1
1
  module SolveBio
2
- VERSION = '1.7.4'
2
+ VERSION = '1.7.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solvebio
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.4
4
+ version: 1.7.5
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: 2015-01-29 00:00:00.000000000 Z
12
+ date: 2015-02-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: netrc