comufyrails 0.1.2b → 0.1.2h

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.
@@ -13,9 +13,9 @@ class Comufyrails::Railtie < Rails::Railtie
13
13
 
14
14
  initializer "comufyrails.configure" do |app|
15
15
  Comufyrails.configure do |c|
16
- c.app_name = app.config.comufy_rails[:app_name] || ENV.fetch('COMUFY_APP_NAME', ::Rails.application.class.to_s.split("::").first)
17
- c.access_token = app.config.comufy_rails[:access_token] || ENV.fetch('COMUFY_TOKEN', nil)
18
- c.url = app.config.comufy_rails[:url] || ENV.fetch('COMUFY_URL', 'http://www.sociableapi.com/xcoreweb/client')
16
+ c.app_name = app.config.comufy_rails[:app_name] || ENV.fetch('COMUFY_APP_NAME', ::Rails.application.class.to_s.split("::").first)
17
+ c.access_token = app.config.comufy_rails[:access_token] || ENV.fetch('COMUFY_TOKEN', nil)
18
+ c.url = app.config.comufy_rails[:url] || ENV.fetch('COMUFY_URL', 'https://comufy.herokuapp.com/xcoreweb/client')
19
19
 
20
20
  # we just want a date far into the future
21
21
  c.expiry_time = Time.now.to_i + 1000000
@@ -1,4 +1,4 @@
1
1
  module Comufyrails
2
2
  # Current version of this gem.
3
- VERSION = "0.1.2b"
3
+ VERSION = "0.1.2h"
4
4
  end
@@ -1,6 +1,7 @@
1
1
  require 'json'
2
2
  require 'net/http'
3
3
  require 'net/https'
4
+ require 'uri'
4
5
 
5
6
  namespace :comufy do
6
7
 
@@ -45,6 +46,7 @@ namespace :comufy do
45
46
 
46
47
  uri = URI.parse(Comufyrails.config.url)
47
48
  http = Net::HTTP.new(uri.host, uri.port)
49
+ http.use_ssl = true
48
50
  request = Net::HTTP::Post.new(uri.path, initheader = { 'Content-Type' => 'application/json' })
49
51
  request.set_form_data({ request: data.to_json })
50
52
  response = http.request(request)
@@ -103,6 +105,7 @@ namespace :comufy do
103
105
 
104
106
  uri = URI.parse(Comufyrails.config.url)
105
107
  http = Net::HTTP.new(uri.host, uri.port)
108
+ http.use_ssl = true
106
109
  request = Net::HTTP::Post.new(uri.path, initheader = { 'Content-Type' => 'application/json' })
107
110
  request.set_form_data({ request: data.to_json })
108
111
  response = http.request(request)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: comufyrails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2b
4
+ version: 0.1.2h
5
5
  prerelease: 5
6
6
  platform: ruby
7
7
  authors:
@@ -135,5 +135,5 @@ rubyforge_project:
135
135
  rubygems_version: 1.8.24
136
136
  signing_key:
137
137
  specification_version: 3
138
- summary: comufyrails-0.1.2b
138
+ summary: comufyrails-0.1.2h
139
139
  test_files: []