redirectly 0.1.2 → 0.2.0

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: d11d303417a59a9ef3a9fd2c970233c31d2810ae52ca945600bd42ee129c8d5a
4
- data.tar.gz: 82076365bdb96e6486a099573155fba968ddf2d6a03a6b1547d72afcb903bf7f
3
+ metadata.gz: dee36588a0b7625818f348fdaa4afefa27e0f16c1987a5656dd70397114d4989
4
+ data.tar.gz: 3e6a9704b9cfd7730d13d84002add38e2d350b6409176833d8861e7e3489f567
5
5
  SHA512:
6
- metadata.gz: 8edef52f11f59f8f06cd76b36e9d7d8e293620f8e49c94183895c643c74d2d399b228a3a4b39b713e0cbc3b8d7a4e33aaeaac6c6b5e8ceac3f831b1642e6cb7a
7
- data.tar.gz: 95cbace8f96efe12fa38f08347fd4565b7ab68c798829bcf39bd0919d2f99906a218474c73867fce9d726ebe8ca0fa0e7d0f5d24d5dcca17a4ceaa966ec56633
6
+ metadata.gz: 205afe31c98f93b7269f95fc6ebac5729c5070107547e5ff8d160ed5de742f67e633c14ab7072bf5328b9bc4968fa73b0bbca7a9e520b747b63d49409c5b2678
7
+ data.tar.gz: 7115a8ae99fb4a59b18a198851f10266035504f9473aa06cf85dd8ef26b5fd9723990d957b2263a628405f504a90fff8125a54acfe61b192c0697eba0fdc47b0
data/README.md CHANGED
@@ -64,7 +64,7 @@ $ redirectly --init
64
64
  $ redirectly
65
65
 
66
66
  # In another terminal, access the server using one of the configured rules
67
- $ curl -v something.lvh.me:3000
67
+ $ curl -v something.localhost:3000
68
68
  ```
69
69
 
70
70
  You should receive a redirect header:
@@ -94,7 +94,7 @@ example.com = https://other-site.com/
94
94
  *.mygoogle.com/:anything = https://google.com/?q=%{anything}
95
95
  example.org/* = https://other-site.com/
96
96
  *.old-site.com = !https://permanent.redirect.com
97
- :sub.lvh.me/* = http://it-works.com/%{sub}
97
+ :sub.app.localhost/* = http://it-works.com/%{sub}
98
98
  ```
99
99
 
100
100
  For additional server options, see:
@@ -33,11 +33,11 @@ module Redirectly
33
33
  target = target[1..]
34
34
  end
35
35
 
36
- [code, { 'Location' => target }, []]
36
+ [code, { 'location' => target }, []]
37
37
  end
38
38
 
39
39
  def not_found
40
- [404, { 'Content-Type' => 'text/plain' }, ['Not Found']]
40
+ [404, { 'content-type' => 'text/plain' }, ['Not Found']]
41
41
  end
42
42
 
43
43
  def redirects
@@ -1,5 +1,6 @@
1
1
  require 'colsole'
2
2
  require 'mister_bin'
3
+ require 'rackup'
3
4
 
4
5
  module Redirectly
5
6
  class Command < MisterBin::Command
@@ -42,14 +43,14 @@ module Redirectly
42
43
  *.mygoogle.com/:anything = https://google.com/?q=%{anything}
43
44
  example.org/* = https://other-site.com/
44
45
  *.old-site.com = !https://permanent.redirect.com
45
- :sub.lvh.me/* = http://it-works.com/%{sub}
46
+ :sub.app.localhost/* = http://it-works.com/%{sub}
46
47
  TEMPLATE
47
48
  end
48
49
 
49
50
  def start_server
50
51
  raise ArgumentError, "Cannot find config file #{config_path}" unless File.exist? config_path
51
52
 
52
- Rack::Server.start(app: app, Port: port, environment: 'production')
53
+ Rackup::Server.start(app: app, Port: port, environment: 'production')
53
54
  end
54
55
 
55
56
  def app
@@ -1,3 +1,3 @@
1
1
  module Redirectly
2
- VERSION = '0.1.2'
2
+ VERSION = '0.2.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redirectly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danny Ben Shitrit
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-19 00:00:00.000000000 Z
11
+ date: 2024-02-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mister_bin
@@ -70,14 +70,28 @@ dependencies:
70
70
  requirements:
71
71
  - - "~>"
72
72
  - !ruby/object:Gem::Version
73
- version: '2.2'
73
+ version: '3.0'
74
74
  type: :runtime
75
75
  prerelease: false
76
76
  version_requirements: !ruby/object:Gem::Requirement
77
77
  requirements:
78
78
  - - "~>"
79
79
  - !ruby/object:Gem::Version
80
- version: '2.2'
80
+ version: '3.0'
81
+ - !ruby/object:Gem::Dependency
82
+ name: rackup
83
+ requirement: !ruby/object:Gem::Requirement
84
+ requirements:
85
+ - - "~>"
86
+ - !ruby/object:Gem::Version
87
+ version: '2.1'
88
+ type: :runtime
89
+ prerelease: false
90
+ version_requirements: !ruby/object:Gem::Requirement
91
+ requirements:
92
+ - - "~>"
93
+ - !ruby/object:Gem::Version
94
+ version: '2.1'
81
95
  description: Redirect server with dynamic URL and hostname support
82
96
  email: db@dannyben.com
83
97
  executables:
@@ -100,7 +114,7 @@ metadata:
100
114
  bug_tracker_uri: https://github.com/DannyBen/redirectly/issues
101
115
  source_code_uri: https://github.com/dannyben/redirectly
102
116
  rubygems_mfa_required: 'true'
103
- post_install_message:
117
+ post_install_message:
104
118
  rdoc_options: []
105
119
  require_paths:
106
120
  - lib
@@ -108,15 +122,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
108
122
  requirements:
109
123
  - - ">="
110
124
  - !ruby/object:Gem::Version
111
- version: 2.6.0
125
+ version: '3.0'
112
126
  required_rubygems_version: !ruby/object:Gem::Requirement
113
127
  requirements:
114
128
  - - ">="
115
129
  - !ruby/object:Gem::Version
116
130
  version: '0'
117
131
  requirements: []
118
- rubygems_version: 3.4.8
119
- signing_key:
132
+ rubygems_version: 3.5.6
133
+ signing_key:
120
134
  specification_version: 4
121
135
  summary: Redirectly redirect server
122
136
  test_files: []