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

Rename library to openscap_results_parser #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# docker build . -t openscap_parser # build the container image
# docker run -itv $PWD:/app:z openscap_parser rake # run tests
# docker run -itv $PWD:/app:z openscap_parser pry --gem # console
# docker build . -t openscap_results_parser # build the container image
# docker run -itv $PWD:/app:z openscap_results_parser rake # run tests
# docker run -itv $PWD:/app:z openscap_results_parser pry --gem # console

FROM ruby:2.5

Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
source "https://rubygems.org"

# Specify your gem's dependencies in openscap_parser.gemspec
# Specify your gem's dependencies in openscap_results_parser.gemspec
gemspec
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# OpenscapParser
# Openscap Results Parser

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/openscap_parser`. To experiment with that code, run `bin/console` for an interactive prompt.
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/openscap_results_parser`. To experiment with that code, run `bin/console` for an interactive prompt.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'openscap_parser'
gem 'openscap_results_parser'
```

And then execute:
Expand All @@ -16,7 +16,7 @@ And then execute:

Or install it yourself as:

$ gem install openscap_parser
$ gem install openscap_results_parser

## Usage

Expand Down Expand Up @@ -58,19 +58,19 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
A Dockerfile is provided to allow a containerized development environment:

```
docker build . -t openscap_parser # build the container image
docker run -itv $PWD:/app:z openscap_parser rake # run tests
docker run -itv $PWD:/app:z openscap_parser pry --gem # console
docker build . -t openscap_results_parser # build the container image
docker run -itv $PWD:/app:z openscap_results_parser rake # run tests
docker run -itv $PWD:/app:z openscap_results_parser pry --gem # console
```

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/elobato/openscap_parser. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
Bug reports and pull requests are welcome on GitHub at https://github.com/elobato/openscap_results_parser. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.

## License

The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).

## Code of Conduct

Everyone interacting in the OpenscapParser project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/elobato/openscap_parser/blob/master/CODE_OF_CONDUCT.md).
Everyone interacting in the OpenscapParser project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/elobato/openscap_results_parser/blob/master/CODE_OF_CONDUCT.md).
2 changes: 1 addition & 1 deletion bin/console
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env ruby

require "bundler/setup"
require "openscap_parser"
require "openscap_results_parser"

# You can add fixtures and/or initialization code here to make experimenting
# with your gem easier. You can also use a different console, if you like.
Expand Down
22 changes: 0 additions & 22 deletions lib/openscap_parser.rb

This file was deleted.

22 changes: 22 additions & 0 deletions lib/openscap_results_parser.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# frozen_string_literal: true

require 'openscap_results_parser/version'
require 'openscap_results_parser/util'
require 'openscap_results_parser/benchmarks'
require 'openscap_results_parser/test_results'
require 'openscap_results_parser/profiles'
require 'openscap_results_parser/rules'
require 'openscap_results_parser/rule_results'
require 'openscap_results_parser/tailorings'

require 'openscap_results_parser/xml_file'
require 'openscap_results_parser/datastream_file'
require 'openscap_results_parser/test_result_file'
require 'openscap_results_parser/tailoring_file'

require 'date'
require 'railtie' if defined?(Rails)

module OpenscapParser
class Error < StandardError; end
end
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# frozen_string_literal: true

require 'openscap_parser/util'
require 'openscap_parser/xml_file'
require 'openscap_parser/rules'
require 'openscap_parser/profiles'
require 'openscap_parser/rule_references'
require 'openscap_results_parser/util'
require 'openscap_results_parser/xml_file'
require 'openscap_results_parser/rules'
require 'openscap_results_parser/profiles'
require 'openscap_results_parser/rule_references'

# Mimics openscap-ruby Benchmark interface
module OpenscapParser
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

require 'openscap_parser/benchmark'
require 'openscap_results_parser/benchmark'

module OpenscapParser
# Methods related to saving profiles and finding which hosts
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true
require 'openscap_parser/xml_file'
require 'openscap_parser/benchmarks'
require 'openscap_results_parser/xml_file'
require 'openscap_results_parser/benchmarks'

module OpenscapParser
# A class to represent a datastream (-ds.xml) XmlFile
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

require 'openscap_parser/profile'
require 'openscap_results_parser/profile'

module OpenscapParser
# Methods related to saving profiles and finding which hosts
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# frozen_string_literal: true

require 'openscap_parser/rule_identifier'
require 'openscap_parser/rule_references'
require 'openscap_parser/xml_file'
require 'openscap_results_parser/rule_identifier'
require 'openscap_results_parser/rule_references'
require 'openscap_results_parser/xml_file'

# Mimics openscap-ruby Rule interface
module OpenscapParser
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

require 'openscap_parser/xml_file'
require 'openscap_parser/rule_reference'
require 'openscap_results_parser/xml_file'
require 'openscap_results_parser/rule_reference'

module OpenscapParser
# Methods related to finding and saving rule references
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

require 'openscap_parser/rule_result'
require 'openscap_results_parser/rule_result'

module OpenscapParser
module RuleResults
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

require 'openscap_parser/rule'
require 'openscap_results_parser/rule'

module OpenscapParser
# Methods related to parsing rules
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

require 'openscap_parser/tailoring'
require 'openscap_results_parser/tailoring'

module OpenscapParser
# Methods related to parsing Xccdf Tailoring types
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

require 'openscap_parser/rule_results'
require 'openscap_results_parser/rule_results'

module OpenscapParser
class TestResult < XmlNode
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

require 'openscap_parser/test_result'
require 'openscap_results_parser/test_result'

module OpenscapParser
module TestResults
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

require 'nokogiri'
require 'openscap_parser/xml_node'
require 'openscap_results_parser/xml_node'

module OpenscapParser
class XmlFile < XmlNode
Expand Down
4 changes: 2 additions & 2 deletions lib/railtie.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# lib/railtie.rb
require 'openscap_parser'
require 'openscap_results_parser'

if defined?(Rails)
module OpenscapParser
class Railtie < Rails::Railtie
railtie_name :openscap_parser
railtie_name :openscap_results_parser

rake_tasks do
path = File.expand_path(__dir__)
Expand Down
6 changes: 3 additions & 3 deletions openscap_parser.gemspec → openscap_results_parser.gemspec
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@

lib = File.expand_path("../lib", __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require "openscap_parser/version"
require "openscap_results_parser/version"

Gem::Specification.new do |spec|
spec.name = 'openscap_parser'
spec.name = 'openscap_results_parser'
spec.version = OpenscapParser::VERSION
spec.authors = ['Daniel Lobato Garcia', 'Andrew Kofink']
spec.email = ['[email protected]', '[email protected]']

spec.summary = %q{Parse OpenSCAP content}
spec.description = %q{This gem is a Ruby interface into SCAP content. It can parse SCAP datastream files (i.e. ssg-rhel7-ds.xml), scan result files output by oscap eval, and tailoring files.}
spec.homepage = 'https://github.com/dLobatog/openscap_parser'
spec.homepage = 'https://github.com/dLobatog/openscap_results_parser'
spec.license = 'MIT'

# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
Expand Down
2 changes: 1 addition & 1 deletion test/test_helper.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
$LOAD_PATH.unshift File.expand_path("../../lib", __FILE__)
require "openscap_parser"
require "openscap_results_parser"
require 'pathname'

require "minitest/autorun"
Expand Down