urbanairship 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.markdown CHANGED
@@ -1,4 +1,4 @@
1
- Urbanairship is a Ruby library for interacting with the [Urbanairship API](http://urbanairship.com).
1
+ Urbanairship is a Ruby library for interacting with the [Urban Airship API](http://urbanairship.com).
2
2
 
3
3
  Installation
4
4
  ============
@@ -65,7 +65,7 @@ Urbanairship.batch_push notifications # => true
65
65
 
66
66
  Sending broadcast notifications
67
67
  -------------------------------
68
- Urbanairship allows you to send a broadcast notification to all active registered device tokens for your app.
68
+ Urban Airship allows you to send a broadcast notification to all active registered device tokens for your app.
69
69
 
70
70
  ```ruby
71
71
  notification = {
@@ -78,7 +78,7 @@ Urbanairship.broadcast_push notification # => true
78
78
 
79
79
  Polling the feedback API
80
80
  ------------------------
81
- The first time you attempt to send a push notification to a device that has uninstalled your app (or has opted-out of notifications), both Apple and Urbanairship will register that token in their feedback API. Urbanairship will prevent further attempted notification sends to that device, but it's a good practice to periodically poll Urbanairship's feedback API and mark those tokens as inactive in your own system as well.
81
+ The first time you attempt to send a push notification to a device that has uninstalled your app (or has opted-out of notifications), both Apple and Urban Airship will register that token in their feedback API. Urban Airship will prevent further attempted notification sends to that device, but it's a good practice to periodically poll Urban Airship's feedback API and mark those tokens as inactive in your own system as well.
82
82
 
83
83
  ```ruby
84
84
  # find all device tokens deactivated in the past 24 hours
@@ -100,7 +100,7 @@ Urbanairship.feedback 24.hours.ago # =>
100
100
  Deleting scheduled notifications
101
101
  --------------------------------
102
102
 
103
- If you know the alias or id of a scheduled push notification then you can delete it from Urbanairship's queue and it will not be delivered.
103
+ If you know the alias or id of a scheduled push notification then you can delete it from Urban Airship's queue and it will not be delivered.
104
104
 
105
105
  ```ruby
106
106
  Urbanairship.delete_scheduled_push("123456789") # => true
data/lib/urbanairship.rb CHANGED
@@ -11,8 +11,6 @@ module Urbanairship
11
11
  Timer = Timeout
12
12
  end
13
13
 
14
- VALID_REGISTER_PARAMS = %w(alias)
15
-
16
14
  class << self
17
15
  attr_accessor :application_key, :application_secret, :master_secret, :logger, :request_timeout
18
16
 
@@ -102,7 +100,7 @@ module Urbanairship
102
100
 
103
101
  def parse_register_options(hash = {})
104
102
  hash[:alias] = hash[:alias].to_s unless hash[:alias].nil?
105
- hash.delete_if{|key, value| !VALID_REGISTER_PARAMS.include?(key.to_s)}
103
+ hash
106
104
  end
107
105
 
108
106
  def parse_push_options(hash = {})
@@ -127,12 +127,6 @@ describe Urbanairship do
127
127
  Urbanairship.register_device("device_token_one", :alias => 11)
128
128
  request_json['alias'].should be_a_kind_of String
129
129
  end
130
-
131
- it "excludes invalid parameters from the JSON payload" do
132
- @valid_params.merge!(:foo => 'bar')
133
- Urbanairship.register_device("device_token_one", @valid_params)
134
- request_json['foo'].should be_nil
135
- end
136
130
  end
137
131
 
138
132
  describe "::unregister_device" do
metadata CHANGED
@@ -1,117 +1,87 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: urbanairship
3
- version: !ruby/object:Gem::Version
4
- hash: 19
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.1.1
5
5
  prerelease:
6
- segments:
7
- - 1
8
- - 1
9
- - 0
10
- version: 1.1.0
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Groupon, Inc.
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2011-11-14 00:00:00 -06:00
19
- default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
12
+ date: 2011-12-13 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
22
15
  name: json
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &70262001444660 !ruby/object:Gem::Requirement
25
17
  none: false
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- hash: 3
30
- segments:
31
- - 0
32
- version: "0"
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
33
22
  type: :runtime
34
- version_requirements: *id001
35
- - !ruby/object:Gem::Dependency
36
- name: rspec
37
23
  prerelease: false
38
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: *70262001444660
25
+ - !ruby/object:Gem::Dependency
26
+ name: rspec
27
+ requirement: &70262001443460 !ruby/object:Gem::Requirement
39
28
  none: false
40
- requirements:
41
- - - ">="
42
- - !ruby/object:Gem::Version
43
- hash: 3
44
- segments:
45
- - 0
46
- version: "0"
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
47
33
  type: :development
48
- version_requirements: *id002
49
- - !ruby/object:Gem::Dependency
50
- name: fakeweb
51
34
  prerelease: false
52
- requirement: &id003 !ruby/object:Gem::Requirement
35
+ version_requirements: *70262001443460
36
+ - !ruby/object:Gem::Dependency
37
+ name: fakeweb
38
+ requirement: &70262001442040 !ruby/object:Gem::Requirement
53
39
  none: false
54
- requirements:
55
- - - ">="
56
- - !ruby/object:Gem::Version
57
- hash: 3
58
- segments:
59
- - 0
60
- version: "0"
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
61
44
  type: :development
62
- version_requirements: *id003
63
- description: Urbanairship is a Ruby library for interacting with the Urbanairship (http://urbanairship.com) API.
64
- email:
45
+ prerelease: false
46
+ version_requirements: *70262001442040
47
+ description: Urbanairship is a Ruby library for interacting with the Urban Airship
48
+ (http://urbanairship.com) API.
49
+ email:
65
50
  - rubygems@groupon.com
66
51
  executables: []
67
-
68
52
  extensions: []
69
-
70
53
  extra_rdoc_files: []
71
-
72
- files:
54
+ files:
73
55
  - README.markdown
74
56
  - LICENSE
75
57
  - Rakefile
76
58
  - lib/urbanairship.rb
77
59
  - spec/spec_helper.rb
78
60
  - spec/urbanairship_spec.rb
79
- has_rdoc: true
80
61
  homepage: http://github.com/groupon/urbanairship
81
62
  licenses: []
82
-
83
63
  post_install_message:
84
64
  rdoc_options: []
85
-
86
- require_paths:
65
+ require_paths:
87
66
  - lib
88
- required_ruby_version: !ruby/object:Gem::Requirement
67
+ required_ruby_version: !ruby/object:Gem::Requirement
89
68
  none: false
90
- requirements:
91
- - - ">="
92
- - !ruby/object:Gem::Version
93
- hash: 59
94
- segments:
95
- - 1
96
- - 8
97
- - 6
69
+ requirements:
70
+ - - ! '>='
71
+ - !ruby/object:Gem::Version
98
72
  version: 1.8.6
99
- required_rubygems_version: !ruby/object:Gem::Requirement
73
+ required_rubygems_version: !ruby/object:Gem::Requirement
100
74
  none: false
101
- requirements:
102
- - - ">="
103
- - !ruby/object:Gem::Version
104
- hash: 3
105
- segments:
106
- - 0
107
- version: "0"
75
+ requirements:
76
+ - - ! '>='
77
+ - !ruby/object:Gem::Version
78
+ version: '0'
108
79
  requirements: []
109
-
110
80
  rubyforge_project:
111
- rubygems_version: 1.6.2
81
+ rubygems_version: 1.8.11
112
82
  signing_key:
113
83
  specification_version: 3
114
- summary: A Ruby wrapper for the Urbanairship API
115
- test_files:
84
+ summary: A Ruby wrapper for the Urban Airship API
85
+ test_files:
116
86
  - spec/spec_helper.rb
117
87
  - spec/urbanairship_spec.rb