Skip to content

Commit

Permalink
Only package essential files in gem release (#146)
Browse files Browse the repository at this point in the history
* Update outdated dependencies

* Update gemspec formatting

This matches what bundler will now generate

* Move development dependencies to Gemfile

* Include instance ZUID in setup script

* Only package essential files in gem release
  • Loading branch information
javierjulio authored Jul 31, 2024
1 parent 856351d commit fd7467a
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 38 deletions.
2 changes: 1 addition & 1 deletion .env.sample
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
EMAIL="YOUR_EMAIL"
PASSWORD="YOUR_PASSWORD"
INSTANCE_ZUID=""
INSTANCE_ZUID="YOUR_INSTANCE_ZUID"
MODEL_ZUID=""
7 changes: 7 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ source "https://rubygems.org"
# Specify your gem's dependencies in zesty.gemspec
gemspec

gem "rake"
gem "dotenv"
gem "rspec"
gem "rspec-json_expectations"
gem "vcr"
gem "webmock"

group :test do
gem "simplecov", require: false
gem "simplecov-cobertura"
Expand Down
15 changes: 5 additions & 10 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ GEM
rexml
diff-lcs (1.5.1)
docile (1.4.1)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
domain_name (0.6.20240107)
dotenv (3.1.2)
ffi (1.17.0)
ffi-compiler (1.3.2)
Expand All @@ -36,7 +35,7 @@ GEM
llhttp-ffi (0.5.0)
ffi-compiler (~> 1.0)
rake (~> 13.0)
public_suffix (6.0.0)
public_suffix (6.0.1)
rake (13.2.1)
rexml (3.3.2)
strscan
Expand Down Expand Up @@ -64,9 +63,6 @@ GEM
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.4)
strscan (3.1.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.9.1)
vcr (6.2.0)
webmock (3.23.1)
addressable (>= 2.8.0)
Expand All @@ -77,10 +73,9 @@ PLATFORMS
ruby

DEPENDENCIES
bundler (~> 2.0)
dotenv
rake (~> 13.0)
rspec (~> 3.0)
rake
rspec
rspec-json_expectations
simplecov
simplecov-cobertura
Expand All @@ -89,4 +84,4 @@ DEPENDENCIES
zesty!

BUNDLED WITH
2.3.10
2.5.13
2 changes: 2 additions & 0 deletions bin/setup
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ bundle install
echo "Enter your Zesty account credentials below."
read -p 'Email: ' email
read -p 'Password: ' password
read -p 'Instance ZUID: ' instance_zuid

cp .env.sample .env
sed -i '' -e "s/YOUR_EMAIL/$email/g" .env
sed -i '' -e "s/YOUR_PASSWORD/$password/g" .env
sed -i '' -e "s/YOUR_INSTANCE_ZUID/$instance_zuid/g" .env
37 changes: 10 additions & 27 deletions zesty.gemspec
Original file line number Diff line number Diff line change
@@ -1,43 +1,26 @@
lib = File.expand_path("lib", __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require "zesty/version"
require_relative "lib/zesty/version"

Gem::Specification.new do |spec|
spec.name = "zesty"
spec.version = Zesty::VERSION
spec.authors = ["Javier Julio"]
spec.email = ["[email protected]"]
spec.name = "zesty"
spec.version = Zesty::VERSION
spec.authors = ["Javier Julio"]
spec.email = ["[email protected]"]

spec.summary = %q{A Ruby interface to the Zesty.io API}
spec.description = %q{A Ruby interface to the Zesty.io API}
spec.homepage = "https://github.com/jackpocket/zesty-rb"
spec.license = "MIT"

# spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
spec.summary = "A Ruby interface to the Zesty.io API"
spec.description = "A Ruby interface to the Zesty.io API. Not all API actions are supported."
spec.homepage = "https://github.com/jackpocket/zesty-rb"
spec.license = "MIT"

spec.metadata["homepage_uri"] = spec.homepage
spec.metadata["source_code_uri"] = spec.homepage
spec.metadata["changelog_uri"] = "https://github.com/jackpocket/zesty-rb/blob/master/CHANGELOG.md"
spec.metadata["bug_tracker_uri"] = "https://github.com/jackpocket/zesty-rb/issues"

# Specify which files should be added to the gem when it is released.
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
end
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.files = Dir["README.md", "LICENSE*", "lib/**/*.rb"]
spec.require_paths = ["lib"]

spec.required_ruby_version = ">= 2.5.0"

spec.add_dependency "http", ">= 4", "< 6"

spec.add_development_dependency "bundler", "~> 2.0"
spec.add_development_dependency "rake", "~> 13.0"
spec.add_development_dependency "rspec", "~> 3.0"
spec.add_development_dependency "rspec-json_expectations"
spec.add_development_dependency "dotenv"
spec.add_development_dependency "vcr"
spec.add_development_dependency "webmock"
end

0 comments on commit fd7467a

Please sign in to comment.