socialcast 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +2 -2
- data/VERSION +1 -1
- data/bin/socialcast +7 -10
- data/socialcast.gemspec +8 -8
- metadata +13 -11
data/Rakefile
CHANGED
@@ -12,8 +12,8 @@ begin
|
|
12
12
|
gem.authors = ["Ryan Sonnek"]
|
13
13
|
gem.add_development_dependency "shoulda", ">= 0"
|
14
14
|
gem.add_runtime_dependency 'commander', '>= 4.0'
|
15
|
-
gem.add_runtime_dependency 'rest-client', '>= 1.
|
16
|
-
gem.add_runtime_dependency 'json', '>=
|
15
|
+
gem.add_runtime_dependency 'rest-client', '>= 1.6.1'
|
16
|
+
gem.add_runtime_dependency 'json', '>= 1.4.6'
|
17
17
|
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
18
18
|
end
|
19
19
|
Jeweler::GemcutterTasks.new
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.1
|
data/bin/socialcast
CHANGED
@@ -28,12 +28,10 @@ command :authenticate do |c|
|
|
28
28
|
url = ['https://', options.domain, '/api/authentication.json'].join
|
29
29
|
params = {:email => options.user, :password => options.password }
|
30
30
|
resource = RestClient::Resource.new url
|
31
|
-
resource.post params
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
options.domain = communities.detect {|c| c['domain'] == options.domain} ? options.domain : communities.first['domain']
|
36
|
-
end
|
31
|
+
response = resource.post params
|
32
|
+
puts "API response: #{response.body.to_s}" if options.trace
|
33
|
+
communities = JSON.parse(response.body.to_s)['communities']
|
34
|
+
options.domain = communities.detect {|c| c['domain'] == options.domain} ? options.domain : communities.first['domain']
|
37
35
|
|
38
36
|
save_credentials :user => options.user, :password => options.password, :domain => options.domain
|
39
37
|
say "Authentication successful for #{options.domain}"
|
@@ -54,10 +52,9 @@ command :share do |c|
|
|
54
52
|
say "Posting message from #{credentials[:user]} to: #{url}"
|
55
53
|
resource = RestClient::Resource.new url, :user => credentials[:user], :password => credentials[:password]
|
56
54
|
params = {:message => {:body => message, :url => options.url}}
|
57
|
-
resource.post params
|
58
|
-
|
59
|
-
|
60
|
-
end
|
55
|
+
response = resource.post params
|
56
|
+
puts "API response: #{response.body.to_s}" if options.trace
|
57
|
+
|
61
58
|
say "Message has been shared"
|
62
59
|
end
|
63
60
|
end
|
data/socialcast.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{socialcast}
|
8
|
-
s.version = "0.3.
|
8
|
+
s.version = "0.3.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Ryan Sonnek"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-12-03}
|
13
13
|
s.default_executable = %q{socialcast}
|
14
14
|
s.description = %q{publish messages to your stream from a command line interface}
|
15
15
|
s.email = %q{ryan@socialcast.com}
|
@@ -50,19 +50,19 @@ Gem::Specification.new do |s|
|
|
50
50
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
51
51
|
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
52
52
|
s.add_runtime_dependency(%q<commander>, [">= 4.0"])
|
53
|
-
s.add_runtime_dependency(%q<rest-client>, [">= 1.
|
54
|
-
s.add_runtime_dependency(%q<json>, [">=
|
53
|
+
s.add_runtime_dependency(%q<rest-client>, [">= 1.6.1"])
|
54
|
+
s.add_runtime_dependency(%q<json>, [">= 1.4.6"])
|
55
55
|
else
|
56
56
|
s.add_dependency(%q<shoulda>, [">= 0"])
|
57
57
|
s.add_dependency(%q<commander>, [">= 4.0"])
|
58
|
-
s.add_dependency(%q<rest-client>, [">= 1.
|
59
|
-
s.add_dependency(%q<json>, [">=
|
58
|
+
s.add_dependency(%q<rest-client>, [">= 1.6.1"])
|
59
|
+
s.add_dependency(%q<json>, [">= 1.4.6"])
|
60
60
|
end
|
61
61
|
else
|
62
62
|
s.add_dependency(%q<shoulda>, [">= 0"])
|
63
63
|
s.add_dependency(%q<commander>, [">= 4.0"])
|
64
|
-
s.add_dependency(%q<rest-client>, [">= 1.
|
65
|
-
s.add_dependency(%q<json>, [">=
|
64
|
+
s.add_dependency(%q<rest-client>, [">= 1.6.1"])
|
65
|
+
s.add_dependency(%q<json>, [">= 1.4.6"])
|
66
66
|
end
|
67
67
|
end
|
68
68
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: socialcast
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 1
|
10
|
+
version: 0.3.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ryan Sonnek
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-12-03 00:00:00 -08:00
|
19
19
|
default_executable: socialcast
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -55,12 +55,12 @@ dependencies:
|
|
55
55
|
requirements:
|
56
56
|
- - ">="
|
57
57
|
- !ruby/object:Gem::Version
|
58
|
-
hash:
|
58
|
+
hash: 13
|
59
59
|
segments:
|
60
60
|
- 1
|
61
|
-
-
|
62
|
-
-
|
63
|
-
version: 1.
|
61
|
+
- 6
|
62
|
+
- 1
|
63
|
+
version: 1.6.1
|
64
64
|
type: :runtime
|
65
65
|
version_requirements: *id003
|
66
66
|
- !ruby/object:Gem::Dependency
|
@@ -71,10 +71,12 @@ dependencies:
|
|
71
71
|
requirements:
|
72
72
|
- - ">="
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
hash:
|
74
|
+
hash: 11
|
75
75
|
segments:
|
76
|
-
-
|
77
|
-
|
76
|
+
- 1
|
77
|
+
- 4
|
78
|
+
- 6
|
79
|
+
version: 1.4.6
|
78
80
|
type: :runtime
|
79
81
|
version_requirements: *id004
|
80
82
|
description: publish messages to your stream from a command line interface
|