emerald-package-manager 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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: ebf02cd35622f4e4de55992ab66973b9862fb9b0d13aa38f205b01228c84f75a
4
+ data.tar.gz: 95f6eb41963a16b19cfa40318d39e5a8c6acc46bf2358735bb43710b0d8420af
5
+ SHA512:
6
+ metadata.gz: 31f9e2a4c633a50466f55428ccf8a5c15e7c7e22b404def9a0c59f8c516961bee301bd010fe04b7748709cda7971ba636f3cac5773c835a3470fad7eb370193f
7
+ data.tar.gz: b7e1d0c8ab8a9c2ae6177a17dc9b297461f8ad2a9a230a8687047a673e113d734b084de65000f10e13eacb3122be8d506aec38303d036ea9708ebcf1579c337b
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+ gems/
10
+ .idea/
11
+ Gemfile.lock
data/Gemfile ADDED
@@ -0,0 +1,7 @@
1
+ source 'https://rubygems.org'
2
+ # Specify your gem's dependencies in emerald.gemspec
3
+ gemspec
4
+
5
+ gem 'bundler', '~> 2.1.4'
6
+ gem 'thor', '~> 1.0.1'
7
+ gem "hex_string", "~> 1.0"
@@ -0,0 +1,36 @@
1
+ # Emerald
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/emerald`. 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 'emerald'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle install
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install emerald
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. 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/[USERNAME]/emerald.
36
+
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+ task :default => :spec
data/bin/em ADDED
@@ -0,0 +1,40 @@
1
+ #!/usr/bin/env ruby
2
+ require "thor"
3
+ require 'yaml'
4
+ gem_path="#{File.expand_path("./gems")}"
5
+ ENV["GEM_PATH"]=gem_path
6
+ ENV["GEM_HOME"]=gem_path
7
+ $emerald_spec = YAML.load(File.open("emerald.yml").read)
8
+
9
+
10
+ class CLI < Thor
11
+ desc "install", "install dependencies"
12
+ option :p
13
+ def install()
14
+ install_command="bundler install"
15
+ if options[:p] then
16
+ install_command="bundler add #{options[:p]};"
17
+ end
18
+ system("gem install bundler:2.1.4; #{install_command}")
19
+ end
20
+
21
+ desc "init", "make emerald project"
22
+ def init(gem)
23
+ directory=File.expand_path("./#{gem}")
24
+ system("#{$init_gem_path}echo $GEM_PATH; gem install bundler:2.1.4; bundle gem #{gem} -e")
25
+ if File.readlines("#{directory}/.gitignore").grep(/\ngems/).size == 0
26
+ open("#{directory}/.gitignore", 'a') { |f|
27
+ f.puts "gems/\n"
28
+ }
29
+ end
30
+ end
31
+
32
+ desc "do", "run script"
33
+ def do(script)
34
+ script_string=$emerald_spec['scripts'][script]
35
+ puts(script_string)
36
+ system("#{$init_gem_path}#{script_string}")
37
+ end
38
+
39
+ end
40
+ CLI.start(ARGV)
@@ -0,0 +1,25 @@
1
+
2
+
3
+ Gem::Specification.new do |spec|
4
+ spec.name = "emerald-package-manager"
5
+ spec.version = "0.0.1"
6
+ spec.authors = ["Andrew Schmidt"]
7
+ spec.email = ["Andrew.mkniger@gmail.com"]
8
+
9
+ spec.summary = "npm style project management"
10
+ spec.description = "npm style package manager for ruby"
11
+ spec.homepage = "https://github.com/andrewschmidt-a/emerald"
12
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
13
+
14
+ spec.metadata["homepage_uri"] = spec.homepage
15
+ spec.metadata["source_code_uri"] = spec.homepage
16
+ spec.metadata["changelog_uri"] = "https://github.com/andrewschmidt-a/emerald/main/changelog.md"
17
+
18
+ # Specify which files should be added to the gem when it is released.
19
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
20
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
21
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
22
+ end
23
+ spec.executables = ["em"]
24
+ spec.require_paths = ["bin"]
25
+ end
@@ -0,0 +1,2 @@
1
+ scripts:
2
+ start: ruby ./helloworld.ruby
@@ -0,0 +1,3 @@
1
+
2
+ require 'hex_string'
3
+ puts("hello world".to_hex_string)
metadata ADDED
@@ -0,0 +1,54 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: emerald-package-manager
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Andrew Schmidt
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2020-10-12 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: npm style package manager for ruby
14
+ email:
15
+ - Andrew.mkniger@gmail.com
16
+ executables:
17
+ - em
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - ".gitignore"
22
+ - Gemfile
23
+ - README.md
24
+ - Rakefile
25
+ - bin/em
26
+ - emerald.gemspec
27
+ - emerald.yml
28
+ - helloworld.ruby
29
+ homepage: https://github.com/andrewschmidt-a/emerald
30
+ licenses: []
31
+ metadata:
32
+ homepage_uri: https://github.com/andrewschmidt-a/emerald
33
+ source_code_uri: https://github.com/andrewschmidt-a/emerald
34
+ changelog_uri: https://github.com/andrewschmidt-a/emerald/main/changelog.md
35
+ post_install_message:
36
+ rdoc_options: []
37
+ require_paths:
38
+ - bin
39
+ required_ruby_version: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: 2.3.0
44
+ required_rubygems_version: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
49
+ requirements: []
50
+ rubygems_version: 3.0.3
51
+ signing_key:
52
+ specification_version: 4
53
+ summary: npm style project management
54
+ test_files: []