pult 0.0.8 → 0.0.9t0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 96037cdff4cfc27b119180d4d7945ecd6c822c5d866fbd01f1e324dabd1dcbb8
4
- data.tar.gz: 8e8eb4befec919c2dc4df105e27d10ae9015268abc254d00c7d840c4d51a4935
3
+ metadata.gz: cb4f22cd2c1ebb9868816ec9645c8fda19fa3c48e8fae3e9d4bf9e77e1778628
4
+ data.tar.gz: 0c74ef01e3f73e327dacce469fceb361e55fe39bbb0a4925cb08737da0e6ae6e
5
5
  SHA512:
6
- metadata.gz: 55bfef5c6532e1a3ab763209873dfbecaf44c057cd48c65e21a139da50281392f16715129d6979b2830b9705b35bf20e736bcc9b89aaeb48e2e2f425b48d952d
7
- data.tar.gz: 5e43c50166fa7ef2e360d6a516851838a3e7308bc5f193636595ae1a9b7d88004e5ad293eb8c99a130a4c045c36c6c49c32999a0e31137a72b34c94fbcec1b63
6
+ metadata.gz: a36579ff39f5747fbe87c88da4d105eb09630c00074f20110eddb9cb1de512378c132748fbf28e3445ade7627cbf661c972e8b17460223df440871303a8e08ab
7
+ data.tar.gz: c689078e9b230944aea7ad82026e6689e319496ea335d4265f9426144025350c1d11296394b8c90fbf7c8a582f956362ce800672395bd162485abd0b08caa538
data/CHANGELOG.md CHANGED
@@ -1,9 +1,24 @@
1
- # Done
1
+ # Changelog
2
+ All notable changes to this project will be documented in this file.
2
3
 
3
- - Ruby/Http interface to yml tasks. Playground to 0.0.7
4
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
4
6
 
5
- # Fixes and updates
7
+ ## [0.0.9] - 2019-11-09
8
+ ### Status
9
+ - Dev version
6
10
 
11
+ ### Updates
12
+ - Default pult root is `pwd`
13
+ - Config `pult.yml` can be in root or root`/config` folder
14
+ - Autoset `config.dir` in panel yml for apps, equals to project root
15
+ - `curl -X POST <url>` API request work now (`-d ''` need earlier)
16
+
17
+ ## [0.0.8] - 2019-11-08
18
+ ### Status
19
+ - Dev version
20
+
21
+ ### Updates
7
22
  - Fix and refactoring API
8
23
  - Add JSON Swagger documentation for API
9
24
  - Ruby version req
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pult (0.0.3)
4
+ pult (0.0.9)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # Pult
2
2
 
3
- Pult is UNDER CONSTRUCTION
3
+ **Under construction**! This is **Dev** version (0.0.*x*)
4
4
 
5
- Comming soon...
5
+ Development progress can be reached at [CHANGELOG](./CHANGELOG.md)
data/exe/pult ADDED
@@ -0,0 +1,21 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ COMMANDS = {
4
+ ['server', 's'] => ->{
5
+ require_relative '../lib/pult'
6
+
7
+ pult = Pult.new
8
+
9
+ Pult::Api.init! pult
10
+
11
+ Thread.new { Pult::Api.server! }
12
+
13
+ exit 0
14
+ }
15
+ }
16
+
17
+ COMMANDS.keys.each do |arg|
18
+ if arg.include? ARGV[0]
19
+ COMMANDS[arg].call
20
+ end
21
+ end
data/lib/init/req-lib.rb CHANGED
@@ -2,5 +2,7 @@ require 'active_job'
2
2
  require 'grape'
3
3
  require 'grape-swagger'
4
4
  require 'open3'
5
+ require 'pathname'
5
6
  require 'rack'
7
+ require 'webrick'
6
8
  require 'yaml'
@@ -2,6 +2,10 @@ module Pult::Api::Server
2
2
 
3
3
  PORT = ENV['PULT_API_PORT']&.to_i || 9292
4
4
 
5
+ # temp fix curl -d ''
6
+ METHS = WEBrick::HTTPRequest::BODY_CONTAINABLE_METHODS
7
+ WEBrick::HTTPRequest::BODY_CONTAINABLE_METHODS = METHS - ['POST']
8
+
5
9
  def self.run! api:, port: PORT
6
10
  Rack::Handler::WEBrick.run api, Port: port
7
11
  end
data/lib/pult/panel.rb CHANGED
@@ -2,7 +2,7 @@ class Pult::Panel
2
2
 
3
3
  include DotAccessible
4
4
 
5
- CONFIG_ROOT = ENV['PULT_CONFIG_ROOT'] || nil
5
+ CONFIG_ROOT = ENV['PULT_CONFIG_ROOT'] || Dir.pwd
6
6
  CONFIG_FILE = ENV['PULT_CONFIG_FILE'] || 'pult.yml'
7
7
 
8
8
  SYS_KEYS = %w{ config }
@@ -91,10 +91,22 @@ class Pult::Panel
91
91
  Dir[scan].each do |path|
92
92
  config_file = YAML.load_file(path)
93
93
 
94
+ dir! config_file, path
95
+
94
96
  merge! config_file
95
97
  end
96
98
  end
97
99
 
100
+ def dir! hash, path
101
+ app = hash.keys.first
102
+
103
+ config = (hash[app]['config'] ||= {})
104
+
105
+ dir = Pathname.new(path).dirname.to_s.gsub(/\/config$/, '')
106
+
107
+ config['dir'] ||= dir
108
+ end
109
+
98
110
  def app_hash! *args
99
111
  self.class.app_hash! *args
100
112
  end
data/lib/pult/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Pult
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9t0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pult
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9t0
5
5
  platform: ruby
6
6
  authors:
7
7
  - dmitryck
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-09-10 00:00:00.000000000 Z
11
+ date: 2019-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -125,7 +125,8 @@ dependencies:
125
125
  description:
126
126
  email:
127
127
  - dmitryck@gmail.com
128
- executables: []
128
+ executables:
129
+ - pult
129
130
  extensions: []
130
131
  extra_rdoc_files: []
131
132
  files:
@@ -139,6 +140,7 @@ files:
139
140
  - Rakefile
140
141
  - bin/console
141
142
  - bin/setup
143
+ - exe/pult
142
144
  - lib/init/boot.rb
143
145
  - lib/init/const.rb
144
146
  - lib/init/req-lib.rb
@@ -180,9 +182,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
180
182
  version: 2.3.0
181
183
  required_rubygems_version: !ruby/object:Gem::Requirement
182
184
  requirements:
183
- - - ">="
185
+ - - ">"
184
186
  - !ruby/object:Gem::Version
185
- version: '0'
187
+ version: 1.3.1
186
188
  requirements: []
187
189
  rubyforge_project:
188
190
  rubygems_version: 2.7.6