push_to_devices 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -29,7 +29,7 @@ module PushToDevices
29
29
  @@client_secret = ""
30
30
 
31
31
  mattr_accessor :user_agent
32
- @@user_agent = "PushToDevice RB #{PushToDevice::Config::VERSION}"
32
+ @@user_agent = "PushToDevices RB #{PushToDevices::Config::VERSION}"
33
33
 
34
34
  mattr_accessor :use_ssl
35
35
  @@use_ssl = true
@@ -41,7 +41,7 @@ module PushToDevices
41
41
  @@api_host = ""
42
42
 
43
43
  mattr_accessor :client_info
44
- @@client_info = {version: PushToDevice::Config::VERSION}
44
+ @@client_info = {version: PushToDevices::Config::VERSION}
45
45
 
46
46
  def self.configure
47
47
  yield self if block_given?
@@ -131,7 +131,7 @@ module PushToDevices
131
131
 
132
132
  def self.handle_response(response)
133
133
  if response.code.to_i != 200
134
- raise PushToDevice::Exception.new(response.code, response.body)
134
+ raise PushToDevices::Exception.new(response.code, response.body)
135
135
  else
136
136
  response.body
137
137
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |gem|
2
2
  gem.name = %q{push_to_devices}
3
- gem.version = "0.0.7"
3
+ gem.version = "0.0.8"
4
4
  gem.date = %q{2013-02-15}
5
5
  gem.authors = ["Lloyd Meta"]
6
6
  gem.email = ["lloydmeta@gmail.com"]
@@ -1,9 +1,9 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe PushToDevice do
3
+ describe PushToDevices do
4
4
 
5
5
  before(:all) do
6
- PushToDevice::API.configure do |config|
6
+ PushToDevices::API.configure do |config|
7
7
  config.api_host = "nowhere.com"
8
8
  config.client_id = "fakeclientid"
9
9
  config.client_secret = "fakeclientsecret"
@@ -14,7 +14,7 @@ describe PushToDevice do
14
14
  describe ".get_service_info" do
15
15
 
16
16
  it "should make a request to the proper endpoint" do
17
- PushToDevice::API.get_service_info
17
+ PushToDevices::API.get_service_info
18
18
  a_request(:get, "http://nowhere.com/services/me").should have_been_made
19
19
  end
20
20
 
@@ -28,7 +28,7 @@ describe PushToDevice do
28
28
  ios_specific_fields: {text: "ios"},
29
29
  android_specific_fields: {text: "android"}
30
30
  }
31
- PushToDevice::API.post_notification_to_user(unique_hash: unique_hash, notification_data: notification_data)
31
+ PushToDevices::API.post_notification_to_user(unique_hash: unique_hash, notification_data: notification_data)
32
32
  a_request(:post, "http://nowhere.com/users/#{unique_hash}/notifications").with(body: notification_data.to_json).should have_been_made
33
33
  end
34
34
  end
@@ -41,7 +41,7 @@ describe PushToDevice do
41
41
  ios_specific_fields: {text: "ios"},
42
42
  android_specific_fields: {text: "android"}
43
43
  }
44
- PushToDevice::API.post_notification_to_users(unique_hashes: unique_hashes, notification_data: notification_data)
44
+ PushToDevices::API.post_notification_to_users(unique_hashes: unique_hashes, notification_data: notification_data)
45
45
  a_request(:post, "http://nowhere.com/users/notifications").with(body: {unique_hashes: unique_hashes, notification_data: notification_data}.to_json).should have_been_made
46
46
  end
47
47
  end
@@ -54,7 +54,7 @@ describe PushToDevice do
54
54
  apn_device_token: "an apple ios device token",
55
55
  gcm_registration_id: "gcm_registration_id"
56
56
  }
57
- PushToDevice::API.register_user_for_push(data)
57
+ PushToDevices::API.register_user_for_push(data)
58
58
  a_request(:post, "http://nowhere.com/users/").with(body: data.to_json).should have_been_made
59
59
  end
60
60
  end
data/spec/spec_helper.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  require 'bundler/setup'
2
2
  require 'rspec'
3
- require 'push_to_device'
3
+ require 'push_to_devices'
4
4
  require 'webmock/rspec'
5
5
  require 'active_support/core_ext'
6
6
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: push_to_devices
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: