zaikio-loom 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +8 -0
- data/.rubocop.yml +27 -0
- data/.travis.yml +12 -0
- data/CHANGELOG.md +9 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +55 -0
- data/LICENSE.txt +21 -0
- data/README.md +119 -0
- data/Rakefile +13 -0
- data/bin/setup +8 -0
- data/lib/zaikio/loom/configuration.rb +40 -0
- data/lib/zaikio/loom/event.rb +76 -0
- data/lib/zaikio/loom/version.rb +5 -0
- data/lib/zaikio/loom.rb +21 -0
- data/zaikio-loom.gemspec +34 -0
- metadata +163 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 2bb7acebd728d686d9b6ca9d7db2906da8321f996f5c091413828edfc057aeb2
|
4
|
+
data.tar.gz: a27a74f63adcc90f63ee16209686c6224d5fe0ed136f52728547122e07ef75b8
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: cfb47c5ecafaf51967105805b79d8bf367420035d4cb0fc5c87c4c7755d19ba08ace93f9386a410d699a41b8834b81bd82e819d19f933a7c034fe48744f23c6a
|
7
|
+
data.tar.gz: 8394db45c7038a37f684a0839362604c3760402e4ba144b055631610f2173de0304b2afe7e70c42c193a04d1f041e2525dc5bcfc30f4be07eed0e621d6752173
|
data/.gitignore
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
AllCops:
|
2
|
+
TargetRubyVersion: 2.6
|
3
|
+
Exclude:
|
4
|
+
- test/**/*.rb
|
5
|
+
|
6
|
+
require:
|
7
|
+
- rubocop-performance
|
8
|
+
|
9
|
+
Layout/HashAlignment:
|
10
|
+
EnforcedColonStyle: table
|
11
|
+
|
12
|
+
Layout/LineLength:
|
13
|
+
Max: 119 # line length on GitHub's PR pages
|
14
|
+
|
15
|
+
Style/ClassAndModuleChildren:
|
16
|
+
Exclude:
|
17
|
+
- test/**/*.rb
|
18
|
+
|
19
|
+
Style/Documentation:
|
20
|
+
Enabled: false
|
21
|
+
|
22
|
+
Style/FrozenStringLiteralComment:
|
23
|
+
EnforcedStyle: never
|
24
|
+
|
25
|
+
Style/StringLiterals:
|
26
|
+
Enabled: true
|
27
|
+
EnforcedStyle: double_quotes
|
data/.travis.yml
ADDED
data/CHANGELOG.md
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
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 op@crispymtn.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
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
zaikio-loom (0.1.0)
|
5
|
+
oj
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
addressable (2.7.0)
|
11
|
+
public_suffix (>= 2.0.2, < 5.0)
|
12
|
+
ast (2.4.0)
|
13
|
+
crack (0.4.3)
|
14
|
+
safe_yaml (~> 1.0.0)
|
15
|
+
hashdiff (1.0.0)
|
16
|
+
jaro_winkler (1.5.4)
|
17
|
+
minitest (5.14.0)
|
18
|
+
oj (3.10.1)
|
19
|
+
parallel (1.19.1)
|
20
|
+
parser (2.7.0.2)
|
21
|
+
ast (~> 2.4.0)
|
22
|
+
public_suffix (4.0.3)
|
23
|
+
rainbow (3.0.0)
|
24
|
+
rake (13.0.1)
|
25
|
+
rubocop (0.79.0)
|
26
|
+
jaro_winkler (~> 1.5.1)
|
27
|
+
parallel (~> 1.10)
|
28
|
+
parser (>= 2.7.0.1)
|
29
|
+
rainbow (>= 2.2.2, < 4.0)
|
30
|
+
ruby-progressbar (~> 1.7)
|
31
|
+
unicode-display_width (>= 1.4.0, < 1.7)
|
32
|
+
rubocop-performance (1.5.2)
|
33
|
+
rubocop (>= 0.71.0)
|
34
|
+
ruby-progressbar (1.10.1)
|
35
|
+
safe_yaml (1.0.5)
|
36
|
+
unicode-display_width (1.6.1)
|
37
|
+
webmock (3.8.0)
|
38
|
+
addressable (>= 2.3.6)
|
39
|
+
crack (>= 0.3.2)
|
40
|
+
hashdiff (>= 0.4.0, < 2.0.0)
|
41
|
+
|
42
|
+
PLATFORMS
|
43
|
+
ruby
|
44
|
+
|
45
|
+
DEPENDENCIES
|
46
|
+
bundler
|
47
|
+
minitest
|
48
|
+
rake
|
49
|
+
rubocop
|
50
|
+
rubocop-performance
|
51
|
+
webmock
|
52
|
+
zaikio-loom!
|
53
|
+
|
54
|
+
BUNDLED WITH
|
55
|
+
2.1.2
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2019 Crispy Mountain GmbH
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,119 @@
|
|
1
|
+
# Zaikio Loom Ruby Gem
|
2
|
+
|
3
|
+
The Zaikio Loom Ruby Gem simplifies publishing events on the Zaikio Loom event system.
|
4
|
+
|
5
|
+
Applications can only publish events to Zaikio Loom which have been configured in the Zaikio Directory. With a developer account in the Zaikio Directory you will find the list of provided events in your App's configuration in the Directory.
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'zaikio-loom'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install zaikio-loom
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
### Configuration
|
26
|
+
|
27
|
+
To configure the gem add an initializer to your application:
|
28
|
+
|
29
|
+
```ruby
|
30
|
+
# in config/initializers/zaikio_loom.rb
|
31
|
+
Zaikio::Loom.configure do |config|
|
32
|
+
# Environment to which the gem should publish events to.
|
33
|
+
# Possible values: :sandbox (default), :production
|
34
|
+
config.environment = :sandbox
|
35
|
+
|
36
|
+
# The name of your application like it is named in the directory of the
|
37
|
+
# choosen enviroment.
|
38
|
+
config.app_name = 'my_application'
|
39
|
+
|
40
|
+
# Your application's event password for the choosen environment
|
41
|
+
# Do not add this password into version control.
|
42
|
+
config.password = ENV.fetch('ZAIKIO_LOOM_PASSWORD')
|
43
|
+
|
44
|
+
# The version of the event's payload format and structure
|
45
|
+
config.version = '1.0'
|
46
|
+
end
|
47
|
+
```
|
48
|
+
|
49
|
+
### Usage
|
50
|
+
|
51
|
+
Firing events to Zaikio Loom:
|
52
|
+
|
53
|
+
```ruby
|
54
|
+
Zaikio::Loom.fire_event(
|
55
|
+
:event_name,
|
56
|
+
subject: 'Org/3a242896-fa57-41ba-997e-8c212d7157f3',
|
57
|
+
payload: { foo: 'bar', baz: [1, 2, 3] }
|
58
|
+
)
|
59
|
+
```
|
60
|
+
|
61
|
+
This example would publish an event to Zaikio Loom with a random UUID and the current timestamp.
|
62
|
+
|
63
|
+
If you need more control over the published event, for example:
|
64
|
+
|
65
|
+
- to provide a specific unique UUID or timestamp in the past or
|
66
|
+
- you want to override the version for this specific event or
|
67
|
+
- you want to check the Loom's response to this request
|
68
|
+
|
69
|
+
then you can use the method:
|
70
|
+
|
71
|
+
```ruby
|
72
|
+
event = Zaikio::Loom::Event.new(
|
73
|
+
:event_name,
|
74
|
+
subject: 'Org/3a242896-fa57-41ba-997e-8c212d7157f3',
|
75
|
+
id: 'f5cecfce-eda7-4eae-a0b2-62da7d51e8a2',
|
76
|
+
payload: { foo: 'bar', baz: [1, 2, 3] },
|
77
|
+
timestamp: Time.current,
|
78
|
+
version: '1.1.beta'
|
79
|
+
)
|
80
|
+
|
81
|
+
unless event.fire # imaging the event_name does not exist
|
82
|
+
event.status_code # => 422
|
83
|
+
event.response_body # => '{ "errors": { "name": ["excludes a valid event name"] } }'
|
84
|
+
end
|
85
|
+
```
|
86
|
+
|
87
|
+
### Required arguments
|
88
|
+
|
89
|
+
This gem is able to add some defaults or fallback values to the requests against the Loom API, for example
|
90
|
+
|
91
|
+
- the app name,
|
92
|
+
- an unique `id`,
|
93
|
+
- the `version` or
|
94
|
+
- the current `timestamp`.
|
95
|
+
|
96
|
+
Nevertheless, the following arguments are required for every fired event and must follow the conventions described in the [Loom API Guide](https://docs.zaiku.com/guide/loom/posting-events.html#payload-requirements):
|
97
|
+
|
98
|
+
- the name of the event
|
99
|
+
- a `subject` that triggered the event
|
100
|
+
|
101
|
+
Furtheremore, the payload can be omitted, but must be a hash when present.
|
102
|
+
|
103
|
+
## Development
|
104
|
+
|
105
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests.
|
106
|
+
|
107
|
+
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).
|
108
|
+
|
109
|
+
## Contributing
|
110
|
+
|
111
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/crispymtn/zai-loom-ruby. 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.
|
112
|
+
|
113
|
+
## License
|
114
|
+
|
115
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
116
|
+
|
117
|
+
## Code of Conduct
|
118
|
+
|
119
|
+
Everyone interacting in the Zaikio Loom Ruby gem project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/crispymtn/zai-loom-ruby/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
2
|
+
require "rake/testtask"
|
3
|
+
require "rubocop/rake_task"
|
4
|
+
|
5
|
+
Rake::TestTask.new(:test) do |t|
|
6
|
+
t.libs << "test"
|
7
|
+
t.libs << "lib"
|
8
|
+
t.test_files = FileList["test/**/*_test.rb"]
|
9
|
+
end
|
10
|
+
|
11
|
+
RuboCop::RakeTask.new(:rubocop)
|
12
|
+
|
13
|
+
task default: %w[test rubocop]
|
data/bin/setup
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
require "logger"
|
2
|
+
|
3
|
+
module Zaikio
|
4
|
+
module Loom
|
5
|
+
class Configuration
|
6
|
+
HOSTS = {
|
7
|
+
development: "http://loom.zaikio.test",
|
8
|
+
test: "http://loom.zaikio.test",
|
9
|
+
staging: "https://loom.staging.zaikio.com",
|
10
|
+
sandbox: "https://loom.sandbox.zaikio.com",
|
11
|
+
production: "https://loom.zaikio.com"
|
12
|
+
}.freeze
|
13
|
+
|
14
|
+
attr_accessor :app_name, :password, :version
|
15
|
+
attr_reader :environment, :host
|
16
|
+
attr_writer :logger
|
17
|
+
|
18
|
+
def initialize
|
19
|
+
@environment = :sandbox
|
20
|
+
end
|
21
|
+
|
22
|
+
def logger
|
23
|
+
@logger ||= Logger.new(STDOUT)
|
24
|
+
end
|
25
|
+
|
26
|
+
def environment=(env)
|
27
|
+
@environment = env.to_sym
|
28
|
+
@host = host_for(environment)
|
29
|
+
end
|
30
|
+
|
31
|
+
private
|
32
|
+
|
33
|
+
def host_for(environment)
|
34
|
+
HOSTS.fetch(environment) do
|
35
|
+
raise StandardError.new, "Invalid Zaikio::Loom environment '#{environment}'"
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,76 @@
|
|
1
|
+
require "net/http"
|
2
|
+
require "oj"
|
3
|
+
require "securerandom"
|
4
|
+
|
5
|
+
module Zaikio
|
6
|
+
module Loom
|
7
|
+
class Event
|
8
|
+
attr_reader :status_code, :response_body
|
9
|
+
|
10
|
+
def initialize(name, subject:, id: nil, link: nil, payload: nil, receiver: nil, timestamp: nil, version: nil) # rubocop:disable Metrics/ParameterLists
|
11
|
+
@event_name = "#{configuration.app_name}.#{name}"
|
12
|
+
@id = id || SecureRandom.uuid
|
13
|
+
@link = link
|
14
|
+
@payload = payload
|
15
|
+
@receiver = receiver
|
16
|
+
@subject = subject
|
17
|
+
@timestamp = timestamp
|
18
|
+
@version = version || configuration.version
|
19
|
+
|
20
|
+
return if configuration.password
|
21
|
+
|
22
|
+
configuration.logger.error("Zaikio::Loom is disabled – event password is missing")
|
23
|
+
end
|
24
|
+
|
25
|
+
def fire # rubocop:disable Metrics/AbcSize
|
26
|
+
return false unless configuration.password && configuration.host
|
27
|
+
|
28
|
+
uri = URI("#{configuration.host}/api/v1/events")
|
29
|
+
|
30
|
+
http = Net::HTTP.new(uri.host, uri.port)
|
31
|
+
http.use_ssl = uri.scheme == "https"
|
32
|
+
|
33
|
+
response = http.request(build_request(uri))
|
34
|
+
|
35
|
+
@status_code = response.code.to_i
|
36
|
+
@response_body = response.body
|
37
|
+
|
38
|
+
response.is_a?(Net::HTTPSuccess)
|
39
|
+
end
|
40
|
+
|
41
|
+
private
|
42
|
+
|
43
|
+
def build_request(uri)
|
44
|
+
Net::HTTP::Post.new(uri, "User-Agent" => "zaikio-loom:#{Zaikio::Loom::VERSION}").tap do |request|
|
45
|
+
request.basic_auth(configuration.app_name, configuration.password)
|
46
|
+
request.body = event_as_json
|
47
|
+
request.content_type = "application/json"
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
def configuration
|
52
|
+
Zaikio::Loom.configuration
|
53
|
+
end
|
54
|
+
|
55
|
+
def event_as_json # rubocop:disable Metrics/MethodLength
|
56
|
+
timestamp = @timestamp || Time.now.getutc
|
57
|
+
|
58
|
+
Oj.dump(
|
59
|
+
{
|
60
|
+
event: {
|
61
|
+
id: @id,
|
62
|
+
name: @event_name,
|
63
|
+
subject: @subject,
|
64
|
+
timestamp: timestamp.iso8601,
|
65
|
+
receiver: @receiver,
|
66
|
+
version: @version,
|
67
|
+
payload: @payload,
|
68
|
+
link: @link
|
69
|
+
}.compact
|
70
|
+
},
|
71
|
+
mode: :compat
|
72
|
+
)
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
data/lib/zaikio/loom.rb
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
require "zaikio/loom/configuration"
|
2
|
+
require "zaikio/loom/event"
|
3
|
+
require "zaikio/loom/version"
|
4
|
+
|
5
|
+
module Zaikio
|
6
|
+
module Loom
|
7
|
+
class << self
|
8
|
+
attr_accessor :configuration
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.configure
|
12
|
+
self.configuration ||= Configuration.new
|
13
|
+
yield(configuration)
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.fire_event(name, **args)
|
17
|
+
event = Event.new(name, **args)
|
18
|
+
event.fire
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
data/zaikio-loom.gemspec
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
lib = File.expand_path("lib", __dir__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
require "zaikio/loom/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "zaikio-loom"
|
7
|
+
spec.version = Zaikio::Loom::VERSION
|
8
|
+
|
9
|
+
spec.authors = ["crispymtn", "Martin Spickermann"]
|
10
|
+
spec.email = ["op@crispymtn.com", "spickermann@gmail.com"]
|
11
|
+
spec.homepage = "https://github.com/crispymtn/zai-loom-ruby"
|
12
|
+
spec.license = "MIT"
|
13
|
+
spec.summary = "The Zaikio Loom Ruby Gem simplifies publishing events on the Zaikio Loom event system."
|
14
|
+
|
15
|
+
spec.metadata["changelog_uri"] = "https://github.com/crispymtn/zai-loom-ruby/blob/master/CHANGELOG.md"
|
16
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
17
|
+
spec.metadata["source_code_uri"] = spec.homepage
|
18
|
+
|
19
|
+
# Specify which files should be added to the gem when it is released.
|
20
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
21
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
22
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
23
|
+
end
|
24
|
+
spec.require_paths = ["lib"]
|
25
|
+
|
26
|
+
spec.add_runtime_dependency "oj"
|
27
|
+
|
28
|
+
spec.add_development_dependency "bundler"
|
29
|
+
spec.add_development_dependency "minitest"
|
30
|
+
spec.add_development_dependency "rake"
|
31
|
+
spec.add_development_dependency "rubocop"
|
32
|
+
spec.add_development_dependency "rubocop-performance"
|
33
|
+
spec.add_development_dependency "webmock"
|
34
|
+
end
|
metadata
ADDED
@@ -0,0 +1,163 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: zaikio-loom
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- crispymtn
|
8
|
+
- Martin Spickermann
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2020-01-29 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: oj
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - ">="
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '0'
|
21
|
+
type: :runtime
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '0'
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: bundler
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ">="
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '0'
|
35
|
+
type: :development
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ">="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0'
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: minitest
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - ">="
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '0'
|
49
|
+
type: :development
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - ">="
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '0'
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: rake
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0'
|
63
|
+
type: :development
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - ">="
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: rubocop
|
72
|
+
requirement: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - ">="
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
77
|
+
type: :development
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ">="
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '0'
|
84
|
+
- !ruby/object:Gem::Dependency
|
85
|
+
name: rubocop-performance
|
86
|
+
requirement: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - ">="
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '0'
|
91
|
+
type: :development
|
92
|
+
prerelease: false
|
93
|
+
version_requirements: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - ">="
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '0'
|
98
|
+
- !ruby/object:Gem::Dependency
|
99
|
+
name: webmock
|
100
|
+
requirement: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - ">="
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '0'
|
105
|
+
type: :development
|
106
|
+
prerelease: false
|
107
|
+
version_requirements: !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
109
|
+
- - ">="
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: '0'
|
112
|
+
description:
|
113
|
+
email:
|
114
|
+
- op@crispymtn.com
|
115
|
+
- spickermann@gmail.com
|
116
|
+
executables: []
|
117
|
+
extensions: []
|
118
|
+
extra_rdoc_files: []
|
119
|
+
files:
|
120
|
+
- ".gitignore"
|
121
|
+
- ".rubocop.yml"
|
122
|
+
- ".travis.yml"
|
123
|
+
- CHANGELOG.md
|
124
|
+
- CODE_OF_CONDUCT.md
|
125
|
+
- Gemfile
|
126
|
+
- Gemfile.lock
|
127
|
+
- LICENSE.txt
|
128
|
+
- README.md
|
129
|
+
- Rakefile
|
130
|
+
- bin/setup
|
131
|
+
- lib/zaikio/loom.rb
|
132
|
+
- lib/zaikio/loom/configuration.rb
|
133
|
+
- lib/zaikio/loom/event.rb
|
134
|
+
- lib/zaikio/loom/version.rb
|
135
|
+
- zaikio-loom.gemspec
|
136
|
+
homepage: https://github.com/crispymtn/zai-loom-ruby
|
137
|
+
licenses:
|
138
|
+
- MIT
|
139
|
+
metadata:
|
140
|
+
changelog_uri: https://github.com/crispymtn/zai-loom-ruby/blob/master/CHANGELOG.md
|
141
|
+
homepage_uri: https://github.com/crispymtn/zai-loom-ruby
|
142
|
+
source_code_uri: https://github.com/crispymtn/zai-loom-ruby
|
143
|
+
post_install_message:
|
144
|
+
rdoc_options: []
|
145
|
+
require_paths:
|
146
|
+
- lib
|
147
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
148
|
+
requirements:
|
149
|
+
- - ">="
|
150
|
+
- !ruby/object:Gem::Version
|
151
|
+
version: '0'
|
152
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
153
|
+
requirements:
|
154
|
+
- - ">="
|
155
|
+
- !ruby/object:Gem::Version
|
156
|
+
version: '0'
|
157
|
+
requirements: []
|
158
|
+
rubygems_version: 3.1.2
|
159
|
+
signing_key:
|
160
|
+
specification_version: 4
|
161
|
+
summary: The Zaikio Loom Ruby Gem simplifies publishing events on the Zaikio Loom
|
162
|
+
event system.
|
163
|
+
test_files: []
|