Skip to content

Commit

Permalink
Renamed project from creategem to nugem
Browse files Browse the repository at this point in the history
mslinn committed Jul 8, 2023
1 parent 36b22e6 commit 9218854
Showing 25 changed files with 118 additions and 108 deletions.
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -42,7 +42,7 @@ Metrics/AbcSize:

Metrics/BlockLength:
Exclude:
- creategem.gemspec
- nugem.gemspec
Max: 30

Metrics/ClassLength:
2 changes: 1 addition & 1 deletion .vscode/creategem.json.code-snippets
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
// Place your creategem workspace snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
// Place your nugem workspace snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source 'https://rubygems.org'

# Runtime gem dependencies are specified in creategem.gemspec
# Runtime gem dependencies are specified in nugem.gemspec
gemspec

group :development do
60 changes: 35 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# `Creategem` [![Gem Version](https://badge.fury.io/rb/createtem.svg)](https://badge.fury.io/rb/creategem)
# `Nugem` [![Gem Version](https://badge.fury.io/rb/createtem.svg)](https://badge.fury.io/rb/nugem)

** WORK IN PROGRESS **
**WORK IN PROGRESS**

`Creategem` creates a scaffold project for a new gem in a new git repository.
`Nugem` creates a scaffold project for a new gem in a new git repository.
After you add your special code to the gem scaffold,
the project is ready to be released to a public or private gem server.

@@ -21,31 +21,34 @@ with the following features:


## Installation

```shell
$ gem install creategem
$ gem install nugem
```

To update the program:

```shell
$ gem update creategem
$ gem update nugem
```


## Subcommands and Options

`Creategem` has 4 subcommands `plain`, `jekyll`, `help` and `rails`:
`Nugem` has 4 subcommands `plain`, `jekyll`, `help` and `rails`:

### `help` Subcommand

The following lists the available subcommands:

```shell
$ creategem help
$ nugem help
```

The following provides detailed help for the specified subcommand:

```shell
$ creategem help [SUBCOMMAND]
$ nugem help [SUBCOMMAND]
```


@@ -101,7 +104,7 @@ and your gem will be published.
### `plain` Subcommand

```shell
$ creategem plain NAME [COMMON_OPTIONS] [--test-framework=minitest|rspec]
$ nugem plain NAME [COMMON_OPTIONS] [--test-framework=minitest|rspec]
```

`NAME` is the name of the gem to be generated.
@@ -110,14 +113,16 @@ The default test framework for the `plain` subcommand is `rspec`,
but you can specify `minitest` instead like this:

```shell
$ creategem plain my_gem --test-framework=minitest
$ nugem plain my_gem --test-framework=minitest
```


### `jekyll` Subcommand

The `jekyll` subcommand extends the `plain` subcommand and creates a new Jekyll plugin with the given NAME:

```shell
$ creategem jekyll NAME [OPTIONS]
$ nugem jekyll NAME [OPTIONS]
```

`NAME` is the name of the Jekyll plugin gem to be generated.
@@ -126,7 +131,7 @@ In addition to the common options, the `jekyll`-specific `OPTIONS` are:

`--block`, `--blockn`, `--filter`, `--hooks`, `--tag`, and `--tagn`.

Each of these options causes `creategem` to prompt the user for additional input.
Each of these options causes `nugem` to prompt the user for additional input.

The test framework for `jekyll` plugins is `rspec`.

@@ -135,7 +140,7 @@ except the `--hooks` option.
For example:

```shell
$ creategem jekyll test_tags --tag my_tag1 --tag my_tag2
$ nugem jekyll test_tags --tag my_tag1 --tag my_tag2
```

The above creates a Jekyll plugin called `test_tags`,
@@ -152,15 +157,16 @@ my_tag2 usage: {% my_tag2 %}
For more information, type

```shell
$ creategem help jekyll
$ nugem help jekyll
```


### `rails` Subcommand

The `rails` subcommand extends the `plain` subcommand and creates a new Rails plugin with the given NAME:

```shell
$ creategem rails NAME [OPTIONS]
$ nugem rails NAME [OPTIONS]
```

`NAME` is the name of the Ruby on Rails plugin gem to be generated.
@@ -170,20 +176,21 @@ In addition to the common options, `rails` `OPTIONS` are

You can specify if the plugin should be an engine (`--engine`) or a mountable engine (`--mountable`).

Each of these options causes `creategem` to prompt the user for additional input.
Each of these options causes `nugem` to prompt the user for additional input.

The test framework for `rails` gems is `minitest`.

For more information, type

```shell
$ creategem help rails
$ nugem help rails
```


## Did It Work?

The following shows all files that were committed to the newly created git repository,
after `creategem jekyll` finished making two tag blocks:
after `nugem jekyll` finished making two tag blocks:

```shell
$ git ls-tree --name-only --full-tree -r HEAD
@@ -237,7 +244,9 @@ test/test_helper.rb


## Visual Studio Code Support
### Creategem Project

### Nugem Project

#### Plugins
If you have not installed the
[Snippets](https://marketplace.visualstudio.com/items?itemName=devonray.snippet) extension,
@@ -246,22 +255,23 @@ You can also review the list of suggested extensions of with the <kbd>Ctrl</kbd>
`Extensions: Show Recommended Extensions` command.

#### Snippets
The predefined snippets for `creategem` are defined in
[`.vscode/creategem.json.code-snippets`](.vscode/creategem.json.code-snippets).
These snippets are focused on maintaining `creategem` itself.
The predefined snippets for `nugem` are defined in
[`.vscode/nugem.json.code-snippets`](.vscode/nugem.json.code-snippets).
These snippets are focused on maintaining `nugem` itself.

#### File Associations
`.vscode/settings.json` defines file associations for various flavors of Thor templates in the `"files.associations"` section.
You can disable them by commenting some or all of those definitions.


### Generated Projects

#### Plugins
Similarly, for each gem project generated by `creategem`, Visual Studio Code will suggest
Similarly, for each gem project generated by `nugem`, Visual Studio Code will suggest
the user install missing extensions the first time those projects are opened.

#### Snippets
The predefined snippets for gem projects generated by `creategem` are defined in
The predefined snippets for gem projects generated by `nugem` are defined in
their `.vscode/gem.json.code-snippets` file.
These snippets are focused on writing Jekyll plugins.

@@ -285,7 +295,7 @@ and push the `.gem` file to https://rubygems.org.


## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/mslinn/creategem.
Bug reports and pull requests are welcome on GitHub at https://github.com/mslinn/nugem.


## See Also
4 changes: 2 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -24,8 +24,8 @@ end

task publish: [:build] do
$VERBOSE = nil
load 'creategem/version.rb'
system "gem push pkg/creategem-#{Creategem::VERSION}.gem"
load 'nugem/version.rb'
system "gem push pkg/nugem-#{Nugem::VERSION}.gem"
end

desc 'Bump patch version, create git tag, build the gem and release to geminabox (default)'
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 'creategem'
require 'nugem'

require 'irb'
IRB.start
4 changes: 2 additions & 2 deletions bin/demo
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ require 'fileutils'
require 'open3'
require 'thor'

module CreategemDemo
module NugemDemo
def self.run(command, input)
shell = Thor::Shell::Color.new
shell.say command, :yellow
@@ -63,7 +63,7 @@ module CreategemDemo
#{@jekyll_parameter_types.join "\n"}
no
END_INFO
CreategemDemo.run "exe/creategem #{@gem_type} #{@gem_name} --#{@jekyll_type} #{@jekyll_name}", input
NugemDemo.run "exe/nugem #{@gem_type} #{@gem_name} --#{@jekyll_type} #{@jekyll_name}", input
end
end

9 changes: 0 additions & 9 deletions exe/creategem

This file was deleted.

9 changes: 9 additions & 0 deletions exe/nugem
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env ruby

if File.exist? 'lib/nugem/cli.rb'
require_relative '../lib/nugem/cli'
else
require 'nugem/cli'
end

Nugem::Cli.start
10 changes: 5 additions & 5 deletions lib/creategem.rb → lib/nugem.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
require 'thor'
require_relative 'creategem/git'
require_relative 'creategem/repository'
require_relative 'creategem/version'
require_relative 'nugem/git'
require_relative 'nugem/repository'
require_relative 'nugem/version'
require_relative 'util'

module Creategem
module Nugem
# @return Path to the generated gem
def self.dest_root(gem_name)
File.expand_path "generated/#{gem_name}"
@@ -13,7 +13,7 @@ def self.dest_root(gem_name)
class Cli < Thor
include Thor::Actions

package_name 'Creategem'
package_name 'Nugem'

# These declarations make the class instance variable values available as an accessor,
# which is necessary to name template files that are named '%variable_name%.extension'.
12 changes: 6 additions & 6 deletions lib/creategem/cli.rb → lib/nugem/cli.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
require 'fileutils'
require 'rugged'
require_relative '../creategem'
require_relative '../nugem'

# Creategem::Cli is a Thor class that is invoked when a user runs a creategem executable.
# Nugem::Cli is a Thor class that is invoked when a user runs a nugem executable.
# This file defines the common aspects of the Thor class.
# The cli/ directory contains class extensions specific to each Thor subcommand.
module Creategem
module Nugem
class Cli < Thor
include Thor::Actions
include Creategem::Git
include Nugem::Git

class_option :executable, type: :boolean, default: false,
desc: 'Include an executable for the gem.'
@@ -50,13 +50,13 @@ def self.todo
private

def count_todos(filename)
filename_fq = "#{Creategem.dest_root gem_name}/#{filename}"
filename_fq = "#{Nugem.dest_root gem_name}/#{filename}"
content = File.read filename_fq
content.scan('TODO').length
end

def initialize_repository(gem_name)
Dir.chdir Creategem.dest_root(gem_name) do
Dir.chdir Nugem.dest_root(gem_name) do
# say "Working in #{Dir.pwd}", :green
run 'chmod +x bin/*'
run 'chmod +x exe/*' if @executable
12 changes: 6 additions & 6 deletions lib/creategem/cli/cli_gem.rb → lib/nugem/cli/cli_gem.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
require 'thor'

# Creategem::Cli is a Thor class that is invoked when a user runs a creategem executable
# Nugem::Cli is a Thor class that is invoked when a user runs a nugem executable
require_relative '../cli'

module Creategem
module Nugem
class Cli < Thor
include Thor::Actions
include Creategem::Git
include Nugem::Git

desc 'plain NAME', 'Creates a new plain gem scaffold.'

@@ -22,7 +22,7 @@ class Cli < Thor
desc: 'Publish the gem in a private repository.'

def plain(gem_name)
@dir = Creategem.dest_root gem_name
@dir = Nugem.dest_root gem_name

@host = options['host']
@private = options['private']
@@ -38,11 +38,11 @@ def plain(gem_name)
def create_plain_scaffold(gem_name)
@gem_name = gem_name
say "Creating a scaffold for a new plain Ruby gem named #{@gem_name} in #{@dir}.", :green
@class_name = Creategem.camel_case @gem_name
@class_name = Nugem.camel_case @gem_name
@executable = options[:executable]
@host = options[:bitbucket] ? :bitbucket : :github
@private = options[:private]
@repository = Creategem::Repository.new(
@repository = Nugem::Repository.new(
host: @host,
user: git_repository_user_name(@host),
name: @gem_name,
32 changes: 16 additions & 16 deletions lib/creategem/cli/cli_jekyll.rb → lib/nugem/cli/cli_jekyll.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
require_relative '../cli'
require_relative 'jekyll_demo'

module Creategem
module Nugem
class Cli < Thor # rubocop:disable Metrics/ClassLength
include Thor::Actions
include Creategem::Git
include Nugem::Git

attr_accessor :class_name, :filter_params, :trailing_args, :trailing_dump, :trailing_params

@@ -40,8 +40,8 @@ class Cli < Thor # rubocop:disable Metrics/ClassLength

def jekyll(gem_name)
@gem_name = gem_name
@dir = Creategem.dest_root @gem_name
@class_name = Creategem.camel_case @gem_name
@dir = Nugem.dest_root @gem_name
@class_name = Nugem.camel_case @gem_name
@jekyll = true
@rspec = true

@@ -110,28 +110,28 @@ def create_jekyll_scaffold

def create_jekyll_block_scaffold(block_name)
@block_name = block_name
@jekyll_class_name = Creategem.camel_case block_name
@jekyll_class_name = Nugem.camel_case block_name
ask_option_names_types block_name # Defines @jekyll_parameter_names_types, which is a nested array of name/value pairs:
# [["opt1", "string"], ["opt2", "boolean"]]
say "Creating Jekyll block tag #{@block_name} scaffold within #{@jekyll_class_name}", :green
@mute = true
directory 'jekyll/block_scaffold', @dir, force: true, mode: :preserve
append_to_file "#{Creategem.dest_root gem_name}/demo/index.html", Cli.add_demo_example(block_name, @jekyll_parameter_names_types, :block)
append_to_file "#{Nugem.dest_root gem_name}/demo/index.html", Cli.add_demo_example(block_name, @jekyll_parameter_names_types, :block)
end

def create_jekyll_block_no_arg_scaffold(block_name)
@block_name = block_name
@jekyll_class_name = Creategem.camel_case block_name
@jekyll_class_name = Nugem.camel_case block_name
say "Creating Jekyll block tag no_arg #{@block_name} scaffold within #{@jekyll_class_name}", :green
@mute = true
directory 'jekyll/block_no_arg_scaffold', @dir, force: true, mode: :preserve
append_to_file "#{Creategem.dest_root gem_name}/demo/index.html", Cli.add_demo_example(block_name, @jekyll_parameter_names_types, :block)
append_to_file "#{Nugem.dest_root gem_name}/demo/index.html", Cli.add_demo_example(block_name, @jekyll_parameter_names_types, :block)
end

def create_jekyll_filter_scaffold(filter_name)
# rubocop:disable Style/StringConcatenation
@filter_name = filter_name
@jekyll_class_name = Creategem.camel_case filter_name
@jekyll_class_name = Nugem.camel_case filter_name
@filter_params = ask('Jekyll filters have at least one input. ' \
"What are the names of additional inputs for #{filter_name}, if any?")
.split(/[ ,\t]/)
@@ -148,45 +148,45 @@ def create_jekyll_filter_scaffold(filter_name)
directory 'jekyll/filter_scaffold', @dir, force: true, mode: :preserve

tp = ': ' + @filter_params.map { |x| "'#{x}_value'" }.join(', ') unless @filter_params.empty?
append_to_file "#{Creategem.dest_root gem_name}/demo/index.html", Cli.add_filter_example(filter_name, tp)
append_to_file "#{Nugem.dest_root gem_name}/demo/index.html", Cli.add_filter_example(filter_name, tp)
# rubocop:enable Style/StringConcatenation
end

def create_jekyll_generator_scaffold(generator_name)
@generator_name = generator_name
@jekyll_class_name = Creategem.camel_case generator_name
@jekyll_class_name = Nugem.camel_case generator_name
say "Creating a new Jekyll generator class scaffold #{@jekyll_class_name}", :green
@mute = true
directory 'jekyll/generator_scaffold', @dir, force: true, mode: :preserve
end

def create_jekyll_hooks_scaffold(plugin_name)
@plugin_name = plugin_name
@jekyll_class_name = Creategem.camel_case plugin_name
@jekyll_class_name = Nugem.camel_case plugin_name
say 'Creating a new Jekyll hook scaffold', :green
@mute = true
directory 'jekyll/hooks_scaffold', @dir, force: true, mode: :preserve
end

def create_jekyll_tag_no_arg_scaffold(tag_name)
@tag_name = tag_name
@jekyll_class_name = Creategem.camel_case @tag_name
@jekyll_class_name = Nugem.camel_case @tag_name
say "Creating Jekyll tag no_arg #{@tag_name} scaffold within #{@jekyll_class_name}", :green
@mute = true
directory 'jekyll/tag_no_arg_scaffold', @dir, force: true, mode: :preserve
append_to_file "#{Creategem.dest_root gem_name}/demo/index.html", Cli.add_demo_example(tag_name, @jekyll_parameter_names_types, :tag)
append_to_file "#{Nugem.dest_root gem_name}/demo/index.html", Cli.add_demo_example(tag_name, @jekyll_parameter_names_types, :tag)
end

def create_jekyll_tag_scaffold(tag_name)
@tag_name = tag_name
@jekyll_class_name = Creategem.camel_case @tag_name
@jekyll_class_name = Nugem.camel_case @tag_name
ask_option_names_types tag_name # Defines @jekyll_parameter_names_types, which is a nested array of name/value pairs:
# [["opt1", "string"], ["opt2", "boolean"]]
say "Creating Jekyll tag #{@tag_name} scaffold within #{@jekyll_class_name}", :green
@mute = true
# puts set_color("@jekyll_parameter_names_types=#{@jekyll_parameter_names_types}", :yellow)
directory 'jekyll/tag_scaffold', @dir, force: true, mode: :preserve
append_to_file "#{Creategem.dest_root gem_name}/demo/index.html", Cli.add_demo_example(tag_name, @jekyll_parameter_names_types, :tag)
append_to_file "#{Nugem.dest_root gem_name}/demo/index.html", Cli.add_demo_example(tag_name, @jekyll_parameter_names_types, :tag)
end
end
end
6 changes: 3 additions & 3 deletions lib/creategem/cli/cli_rails.rb → lib/nugem/cli/cli_rails.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
require_relative '../cli'

module Creategem
module Nugem
class Cli < Thor
include Thor::Actions
include Creategem::Git
include Nugem::Git

desc 'rails NAME', 'Creates a new Rails rails scaffold.'

@@ -26,7 +26,7 @@ def rails(gem_name)
@private = options['private']
@test_framework = options['test_framework']

@dir = Creategem.dest_root gem_name
@dir = Nugem.dest_root gem_name
@engine = @host || @mountable
@rails = true

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Creategem
module Nugem
class Cli < Thor
include Thor::Actions

8 changes: 4 additions & 4 deletions lib/creategem/git.rb → lib/nugem/git.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'thor'
require 'yaml'

module Creategem
module Nugem
module Git
include Thor::Actions

@@ -15,7 +15,7 @@ def create_local_git_repository
end

def github_config
gh_hosts_file = Creategem.expand_env('$HOME/.config/gh/hosts.yml')
gh_hosts_file = Nugem.expand_env('$HOME/.config/gh/hosts.yml')
return nil unless File.exist? gh_hosts_file

YAML.safe_load(File.read(gh_hosts_file))
@@ -51,7 +51,7 @@ def create_remote_git_repository(repository)

def git_repository_user_name(host)
global_config = Rugged::Config.global
git_config_key = "creategem.#{host}user"
git_config_key = "nugem.#{host}user"
user = global_config[git_config_key]

gh_config = github_config
@@ -65,7 +65,7 @@ def git_repository_user_name(host)
def gem_server_url(private_)
if private_
global_config = Rugged::Config.global
git_config_key = 'creategem.gemserver'
git_config_key = 'nugem.gemserver'
url = global_config[git_config_key]

if url.to_s.empty?
4 changes: 2 additions & 2 deletions lib/creategem/repository.rb → lib/nugem/repository.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Creategem::Repository contains informations about the git repository and the git user
module Creategem
# Nugem::Repository contains informations about the git repository and the git user
module Nugem
class Repository
attr_reader :gem_server_url, :global_config, :host, :name, :private, :user, :user_name, :user_email

2 changes: 1 addition & 1 deletion lib/creategem/version.rb → lib/nugem/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Creategem
module Nugem
VERSION = '0.8.0'.freeze
end
2 changes: 1 addition & 1 deletion lib/util.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Creategem
module Nugem
def self.camel_case(str)
Thor::Util.camel_case str.tr('-', '_')
end
12 changes: 6 additions & 6 deletions creategem.gemspec → nugem.gemspec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require_relative 'lib/creategem/version'
require_relative 'lib/nugem/version'

Gem::Specification.new do |spec|
spec.authors = ['Igor Jancev', 'Mike Slinn']
@@ -7,16 +7,16 @@ Gem::Specification.new do |spec|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.files = Dir['.rubocop.yml', 'LICENSE.*', 'Rakefile', '{lib,spec}/**/*', '*.gemspec', '*.md']
spec.description = <<~END_DESC
Creategem creates a scaffold project for new gems. You can choose between Github and Bitbucket,
Nugem creates a scaffold project for new gems. You can choose between Github and Bitbucket,
Rubygems or Geminabox, with or without an executable, etc.
END_DESC
spec.homepage = 'https://github.com/mslinn/creategem'
spec.homepage = 'https://github.com/mslinn/nugem'
spec.license = 'MIT'
spec.name = 'creategem'
spec.name = 'nugem'
spec.require_paths = ['lib']
spec.required_ruby_version = '>= 3.1.0'
spec.summary = 'Creategem creates a scaffold project for new gems.'
spec.version = Creategem::VERSION
spec.summary = 'Nugem creates a scaffold project for new gems.'
spec.version = Nugem::VERSION

spec.add_dependency 'rugged'
spec.add_dependency 'thor'
4 changes: 2 additions & 2 deletions spec/jekyll_tag_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require_relative '../lib/creategem/cli/cli_jekyll'
require_relative '../lib/nugem/cli/cli_jekyll'

class JekyllTagTest
RSpec.describe ::Creategem::Cli do
RSpec.describe ::Nugem::Cli do
it 'tests tag option combinations' do
params = [
%w[option1 string],
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require_relative '../lib/creategem'
require_relative '../lib/nugem'

RSpec.configure do |config|
config.filter_run :focus
4 changes: 2 additions & 2 deletions test/creategem_test.rb → test/nugem_test.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require_relative 'test_helper'

class CreategemTest < Minitest::Test
class NugemTest < Minitest::Test
def test_that_it_has_a_version_number
refute_nil ::Creategem::VERSION
refute_nil ::Nugem::VERSION
end
end
18 changes: 9 additions & 9 deletions test/repository_test.rb
Original file line number Diff line number Diff line change
@@ -2,21 +2,21 @@

class RepositoryTest < Minitest::Test
def test_bitbucket
repo = Creategem::Repository.new(host: :bitbucket,
private: true,
user: 'maxmustermann',
name: :testrepo,
gem_server_url: 'https://gems.mustermann.com')
repo = Nugem::Repository.new(host: :bitbucket,
private: true,
user: 'maxmustermann',
name: :testrepo,
gem_server_url: 'https://gems.mustermann.com')
assert_equal 'git@bitbucket.org:maxmustermann/testrepo.git', repo.origin
assert repo.private?
assert repo.bitbucket?
end

def test_github
repo = Creategem::Repository.new(host: :github,
user: 'maxmustermann',
name: :testrepo,
gem_server_url: 'https://rubygems.org')
repo = Nugem::Repository.new(host: :github,
user: 'maxmustermann',
name: :testrepo,
gem_server_url: 'https://rubygems.org')
assert_equal 'git@github.com:maxmustermann/testrepo.git', repo.origin
assert repo.public?
assert repo.github?
2 changes: 1 addition & 1 deletion test/test_helper.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require_relative '../lib/creategem'
require_relative '../lib/nugem'

require 'coveralls'
Coveralls.wear!

0 comments on commit 9218854

Please sign in to comment.