Commit 1444fd2e authored by Stefano Rivera's avatar Stefano Rivera

New upstream version 0.12.1

parent 41acd74e
version: 2
jobs:
build:
working_directory: ~/iso8601
docker:
- image: circleci/ruby:2.4.1
environment:
TESTOPTS: "--ci-dir=/tmp/test-results"
steps:
- checkout
# Restore bundle cache
- type: cache-restore
key: iso8601-{{ checksum "Gemfile.lock" }}
# Bundle install dependencies
- run: bundle install --path vendor/bundle
# Store bundle cache
- type: cache-save
key: iso8601-{{ checksum "Gemfile.lock" }}
paths:
- vendor/bundle
# Run minitest
- type: shell
command: bundle exec rspec
# Save artifacts
- type: store_test_results
path: /tmp/test-results
.git
.editorconfig
.rubocop.yml
.travis.yml
.vagrant
.yardoc
pkg
.bundle
bundle
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
[Makefile]
indent_style = tab
# system crap
.DS_Store
.*.swp
# development side effects
.vagrant
sandbox
# files created by running the specs
tmp
# built gems
pkg
*.gem
Gemfile.lock
# documentation
.yardoc
doc
bundle
.bundle
AllCops:
Exclude:
- bundle/vendors/**/*
Documentation:
Enabled: false
Lint/UselessComparison:
Enabled: false
Metrics/ClassLength:
Max: 150
# Work in progress
Metrics/LineLength:
Max: 183
# Work in progress
Metrics/MethodLength:
Max: 24
# Work in progress
Metrics/PerceivedComplexity:
Max: 8
Style/NumericLiterals:
MinDigits: 10
Style/StringLiterals:
Enabled: false
Style/Encoding:
EnforcedStyle: when_needed
Style/BracesAroundHashParameters:
EnforcedStyle: braces
Metrics/BlockLength:
Exclude:
- spec/**/*
sudo: false
language: ruby
rvm:
- 2.5.0
- 2.4.0
- ruby-head
- jruby-19mode
script: bundle exec rspec spec
## 0.12.1
* Reduce the number of files that ship in the artifact (thanks @tas50).
## 0.12.0
* Fix `Months#to_seconds` from November (thanks @walterbrebels).
......
# Contributor Code of Conduct
As contributors and maintainers of this project, and in the interest of
fostering an open and welcoming community, we pledge to respect all people who
contribute through reporting issues, posting feature requests, updating
documentation, submitting pull requests or patches, and other activities.
We are committed to making participation in this project a harassment-free
experience for everyone, regardless of level of experience, gender, gender
identity and expression, sexual orientation, disability, personal appearance,
body size, race, ethnicity, age, religion, or nationality.
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery
* Personal attacks
* Trolling or insulting/derogatory comments
* Public or private harassment
* Publishing other's private information, such as physical or electronic
addresses, without explicit permission
* Other unethical or unprofessional conduct
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
By adopting this Code of Conduct, project maintainers commit themselves to
fairly and consistently applying these principles to every aspect of managing
this project. Project maintainers who do not follow or enforce the Code of
Conduct may be permanently removed from the project team.
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community.
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting a project maintainer at asiches+iso8601@gmail.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. Maintainers are
obligated to maintain confidentiality with regard to the reporter of an
incident.
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 1.3.0, available at https://www.contributor-covenant.org/version/1/3/0/code-of-conduct.html
[homepage]: https://www.contributor-covenant.org
FROM ruby:2.5-slim
MAINTAINER Arnau Siches <asiches@gmail.com>
RUN mkdir -p /usr/src/iso8601
WORKDIR /usr/src/iso8601
COPY . /usr/src/iso8601
RUN bundle install
CMD ["bundle", "exec", "rspec"]
FROM jruby:9
MAINTAINER Arnau Siches <asiches@gmail.com>
RUN mkdir -p /usr/src/iso8601
WORKDIR /usr/src/iso8601
COPY . /usr/src/iso8601
RUN bundle install
CMD ["bundle", "exec", "rspec"]
EXTERNAL_PATH ?= $(PWD)
GEM_CREDENTIALS ?= $(HOME)/.gem/credentials
VERSION ?= $(shell $(CAT) $(EXTERNAL_PATH)/lib/iso8601/version.rb \
| $(GREP) VERSION \
| $(AWK) '{print $$3}' \
| $(TR) -d \')
AWK ?= awk
CAT ?= cat
DOCKER ?= docker
DOCKER_TASK ?= $(DOCKER) run --rm -it
GIT ?= git
GREP ?= grep
TR ?= tr
image_name = arnau/iso8601
internal_path = /usr/src/iso8601
volumes = -v $(EXTERNAL_PATH):$(internal_path) \
-v $(GEM_CREDENTIALS):/root/.gem/credentials
default: build
include mk/*.mk
test: mri-test jruby-test
install: mri-pull jruby-pull
clean: mri-clean jruby-clean
build: mri-build jruby-build
doc: mri-doc
repl: mri-repl
shell: mri-shell
check: mri-check
local-install:
bundle install --path bundle/vendors
......@@ -17,49 +17,11 @@ Gem::Specification.new do |s|
DESC
s.license = 'MIT'
s.rubyforge_project = 'iso8601'
s.files = %w[CHANGELOG.md
CONTRIBUTING.md
Gemfile
LICENSE
README.md
Rakefile
iso8601.gemspec
docs/date-time.md
docs/duration.md
docs/time-interval.md
lib/iso8601.rb
lib/iso8601/atomic.rb
lib/iso8601/date.rb
lib/iso8601/date_time.rb
lib/iso8601/days.rb
lib/iso8601/duration.rb
lib/iso8601/errors.rb
lib/iso8601/hours.rb
lib/iso8601/minutes.rb
lib/iso8601/months.rb
lib/iso8601/seconds.rb
lib/iso8601/time.rb
lib/iso8601/time_interval.rb
lib/iso8601/version.rb
lib/iso8601/weeks.rb
lib/iso8601/years.rb
spec/iso8601/date_spec.rb
spec/iso8601/date_time_spec.rb
spec/iso8601/days_spec.rb
spec/iso8601/duration_spec.rb
spec/iso8601/hours_spec.rb
spec/iso8601/minutes_spec.rb
spec/iso8601/months_spec.rb
spec/iso8601/seconds_spec.rb
spec/iso8601/time_interval_spec.rb
spec/iso8601/time_spec.rb
spec/iso8601/weeks_spec.rb
spec/iso8601/years_spec.rb
spec/spec_helper.rb]
s.test_files = s.files.grep(%r{^spec/})
s.files = %w{LICENSE README.md CONTRIBUTING.md} + `git ls-files`.split("\n").select { |f| f =~ %r{^(?:lib/)}i }
s.test_files = %w{Rakefile iso8601.gemspec Gemfile} + `git ls-files`.split("\n").select { |f| f =~ %r{^(?:specs/)}i }
s.require_paths = ['lib']
s.has_rdoc = 'yard'
s.metadata["yard.run"] = "yri"
s.required_ruby_version = '>= 2.0.0'
s.add_development_dependency 'rspec', '~> 3.6'
s.add_development_dependency 'rubocop', '~> 0.50'
......
module ISO8601
##
# The gem version
VERSION = '0.12.0'.freeze
VERSION = '0.12.1'.freeze
end
jruby_image_name = $(image_name):jruby-9
##
# Run unit tests
jruby-test:
@$(call jruby-task)
##
# Rubocop offence check
jruby-check:
@$(call jruby-task, bundle exec rubocop lib spec)
##
# Open Ruby repl
jruby-repl:
@$(call jruby-task, pry -r $(internal_path)/lib/iso8601)
jruby-shell:
@$(call jruby-task, bash)
##
# Build docker image
jruby-build:
@$(DOCKER) build -t $(jruby_image_name) -f Dockerfile.jruby .
jruby-clean:
@$(DOCKER) rmi $(jruby_image_name)
jruby-push:
@$(DOCKER) push $(jruby_image_name)
jruby-pull:
@$(DOCKER) pull $(jruby_image_name)
define jruby-task
$(DOCKER_TASK) $(volumes) $(jruby_image_name) $1
endef
mri_image_name = $(image_name):mri-2.3
##
# Run unit tests
mri-test:
@$(call mri-task)
##
# Rubocop offence check
mri-check:
@$(call mri-task, bundle exec rubocop lib spec)
##
# Open Ruby repl
mri-repl:
@$(call mri-task, pry -r $(internal_path)/lib/iso8601)
mri-shell:
@$(call mri-task, bash)
mri-doc:
@$(call mri-task, bundle exec yardoc)
mri-update:
@$(call mri-task, bundle update)
##
# Build docker image
mri-build:
@$(DOCKER) build -t $(mri_image_name) -f Dockerfile .
mri-clean:
@$(DOCKER) rmi $(mri_image_name)
mri-push:
@$(DOCKER) push $(mri_image_name)
mri-pull:
@$(DOCKER) pull $(mri_image_name)
define mri-task
$(DOCKER_TASK) $(volumes) $(mri_image_name) $1
endef
###############################################################################
# All release operations rely on MRI #
###############################################################################
##
# Release gem to Rubygems. VERSION required.
release: gem-build gem-push git-tag
##
# Build gem file
gem-build:
@$(call mri-task, rake build)
##
# Push gem file to Rubygems
gem-push:
@$(call mri-task, gem push $(internal_path)/pkg/iso8601-$(VERSION).gem)
##
# Tag version to git
git-tag:
@$(GIT) tag v$(VERSION)
version:
@echo "$(VERSION)"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment