foobara-rack-connector 0.0.10 → 0.1.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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -0
  3. data/README.md +55 -26
  4. metadata +22 -10
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '014284f75f85a75b6db0ef8bc7f608830a41f5b6f59c3f03912b1c4ecb8dc68a'
4
- data.tar.gz: dfc5980382756a6623984550e71bcdd101c9f2ae6eac3183f4c51357ee3680a9
3
+ metadata.gz: 9f562aca4b2fefaf624ec980cb2edc0f8e3339cf8df25250c3d58e1525887b5e
4
+ data.tar.gz: d09607d42c9794362c77a9cf1a0257e21c3299cecb49e3fb1d4ee4d86dfa3bae
5
5
  SHA512:
6
- metadata.gz: 26df81e37bc49c8391ebc5923e514608318f002b36257a00b8e7cd161520c66f713bbf804e0e52a2b64b9dc6b9c75225c2c21021f07a28c49c6b130b56ac0d83
7
- data.tar.gz: fc1faef3576946e6485921c2509587a7bd82fb02bd7fce79737cfdc3735ccb717acf2eee0ed35d4c9a6270f293d7bd4bc5e214a1b6e58d2f8559c73731fe19d4
6
+ metadata.gz: e12d42e6c182c38d55ab7d851f8e42b21bf0ae4fe54664b21956c9c2460a19ba10d4b56022587135abe5cdfafe14336a49a04fcac3db9796d3f04b976cab70dd
7
+ data.tar.gz: b0f17192bf591ad9c01e201a8dca1fd2f229ea5f9ef0160789d80c0aa2a1aa14d5098ea1a4c118cd36f893e70daf91b03a9adcb769315c6af4db45e53e74f030
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [0.1.0] - 2025-08-22
2
+
3
+ - Support Foobara 0.1.0
4
+
1
5
  ## [0.0.10] - 2025-04-18
2
6
 
3
7
  - Pass options through to Puma
data/README.md CHANGED
@@ -1,50 +1,79 @@
1
- # Rack::Connector
1
+ [![Gem Version](https://badge.fury.io/rb/foobara-rack-connector.svg)](https://badge.fury.io/rb/foobara-rack-connector)
2
2
 
3
- TODO: Delete this and the text below, and describe your gem
4
-
5
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library
6
- into a gem. Put your Ruby code in the file `lib/rack/connector`. To experiment with that code, run `bin/console` for an
7
- interactive prompt.
3
+ # Foobara::RackConnector
4
+ Rack connector for the foobara gem.
8
5
 
9
6
  ## Installation
10
7
 
11
8
  From this directory, run the following:
12
9
 
13
10
  ```
14
- bundle config set local.foobara ../foobara
15
- bundle config set disable_local_branch_check true
11
+ gem install foobara-rack-connector
12
+ ```
13
+ or
14
+ in Gemfile:
15
+ ```
16
+ gem "foobara-rack-connector"
16
17
  ```
17
18
 
18
- TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it
19
- to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with
20
- instructions to install your gem from git if you don't plan to release to RubyGems.org.
19
+ ## Usage
20
+ ```ruby
21
+ command_connector = Foobara::CommandConnectors::Http::Rack.new
22
+ command_connector.connect(Add) # Your Foobara::Command should go here
23
+ Rackup::Server.start(app: command_connector)
24
+ ```
21
25
 
22
- Install the gem and add to the application's Gemfile by executing:
26
+ ## Example
27
+ ```ruby
28
+ require "foobara/rack_connector"
29
+ require "rackup/server"
30
+ require "foobara"
23
31
 
24
- $ bundle add UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
32
+ class Add < Foobara::Command
33
+ inputs do
34
+ operand1 :integer, :required
35
+ operand2 :integer, :required
36
+ end
25
37
 
26
- If bundler is not being used to manage dependencies, install the gem by executing:
38
+ result :integer
27
39
 
28
- $ gem install UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
40
+ def execute
41
+ add_operands
42
+ end
29
43
 
30
- ## Usage
44
+ attr_accessor :sum
31
45
 
32
- TODO: Write usage instructions here
46
+ def add_operands
47
+ self.sum = operand1 + operand2
48
+ end
49
+ end
33
50
 
34
- ## Development
51
+ command_connector = Foobara::CommandConnectors::Http::Rack.new
52
+ command_connector.connect(Add)
53
+ Rackup::Server.start(app: command_connector)
54
+ ```
35
55
 
36
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can
37
- also run `bin/console` for an interactive prompt that will allow you to experiment.
56
+ ### Manifests
57
+
58
+ You can see the generated manifest by opening the URL:
59
+ ```
60
+ http://localhost:9292/help/Add
61
+ ```
62
+
63
+ ### Commands
64
+ Commands can be executed by sending:
65
+ ```
66
+ curl 'http://localhost:9292/run/Add?operand1=1&operand2=2'
67
+ ```
68
+
69
+ ## Development
70
+ After checking out the repo, run `bundle install` to install dependencies. Then, run `bundle exec rspec` to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.
38
71
 
39
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the
40
- version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version,
41
- push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
72
+ 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.
42
73
 
43
74
  ## Contributing
44
75
 
45
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/rack-connector. This project is
46
- intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to
47
- the [code of conduct](https://github.com/[USERNAME]/rack-connector/blob/main/CODE_OF_CONDUCT.md).
76
+ Bug reports and pull requests are welcome on GitHub at https://github.com/foobara/rack-connector.
48
77
 
49
78
  ## License
50
79
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foobara-rack-connector
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Georgi
@@ -13,30 +13,42 @@ dependencies:
13
13
  name: foobara
14
14
  requirement: !ruby/object:Gem::Requirement
15
15
  requirements:
16
- - - "~>"
16
+ - - ">="
17
+ - !ruby/object:Gem::Version
18
+ version: 0.1.1
19
+ - - "<"
17
20
  - !ruby/object:Gem::Version
18
- version: 0.0.88
21
+ version: 2.0.0
19
22
  type: :runtime
20
23
  prerelease: false
21
24
  version_requirements: !ruby/object:Gem::Requirement
22
25
  requirements:
23
- - - "~>"
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ version: 0.1.1
29
+ - - "<"
24
30
  - !ruby/object:Gem::Version
25
- version: 0.0.88
31
+ version: 2.0.0
26
32
  - !ruby/object:Gem::Dependency
27
33
  name: foobara-http-command-connector
28
34
  requirement: !ruby/object:Gem::Requirement
29
35
  requirements:
30
- - - "~>"
36
+ - - ">="
37
+ - !ruby/object:Gem::Version
38
+ version: 0.1.0
39
+ - - "<"
31
40
  - !ruby/object:Gem::Version
32
- version: 0.0.1
41
+ version: 2.0.0
33
42
  type: :runtime
34
43
  prerelease: false
35
44
  version_requirements: !ruby/object:Gem::Requirement
36
45
  requirements:
37
- - - "~>"
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ version: 0.1.0
49
+ - - "<"
38
50
  - !ruby/object:Gem::Version
39
- version: 0.0.1
51
+ version: 2.0.0
40
52
  - !ruby/object:Gem::Dependency
41
53
  name: rack
42
54
  requirement: !ruby/object:Gem::Requirement
@@ -89,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
89
101
  - !ruby/object:Gem::Version
90
102
  version: '0'
91
103
  requirements: []
92
- rubygems_version: 3.6.7
104
+ rubygems_version: 3.6.9
93
105
  specification_version: 4
94
106
  summary: Exposes foobara commands and entities via rack interface.
95
107
  test_files: []