sorceress 0.0.1

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: 7fef53eed0fb8ba332a94a6f350de75dbfab3836839e49225f81f1d55630cde5
4
+ data.tar.gz: 8a258587f126a8089cda7bf0f9f5b467c4e292815b81db8b22063cb6bbc3398a
5
+ SHA512:
6
+ metadata.gz: bad804b5783b605d95bcb70b542200ab500e768c1117f5f3c3c2697dc60ade516b0093cc37933cf6a29350e529c076ed9802484e4fa2706aab93accfff02f760
7
+ data.tar.gz: 9ac15ee9c0e490ce887d026dc54c1814ebebcc0b1621c890461b568271e3b1a85cd5c0cfdd81f47d33c05d4ae91e79312d37c659cc3bd109c159e17a4d8d20ac
data/.gitignore ADDED
@@ -0,0 +1,12 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /Gemfile.lock
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+
11
+ # rspec failure tracking
12
+ .rspec_status
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,9 @@
1
+ inherit_gem:
2
+ rubocop_defaults: .rubocop.yml
3
+
4
+ inherit_mode:
5
+ merge:
6
+ - Exclude
7
+
8
+ AllCops:
9
+ TargetRubyVersion: 2.7
data/.travis.yml ADDED
@@ -0,0 +1,29 @@
1
+ ---
2
+ os: osx
3
+ osx_image: xcode11.3
4
+ language: ruby
5
+ cache: bundler
6
+ rvm:
7
+ - 2.2.10
8
+ - 2.3.8
9
+ - 2.4.6
10
+ - 2.5.6
11
+ - 2.6.4
12
+ - 2.7.0
13
+ before_install: gem install bundler -v 2.0.2
14
+
15
+ jobs:
16
+ include:
17
+ - stage: lint
18
+ rvm: 2.6.4
19
+ addons:
20
+ homebrew:
21
+ packages:
22
+ - shellcheck
23
+ script:
24
+ - bundle exec rubocop
25
+ - shellcheck lib/**/*.sh
26
+
27
+ stages:
28
+ - lint
29
+ - test
data/CHANGES.md ADDED
File without changes
data/Gemfile ADDED
@@ -0,0 +1,8 @@
1
+ source 'https://rubygems.org'
2
+ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
3
+
4
+ # Specify your gem's dependencies in sorceress.gemspec
5
+ gemspec
6
+
7
+ gem 'pry'
8
+ gem 'rubocop_defaults', github: 'dvandersluis/rubocop_defaults', branch: 'experimental'
data/README.md ADDED
@@ -0,0 +1,35 @@
1
+ # Sorceress 🧙‍♀️
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/sorceress`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'sorceress'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install sorceress
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ 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 tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/dvandersluis/sorceress.
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task default: :spec
data/bin/console ADDED
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env ruby
2
+ require 'bundler/setup'
3
+ require 'sorceress'
4
+
5
+ # You can add fixtures and/or initialization code here to make experimenting
6
+ # with your gem easier. You can also use a different console, if you like.
7
+
8
+ require 'pry'
9
+ Pry.start
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
data/lib/share/ui.sh ADDED
@@ -0,0 +1,64 @@
1
+ #!/bin/bash
2
+ # shellcheck disable=SC2034
3
+
4
+ NC='\033[0m' # Text Reset
5
+
6
+ # Regular Colors
7
+ Black='\033[0;30m' # Black
8
+ Red='\033[0;31m' # Red
9
+ Green='\033[0;32m' # Green
10
+ Yellow='\033[0;33m' # Yellow
11
+ Blue='\033[0;34m' # Blue
12
+ Purple='\033[0;35m' # Purple
13
+ Cyan='\033[0;36m' # Cyan
14
+ White='\033[0;37m' # White
15
+
16
+ # Bold
17
+ BBlack='\033[1;30m' # Black
18
+ BRed='\033[1;31m' # Red
19
+ BGreen='\033[1;32m' # Green
20
+ BYellow='\033[1;33m' # Yellow
21
+ BBlue='\033[1;34m' # Blue
22
+ BPurple='\033[1;35m' # Purple
23
+ BCyan='\033[1;36m' # Cyan
24
+ BWhite='\033[1;37m' # White
25
+
26
+ cecho(){
27
+ printf "${!1}%s$NC\n" "$2"
28
+ }
29
+
30
+ announce() {
31
+ echo
32
+ cecho BGreen "$1"
33
+ }
34
+
35
+ info() {
36
+ cecho BBlue "$1"
37
+ }
38
+
39
+ warning() {
40
+ cecho BYellow "$1"
41
+ }
42
+
43
+ error() {
44
+ cecho BRed "$1"
45
+ }
46
+
47
+ abort() {
48
+ echo
49
+ error "$1"
50
+ exit 1
51
+ }
52
+
53
+ result() {
54
+ local ret=$?
55
+
56
+ if (( ret == 0 )); then
57
+ local emoji="✅"
58
+ else
59
+ local emoji="❌"
60
+ fi
61
+
62
+ printf "%s\n" "$emoji"
63
+ return $ret
64
+ }
data/lib/sorceress.rb ADDED
@@ -0,0 +1,6 @@
1
+ require 'sorceress/version'
2
+
3
+ require 'sorceress/cli'
4
+
5
+ module Sorceress
6
+ end
@@ -0,0 +1,5 @@
1
+ $LOAD_PATH << File.expand_path('..', __dir__)
2
+ require 'sorceress'
3
+
4
+ cli = Sorceress::CLI.new
5
+ cli.announce('Hello World!')
@@ -0,0 +1,60 @@
1
+ module Sorceress
2
+ class CLI
3
+ module Colors
4
+ RESET = "\e[0m".freeze # Text Reset
5
+
6
+ # Regular Colors
7
+ BLACK = "\e[0;30m".freeze # Black
8
+ RED = "\e[0;31m".freeze # Red
9
+ GREEN = "\e[0;32m".freeze # Green
10
+ YELLOW = "\e[0;33m".freeze # Yellow
11
+ BLUE = "\e[0;34m".freeze # Blue
12
+ PURPLE = "\e[0;35m".freeze # Purple
13
+ CYAN = "\e[0;36m".freeze # Cyan
14
+ WHITE = "\e[0;37m".freeze # White
15
+
16
+ # Bold
17
+ BOLD_BLACK = "\e[1;30m".freeze # Black
18
+ BOLD_RED = "\e[1;31m".freeze # Red
19
+ BOLD_GREEN = "\e[1;32m".freeze # Green
20
+ BOLD_YELLOW = "\e[1;33m".freeze # Yellow
21
+ BOLD_BLUE = "\e[1;34m".freeze # Blue
22
+ BOLD_PURPLE = "\e[1;35m".freeze # Purple
23
+ BOLD_CYAN = "\e[1;36m".freeze # Cyan
24
+ BOLD_WHITE = "\e[1;37m".freeze # White
25
+ end
26
+
27
+ def color(msg, color)
28
+ "#{color}#{msg}#{Colors::RESET}"
29
+ end
30
+
31
+ def announce(msg)
32
+ puts
33
+ puts color(msg, Colors::BOLD_GREEN)
34
+ end
35
+
36
+ def info(msg)
37
+ puts color(msg, Colors::BOLD_BLUE)
38
+ end
39
+
40
+ def warning(msg)
41
+ puts color(msg, Colors::BOLD_YELLOW)
42
+ end
43
+
44
+ def error(msg)
45
+ puts color(msg, Colors::BOLD_RED)
46
+ end
47
+
48
+ def abort(msg)
49
+ puts
50
+ error(msg)
51
+ exit 1
52
+ end
53
+
54
+ def result(val)
55
+ emoji = val ? '✅' : '❌'
56
+ puts emoji
57
+ val
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,3 @@
1
+ module Sorceress
2
+ VERSION = '0.0.1'.freeze
3
+ end
@@ -0,0 +1,20 @@
1
+ #!/bin/bash
2
+
3
+ . lib/share/ui.sh
4
+
5
+ announce 'Determining Prequisites'
6
+
7
+ if [[ "$OSTYPE" != "darwin"* ]]; then
8
+ abort 'Cannot proceed with setup: MacOSX required.'
9
+ fi
10
+
11
+ prerequisites=( ruby curl )
12
+
13
+ for cmd in "${prerequisites[@]}"; do
14
+ printf "$cmd... "
15
+ result $(which $cmd) || err=1
16
+ done
17
+
18
+ if [ $err ]; then
19
+ abort 'Cannot proceed with setup: Please ensure all prerequisites are installed.'
20
+ fi
data/sorceress.gemspec ADDED
@@ -0,0 +1,30 @@
1
+ lib = File.expand_path('lib', __dir__)
2
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
+ require 'sorceress/version'
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = 'sorceress'
7
+ spec.version = Sorceress::VERSION
8
+ spec.authors = ['Daniel Vandersluis']
9
+ spec.email = ['daniel.vandersluis@gmail.com']
10
+
11
+ spec.summary = 'Extensible and configurable setup script'
12
+ spec.homepage = 'https://github.com/dvandersluis/sorceress'
13
+
14
+ spec.metadata['allowed_push_host'] = 'https://www.rubygems.org'
15
+
16
+ spec.metadata['source_code_uri'] = spec.homepage
17
+ spec.metadata['changelog_uri'] = 'https://github.com/dvandersluis/sorceress/CHANGES.md'
18
+
19
+ # Specify which files should be added to the gem when it is released.
20
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
21
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
22
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
23
+ end
24
+ spec.bindir = 'exe'
25
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
26
+ spec.require_paths = ['lib']
27
+
28
+ spec.add_development_dependency 'rake'
29
+ spec.add_development_dependency 'rspec', '~> 3.9'
30
+ end
data/start.sh ADDED
@@ -0,0 +1,5 @@
1
+ #!/bin/bash
2
+
3
+ . lib/spells/install/prerequisites.sh
4
+
5
+ ruby lib/sorceress/boot.rb
metadata ADDED
@@ -0,0 +1,91 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: sorceress
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Daniel Vandersluis
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2020-01-09 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rake
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rspec
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '3.9'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '3.9'
41
+ description:
42
+ email:
43
+ - daniel.vandersluis@gmail.com
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - ".gitignore"
49
+ - ".rspec"
50
+ - ".rubocop.yml"
51
+ - ".travis.yml"
52
+ - CHANGES.md
53
+ - Gemfile
54
+ - README.md
55
+ - Rakefile
56
+ - bin/console
57
+ - bin/setup
58
+ - lib/share/ui.sh
59
+ - lib/sorceress.rb
60
+ - lib/sorceress/boot.rb
61
+ - lib/sorceress/cli.rb
62
+ - lib/sorceress/version.rb
63
+ - lib/spells/install/prerequisites.sh
64
+ - sorceress.gemspec
65
+ - start.sh
66
+ homepage: https://github.com/dvandersluis/sorceress
67
+ licenses: []
68
+ metadata:
69
+ allowed_push_host: https://www.rubygems.org
70
+ source_code_uri: https://github.com/dvandersluis/sorceress
71
+ changelog_uri: https://github.com/dvandersluis/sorceress/CHANGES.md
72
+ post_install_message:
73
+ rdoc_options: []
74
+ require_paths:
75
+ - lib
76
+ required_ruby_version: !ruby/object:Gem::Requirement
77
+ requirements:
78
+ - - ">="
79
+ - !ruby/object:Gem::Version
80
+ version: '0'
81
+ required_rubygems_version: !ruby/object:Gem::Requirement
82
+ requirements:
83
+ - - ">="
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ requirements: []
87
+ rubygems_version: 3.0.6
88
+ signing_key:
89
+ specification_version: 4
90
+ summary: Extensible and configurable setup script
91
+ test_files: []