cloud_five_push 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YmM5YzEwODRhNjk3MzliOWYzNDA5NjcyZDIxZTU4NzBlYTkwMGZlMQ==
4
+ YjdjMmQzNTFhNjFhNTI0MWM3NTQyNTU4Mzg3MGVlYjcwMTEzYTQ5Yw==
5
5
  data.tar.gz: !binary |-
6
- OTE5NDk1YjkwZDAwYmZkZWUyMmYzMmFiNmFmMTk0NDNjNjE4ZTdiNg==
6
+ MDQ2NmExZWRjNDZiZWVkYjg0YjMxN2YxYjIzODMyZjI4OTc1MjgzZQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MTIyNjI1ZTE0YTE5M2VlYTc5NDIxMjU0NWExYjlhYTdiMDBlYjNkYmIzMTIy
10
- ZTZkOTQxZTE2M2U0MjY4OTdkZGE1NGQ2YWI0OWI0NjNiMWIzYTU2NzU3NDQ0
11
- MTU5YjQyMWUzMzdmY2JkNzY5OTZlMDVlMzhkNjE1MWVjNzQ4Mzg=
9
+ NmRkYTJjMTIwNTY5ZDBhOTE4YjAzODYwOWM1MjkyNWYzZjY2OGIyMWU3YzMw
10
+ MTk1NDc2ZTdmN2E3ODRjYjQ5YjhiNWY0MGI5YzlmOWRiYTBkODZlYzFkZTg1
11
+ MjZhOTY4YzllMDQzNmJkOTBmZjliNGYyMTgwM2NlOGE0YTEyMzk=
12
12
  data.tar.gz: !binary |-
13
- ZTZiZDc2MzI0ODgwZDlhMDU5ZTk2MmIwN2NiMmM4YzAzMDA3YWU3OTExZGE0
14
- YWRhYjI1MjUzY2U1MzdiY2I5ZWQzYWFiMDgzZWU2NDk1ODg5ZDQ3NDhkYWZm
15
- Yjc3YTNmM2VlYjhlNmRiMGM3YjM0NGU2MTE1MjUyMmQ0NTdlNGU=
13
+ ZjE4M2MzMGRkNjUyMGQwNDYxMjIwMDNiOTE1ZmIzOTVmMTVmMTM5ZDM4OTZh
14
+ ODVmYjU3NGM3ZjkzOGQxNDM2ZGRkMjU0NjM1OTFmNTA5ZmQ0NTU2OGI2NTEx
15
+ OWNjYWViZmJiMmRlNTM0NzAxMGYyNmNkNzZjZTFhNmEwZGZiNGE=
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --format progress
@@ -20,6 +20,7 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_development_dependency "bundler", "~> 1.5"
22
22
  spec.add_development_dependency "rake"
23
+ spec.add_development_dependency "rspec"
23
24
 
24
25
  spec.add_dependency "httparty"
25
26
  end
@@ -23,7 +23,7 @@ module CloudFivePush
23
23
  if blank_param?(@alert) && blank_param?(@badge)
24
24
  raise "Please set alert or badge"
25
25
  end
26
- if @broadcast && !blank_param?(@user_identifers)
26
+ if @broadcast && !blank_param?(@user_identifiers)
27
27
  raise "Can't both broadcast and set user_identifiers"
28
28
  end
29
29
 
@@ -45,8 +45,8 @@ module CloudFivePush
45
45
  self.class.post('/push/notify', body: params)
46
46
  end
47
47
 
48
- def user_identifiers=(user_identifers)
49
- @user_identifers = [user_identifers].flatten
48
+ def user_identifiers=(user_identifiers)
49
+ @user_identifiers = [user_identifiers].flatten
50
50
  end
51
51
 
52
52
  private
@@ -1,3 +1,3 @@
1
1
  module CloudFivePush
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -0,0 +1,18 @@
1
+ require 'spec_helper'
2
+
3
+ describe CloudFivePush::Notification do
4
+ before(:all) { CloudFivePush.api_key = "fake" }
5
+ context "Setting user identifiers" do
6
+ let(:notification) { CloudFivePush::Notification.new }
7
+ it "accepts an array of identifiers" do
8
+ notification.user_identifiers = [1,2,3]
9
+ expect(notification.user_identifiers).to eq [1,2,3]
10
+ end
11
+
12
+ it "accepts a single user_identifier" do
13
+ notification.user_identifiers = 1
14
+ expect(notification.user_identifiers).to eq [1]
15
+ end
16
+ end
17
+
18
+ end
@@ -0,0 +1,18 @@
1
+ require 'cloud_five_push'
2
+ # This file was generated by the `rspec --init` command. Conventionally, all
3
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
4
+ # Require this file using `require "spec_helper"` to ensure that it is only
5
+ # loaded once.
6
+ #
7
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
8
+ RSpec.configure do |config|
9
+ config.treat_symbols_as_metadata_keys_with_true_values = true
10
+ config.run_all_when_everything_filtered = true
11
+ config.filter_run :focus
12
+
13
+ # Run specs in random order to surface order dependencies. If you find an
14
+ # order dependency and want to debug it, you can fix the order by providing
15
+ # the seed, which is printed after each run.
16
+ # --seed 1234
17
+ config.order = 'random'
18
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloud_five_push
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Samson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-28 00:00:00.000000000 Z
11
+ date: 2014-07-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - ! '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ! '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: httparty
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -60,6 +74,7 @@ extensions: []
60
74
  extra_rdoc_files: []
61
75
  files:
62
76
  - .gitignore
77
+ - .rspec
63
78
  - Gemfile
64
79
  - LICENSE.txt
65
80
  - README.md
@@ -68,6 +83,8 @@ files:
68
83
  - lib/cloud_five_push.rb
69
84
  - lib/cloud_five_push/notification.rb
70
85
  - lib/cloud_five_push/version.rb
86
+ - spec/notification_spec.rb
87
+ - spec/spec_helper.rb
71
88
  homepage: ''
72
89
  licenses:
73
90
  - MIT
@@ -92,4 +109,6 @@ rubygems_version: 2.2.2
92
109
  signing_key:
93
110
  specification_version: 4
94
111
  summary: Wraps the API for push.cloudfiveapp.com
95
- test_files: []
112
+ test_files:
113
+ - spec/notification_spec.rb
114
+ - spec/spec_helper.rb