slack_messaging 1.3.0 → 1.3.1

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
2
  SHA256:
3
- metadata.gz: 93cd98600f0898757299926ffefac71db5786acbf90e505530682fca8509a8c9
4
- data.tar.gz: 95f6c1ecb7e4bd06aacd0d2158bf0709bb9c9d942e54ddb6d4494add2f4125d1
3
+ metadata.gz: 21d4c79502e68eea2cf007a81f3a1e49a1f2b3fc670a68515f91d2671470c7b6
4
+ data.tar.gz: 013f88ec707d9bea10b2186962bd4b82e0106cb8754185f0fedb9448b8e3dfb4
5
5
  SHA512:
6
- metadata.gz: 1a4eba4e6b9dd8d28c4695f54ec50b0c65d1120ba38fc2cf9b5a2de3cb62bd06d6a93ff12e2e210ba392efb1bf54859369eb9d86d6f026aa52a49d45dbeaf1b9
7
- data.tar.gz: ff7496274332c5dc60c7b06d110a7f4af88bcd613798a940905de656722439011be782009d7c6b4e7089e290fbdbc35e483156789ae16722e4a049eaf884a7b7
6
+ metadata.gz: d4cc5277991115cb449882eb7f069b6eb135c2c0d944692fbab654c2938c84441ab6bd3b0c9c47f748402d5b8390d34fe2a65ee433b165b3c10df1f230b4d672
7
+ data.tar.gz: bb984c22a6a030630daec5848b91fcc73dd5a08090a2711878895741f8cc3317dbc37182a918b00e33b0790a69024f4a251cbfd13aabf214a7ae39f1d24a9c70
@@ -0,0 +1,95 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ slack_messaging (1.3.1)
5
+ activesupport (~> 6.0)
6
+ gli (~> 2.10)
7
+ hashie (~> 4.1)
8
+ highline (~> 2.0)
9
+ rack (~> 2.2)
10
+ slack-notifier (~> 1.5.1)
11
+
12
+ GEM
13
+ remote: https://rubygems.org/
14
+ specs:
15
+ activesupport (6.0.3.3)
16
+ concurrent-ruby (~> 1.0, >= 1.0.2)
17
+ i18n (>= 0.7, < 2)
18
+ minitest (~> 5.1)
19
+ tzinfo (~> 1.1)
20
+ zeitwerk (~> 2.2, >= 2.2.2)
21
+ coderay (1.1.3)
22
+ concurrent-ruby (1.1.7)
23
+ diff-lcs (1.4.4)
24
+ ffi (1.13.1)
25
+ formatador (0.2.5)
26
+ gli (2.19.2)
27
+ guard (2.16.2)
28
+ formatador (>= 0.2.4)
29
+ listen (>= 2.7, < 4.0)
30
+ lumberjack (>= 1.0.12, < 2.0)
31
+ nenv (~> 0.1)
32
+ notiffany (~> 0.0)
33
+ pry (>= 0.9.12)
34
+ shellany (~> 0.0)
35
+ thor (>= 0.18.1)
36
+ guard-compat (1.2.1)
37
+ guard-rspec (4.7.3)
38
+ guard (~> 2.1)
39
+ guard-compat (~> 1.1)
40
+ rspec (>= 2.99.0, < 4.0)
41
+ hashie (4.1.0)
42
+ highline (2.0.3)
43
+ i18n (1.8.5)
44
+ concurrent-ruby (~> 1.0)
45
+ listen (3.2.1)
46
+ rb-fsevent (~> 0.10, >= 0.10.3)
47
+ rb-inotify (~> 0.9, >= 0.9.10)
48
+ lumberjack (1.2.8)
49
+ method_source (1.0.0)
50
+ minitest (5.14.2)
51
+ nenv (0.3.0)
52
+ notiffany (0.1.3)
53
+ nenv (~> 0.1)
54
+ shellany (~> 0.0)
55
+ pry (0.13.1)
56
+ coderay (~> 1.1)
57
+ method_source (~> 1.0)
58
+ rack (2.2.3)
59
+ rake (13.0.1)
60
+ rb-fsevent (0.10.4)
61
+ rb-inotify (0.10.1)
62
+ ffi (~> 1.0)
63
+ rspec (3.9.0)
64
+ rspec-core (~> 3.9.0)
65
+ rspec-expectations (~> 3.9.0)
66
+ rspec-mocks (~> 3.9.0)
67
+ rspec-core (3.9.3)
68
+ rspec-support (~> 3.9.3)
69
+ rspec-expectations (3.9.2)
70
+ diff-lcs (>= 1.2.0, < 2.0)
71
+ rspec-support (~> 3.9.0)
72
+ rspec-mocks (3.9.1)
73
+ diff-lcs (>= 1.2.0, < 2.0)
74
+ rspec-support (~> 3.9.0)
75
+ rspec-support (3.9.3)
76
+ shellany (0.0.1)
77
+ slack-notifier (1.5.1)
78
+ thor (1.0.1)
79
+ thread_safe (0.3.6)
80
+ tzinfo (1.2.7)
81
+ thread_safe (~> 0.1)
82
+ zeitwerk (2.4.0)
83
+
84
+ PLATFORMS
85
+ ruby
86
+
87
+ DEPENDENCIES
88
+ bundler (~> 2.1)
89
+ guard-rspec (~> 4.3)
90
+ rake (~> 13.0)
91
+ rspec (~> 3.9)
92
+ slack_messaging!
93
+
94
+ BUNDLED WITH
95
+ 2.1.4
data/Rakefile CHANGED
@@ -1,2 +1 @@
1
1
  require "bundler/gem_tasks"
2
-
@@ -16,7 +16,12 @@ program_long_desc """
16
16
  DOCUMENTATION
17
17
  """
18
18
 
19
- commands_from File.expand_path(File.dirname(__FILE__) + '/../lib/slack_messaging/commands')
19
+ desc 'Prints a variety of messages to Slack'
20
+ command 'slack' do |c|
21
+ c.action do |global_options, options, args|
22
+ SlackMessaging::Slack.execute(args, options) # args are optional string to print
23
+ end
24
+ end
20
25
 
21
26
  pre do |global,command,options,args|
22
27
  SlackMessaging::Config.load(global[:config])
@@ -1,9 +1,5 @@
1
- require_relative 'slack_messaging/version'
2
- require_relative 'slack_messaging/output'
3
- require_relative 'slack_messaging/config'
4
- require_relative 'slack_messaging/notify_slack'
5
- require_relative 'slack_messaging/random_message'
6
-
7
- module SlackMessaging
8
-
1
+ Dir[File.expand_path(File.join(File.dirname(File.absolute_path(__FILE__)), 'slack_messaging')) + "/**/*.rb"].each do |file|
2
+ require_relative file
9
3
  end
4
+
5
+ module SlackMessaging; end
@@ -2,7 +2,6 @@ require 'yaml'
2
2
  require 'hashie'
3
3
 
4
4
  module SlackMessaging
5
-
6
5
  class DefaultPaths
7
6
  class << self
8
7
  def config
@@ -27,22 +26,18 @@ module SlackMessaging
27
26
  config
28
27
  end
29
28
 
30
- def config_data
29
+ private def config_data
31
30
  @config_data ||= Hashie::Mash.new
32
31
  end
33
- private :config_data
34
32
 
35
- def method_missing(method, args=false)
33
+ private def method_missing(method, args=false)
36
34
  config_data.send(method, args)
37
35
  end
38
- private :method_missing
39
36
 
40
- def load_config(file)
37
+ private def load_config(file)
41
38
  raise MissingConfig, "Missing configuration file: #{file}" unless File.exist?(file)
42
39
  YAML.load_file(file).each{ |key,value| config_data.assign_property(key, value) }
43
40
  end
44
- private :load_config
45
-
46
41
  end
47
42
  end
48
43
  end
@@ -13,13 +13,14 @@ module SlackMessaging
13
13
  end
14
14
 
15
15
  def perform
16
- options = {webhook_url: webhook_url,
17
- channel: channel,
18
- username: username,
19
- icon_emoji: icon_emoji,
20
- http_options: {open_timeout: 10}
21
- }
22
- Slack::Notifier.new(webhook_url, options).ping(text)
16
+ options = {
17
+ webhook_url: webhook_url,
18
+ channel: channel,
19
+ username: username,
20
+ icon_emoji: icon_emoji,
21
+ http_options: { open_timeout: 10 }
22
+ }
23
+ ::Slack::Notifier.new(webhook_url, options).ping(text)
23
24
  end
24
25
  end
25
26
  end
@@ -0,0 +1,25 @@
1
+ require 'highline'
2
+
3
+ module SlackMessaging
4
+ class Slack
5
+ class << self
6
+ attr_accessor :options
7
+ end
8
+
9
+ def self.execute(args, options=nil)
10
+ if args.empty?
11
+ message = SlackMessaging::RandomMessage.new # generate a new random message
12
+ print_message(message.get_text)
13
+ else
14
+ args.each do |message|
15
+ print_message(message)
16
+ end
17
+ end
18
+ end
19
+
20
+ def self.print_message(message)
21
+ slack_job = SlackMessaging::NotifySlack.new(message)
22
+ slack_job.perform
23
+ end
24
+ end
25
+ end
@@ -1,3 +1,3 @@
1
1
  module SlackMessaging
2
- VERSION = "1.3.0"
2
+ VERSION = "1.3.1"
3
3
  end
@@ -1,4 +1,5 @@
1
- require "slack_messaging"
1
+ require 'spec_helper'
2
+ require 'slack_messaging'
2
3
 
3
4
  module SlackMessaging
4
5
  describe NotifySlack do
@@ -15,7 +16,7 @@ module SlackMessaging
15
16
 
16
17
  it 'should ping Slack Notifier' do
17
18
  notifier = double('notifier', ping: true)
18
- allow(Slack::Notifier).to receive(:new).and_return(notifier)
19
+ allow(::Slack::Notifier).to receive(:new).and_return(notifier)
19
20
  expect(notifier).to receive(:ping).and_return(true)
20
21
  message = NotifySlack.new("Test message")
21
22
  message.perform
@@ -29,6 +30,5 @@ module SlackMessaging
29
30
  expect(message.webhook_url).to eq("https://hooks.slack.com/services/totallyrandom/fakewebhookurl")
30
31
  expect(message.icon_emoji).to eq(":wine_glass:")
31
32
  end
32
-
33
33
  end
34
34
  end
@@ -1,8 +1,9 @@
1
- require "slack_messaging"
1
+ require 'spec_helper'
2
+ require 'slack_messaging'
2
3
 
3
4
  module SlackMessaging
4
5
  describe RandomMessage do
5
-
6
+
6
7
  it "should get a string message" do
7
8
  message = RandomMessage.new
8
9
  expect(message.get_text).to be_instance_of(String)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slack_messaging
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emma Sax
@@ -11,19 +11,19 @@ cert_chain: []
11
11
  date: 2020-10-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: hashie
14
+ name: activesupport
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '4.1'
19
+ version: '6.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '4.1'
26
+ version: '6.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: gli
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -39,33 +39,33 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '2.10'
41
41
  - !ruby/object:Gem::Dependency
42
- name: highline
42
+ name: hashie
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '2.0'
47
+ version: '4.1'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '2.0'
54
+ version: '4.1'
55
55
  - !ruby/object:Gem::Dependency
56
- name: slack-notifier
56
+ name: highline
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 1.5.1
61
+ version: '2.0'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 1.5.1
68
+ version: '2.0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rack
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -81,19 +81,19 @@ dependencies:
81
81
  - !ruby/object:Gem::Version
82
82
  version: '2.2'
83
83
  - !ruby/object:Gem::Dependency
84
- name: activesupport
84
+ name: slack-notifier
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '6.0'
89
+ version: 1.5.1
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '6.0'
96
+ version: 1.5.1
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: bundler
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -158,17 +158,8 @@ executables:
158
158
  extensions: []
159
159
  extra_rdoc_files: []
160
160
  files:
161
- - ".codeclimate.yml"
162
- - ".github/code_of_conduct.md"
163
- - ".github/contributing.md"
164
- - ".github/issue_template.md"
165
- - ".github/pull_request_template.md"
166
- - ".github/security.md"
167
- - ".github/workflows/develop.yml"
168
- - ".gitignore"
169
- - ".ruby-gemset"
170
- - ".ruby-version"
171
161
  - Gemfile
162
+ - Gemfile.lock
172
163
  - Guardfile
173
164
  - LICENSE
174
165
  - OutputFile.png
@@ -176,14 +167,12 @@ files:
176
167
  - Rakefile
177
168
  - bin/slack-messaging
178
169
  - lib/slack_messaging.rb
179
- - lib/slack_messaging/commands/slack.rb
180
170
  - lib/slack_messaging/config.rb
181
171
  - lib/slack_messaging/notify_slack.rb
182
172
  - lib/slack_messaging/output.rb
183
173
  - lib/slack_messaging/random_message.rb
184
- - lib/slack_messaging/scripts/slack.rb
174
+ - lib/slack_messaging/slack.rb
185
175
  - lib/slack_messaging/version.rb
186
- - slack_messaging.gemspec
187
176
  - spec/slack_messaging/config_spec.rb
188
177
  - spec/slack_messaging/notify_slack_spec.rb
189
178
  - spec/slack_messaging/random_message_spec.rb
@@ -212,7 +201,7 @@ signing_key:
212
201
  specification_version: 4
213
202
  summary: Personalized Slack Messages
214
203
  test_files:
204
+ - spec/spec_helper.rb
215
205
  - spec/slack_messaging/config_spec.rb
216
- - spec/slack_messaging/notify_slack_spec.rb
217
206
  - spec/slack_messaging/random_message_spec.rb
218
- - spec/spec_helper.rb
207
+ - spec/slack_messaging/notify_slack_spec.rb
@@ -1,37 +0,0 @@
1
- version: "2"
2
- checks:
3
- argument-count:
4
- config:
5
- threshold: 4
6
- complex-logic:
7
- config:
8
- threshold: 4
9
- file-lines:
10
- config:
11
- threshold: 250
12
- method-complexity:
13
- config:
14
- threshold: 8
15
- method-count:
16
- config:
17
- threshold: 20
18
- method-lines:
19
- config:
20
- threshold: 25
21
- nested-control-flow:
22
- config:
23
- threshold: 4
24
- return-statements:
25
- config:
26
- threshold: 4
27
- similar-code:
28
- config:
29
- threshold: # language-specific defaults. an override will affect all languages.
30
- identical-code:
31
- config:
32
- threshold: # language-specific defaults. an override will affect all languages.
33
- exclude_patterns:
34
- - "**/spec/"
35
- - "**/test/"
36
- - "**/vendor/"
37
- - "**/*.js"
@@ -1,85 +0,0 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ### Table of Contents
4
-
5
- * [Our Pledge](#our-pledge)
6
- * [Our Standards](#our-standards)
7
- * [Our Responsibilities](#our-responsibilities)
8
- * [Scope](#scope)
9
- * [Enforcement](#enforcement)
10
- * [Attribution](#attribution)
11
-
12
- ## Our Pledge
13
-
14
- In the interest of fostering an open and welcoming environment, we as
15
- contributors and maintainers pledge to making participation in our project and
16
- our community a harassment-free experience for everyone, regardless of age, body
17
- size, disability, ethnicity, sex characteristics, gender identity and expression,
18
- level of experience, education, socio-economic status, nationality, personal
19
- appearance, race, religion, or sexual identity and orientation.
20
-
21
- ## Our Standards
22
-
23
- Examples of behavior that contributes to creating a positive environment
24
- include:
25
-
26
- * Using welcoming and inclusive language
27
- * Being respectful of differing viewpoints and experiences
28
- * Gracefully accepting constructive criticism
29
- * Focusing on what is best for the community
30
- * Showing empathy towards other community members
31
-
32
- Examples of unacceptable behavior by participants include:
33
-
34
- * The use of sexualized language or imagery and unwelcome sexual attention or
35
- advances
36
- * Trolling, insulting/derogatory comments, and personal or political attacks
37
- * Public or private harassment
38
- * Publishing others' private information, such as a physical or electronic
39
- address, without explicit permission
40
- * Other conduct which could reasonably be considered inappropriate in a
41
- professional setting
42
-
43
- ## Our Responsibilities
44
-
45
- Project maintainers are responsible for clarifying the standards of acceptable
46
- behavior and are expected to take appropriate and fair corrective action in
47
- response to any instances of unacceptable behavior.
48
-
49
- Project maintainers have the right and responsibility to remove, edit, or
50
- reject comments, commits, code, wiki edits, issues, and other contributions
51
- that are not aligned to this Code of Conduct, or to ban temporarily or
52
- permanently any contributor for other behaviors that they deem inappropriate,
53
- threatening, offensive, or harmful.
54
-
55
- ## Scope
56
-
57
- This Code of Conduct applies both within project spaces and in public spaces
58
- when an individual is representing the project or its community. Examples of
59
- representing a project or community include using an official project e-mail
60
- address, posting via an official social media account, or acting as an appointed
61
- representative at an online or offline event. Representation of a project may be
62
- further defined and clarified by project maintainers.
63
-
64
- ## Enforcement
65
-
66
- Instances of abusive, harassing, or otherwise unacceptable behavior may be
67
- reported by contacting the project team at emma.sax4@gmail.com. All
68
- complaints will be reviewed and investigated and will result in a response that
69
- is deemed necessary and appropriate to the circumstances. The project team is
70
- obligated to maintain confidentiality with regard to the reporter of an incident.
71
- Further details of specific enforcement policies may be posted separately.
72
-
73
- Project maintainers who do not follow or enforce the Code of Conduct in good
74
- faith may face temporary or permanent repercussions as determined by other
75
- members of the project's leadership.
76
-
77
- ## Attribution
78
-
79
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
80
- available at [https://www.contributor-covenant.org/version/1/4/code-of-conduct.html](https://www.contributor-covenant.org/version/1/4/code-of-conduct.html).
81
-
82
- [homepage]: [https://www.contributor-covenant.org](https://www.contributor-covenant.org)
83
-
84
- For answers to common questions about this code of conduct, see
85
- [https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq).
@@ -1,11 +0,0 @@
1
- # Contributing
2
-
3
- 1. Fork it (https://github.com/emmasax4/slack_messaging/fork)
4
- 2. Create your feature branch (`git checkout -b my-new-feature`)
5
- 3. Commit your changes (`git commit -am 'Add some feature'`)
6
- 4. Push to the branch (`git push origin my-new-feature`)
7
- 5. Continue making awesome changes!
8
- 6. To see how it works, follow the [Usage section in the README.md](https://github.com/emmasax4/slack_messaging#usage)
9
- 7. When you're satisfied, make a pull request to this repository
10
- 8. If I don't comment or start looking at the pull request in a couple of days, feel free to send me [an email](mailto:emma.sax4@gmail.com)
11
- 9. I approve your pull request and merge!
@@ -1,99 +0,0 @@
1
- Please fill in the section that best describes your issue and delete all other sections.
2
-
3
- <details><summary>Bug Report</summary>
4
-
5
- ## Bug Description
6
-
7
- > A clear and concise description of what the bug is.
8
-
9
- ## To Reproduce
10
-
11
- > Steps to reproduce the behavior:
12
- >
13
- > 1. Go to "..."
14
- > 2. Click on "..."
15
- > 3. Scroll down to "..."
16
- > 4. See error
17
-
18
- ## Expected Behavior
19
-
20
- > A clear and concise description of what you expected to happen.
21
-
22
- ## Screenshots
23
-
24
- > If applicable, add screenshots to help explain your problem.
25
-
26
- ## Desktop
27
-
28
- > Please complete the following information:
29
- >
30
- > - OS: [e.g. iOS]
31
- > - Browser: [e.g. chrome, safari]
32
- > - Version: [e.g. 22]
33
-
34
- ## Smartphone
35
-
36
- > Please complete the following information:
37
- >
38
- > - Device: [e.g. iPhone6]
39
- > - OS: [e.g. iOS8.1]
40
- > - Browser: [e.g. stock browser, safari]
41
- > - Version: [e.g. 22]
42
-
43
- ## Additional Context
44
-
45
- > Add any other context about the problem here.
46
-
47
- </details>
48
-
49
- <details><summary>Feature Request</summary>
50
-
51
- ## Is this feature request related to a problem?
52
-
53
- > A clear and concise description of what the problem is. Ex: I'm always frustrated when [...]
54
-
55
- ## The Solution I'd Prefer
56
-
57
- > A clear and concise description of what you want to happen.
58
-
59
- ## Alternative Solutions I've Considered
60
-
61
- > A clear and concise description of any alternative solutions or features you've considered.
62
-
63
- ## Additional Context
64
-
65
- > Add any other context or screenshots about the feature request here.
66
-
67
- </details>
68
-
69
- <details><summary>Security Report</summary>
70
-
71
- ## What is the alert or vulnerability?
72
-
73
- > A clear and concise description of what the vulnerability is. Ex: The Ruby gem [...] has reported vulnerability CVE-[...].
74
-
75
- ## Where did you find out about this vulnerability?
76
-
77
- > A clear and concise description of where this vulnerability was first reported or where you heard about it.
78
-
79
- ## What are the risks of doing nothing?
80
-
81
- > A clear and concise description of what will happen if we leave the vulnerability as is.
82
-
83
- ## Suggestions for improvement?
84
-
85
- > A clear and concise description of what can be done to mitigate this vulnerability.
86
-
87
- ## Additional Context
88
-
89
- > Add any other context, URLs, or screenshots about the alert or vulnerability.
90
-
91
- </details>
92
-
93
- <details><summary>General Question or Concern</summary>
94
-
95
- ## What's your question or comment?
96
-
97
- > A clear and concise question or comment. Please add as much context as possible.
98
-
99
- </details>
@@ -1,19 +0,0 @@
1
- ## Changes
2
-
3
- > A list of the changes that your pull request will make:
4
- >
5
- > * Adding a page "..."
6
- > * Refactoring "..."
7
-
8
- ## Related Pull Requests and Issues
9
-
10
- > If applicable, a list of related pull requests and issues:
11
- >
12
- > * Issue #1
13
- > * Issue #2
14
- > * Pull Request #1
15
- > * Pull Request #2
16
-
17
- ## Additional Context
18
-
19
- > Add any other context about the problem here.
@@ -1,11 +0,0 @@
1
- # Security Policy
2
-
3
- ## Reporting a Vulnerability
4
-
5
- If you happen to find any security vulnerabilities in this project, please let me know! I've turned on GitHub's security advisory and alert suggestions, but it's always possible that I'll miss something.
6
-
7
- To let me know there's a security vulnerability, please make a [new GitHub Issue](https://github.com/emmasax4/slack_messaging/issues/new) and fill in the Security Report section to the best of your capabilities.
8
-
9
- I'll respond on the Issue or take appropriate action as soon as I'm able.
10
-
11
- Thank you for helping my project to be as secure as possible.
@@ -1,30 +0,0 @@
1
- name: Develop
2
- on:
3
- push:
4
- branches: [ main ]
5
- pull_request:
6
- branches: [ main ]
7
-
8
- jobs:
9
- test:
10
- runs-on: ubuntu-latest
11
- steps:
12
- - name: Check Out Code
13
- uses: actions/checkout@v2
14
- with:
15
- fetch-depth: 0
16
-
17
- - name: Define Run Variables
18
- run: echo "::set-env name=BRANCH::$(echo ${{ github.head_ref }} | sed -E 's|refs/[a-zA-Z]+/||')"
19
-
20
- - name: Switch to Current Branch
21
- run: git checkout ${{ env.BRANCH }}
22
-
23
- - name: Configure System
24
- run: sudo gem update --system 3.0.8 && sudo gem install bundler
25
-
26
- - name: Install Gems
27
- run: bundle config set path "vendor/bundle" && bundle install
28
-
29
- - name: Run Rspec Tests
30
- run: bundle exec rspec
data/.gitignore DELETED
@@ -1,18 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /Gemfile.lock
4
- /_yardoc/
5
- /coverage/
6
- /doc/
7
- /pkg/
8
- /spec/reports/
9
- /tmp/
10
- *.bundle
11
- *.so
12
- *.o
13
- *.a
14
- mkmf.log
15
-
16
- .DS_Store
17
- *.gem
18
- .idea
@@ -1 +0,0 @@
1
- slack_messaging
@@ -1 +0,0 @@
1
- ruby-2.7.1
@@ -1,7 +0,0 @@
1
- desc 'Prints a variety of messages to Slack'
2
- command 'slack' do |c|
3
- c.action do |global_options, options, args|
4
- require_relative '../scripts/slack'
5
- SlackMessaging::Scripts::Slack.execute(args, options) # args are optional string to print
6
- end
7
- end
@@ -1,29 +0,0 @@
1
- require 'highline/import'
2
- require_relative "../notify_slack"
3
- require_relative "../random_message"
4
-
5
- module SlackMessaging
6
- module Scripts
7
- class Slack
8
- class << self
9
- attr_accessor :options
10
- end
11
-
12
- def self.execute(args, options=nil)
13
- if args.empty?
14
- message = RandomMessage.new # generate a new random message
15
- print_message(message.get_text)
16
- else
17
- args.each do |message|
18
- print_message(message)
19
- end
20
- end
21
- end
22
-
23
- def self.print_message(message)
24
- slack_job = NotifySlack.new(message)
25
- slack_job.perform
26
- end
27
- end
28
- end
29
- end
@@ -1,32 +0,0 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'slack_messaging/version'
5
-
6
- Gem::Specification.new do |gem|
7
- gem.name = "slack_messaging"
8
- gem.version = SlackMessaging::VERSION
9
- gem.authors = ["Emma Sax"]
10
- gem.email = ["emma.sax4@gmail.com"]
11
- gem.summary = %q{Personalized Slack Messages}
12
- gem.description = %q{Sending Personalized Slack Messages to a Slack channel of your choice.}
13
- gem.homepage = "https://github.com/emmasax4/slack_messaging"
14
- gem.license = "MIT"
15
-
16
- gem.files = `git ls-files -z`.split("\x0")
17
- gem.executables = gem.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
- gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
19
- gem.require_paths = ["lib"]
20
-
21
- gem.add_dependency 'hashie', '~> 4.1'
22
- gem.add_dependency 'gli', '~> 2.10'
23
- gem.add_dependency 'highline', '~> 2.0'
24
- gem.add_dependency 'slack-notifier', '~> 1.5.1'
25
- gem.add_dependency 'rack', '~> 2.2'
26
- gem.add_dependency 'activesupport', '~> 6.0'
27
-
28
- gem.add_development_dependency 'bundler', '~> 2.1'
29
- gem.add_development_dependency 'guard-rspec', '~> 4.3'
30
- gem.add_development_dependency 'rake', '~> 13.0'
31
- gem.add_development_dependency 'rspec', '~> 3.9'
32
- end