hanami-runner 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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: c5e87ea883c8a1b504b2527e016deca1314ffbafd25852150a5df7aab0706f10
4
+ data.tar.gz: 6cd8c6f6ee4620e9f2fcb5bc688e3d18baa2c7c0fd45f7f3176a61cd67aaa27a
5
+ SHA512:
6
+ metadata.gz: b346edb67b9ca92ba12ea68e59a2337132992c9e5a1034df2cd063504d90ab83b4f3a694cc61eb2a87b55fe99117dac1889a618b155b9e83d15dc1178545a5f7
7
+ data.tar.gz: 78cfdae2c7a612c27ab9802478f8123d3b2655595dcd2dbcfce04d4402d39d8806383c23e332c3d8d439c65d0980452c795983a85faabff904b33c1ec578dd3a
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,102 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ hanami-runner (0.5.0)
5
+ hanami (~> 1.3)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ concurrent-ruby (1.1.5)
11
+ dry-configurable (0.8.2)
12
+ concurrent-ruby (~> 1.0)
13
+ dry-core (~> 0.4, >= 0.4.7)
14
+ dry-container (0.7.0)
15
+ concurrent-ruby (~> 1.0)
16
+ dry-configurable (~> 0.1, >= 0.1.3)
17
+ dry-core (0.4.7)
18
+ concurrent-ruby (~> 1.0)
19
+ dry-equalizer (0.2.2)
20
+ dry-logic (0.4.2)
21
+ dry-container (~> 0.2, >= 0.2.6)
22
+ dry-core (~> 0.2)
23
+ dry-equalizer (~> 0.2)
24
+ dry-types (0.12.3)
25
+ concurrent-ruby (~> 1.0)
26
+ dry-configurable (~> 0.1)
27
+ dry-container (~> 0.3)
28
+ dry-core (~> 0.2, >= 0.2.1)
29
+ dry-equalizer (~> 0.2)
30
+ dry-logic (~> 0.4, >= 0.4.2)
31
+ inflecto (~> 0.0.0, >= 0.0.2)
32
+ dry-validation (0.11.2)
33
+ concurrent-ruby (~> 1.0)
34
+ dry-configurable (~> 0.1, >= 0.1.3)
35
+ dry-core (~> 0.2, >= 0.2.1)
36
+ dry-equalizer (~> 0.2)
37
+ dry-logic (~> 0.4.2)
38
+ dry-types (~> 0.12.0)
39
+ hanami (1.3.1)
40
+ bundler (>= 1.6, < 3)
41
+ concurrent-ruby (~> 1.0)
42
+ hanami-assets (~> 1.3)
43
+ hanami-cli (~> 0.3)
44
+ hanami-controller (~> 1.3)
45
+ hanami-helpers (~> 1.3)
46
+ hanami-mailer (~> 1.3)
47
+ hanami-router (~> 1.3)
48
+ hanami-utils (~> 1.3)
49
+ hanami-validations (~> 1.3)
50
+ hanami-view (~> 1.3)
51
+ hanami-assets (1.3.1)
52
+ hanami-helpers (~> 1.3)
53
+ hanami-utils (~> 1.3)
54
+ tilt (~> 2.0, >= 2.0.2)
55
+ hanami-cli (0.3.1)
56
+ concurrent-ruby (~> 1.0)
57
+ hanami-utils (~> 1.3)
58
+ hanami-controller (1.3.1)
59
+ hanami-utils (~> 1.3)
60
+ rack (~> 2.0)
61
+ hanami-helpers (1.3.1)
62
+ hanami-utils (~> 1.3)
63
+ hanami-mailer (1.3.1)
64
+ hanami-utils (~> 1.3)
65
+ mail (~> 2.6)
66
+ tilt (~> 2.0, >= 2.0.1)
67
+ hanami-router (1.3.1)
68
+ hanami-utils (~> 1.3)
69
+ http_router (= 0.11.2)
70
+ rack (~> 2.0)
71
+ hanami-utils (1.3.1)
72
+ concurrent-ruby (~> 1.0)
73
+ transproc (~> 1.0)
74
+ hanami-validations (1.3.3)
75
+ dry-logic (~> 0.4.2, < 0.5)
76
+ dry-validation (~> 0.11, < 0.12)
77
+ hanami-utils (~> 1.3)
78
+ hanami-view (1.3.1)
79
+ hanami-utils (~> 1.3)
80
+ tilt (~> 2.0, >= 2.0.1)
81
+ http_router (0.11.2)
82
+ rack (>= 1.0.0)
83
+ url_mount (~> 0.2.1)
84
+ inflecto (0.0.2)
85
+ mail (2.7.1)
86
+ mini_mime (>= 0.1.1)
87
+ mini_mime (1.0.1)
88
+ rack (2.0.7)
89
+ tilt (2.0.9)
90
+ transproc (1.0.3)
91
+ url_mount (0.2.1)
92
+ rack
93
+
94
+ PLATFORMS
95
+ ruby
96
+
97
+ DEPENDENCIES
98
+ bundler (>= 1.3.5)
99
+ hanami-runner!
100
+
101
+ BUNDLED WITH
102
+ 2.0.1
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2019 apontini
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 all
13
+ 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 THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,33 @@
1
+ # Hanami Runner
2
+
3
+ Welcome to your new Hanami project!
4
+
5
+ ## Setup
6
+
7
+ How to run tests:
8
+
9
+ ```
10
+ % bundle exec rake
11
+ ```
12
+
13
+ How to run the development console:
14
+
15
+ ```
16
+ % bundle exec hanami console
17
+ ```
18
+
19
+ How to run the development server:
20
+
21
+ ```
22
+ % bundle exec hanami server
23
+ ```
24
+
25
+ How to prepare (create and migrate) DB for `development` and `test` environments:
26
+
27
+ ```
28
+ % bundle exec hanami db prepare
29
+
30
+ % HANAMI_ENV=test bundle exec hanami db prepare
31
+ ```
32
+
33
+ Explore Hanami [guides](http://hanamirb.org/guides/), [API docs](http://docs.hanamirb.org/1.3.1/), or jump in [chat](http://chat.hanamirb.org) for help. Enjoy! 🌸
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
data/bin/coms ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+ require "bundler/setup"
3
+ require "hanami-runner"
4
+
5
+ Coms::CLI.new.call
@@ -0,0 +1,22 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'hanami-runner/info'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "hanami-runner"
8
+ spec.version = HanamiRunner::Info::VERSION
9
+ spec.authors = ["apontini"]
10
+ spec.email = ["alberto.pontini@gmail.com"]
11
+ spec.description = %q{Adds the run command to Hanami CLI allowing to execute ruby code via CLI (much like Rails Runnes)}
12
+ spec.summary = %q{Adds the run command to Hanami CLI allowing to execute ruby code via CLI (much like Rails Runnes)}
13
+ #spec.executables << 'coms'
14
+ spec.homepage = "https://github.com/apontini/hanami-runner"
15
+ spec.license = "MIT"
16
+
17
+ spec.files = `git ls-files`.split($/)
18
+ spec.require_paths = ["lib"]
19
+
20
+ spec.add_dependency "hanami", "~> 1.3"
21
+ spec.add_development_dependency "bundler", ">= 1.3.5"
22
+ end
@@ -0,0 +1,5 @@
1
+ module HanamiRunner
2
+ module Info
3
+ VERSION = "0.5.0"
4
+ end
5
+ end
@@ -0,0 +1,20 @@
1
+ require "hanami/cli/commands"
2
+
3
+ module Hanami
4
+ class CLI
5
+ Commands.module_eval do
6
+ class Run < Hanami::CLI::Command
7
+ desc "Executes ruby code in a Hanami environment"
8
+ argument :code, required: true, desc: "The code to be executed"
9
+
10
+ def call(code:)
11
+ require_relative Pathname.pwd.join("config/environment")
12
+ Hanami.boot
13
+ eval(code)
14
+ end
15
+ end
16
+ end
17
+
18
+ register "run", Run
19
+ end
20
+ end
metadata ADDED
@@ -0,0 +1,83 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: hanami-runner
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.5.0
5
+ platform: ruby
6
+ authors:
7
+ - apontini
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2019-05-20 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: hanami
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.3'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.3'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 1.3.5
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: 1.3.5
41
+ description: Adds the run command to Hanami CLI allowing to execute ruby code via
42
+ CLI (much like Rails Runnes)
43
+ email:
44
+ - alberto.pontini@gmail.com
45
+ executables: []
46
+ extensions: []
47
+ extra_rdoc_files: []
48
+ files:
49
+ - Gemfile
50
+ - Gemfile.lock
51
+ - LICENSE
52
+ - README.md
53
+ - Rakefile
54
+ - bin/coms
55
+ - hanami_runner.gemspec
56
+ - lib/hanami-runner.rb
57
+ - lib/hanami-runner/info.rb
58
+ homepage: https://github.com/apontini/hanami-runner
59
+ licenses:
60
+ - MIT
61
+ metadata: {}
62
+ post_install_message:
63
+ rdoc_options: []
64
+ require_paths:
65
+ - lib
66
+ required_ruby_version: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ version: '0'
71
+ required_rubygems_version: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ requirements: []
77
+ rubyforge_project:
78
+ rubygems_version: 2.7.6
79
+ signing_key:
80
+ specification_version: 4
81
+ summary: Adds the run command to Hanami CLI allowing to execute ruby code via CLI
82
+ (much like Rails Runnes)
83
+ test_files: []