syntropy 0.16 → 0.17

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b90967d51ee11dd83db1237db95b35fb1a2bd9cb36248086bfe62082ddd4c0a5
4
- data.tar.gz: 187eb2adc5a21df0f8d0400ef54609300658df9e3ba371686c1007d4744c0667
3
+ metadata.gz: db440894351239f4fdc164cd3550d741919a8fed568f20620040cca54b7dbebd
4
+ data.tar.gz: 165d4a52b7d7ce7fb8377d7b0e96f108ef7c65cfc768cf59ec73b97a4f7c84e0
5
5
  SHA512:
6
- metadata.gz: 1c0aff28315990526db9d48c1d4dba164d9944f93bdbcb671fdd6526a2f77eac28fa89cc2a99e68ce6bc5e55db85582270b3ea6032456c5e5d2fe9847150e3ae
7
- data.tar.gz: 10d5ceb7568d22a07d89e13cca104aeeeea94e62a03c778a72c3da360b8a21ef466038d4d872b75ae00b1634c2dfffc8931e4a61695e95e99c78a51bfcd5c643
6
+ metadata.gz: d2bb77e92b44ca5e66a46c4427a4705cb2316b42372a71ce3c1e250bf1f93bccbe9201fe9602c174a6315880f33d47338133c121871561ab31e98c5a095bb385
7
+ data.tar.gz: c1069d92fbdb6a4a9eb792fa26c16e3d3494c882eb8a8d09e211a0f16b7b880bab8e0004a74cf4d1969398c2185091282bc3a4eebbf37b325c31ae06d52d3cd0
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 0.17 2025-09-11
2
+
3
+ - Move repo to [digital-fabric](https://github.com/digital-fabric/syntropy)
4
+
1
5
  # 0.16 2025-09-11
2
6
 
3
7
  - `syntropy` script:
data/README.md CHANGED
@@ -9,10 +9,10 @@
9
9
  <a href="http://rubygems.org/gems/syntropy">
10
10
  <img src="https://badge.fury.io/rb/syntropy.svg" alt="Ruby gem">
11
11
  </a>
12
- <a href="https://github.com/noteflakes/syntropy/actions">
13
- <img src="https://github.com/noteflakes/syntropy/actions/workflows/test.yml/badge.svg" alt="Tests">
12
+ <a href="https://github.com/digital-fabric/syntropy/actions">
13
+ <img src="https://github.com/digital-fabric/syntropy/actions/workflows/test.yml/badge.svg" alt="Tests">
14
14
  </a>
15
- <a href="https://github.com/noteflakes/syntropy/blob/master/LICENSE">
15
+ <a href="https://github.com/digital-fabric/syntropy/blob/master/LICENSE">
16
16
  <img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="MIT License">
17
17
  </a>
18
18
  </p>
@@ -38,7 +38,7 @@ Syntropy is based on:
38
38
 
39
39
  - [UringMachine](https://github.com/digital-fabric/uringmachine) - a lean mean
40
40
  [io_uring](https://unixism.net/loti/what_is_io_uring.html) machine for Ruby.
41
- - [TP2](https://github.com/noteflakes/tp2) - an io_uring-based web server for
41
+ - [TP2](https://github.com/digital-fabric/tp2) - an io_uring-based web server for
42
42
  concurrent Ruby apps.
43
43
  - [Qeweney](https://github.com/digital-fabric/qeweney) a uniform interface for
44
44
  working with HTTP requests and responses.
@@ -46,6 +46,16 @@ Syntropy is based on:
46
46
  - [Extralite](https://github.com/digital-fabric/extralite) a fast and innovative
47
47
  SQLite wrapper for Ruby.
48
48
 
49
+ ## Examples
50
+
51
+ To get a taste of some of Syntropy's capabilities, you can run the included
52
+ examples site inside the Syntropy repository:
53
+
54
+ ```bash
55
+ $ cd syntropy
56
+ $ bundle exec syntropy -d examples
57
+ ```
58
+
49
59
  ## Routing
50
60
 
51
61
  Syntropy routes request by following the tree structure of the Syntropy app. A
@@ -93,6 +103,28 @@ Some conventions employed in Syntropy-based web apps:
93
103
  - The Syntrpy router accepts clean URLs for Ruby modules and Markdown files. It
94
104
  also accepts clean URLs for `index.html` files.
95
105
 
106
+ ## Running Syntropy
107
+
108
+ Note: Syntropy runs exclusively on Linux and requires kernel version >= 6.4.
109
+
110
+ To start a web server on the working directory, use the `syntropy` command:
111
+
112
+ ```bash
113
+ $ # install syntropy:
114
+ $ gem install syntropy
115
+ $ # run syntropy
116
+ $ syntropy path/to/my_site
117
+ ```
118
+
119
+ To get help for the different options available, run `syntropy -h`.
120
+
121
+ ## Development mode
122
+
123
+ When developing and making changes to your site, you can run Syntropy in
124
+ development mode, which automatically reloads changed modules and provides tools
125
+ to automatically refresh open web pages and debug HTML templates. To start
126
+ Syntropy in development mode, run `syntropy -d path/to/my_site`.
127
+
96
128
  ## What does a Syntropic Ruby module look like?
97
129
 
98
130
  Consider `site/archive.rb` in the file tree above. We want to get a list of
@@ -121,7 +153,7 @@ But a module can also be something completely different:
121
153
 
122
154
  ```ruby
123
155
  # api/v1.rb
124
- class APIV1 < Syntropy::RPCAPI
156
+ class APIV1 < Syntropy::JSONAPI
125
157
  def initialize(db)
126
158
  @db = db
127
159
  end
data/lib/syntropy/app.rb CHANGED
@@ -183,7 +183,7 @@ module Syntropy
183
183
  }
184
184
  body {
185
185
  markdown md
186
- auto_refresh_watch!
186
+ auto_refresh_watch! if @env[:dev_mode]
187
187
  }
188
188
  }
189
189
  }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Syntropy
4
- VERSION = '0.16'
4
+ VERSION = '0.17'
5
5
  end
data/lib/syntropy.rb CHANGED
@@ -47,7 +47,7 @@ module Syntropy
47
47
  " #{GREEN}ooooo\n"\
48
48
  " #{GREEN} ooo vvv #{CLEAR}Syntropy - a web framework for Ruby\n"\
49
49
  " #{GREEN} o vvvvv #{CLEAR}--------------------------------------\n"\
50
- " #{GREEN} #{YELLOW}|#{GREEN} vvv o #{CLEAR}https://github.com/noteflakes/syntropy\n"\
50
+ " #{GREEN} #{YELLOW}|#{GREEN} vvv o #{CLEAR}https://github.com/digital-fabric/syntropy\n"\
51
51
  " #{GREEN} :#{YELLOW}|#{GREEN}:::#{YELLOW}|#{GREEN}::#{YELLOW}|#{GREEN}:\n"\
52
52
  "#{YELLOW}+++++++++++++++++++++++++++++++++++++++++++++++++++++++++\e[0m\n\n"
53
53
  end
data/syntropy.gemspec CHANGED
@@ -9,11 +9,11 @@ Gem::Specification.new do |s|
9
9
  s.email = 'sharon@noteflakes.com'
10
10
  s.files = `git ls-files`.split
11
11
 
12
- s.homepage = 'https://github.com/noteflakes/syntropy'
12
+ s.homepage = 'https://github.com/digital-fabric/syntropy'
13
13
  s.metadata = {
14
- 'homepage_uri' => 'https://github.com/noteflakes/syntropy',
14
+ 'homepage_uri' => 'https://github.com/digital-fabric/syntropy',
15
15
  'documentation_uri' => 'https://www.rubydoc.info/gems/syntropy',
16
- 'changelog_uri' => 'https://github.com/noteflakes/syntropy/blob/master/CHANGELOG.md'
16
+ 'changelog_uri' => 'https://github.com/digital-fabric/syntropy/blob/master/CHANGELOG.md'
17
17
  }
18
18
  s.rdoc_options = ['--title', 'Extralite', '--main', 'README.md']
19
19
  s.extra_rdoc_files = ['README.md']
data/test/app/api+.rb CHANGED
@@ -1,4 +1,4 @@
1
- class API < Syntropy::RPCAPI
1
+ class API < Syntropy::JSONAPI
2
2
  def initialize(env)
3
3
  super(env)
4
4
  @count = 0
data/test/test_app.rb CHANGED
@@ -104,7 +104,7 @@ class AppTest < Minitest::Test
104
104
  assert_equal 'About', req.response_body.chomp
105
105
 
106
106
  req = make_request(':method' => 'GET', ':path' => '/test/about/foo')
107
- assert_equal '<p>Hello from Markdown</p>', req.response_body.chomp
107
+ assert_equal '<!DOCTYPE html><html><head><title></title></head><body><p>Hello from Markdown</p></body></html>', req.response_body.gsub(/\n/, '')
108
108
 
109
109
  req = make_request(':method' => 'HEAD', ':path' => '/test/about/foo')
110
110
  assert_nil req.response_body
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: syntropy
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.16'
4
+ version: '0.17'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sharon Rosner
@@ -255,13 +255,13 @@ files:
255
255
  - test/test_request_extensions.rb
256
256
  - test/test_routing_tree.rb
257
257
  - test/test_side_run.rb
258
- homepage: https://github.com/noteflakes/syntropy
258
+ homepage: https://github.com/digital-fabric/syntropy
259
259
  licenses:
260
260
  - MIT
261
261
  metadata:
262
- homepage_uri: https://github.com/noteflakes/syntropy
262
+ homepage_uri: https://github.com/digital-fabric/syntropy
263
263
  documentation_uri: https://www.rubydoc.info/gems/syntropy
264
- changelog_uri: https://github.com/noteflakes/syntropy/blob/master/CHANGELOG.md
264
+ changelog_uri: https://github.com/digital-fabric/syntropy/blob/master/CHANGELOG.md
265
265
  rdoc_options:
266
266
  - "--title"
267
267
  - Extralite