Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New release #79

Merged
merged 6 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 BidDecimal to gem dependency
bf4 marked this conversation as resolved.
Show resolved Hide resolved
* 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)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

[![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
Loading