leanweb 0.4.0 → 0.4.2
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 +4 -4
- data/bin/leanweb +4 -2
- data/contrib/lib/hawese.rb +15 -5
- data/lib/leanweb/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c06365a703af2701788ef2a910f9bf93235ec58f9ae553f5cc8680c3a69b24d1
|
4
|
+
data.tar.gz: 538381c1f9b7fd0fc4fe34151236319cb61148e522ec76eebd1c3ae9bb6adef5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d14b40f59e531bd51ee83a553f157663eae6be88b1808d91d659835fef6184488855ec7895b7da6239c8b180e68e3e2bdd60740beece777142234747b5cb54f
|
7
|
+
data.tar.gz: 8562fc17fc25bfbb72ea0b1aa01a6432de76de48e9d5f6b0f13391410017d601eac91b58086ba3b782ecbff9f0a4d4adf6e9de716b558c0da1ecd598cac93f29
|
data/bin/leanweb
CHANGED
@@ -36,7 +36,7 @@ files = [
|
|
36
36
|
|
37
37
|
if ENV['RACK_ENV'] == 'development'
|
38
38
|
use(Rack::Reloader, 0)
|
39
|
-
use(Rack::Static, urls: ['
|
39
|
+
use(Rack::Static, urls: [''], root: 'public', cascade: true)
|
40
40
|
end
|
41
41
|
|
42
42
|
run LeanWeb::App.new(ROUTES)
|
@@ -89,10 +89,11 @@ files = [
|
|
89
89
|
%h1 It works!
|
90
90
|
HAML
|
91
91
|
}, {
|
92
|
-
filename: '.gitignore'
|
92
|
+
filename: '.gitignore',
|
93
93
|
content: <<~GITIGNORE
|
94
94
|
/.bundle
|
95
95
|
/public/**/*.html
|
96
|
+
/vendor
|
96
97
|
GITIGNORE
|
97
98
|
}
|
98
99
|
]
|
@@ -109,6 +110,7 @@ begin
|
|
109
110
|
FileUtils.mkdir_p(['public/assets', 'src/controllers', 'src/views'])
|
110
111
|
files.each{ |file| File.write(file[:filename], file[:content]) }
|
111
112
|
`git init`
|
113
|
+
`bundle config --local path vendor/bundle`
|
112
114
|
`bundle install`
|
113
115
|
puts("Project '#{File.basename(Dir.getwd)}' successfully created.")
|
114
116
|
rescue # rubocop:disable Style/RescueStandardError
|
data/contrib/lib/hawese.rb
CHANGED
@@ -56,11 +56,7 @@ class Hawese
|
|
56
56
|
end
|
57
57
|
|
58
58
|
def purchase_from_schema(gateway, schema)
|
59
|
-
|
60
|
-
schema[:properties].each do |property, contents|
|
61
|
-
fields[property] = contents[:default] if contents.include?(:default)
|
62
|
-
end
|
63
|
-
purchase(gateway, fields)
|
59
|
+
purchase(gateway, fields_to_schema_defaults(schema))
|
64
60
|
end
|
65
61
|
|
66
62
|
def payment(uuid)
|
@@ -72,5 +68,19 @@ class Hawese
|
|
72
68
|
JSON.parse(response.body, symbolize_names: true)
|
73
69
|
end
|
74
70
|
end
|
71
|
+
|
72
|
+
protected
|
73
|
+
|
74
|
+
def fields_to_schema_defaults(schema)
|
75
|
+
fields = {}
|
76
|
+
schema[:properties].each do |property, contents|
|
77
|
+
if contents.include?(:properties)
|
78
|
+
fields[property] = fields_to_schema_defaults(contents)
|
79
|
+
elsif contents.include?(:default)
|
80
|
+
fields[property] = contents[:default]
|
81
|
+
end
|
82
|
+
end
|
83
|
+
fields
|
84
|
+
end
|
75
85
|
end
|
76
86
|
end
|
data/lib/leanweb/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: leanweb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Felix Freeman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-04-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -222,7 +222,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
222
222
|
- !ruby/object:Gem::Version
|
223
223
|
version: '0'
|
224
224
|
requirements: []
|
225
|
-
rubygems_version: 3.
|
225
|
+
rubygems_version: 3.4.7
|
226
226
|
signing_key:
|
227
227
|
specification_version: 4
|
228
228
|
summary: LeanWeb is a minimal hybrid static / dynamic web framework
|