peach-ruby 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 22044ce025121dc6f98a9b9847815caff80ef0f16089368616b048f02e145d37
4
- data.tar.gz: ead484f3c4c9427e918fe819d5d128f0c900104b8dbfa1d6a12f03942b68715e
3
+ metadata.gz: 1c436683fd63ce4146bae46abd33f6a3b526763827e0346fc078047f45ceb83a
4
+ data.tar.gz: 510884541687f39b105f3f99ddd5c1dd58a9749b730462b40ab2f46082f92e50
5
5
  SHA512:
6
- metadata.gz: f2a7f243046a6c61cf7ef62f5ebe3d321f2b0491a3460620f3940592e99593624388e46b5513ff6297777085554030e9cedcdf61ec9720c655291fea2a07ab80
7
- data.tar.gz: 5ba357f84e83d4d638fe3cadea472a08275b2b6d1eda30fc4b133a76dfa3edc181cfb3fb1995912c40891a3a37764650d165464ba71dc141d0e4fb7cbfa3ac08
6
+ metadata.gz: e89f352088cd473f27aea558b6f9ffbab323cc5995de4466ee9982b407a82e1c3266243776a96b731879c7b5b8169e94b99ac7d5e87e1d0979e6031c1fdfa214
7
+ data.tar.gz: 623041f06dd194ac1a18b067ae49165a8c81453bdf91f5684480161ad04f5f8f1e90728684107309c487563ebace0aa1fb998462bc1e01ceafebecafd0ea14aa
data/README.md CHANGED
@@ -45,10 +45,41 @@ Peach::TemplateMessage.deliver('wat_1234abcd', { foo: 'bar' }, contact)
45
45
 
46
46
  ## Development
47
47
 
48
- 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.
48
+ ### Install dependencies
49
49
 
50
- 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 the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
50
+ ```bash
51
+ bin/setup
52
+ ```
53
+
54
+ ### Run tests
55
+
56
+ ```bash
57
+ bundle exec rake spec
58
+ ```
59
+
60
+ ### Use the interactive prompt
61
+
62
+ ```bash
63
+ bin/console
64
+ ```
65
+
66
+ ### Install gem locally
67
+
68
+ ```bash
69
+ bundle exec rake install
70
+ ```
71
+
72
+ ### Release a new version
73
+
74
+ We use the [rubygems/release-gem@v1](https://github.com/rubygems/release-gem) action, which creates the tags and pushes the `.gem` file to [rubygems.org](https://rubygems.org) for us.
75
+
76
+ What we need to do then is:
77
+ 1. Update version number in `version.rb`
78
+ 2. Run `bundle install` to update `Gemfile.lock` with the new gem version
79
+ 3. Add and commit changes and create a Pull Request
80
+
81
+ The GitHub Action then should ideally take care of the rest.
51
82
 
52
83
  ## Contributing
53
84
 
54
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/peach-ruby.
85
+ Bug reports and pull requests are welcome on GitHub at https://github.com/trypeach-io/peach-ruby.
@@ -42,6 +42,12 @@ module Peach
42
42
  { prompt: prompt }
43
43
  end
44
44
 
45
+ def send_template_message(system_name, data: {})
46
+ template_message = { system_name: system_name }
47
+ template_message[:data] = data unless data.empty?
48
+ { template_message: template_message }
49
+ end
50
+
45
51
  def handoff(user_id: nil, group_id: nil, text: nil)
46
52
  handoff = {}
47
53
  handoff[:message] = { text: text } if text
data/lib/peach/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Peach
4
- VERSION = '0.4.0'
4
+ VERSION = '0.5.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: peach-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peach Developers
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-05-11 00:00:00.000000000 Z
11
+ date: 2024-06-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: debug