socialcast 1.3.4 → 1.3.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NmI1ZDYyYjY1YjFlNjY3NzYyOTQ3YjdkMGZlYjAzMWU0ZWVlZGJhNg==
4
+ NWI2YTIwMmZjZjVmOGY1YTQ0ZTMzMzBiOWExY2E3NGRhMzg4Y2Y1NA==
5
5
  data.tar.gz: !binary |-
6
- MDFhNzNhNGE4MTVmZjdhMGE0NGFiYTMyZjNjMzM4ZDBiNmM5NDUwOA==
6
+ NjU1MmUyYjE3ZWI1NmE2NjhiZjFiMWI3ZTFlYTU2ODNkMGM4YmI2ZA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ODBiZmIxOWQ4NjUxYWY0M2E5MGZhZjZjODJhYWQ1NzYzMmRhOGQzZjg1OTdh
10
- ODc1ZjRjZDViZTBhZDAzMWM5YTljZjI4ZmFhZmI5NTAzNzg3ZDljMWJjMWY2
11
- OGYzYTczYjIzYmJiZTNlMDI5ZWVkNGJlZmY0ZDEzYTQzNzJjYjU=
9
+ NDhmMTEyM2VkYTFhOTQxM2JkMmIwM2M0N2Q3YWUxNzJjNjBlMWJkMGYzNGY3
10
+ NThmYTA2ZjViY2M4MDY5ZDQ3Y2QyOTI3NmY1ZTRjNjNiYzMxYjk1ODUzYmI2
11
+ MmIwMzg0NzRkNWJmMDMzYTk4ZTk1NjE0YWRjMjJjZDA1MmEzYzM=
12
12
  data.tar.gz: !binary |-
13
- OTc2M2U5YWFiYWY4MTVhZjI5NTllODAxYTEzZjc4ZjlhOWFiYTg0NDhjZWJk
14
- Njg4OGRlNDJkMWI0NmE4NjE2NDc2ZjgxODIwZjFlYTJhMTEwMTQyNDYwM2Qz
15
- ZGYzMmVhNTY1MDk5NmI5YzYzYjg0ZmFjMDAyOTk0ODQ1YmU0Y2Y=
13
+ YTkwYTYwZjA3NzU4ZWI2YTRjM2MxZmJmOWNjODhjYTY3MjY3YjBkYzc2NjQw
14
+ ZGZjZGMzMTBhOWRmNDI4Nzg2NTkwZjE3YWNiZGFiOWEzMzk4NmQ5NzQzYmEx
15
+ ZTJjODk3MGQyY2Y3YWFkMWY2ZmIwOWViMmYyZmQ1NDE3MTg4NjE=
data/bin/socialcast CHANGED
@@ -1,6 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- $:.unshift(File.expand_path('../../lib', __FILE__))
4
- require 'socialcast/command_line/cli'
3
+ require_relative '../lib/socialcast'
5
4
 
6
5
  Socialcast::CommandLine::CLI.start
@@ -6,9 +6,6 @@ require "thor"
6
6
  require 'json'
7
7
  require 'rest_client'
8
8
  require 'highline'
9
- require 'socialcast'
10
- require 'socialcast/command_line/message'
11
- require 'socialcast/command_line/provision'
12
9
 
13
10
  require 'logger'
14
11
  require 'fileutils'
@@ -32,9 +29,18 @@ module Socialcast
32
29
  class CLI < Thor
33
30
  include Thor::Actions
34
31
 
35
- method_option :trace, :type => :boolean, :aliases => '-v'
32
+ method_option :trace, :type => :boolean, :aliases => '-t'
36
33
  def initialize(*args); super; end
37
34
 
35
+ desc "info", "Information about the socialcast command"
36
+ method_option :version, :type => :string, :aliases => '-v', :description => 'print the version number and exit'
37
+ def info
38
+ if options["version"]
39
+ say "Socialcast Command Line #{Socialcast::CommandLine::VERSION}"
40
+ end
41
+ end
42
+ default_task :info
43
+
38
44
  desc "authenticate", "Authenticate using your Socialcast credentials"
39
45
  method_option :user, :type => :string, :aliases => '-u', :desc => 'email address for the authenticated user'
40
46
  method_option :password, :type => :string, :aliases => '-p', :desc => 'password for the authenticated user'
@@ -2,7 +2,6 @@ require 'zlib'
2
2
  require 'builder'
3
3
  require 'set'
4
4
  require 'fileutils'
5
- require 'socialcast/command_line/ldap_connector'
6
5
 
7
6
  module Socialcast
8
7
  module CommandLine
@@ -1,5 +1,5 @@
1
1
  module Socialcast
2
2
  module CommandLine
3
- VERSION = "1.3.4"
3
+ VERSION = "1.3.5"
4
4
  end
5
5
  end
data/lib/socialcast.rb CHANGED
@@ -1,6 +1,11 @@
1
1
  require 'yaml'
2
2
  require 'fileutils'
3
- require 'socialcast/command_line/provision'
3
+
4
+ require_relative 'socialcast/command_line/ldap_connector'
5
+ require_relative 'socialcast/command_line/provision'
6
+ require_relative 'socialcast/command_line/message'
7
+ require_relative 'socialcast/command_line/cli'
8
+ require_relative 'socialcast/command_line/version'
4
9
 
5
10
  module Socialcast
6
11
  module CommandLine
@@ -16,6 +16,24 @@ describe Socialcast::CommandLine::CLI do
16
16
  Socialcast::CommandLine.stub(:credentials).and_return(credentials)
17
17
  end
18
18
 
19
+ describe '#info' do
20
+ before do
21
+ Socialcast::CommandLine::CLI.any_instance.should_receive(:say).with("Socialcast Command Line #{Socialcast::CommandLine::VERSION}")
22
+ end
23
+ context '--version' do
24
+ before do
25
+ Socialcast::CommandLine::CLI.start ["--version"]
26
+ end
27
+ it "prints the version" do end
28
+ end
29
+ context '-v' do
30
+ before do
31
+ Socialcast::CommandLine::CLI.start ["-v"]
32
+ end
33
+ it "prints the version" do end
34
+ end
35
+ end
36
+
19
37
  describe '#share' do
20
38
  # Expects -u=emily@socialcast.com -p=demo --domain=demo.socialcast.com
21
39
  context 'with a basic message' do
data/spec/spec_helper.rb CHANGED
@@ -5,7 +5,7 @@ require 'rspec/mocks'
5
5
  require 'pry'
6
6
  RSpec::Mocks::setup(Object.new)
7
7
 
8
- require 'socialcast/command_line/cli'
8
+ require_relative '../lib/socialcast'
9
9
 
10
10
  RSpec.configure do |config|
11
11
  config.mock_with :rspec
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: socialcast
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.4
4
+ version: 1.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Sonnek
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-04-28 00:00:00.000000000 Z
13
+ date: 2014-05-05 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rest-client