appygram 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/lib/appygram.rb CHANGED
@@ -37,7 +37,9 @@ module Appygram
37
37
  req = Net::HTTP::Post.new url.request_uri
38
38
  req.form_data = pc
39
39
  session = Net::HTTP.new(url.hostname, url.port)
40
- session.use_ssl = true
40
+ if url.scheme == 'https'
41
+ session.use_ssl = true
42
+ end
41
43
  session.start {|http|
42
44
  http.request(req)
43
45
  }
@@ -64,7 +66,9 @@ module Appygram
64
66
  })
65
67
  req.form_data = pc
66
68
  session = Net::HTTP.new(url.hostname, url.port)
67
- session.use_ssl = true
69
+ if url.scheme == 'https'
70
+ session.use_ssl = true
71
+ end
68
72
  session.start {|http|
69
73
  http.request(req)
70
74
  }
@@ -1,3 +1,3 @@
1
1
  module Appygram
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
data/test/local.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'minitest/autorun'
2
2
  require 'appygram'
3
3
 
4
- describe Appygram do
4
+ describe Appygram::Config do
5
5
  describe "when invoking the gem" do
6
6
  it "must have a version number" do
7
7
  Appygram::VERSION.wont_be_nil
@@ -15,6 +15,8 @@ describe Appygram do
15
15
  it "must support setting the platform" do
16
16
  Appygram.configure :platform => 'test_plat'
17
17
  Appygram::Config.platform.must_equal 'test_plat'
18
+ Appygram.configure :software => 'some_sw'
19
+ Appygram::Config.platform.must_equal 'test_plat'
18
20
  end
19
21
  it "must support setting the software" do
20
22
  Appygram.configure :software => 'test_sw'
@@ -28,8 +30,5 @@ describe Appygram do
28
30
  Appygram.configure :trace_endpoint => 'http://a/b'
29
31
  Appygram::Config.trace_endpoint.to_s.must_equal 'http://a/b'
30
32
  end
31
- it "must not clobber values set earlier" do
32
- Appygram::Config.platform.must_equal 'test_plat'
33
- end
34
33
  end
35
34
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appygram
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
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: 2012-11-03 00:00:00.000000000 Z
12
+ date: 2012-11-12 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Discovers topics and sends messages
15
15
  email:
@@ -47,11 +47,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
47
47
  version: '0'
48
48
  requirements: []
49
49
  rubyforge_project: appygram
50
- rubygems_version: 1.8.17
50
+ rubygems_version: 1.8.15
51
51
  signing_key:
52
52
  specification_version: 3
53
53
  summary: Communicate with the Appygram message routing service
54
- test_files:
55
- - test/local.rb
56
- - test/network.rb
57
- has_rdoc:
54
+ test_files: []