angie 0.1.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: 04d02314fd63907858ccdde72e07c1c5bec01a4b71565528074d9a94677c71e0
4
+ data.tar.gz: 7a0c6bd546a6172efc2fbeda9ae4f4bdac8cb32541215ce8f81b2409a5408acb
5
+ SHA512:
6
+ metadata.gz: b7bec2567713bbf967f64726390004f12c130be5f68601db4eafc869e27d11cc2ff53cb3f783b75dfadb181572d1b8cd74639bcd5b227819c0ce1f7dc952db3c
7
+ data.tar.gz: 9c6ac74b183da8fc84c819fd18e9223b4e0215f25899feca0351f5e9151c8a8b23b4a81844c2cff78583ab2e993ab2c752091d0957edb63548480e453b0168f2
data/.rubocop.yml ADDED
@@ -0,0 +1,13 @@
1
+ AllCops:
2
+ TargetRubyVersion: 2.6
3
+
4
+ Style/StringLiterals:
5
+ Enabled: true
6
+ EnforcedStyle: double_quotes
7
+
8
+ Style/StringLiteralsInInterpolation:
9
+ Enabled: true
10
+ EnforcedStyle: double_quotes
11
+
12
+ Layout/LineLength:
13
+ Max: 120
data/Gemfile ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in angie.gemspec
6
+ gemspec
7
+
8
+ gem "rake", "~> 13.0"
9
+
10
+ gem "minitest", "~> 5.0"
11
+
12
+ gem "rubocop", "~> 1.21"
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2025 creadone
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
13
+ all 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
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,73 @@
1
+ # Angie
2
+
3
+ A DSL for generating configuration files for the web server [Angie](https://angie.software/) (formerly known as Nginx)
4
+
5
+ ## Installation
6
+
7
+ ```
8
+ gem install angie
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```ruby
14
+ config = Angie::DSL.new do
15
+ worker_processes 4
16
+
17
+ events do
18
+ worker_connections 1024
19
+ end
20
+
21
+ http do
22
+ server do
23
+ listen 80
24
+ server_name "example.com"
25
+
26
+ location "/" do
27
+ root "/var/www/html"
28
+ index "index.html"
29
+ end
30
+
31
+ location "/images/" do
32
+ root "/var/www/images"
33
+ end
34
+ end
35
+ end
36
+ end
37
+
38
+ puts config.to_s
39
+ ```
40
+
41
+ ```nginx
42
+ worker_processes 4;
43
+ events {
44
+ worker_connections 1024;
45
+ }
46
+ http {
47
+ server {
48
+ listen 80;
49
+ server_name example.com;
50
+ location {
51
+ root /var/www/html;
52
+ index index.html;
53
+ }
54
+ location {
55
+ root /var/www/images;
56
+ }
57
+ }
58
+ }
59
+ ```
60
+
61
+ ## Development
62
+
63
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
64
+
65
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
66
+
67
+ ## Contributing
68
+
69
+ Bug reports and pull requests are welcome on GitHub at https://github.com/creadone/angie.
70
+
71
+ ## License
72
+
73
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rake/testtask"
5
+
6
+ Rake::TestTask.new(:test) do |t|
7
+ t.libs << "test"
8
+ t.libs << "lib"
9
+ t.test_files = FileList["test/**/test_*.rb"]
10
+ end
11
+
12
+ require "rubocop/rake_task"
13
+
14
+ RuboCop::RakeTask.new
15
+
16
+ task default: %i[test rubocop]
data/angie.gemspec ADDED
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/angie/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "angie"
7
+ spec.version = Angie::VERSION
8
+ spec.authors = ["creadone"]
9
+ spec.email = ["creadone@gmail.com"]
10
+
11
+ spec.summary = "A DSL for generating configuration files for the web server Angie (formerly known as Nginx)"
12
+ spec.description = spec.summary
13
+ spec.homepage = "https://github.com/creadone/angie"
14
+ spec.license = "MIT"
15
+ spec.required_ruby_version = ">= 2.6.0"
16
+
17
+ spec.metadata["allowed_push_host"] = "https://rubygems.org"
18
+
19
+ spec.metadata["homepage_uri"] = spec.homepage
20
+ spec.metadata["source_code_uri"] = "https://github.com/creadone/angie"
21
+
22
+ # Specify which files should be added to the gem when it is released.
23
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
24
+ spec.files = Dir.chdir(__dir__) do
25
+ `git ls-files -z`.split("\x0").reject do |f|
26
+ (File.expand_path(f) == __FILE__) || f.start_with?(*%w[bin/ test/ spec/ features/ .git .circleci appveyor])
27
+ end
28
+ end
29
+ spec.bindir = "exe"
30
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
31
+ spec.require_paths = ["lib"]
32
+
33
+ # Uncomment to register a new dependency of your gem
34
+ # spec.add_dependency "example-gem", "~> 1.0"
35
+
36
+ # For more information and examples about making a new gem, check out our
37
+ # guide at: https://bundler.io/guides/creating_gem.html
38
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Angie
4
+ VERSION = "0.1.0"
5
+ end
data/lib/angie.rb ADDED
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "angie/version"
4
+ require_relative "angie/dsl"
data/sig/angie.rbs ADDED
@@ -0,0 +1,4 @@
1
+ module Angie
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
metadata ADDED
@@ -0,0 +1,57 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: angie
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - creadone
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2025-01-05 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: A DSL for generating configuration files for the web server Angie (formerly
14
+ known as Nginx)
15
+ email:
16
+ - creadone@gmail.com
17
+ executables: []
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - ".rubocop.yml"
22
+ - Gemfile
23
+ - LICENSE.txt
24
+ - README.md
25
+ - Rakefile
26
+ - angie.gemspec
27
+ - lib/angie.rb
28
+ - lib/angie/version.rb
29
+ - sig/angie.rbs
30
+ homepage: https://github.com/creadone/angie
31
+ licenses:
32
+ - MIT
33
+ metadata:
34
+ allowed_push_host: https://rubygems.org
35
+ homepage_uri: https://github.com/creadone/angie
36
+ source_code_uri: https://github.com/creadone/angie
37
+ post_install_message:
38
+ rdoc_options: []
39
+ require_paths:
40
+ - lib
41
+ required_ruby_version: !ruby/object:Gem::Requirement
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ version: 2.6.0
46
+ required_rubygems_version: !ruby/object:Gem::Requirement
47
+ requirements:
48
+ - - ">="
49
+ - !ruby/object:Gem::Version
50
+ version: '0'
51
+ requirements: []
52
+ rubygems_version: 3.3.7
53
+ signing_key:
54
+ specification_version: 4
55
+ summary: A DSL for generating configuration files for the web server Angie (formerly
56
+ known as Nginx)
57
+ test_files: []