Skip to content

Commit

Permalink
+ ruby-next-parser.gemspec
Browse files Browse the repository at this point in the history
  • Loading branch information
palkan committed Jul 7, 2020
1 parent fbb80db commit 3314324
Show file tree
Hide file tree
Showing 10 changed files with 3,023 additions and 36 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ lib/parser/ruby27.rb
lib/parser/ruby28.rb
lib/parser/macruby.rb
lib/parser/rubymotion.rb
lib/parser/rubynext.rb
lib/parser/ruby-next/lexer.rb
4 changes: 3 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
source 'https://rubygems.org'

# Specify your gem's dependencies in parser.gemspec
gemspec
gemspec name: "parser"

# Workaround for bug in Bundler on JRuby
# See https://github.com/bundler/bundler/issues/4157
gem 'ast', '>= 1.1', '< 3.0'

gem "pry-byebug", platform: :mri
26 changes: 9 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,17 @@ else
endif

# Generate parser
default: generate
default: generate test

generate:
dip rake generate
dip rake --rakefile=Rakefile clean generate

build: generate
gem build parser.gemspec
test:
dip rake --rakefile=Rakefile test

release: clean version build push
release: generate test
gem release ruby-next-parser
git push
git push --tags

push:
gem push --key github --host https://rubygems.pkg.github.com/ruby-next parser-${VERSION}.gem

version:
echo "# frozen_string_literal: true\n\nmodule Parser\n VERSION = '${VERSION}'\nend" > lib/parser/version.rb

print-version:
echo "New version: ${VERSION}"

clean:
(find ./lib/parser -maxdepth 1 -type f -name "ruby*.rb" | grep "ruby" && rm lib/parser/ruby*.rb) || true
(find ./ -maxdepth 1 -type f -name "*.gem" | grep parser && rm *.gem) || true
.PHONY: test
29 changes: 14 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
# Parser
[![Gem Version](https://badge.fury.io/rb/ruby-next-parser.svg)](https://rubygems.org/gems/ruby-next-parser) [![Build](https://github.com/ruby-next/parser/workflows/Build/badge.svg)](https://github.com/ruby-next/parser/actions)

**NOTE:** This is a custom build of a [`parser` gem](https://github.com/whitequark/parser) containing edge features not-yet-released or even merged into `master`.
# Parser

You can install it from GitHub Package Registry:
**NOTE:** This is a fork of a [`parser` gem](https://github.com/whitequark/parser) providing a custom parser for edge and experimental Ruby syntax.

- Configure Bundler for downloading packages from GitHub (see the [Package Registry docs](https://help.github.com/en/github/managing-packages-with-github-package-registry/configuring-rubygems-for-use-with-github-package-registry#authenticating-to-github-package-registry))
- Install gem globally:
Usage:

```sh
gem install parser -v 2.6.3.105 --source "https://<username>:<token>@rubygems.pkg.github.com/ruby-next"
```
```ruby
# add gem to your Gemfile
gem "ruby-next-parser", ">= 2.8.0.0"

- Or add to your Gemfile:
# require the Ruby Next parser
require "parser/rubynext"

```sh
source "https://rubygems.pkg.github.com/ruby-next" do
gem "parser"
end
# and use it
parser = Parser::RubyNext.new
```

[![Gem Version](https://badge.fury.io/rb/parser.svg)](https://badge.fury.io/rb/parser)
[![Build Status](https://travis-ci.org/whitequark/parser.svg?branch=master)](https://travis-ci.org/whitequark/parser)
----

_Original Parser Readme_

_Parser_ is a production-ready Ruby parser written in pure Ruby. It recognizes as
much or more code than Ripper, Melbourne, JRubyParser or ruby\_parser, and
Expand Down
5 changes: 3 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# encoding: utf-8
# frozen_string_literal: true

require 'bundler/gem_tasks'
require 'rake/testtask'
require 'rake/clean'
require 'date'
Expand Down Expand Up @@ -34,7 +33,9 @@ GENERATED_FILES = %w(lib/parser/lexer.rb
lib/parser/ruby27.rb
lib/parser/ruby28.rb
lib/parser/macruby.rb
lib/parser/rubymotion.rb)
lib/parser/rubymotion.rb
lib/parser/rubynext.rb
lib/parser/ruby-next/lexer.rb)

CLEAN.include(GENERATED_FILES)

Expand Down
5 changes: 5 additions & 0 deletions lib/parser/ruby-next/version.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# frozen_string_literal: true

module Parser
NEXT_VERSION = "2.8.0.0"
end
Loading

0 comments on commit 3314324

Please sign in to comment.