hey-you 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: e3e825c0d1b7cdb82618796909f87f4244ef66c2
4
- data.tar.gz: 9c564df97362eb0ff7999feebe9764ffb1450049
2
+ SHA256:
3
+ metadata.gz: 679472ed713fc109350ef9fd2b48880822edf62bf6a53874eb2df9470de2b580
4
+ data.tar.gz: 4d4539b92cf5cf8a080b592bcc806a9ec7d51a5f2fbd2f7a66f9e9ae24d55fda
5
5
  SHA512:
6
- metadata.gz: 94d4347cc837e84e3185dafb4f046b7be65e826e44bfc0af444cafcfcf413c79b85b2ebb4d7f89861db8f93a98fd00b569f977f7c389f42869d93094a1c1cfec
7
- data.tar.gz: 38a3a8952ecc0c962f1820f46eb3a395c2cbc5b8bf21f11405edd151b6e85d75582d8b0c1b324d121a2155fbce934e0f1ebbcc88b51ed0ade836f42f9e483abe
6
+ metadata.gz: 8f60580d1951c4a90463f9c8c51d28854e2b98ec7bed42a5fe5ae5a87a86f7f2321377cad70f2afefc7e24e3aa09c2aa9db46c88dd519d3099bc360eb72516ea
7
+ data.tar.gz: 06f1a99454e30a562cdf28eee7caa12d41ab133e57abe4d4fd437bc62149f33919c3dee81f8dd7045238c6c7f5df73055d95aa1711d3db04ceb421efe7ecef7e
data/.gitignore CHANGED
@@ -13,3 +13,4 @@
13
13
 
14
14
  .byebug_history
15
15
  *.gem
16
+ Gemfile.lock
data/.travis.yml CHANGED
@@ -4,6 +4,7 @@ rvm:
4
4
  - 2.3.3
5
5
  - 2.4.2
6
6
  - 2.5.3
7
+ - 2.6.1
7
8
  before_install: gem install bundler
8
9
  scripts:
9
10
  - bundle exec rspec
data/README.md CHANGED
@@ -362,12 +362,8 @@ Now, when you will send notification, it will be send with your channel too.
362
362
 
363
363
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
364
364
 
365
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
365
+ To install this gem onto your local machine, run `bundle exec rake install`.
366
366
 
367
367
  ## Contributing
368
368
 
369
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/hey_you. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
370
-
371
- ## Code of Conduct
372
-
373
- Everyone interacting in the HeyYou project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/hey_you/blob/master/CODE_OF_CONDUCT.md).
369
+ Bug reports and pull requests are welcome on GitHub at https://github.com/QNester/hey-you. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
@@ -34,16 +34,20 @@ module HeyYou
34
34
  }
35
35
  end
36
36
 
37
+ send_to_receive_info(notification_key, to_hash, options)
38
+ end
39
+
40
+ def send_to_receive_info(notification_key, receive_info, **options)
37
41
  builder = Builder.new(notification_key, options)
38
42
  response = {}
39
43
  config.registered_channels.each do |ch|
40
- if channel_allowed?(ch, to_hash, builder, options)
44
+ if channel_allowed?(ch, receive_info, builder, options)
41
45
  config.log(
42
- "Send #{ch} to #{to_hash[ch][:subject]} with data: #{builder.send(ch).data}" \
43
- " and options: #{to_hash[ch][:options]}"
46
+ "Send #{ch}-message to #{receive_info[ch][:subject]} with data: #{builder.send(ch).data}" \
47
+ " and options: #{receive_info[ch][:options]}"
44
48
  )
45
49
  response[ch] = Channels.const_get(ch.to_s.capitalize).send!(
46
- builder, to: to_hash[ch][:subject], **to_hash[ch][:options]
50
+ builder, to: receive_info[ch][:subject], **receive_info[ch][:options]
47
51
  )
48
52
  else
49
53
  config.log("Channel #{ch} not allowed.")
@@ -1,3 +1,3 @@
1
1
  module HeyYou
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hey-you
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergey Nesterov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-12-02 00:00:00.000000000 Z
11
+ date: 2019-04-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fcm
@@ -121,9 +121,7 @@ files:
121
121
  - ".rspec"
122
122
  - ".rubocop.yml"
123
123
  - ".travis.yml"
124
- - CODE_OF_CONDUCT.md
125
124
  - Gemfile
126
- - Gemfile.lock
127
125
  - README.md
128
126
  - Rakefile
129
127
  - bin/console
@@ -162,8 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
162
160
  - !ruby/object:Gem::Version
163
161
  version: '0'
164
162
  requirements: []
165
- rubyforge_project:
166
- rubygems_version: 2.6.8
163
+ rubygems_version: 3.0.1
167
164
  signing_key:
168
165
  specification_version: 4
169
166
  summary: Send multichannel notification with one command.
data/CODE_OF_CONDUCT.md DELETED
@@ -1,74 +0,0 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- In the interest of fostering an open and welcoming environment, we as
6
- contributors and maintainers pledge to making participation in our project and
7
- our community a harassment-free experience for everyone, regardless of age, body
8
- size, disability, ethnicity, gender identity and expression, level of experience,
9
- nationality, personal appearance, race, religion, or sexual identity and
10
- orientation.
11
-
12
- ## Our Standards
13
-
14
- Examples of behavior that contributes to creating a positive environment
15
- include:
16
-
17
- * Using welcoming and inclusive language
18
- * Being respectful of differing viewpoints and experiences
19
- * Gracefully accepting constructive criticism
20
- * Focusing on what is best for the community
21
- * Showing empathy towards other community members
22
-
23
- Examples of unacceptable behavior by participants include:
24
-
25
- * The use of sexualized language or imagery and unwelcome sexual attention or
26
- advances
27
- * Trolling, insulting/derogatory comments, and personal or political attacks
28
- * Public or private harassment
29
- * Publishing others' private information, such as a physical or electronic
30
- address, without explicit permission
31
- * Other conduct which could reasonably be considered inappropriate in a
32
- professional setting
33
-
34
- ## Our Responsibilities
35
-
36
- Project maintainers are responsible for clarifying the standards of acceptable
37
- behavior and are expected to take appropriate and fair corrective action in
38
- response to any instances of unacceptable behavior.
39
-
40
- Project maintainers have the right and responsibility to remove, edit, or
41
- reject comments, commits, code, wiki edits, issues, and other contributions
42
- that are not aligned to this Code of Conduct, or to ban temporarily or
43
- permanently any contributor for other behaviors that they deem inappropriate,
44
- threatening, offensive, or harmful.
45
-
46
- ## Scope
47
-
48
- This Code of Conduct applies both within project spaces and in public spaces
49
- when an individual is representing the project or its community. Examples of
50
- representing a project or community include using an official project e-mail
51
- address, posting via an official social media account, or acting as an appointed
52
- representative at an online or offline event. Representation of a project may be
53
- further defined and clarified by project maintainers.
54
-
55
- ## Enforcement
56
-
57
- Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
- reported by contacting the project team at qnesterr@gmail.com. All
59
- complaints will be reviewed and investigated and will result in a response that
60
- is deemed necessary and appropriate to the circumstances. The project team is
61
- obligated to maintain confidentiality with regard to the reporter of an incident.
62
- Further details of specific enforcement policies may be posted separately.
63
-
64
- Project maintainers who do not follow or enforce the Code of Conduct in good
65
- faith may face temporary or permanent repercussions as determined by other
66
- members of the project's leadership.
67
-
68
- ## Attribution
69
-
70
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
- available at [http://contributor-covenant.org/version/1/4][version]
72
-
73
- [homepage]: http://contributor-covenant.org
74
- [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile.lock DELETED
@@ -1,67 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- hey-you (0.1.6)
5
- fcm (~> 0.0.2)
6
- i18n (~> 1.0)
7
- mail (~> 2.7)
8
-
9
- GEM
10
- remote: https://rubygems.org/
11
- specs:
12
- addressable (2.5.2)
13
- public_suffix (>= 2.0.2, < 4.0)
14
- byebug (10.0.2)
15
- concurrent-ruby (1.0.5)
16
- crack (0.4.3)
17
- safe_yaml (~> 1.0.0)
18
- diff-lcs (1.3)
19
- fcm (0.0.2)
20
- httparty
21
- json
22
- ffaker (2.9.0)
23
- hashdiff (0.3.7)
24
- httparty (0.16.2)
25
- multi_xml (>= 0.5.2)
26
- i18n (1.0.1)
27
- concurrent-ruby (~> 1.0)
28
- json (2.1.0)
29
- mail (2.7.0)
30
- mini_mime (>= 0.1.1)
31
- mini_mime (1.0.0)
32
- multi_xml (0.6.0)
33
- public_suffix (3.0.2)
34
- rake (10.5.0)
35
- rspec (3.7.0)
36
- rspec-core (~> 3.7.0)
37
- rspec-expectations (~> 3.7.0)
38
- rspec-mocks (~> 3.7.0)
39
- rspec-core (3.7.1)
40
- rspec-support (~> 3.7.0)
41
- rspec-expectations (3.7.0)
42
- diff-lcs (>= 1.2.0, < 2.0)
43
- rspec-support (~> 3.7.0)
44
- rspec-mocks (3.7.0)
45
- diff-lcs (>= 1.2.0, < 2.0)
46
- rspec-support (~> 3.7.0)
47
- rspec-support (3.7.1)
48
- safe_yaml (1.0.4)
49
- webmock (3.4.1)
50
- addressable (>= 2.3.6)
51
- crack (>= 0.3.2)
52
- hashdiff
53
-
54
- PLATFORMS
55
- ruby
56
-
57
- DEPENDENCIES
58
- bundler
59
- byebug
60
- ffaker (~> 2.9)
61
- hey-you!
62
- rake (~> 10.5)
63
- rspec (~> 3.7)
64
- webmock (~> 3.4)
65
-
66
- BUNDLED WITH
67
- 1.16.1