Skip to content

Commit

Permalink
New release (#79)
Browse files Browse the repository at this point in the history
* Require the version by default
* Update History
* Update Readme to have more recent information
* Update gemspec to use common metadata and minimum Ruby version
* Bump version number for new release
  • Loading branch information
kiskoza authored Jan 29, 2024
1 parent 579524f commit 5022ba5
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 27 deletions.
11 changes: 10 additions & 1 deletion History
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
== 0.4.6 2024-01-29

* minor patches
* Ruby 3.1, 3.2, 3.3 support
* Ship LICENSE file
* Add BigDecimal to gem dependency
* Move CI to Github Actions
* Fix parse issue with consecutive dates

== 0.4.5 2020-12-26

* 1 minor patch
Expand Down Expand Up @@ -28,7 +37,7 @@
* 2 minor patches
* Correct unnormalization of attribute values (der-flo)
* Fix error in parsing YAML in the case where a hash value ends with backslashes, and there are subsequent values in the hash (deadprogrammer)

== 0.1.1 2009-03-31
* 1 minor patch
* Parsing empty or blank xml now returns empty hash instead of raising error.
Expand Down
21 changes: 9 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
# crack

[![Build Status](https://travis-ci.org/jnunemaker/crack.svg?branch=master)](https://travis-ci.org/jnunemaker/crack)
[![Test](https://github.com/jnunemaker/crack/actions/workflows/test.yml/badge.svg)](https://github.com/jnunemaker/crack/actions/workflows/test.yml)
[![Gem Version](https://badge.fury.io/rb/crack.svg)](https://badge.fury.io/rb/crack)
![downloads](https://img.shields.io/gem/dt/crack?label=downloads)

Really simple JSON and XML parsing, ripped from Merb and Rails. The XML parser is ripped from Merb and the JSON parser is ripped from Rails. I take no credit, just packaged them for all to enjoy and easily use.

## compatibility

* ruby 1.8.7
* ruby 1.9+ (3 failures related to time parsing, would love it if someone could figure them out)
* Ruby 2.x
* Ruby 3.x

## note on patches/pull requests

* Fork the project.
* Make your feature addition or bug fix.
* Add tests for it. This is important so I don't break it in a future version unintentionally.
* `script/test` - this will bootstrap and run the tests
* Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself in another branch so I can ignore when I pull)
* Send me a pull request. Bonus points for topic branches.
* Run the tests with `rake test`
* Open a Pull Request with the changes

## usage

```ruby
gem 'crack' # in Gemfile
require 'crack' # for xml and json
Expand All @@ -28,7 +29,7 @@ require 'crack/xml' # for just xml
```

## examples

```ruby
Crack::XML.parse("<tag>This is the contents</tag>")
# => {'tag' => 'This is the contents'}
Expand All @@ -40,7 +41,3 @@ Crack::JSON.parse('{"tag":"This is the contents"}')
## Copyright

Copyright (c) 2009 John Nunemaker. See LICENSE for details.

## Docs

http://rdoc.info/projects/jnunemaker/crack
36 changes: 23 additions & 13 deletions crack.gemspec
Original file line number Diff line number Diff line change
@@ -1,20 +1,30 @@
# -*- encoding: utf-8 -*-
require File.expand_path('../lib/crack/version', __FILE__)
# frozen_string_literal: true

require File.expand_path('lib/crack/version', __dir__)

Gem::Specification.new do |gem|
gem.authors = ["John Nunemaker"]
gem.email = ["[email protected]"]
gem.description = %q{Really simple JSON and XML parsing, ripped from Merb and Rails.}
gem.summary = %q{Really simple JSON and XML parsing, ripped from Merb and Rails.}
gem.homepage = "https://github.com/jnunemaker/crack"
gem.authors = ['John Nunemaker']
gem.email = ['[email protected]']
gem.description = 'Really simple JSON and XML parsing, ripped from Merb and Rails.'
gem.summary = 'Really simple JSON and XML parsing, ripped from Merb and Rails.'
gem.homepage = 'https://github.com/jnunemaker/crack'

gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
gem.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
gem.files = `git ls-files -- lib/* LICENSE README.md History`.split("\n")
gem.name = "crack"
gem.require_paths = ["lib"]
gem.name = 'crack'
gem.require_paths = ['lib']
gem.version = Crack::VERSION
gem.license = "MIT"
gem.license = 'MIT'

gem.metadata = {
'bug_tracker_uri' => 'https://github.com/jnunemaker/crack/issues',
'changelog_uri' => 'https://github.com/jnunemaker/crack/blob/master/History',
'source_code_uri' => 'https://github.com/jnunemaker/crack',
'rubygems_mfa_required' => 'true'
}

gem.required_ruby_version = '>= 2.0'

gem.add_runtime_dependency("bigdecimal")
gem.add_runtime_dependency("rexml")
gem.add_runtime_dependency('bigdecimal')
gem.add_runtime_dependency('rexml')
end
1 change: 1 addition & 0 deletions lib/crack.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module Crack
class ParseError < StandardError; end
end

require 'crack/version'
require 'crack/util'
require 'crack/json'
require 'crack/xml'
2 changes: 1 addition & 1 deletion lib/crack/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Crack
VERSION = "0.4.5"
VERSION = "0.4.6"
end

0 comments on commit 5022ba5

Please sign in to comment.