ruby-ray 0.1.0 → 0.2.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: 32e31e8a75b2b169c02c85493474c4760e695a4e4977dbccab922aab2c98f3d8
4
- data.tar.gz: f3458605cc94471d819bebb06e0b9a89a0508ee7191951ca4f648b1c722f686b
3
+ metadata.gz: 3fa98312ac698f1368bcdba806e12551eefde2b21f1a4bfcf817c08e73b42628
4
+ data.tar.gz: f8b61fe51c4ed5aa22ec12be7b28cd9bf6be9ad4e367c49e12b343969e53a41d
5
5
  SHA512:
6
- metadata.gz: 0c0ccef669e62bdc8500f4d4476c60d8672b5de19a17e22830877d86675ee549e153aa1f7488be98ec414e7695029f7e1d4f19713669104b5f8cd08af5159d19
7
- data.tar.gz: 4c4096120a9b00e6e5efafdad103ebbb5567c9f55ba5d93b4f5e4eca59e0155f111b4f12eceb56cffb029ad62785a9838f7c41f3120305c3ab5186b13da67041
6
+ metadata.gz: c3d87dd7beea1015e61a589089195749b812e7197fe1333c934682afa581140d23a0bde99853ef0ac9a40ce99b68d2452436158438e347a4e7775a162c6759ed
7
+ data.tar.gz: '048da58bfdf3d105083cb9e7feb532ee37e29ac3f2ab94f5b670950a4b0eb35e1b827f8eec0ef2378d31f410f1bd3dfe78c41cc14662a1200fffcdac65281627'
@@ -0,0 +1,3 @@
1
+ # Security Policy
2
+
3
+ If you discover any security related issues, please email freek@spatie.be instead of using the issue tracker.
@@ -5,14 +5,17 @@ on: [push,pull_request]
5
5
  jobs:
6
6
  build:
7
7
  runs-on: ubuntu-latest
8
+ strategy:
9
+ matrix:
10
+ ruby: ['2.7', '3.0']
8
11
  steps:
9
12
  - uses: actions/checkout@v2
10
13
  - name: Set up Ruby
11
14
  uses: ruby/setup-ruby@v1
12
15
  with:
13
- ruby-version: 3.0.0
14
- - name: Run the default task
16
+ ruby-version: ${{ matrix.ruby }}
17
+ bundler: default
18
+ bundler-cache: true
19
+ - name: Run tests
15
20
  run: |
16
- gem install bundler -v 2.2.8
17
- bundle install
18
21
  bundle exec rake
data/.gitignore CHANGED
@@ -6,3 +6,4 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
+ Gemfile.lock
data/CHANGELOG.md CHANGED
@@ -1,4 +1,8 @@
1
- ## [Unreleased]
1
+ ## [0.2.0] - 2021-02-11
2
+
3
+ - Relax activesupport dependency
4
+ - Test against Ruby 2.7 and 3.0 in CI
5
+ - Add more payloads
2
6
 
3
7
  ## [0.1.0] - 2021-02-10
4
8
 
data/README.md CHANGED
@@ -1,43 +1,39 @@
1
- # Ray
1
+ # Debug with Ray to fix problems faster
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/ray`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ This gem can be installed in any Ruby application to send messages to [the Ray app](https://myray.app).
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
5
+ ## Documentation
6
6
 
7
- ## Installation
7
+ You can find the full documentation on [our documentation site](https://spatie.be/docs/ray).
8
8
 
9
- Add this line to your application's Gemfile:
9
+ ## Changelog
10
10
 
11
- ```ruby
12
- gem 'ray'
13
- ```
11
+ Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
14
12
 
15
- And then execute:
13
+ ## Contributing
16
14
 
17
- $ bundle install
15
+ Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.
18
16
 
19
- Or install it yourself as:
17
+ ## Contributing
20
18
 
21
- $ gem install ray
19
+ Bug reports and pull requests are welcome on GitHub at https://github.com/spatie/ray. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/spatie/ray/blob/master/CODE_OF_CONDUCT.md).
22
20
 
23
- ## Usage
21
+ ## Contributing
24
22
 
25
- TODO: Write usage instructions here
23
+ Please see [CODE_OF_CONDUCT](.github/CODE_OF_CONDUCT.md) for details.
26
24
 
27
- ## Development
25
+ ## Security Vulnerabilities
28
26
 
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
27
+ Please review [our security policy](../../security/policy) on how to report security vulnerabilities.
30
28
 
31
- 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).
29
+ ## Credits
32
30
 
33
- ## Contributing
31
+ - [Chris Oliver](https://github.com/excid3)
32
+ - [Freek Van der Herten](https://github.com/freekmurze)
33
+ - [All Contributors](../../contributors)
34
34
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/ray. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/ray/blob/master/CODE_OF_CONDUCT.md).
35
+ A big thank you to Chris Oliver for teaching us the basics of Ruby development. You can see the initial development of this package [in this video](https://freek.dev/1904-creating-a-ruby-gem-for-ray).
36
36
 
37
37
  ## License
38
38
 
39
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
40
-
41
- ## Code of Conduct
42
-
43
- Everyone interacting in the Ray project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/ray/blob/master/CODE_OF_CONDUCT.md).
39
+ The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
@@ -0,0 +1,12 @@
1
+ require_relative "../lib/ray"
2
+
3
+ # ray.new_screen('Colors')
4
+
5
+ ray('this is green').green
6
+ ray('this is orange').orange
7
+ ray('this is red').red
8
+ ray('this is purple').purple
9
+ ray('this is blue').blue
10
+ ray('this is gray').gray
11
+
12
+
@@ -0,0 +1,5 @@
1
+ require_relative "../lib/ray"
2
+
3
+ ray.new_screen('Custom')
4
+
5
+ ray.send_custom('my value', 'my label')
@@ -0,0 +1,10 @@
1
+ require_relative "../lib/ray"
2
+
3
+ ray.new_screen('General')
4
+
5
+ ray(nil)
6
+ ray(1234)
7
+ ray(true)
8
+ ray(false)
9
+
10
+ ray('multiple', 'in', 1, 'go')
@@ -0,0 +1,9 @@
1
+ require_relative "../lib/ray"
2
+
3
+ ray.new_screen('New screen')
4
+
5
+ ray('will clear in two seconds')
6
+
7
+ sleep(2)
8
+
9
+ ray.new_screen('this is the new screen')
@@ -0,0 +1,5 @@
1
+ require_relative "../lib/ray"
2
+
3
+ ray.new_screen('Notify')
4
+
5
+ ray.notify('This is a notification')
data/examples/pause.rb ADDED
@@ -0,0 +1,7 @@
1
+ require_relative "../lib/ray"
2
+
3
+ ray.new_screen('Pause')
4
+
5
+ ray.pause
6
+
7
+ ray('After the pause')
@@ -0,0 +1,21 @@
1
+ require_relative "../lib/ray"
2
+
3
+ ray.new_screen('Visibility')
4
+
5
+ ray('collapsed by default').hide
6
+
7
+ ray = ray('updating this message in two seconds')
8
+ sleep(2)
9
+ ray.send('updated message');
10
+
11
+ ray = ray('removing this item in two seconds')
12
+ sleep(2)
13
+ ray.remove
14
+
15
+ sleep(1)
16
+ ray('hiding the app window for two seconds...')
17
+ sleep(1)
18
+ ray.hide_app
19
+ sleep(2)
20
+ ray.show_app
21
+ ray('Hi again!')
data/lib/ray.rb CHANGED
@@ -5,37 +5,145 @@ require "active_support/all"
5
5
 
6
6
  require_relative "ray/version"
7
7
  require_relative "ray/request"
8
+ require_relative "ray/client"
8
9
  require_relative "ray/payload_factory"
9
10
  require_relative "ray/payloads/payload"
10
11
  require_relative "ray/payloads/bool_payload"
12
+ require_relative "ray/payloads/color_payload"
11
13
  require_relative "ray/payloads/int_payload"
12
14
  require_relative "ray/payloads/null_payload"
13
15
  require_relative "ray/payloads/string_payload"
16
+ require_relative "ray/payloads/new_screen_payload"
17
+ require_relative "ray/payloads/hide_payload"
18
+ require_relative "ray/payloads/hide_app_payload"
19
+ require_relative "ray/payloads/remove_payload"
20
+ require_relative "ray/payloads/show_app_payload"
21
+ require_relative "ray/payloads/custom_payload"
22
+ require_relative "ray/payloads/notify_payload"
23
+ require_relative "ray/payloads/create_lock_payload"
14
24
 
15
25
  module Ray
16
- mattr_accessor :settings
17
- @@settings = { host: "http://localhost", port: 23517 }
18
-
19
26
  class Ray
20
- attr_reader :settings
27
+ def initialize(settings, client = nil)
28
+ @uuid = SecureRandom.uuid
29
+ @client = client || Client.new(settings[:port], settings[:host])
30
+ end
31
+
32
+ def green
33
+ color 'green'
34
+ end
35
+
36
+ def orange
37
+ color 'orange'
38
+ end
39
+
40
+ def red
41
+ color 'red'
42
+ end
43
+
44
+ def purple
45
+ color 'purple'
46
+ end
47
+
48
+ def blue
49
+ color 'blue'
50
+ end
51
+
52
+ def gray
53
+ color 'gray'
54
+ end
55
+
56
+ def new_screen(name = '')
57
+ payload = Payloads::NewScreenPayload.new(name)
58
+
59
+ send_request payload
60
+ end
61
+
62
+ def clear_screen
63
+ self.new_screen
64
+ end
65
+
66
+ def notify(text)
67
+ payload = Payloads::NotifyPayload.new(text)
68
+
69
+ send_request payload
70
+ end
71
+
72
+ def hide
73
+ payload = Payloads::HidePayload.new
74
+
75
+ send_request payload
76
+ end
77
+
78
+ def remove
79
+ payload = Payloads::RemovePayload.new
80
+
81
+ send_request payload
82
+ end
83
+
84
+ def hide_app
85
+ payload = Payloads::HideAppPayload.new
86
+
87
+ send_request payload
88
+ end
89
+
90
+ def show_app
91
+ payload = Payloads::ShowAppPayload.new
92
+
93
+ send_request payload
94
+ end
95
+
96
+ def color(color)
97
+ payload = Payloads::ColorPayload.new(color)
98
+
99
+ send_request payload
100
+ end
101
+
102
+ def pause
103
+ lockName = rand(10 ** 12).to_s
104
+
105
+ payload = Payloads::CreateLockPayload.new(lockName)
106
+
107
+ send_request payload
108
+
109
+ loop do
110
+ sleep(1)
111
+ if (!@client.lock_exists lockName)
112
+ break
113
+ end
114
+ end
115
+
116
+ return self
117
+ end
21
118
 
22
- class Error < StandardError; end
23
- # Your code goes here...
119
+ def send_custom(content, label = '')
120
+ payload = Payloads::CustomPayload.new(content, label)
24
121
 
25
- def initialize(settings)
26
- @settings = settings
122
+ send_request payload
27
123
  end
28
124
 
29
- def send(args)
125
+ def send(*args)
30
126
  send_request PayloadFactory.create_for_values(args)
31
127
  end
32
128
 
33
129
  def send_request(payloads)
34
- Request.new(payloads, settings).send
130
+ payloads = Array(payloads)
131
+
132
+ meta = {
133
+ ruby_ray_version: 'ray version here'
134
+ }
135
+
136
+ request = Request.new(@uuid, payloads, meta)
137
+
138
+ @client.send(request)
139
+
140
+ return self
35
141
  end
36
142
  end
37
143
  end
38
144
 
39
145
  def ray(*args)
40
- Ray::Ray.new(Ray.settings).send(args)
146
+ settings = { host: 'http://localhost', port: 23517 }
147
+
148
+ Ray::Ray.new(settings).send(*args)
41
149
  end
data/lib/ray/client.rb ADDED
@@ -0,0 +1,48 @@
1
+ require_relative "errors/stop_execution_requested"
2
+
3
+
4
+ module Ray
5
+ class Client
6
+ def initialize(port = 23517, host = 'localhost')
7
+ @port = port
8
+ @host = host
9
+ end
10
+
11
+ def send(request)
12
+ req = Net::HTTP::Post.new(uri, { 'Content-Type' => 'application/json' })
13
+ req.body = request.to_json
14
+
15
+ begin
16
+ Net::HTTP.start(uri.hostname, uri.port) do |http|
17
+ http.request(req)
18
+ end
19
+ rescue StandardError
20
+ # Ignore any errors
21
+ end
22
+ end
23
+
24
+ def lock_exists(lockName)
25
+ req = Net::HTTP::Get.new("/locks/#{lockName}", { 'Content-Type' => 'application/json' })
26
+
27
+ begin
28
+ response = Net::HTTP.start(uri.hostname, uri.port) do |http|
29
+ http.request(req)
30
+ end
31
+ rescue StandardError
32
+ return false
33
+ end
34
+
35
+ result = JSON.parse(response.body)
36
+
37
+ if (result['stop_execution'])
38
+ raise new StopExecutionRequested
39
+ end
40
+
41
+ return result['active'] || false
42
+ end
43
+
44
+ def uri
45
+ @uri ||= URI("#{@host}:#{@port}")
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,9 @@
1
+ module Ray
2
+ module Payloads
3
+ class StopExecutionRequested < StandardError
4
+ def initialize
5
+ super("This error is raised because you requested to stop the execution in Ray.")
6
+ end
7
+ end
8
+ end
9
+ end
@@ -3,17 +3,17 @@ module Ray
3
3
  class BoolPayload < Payload
4
4
 
5
5
  def initialize(bool)
6
- @bool = bool
6
+ @name = bool
7
7
  end
8
8
 
9
9
  def type
10
- "custom"
10
+ 'custom'
11
11
  end
12
12
 
13
13
  def content
14
14
  {
15
- content: @bool,
16
- label: "Boolean"
15
+ content: @name,
16
+ label: 'Boolean'
17
17
  }
18
18
  end
19
19
 
@@ -0,0 +1,21 @@
1
+ module Ray
2
+ module Payloads
3
+ class ColorPayload < Payload
4
+
5
+ def initialize(color)
6
+ @color = color
7
+ end
8
+
9
+ def type
10
+ 'color'
11
+ end
12
+
13
+ def content
14
+ {
15
+ color: @color,
16
+ }
17
+ end
18
+
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,21 @@
1
+ module Ray
2
+ module Payloads
3
+ class CreateLockPayload < Payload
4
+
5
+ def initialize(name)
6
+ @name = name
7
+ end
8
+
9
+ def type
10
+ 'create_lock'
11
+ end
12
+
13
+ def content
14
+ {
15
+ name: @name,
16
+ }
17
+ end
18
+
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,22 @@
1
+ module Ray
2
+ module Payloads
3
+ class CustomPayload < Payload
4
+
5
+ def initialize(content, label = '')
6
+ @content = content
7
+ @label = label
8
+ end
9
+
10
+ def type
11
+ 'custom'
12
+ end
13
+
14
+ def content
15
+ {
16
+ content: @content,
17
+ label: @label
18
+ }
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,9 @@
1
+ module Ray
2
+ module Payloads
3
+ class HideAppPayload < Payload
4
+ def type
5
+ 'hide_app'
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Ray
2
+ module Payloads
3
+ class HidePayload < Payload
4
+ def type
5
+ 'hide'
6
+ end
7
+ end
8
+ end
9
+ end
@@ -7,13 +7,13 @@ module Ray
7
7
  end
8
8
 
9
9
  def type
10
- "custom"
10
+ 'custom'
11
11
  end
12
12
 
13
13
  def content
14
14
  {
15
15
  content: @int,
16
- label: "Integer"
16
+ label: 'Integer'
17
17
  }
18
18
  end
19
19
 
@@ -0,0 +1,21 @@
1
+ module Ray
2
+ module Payloads
3
+ class NewScreenPayload < Payload
4
+
5
+ def initialize(screenName)
6
+ @screenName = screenName
7
+ end
8
+
9
+ def type
10
+ 'new_screen'
11
+ end
12
+
13
+ def content
14
+ {
15
+ name: @screenName,
16
+ }
17
+ end
18
+
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,19 @@
1
+ module Ray
2
+ module Payloads
3
+ class NotifyPayload < Payload
4
+ def initialize(text)
5
+ @text = text
6
+ end
7
+
8
+ def type
9
+ 'notify'
10
+ end
11
+
12
+ def content
13
+ {
14
+ value: @text,
15
+ }
16
+ end
17
+ end
18
+ end
19
+ end
@@ -3,13 +3,13 @@ module Ray
3
3
  class NullPayload < Payload
4
4
 
5
5
  def type
6
- "custom"
6
+ 'custom'
7
7
  end
8
8
 
9
9
  def content
10
10
  {
11
11
  content: nil,
12
- label: "Integer"
12
+ label: 'Integer'
13
13
  }
14
14
  end
15
15
 
@@ -2,15 +2,15 @@ module Ray
2
2
  module Payloads
3
3
  class Payload
4
4
 
5
- def initialize(value)
5
+ def initialize(*args)
6
6
  end
7
7
 
8
8
  def type
9
- raise NotImplementedError, "You must define the `type` method in your Payload"
9
+ raise NotImplementedError, 'You must define the `type` method in your Payload'
10
10
  end
11
11
 
12
12
  def content
13
- raise NotImplementedError, "You must define the `content` method in your Payload"
13
+ {}
14
14
  end
15
15
 
16
16
  end
@@ -0,0 +1,9 @@
1
+ module Ray
2
+ module Payloads
3
+ class RemovePayload < Payload
4
+ def type
5
+ 'remove'
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Ray
2
+ module Payloads
3
+ class ShowAppPayload < Payload
4
+ def type
5
+ 'show_app'
6
+ end
7
+ end
8
+ end
9
+ end
@@ -7,13 +7,13 @@ module Ray
7
7
  end
8
8
 
9
9
  def type
10
- "custom"
10
+ 'custom'
11
11
  end
12
12
 
13
13
  def content
14
14
  {
15
15
  content: @str,
16
- label: "String"
16
+ label: 'String'
17
17
  }
18
18
  end
19
19
 
data/lib/ray/request.rb CHANGED
@@ -1,34 +1,23 @@
1
1
  module Ray
2
2
  class Request
3
- attr_reader :payloads, :settings
4
-
5
- def initialize(payloads, settings)
3
+ def initialize(uuid, payloads, meta = {})
4
+ @uuid = uuid
6
5
  @payloads = payloads
7
- @settings = settings
8
- end
9
-
10
- def send
11
- req = Net::HTTP::Post.new(uri, {'Content-Type' => 'application/json'})
12
- req.body = { uuid: SecureRandom.uuid, payloads: payloads_content, meta: {} }.to_json
13
- res = Net::HTTP.start(uri.hostname, uri.port) do |http|
14
- http.request(req)
15
- end
16
- #rescue StandardError
17
- # Ignore any errors
6
+ @meta = meta
18
7
  end
19
8
 
20
- def uri
21
- @uri ||= URI("#{settings[:host]}:#{settings[:port]}")
9
+ def to_json
10
+ {uuid:@uuid, payloads:payload_contents, meta: @meta}.to_json
22
11
  end
23
12
 
24
- def payloads_content
25
- payloads.map do |payload|
13
+ def payload_contents
14
+ return @payloads.map do |payload|
26
15
  {
27
16
  type: payload.type,
28
17
  content: payload.content,
29
18
  origin: {
30
19
  file: "the file",
31
- line_number: "123"
20
+ line_number: "123",
32
21
  },
33
22
  }
34
23
  end
data/lib/ray/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ray
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
data/ray.gemspec CHANGED
@@ -5,8 +5,8 @@ require_relative "lib/ray/version"
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "ruby-ray"
7
7
  spec.version = Ray::VERSION
8
- spec.authors = ["Chris Oliver"]
9
- spec.email = ["excid3@gmail.com"]
8
+ spec.authors = ["Freek Van der Herten", "Chris Oliver"]
9
+ spec.email = ["freek@spatie.be"]
10
10
 
11
11
  spec.summary = "Debug with Ray to fix problems faster"
12
12
  spec.homepage = "https://myray.app"
@@ -29,8 +29,7 @@ Gem::Specification.new do |spec|
29
29
  spec.require_paths = ["lib"]
30
30
 
31
31
  # Uncomment to register a new dependency of your gem
32
- spec.add_dependency "active_support", "~> 6.1"
33
-
32
+ spec.add_dependency "activesupport", ">= 4.2"
34
33
  # For more information and examples about making a new gem, checkout our
35
34
  # guide at: https://bundler.io/guides/creating_gem.html
36
35
  end
metadata CHANGED
@@ -1,36 +1,38 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-ray
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
+ - Freek Van der Herten
7
8
  - Chris Oliver
8
9
  autorequire:
9
10
  bindir: exe
10
11
  cert_chain: []
11
- date: 2021-02-10 00:00:00.000000000 Z
12
+ date: 2021-02-11 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
- name: active_support
15
+ name: activesupport
15
16
  requirement: !ruby/object:Gem::Requirement
16
17
  requirements:
17
- - - "~>"
18
+ - - ">="
18
19
  - !ruby/object:Gem::Version
19
- version: '6.1'
20
+ version: '4.2'
20
21
  type: :runtime
21
22
  prerelease: false
22
23
  version_requirements: !ruby/object:Gem::Requirement
23
24
  requirements:
24
- - - "~>"
25
+ - - ">="
25
26
  - !ruby/object:Gem::Version
26
- version: '6.1'
27
+ version: '4.2'
27
28
  description:
28
29
  email:
29
- - excid3@gmail.com
30
+ - freek@spatie.be
30
31
  executables: []
31
32
  extensions: []
32
33
  extra_rdoc_files: []
33
34
  files:
35
+ - ".github/SECURITY.md"
34
36
  - ".github/workflows/main.yml"
35
37
  - ".gitignore"
36
38
  - CHANGELOG.md
@@ -41,13 +43,30 @@ files:
41
43
  - Rakefile
42
44
  - bin/console
43
45
  - bin/setup
44
- - example.rb
46
+ - examples/colors.rb
47
+ - examples/custom.rb
48
+ - examples/general.rb
49
+ - examples/newScreen.rb
50
+ - examples/notify.rb
51
+ - examples/pause.rb
52
+ - examples/visibility.rb
45
53
  - lib/ray.rb
54
+ - lib/ray/client.rb
55
+ - lib/ray/errors/stop_execution_requested.rb
46
56
  - lib/ray/payload_factory.rb
47
57
  - lib/ray/payloads/bool_payload.rb
58
+ - lib/ray/payloads/color_payload.rb
59
+ - lib/ray/payloads/create_lock_payload.rb
60
+ - lib/ray/payloads/custom_payload.rb
61
+ - lib/ray/payloads/hide_app_payload.rb
62
+ - lib/ray/payloads/hide_payload.rb
48
63
  - lib/ray/payloads/int_payload.rb
64
+ - lib/ray/payloads/new_screen_payload.rb
65
+ - lib/ray/payloads/notify_payload.rb
49
66
  - lib/ray/payloads/null_payload.rb
50
67
  - lib/ray/payloads/payload.rb
68
+ - lib/ray/payloads/remove_payload.rb
69
+ - lib/ray/payloads/show_app_payload.rb
51
70
  - lib/ray/payloads/string_payload.rb
52
71
  - lib/ray/request.rb
53
72
  - lib/ray/version.rb
data/example.rb DELETED
@@ -1,7 +0,0 @@
1
- require_relative "lib/ray"
2
-
3
- ray("hello world")
4
- ray(nil)
5
- ray(1234)
6
- ray(true)
7
- ray(false)